Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.eks.model.Cluster Maven / Gradle / Ivy
Go to download
The AWS Java SDK for EKS module holds the client classes that are used for
communicating with EKS.
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.eks.model;
import java.io.Serializable;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
*
* An object representing an Amazon EKS cluster.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class Cluster implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name")
.getter(getter(Cluster::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();
private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("arn")
.getter(getter(Cluster::arn)).setter(setter(Builder::arn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("arn").build()).build();
private static final SdkField CREATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT)
.memberName("createdAt").getter(getter(Cluster::createdAt)).setter(setter(Builder::createdAt))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdAt").build()).build();
private static final SdkField VERSION_FIELD = SdkField. builder(MarshallingType.STRING).memberName("version")
.getter(getter(Cluster::version)).setter(setter(Builder::version))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("version").build()).build();
private static final SdkField ENDPOINT_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("endpoint").getter(getter(Cluster::endpoint)).setter(setter(Builder::endpoint))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("endpoint").build()).build();
private static final SdkField ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("roleArn").getter(getter(Cluster::roleArn)).setter(setter(Builder::roleArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("roleArn").build()).build();
private static final SdkField RESOURCES_VPC_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("resourcesVpcConfig")
.getter(getter(Cluster::resourcesVpcConfig)).setter(setter(Builder::resourcesVpcConfig))
.constructor(VpcConfigResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("resourcesVpcConfig").build())
.build();
private static final SdkField KUBERNETES_NETWORK_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("kubernetesNetworkConfig")
.getter(getter(Cluster::kubernetesNetworkConfig)).setter(setter(Builder::kubernetesNetworkConfig))
.constructor(KubernetesNetworkConfigResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("kubernetesNetworkConfig").build())
.build();
private static final SdkField LOGGING_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("logging").getter(getter(Cluster::logging)).setter(setter(Builder::logging))
.constructor(Logging::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("logging").build()).build();
private static final SdkField IDENTITY_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("identity").getter(getter(Cluster::identity)).setter(setter(Builder::identity))
.constructor(Identity::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("identity").build()).build();
private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status")
.getter(getter(Cluster::statusAsString)).setter(setter(Builder::status))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build();
private static final SdkField CERTIFICATE_AUTHORITY_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("certificateAuthority")
.getter(getter(Cluster::certificateAuthority)).setter(setter(Builder::certificateAuthority))
.constructor(Certificate::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("certificateAuthority").build())
.build();
private static final SdkField CLIENT_REQUEST_TOKEN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("clientRequestToken").getter(getter(Cluster::clientRequestToken))
.setter(setter(Builder::clientRequestToken))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("clientRequestToken").build())
.build();
private static final SdkField PLATFORM_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("platformVersion").getter(getter(Cluster::platformVersion)).setter(setter(Builder::platformVersion))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("platformVersion").build()).build();
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("tags")
.getter(getter(Cluster::tags))
.setter(setter(Builder::tags))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("tags").build(),
MapTrait.builder()
.keyLocationName("key")
.valueLocationName("value")
.valueFieldInfo(
SdkField. builder(MarshallingType.STRING)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("value").build()).build()).build()).build();
private static final SdkField> ENCRYPTION_CONFIG_FIELD = SdkField
.> builder(MarshallingType.LIST)
.memberName("encryptionConfig")
.getter(getter(Cluster::encryptionConfig))
.setter(setter(Builder::encryptionConfig))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("encryptionConfig").build(),
ListTrait
.builder()
.memberLocationName(null)
.memberFieldInfo(
SdkField. builder(MarshallingType.SDK_POJO)
.constructor(EncryptionConfig::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
.locationName("member").build()).build()).build()).build();
private static final SdkField CONNECTOR_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("connectorConfig")
.getter(getter(Cluster::connectorConfig)).setter(setter(Builder::connectorConfig))
.constructor(ConnectorConfigResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("connectorConfig").build()).build();
private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("id")
.getter(getter(Cluster::id)).setter(setter(Builder::id))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("id").build()).build();
private static final SdkField HEALTH_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("health").getter(getter(Cluster::health)).setter(setter(Builder::health))
.constructor(ClusterHealth::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("health").build()).build();
private static final SdkField OUTPOST_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("outpostConfig")
.getter(getter(Cluster::outpostConfig)).setter(setter(Builder::outpostConfig))
.constructor(OutpostConfigResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("outpostConfig").build()).build();
private static final SdkField ACCESS_CONFIG_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("accessConfig")
.getter(getter(Cluster::accessConfig)).setter(setter(Builder::accessConfig))
.constructor(AccessConfigResponse::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("accessConfig").build()).build();
private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(NAME_FIELD, ARN_FIELD,
CREATED_AT_FIELD, VERSION_FIELD, ENDPOINT_FIELD, ROLE_ARN_FIELD, RESOURCES_VPC_CONFIG_FIELD,
KUBERNETES_NETWORK_CONFIG_FIELD, LOGGING_FIELD, IDENTITY_FIELD, STATUS_FIELD, CERTIFICATE_AUTHORITY_FIELD,
CLIENT_REQUEST_TOKEN_FIELD, PLATFORM_VERSION_FIELD, TAGS_FIELD, ENCRYPTION_CONFIG_FIELD, CONNECTOR_CONFIG_FIELD,
ID_FIELD, HEALTH_FIELD, OUTPOST_CONFIG_FIELD, ACCESS_CONFIG_FIELD));
private static final long serialVersionUID = 1L;
private final String name;
private final String arn;
private final Instant createdAt;
private final String version;
private final String endpoint;
private final String roleArn;
private final VpcConfigResponse resourcesVpcConfig;
private final KubernetesNetworkConfigResponse kubernetesNetworkConfig;
private final Logging logging;
private final Identity identity;
private final String status;
private final Certificate certificateAuthority;
private final String clientRequestToken;
private final String platformVersion;
private final Map tags;
private final List encryptionConfig;
private final ConnectorConfigResponse connectorConfig;
private final String id;
private final ClusterHealth health;
private final OutpostConfigResponse outpostConfig;
private final AccessConfigResponse accessConfig;
private Cluster(BuilderImpl builder) {
this.name = builder.name;
this.arn = builder.arn;
this.createdAt = builder.createdAt;
this.version = builder.version;
this.endpoint = builder.endpoint;
this.roleArn = builder.roleArn;
this.resourcesVpcConfig = builder.resourcesVpcConfig;
this.kubernetesNetworkConfig = builder.kubernetesNetworkConfig;
this.logging = builder.logging;
this.identity = builder.identity;
this.status = builder.status;
this.certificateAuthority = builder.certificateAuthority;
this.clientRequestToken = builder.clientRequestToken;
this.platformVersion = builder.platformVersion;
this.tags = builder.tags;
this.encryptionConfig = builder.encryptionConfig;
this.connectorConfig = builder.connectorConfig;
this.id = builder.id;
this.health = builder.health;
this.outpostConfig = builder.outpostConfig;
this.accessConfig = builder.accessConfig;
}
/**
*
* The name of your cluster.
*
*
* @return The name of your cluster.
*/
public final String name() {
return name;
}
/**
*
* The Amazon Resource Name (ARN) of the cluster.
*
*
* @return The Amazon Resource Name (ARN) of the cluster.
*/
public final String arn() {
return arn;
}
/**
*
* The Unix epoch timestamp at object creation.
*
*
* @return The Unix epoch timestamp at object creation.
*/
public final Instant createdAt() {
return createdAt;
}
/**
*
* The Kubernetes server version for the cluster.
*
*
* @return The Kubernetes server version for the cluster.
*/
public final String version() {
return version;
}
/**
*
* The endpoint for your Kubernetes API server.
*
*
* @return The endpoint for your Kubernetes API server.
*/
public final String endpoint() {
return endpoint;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make
* calls to Amazon Web Services API operations on your behalf.
*
*
* @return The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane
* to make calls to Amazon Web Services API operations on your behalf.
*/
public final String roleArn() {
return roleArn;
}
/**
*
* The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have specific requirements to
* work properly with Kubernetes. For more information, see Cluster VPC considerations and Cluster security group
* considerations in the Amazon EKS User Guide .
*
*
* @return The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have specific
* requirements to work properly with Kubernetes. For more information, see Cluster VPC considerations
* and Cluster security group
* considerations in the Amazon EKS User Guide .
*/
public final VpcConfigResponse resourcesVpcConfig() {
return resourcesVpcConfig;
}
/**
*
* The Kubernetes network configuration for the cluster.
*
*
* @return The Kubernetes network configuration for the cluster.
*/
public final KubernetesNetworkConfigResponse kubernetesNetworkConfig() {
return kubernetesNetworkConfig;
}
/**
*
* The logging configuration for your cluster.
*
*
* @return The logging configuration for your cluster.
*/
public final Logging logging() {
return logging;
}
/**
*
* The identity provider information for the cluster.
*
*
* @return The identity provider information for the cluster.
*/
public final Identity identity() {
return identity;
}
/**
*
* The current status of the cluster.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link ClusterStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #statusAsString}.
*
*
* @return The current status of the cluster.
* @see ClusterStatus
*/
public final ClusterStatus status() {
return ClusterStatus.fromValue(status);
}
/**
*
* The current status of the cluster.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link ClusterStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #statusAsString}.
*
*
* @return The current status of the cluster.
* @see ClusterStatus
*/
public final String statusAsString() {
return status;
}
/**
*
* The certificate-authority-data
for your cluster.
*
*
* @return The certificate-authority-data
for your cluster.
*/
public final Certificate certificateAuthority() {
return certificateAuthority;
}
/**
*
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*
*
* @return A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*/
public final String clientRequestToken() {
return clientRequestToken;
}
/**
*
* The platform version of your Amazon EKS cluster. For more information about clusters deployed on the Amazon Web
* Services Cloud, see Platform
* versions in the Amazon EKS User Guide . For more information about local clusters deployed on
* an Outpost, see Amazon EKS local
* cluster platform versions in the Amazon EKS User Guide .
*
*
* @return The platform version of your Amazon EKS cluster. For more information about clusters deployed on the
* Amazon Web Services Cloud, see Platform versions in
* the Amazon EKS User Guide . For more information about local clusters deployed on an
* Outpost, see Amazon EKS
* local cluster platform versions in the Amazon EKS User Guide .
*/
public final String platformVersion() {
return platformVersion;
}
/**
* For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that
* the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful
* because the SDK will never return a null collection or map, but you may need to differentiate between the service
* returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true
* if a value for the property was specified in the request builder, and false if a value was not specified.
*/
public final boolean hasTags() {
return tags != null && !(tags instanceof SdkAutoConstructMap);
}
/**
*
* Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You
* define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasTags} method.
*
*
* @return Metadata that assists with categorization and organization. Each tag consists of a key and an optional
* value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
*/
public final Map tags() {
return tags;
}
/**
* For responses, this returns true if the service returned a value for the EncryptionConfig property. This DOES NOT
* check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property).
* This is useful because the SDK will never return a null collection or map, but you may need to differentiate
* between the service returning nothing (or null) and the service returning an empty collection or map. For
* requests, this returns true if a value for the property was specified in the request builder, and false if a
* value was not specified.
*/
public final boolean hasEncryptionConfig() {
return encryptionConfig != null && !(encryptionConfig instanceof SdkAutoConstructList);
}
/**
*
* The encryption configuration for the cluster.
*
*
* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
*
*
* This method will never return null. If you would like to know whether the service returned this field (so that
* you can differentiate between null and empty), you can use the {@link #hasEncryptionConfig} method.
*
*
* @return The encryption configuration for the cluster.
*/
public final List encryptionConfig() {
return encryptionConfig;
}
/**
*
* The configuration used to connect to a cluster for registration.
*
*
* @return The configuration used to connect to a cluster for registration.
*/
public final ConnectorConfigResponse connectorConfig() {
return connectorConfig;
}
/**
*
* The ID of your local Amazon EKS cluster on an Amazon Web Services Outpost. This property isn't available for an
* Amazon EKS cluster on the Amazon Web Services cloud.
*
*
* @return The ID of your local Amazon EKS cluster on an Amazon Web Services Outpost. This property isn't available
* for an Amazon EKS cluster on the Amazon Web Services cloud.
*/
public final String id() {
return id;
}
/**
*
* An object representing the health of your local Amazon EKS cluster on an Amazon Web Services Outpost. This object
* isn't available for clusters on the Amazon Web Services cloud.
*
*
* @return An object representing the health of your local Amazon EKS cluster on an Amazon Web Services Outpost.
* This object isn't available for clusters on the Amazon Web Services cloud.
*/
public final ClusterHealth health() {
return health;
}
/**
*
* An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost. This
* object isn't available for clusters on the Amazon Web Services cloud.
*
*
* @return An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services
* Outpost. This object isn't available for clusters on the Amazon Web Services cloud.
*/
public final OutpostConfigResponse outpostConfig() {
return outpostConfig;
}
/**
*
* The access configuration for the cluster.
*
*
* @return The access configuration for the cluster.
*/
public final AccessConfigResponse accessConfig() {
return accessConfig;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(arn());
hashCode = 31 * hashCode + Objects.hashCode(createdAt());
hashCode = 31 * hashCode + Objects.hashCode(version());
hashCode = 31 * hashCode + Objects.hashCode(endpoint());
hashCode = 31 * hashCode + Objects.hashCode(roleArn());
hashCode = 31 * hashCode + Objects.hashCode(resourcesVpcConfig());
hashCode = 31 * hashCode + Objects.hashCode(kubernetesNetworkConfig());
hashCode = 31 * hashCode + Objects.hashCode(logging());
hashCode = 31 * hashCode + Objects.hashCode(identity());
hashCode = 31 * hashCode + Objects.hashCode(statusAsString());
hashCode = 31 * hashCode + Objects.hashCode(certificateAuthority());
hashCode = 31 * hashCode + Objects.hashCode(clientRequestToken());
hashCode = 31 * hashCode + Objects.hashCode(platformVersion());
hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null);
hashCode = 31 * hashCode + Objects.hashCode(hasEncryptionConfig() ? encryptionConfig() : null);
hashCode = 31 * hashCode + Objects.hashCode(connectorConfig());
hashCode = 31 * hashCode + Objects.hashCode(id());
hashCode = 31 * hashCode + Objects.hashCode(health());
hashCode = 31 * hashCode + Objects.hashCode(outpostConfig());
hashCode = 31 * hashCode + Objects.hashCode(accessConfig());
return hashCode;
}
@Override
public final boolean equals(Object obj) {
return equalsBySdkFields(obj);
}
@Override
public final boolean equalsBySdkFields(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof Cluster)) {
return false;
}
Cluster other = (Cluster) obj;
return Objects.equals(name(), other.name()) && Objects.equals(arn(), other.arn())
&& Objects.equals(createdAt(), other.createdAt()) && Objects.equals(version(), other.version())
&& Objects.equals(endpoint(), other.endpoint()) && Objects.equals(roleArn(), other.roleArn())
&& Objects.equals(resourcesVpcConfig(), other.resourcesVpcConfig())
&& Objects.equals(kubernetesNetworkConfig(), other.kubernetesNetworkConfig())
&& Objects.equals(logging(), other.logging()) && Objects.equals(identity(), other.identity())
&& Objects.equals(statusAsString(), other.statusAsString())
&& Objects.equals(certificateAuthority(), other.certificateAuthority())
&& Objects.equals(clientRequestToken(), other.clientRequestToken())
&& Objects.equals(platformVersion(), other.platformVersion()) && hasTags() == other.hasTags()
&& Objects.equals(tags(), other.tags()) && hasEncryptionConfig() == other.hasEncryptionConfig()
&& Objects.equals(encryptionConfig(), other.encryptionConfig())
&& Objects.equals(connectorConfig(), other.connectorConfig()) && Objects.equals(id(), other.id())
&& Objects.equals(health(), other.health()) && Objects.equals(outpostConfig(), other.outpostConfig())
&& Objects.equals(accessConfig(), other.accessConfig());
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*/
@Override
public final String toString() {
return ToString.builder("Cluster").add("Name", name()).add("Arn", arn()).add("CreatedAt", createdAt())
.add("Version", version()).add("Endpoint", endpoint()).add("RoleArn", roleArn())
.add("ResourcesVpcConfig", resourcesVpcConfig()).add("KubernetesNetworkConfig", kubernetesNetworkConfig())
.add("Logging", logging()).add("Identity", identity()).add("Status", statusAsString())
.add("CertificateAuthority", certificateAuthority()).add("ClientRequestToken", clientRequestToken())
.add("PlatformVersion", platformVersion()).add("Tags", hasTags() ? tags() : null)
.add("EncryptionConfig", hasEncryptionConfig() ? encryptionConfig() : null)
.add("ConnectorConfig", connectorConfig()).add("Id", id()).add("Health", health())
.add("OutpostConfig", outpostConfig()).add("AccessConfig", accessConfig()).build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "name":
return Optional.ofNullable(clazz.cast(name()));
case "arn":
return Optional.ofNullable(clazz.cast(arn()));
case "createdAt":
return Optional.ofNullable(clazz.cast(createdAt()));
case "version":
return Optional.ofNullable(clazz.cast(version()));
case "endpoint":
return Optional.ofNullable(clazz.cast(endpoint()));
case "roleArn":
return Optional.ofNullable(clazz.cast(roleArn()));
case "resourcesVpcConfig":
return Optional.ofNullable(clazz.cast(resourcesVpcConfig()));
case "kubernetesNetworkConfig":
return Optional.ofNullable(clazz.cast(kubernetesNetworkConfig()));
case "logging":
return Optional.ofNullable(clazz.cast(logging()));
case "identity":
return Optional.ofNullable(clazz.cast(identity()));
case "status":
return Optional.ofNullable(clazz.cast(statusAsString()));
case "certificateAuthority":
return Optional.ofNullable(clazz.cast(certificateAuthority()));
case "clientRequestToken":
return Optional.ofNullable(clazz.cast(clientRequestToken()));
case "platformVersion":
return Optional.ofNullable(clazz.cast(platformVersion()));
case "tags":
return Optional.ofNullable(clazz.cast(tags()));
case "encryptionConfig":
return Optional.ofNullable(clazz.cast(encryptionConfig()));
case "connectorConfig":
return Optional.ofNullable(clazz.cast(connectorConfig()));
case "id":
return Optional.ofNullable(clazz.cast(id()));
case "health":
return Optional.ofNullable(clazz.cast(health()));
case "outpostConfig":
return Optional.ofNullable(clazz.cast(outpostConfig()));
case "accessConfig":
return Optional.ofNullable(clazz.cast(accessConfig()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((Cluster) obj);
}
private static BiConsumer setter(BiConsumer s) {
return (obj, val) -> s.accept((Builder) obj, val);
}
public interface Builder extends SdkPojo, CopyableBuilder {
/**
*
* The name of your cluster.
*
*
* @param name
* The name of your cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder name(String name);
/**
*
* The Amazon Resource Name (ARN) of the cluster.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder arn(String arn);
/**
*
* The Unix epoch timestamp at object creation.
*
*
* @param createdAt
* The Unix epoch timestamp at object creation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder createdAt(Instant createdAt);
/**
*
* The Kubernetes server version for the cluster.
*
*
* @param version
* The Kubernetes server version for the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder version(String version);
/**
*
* The endpoint for your Kubernetes API server.
*
*
* @param endpoint
* The endpoint for your Kubernetes API server.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder endpoint(String endpoint);
/**
*
* The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to
* make calls to Amazon Web Services API operations on your behalf.
*
*
* @param roleArn
* The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control
* plane to make calls to Amazon Web Services API operations on your behalf.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder roleArn(String roleArn);
/**
*
* The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have specific requirements
* to work properly with Kubernetes. For more information, see Cluster VPC considerations and
* Cluster security group
* considerations in the Amazon EKS User Guide .
*
*
* @param resourcesVpcConfig
* The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have specific
* requirements to work properly with Kubernetes. For more information, see Cluster VPC
* considerations and Cluster security group
* considerations in the Amazon EKS User Guide .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder resourcesVpcConfig(VpcConfigResponse resourcesVpcConfig);
/**
*
* The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have specific requirements
* to work properly with Kubernetes. For more information, see Cluster VPC considerations and
* Cluster security group
* considerations in the Amazon EKS User Guide .
*
* This is a convenience method that creates an instance of the {@link VpcConfigResponse.Builder} avoiding the
* need to create one manually via {@link VpcConfigResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link VpcConfigResponse.Builder#build()} is called immediately and its
* result is passed to {@link #resourcesVpcConfig(VpcConfigResponse)}.
*
* @param resourcesVpcConfig
* a consumer that will call methods on {@link VpcConfigResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #resourcesVpcConfig(VpcConfigResponse)
*/
default Builder resourcesVpcConfig(Consumer resourcesVpcConfig) {
return resourcesVpcConfig(VpcConfigResponse.builder().applyMutation(resourcesVpcConfig).build());
}
/**
*
* The Kubernetes network configuration for the cluster.
*
*
* @param kubernetesNetworkConfig
* The Kubernetes network configuration for the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder kubernetesNetworkConfig(KubernetesNetworkConfigResponse kubernetesNetworkConfig);
/**
*
* The Kubernetes network configuration for the cluster.
*
* This is a convenience method that creates an instance of the {@link KubernetesNetworkConfigResponse.Builder}
* avoiding the need to create one manually via {@link KubernetesNetworkConfigResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link KubernetesNetworkConfigResponse.Builder#build()} is called
* immediately and its result is passed to {@link #kubernetesNetworkConfig(KubernetesNetworkConfigResponse)}.
*
* @param kubernetesNetworkConfig
* a consumer that will call methods on {@link KubernetesNetworkConfigResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #kubernetesNetworkConfig(KubernetesNetworkConfigResponse)
*/
default Builder kubernetesNetworkConfig(Consumer kubernetesNetworkConfig) {
return kubernetesNetworkConfig(KubernetesNetworkConfigResponse.builder().applyMutation(kubernetesNetworkConfig)
.build());
}
/**
*
* The logging configuration for your cluster.
*
*
* @param logging
* The logging configuration for your cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder logging(Logging logging);
/**
*
* The logging configuration for your cluster.
*
* This is a convenience method that creates an instance of the {@link Logging.Builder} avoiding the need to
* create one manually via {@link Logging#builder()}.
*
*
* When the {@link Consumer} completes, {@link Logging.Builder#build()} is called immediately and its result is
* passed to {@link #logging(Logging)}.
*
* @param logging
* a consumer that will call methods on {@link Logging.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #logging(Logging)
*/
default Builder logging(Consumer logging) {
return logging(Logging.builder().applyMutation(logging).build());
}
/**
*
* The identity provider information for the cluster.
*
*
* @param identity
* The identity provider information for the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder identity(Identity identity);
/**
*
* The identity provider information for the cluster.
*
* This is a convenience method that creates an instance of the {@link Identity.Builder} avoiding the need to
* create one manually via {@link Identity#builder()}.
*
*
* When the {@link Consumer} completes, {@link Identity.Builder#build()} is called immediately and its result is
* passed to {@link #identity(Identity)}.
*
* @param identity
* a consumer that will call methods on {@link Identity.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #identity(Identity)
*/
default Builder identity(Consumer identity) {
return identity(Identity.builder().applyMutation(identity).build());
}
/**
*
* The current status of the cluster.
*
*
* @param status
* The current status of the cluster.
* @see ClusterStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see ClusterStatus
*/
Builder status(String status);
/**
*
* The current status of the cluster.
*
*
* @param status
* The current status of the cluster.
* @see ClusterStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see ClusterStatus
*/
Builder status(ClusterStatus status);
/**
*
* The certificate-authority-data
for your cluster.
*
*
* @param certificateAuthority
* The certificate-authority-data
for your cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder certificateAuthority(Certificate certificateAuthority);
/**
*
* The certificate-authority-data
for your cluster.
*
* This is a convenience method that creates an instance of the {@link Certificate.Builder} avoiding the need to
* create one manually via {@link Certificate#builder()}.
*
*
* When the {@link Consumer} completes, {@link Certificate.Builder#build()} is called immediately and its result
* is passed to {@link #certificateAuthority(Certificate)}.
*
* @param certificateAuthority
* a consumer that will call methods on {@link Certificate.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #certificateAuthority(Certificate)
*/
default Builder certificateAuthority(Consumer certificateAuthority) {
return certificateAuthority(Certificate.builder().applyMutation(certificateAuthority).build());
}
/**
*
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
*
*
* @param clientRequestToken
* A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder clientRequestToken(String clientRequestToken);
/**
*
* The platform version of your Amazon EKS cluster. For more information about clusters deployed on the Amazon
* Web Services Cloud, see Platform versions in the
* Amazon EKS User Guide . For more information about local clusters deployed on an Outpost, see
* Amazon EKS
* local cluster platform versions in the Amazon EKS User Guide .
*
*
* @param platformVersion
* The platform version of your Amazon EKS cluster. For more information about clusters deployed on the
* Amazon Web Services Cloud, see Platform versions
* in the Amazon EKS User Guide . For more information about local clusters deployed on an
* Outpost, see Amazon EKS
* local cluster platform versions in the Amazon EKS User Guide .
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder platformVersion(String platformVersion);
/**
*
* Metadata that assists with categorization and organization. Each tag consists of a key and an optional value.
* You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
*
*
* @param tags
* Metadata that assists with categorization and organization. Each tag consists of a key and an optional
* value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Map tags);
/**
*
* The encryption configuration for the cluster.
*
*
* @param encryptionConfig
* The encryption configuration for the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder encryptionConfig(Collection encryptionConfig);
/**
*
* The encryption configuration for the cluster.
*
*
* @param encryptionConfig
* The encryption configuration for the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder encryptionConfig(EncryptionConfig... encryptionConfig);
/**
*
* The encryption configuration for the cluster.
*
* This is a convenience method that creates an instance of the
* {@link software.amazon.awssdk.services.eks.model.EncryptionConfig.Builder} avoiding the need to create one
* manually via {@link software.amazon.awssdk.services.eks.model.EncryptionConfig#builder()}.
*
*
* When the {@link Consumer} completes,
* {@link software.amazon.awssdk.services.eks.model.EncryptionConfig.Builder#build()} is called immediately and
* its result is passed to {@link #encryptionConfig(List)}.
*
* @param encryptionConfig
* a consumer that will call methods on
* {@link software.amazon.awssdk.services.eks.model.EncryptionConfig.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #encryptionConfig(java.util.Collection)
*/
Builder encryptionConfig(Consumer... encryptionConfig);
/**
*
* The configuration used to connect to a cluster for registration.
*
*
* @param connectorConfig
* The configuration used to connect to a cluster for registration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder connectorConfig(ConnectorConfigResponse connectorConfig);
/**
*
* The configuration used to connect to a cluster for registration.
*
* This is a convenience method that creates an instance of the {@link ConnectorConfigResponse.Builder} avoiding
* the need to create one manually via {@link ConnectorConfigResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link ConnectorConfigResponse.Builder#build()} is called immediately
* and its result is passed to {@link #connectorConfig(ConnectorConfigResponse)}.
*
* @param connectorConfig
* a consumer that will call methods on {@link ConnectorConfigResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #connectorConfig(ConnectorConfigResponse)
*/
default Builder connectorConfig(Consumer connectorConfig) {
return connectorConfig(ConnectorConfigResponse.builder().applyMutation(connectorConfig).build());
}
/**
*
* The ID of your local Amazon EKS cluster on an Amazon Web Services Outpost. This property isn't available for
* an Amazon EKS cluster on the Amazon Web Services cloud.
*
*
* @param id
* The ID of your local Amazon EKS cluster on an Amazon Web Services Outpost. This property isn't
* available for an Amazon EKS cluster on the Amazon Web Services cloud.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder id(String id);
/**
*
* An object representing the health of your local Amazon EKS cluster on an Amazon Web Services Outpost. This
* object isn't available for clusters on the Amazon Web Services cloud.
*
*
* @param health
* An object representing the health of your local Amazon EKS cluster on an Amazon Web Services Outpost.
* This object isn't available for clusters on the Amazon Web Services cloud.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder health(ClusterHealth health);
/**
*
* An object representing the health of your local Amazon EKS cluster on an Amazon Web Services Outpost. This
* object isn't available for clusters on the Amazon Web Services cloud.
*
* This is a convenience method that creates an instance of the {@link ClusterHealth.Builder} avoiding the need
* to create one manually via {@link ClusterHealth#builder()}.
*
*
* When the {@link Consumer} completes, {@link ClusterHealth.Builder#build()} is called immediately and its
* result is passed to {@link #health(ClusterHealth)}.
*
* @param health
* a consumer that will call methods on {@link ClusterHealth.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #health(ClusterHealth)
*/
default Builder health(Consumer health) {
return health(ClusterHealth.builder().applyMutation(health).build());
}
/**
*
* An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost.
* This object isn't available for clusters on the Amazon Web Services cloud.
*
*
* @param outpostConfig
* An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services
* Outpost. This object isn't available for clusters on the Amazon Web Services cloud.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder outpostConfig(OutpostConfigResponse outpostConfig);
/**
*
* An object representing the configuration of your local Amazon EKS cluster on an Amazon Web Services Outpost.
* This object isn't available for clusters on the Amazon Web Services cloud.
*
* This is a convenience method that creates an instance of the {@link OutpostConfigResponse.Builder} avoiding
* the need to create one manually via {@link OutpostConfigResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link OutpostConfigResponse.Builder#build()} is called immediately and
* its result is passed to {@link #outpostConfig(OutpostConfigResponse)}.
*
* @param outpostConfig
* a consumer that will call methods on {@link OutpostConfigResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #outpostConfig(OutpostConfigResponse)
*/
default Builder outpostConfig(Consumer outpostConfig) {
return outpostConfig(OutpostConfigResponse.builder().applyMutation(outpostConfig).build());
}
/**
*
* The access configuration for the cluster.
*
*
* @param accessConfig
* The access configuration for the cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder accessConfig(AccessConfigResponse accessConfig);
/**
*
* The access configuration for the cluster.
*
* This is a convenience method that creates an instance of the {@link AccessConfigResponse.Builder} avoiding
* the need to create one manually via {@link AccessConfigResponse#builder()}.
*
*
* When the {@link Consumer} completes, {@link AccessConfigResponse.Builder#build()} is called immediately and
* its result is passed to {@link #accessConfig(AccessConfigResponse)}.
*
* @param accessConfig
* a consumer that will call methods on {@link AccessConfigResponse.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #accessConfig(AccessConfigResponse)
*/
default Builder accessConfig(Consumer accessConfig) {
return accessConfig(AccessConfigResponse.builder().applyMutation(accessConfig).build());
}
}
static final class BuilderImpl implements Builder {
private String name;
private String arn;
private Instant createdAt;
private String version;
private String endpoint;
private String roleArn;
private VpcConfigResponse resourcesVpcConfig;
private KubernetesNetworkConfigResponse kubernetesNetworkConfig;
private Logging logging;
private Identity identity;
private String status;
private Certificate certificateAuthority;
private String clientRequestToken;
private String platformVersion;
private Map tags = DefaultSdkAutoConstructMap.getInstance();
private List encryptionConfig = DefaultSdkAutoConstructList.getInstance();
private ConnectorConfigResponse connectorConfig;
private String id;
private ClusterHealth health;
private OutpostConfigResponse outpostConfig;
private AccessConfigResponse accessConfig;
private BuilderImpl() {
}
private BuilderImpl(Cluster model) {
name(model.name);
arn(model.arn);
createdAt(model.createdAt);
version(model.version);
endpoint(model.endpoint);
roleArn(model.roleArn);
resourcesVpcConfig(model.resourcesVpcConfig);
kubernetesNetworkConfig(model.kubernetesNetworkConfig);
logging(model.logging);
identity(model.identity);
status(model.status);
certificateAuthority(model.certificateAuthority);
clientRequestToken(model.clientRequestToken);
platformVersion(model.platformVersion);
tags(model.tags);
encryptionConfig(model.encryptionConfig);
connectorConfig(model.connectorConfig);
id(model.id);
health(model.health);
outpostConfig(model.outpostConfig);
accessConfig(model.accessConfig);
}
public final String getName() {
return name;
}
public final void setName(String name) {
this.name = name;
}
@Override
public final Builder name(String name) {
this.name = name;
return this;
}
public final String getArn() {
return arn;
}
public final void setArn(String arn) {
this.arn = arn;
}
@Override
public final Builder arn(String arn) {
this.arn = arn;
return this;
}
public final Instant getCreatedAt() {
return createdAt;
}
public final void setCreatedAt(Instant createdAt) {
this.createdAt = createdAt;
}
@Override
public final Builder createdAt(Instant createdAt) {
this.createdAt = createdAt;
return this;
}
public final String getVersion() {
return version;
}
public final void setVersion(String version) {
this.version = version;
}
@Override
public final Builder version(String version) {
this.version = version;
return this;
}
public final String getEndpoint() {
return endpoint;
}
public final void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}
@Override
public final Builder endpoint(String endpoint) {
this.endpoint = endpoint;
return this;
}
public final String getRoleArn() {
return roleArn;
}
public final void setRoleArn(String roleArn) {
this.roleArn = roleArn;
}
@Override
public final Builder roleArn(String roleArn) {
this.roleArn = roleArn;
return this;
}
public final VpcConfigResponse.Builder getResourcesVpcConfig() {
return resourcesVpcConfig != null ? resourcesVpcConfig.toBuilder() : null;
}
public final void setResourcesVpcConfig(VpcConfigResponse.BuilderImpl resourcesVpcConfig) {
this.resourcesVpcConfig = resourcesVpcConfig != null ? resourcesVpcConfig.build() : null;
}
@Override
public final Builder resourcesVpcConfig(VpcConfigResponse resourcesVpcConfig) {
this.resourcesVpcConfig = resourcesVpcConfig;
return this;
}
public final KubernetesNetworkConfigResponse.Builder getKubernetesNetworkConfig() {
return kubernetesNetworkConfig != null ? kubernetesNetworkConfig.toBuilder() : null;
}
public final void setKubernetesNetworkConfig(KubernetesNetworkConfigResponse.BuilderImpl kubernetesNetworkConfig) {
this.kubernetesNetworkConfig = kubernetesNetworkConfig != null ? kubernetesNetworkConfig.build() : null;
}
@Override
public final Builder kubernetesNetworkConfig(KubernetesNetworkConfigResponse kubernetesNetworkConfig) {
this.kubernetesNetworkConfig = kubernetesNetworkConfig;
return this;
}
public final Logging.Builder getLogging() {
return logging != null ? logging.toBuilder() : null;
}
public final void setLogging(Logging.BuilderImpl logging) {
this.logging = logging != null ? logging.build() : null;
}
@Override
public final Builder logging(Logging logging) {
this.logging = logging;
return this;
}
public final Identity.Builder getIdentity() {
return identity != null ? identity.toBuilder() : null;
}
public final void setIdentity(Identity.BuilderImpl identity) {
this.identity = identity != null ? identity.build() : null;
}
@Override
public final Builder identity(Identity identity) {
this.identity = identity;
return this;
}
public final String getStatus() {
return status;
}
public final void setStatus(String status) {
this.status = status;
}
@Override
public final Builder status(String status) {
this.status = status;
return this;
}
@Override
public final Builder status(ClusterStatus status) {
this.status(status == null ? null : status.toString());
return this;
}
public final Certificate.Builder getCertificateAuthority() {
return certificateAuthority != null ? certificateAuthority.toBuilder() : null;
}
public final void setCertificateAuthority(Certificate.BuilderImpl certificateAuthority) {
this.certificateAuthority = certificateAuthority != null ? certificateAuthority.build() : null;
}
@Override
public final Builder certificateAuthority(Certificate certificateAuthority) {
this.certificateAuthority = certificateAuthority;
return this;
}
public final String getClientRequestToken() {
return clientRequestToken;
}
public final void setClientRequestToken(String clientRequestToken) {
this.clientRequestToken = clientRequestToken;
}
@Override
public final Builder clientRequestToken(String clientRequestToken) {
this.clientRequestToken = clientRequestToken;
return this;
}
public final String getPlatformVersion() {
return platformVersion;
}
public final void setPlatformVersion(String platformVersion) {
this.platformVersion = platformVersion;
}
@Override
public final Builder platformVersion(String platformVersion) {
this.platformVersion = platformVersion;
return this;
}
public final Map getTags() {
if (tags instanceof SdkAutoConstructMap) {
return null;
}
return tags;
}
public final void setTags(Map tags) {
this.tags = TagMapCopier.copy(tags);
}
@Override
public final Builder tags(Map tags) {
this.tags = TagMapCopier.copy(tags);
return this;
}
public final List getEncryptionConfig() {
List result = EncryptionConfigListCopier.copyToBuilder(this.encryptionConfig);
if (result instanceof SdkAutoConstructList) {
return null;
}
return result;
}
public final void setEncryptionConfig(Collection encryptionConfig) {
this.encryptionConfig = EncryptionConfigListCopier.copyFromBuilder(encryptionConfig);
}
@Override
public final Builder encryptionConfig(Collection encryptionConfig) {
this.encryptionConfig = EncryptionConfigListCopier.copy(encryptionConfig);
return this;
}
@Override
@SafeVarargs
public final Builder encryptionConfig(EncryptionConfig... encryptionConfig) {
encryptionConfig(Arrays.asList(encryptionConfig));
return this;
}
@Override
@SafeVarargs
public final Builder encryptionConfig(Consumer... encryptionConfig) {
encryptionConfig(Stream.of(encryptionConfig).map(c -> EncryptionConfig.builder().applyMutation(c).build())
.collect(Collectors.toList()));
return this;
}
public final ConnectorConfigResponse.Builder getConnectorConfig() {
return connectorConfig != null ? connectorConfig.toBuilder() : null;
}
public final void setConnectorConfig(ConnectorConfigResponse.BuilderImpl connectorConfig) {
this.connectorConfig = connectorConfig != null ? connectorConfig.build() : null;
}
@Override
public final Builder connectorConfig(ConnectorConfigResponse connectorConfig) {
this.connectorConfig = connectorConfig;
return this;
}
public final String getId() {
return id;
}
public final void setId(String id) {
this.id = id;
}
@Override
public final Builder id(String id) {
this.id = id;
return this;
}
public final ClusterHealth.Builder getHealth() {
return health != null ? health.toBuilder() : null;
}
public final void setHealth(ClusterHealth.BuilderImpl health) {
this.health = health != null ? health.build() : null;
}
@Override
public final Builder health(ClusterHealth health) {
this.health = health;
return this;
}
public final OutpostConfigResponse.Builder getOutpostConfig() {
return outpostConfig != null ? outpostConfig.toBuilder() : null;
}
public final void setOutpostConfig(OutpostConfigResponse.BuilderImpl outpostConfig) {
this.outpostConfig = outpostConfig != null ? outpostConfig.build() : null;
}
@Override
public final Builder outpostConfig(OutpostConfigResponse outpostConfig) {
this.outpostConfig = outpostConfig;
return this;
}
public final AccessConfigResponse.Builder getAccessConfig() {
return accessConfig != null ? accessConfig.toBuilder() : null;
}
public final void setAccessConfig(AccessConfigResponse.BuilderImpl accessConfig) {
this.accessConfig = accessConfig != null ? accessConfig.build() : null;
}
@Override
public final Builder accessConfig(AccessConfigResponse accessConfig) {
this.accessConfig = accessConfig;
return this;
}
@Override
public Cluster build() {
return new Cluster(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}