TargetResource Class

  • java.lang.Object
    • com.azure.resourcemanager.resources.models.TargetResource

Implements

public final class TargetResource
implements JsonSerializable<TargetResource>

Target resource.

Constructor Summary

Constructor Description
TargetResource()

Creates an instance of TargetResource class.

Method Summary

Modifier and Type Method and Description
static TargetResource fromJson(JsonReader jsonReader)

Reads an instance of TargetResource from the JsonReader.

String id()

Get the id property: The ID of the resource.

String resourceName()

Get the resourceName property: The name of the resource.

String resourceType()

Get the resourceType property: The type of the resource.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

TargetResource withId(String id)

Set the id property: The ID of the resource.

TargetResource withResourceName(String resourceName)

Set the resourceName property: The name of the resource.

TargetResource withResourceType(String resourceType)

Set the resourceType property: The type of the resource.

Methods inherited from java.lang.Object

Constructor Details

TargetResource

public TargetResource()

Creates an instance of TargetResource class.

Method Details

fromJson

public static TargetResource fromJson(JsonReader jsonReader)

Reads an instance of TargetResource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of TargetResource if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the TargetResource.

id

public String id()

Get the id property: The ID of the resource.

Returns:

the id value.

resourceName

public String resourceName()

Get the resourceName property: The name of the resource.

Returns:

the resourceName value.

resourceType

public String resourceType()

Get the resourceType property: The type of the resource.

Returns:

the resourceType value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withId

public TargetResource withId(String id)

Set the id property: The ID of the resource.

Parameters:

id - the id value to set.

Returns:

the TargetResource object itself.

withResourceName

public TargetResource withResourceName(String resourceName)

Set the resourceName property: The name of the resource.

Parameters:

resourceName - the resourceName value to set.

Returns:

the TargetResource object itself.

withResourceType

public TargetResource withResourceType(String resourceType)

Set the resourceType property: The type of the resource.

Parameters:

resourceType - the resourceType value to set.

Returns:

the TargetResource object itself.

Applies to