com.azure.resourcemanager.hybridcompute.models.ConfigurationExtension Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-hybridcompute Show documentation
Show all versions of azure-resourcemanager-hybridcompute Show documentation
This package contains Microsoft Azure SDK for HybridCompute Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Hybrid Compute Management Client. Package tag package-preview-2024-07.
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.hybridcompute.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;
/**
* Describes properties that can identify extensions.
*/
@Immutable
public final class ConfigurationExtension implements JsonSerializable {
/*
* Publisher of the extension.
*/
private String publisher;
/*
* Type of the extension.
*/
private String type;
/**
* Creates an instance of ConfigurationExtension class.
*/
public ConfigurationExtension() {
}
/**
* Get the publisher property: Publisher of the extension.
*
* @return the publisher value.
*/
public String publisher() {
return this.publisher;
}
/**
* Get the type property: Type of the extension.
*
* @return the type value.
*/
public String type() {
return this.type;
}
/**
* 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 ConfigurationExtension from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ConfigurationExtension 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 ConfigurationExtension.
*/
public static ConfigurationExtension fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ConfigurationExtension deserializedConfigurationExtension = new ConfigurationExtension();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("publisher".equals(fieldName)) {
deserializedConfigurationExtension.publisher = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedConfigurationExtension.type = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedConfigurationExtension;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy