Class ZoneMovement

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

public final class ZoneMovement extends Object implements com.azure.json.JsonSerializable<ZoneMovement>
Describes zone movement configuration. This allows VM to be moved across availability zones during an outage.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of ZoneMovement class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ZoneMovement from the JsonReader.
    Get the isEnabled property: Indicates if zone movement is enabled.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    Set the isEnabled property: Indicates if zone movement is enabled.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • ZoneMovement

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

    • isEnabled

      public Boolean isEnabled()
      Get the isEnabled property: Indicates if zone movement is enabled. By default isEnabled is set to false i.e VM can't be moved from one zone to another.
      Returns:
      the isEnabled value.
    • withIsEnabled

      public ZoneMovement withIsEnabled(Boolean isEnabled)
      Set the isEnabled property: Indicates if zone movement is enabled. By default isEnabled is set to false i.e VM can't be moved from one zone to another.
      Parameters:
      isEnabled - the isEnabled value to set.
      Returns:
      the ZoneMovement 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<ZoneMovement>
      Throws:
      IOException
    • fromJson

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