com.azure.resourcemanager.servicefabricmanagedclusters.models.VMSize Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-servicefabricmanagedclusters Show documentation
Show all versions of azure-resourcemanager-servicefabricmanagedclusters Show documentation
This package contains Microsoft Azure SDK for Service Fabric Managed Clusters Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Service Fabric Managed Clusters Management Client. Package tag package-2024-04.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.servicefabricmanagedclusters.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;
/**
* VM Sizes properties.
*/
@Immutable
public final class VMSize implements JsonSerializable {
/*
* VM Size name.
*/
private String size;
/**
* Creates an instance of VMSize class.
*/
public VMSize() {
}
/**
* Get the size property: VM Size name.
*
* @return the size value.
*/
public String size() {
return this.size;
}
/**
* 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 VMSize from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of VMSize 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 VMSize.
*/
public static VMSize fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
VMSize deserializedVMSize = new VMSize();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("size".equals(fieldName)) {
deserializedVMSize.size = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedVMSize;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy