com.azure.resourcemanager.hdinsight.models.ExcludedServicesConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-hdinsight Show documentation
Show all versions of azure-resourcemanager-hdinsight Show documentation
This package contains Microsoft Azure SDK for HDInsight Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HDInsight Management Client. Package tag package-2024-08-preview.
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.hdinsight.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* The configuration that services will be excluded when creating cluster.
*/
@Fluent
public final class ExcludedServicesConfig implements JsonSerializable {
/*
* The config id of excluded services.
*/
private String excludedServicesConfigId;
/*
* The list of excluded services.
*/
private String excludedServicesList;
/**
* Creates an instance of ExcludedServicesConfig class.
*/
public ExcludedServicesConfig() {
}
/**
* Get the excludedServicesConfigId property: The config id of excluded services.
*
* @return the excludedServicesConfigId value.
*/
public String excludedServicesConfigId() {
return this.excludedServicesConfigId;
}
/**
* Set the excludedServicesConfigId property: The config id of excluded services.
*
* @param excludedServicesConfigId the excludedServicesConfigId value to set.
* @return the ExcludedServicesConfig object itself.
*/
public ExcludedServicesConfig withExcludedServicesConfigId(String excludedServicesConfigId) {
this.excludedServicesConfigId = excludedServicesConfigId;
return this;
}
/**
* Get the excludedServicesList property: The list of excluded services.
*
* @return the excludedServicesList value.
*/
public String excludedServicesList() {
return this.excludedServicesList;
}
/**
* Set the excludedServicesList property: The list of excluded services.
*
* @param excludedServicesList the excludedServicesList value to set.
* @return the ExcludedServicesConfig object itself.
*/
public ExcludedServicesConfig withExcludedServicesList(String excludedServicesList) {
this.excludedServicesList = excludedServicesList;
return this;
}
/**
* 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();
jsonWriter.writeStringField("excludedServicesConfigId", this.excludedServicesConfigId);
jsonWriter.writeStringField("excludedServicesList", this.excludedServicesList);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of ExcludedServicesConfig from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ExcludedServicesConfig 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 ExcludedServicesConfig.
*/
public static ExcludedServicesConfig fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ExcludedServicesConfig deserializedExcludedServicesConfig = new ExcludedServicesConfig();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("excludedServicesConfigId".equals(fieldName)) {
deserializedExcludedServicesConfig.excludedServicesConfigId = reader.getString();
} else if ("excludedServicesList".equals(fieldName)) {
deserializedExcludedServicesConfig.excludedServicesList = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedExcludedServicesConfig;
});
}
}