GpuResource Class

  • java.lang.Object
    • com.azure.resourcemanager.containerinstance.models.GpuResource

Implements

public final class GpuResource
implements JsonSerializable<GpuResource>

The GPU resource.

Constructor Summary

Constructor Description
GpuResource()

Creates an instance of GpuResource class.

Method Summary

Modifier and Type Method and Description
int count()

Get the count property: The count of the GPU resource.

static GpuResource fromJson(JsonReader jsonReader)

Reads an instance of GpuResource from the JsonReader.

GpuSku sku()

Get the sku property: The SKU of the GPU resource.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

GpuResource withCount(int count)

Set the count property: The count of the GPU resource.

GpuResource withSku(GpuSku sku)

Set the sku property: The SKU of the GPU resource.

Methods inherited from java.lang.Object

Constructor Details

GpuResource

public GpuResource()

Creates an instance of GpuResource class.

Method Details

count

public int count()

Get the count property: The count of the GPU resource.

Returns:

the count value.

fromJson

public static GpuResource fromJson(JsonReader jsonReader)

Reads an instance of GpuResource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

sku

public GpuSku sku()

Get the sku property: The SKU of the GPU resource.

Returns:

the sku value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCount

public GpuResource withCount(int count)

Set the count property: The count of the GPU resource.

Parameters:

count - the count value to set.

Returns:

the GpuResource object itself.

withSku

public GpuResource withSku(GpuSku sku)

Set the sku property: The SKU of the GPU resource.

Parameters:

sku - the sku value to set.

Returns:

the GpuResource object itself.

Applies to