Restriction Class
- java.
lang. Object - com.
azure. resourcemanager. storage. models. Restriction
- com.
Implements
public final class Restriction
implements JsonSerializable<Restriction>
The restriction because of which SKU cannot be used.
Constructor Summary
Constructor | Description |
---|---|
Restriction() |
Creates an instance of Restriction class. |
Method Summary
Modifier and Type | Method and Description |
---|---|
static Restriction |
fromJson(JsonReader jsonReader)
Reads an instance of Restriction from the Json |
Reason |
reasonCode()
Get the reason |
Json |
toJson(JsonWriter jsonWriter) |
String |
type()
Get the type property: The type of restrictions. |
void |
validate()
Validates the instance. |
List<String> |
values()
Get the values property: The value of restrictions. |
Restriction |
withReasonCode(ReasonCode reasonCode)
Set the reason |
Methods inherited from java.lang.Object
Constructor Details
Restriction
public Restriction()
Creates an instance of Restriction class.
Method Details
fromJson
public static Restriction fromJson(JsonReader jsonReader)
Reads an instance of Restriction from the JsonReader.
Parameters:
Returns:
Throws:
reasonCode
public ReasonCode reasonCode()
Get the reasonCode property: The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The "NotAvailableForSubscription" is related to capacity at DC.
Returns:
toJson
type
public String type()
Get the type property: The type of restrictions. As of now only possible value for this is location.
Returns:
validate
public void validate()
Validates the instance.
values
public List
Get the values property: The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted.
Returns:
withReasonCode
public Restriction withReasonCode(ReasonCode reasonCode)
Set the reasonCode property: The reason for the restriction. As of now this can be "QuotaId" or "NotAvailableForSubscription". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The "NotAvailableForSubscription" is related to capacity at DC.
Parameters:
Returns:
Applies to
Azure SDK for Java