Class GraphApiComputeServiceResourceCreateUpdateParameters
java.lang.Object
com.azure.resourcemanager.cosmos.models.ServiceResourceCreateUpdateProperties
com.azure.resourcemanager.cosmos.models.GraphApiComputeServiceResourceCreateUpdateParameters
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ServiceResourceCreateUpdateProperties>
public final class GraphApiComputeServiceResourceCreateUpdateParameters
extends ServiceResourceCreateUpdateProperties
Properties for Create or Update request for GraphAPIComputeServiceResource.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of GraphApiComputeServiceResourceCreateUpdateParameters class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of GraphApiComputeServiceResourceCreateUpdateParameters from the JsonReader.Get the serviceType property: ServiceType for the service.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withInstanceCount(Integer instanceCount) Set the instanceCount property: Instance count for the service.withInstanceSize(ServiceSize instanceSize) Set the instanceSize property: Instance type for the service.Methods inherited from class ServiceResourceCreateUpdateProperties
instanceCount, instanceSizeMethods inherited from class 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
-
GraphApiComputeServiceResourceCreateUpdateParameters
public GraphApiComputeServiceResourceCreateUpdateParameters()Creates an instance of GraphApiComputeServiceResourceCreateUpdateParameters class.
-
-
Method Details
-
serviceType
Get the serviceType property: ServiceType for the service.- Overrides:
serviceTypein classServiceResourceCreateUpdateProperties- Returns:
- the serviceType value.
-
withInstanceSize
public GraphApiComputeServiceResourceCreateUpdateParameters withInstanceSize(ServiceSize instanceSize) Set the instanceSize property: Instance type for the service.- Overrides:
withInstanceSizein classServiceResourceCreateUpdateProperties- Parameters:
instanceSize- the instanceSize value to set.- Returns:
- the ServiceResourceCreateUpdateProperties object itself.
-
withInstanceCount
public GraphApiComputeServiceResourceCreateUpdateParameters withInstanceCount(Integer instanceCount) Set the instanceCount property: Instance count for the service.- Overrides:
withInstanceCountin classServiceResourceCreateUpdateProperties- Parameters:
instanceCount- the instanceCount value to set.- Returns:
- the ServiceResourceCreateUpdateProperties object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classServiceResourceCreateUpdateProperties- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ServiceResourceCreateUpdateProperties>- Overrides:
toJsonin classServiceResourceCreateUpdateProperties- Throws:
IOException
-
fromJson
public static GraphApiComputeServiceResourceCreateUpdateParameters fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of GraphApiComputeServiceResourceCreateUpdateParameters from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of GraphApiComputeServiceResourceCreateUpdateParameters 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 GraphApiComputeServiceResourceCreateUpdateParameters.
-