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
ConstructorsConstructorDescriptionCreates an instance of ResourceSharingProfile class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceSharingProfilefromJson(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.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
Get the subscriptionIds property: Specifies an array of subscription resource IDs that capacity reservation group is shared with. **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. **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
- Specified by:
toJsonin interfacecom.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.
-