com.azure.resourcemanager.storagecache.models.CacheActiveDirectorySettings Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-storagecache Show documentation
Show all versions of azure-resourcemanager-storagecache Show documentation
This package contains Microsoft Azure SDK for StorageCache Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Managed Lustre provides a fully managed Lustre® file system, integrated with Blob storage, for use on demand. These operations create and manage Azure Managed Lustre file systems. Package tag package-2024-03.
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.storagecache.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* Active Directory settings used to join a cache to a domain.
*/
@Fluent
public final class CacheActiveDirectorySettings implements JsonSerializable {
/*
* Primary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name.
*/
private String primaryDnsIpAddress;
/*
* Secondary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name.
*/
private String secondaryDnsIpAddress;
/*
* The fully qualified domain name of the Active Directory domain controller.
*/
private String domainName;
/*
* The Active Directory domain's NetBIOS name.
*/
private String domainNetBiosName;
/*
* The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a server. Length must
* 1-15 characters from the class [-0-9a-zA-Z].
*/
private String cacheNetBiosName;
/*
* True if the HPC Cache is joined to the Active Directory domain.
*/
private DomainJoinedType domainJoined;
/*
* Active Directory admin credentials used to join the HPC Cache to a domain.
*/
private CacheActiveDirectorySettingsCredentials credentials;
/**
* Creates an instance of CacheActiveDirectorySettings class.
*/
public CacheActiveDirectorySettings() {
}
/**
* Get the primaryDnsIpAddress property: Primary DNS IP address used to resolve the Active Directory domain
* controller's fully qualified domain name.
*
* @return the primaryDnsIpAddress value.
*/
public String primaryDnsIpAddress() {
return this.primaryDnsIpAddress;
}
/**
* Set the primaryDnsIpAddress property: Primary DNS IP address used to resolve the Active Directory domain
* controller's fully qualified domain name.
*
* @param primaryDnsIpAddress the primaryDnsIpAddress value to set.
* @return the CacheActiveDirectorySettings object itself.
*/
public CacheActiveDirectorySettings withPrimaryDnsIpAddress(String primaryDnsIpAddress) {
this.primaryDnsIpAddress = primaryDnsIpAddress;
return this;
}
/**
* Get the secondaryDnsIpAddress property: Secondary DNS IP address used to resolve the Active Directory domain
* controller's fully qualified domain name.
*
* @return the secondaryDnsIpAddress value.
*/
public String secondaryDnsIpAddress() {
return this.secondaryDnsIpAddress;
}
/**
* Set the secondaryDnsIpAddress property: Secondary DNS IP address used to resolve the Active Directory domain
* controller's fully qualified domain name.
*
* @param secondaryDnsIpAddress the secondaryDnsIpAddress value to set.
* @return the CacheActiveDirectorySettings object itself.
*/
public CacheActiveDirectorySettings withSecondaryDnsIpAddress(String secondaryDnsIpAddress) {
this.secondaryDnsIpAddress = secondaryDnsIpAddress;
return this;
}
/**
* Get the domainName property: The fully qualified domain name of the Active Directory domain controller.
*
* @return the domainName value.
*/
public String domainName() {
return this.domainName;
}
/**
* Set the domainName property: The fully qualified domain name of the Active Directory domain controller.
*
* @param domainName the domainName value to set.
* @return the CacheActiveDirectorySettings object itself.
*/
public CacheActiveDirectorySettings withDomainName(String domainName) {
this.domainName = domainName;
return this;
}
/**
* Get the domainNetBiosName property: The Active Directory domain's NetBIOS name.
*
* @return the domainNetBiosName value.
*/
public String domainNetBiosName() {
return this.domainNetBiosName;
}
/**
* Set the domainNetBiosName property: The Active Directory domain's NetBIOS name.
*
* @param domainNetBiosName the domainNetBiosName value to set.
* @return the CacheActiveDirectorySettings object itself.
*/
public CacheActiveDirectorySettings withDomainNetBiosName(String domainNetBiosName) {
this.domainNetBiosName = domainNetBiosName;
return this;
}
/**
* Get the cacheNetBiosName property: The NetBIOS name to assign to the HPC Cache when it joins the Active Directory
* domain as a server. Length must 1-15 characters from the class [-0-9a-zA-Z].
*
* @return the cacheNetBiosName value.
*/
public String cacheNetBiosName() {
return this.cacheNetBiosName;
}
/**
* Set the cacheNetBiosName property: The NetBIOS name to assign to the HPC Cache when it joins the Active Directory
* domain as a server. Length must 1-15 characters from the class [-0-9a-zA-Z].
*
* @param cacheNetBiosName the cacheNetBiosName value to set.
* @return the CacheActiveDirectorySettings object itself.
*/
public CacheActiveDirectorySettings withCacheNetBiosName(String cacheNetBiosName) {
this.cacheNetBiosName = cacheNetBiosName;
return this;
}
/**
* Get the domainJoined property: True if the HPC Cache is joined to the Active Directory domain.
*
* @return the domainJoined value.
*/
public DomainJoinedType domainJoined() {
return this.domainJoined;
}
/**
* Get the credentials property: Active Directory admin credentials used to join the HPC Cache to a domain.
*
* @return the credentials value.
*/
public CacheActiveDirectorySettingsCredentials credentials() {
return this.credentials;
}
/**
* Set the credentials property: Active Directory admin credentials used to join the HPC Cache to a domain.
*
* @param credentials the credentials value to set.
* @return the CacheActiveDirectorySettings object itself.
*/
public CacheActiveDirectorySettings withCredentials(CacheActiveDirectorySettingsCredentials credentials) {
this.credentials = credentials;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (primaryDnsIpAddress() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property primaryDnsIpAddress in model CacheActiveDirectorySettings"));
}
if (domainName() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property domainName in model CacheActiveDirectorySettings"));
}
if (domainNetBiosName() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property domainNetBiosName in model CacheActiveDirectorySettings"));
}
if (cacheNetBiosName() == null) {
throw LOGGER.atError()
.log(new IllegalArgumentException(
"Missing required property cacheNetBiosName in model CacheActiveDirectorySettings"));
}
if (credentials() != null) {
credentials().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(CacheActiveDirectorySettings.class);
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("primaryDnsIpAddress", this.primaryDnsIpAddress);
jsonWriter.writeStringField("domainName", this.domainName);
jsonWriter.writeStringField("domainNetBiosName", this.domainNetBiosName);
jsonWriter.writeStringField("cacheNetBiosName", this.cacheNetBiosName);
jsonWriter.writeStringField("secondaryDnsIpAddress", this.secondaryDnsIpAddress);
jsonWriter.writeJsonField("credentials", this.credentials);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of CacheActiveDirectorySettings from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of CacheActiveDirectorySettings if the JsonReader was pointing to an instance of it, or null
* if it was pointing to JSON null.
* @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the CacheActiveDirectorySettings.
*/
public static CacheActiveDirectorySettings fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
CacheActiveDirectorySettings deserializedCacheActiveDirectorySettings = new CacheActiveDirectorySettings();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("primaryDnsIpAddress".equals(fieldName)) {
deserializedCacheActiveDirectorySettings.primaryDnsIpAddress = reader.getString();
} else if ("domainName".equals(fieldName)) {
deserializedCacheActiveDirectorySettings.domainName = reader.getString();
} else if ("domainNetBiosName".equals(fieldName)) {
deserializedCacheActiveDirectorySettings.domainNetBiosName = reader.getString();
} else if ("cacheNetBiosName".equals(fieldName)) {
deserializedCacheActiveDirectorySettings.cacheNetBiosName = reader.getString();
} else if ("secondaryDnsIpAddress".equals(fieldName)) {
deserializedCacheActiveDirectorySettings.secondaryDnsIpAddress = reader.getString();
} else if ("domainJoined".equals(fieldName)) {
deserializedCacheActiveDirectorySettings.domainJoined
= DomainJoinedType.fromString(reader.getString());
} else if ("credentials".equals(fieldName)) {
deserializedCacheActiveDirectorySettings.credentials
= CacheActiveDirectorySettingsCredentials.fromJson(reader);
} else {
reader.skipChildren();
}
}
return deserializedCacheActiveDirectorySettings;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy