Share via


ServiceSku Class

  • java.lang.Object
    • com.azure.resourcemanager.datamigration.models.ServiceSku

Implements

public final class ServiceSku
implements JsonSerializable<ServiceSku>

An Azure SKU instance.

Constructor Summary

Constructor Description
ServiceSku()

Creates an instance of ServiceSku class.

Method Summary

Modifier and Type Method and Description
Integer capacity()

Get the capacity property: The capacity of the SKU, if it supports scaling.

String family()

Get the family property: The SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc.

static ServiceSku fromJson(JsonReader jsonReader)

Reads an instance of ServiceSku from the JsonReader.

String name()

Get the name property: The unique name of the SKU, such as 'P3'.

String size()

Get the size property: The size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g.

String tier()

Get the tier property: The tier of the SKU, such as 'Basic', 'General Purpose', or 'Business Critical'.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ServiceSku withCapacity(Integer capacity)

Set the capacity property: The capacity of the SKU, if it supports scaling.

ServiceSku withFamily(String family)

Set the family property: The SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc.

ServiceSku withName(String name)

Set the name property: The unique name of the SKU, such as 'P3'.

ServiceSku withSize(String size)

Set the size property: The size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g.

ServiceSku withTier(String tier)

Set the tier property: The tier of the SKU, such as 'Basic', 'General Purpose', or 'Business Critical'.

Methods inherited from java.lang.Object

Constructor Details

ServiceSku

public ServiceSku()

Creates an instance of ServiceSku class.

Method Details

capacity

public Integer capacity()

Get the capacity property: The capacity of the SKU, if it supports scaling.

Returns:

the capacity value.

family

public String family()

Get the family property: The SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines.

Returns:

the family value.

fromJson

public static ServiceSku fromJson(JsonReader jsonReader)

Reads an instance of ServiceSku from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ServiceSku 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 ServiceSku.

name

public String name()

Get the name property: The unique name of the SKU, such as 'P3'.

Returns:

the name value.

size

public String size()

Get the size property: The size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines.

Returns:

the size value.

tier

public String tier()

Get the tier property: The tier of the SKU, such as 'Basic', 'General Purpose', or 'Business Critical'.

Returns:

the tier value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCapacity

public ServiceSku withCapacity(Integer capacity)

Set the capacity property: The capacity of the SKU, if it supports scaling.

Parameters:

capacity - the capacity value to set.

Returns:

the ServiceSku object itself.

withFamily

public ServiceSku withFamily(String family)

Set the family property: The SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines.

Parameters:

family - the family value to set.

Returns:

the ServiceSku object itself.

withName

public ServiceSku withName(String name)

Set the name property: The unique name of the SKU, such as 'P3'.

Parameters:

name - the name value to set.

Returns:

the ServiceSku object itself.

withSize

public ServiceSku withSize(String size)

Set the size property: The size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines.

Parameters:

size - the size value to set.

Returns:

the ServiceSku object itself.

withTier

public ServiceSku withTier(String tier)

Set the tier property: The tier of the SKU, such as 'Basic', 'General Purpose', or 'Business Critical'.

Parameters:

tier - the tier value to set.

Returns:

the ServiceSku object itself.

Applies to