Datasource Class

  • java.lang.Object
    • com.azure.resourcemanager.dataprotection.models.Datasource

Implements

public final class Datasource
implements JsonSerializable<Datasource>

Datasource to be backed up.

Constructor Summary

Constructor Description
Datasource()

Creates an instance of Datasource class.

Method Summary

Modifier and Type Method and Description
String datasourceType()

Get the datasourceType property: DatasourceType of the resource.

static Datasource fromJson(JsonReader jsonReader)

Reads an instance of Datasource from the JsonReader.

String objectType()

Get the objectType property: Type of Datasource object, used to initialize the right inherited type.

String resourceId()

Get the resourceId property: Full ARM ID of the resource.

String resourceLocation()

Get the resourceLocation property: Location of datasource.

String resourceName()

Get the resourceName property: Unique identifier of the resource in the context of parent.

BaseResourceProperties resourceProperties()

Get the resourceProperties property: Properties specific to data source.

String resourceType()

Get the resourceType property: Resource Type of Datasource.

String resourceUri()

Get the resourceUri property: Uri of the resource.

JsonWriter toJson(JsonWriter jsonWriter)
Datasource withDatasourceType(String datasourceType)

Set the datasourceType property: DatasourceType of the resource.

Datasource withObjectType(String objectType)

Set the objectType property: Type of Datasource object, used to initialize the right inherited type.

Datasource withResourceId(String resourceId)

Set the resourceId property: Full ARM ID of the resource.

Datasource withResourceLocation(String resourceLocation)

Set the resourceLocation property: Location of datasource.

Datasource withResourceName(String resourceName)

Set the resourceName property: Unique identifier of the resource in the context of parent.

Datasource withResourceProperties(BaseResourceProperties resourceProperties)

Set the resourceProperties property: Properties specific to data source.

Datasource withResourceType(String resourceType)

Set the resourceType property: Resource Type of Datasource.

Datasource withResourceUri(String resourceUri)

Set the resourceUri property: Uri of the resource.

Methods inherited from java.lang.Object

Constructor Details

Datasource

public Datasource()

Creates an instance of Datasource class.

Method Details

datasourceType

public String datasourceType()

Get the datasourceType property: DatasourceType of the resource.

Returns:

the datasourceType value.

fromJson

public static Datasource fromJson(JsonReader jsonReader)

Reads an instance of Datasource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

objectType

public String objectType()

Get the objectType property: Type of Datasource object, used to initialize the right inherited type.

Returns:

the objectType value.

resourceId

public String resourceId()

Get the resourceId property: Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID created by backup service via Fabric/Vault.

Returns:

the resourceId value.

resourceLocation

public String resourceLocation()

Get the resourceLocation property: Location of datasource.

Returns:

the resourceLocation value.

resourceName

public String resourceName()

Get the resourceName property: Unique identifier of the resource in the context of parent.

Returns:

the resourceName value.

resourceProperties

public BaseResourceProperties resourceProperties()

Get the resourceProperties property: Properties specific to data source.

Returns:

the resourceProperties value.

resourceType

public String resourceType()

Get the resourceType property: Resource Type of Datasource.

Returns:

the resourceType value.

resourceUri

public String resourceUri()

Get the resourceUri property: Uri of the resource.

Returns:

the resourceUri value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

withDatasourceType

public Datasource withDatasourceType(String datasourceType)

Set the datasourceType property: DatasourceType of the resource.

Parameters:

datasourceType - the datasourceType value to set.

Returns:

the Datasource object itself.

withObjectType

public Datasource withObjectType(String objectType)

Set the objectType property: Type of Datasource object, used to initialize the right inherited type.

Parameters:

objectType - the objectType value to set.

Returns:

the Datasource object itself.

withResourceId

public Datasource withResourceId(String resourceId)

Set the resourceId property: Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID created by backup service via Fabric/Vault.

Parameters:

resourceId - the resourceId value to set.

Returns:

the Datasource object itself.

withResourceLocation

public Datasource withResourceLocation(String resourceLocation)

Set the resourceLocation property: Location of datasource.

Parameters:

resourceLocation - the resourceLocation value to set.

Returns:

the Datasource object itself.

withResourceName

public Datasource withResourceName(String resourceName)

Set the resourceName property: Unique identifier of the resource in the context of parent.

Parameters:

resourceName - the resourceName value to set.

Returns:

the Datasource object itself.

withResourceProperties

public Datasource withResourceProperties(BaseResourceProperties resourceProperties)

Set the resourceProperties property: Properties specific to data source.

Parameters:

resourceProperties - the resourceProperties value to set.

Returns:

the Datasource object itself.

withResourceType

public Datasource withResourceType(String resourceType)

Set the resourceType property: Resource Type of Datasource.

Parameters:

resourceType - the resourceType value to set.

Returns:

the Datasource object itself.

withResourceUri

public Datasource withResourceUri(String resourceUri)

Set the resourceUri property: Uri of the resource.

Parameters:

resourceUri - the resourceUri value to set.

Returns:

the Datasource object itself.

Applies to