Class CapacityReservationProfile

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

public final class CapacityReservationProfile extends Object implements com.azure.json.JsonSerializable<CapacityReservationProfile>
The parameters of a capacity reservation Profile.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    com.azure.core.management.SubResource
    Get the capacityReservationGroup property: Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of CapacityReservationProfile from the JsonReader.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withCapacityReservationGroup(com.azure.core.management.SubResource capacityReservationGroup)
    Set the capacityReservationGroup property: Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved.

    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

    • CapacityReservationProfile

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

    • capacityReservationGroup

      public com.azure.core.management.SubResource capacityReservationGroup()
      Get the capacityReservationGroup property: Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
      Returns:
      the capacityReservationGroup value.
    • withCapacityReservationGroup

      public CapacityReservationProfile withCapacityReservationGroup(com.azure.core.management.SubResource capacityReservationGroup)
      Set the capacityReservationGroup property: Specifies the capacity reservation group resource id that should be used for allocating the virtual machine or scaleset vm instances provided enough capacity has been reserved. Please refer to https://aka.ms/CapacityReservation for more details.
      Parameters:
      capacityReservationGroup - the capacityReservationGroup value to set.
      Returns:
      the CapacityReservationProfile 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<CapacityReservationProfile>
      Throws:
      IOException
    • fromJson

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