다음을 통해 공유


CloudServiceRoleSku Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.CloudServiceRoleSku

Implements

public final class CloudServiceRoleSku
implements JsonSerializable<CloudServiceRoleSku>

Describes the cloud service role sku.

Constructor Summary

Constructor Description
CloudServiceRoleSku()

Creates an instance of CloudServiceRoleSku class.

Method Summary

Modifier and Type Method and Description
Long capacity()

Get the capacity property: Specifies the number of role instances in the cloud service.

static CloudServiceRoleSku fromJson(JsonReader jsonReader)

Reads an instance of CloudServiceRoleSku from the JsonReader.

String name()

Get the name property: The sku name.

String tier()

Get the tier property: Specifies the tier of the cloud service.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

CloudServiceRoleSku withCapacity(Long capacity)

Set the capacity property: Specifies the number of role instances in the cloud service.

CloudServiceRoleSku withName(String name)

Set the name property: The sku name.

CloudServiceRoleSku withTier(String tier)

Set the tier property: Specifies the tier of the cloud service.

Methods inherited from java.lang.Object

Constructor Details

CloudServiceRoleSku

public CloudServiceRoleSku()

Creates an instance of CloudServiceRoleSku class.

Method Details

capacity

public Long capacity()

Get the capacity property: Specifies the number of role instances in the cloud service.

Returns:

the capacity value.

fromJson

public static CloudServiceRoleSku fromJson(JsonReader jsonReader)

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.

name

public String 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.

tier

public String tier()

Get the tier property: Specifies the tier of the cloud service. Possible Values are

**Standard**

**Basic**.

Returns:

the tier value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCapacity

public CloudServiceRoleSku withCapacity(Long capacity)

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.

withName

public CloudServiceRoleSku withName(String name)

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.

withTier

public CloudServiceRoleSku withTier(String tier)

Set the tier property: Specifies the tier of the cloud service. Possible Values are

**Standard**

**Basic**.

Parameters:

tier - the tier value to set.

Returns:

the CloudServiceRoleSku object itself.

Applies to