com.azure.resourcemanager.avs.fluent.models.PrivateCloudUpdateProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-avs Show documentation
Show all versions of azure-resourcemanager-avs Show documentation
This package contains Microsoft Azure SDK for Avs Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure VMware Solution API. Package tag package-2023-09-01.
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.avs.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.avs.models.AvailabilityProperties;
import com.azure.resourcemanager.avs.models.DnsZoneType;
import com.azure.resourcemanager.avs.models.Encryption;
import com.azure.resourcemanager.avs.models.IdentitySource;
import com.azure.resourcemanager.avs.models.InternetEnum;
import com.azure.resourcemanager.avs.models.ManagementCluster;
import java.io.IOException;
import java.util.List;
/**
* The properties of a private cloud resource that may be updated.
*/
@Fluent
public final class PrivateCloudUpdateProperties implements JsonSerializable {
/*
* The default cluster used for management
*/
private ManagementCluster managementCluster;
/*
* Connectivity to internet is enabled or disabled
*/
private InternetEnum internet;
/*
* vCenter Single Sign On Identity Sources
*/
private List identitySources;
/*
* Properties describing how the cloud is distributed across availability zones
*/
private AvailabilityProperties availability;
/*
* Customer managed key encryption, can be enabled or disabled
*/
private Encryption encryption;
/*
* Array of additional networks noncontiguous with networkBlock. Networks must be
* unique and non-overlapping across VNet in your subscription, on-premise, and
* this privateCloud networkBlock attribute. Make sure the CIDR format conforms to
* (A.B.C.D/X).
*/
private List extendedNetworkBlocks;
/*
* The type of DNS zone to use.
*/
private DnsZoneType dnsZoneType;
/**
* Creates an instance of PrivateCloudUpdateProperties class.
*/
public PrivateCloudUpdateProperties() {
}
/**
* Get the managementCluster property: The default cluster used for management.
*
* @return the managementCluster value.
*/
public ManagementCluster managementCluster() {
return this.managementCluster;
}
/**
* Set the managementCluster property: The default cluster used for management.
*
* @param managementCluster the managementCluster value to set.
* @return the PrivateCloudUpdateProperties object itself.
*/
public PrivateCloudUpdateProperties withManagementCluster(ManagementCluster managementCluster) {
this.managementCluster = managementCluster;
return this;
}
/**
* Get the internet property: Connectivity to internet is enabled or disabled.
*
* @return the internet value.
*/
public InternetEnum internet() {
return this.internet;
}
/**
* Set the internet property: Connectivity to internet is enabled or disabled.
*
* @param internet the internet value to set.
* @return the PrivateCloudUpdateProperties object itself.
*/
public PrivateCloudUpdateProperties withInternet(InternetEnum internet) {
this.internet = internet;
return this;
}
/**
* Get the identitySources property: vCenter Single Sign On Identity Sources.
*
* @return the identitySources value.
*/
public List identitySources() {
return this.identitySources;
}
/**
* Set the identitySources property: vCenter Single Sign On Identity Sources.
*
* @param identitySources the identitySources value to set.
* @return the PrivateCloudUpdateProperties object itself.
*/
public PrivateCloudUpdateProperties withIdentitySources(List identitySources) {
this.identitySources = identitySources;
return this;
}
/**
* Get the availability property: Properties describing how the cloud is distributed across availability zones.
*
* @return the availability value.
*/
public AvailabilityProperties availability() {
return this.availability;
}
/**
* Set the availability property: Properties describing how the cloud is distributed across availability zones.
*
* @param availability the availability value to set.
* @return the PrivateCloudUpdateProperties object itself.
*/
public PrivateCloudUpdateProperties withAvailability(AvailabilityProperties availability) {
this.availability = availability;
return this;
}
/**
* Get the encryption property: Customer managed key encryption, can be enabled or disabled.
*
* @return the encryption value.
*/
public Encryption encryption() {
return this.encryption;
}
/**
* Set the encryption property: Customer managed key encryption, can be enabled or disabled.
*
* @param encryption the encryption value to set.
* @return the PrivateCloudUpdateProperties object itself.
*/
public PrivateCloudUpdateProperties withEncryption(Encryption encryption) {
this.encryption = encryption;
return this;
}
/**
* Get the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks
* must be
* unique and non-overlapping across VNet in your subscription, on-premise, and
* this privateCloud networkBlock attribute. Make sure the CIDR format conforms to
* (A.B.C.D/X).
*
* @return the extendedNetworkBlocks value.
*/
public List extendedNetworkBlocks() {
return this.extendedNetworkBlocks;
}
/**
* Set the extendedNetworkBlocks property: Array of additional networks noncontiguous with networkBlock. Networks
* must be
* unique and non-overlapping across VNet in your subscription, on-premise, and
* this privateCloud networkBlock attribute. Make sure the CIDR format conforms to
* (A.B.C.D/X).
*
* @param extendedNetworkBlocks the extendedNetworkBlocks value to set.
* @return the PrivateCloudUpdateProperties object itself.
*/
public PrivateCloudUpdateProperties withExtendedNetworkBlocks(List extendedNetworkBlocks) {
this.extendedNetworkBlocks = extendedNetworkBlocks;
return this;
}
/**
* Get the dnsZoneType property: The type of DNS zone to use.
*
* @return the dnsZoneType value.
*/
public DnsZoneType dnsZoneType() {
return this.dnsZoneType;
}
/**
* Set the dnsZoneType property: The type of DNS zone to use.
*
* @param dnsZoneType the dnsZoneType value to set.
* @return the PrivateCloudUpdateProperties object itself.
*/
public PrivateCloudUpdateProperties withDnsZoneType(DnsZoneType dnsZoneType) {
this.dnsZoneType = dnsZoneType;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (managementCluster() != null) {
managementCluster().validate();
}
if (identitySources() != null) {
identitySources().forEach(e -> e.validate());
}
if (availability() != null) {
availability().validate();
}
if (encryption() != null) {
encryption().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeJsonField("managementCluster", this.managementCluster);
jsonWriter.writeStringField("internet", this.internet == null ? null : this.internet.toString());
jsonWriter.writeArrayField("identitySources", this.identitySources,
(writer, element) -> writer.writeJson(element));
jsonWriter.writeJsonField("availability", this.availability);
jsonWriter.writeJsonField("encryption", this.encryption);
jsonWriter.writeArrayField("extendedNetworkBlocks", this.extendedNetworkBlocks,
(writer, element) -> writer.writeString(element));
jsonWriter.writeStringField("dnsZoneType", this.dnsZoneType == null ? null : this.dnsZoneType.toString());
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of PrivateCloudUpdateProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of PrivateCloudUpdateProperties 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 PrivateCloudUpdateProperties.
*/
public static PrivateCloudUpdateProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
PrivateCloudUpdateProperties deserializedPrivateCloudUpdateProperties = new PrivateCloudUpdateProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("managementCluster".equals(fieldName)) {
deserializedPrivateCloudUpdateProperties.managementCluster = ManagementCluster.fromJson(reader);
} else if ("internet".equals(fieldName)) {
deserializedPrivateCloudUpdateProperties.internet = InternetEnum.fromString(reader.getString());
} else if ("identitySources".equals(fieldName)) {
List identitySources
= reader.readArray(reader1 -> IdentitySource.fromJson(reader1));
deserializedPrivateCloudUpdateProperties.identitySources = identitySources;
} else if ("availability".equals(fieldName)) {
deserializedPrivateCloudUpdateProperties.availability = AvailabilityProperties.fromJson(reader);
} else if ("encryption".equals(fieldName)) {
deserializedPrivateCloudUpdateProperties.encryption = Encryption.fromJson(reader);
} else if ("extendedNetworkBlocks".equals(fieldName)) {
List extendedNetworkBlocks = reader.readArray(reader1 -> reader1.getString());
deserializedPrivateCloudUpdateProperties.extendedNetworkBlocks = extendedNetworkBlocks;
} else if ("dnsZoneType".equals(fieldName)) {
deserializedPrivateCloudUpdateProperties.dnsZoneType = DnsZoneType.fromString(reader.getString());
} else {
reader.skipChildren();
}
}
return deserializedPrivateCloudUpdateProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy