Class ManagementPolicyDefinition
java.lang.Object
com.azure.resourcemanager.storage.models.ManagementPolicyDefinition
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ManagementPolicyDefinition>
public final class ManagementPolicyDefinition
extends Object
implements com.azure.json.JsonSerializable<ManagementPolicyDefinition>
An object that defines the Lifecycle rule. Each definition is made up with a filters set and an actions set.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ManagementPolicyDefinition class. -
Method Summary
Modifier and TypeMethodDescriptionactions()Get the actions property: An object that defines the action set.filters()Get the filters property: An object that defines the filter set.static ManagementPolicyDefinitionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ManagementPolicyDefinition from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withActions(ManagementPolicyAction actions) Set the actions property: An object that defines the action set.withFilters(ManagementPolicyFilter filters) Set the filters property: An object that defines the filter set.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
-
ManagementPolicyDefinition
public ManagementPolicyDefinition()Creates an instance of ManagementPolicyDefinition class.
-
-
Method Details
-
actions
Get the actions property: An object that defines the action set.- Returns:
- the actions value.
-
withActions
Set the actions property: An object that defines the action set.- Parameters:
actions- the actions value to set.- Returns:
- the ManagementPolicyDefinition object itself.
-
filters
Get the filters property: An object that defines the filter set.- Returns:
- the filters value.
-
withFilters
Set the filters property: An object that defines the filter set.- Parameters:
filters- the filters value to set.- Returns:
- the ManagementPolicyDefinition 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<ManagementPolicyDefinition>- Throws:
IOException
-
fromJson
public static ManagementPolicyDefinition fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ManagementPolicyDefinition from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ManagementPolicyDefinition 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 ManagementPolicyDefinition.
-