Class ResourceSharingProfile

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

public final class ResourceSharingProfile extends Object implements com.azure.json.JsonSerializable<ResourceSharingProfile>
The ResourceSharingProfile model.
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ResourceSharingProfile from the JsonReader.
    List<com.azure.core.management.SubResource>
    Get the subscriptionIds property: Specifies an array of subscription resource IDs that capacity reservation group is shared with.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withSubscriptionIds(List<com.azure.core.management.SubResource> subscriptionIds)
    Set the subscriptionIds property: Specifies an array of subscription resource IDs that capacity reservation group is shared with.

    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

    • ResourceSharingProfile

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

    • subscriptionIds

      public List<com.azure.core.management.SubResource> subscriptionIds()
      Get the subscriptionIds property: Specifies an array of subscription resource IDs that capacity reservation group is shared with. Block Capacity Reservations does not support sharing across subscriptions. **Note:** Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details.
      Returns:
      the subscriptionIds value.
    • withSubscriptionIds

      public ResourceSharingProfile withSubscriptionIds(List<com.azure.core.management.SubResource> subscriptionIds)
      Set the subscriptionIds property: Specifies an array of subscription resource IDs that capacity reservation group is shared with. Block Capacity Reservations does not support sharing across subscriptions. **Note:** Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details.
      Parameters:
      subscriptionIds - the subscriptionIds value to set.
      Returns:
      the ResourceSharingProfile 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<ResourceSharingProfile>
      Throws:
      IOException
    • fromJson

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