Class GatewayResourceRequests
java.lang.Object
com.azure.resourcemanager.appplatform.models.GatewayResourceRequests
- All Implemented Interfaces:
com.azure.json.JsonSerializable<GatewayResourceRequests>
public final class GatewayResourceRequests
extends Object
implements com.azure.json.JsonSerializable<GatewayResourceRequests>
Resource request payload of Spring Cloud Gateway.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of GatewayResourceRequests class. -
Method Summary
Modifier and TypeMethodDescriptioncpu()Get the cpu property: Cpu allocated to each Spring Cloud Gateway instance.static GatewayResourceRequestsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of GatewayResourceRequests from the JsonReader.memory()Get the memory property: Memory allocated to each Spring Cloud Gateway instance.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the cpu property: Cpu allocated to each Spring Cloud Gateway instance.withMemory(String memory) Set the memory property: Memory allocated to each Spring Cloud Gateway instance.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
-
GatewayResourceRequests
public GatewayResourceRequests()Creates an instance of GatewayResourceRequests class.
-
-
Method Details
-
cpu
Get the cpu property: Cpu allocated to each Spring Cloud Gateway instance.- Returns:
- the cpu value.
-
withCpu
Set the cpu property: Cpu allocated to each Spring Cloud Gateway instance.- Parameters:
cpu- the cpu value to set.- Returns:
- the GatewayResourceRequests object itself.
-
memory
Get the memory property: Memory allocated to each Spring Cloud Gateway instance.- Returns:
- the memory value.
-
withMemory
Set the memory property: Memory allocated to each Spring Cloud Gateway instance.- Parameters:
memory- the memory value to set.- Returns:
- the GatewayResourceRequests 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<GatewayResourceRequests>- Throws:
IOException
-
fromJson
public static GatewayResourceRequests fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of GatewayResourceRequests from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of GatewayResourceRequests 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 GatewayResourceRequests.
-