Class ManagementPolicyAction

java.lang.Object
com.azure.resourcemanager.storage.models.ManagementPolicyAction
All Implemented Interfaces:
com.azure.json.JsonSerializable<ManagementPolicyAction>

public final class ManagementPolicyAction extends Object implements com.azure.json.JsonSerializable<ManagementPolicyAction>
Actions are applied to the filtered blobs when the execution condition is met.
  • Constructor Details

    • ManagementPolicyAction

      public ManagementPolicyAction()
      Creates an instance of ManagementPolicyAction class.
  • Method Details

    • baseBlob

      public ManagementPolicyBaseBlob baseBlob()
      Get the baseBlob property: The management policy action for base blob.
      Returns:
      the baseBlob value.
    • withBaseBlob

      public ManagementPolicyAction withBaseBlob(ManagementPolicyBaseBlob baseBlob)
      Set the baseBlob property: The management policy action for base blob.
      Parameters:
      baseBlob - the baseBlob value to set.
      Returns:
      the ManagementPolicyAction object itself.
    • snapshot

      public ManagementPolicySnapShot snapshot()
      Get the snapshot property: The management policy action for snapshot.
      Returns:
      the snapshot value.
    • withSnapshot

      public ManagementPolicyAction withSnapshot(ManagementPolicySnapShot snapshot)
      Set the snapshot property: The management policy action for snapshot.
      Parameters:
      snapshot - the snapshot value to set.
      Returns:
      the ManagementPolicyAction object itself.
    • version

      public ManagementPolicyVersion version()
      Get the version property: The management policy action for version.
      Returns:
      the version value.
    • withVersion

      public ManagementPolicyAction withVersion(ManagementPolicyVersion version)
      Set the version property: The management policy action for version.
      Parameters:
      version - the version value to set.
      Returns:
      the ManagementPolicyAction object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ManagementPolicyAction>
      Throws:
      IOException
    • fromJson

      public static ManagementPolicyAction fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ManagementPolicyAction from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ManagementPolicyAction if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the ManagementPolicyAction.