![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.netapp.fluent.models.AccountProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-netapp Show documentation
Show all versions of azure-resourcemanager-netapp Show documentation
This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-preview-2024-07-01-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.netapp.fluent.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 com.azure.resourcemanager.netapp.models.AccountEncryption;
import com.azure.resourcemanager.netapp.models.ActiveDirectory;
import java.io.IOException;
import java.util.List;
/**
* NetApp account properties.
*/
@Fluent
public final class AccountProperties implements JsonSerializable {
/*
* Azure lifecycle management
*/
private String provisioningState;
/*
* Active Directories
*/
private List activeDirectories;
/*
* Encryption settings
*/
private AccountEncryption encryption;
/*
* Shows the status of disableShowmount for all volumes under the subscription, null equals false
*/
private Boolean disableShowmount;
/*
* Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and
* region and only affect non ldap NFSv4 volumes.
*/
private String nfsV4IdDomain;
/*
* This will have true value only if account is Multiple AD enabled.
*/
private Boolean isMultiAdEnabled;
/**
* Creates an instance of AccountProperties class.
*/
public AccountProperties() {
}
/**
* Get the provisioningState property: Azure lifecycle management.
*
* @return the provisioningState value.
*/
public String provisioningState() {
return this.provisioningState;
}
/**
* Get the activeDirectories property: Active Directories.
*
* @return the activeDirectories value.
*/
public List activeDirectories() {
return this.activeDirectories;
}
/**
* Set the activeDirectories property: Active Directories.
*
* @param activeDirectories the activeDirectories value to set.
* @return the AccountProperties object itself.
*/
public AccountProperties withActiveDirectories(List activeDirectories) {
this.activeDirectories = activeDirectories;
return this;
}
/**
* Get the encryption property: Encryption settings.
*
* @return the encryption value.
*/
public AccountEncryption encryption() {
return this.encryption;
}
/**
* Set the encryption property: Encryption settings.
*
* @param encryption the encryption value to set.
* @return the AccountProperties object itself.
*/
public AccountProperties withEncryption(AccountEncryption encryption) {
this.encryption = encryption;
return this;
}
/**
* Get the disableShowmount property: Shows the status of disableShowmount for all volumes under the subscription,
* null equals false.
*
* @return the disableShowmount value.
*/
public Boolean disableShowmount() {
return this.disableShowmount;
}
/**
* Get the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp
* accounts in the subscription and region and only affect non ldap NFSv4 volumes.
*
* @return the nfsV4IdDomain value.
*/
public String nfsV4IdDomain() {
return this.nfsV4IdDomain;
}
/**
* Set the nfsV4IdDomain property: Domain for NFSv4 user ID mapping. This property will be set for all NetApp
* accounts in the subscription and region and only affect non ldap NFSv4 volumes.
*
* @param nfsV4IdDomain the nfsV4IdDomain value to set.
* @return the AccountProperties object itself.
*/
public AccountProperties withNfsV4IdDomain(String nfsV4IdDomain) {
this.nfsV4IdDomain = nfsV4IdDomain;
return this;
}
/**
* Get the isMultiAdEnabled property: This will have true value only if account is Multiple AD enabled.
*
* @return the isMultiAdEnabled value.
*/
public Boolean isMultiAdEnabled() {
return this.isMultiAdEnabled;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (activeDirectories() != null) {
activeDirectories().forEach(e -> e.validate());
}
if (encryption() != null) {
encryption().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeArrayField("activeDirectories", this.activeDirectories,
(writer, element) -> writer.writeJson(element));
jsonWriter.writeJsonField("encryption", this.encryption);
jsonWriter.writeStringField("nfsV4IDDomain", this.nfsV4IdDomain);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of AccountProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AccountProperties 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 AccountProperties.
*/
public static AccountProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AccountProperties deserializedAccountProperties = new AccountProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("provisioningState".equals(fieldName)) {
deserializedAccountProperties.provisioningState = reader.getString();
} else if ("activeDirectories".equals(fieldName)) {
List activeDirectories
= reader.readArray(reader1 -> ActiveDirectory.fromJson(reader1));
deserializedAccountProperties.activeDirectories = activeDirectories;
} else if ("encryption".equals(fieldName)) {
deserializedAccountProperties.encryption = AccountEncryption.fromJson(reader);
} else if ("disableShowmount".equals(fieldName)) {
deserializedAccountProperties.disableShowmount = reader.getNullable(JsonReader::getBoolean);
} else if ("nfsV4IDDomain".equals(fieldName)) {
deserializedAccountProperties.nfsV4IdDomain = reader.getString();
} else if ("isMultiAdEnabled".equals(fieldName)) {
deserializedAccountProperties.isMultiAdEnabled = reader.getNullable(JsonReader::getBoolean);
} else {
reader.skipChildren();
}
}
return deserializedAccountProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy