Class ServiceResourceCreateUpdateProperties
java.lang.Object
com.azure.resourcemanager.cosmos.models.ServiceResourceCreateUpdateProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ServiceResourceCreateUpdateProperties>
- Direct Known Subclasses:
DataTransferServiceResourceCreateUpdateParameters
,GraphApiComputeServiceResourceCreateUpdateParameters
,MaterializedViewsBuilderServiceResourceCreateUpdateParameters
,SqlDedicatedGatewayServiceResourceCreateUpdateParameters
public class ServiceResourceCreateUpdateProperties
extends Object
implements com.azure.json.JsonSerializable<ServiceResourceCreateUpdateProperties>
Properties in ServiceResourceCreateUpdateParameters.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ServiceResourceCreateUpdateProperties class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ServiceResourceCreateUpdateProperties from the JsonReader.Get the instanceCount property: Instance count for the service.Get the instanceSize property: Instance type for the service.Get the serviceType property: ServiceType for the service.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ServiceResourceCreateUpdateProperties
public ServiceResourceCreateUpdateProperties()Creates an instance of ServiceResourceCreateUpdateProperties class.
-
-
Method Details
-
serviceType
Get the serviceType property: ServiceType for the service.- Returns:
- the serviceType value.
-
instanceSize
Get the instanceSize property: Instance type for the service.- Returns:
- the instanceSize value.
-
withInstanceSize
Set the instanceSize property: Instance type for the service.- Parameters:
instanceSize
- the instanceSize value to set.- Returns:
- the ServiceResourceCreateUpdateProperties object itself.
-
instanceCount
Get the instanceCount property: Instance count for the service.- Returns:
- the instanceCount value.
-
withInstanceCount
Set the instanceCount property: Instance count for the service.- Parameters:
instanceCount
- the instanceCount value to set.- Returns:
- the ServiceResourceCreateUpdateProperties object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ServiceResourceCreateUpdateProperties>
- Throws:
IOException
-
fromJson
public static ServiceResourceCreateUpdateProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ServiceResourceCreateUpdateProperties from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ServiceResourceCreateUpdateProperties 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 ServiceResourceCreateUpdateProperties.
-