ObjectReplicationPolicyRule Class

  • java.lang.Object
    • com.azure.resourcemanager.storage.models.ObjectReplicationPolicyRule

Implements

public final class ObjectReplicationPolicyRule
implements JsonSerializable<ObjectReplicationPolicyRule>

The replication policy rule between two containers.

Constructor Summary

Constructor Description
ObjectReplicationPolicyRule()

Creates an instance of ObjectReplicationPolicyRule class.

Method Summary

Modifier and Type Method and Description
String destinationContainer()

Get the destinationContainer property: Required.

ObjectReplicationPolicyFilter filters()

Get the filters property: Optional.

static ObjectReplicationPolicyRule fromJson(JsonReader jsonReader)

Reads an instance of ObjectReplicationPolicyRule from the JsonReader.

String ruleId()

Get the ruleId property: Rule Id is auto-generated for each new rule on destination account.

String sourceContainer()

Get the sourceContainer property: Required.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ObjectReplicationPolicyRule withDestinationContainer(String destinationContainer)

Set the destinationContainer property: Required.

ObjectReplicationPolicyRule withFilters(ObjectReplicationPolicyFilter filters)

Set the filters property: Optional.

ObjectReplicationPolicyRule withRuleId(String ruleId)

Set the ruleId property: Rule Id is auto-generated for each new rule on destination account.

ObjectReplicationPolicyRule withSourceContainer(String sourceContainer)

Set the sourceContainer property: Required.

Methods inherited from java.lang.Object

Constructor Details

ObjectReplicationPolicyRule

public ObjectReplicationPolicyRule()

Creates an instance of ObjectReplicationPolicyRule class.

Method Details

destinationContainer

public String destinationContainer()

Get the destinationContainer property: Required. Destination container name.

Returns:

the destinationContainer value.

filters

public ObjectReplicationPolicyFilter filters()

Get the filters property: Optional. An object that defines the filter set.

Returns:

the filters value.

fromJson

public static ObjectReplicationPolicyRule fromJson(JsonReader jsonReader)

Reads an instance of ObjectReplicationPolicyRule from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

ruleId

public String ruleId()

Get the ruleId property: Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.

Returns:

the ruleId value.

sourceContainer

public String sourceContainer()

Get the sourceContainer property: Required. Source container name.

Returns:

the sourceContainer value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDestinationContainer

public ObjectReplicationPolicyRule withDestinationContainer(String destinationContainer)

Set the destinationContainer property: Required. Destination container name.

Parameters:

destinationContainer - the destinationContainer value to set.

Returns:

the ObjectReplicationPolicyRule object itself.

withFilters

public ObjectReplicationPolicyRule withFilters(ObjectReplicationPolicyFilter filters)

Set the filters property: Optional. An object that defines the filter set.

Parameters:

filters - the filters value to set.

Returns:

the ObjectReplicationPolicyRule object itself.

withRuleId

public ObjectReplicationPolicyRule withRuleId(String ruleId)

Set the ruleId property: Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.

Parameters:

ruleId - the ruleId value to set.

Returns:

the ObjectReplicationPolicyRule object itself.

withSourceContainer

public ObjectReplicationPolicyRule withSourceContainer(String sourceContainer)

Set the sourceContainer property: Required. Source container name.

Parameters:

sourceContainer - the sourceContainer value to set.

Returns:

the ObjectReplicationPolicyRule object itself.

Applies to