Class GpuResource
java.lang.Object
com.azure.resourcemanager.containerinstance.models.GpuResource
- All Implemented Interfaces:
com.azure.json.JsonSerializable<GpuResource>
public final class GpuResource
extends Object
implements com.azure.json.JsonSerializable<GpuResource>
The GPU resource.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcount()Get the count property: The count of the GPU resource.static GpuResourcefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of GpuResource from the JsonReader.sku()Get the sku property: The SKU of the GPU resource.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCount(int count) Set the count property: The count of the GPU resource.Set the sku property: The SKU of the GPU resource.Methods inherited from class java.lang.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
-
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.
-
withCount
Set the count property: The count of the GPU resource.- Parameters:
count- the count value to set.- Returns:
- the GpuResource object itself.
-
sku
Get the sku property: The SKU of the GPU resource.- Returns:
- the sku value.
-
withSku
Set the sku property: The SKU of the GPU resource.- Parameters:
sku- the sku value to set.- Returns:
- the GpuResource 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<GpuResource>- Throws:
IOException
-
fromJson
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:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the GpuResource.
-