ResourceRequests Class

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

Implements

public final class ResourceRequests
implements JsonSerializable<ResourceRequests>

The resource requests.

Constructor Summary

Constructor Description
ResourceRequests()

Creates an instance of ResourceRequests class.

Method Summary

Modifier and Type Method and Description
double cpu()

Get the cpu property: The CPU request of this container instance.

static ResourceRequests fromJson(JsonReader jsonReader)

Reads an instance of ResourceRequests from the JsonReader.

GpuResource gpu()

Get the gpu property: The GPU request of this container instance.

double memoryInGB()

Get the memoryInGB property: The memory request in GB of this container instance.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ResourceRequests withCpu(double cpu)

Set the cpu property: The CPU request of this container instance.

ResourceRequests withGpu(GpuResource gpu)

Set the gpu property: The GPU request of this container instance.

ResourceRequests withMemoryInGB(double memoryInGB)

Set the memoryInGB property: The memory request in GB of this container instance.

Methods inherited from java.lang.Object

Constructor Details

ResourceRequests

public ResourceRequests()

Creates an instance of ResourceRequests class.

Method Details

cpu

public double cpu()

Get the cpu property: The CPU request of this container instance.

Returns:

the cpu value.

fromJson

public static ResourceRequests fromJson(JsonReader jsonReader)

Reads an instance of ResourceRequests from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

gpu

public GpuResource gpu()

Get the gpu property: The GPU request of this container instance.

Returns:

the gpu value.

memoryInGB

public double memoryInGB()

Get the memoryInGB property: The memory request in GB of this container instance.

Returns:

the memoryInGB value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCpu

public ResourceRequests withCpu(double cpu)

Set the cpu property: The CPU request of this container instance.

Parameters:

cpu - the cpu value to set.

Returns:

the ResourceRequests object itself.

withGpu

public ResourceRequests withGpu(GpuResource gpu)

Set the gpu property: The GPU request of this container instance.

Parameters:

gpu - the gpu value to set.

Returns:

the ResourceRequests object itself.

withMemoryInGB

public ResourceRequests withMemoryInGB(double memoryInGB)

Set the memoryInGB property: The memory request in GB of this container instance.

Parameters:

memoryInGB - the memoryInGB value to set.

Returns:

the ResourceRequests object itself.

Applies to