Class MigrateToStv2Contract

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

public final class MigrateToStv2Contract extends Object implements com.azure.json.JsonSerializable<MigrateToStv2Contract>
Describes an available API Management SKU.
  • Constructor Details

    • MigrateToStv2Contract

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

    • mode

      public MigrateToStv2Mode mode()
      Get the mode property: Mode of Migration to stv2. Default is PreserveIp.
      Returns:
      the mode value.
    • withMode

      public MigrateToStv2Contract withMode(MigrateToStv2Mode mode)
      Set the mode property: Mode of Migration to stv2. Default is PreserveIp.
      Parameters:
      mode - the mode value to set.
      Returns:
      the MigrateToStv2Contract 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<MigrateToStv2Contract>
      Throws:
      IOException
    • fromJson

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