ObjectReplicationPolicyInner Class

public final class ObjectReplicationPolicyInner
extends ProxyResource

The replication policy between two storage accounts. Multiple rules can be defined in one policy.

Constructor Summary

Constructor Description
ObjectReplicationPolicyInner()

Creates an instance of ObjectReplicationPolicyInner class.

Method Summary

Modifier and Type Method and Description
String destinationAccount()

Get the destinationAccount property: Required.

OffsetDateTime enabledTime()

Get the enabledTime property: Indicates when the policy is enabled on the source account.

static ObjectReplicationPolicyInner fromJson(JsonReader jsonReader)

Reads an instance of ObjectReplicationPolicyInner from the JsonReader.

String id()

Get the id property: Fully qualified resource Id for the resource.

String name()

Get the name property: The name of the resource.

String policyId()

Get the policyId property: A unique id for object replication policy.

List<ObjectReplicationPolicyRule> rules()

Get the rules property: The storage account object replication rules.

String sourceAccount()

Get the sourceAccount property: Required.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

void validate()

Validates the instance.

ObjectReplicationPolicyInner withDestinationAccount(String destinationAccount)

Set the destinationAccount property: Required.

ObjectReplicationPolicyInner withRules(List<ObjectReplicationPolicyRule> rules)

Set the rules property: The storage account object replication rules.

ObjectReplicationPolicyInner withSourceAccount(String sourceAccount)

Set the sourceAccount property: Required.

Methods inherited from ProxyResource

Methods inherited from java.lang.Object

Constructor Details

ObjectReplicationPolicyInner

public ObjectReplicationPolicyInner()

Creates an instance of ObjectReplicationPolicyInner class.

Method Details

destinationAccount

public String destinationAccount()

Get the destinationAccount property: Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false.

Returns:

the destinationAccount value.

enabledTime

public OffsetDateTime enabledTime()

Get the enabledTime property: Indicates when the policy is enabled on the source account.

Returns:

the enabledTime value.

fromJson

public static ObjectReplicationPolicyInner fromJson(JsonReader jsonReader)

Reads an instance of ObjectReplicationPolicyInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ObjectReplicationPolicyInner 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.

id

public String id()

Get the id property: Fully qualified resource Id for the resource.

Overrides:

ObjectReplicationPolicyInner.id()

Returns:

the id value.

name

public String name()

Get the name property: The name of the resource.

Overrides:

ObjectReplicationPolicyInner.name()

Returns:

the name value.

policyId

public String policyId()

Get the policyId property: A unique id for object replication policy.

Returns:

the policyId value.

rules

public List rules()

Get the rules property: The storage account object replication rules.

Returns:

the rules value.

sourceAccount

public String sourceAccount()

Get the sourceAccount property: Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false.

Returns:

the sourceAccount value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

ObjectReplicationPolicyInner.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

ObjectReplicationPolicyInner.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

withDestinationAccount

public ObjectReplicationPolicyInner withDestinationAccount(String destinationAccount)

Set the destinationAccount property: Required. Destination account name. It should be full resource id if allowCrossTenantReplication set to false.

Parameters:

destinationAccount - the destinationAccount value to set.

Returns:

the ObjectReplicationPolicyInner object itself.

withRules

public ObjectReplicationPolicyInner withRules(List rules)

Set the rules property: The storage account object replication rules.

Parameters:

rules - the rules value to set.

Returns:

the ObjectReplicationPolicyInner object itself.

withSourceAccount

public ObjectReplicationPolicyInner withSourceAccount(String sourceAccount)

Set the sourceAccount property: Required. Source account name. It should be full resource id if allowCrossTenantReplication set to false.

Parameters:

sourceAccount - the sourceAccount value to set.

Returns:

the ObjectReplicationPolicyInner object itself.

Applies to