Class CloudServiceRoleSku
java.lang.Object
com.azure.resourcemanager.compute.models.CloudServiceRoleSku
- All Implemented Interfaces:
com.azure.json.JsonSerializable<CloudServiceRoleSku>
public final class CloudServiceRoleSku
extends Object
implements com.azure.json.JsonSerializable<CloudServiceRoleSku>
Describes the cloud service role sku.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncapacity()Get the capacity property: Specifies the number of role instances in the cloud service.static CloudServiceRoleSkufromJson(com.azure.json.JsonReader jsonReader) Reads an instance of CloudServiceRoleSku from the JsonReader.name()Get the name property: The sku name.tier()Get the tier property: Specifies the tier of the cloud service.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCapacity(Long capacity) Set the capacity property: Specifies the number of role instances in the cloud service.Set the name property: The sku name.Set the tier property: Specifies the tier of the cloud service.Methods inherited from class 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
-
CloudServiceRoleSku
public CloudServiceRoleSku()Creates an instance of CloudServiceRoleSku class.
-
-
Method Details
-
name
Get the name property: The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku.- Returns:
- the name value.
-
withName
Set the name property: The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku.- Parameters:
name- the name value to set.- Returns:
- the CloudServiceRoleSku object itself.
-
tier
Get the tier property: Specifies the tier of the cloud service. Possible Values are <br /><br /> **Standard** <br /><br /> **Basic**.- Returns:
- the tier value.
-
withTier
Set the tier property: Specifies the tier of the cloud service. Possible Values are <br /><br /> **Standard** <br /><br /> **Basic**.- Parameters:
tier- the tier value to set.- Returns:
- the CloudServiceRoleSku object itself.
-
capacity
Get the capacity property: Specifies the number of role instances in the cloud service.- Returns:
- the capacity value.
-
withCapacity
Set the capacity property: Specifies the number of role instances in the cloud service.- Parameters:
capacity- the capacity value to set.- Returns:
- the CloudServiceRoleSku 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<CloudServiceRoleSku>- Throws:
IOException
-
fromJson
Reads an instance of CloudServiceRoleSku from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of CloudServiceRoleSku 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 CloudServiceRoleSku.
-