com.azure.resourcemanager.mysqlflexibleserver.models.StorageEditionCapability Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-mysqlflexibleserver Show documentation
Show all versions of azure-resourcemanager-mysqlflexibleserver Show documentation
This package contains Microsoft Azure SDK for MySql Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Microsoft Azure management API provides create, read, update, and delete functionality for Azure MySQL resources including servers, databases, firewall rules, VNET rules, log files and configurations with new business model. Package tag package-flexibleserver-2021-05-01.
The newest version!
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.mysqlflexibleserver.models;
import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* storage edition capability.
*/
@Immutable
public final class StorageEditionCapability implements JsonSerializable {
/*
* storage edition name
*/
private String name;
/*
* The minimal supported storage size.
*/
private Long minStorageSize;
/*
* The maximum supported storage size.
*/
private Long maxStorageSize;
/*
* Minimal backup retention days
*/
private Long minBackupRetentionDays;
/*
* Maximum backup retention days
*/
private Long maxBackupRetentionDays;
/**
* Creates an instance of StorageEditionCapability class.
*/
public StorageEditionCapability() {
}
/**
* Get the name property: storage edition name.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Get the minStorageSize property: The minimal supported storage size.
*
* @return the minStorageSize value.
*/
public Long minStorageSize() {
return this.minStorageSize;
}
/**
* Get the maxStorageSize property: The maximum supported storage size.
*
* @return the maxStorageSize value.
*/
public Long maxStorageSize() {
return this.maxStorageSize;
}
/**
* Get the minBackupRetentionDays property: Minimal backup retention days.
*
* @return the minBackupRetentionDays value.
*/
public Long minBackupRetentionDays() {
return this.minBackupRetentionDays;
}
/**
* Get the maxBackupRetentionDays property: Maximum backup retention days.
*
* @return the maxBackupRetentionDays value.
*/
public Long maxBackupRetentionDays() {
return this.maxBackupRetentionDays;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of StorageEditionCapability from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of StorageEditionCapability 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 StorageEditionCapability.
*/
public static StorageEditionCapability fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
StorageEditionCapability deserializedStorageEditionCapability = new StorageEditionCapability();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("name".equals(fieldName)) {
deserializedStorageEditionCapability.name = reader.getString();
} else if ("minStorageSize".equals(fieldName)) {
deserializedStorageEditionCapability.minStorageSize = reader.getNullable(JsonReader::getLong);
} else if ("maxStorageSize".equals(fieldName)) {
deserializedStorageEditionCapability.maxStorageSize = reader.getNullable(JsonReader::getLong);
} else if ("minBackupRetentionDays".equals(fieldName)) {
deserializedStorageEditionCapability.minBackupRetentionDays
= reader.getNullable(JsonReader::getLong);
} else if ("maxBackupRetentionDays".equals(fieldName)) {
deserializedStorageEditionCapability.maxBackupRetentionDays
= reader.getNullable(JsonReader::getLong);
} else {
reader.skipChildren();
}
}
return deserializedStorageEditionCapability;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy