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
    Constructor
    Description
    Creates an instance of GpuResource class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get the count property: The count of the GPU resource.
    fromJson(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.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    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, wait

    Methods 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

      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.
    • sku

      public GpuSku sku()
      Get the sku property: The SKU of the GPU resource.
      Returns:
      the sku value.
    • 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.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<GpuResource>
      Throws:
      IOException
    • fromJson

      public static GpuResource fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.