com.azure.resourcemanager.servicefabricmanagedclusters.models.AzureActiveDirectory Maven / Gradle / Ivy
// 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.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 settings to enable AAD authentication on the cluster.
*/
@Fluent
public final class AzureActiveDirectory implements JsonSerializable {
/*
* Azure active directory tenant id.
*/
private String tenantId;
/*
* Azure active directory cluster application id.
*/
private String clusterApplication;
/*
* Azure active directory client application id.
*/
private String clientApplication;
/**
* Creates an instance of AzureActiveDirectory class.
*/
public AzureActiveDirectory() {
}
/**
* Get the tenantId property: Azure active directory tenant id.
*
* @return the tenantId value.
*/
public String tenantId() {
return this.tenantId;
}
/**
* Set the tenantId property: Azure active directory tenant id.
*
* @param tenantId the tenantId value to set.
* @return the AzureActiveDirectory object itself.
*/
public AzureActiveDirectory withTenantId(String tenantId) {
this.tenantId = tenantId;
return this;
}
/**
* Get the clusterApplication property: Azure active directory cluster application id.
*
* @return the clusterApplication value.
*/
public String clusterApplication() {
return this.clusterApplication;
}
/**
* Set the clusterApplication property: Azure active directory cluster application id.
*
* @param clusterApplication the clusterApplication value to set.
* @return the AzureActiveDirectory object itself.
*/
public AzureActiveDirectory withClusterApplication(String clusterApplication) {
this.clusterApplication = clusterApplication;
return this;
}
/**
* Get the clientApplication property: Azure active directory client application id.
*
* @return the clientApplication value.
*/
public String clientApplication() {
return this.clientApplication;
}
/**
* Set the clientApplication property: Azure active directory client application id.
*
* @param clientApplication the clientApplication value to set.
* @return the AzureActiveDirectory object itself.
*/
public AzureActiveDirectory withClientApplication(String clientApplication) {
this.clientApplication = clientApplication;
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("tenantId", this.tenantId);
jsonWriter.writeStringField("clusterApplication", this.clusterApplication);
jsonWriter.writeStringField("clientApplication", this.clientApplication);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of AzureActiveDirectory from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AzureActiveDirectory 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 AzureActiveDirectory.
*/
public static AzureActiveDirectory fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AzureActiveDirectory deserializedAzureActiveDirectory = new AzureActiveDirectory();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("tenantId".equals(fieldName)) {
deserializedAzureActiveDirectory.tenantId = reader.getString();
} else if ("clusterApplication".equals(fieldName)) {
deserializedAzureActiveDirectory.clusterApplication = reader.getString();
} else if ("clientApplication".equals(fieldName)) {
deserializedAzureActiveDirectory.clientApplication = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedAzureActiveDirectory;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy