Class OnErrorDeployment

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

public final class OnErrorDeployment extends Object implements com.azure.json.JsonSerializable<OnErrorDeployment>
Deployment on error behavior.
  • Constructor Details

    • OnErrorDeployment

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

    • type

      public OnErrorDeploymentType type()
      Get the type property: The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment.
      Returns:
      the type value.
    • withType

      public OnErrorDeployment withType(OnErrorDeploymentType type)
      Set the type property: The deployment on error behavior type. Possible values are LastSuccessful and SpecificDeployment.
      Parameters:
      type - the type value to set.
      Returns:
      the OnErrorDeployment object itself.
    • deploymentName

      public String deploymentName()
      Get the deploymentName property: The deployment to be used on error case.
      Returns:
      the deploymentName value.
    • withDeploymentName

      public OnErrorDeployment withDeploymentName(String deploymentName)
      Set the deploymentName property: The deployment to be used on error case.
      Parameters:
      deploymentName - the deploymentName value to set.
      Returns:
      the OnErrorDeployment 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<OnErrorDeployment>
      Throws:
      IOException
    • fromJson

      public static OnErrorDeployment fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of OnErrorDeployment from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of OnErrorDeployment 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 OnErrorDeployment.