All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.eks.model.Addon Maven / Gradle / Ivy

/*
 * 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.HashMap;
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 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 Amazon EKS add-on. For more information, see Amazon EKS add-ons in the Amazon EKS * User Guide. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Addon implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ADDON_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("addonName").getter(getter(Addon::addonName)).setter(setter(Builder::addonName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("addonName").build()).build(); private static final SdkField CLUSTER_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("clusterName").getter(getter(Addon::clusterName)).setter(setter(Builder::clusterName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("clusterName").build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status") .getter(getter(Addon::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build(); private static final SdkField ADDON_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("addonVersion").getter(getter(Addon::addonVersion)).setter(setter(Builder::addonVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("addonVersion").build()).build(); private static final SdkField HEALTH_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("health").getter(getter(Addon::health)).setter(setter(Builder::health)).constructor(AddonHealth::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("health").build()).build(); private static final SdkField ADDON_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("addonArn").getter(getter(Addon::addonArn)).setter(setter(Builder::addonArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("addonArn").build()).build(); private static final SdkField CREATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("createdAt").getter(getter(Addon::createdAt)).setter(setter(Builder::createdAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdAt").build()).build(); private static final SdkField MODIFIED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("modifiedAt").getter(getter(Addon::modifiedAt)).setter(setter(Builder::modifiedAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("modifiedAt").build()).build(); private static final SdkField SERVICE_ACCOUNT_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("serviceAccountRoleArn").getter(getter(Addon::serviceAccountRoleArn)) .setter(setter(Builder::serviceAccountRoleArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("serviceAccountRoleArn").build()) .build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("tags") .getter(getter(Addon::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 PUBLISHER_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("publisher").getter(getter(Addon::publisher)).setter(setter(Builder::publisher)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("publisher").build()).build(); private static final SdkField OWNER_FIELD = SdkField. builder(MarshallingType.STRING).memberName("owner") .getter(getter(Addon::owner)).setter(setter(Builder::owner)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("owner").build()).build(); private static final SdkField MARKETPLACE_INFORMATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("marketplaceInformation") .getter(getter(Addon::marketplaceInformation)).setter(setter(Builder::marketplaceInformation)) .constructor(MarketplaceInformation::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("marketplaceInformation").build()) .build(); private static final SdkField CONFIGURATION_VALUES_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("configurationValues").getter(getter(Addon::configurationValues)) .setter(setter(Builder::configurationValues)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("configurationValues").build()) .build(); private static final SdkField> POD_IDENTITY_ASSOCIATIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("podIdentityAssociations") .getter(getter(Addon::podIdentityAssociations)) .setter(setter(Builder::podIdentityAssociations)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("podIdentityAssociations").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ADDON_NAME_FIELD, CLUSTER_NAME_FIELD, STATUS_FIELD, ADDON_VERSION_FIELD, HEALTH_FIELD, ADDON_ARN_FIELD, CREATED_AT_FIELD, MODIFIED_AT_FIELD, SERVICE_ACCOUNT_ROLE_ARN_FIELD, TAGS_FIELD, PUBLISHER_FIELD, OWNER_FIELD, MARKETPLACE_INFORMATION_FIELD, CONFIGURATION_VALUES_FIELD, POD_IDENTITY_ASSOCIATIONS_FIELD)); private static final Map> SDK_NAME_TO_FIELD = memberNameToFieldInitializer(); private static final long serialVersionUID = 1L; private final String addonName; private final String clusterName; private final String status; private final String addonVersion; private final AddonHealth health; private final String addonArn; private final Instant createdAt; private final Instant modifiedAt; private final String serviceAccountRoleArn; private final Map tags; private final String publisher; private final String owner; private final MarketplaceInformation marketplaceInformation; private final String configurationValues; private final List podIdentityAssociations; private Addon(BuilderImpl builder) { this.addonName = builder.addonName; this.clusterName = builder.clusterName; this.status = builder.status; this.addonVersion = builder.addonVersion; this.health = builder.health; this.addonArn = builder.addonArn; this.createdAt = builder.createdAt; this.modifiedAt = builder.modifiedAt; this.serviceAccountRoleArn = builder.serviceAccountRoleArn; this.tags = builder.tags; this.publisher = builder.publisher; this.owner = builder.owner; this.marketplaceInformation = builder.marketplaceInformation; this.configurationValues = builder.configurationValues; this.podIdentityAssociations = builder.podIdentityAssociations; } /** *

* The name of the add-on. *

* * @return The name of the add-on. */ public final String addonName() { return addonName; } /** *

* The name of your cluster. *

* * @return The name of your cluster. */ public final String clusterName() { return clusterName; } /** *

* The status of the add-on. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link AddonStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #statusAsString}. *

* * @return The status of the add-on. * @see AddonStatus */ public final AddonStatus status() { return AddonStatus.fromValue(status); } /** *

* The status of the add-on. *

*

* If the service returns an enum value that is not available in the current SDK version, {@link #status} will * return {@link AddonStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #statusAsString}. *

* * @return The status of the add-on. * @see AddonStatus */ public final String statusAsString() { return status; } /** *

* The version of the add-on. *

* * @return The version of the add-on. */ public final String addonVersion() { return addonVersion; } /** *

* An object that represents the health of the add-on. *

* * @return An object that represents the health of the add-on. */ public final AddonHealth health() { return health; } /** *

* The Amazon Resource Name (ARN) of the add-on. *

* * @return The Amazon Resource Name (ARN) of the add-on. */ public final String addonArn() { return addonArn; } /** *

* The Unix epoch timestamp at object creation. *

* * @return The Unix epoch timestamp at object creation. */ public final Instant createdAt() { return createdAt; } /** *

* The Unix epoch timestamp for the last modification to the object. *

* * @return The Unix epoch timestamp for the last modification to the object. */ public final Instant modifiedAt() { return modifiedAt; } /** *

* The Amazon Resource Name (ARN) of the IAM role that's bound to the Kubernetes ServiceAccount object * that the add-on uses. *

* * @return The Amazon Resource Name (ARN) of the IAM role that's bound to the Kubernetes ServiceAccount * object that the add-on uses. */ public final String serviceAccountRoleArn() { return serviceAccountRoleArn; } /** * 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; } /** *

* The publisher of the add-on. *

* * @return The publisher of the add-on. */ public final String publisher() { return publisher; } /** *

* The owner of the add-on. *

* * @return The owner of the add-on. */ public final String owner() { return owner; } /** *

* Information about an Amazon EKS add-on from the Amazon Web Services Marketplace. *

* * @return Information about an Amazon EKS add-on from the Amazon Web Services Marketplace. */ public final MarketplaceInformation marketplaceInformation() { return marketplaceInformation; } /** *

* The configuration values that you provided. *

* * @return The configuration values that you provided. */ public final String configurationValues() { return configurationValues; } /** * For responses, this returns true if the service returned a value for the PodIdentityAssociations 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 hasPodIdentityAssociations() { return podIdentityAssociations != null && !(podIdentityAssociations instanceof SdkAutoConstructList); } /** *

* An array of Pod Identity Assocations owned by the Addon. Each EKS Pod Identity association maps a role to a * service account in a namespace in the cluster. *

*

* For more information, see Attach an * IAM Role to an Amazon EKS add-on using Pod Identity in the EKS User Guide. *

*

* 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 #hasPodIdentityAssociations} method. *

* * @return An array of Pod Identity Assocations owned by the Addon. Each EKS Pod Identity association maps a role to * a service account in a namespace in the cluster.

*

* For more information, see Attach an IAM Role to an Amazon * EKS add-on using Pod Identity in the EKS User Guide. */ public final List podIdentityAssociations() { return podIdentityAssociations; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(addonName()); hashCode = 31 * hashCode + Objects.hashCode(clusterName()); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(addonVersion()); hashCode = 31 * hashCode + Objects.hashCode(health()); hashCode = 31 * hashCode + Objects.hashCode(addonArn()); hashCode = 31 * hashCode + Objects.hashCode(createdAt()); hashCode = 31 * hashCode + Objects.hashCode(modifiedAt()); hashCode = 31 * hashCode + Objects.hashCode(serviceAccountRoleArn()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(publisher()); hashCode = 31 * hashCode + Objects.hashCode(owner()); hashCode = 31 * hashCode + Objects.hashCode(marketplaceInformation()); hashCode = 31 * hashCode + Objects.hashCode(configurationValues()); hashCode = 31 * hashCode + Objects.hashCode(hasPodIdentityAssociations() ? podIdentityAssociations() : null); 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 Addon)) { return false; } Addon other = (Addon) obj; return Objects.equals(addonName(), other.addonName()) && Objects.equals(clusterName(), other.clusterName()) && Objects.equals(statusAsString(), other.statusAsString()) && Objects.equals(addonVersion(), other.addonVersion()) && Objects.equals(health(), other.health()) && Objects.equals(addonArn(), other.addonArn()) && Objects.equals(createdAt(), other.createdAt()) && Objects.equals(modifiedAt(), other.modifiedAt()) && Objects.equals(serviceAccountRoleArn(), other.serviceAccountRoleArn()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(publisher(), other.publisher()) && Objects.equals(owner(), other.owner()) && Objects.equals(marketplaceInformation(), other.marketplaceInformation()) && Objects.equals(configurationValues(), other.configurationValues()) && hasPodIdentityAssociations() == other.hasPodIdentityAssociations() && Objects.equals(podIdentityAssociations(), other.podIdentityAssociations()); } /** * 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("Addon").add("AddonName", addonName()).add("ClusterName", clusterName()) .add("Status", statusAsString()).add("AddonVersion", addonVersion()).add("Health", health()) .add("AddonArn", addonArn()).add("CreatedAt", createdAt()).add("ModifiedAt", modifiedAt()) .add("ServiceAccountRoleArn", serviceAccountRoleArn()).add("Tags", hasTags() ? tags() : null) .add("Publisher", publisher()).add("Owner", owner()).add("MarketplaceInformation", marketplaceInformation()) .add("ConfigurationValues", configurationValues()) .add("PodIdentityAssociations", hasPodIdentityAssociations() ? podIdentityAssociations() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "addonName": return Optional.ofNullable(clazz.cast(addonName())); case "clusterName": return Optional.ofNullable(clazz.cast(clusterName())); case "status": return Optional.ofNullable(clazz.cast(statusAsString())); case "addonVersion": return Optional.ofNullable(clazz.cast(addonVersion())); case "health": return Optional.ofNullable(clazz.cast(health())); case "addonArn": return Optional.ofNullable(clazz.cast(addonArn())); case "createdAt": return Optional.ofNullable(clazz.cast(createdAt())); case "modifiedAt": return Optional.ofNullable(clazz.cast(modifiedAt())); case "serviceAccountRoleArn": return Optional.ofNullable(clazz.cast(serviceAccountRoleArn())); case "tags": return Optional.ofNullable(clazz.cast(tags())); case "publisher": return Optional.ofNullable(clazz.cast(publisher())); case "owner": return Optional.ofNullable(clazz.cast(owner())); case "marketplaceInformation": return Optional.ofNullable(clazz.cast(marketplaceInformation())); case "configurationValues": return Optional.ofNullable(clazz.cast(configurationValues())); case "podIdentityAssociations": return Optional.ofNullable(clazz.cast(podIdentityAssociations())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Map> memberNameToFieldInitializer() { Map> map = new HashMap<>(); map.put("addonName", ADDON_NAME_FIELD); map.put("clusterName", CLUSTER_NAME_FIELD); map.put("status", STATUS_FIELD); map.put("addonVersion", ADDON_VERSION_FIELD); map.put("health", HEALTH_FIELD); map.put("addonArn", ADDON_ARN_FIELD); map.put("createdAt", CREATED_AT_FIELD); map.put("modifiedAt", MODIFIED_AT_FIELD); map.put("serviceAccountRoleArn", SERVICE_ACCOUNT_ROLE_ARN_FIELD); map.put("tags", TAGS_FIELD); map.put("publisher", PUBLISHER_FIELD); map.put("owner", OWNER_FIELD); map.put("marketplaceInformation", MARKETPLACE_INFORMATION_FIELD); map.put("configurationValues", CONFIGURATION_VALUES_FIELD); map.put("podIdentityAssociations", POD_IDENTITY_ASSOCIATIONS_FIELD); return Collections.unmodifiableMap(map); } private static Function getter(Function g) { return obj -> g.apply((Addon) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The name of the add-on. *

* * @param addonName * The name of the add-on. * @return Returns a reference to this object so that method calls can be chained together. */ Builder addonName(String addonName); /** *

* The name of your cluster. *

* * @param clusterName * The name of your cluster. * @return Returns a reference to this object so that method calls can be chained together. */ Builder clusterName(String clusterName); /** *

* The status of the add-on. *

* * @param status * The status of the add-on. * @see AddonStatus * @return Returns a reference to this object so that method calls can be chained together. * @see AddonStatus */ Builder status(String status); /** *

* The status of the add-on. *

* * @param status * The status of the add-on. * @see AddonStatus * @return Returns a reference to this object so that method calls can be chained together. * @see AddonStatus */ Builder status(AddonStatus status); /** *

* The version of the add-on. *

* * @param addonVersion * The version of the add-on. * @return Returns a reference to this object so that method calls can be chained together. */ Builder addonVersion(String addonVersion); /** *

* An object that represents the health of the add-on. *

* * @param health * An object that represents the health of the add-on. * @return Returns a reference to this object so that method calls can be chained together. */ Builder health(AddonHealth health); /** *

* An object that represents the health of the add-on. *

* This is a convenience method that creates an instance of the {@link AddonHealth.Builder} avoiding the need to * create one manually via {@link AddonHealth#builder()}. * *

* When the {@link Consumer} completes, {@link AddonHealth.Builder#build()} is called immediately and its result * is passed to {@link #health(AddonHealth)}. * * @param health * a consumer that will call methods on {@link AddonHealth.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #health(AddonHealth) */ default Builder health(Consumer health) { return health(AddonHealth.builder().applyMutation(health).build()); } /** *

* The Amazon Resource Name (ARN) of the add-on. *

* * @param addonArn * The Amazon Resource Name (ARN) of the add-on. * @return Returns a reference to this object so that method calls can be chained together. */ Builder addonArn(String addonArn); /** *

* 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 Unix epoch timestamp for the last modification to the object. *

* * @param modifiedAt * The Unix epoch timestamp for the last modification to the object. * @return Returns a reference to this object so that method calls can be chained together. */ Builder modifiedAt(Instant modifiedAt); /** *

* The Amazon Resource Name (ARN) of the IAM role that's bound to the Kubernetes ServiceAccount * object that the add-on uses. *

* * @param serviceAccountRoleArn * The Amazon Resource Name (ARN) of the IAM role that's bound to the Kubernetes * ServiceAccount object that the add-on uses. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceAccountRoleArn(String serviceAccountRoleArn); /** *

* 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 publisher of the add-on. *

* * @param publisher * The publisher of the add-on. * @return Returns a reference to this object so that method calls can be chained together. */ Builder publisher(String publisher); /** *

* The owner of the add-on. *

* * @param owner * The owner of the add-on. * @return Returns a reference to this object so that method calls can be chained together. */ Builder owner(String owner); /** *

* Information about an Amazon EKS add-on from the Amazon Web Services Marketplace. *

* * @param marketplaceInformation * Information about an Amazon EKS add-on from the Amazon Web Services Marketplace. * @return Returns a reference to this object so that method calls can be chained together. */ Builder marketplaceInformation(MarketplaceInformation marketplaceInformation); /** *

* Information about an Amazon EKS add-on from the Amazon Web Services Marketplace. *

* This is a convenience method that creates an instance of the {@link MarketplaceInformation.Builder} avoiding * the need to create one manually via {@link MarketplaceInformation#builder()}. * *

* When the {@link Consumer} completes, {@link MarketplaceInformation.Builder#build()} is called immediately and * its result is passed to {@link #marketplaceInformation(MarketplaceInformation)}. * * @param marketplaceInformation * a consumer that will call methods on {@link MarketplaceInformation.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #marketplaceInformation(MarketplaceInformation) */ default Builder marketplaceInformation(Consumer marketplaceInformation) { return marketplaceInformation(MarketplaceInformation.builder().applyMutation(marketplaceInformation).build()); } /** *

* The configuration values that you provided. *

* * @param configurationValues * The configuration values that you provided. * @return Returns a reference to this object so that method calls can be chained together. */ Builder configurationValues(String configurationValues); /** *

* An array of Pod Identity Assocations owned by the Addon. Each EKS Pod Identity association maps a role to a * service account in a namespace in the cluster. *

*

* For more information, see Attach * an IAM Role to an Amazon EKS add-on using Pod Identity in the EKS User Guide. *

* * @param podIdentityAssociations * An array of Pod Identity Assocations owned by the Addon. Each EKS Pod Identity association maps a role * to a service account in a namespace in the cluster.

*

* For more information, see Attach an IAM Role to an * Amazon EKS add-on using Pod Identity in the EKS User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder podIdentityAssociations(Collection podIdentityAssociations); /** *

* An array of Pod Identity Assocations owned by the Addon. Each EKS Pod Identity association maps a role to a * service account in a namespace in the cluster. *

*

* For more information, see Attach * an IAM Role to an Amazon EKS add-on using Pod Identity in the EKS User Guide. *

* * @param podIdentityAssociations * An array of Pod Identity Assocations owned by the Addon. Each EKS Pod Identity association maps a role * to a service account in a namespace in the cluster.

*

* For more information, see Attach an IAM Role to an * Amazon EKS add-on using Pod Identity in the EKS User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder podIdentityAssociations(String... podIdentityAssociations); } static final class BuilderImpl implements Builder { private String addonName; private String clusterName; private String status; private String addonVersion; private AddonHealth health; private String addonArn; private Instant createdAt; private Instant modifiedAt; private String serviceAccountRoleArn; private Map tags = DefaultSdkAutoConstructMap.getInstance(); private String publisher; private String owner; private MarketplaceInformation marketplaceInformation; private String configurationValues; private List podIdentityAssociations = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(Addon model) { addonName(model.addonName); clusterName(model.clusterName); status(model.status); addonVersion(model.addonVersion); health(model.health); addonArn(model.addonArn); createdAt(model.createdAt); modifiedAt(model.modifiedAt); serviceAccountRoleArn(model.serviceAccountRoleArn); tags(model.tags); publisher(model.publisher); owner(model.owner); marketplaceInformation(model.marketplaceInformation); configurationValues(model.configurationValues); podIdentityAssociations(model.podIdentityAssociations); } public final String getAddonName() { return addonName; } public final void setAddonName(String addonName) { this.addonName = addonName; } @Override public final Builder addonName(String addonName) { this.addonName = addonName; return this; } public final String getClusterName() { return clusterName; } public final void setClusterName(String clusterName) { this.clusterName = clusterName; } @Override public final Builder clusterName(String clusterName) { this.clusterName = clusterName; 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(AddonStatus status) { this.status(status == null ? null : status.toString()); return this; } public final String getAddonVersion() { return addonVersion; } public final void setAddonVersion(String addonVersion) { this.addonVersion = addonVersion; } @Override public final Builder addonVersion(String addonVersion) { this.addonVersion = addonVersion; return this; } public final AddonHealth.Builder getHealth() { return health != null ? health.toBuilder() : null; } public final void setHealth(AddonHealth.BuilderImpl health) { this.health = health != null ? health.build() : null; } @Override public final Builder health(AddonHealth health) { this.health = health; return this; } public final String getAddonArn() { return addonArn; } public final void setAddonArn(String addonArn) { this.addonArn = addonArn; } @Override public final Builder addonArn(String addonArn) { this.addonArn = addonArn; 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 Instant getModifiedAt() { return modifiedAt; } public final void setModifiedAt(Instant modifiedAt) { this.modifiedAt = modifiedAt; } @Override public final Builder modifiedAt(Instant modifiedAt) { this.modifiedAt = modifiedAt; return this; } public final String getServiceAccountRoleArn() { return serviceAccountRoleArn; } public final void setServiceAccountRoleArn(String serviceAccountRoleArn) { this.serviceAccountRoleArn = serviceAccountRoleArn; } @Override public final Builder serviceAccountRoleArn(String serviceAccountRoleArn) { this.serviceAccountRoleArn = serviceAccountRoleArn; 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 String getPublisher() { return publisher; } public final void setPublisher(String publisher) { this.publisher = publisher; } @Override public final Builder publisher(String publisher) { this.publisher = publisher; return this; } public final String getOwner() { return owner; } public final void setOwner(String owner) { this.owner = owner; } @Override public final Builder owner(String owner) { this.owner = owner; return this; } public final MarketplaceInformation.Builder getMarketplaceInformation() { return marketplaceInformation != null ? marketplaceInformation.toBuilder() : null; } public final void setMarketplaceInformation(MarketplaceInformation.BuilderImpl marketplaceInformation) { this.marketplaceInformation = marketplaceInformation != null ? marketplaceInformation.build() : null; } @Override public final Builder marketplaceInformation(MarketplaceInformation marketplaceInformation) { this.marketplaceInformation = marketplaceInformation; return this; } public final String getConfigurationValues() { return configurationValues; } public final void setConfigurationValues(String configurationValues) { this.configurationValues = configurationValues; } @Override public final Builder configurationValues(String configurationValues) { this.configurationValues = configurationValues; return this; } public final Collection getPodIdentityAssociations() { if (podIdentityAssociations instanceof SdkAutoConstructList) { return null; } return podIdentityAssociations; } public final void setPodIdentityAssociations(Collection podIdentityAssociations) { this.podIdentityAssociations = StringListCopier.copy(podIdentityAssociations); } @Override public final Builder podIdentityAssociations(Collection podIdentityAssociations) { this.podIdentityAssociations = StringListCopier.copy(podIdentityAssociations); return this; } @Override @SafeVarargs public final Builder podIdentityAssociations(String... podIdentityAssociations) { podIdentityAssociations(Arrays.asList(podIdentityAssociations)); return this; } @Override public Addon build() { return new Addon(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy