Class AppliedScopeProperties
java.lang.Object
com.azure.resourcemanager.reservations.models.AppliedScopeProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AppliedScopeProperties>
public final class AppliedScopeProperties
extends Object
implements com.azure.json.JsonSerializable<AppliedScopeProperties>
Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and
managementGroupId if AppliedScopeType is ManagementGroup.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of AppliedScopeProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the displayName property: Display name.static AppliedScopeProperties
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of AppliedScopeProperties from the JsonReader.Get the managementGroupId property: Fully-qualified identifier of the management group where the benefit must be applied.Get the resourceGroupId property: Fully-qualified identifier of the resource group.Get the subscriptionId property: Fully-qualified identifier of the subscription.tenantId()
Get the tenantId property: Tenant ID where the savings plan should apply benefit.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withDisplayName
(String displayName) Set the displayName property: Display name.withManagementGroupId
(String managementGroupId) Set the managementGroupId property: Fully-qualified identifier of the management group where the benefit must be applied.withResourceGroupId
(String resourceGroupId) Set the resourceGroupId property: Fully-qualified identifier of the resource group.withSubscriptionId
(String subscriptionId) Set the subscriptionId property: Fully-qualified identifier of the subscription.withTenantId
(String tenantId) Set the tenantId property: Tenant ID where the savings plan should apply benefit.Methods inherited from class java.lang.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
-
AppliedScopeProperties
public AppliedScopeProperties()Creates an instance of AppliedScopeProperties class.
-
-
Method Details
-
tenantId
Get the tenantId property: Tenant ID where the savings plan should apply benefit.- Returns:
- the tenantId value.
-
withTenantId
Set the tenantId property: Tenant ID where the savings plan should apply benefit.- Parameters:
tenantId
- the tenantId value to set.- Returns:
- the AppliedScopeProperties object itself.
-
managementGroupId
Get the managementGroupId property: Fully-qualified identifier of the management group where the benefit must be applied.- Returns:
- the managementGroupId value.
-
withManagementGroupId
Set the managementGroupId property: Fully-qualified identifier of the management group where the benefit must be applied.- Parameters:
managementGroupId
- the managementGroupId value to set.- Returns:
- the AppliedScopeProperties object itself.
-
subscriptionId
Get the subscriptionId property: Fully-qualified identifier of the subscription.- Returns:
- the subscriptionId value.
-
withSubscriptionId
Set the subscriptionId property: Fully-qualified identifier of the subscription.- Parameters:
subscriptionId
- the subscriptionId value to set.- Returns:
- the AppliedScopeProperties object itself.
-
resourceGroupId
Get the resourceGroupId property: Fully-qualified identifier of the resource group.- Returns:
- the resourceGroupId value.
-
withResourceGroupId
Set the resourceGroupId property: Fully-qualified identifier of the resource group.- Parameters:
resourceGroupId
- the resourceGroupId value to set.- Returns:
- the AppliedScopeProperties object itself.
-
displayName
Get the displayName property: Display name.- Returns:
- the displayName value.
-
withDisplayName
Set the displayName property: Display name.- Parameters:
displayName
- the displayName value to set.- Returns:
- the AppliedScopeProperties object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<AppliedScopeProperties>
- Throws:
IOException
-
fromJson
public static AppliedScopeProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AppliedScopeProperties from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of AppliedScopeProperties 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 AppliedScopeProperties.
-