ResourceModelWithAllowedPropertySetSku Class

public final class ResourceModelWithAllowedPropertySetSku
extends Sku

The ResourceModelWithAllowedPropertySetSku model.

Constructor Summary

Constructor Description
ResourceModelWithAllowedPropertySetSku()

Creates an instance of ResourceModelWithAllowedPropertySetSku class.

Method Summary

Modifier and Type Method and Description
static ResourceModelWithAllowedPropertySetSku fromJson(JsonReader jsonReader)

Reads an instance of ResourceModelWithAllowedPropertySetSku from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ResourceModelWithAllowedPropertySetSku withCapacity(Integer capacity)

Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included.

ResourceModelWithAllowedPropertySetSku withFamily(String family)

Set the family property: If the service has different generations of hardware, for the same SKU, then that can be captured here.

ResourceModelWithAllowedPropertySetSku withName(String name)

Set the name property: The name of the SKU.

ResourceModelWithAllowedPropertySetSku withSize(String size)

Set the size property: The SKU size.

ResourceModelWithAllowedPropertySetSku withTier(SkuTier tier)

Set the tier property: This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.

Methods inherited from Sku

Methods inherited from java.lang.Object

Constructor Details

ResourceModelWithAllowedPropertySetSku

public ResourceModelWithAllowedPropertySetSku()

Creates an instance of ResourceModelWithAllowedPropertySetSku class.

Method Details

fromJson

public static ResourceModelWithAllowedPropertySetSku fromJson(JsonReader jsonReader)

Reads an instance of ResourceModelWithAllowedPropertySetSku from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ResourceModelWithAllowedPropertySetSku if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

ResourceModelWithAllowedPropertySetSku.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

ResourceModelWithAllowedPropertySetSku.validate()

withCapacity

public ResourceModelWithAllowedPropertySetSku withCapacity(Integer capacity)

Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.

Overrides:

ResourceModelWithAllowedPropertySetSku.withCapacity(Integer capacity)

Parameters:

capacity

withFamily

public ResourceModelWithAllowedPropertySetSku withFamily(String family)

Set the family property: If the service has different generations of hardware, for the same SKU, then that can be captured here.

Overrides:

ResourceModelWithAllowedPropertySetSku.withFamily(String family)

Parameters:

family

withName

public ResourceModelWithAllowedPropertySetSku withName(String name)

Set the name property: The name of the SKU. E.g. P3. It is typically a letter+number code.

Overrides:

ResourceModelWithAllowedPropertySetSku.withName(String name)

Parameters:

name

withSize

public ResourceModelWithAllowedPropertySetSku withSize(String size)

Set the size property: The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.

Overrides:

ResourceModelWithAllowedPropertySetSku.withSize(String size)

Parameters:

size

withTier

public ResourceModelWithAllowedPropertySetSku withTier(SkuTier tier)

Set the tier property: This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.

Overrides:

ResourceModelWithAllowedPropertySetSku.withTier(SkuTier tier)

Parameters:

tier

Applies to