Class DbServerMetadata
java.lang.Object
com.azure.resourcemanager.postgresqlflexibleserver.models.DbServerMetadata
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DbServerMetadata>
public final class DbServerMetadata
extends Object
implements com.azure.json.JsonSerializable<DbServerMetadata>
Database server metadata.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DbServerMetadatafromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DbServerMetadata from the JsonReader.location()Get the location property: Location of database server.sku()Get the sku property: Compute tier and size of the database server.Get the storageMb property: Storage size (in MB) for database server.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.version()Get the version property: Major version of PostgreSQL database engine.Set the sku property: Compute tier and size of the database server.withStorageMb(Integer storageMb) Set the storageMb property: Storage size (in MB) for database server.withVersion(String version) Set the version property: Major version of PostgreSQL database engine.Methods 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
-
DbServerMetadata
public DbServerMetadata()Creates an instance of DbServerMetadata class.
-
-
Method Details
-
location
Get the location property: Location of database server.- Returns:
- the location value.
-
version
Get the version property: Major version of PostgreSQL database engine.- Returns:
- the version value.
-
withVersion
Set the version property: Major version of PostgreSQL database engine.- Parameters:
version- the version value to set.- Returns:
- the DbServerMetadata object itself.
-
storageMb
Get the storageMb property: Storage size (in MB) for database server.- Returns:
- the storageMb value.
-
withStorageMb
Set the storageMb property: Storage size (in MB) for database server.- Parameters:
storageMb- the storageMb value to set.- Returns:
- the DbServerMetadata object itself.
-
sku
Get the sku property: Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single server.- Returns:
- the sku value.
-
withSku
Set the sku property: Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single server.- Parameters:
sku- the sku value to set.- Returns:
- the DbServerMetadata 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<DbServerMetadata>- Throws:
IOException
-
fromJson
Reads an instance of DbServerMetadata from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of DbServerMetadata 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 DbServerMetadata.
-