ResourceRequests Class

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

Implements

public final class ResourceRequests
implements JsonSerializable<ResourceRequests>

Deployment resource request payload.

Constructor Summary

Constructor Description
ResourceRequests()

Creates an instance of ResourceRequests class.

Method Summary

Modifier and Type Method and Description
String cpu()

Get the cpu property: Required CPU.

static ResourceRequests fromJson(JsonReader jsonReader)

Reads an instance of ResourceRequests from the JsonReader.

String memory()

Get the memory property: Required memory.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ResourceRequests withCpu(String cpu)

Set the cpu property: Required CPU.

ResourceRequests withMemory(String memory)

Set the memory property: Required memory.

Methods inherited from java.lang.Object

Constructor Details

ResourceRequests

public ResourceRequests()

Creates an instance of ResourceRequests class.

Method Details

cpu

public String cpu()

Get the cpu property: Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} for Standard tier.

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 an error occurs while reading the ResourceRequests.

memory

public String memory()

Get the memory property: Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier.

Returns:

the memory value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCpu

public ResourceRequests withCpu(String cpu)

Set the cpu property: Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} for Standard tier.

Parameters:

cpu - the cpu value to set.

Returns:

the ResourceRequests object itself.

withMemory

public ResourceRequests withMemory(String memory)

Set the memory property: Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier.

Parameters:

memory - the memory value to set.

Returns:

the ResourceRequests object itself.

Applies to