ResourceRequirements Class

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

Implements

public final class ResourceRequirements
implements JsonSerializable<ResourceRequirements>

The resource requirements.

Constructor Summary

Constructor Description
ResourceRequirements()

Creates an instance of ResourceRequirements class.

Method Summary

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

Reads an instance of ResourceRequirements from the JsonReader.

ResourceLimits limits()

Get the limits property: The resource limits of this container instance.

ResourceRequests requests()

Get the requests property: The resource requests of this container instance.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ResourceRequirements withLimits(ResourceLimits limits)

Set the limits property: The resource limits of this container instance.

ResourceRequirements withRequests(ResourceRequests requests)

Set the requests property: The resource requests of this container instance.

Methods inherited from java.lang.Object

Constructor Details

ResourceRequirements

public ResourceRequirements()

Creates an instance of ResourceRequirements class.

Method Details

fromJson

public static ResourceRequirements fromJson(JsonReader jsonReader)

Reads an instance of ResourceRequirements from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

limits

public ResourceLimits limits()

Get the limits property: The resource limits of this container instance.

Returns:

the limits value.

requests

public ResourceRequests requests()

Get the requests property: The resource requests of this container instance.

Returns:

the requests value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withLimits

public ResourceRequirements withLimits(ResourceLimits limits)

Set the limits property: The resource limits of this container instance.

Parameters:

limits - the limits value to set.

Returns:

the ResourceRequirements object itself.

withRequests

public ResourceRequirements withRequests(ResourceRequests requests)

Set the requests property: The resource requests of this container instance.

Parameters:

requests - the requests value to set.

Returns:

the ResourceRequirements object itself.

Applies to