Class ObjectReplicationPolicyRule
java.lang.Object
com.azure.resourcemanager.storage.models.ObjectReplicationPolicyRule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ObjectReplicationPolicyRule>
public final class ObjectReplicationPolicyRule
extends Object
implements com.azure.json.JsonSerializable<ObjectReplicationPolicyRule>
The replication policy rule between two containers.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ObjectReplicationPolicyRule class. -
Method Summary
Modifier and TypeMethodDescriptionGet the destinationContainer property: Required.filters()Get the filters property: Optional.static ObjectReplicationPolicyRulefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ObjectReplicationPolicyRule from the JsonReader.ruleId()Get the ruleId property: Rule Id is auto-generated for each new rule on destination account.Get the sourceContainer property: Required.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDestinationContainer(String destinationContainer) Set the destinationContainer property: Required.withFilters(ObjectReplicationPolicyFilter filters) Set the filters property: Optional.withRuleId(String ruleId) Set the ruleId property: Rule Id is auto-generated for each new rule on destination account.withSourceContainer(String sourceContainer) Set the sourceContainer property: Required.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ObjectReplicationPolicyRule
public ObjectReplicationPolicyRule()Creates an instance of ObjectReplicationPolicyRule class.
-
-
Method Details
-
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.
-
withRuleId
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.
-
sourceContainer
Get the sourceContainer property: Required. Source container name.- Returns:
- the sourceContainer value.
-
withSourceContainer
Set the sourceContainer property: Required. Source container name.- Parameters:
sourceContainer- the sourceContainer value to set.- Returns:
- the ObjectReplicationPolicyRule object itself.
-
destinationContainer
Get the destinationContainer property: Required. Destination container name.- Returns:
- the destinationContainer value.
-
withDestinationContainer
Set the destinationContainer property: Required. Destination container name.- Parameters:
destinationContainer- the destinationContainer value to set.- Returns:
- the ObjectReplicationPolicyRule object itself.
-
filters
Get the filters property: Optional. An object that defines the filter set.- Returns:
- the filters value.
-
withFilters
Set the filters property: Optional. An object that defines the filter set.- Parameters:
filters- the filters value to set.- Returns:
- the ObjectReplicationPolicyRule object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ObjectReplicationPolicyRule>- Throws:
IOException
-
fromJson
public static ObjectReplicationPolicyRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the ObjectReplicationPolicyRule.
-