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

software.amazon.awssdk.services.eks.model.FargateProfile 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 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 Fargate profile. *

*/ @Generated("software.amazon.awssdk:codegen") public final class FargateProfile implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField FARGATE_PROFILE_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("fargateProfileName").getter(getter(FargateProfile::fargateProfileName)) .setter(setter(Builder::fargateProfileName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fargateProfileName").build()) .build(); private static final SdkField FARGATE_PROFILE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("fargateProfileArn").getter(getter(FargateProfile::fargateProfileArn)) .setter(setter(Builder::fargateProfileArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("fargateProfileArn").build()).build(); private static final SdkField CLUSTER_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("clusterName").getter(getter(FargateProfile::clusterName)).setter(setter(Builder::clusterName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("clusterName").build()).build(); private static final SdkField CREATED_AT_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("createdAt").getter(getter(FargateProfile::createdAt)).setter(setter(Builder::createdAt)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("createdAt").build()).build(); private static final SdkField POD_EXECUTION_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("podExecutionRoleArn").getter(getter(FargateProfile::podExecutionRoleArn)) .setter(setter(Builder::podExecutionRoleArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("podExecutionRoleArn").build()) .build(); private static final SdkField> SUBNETS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("subnets") .getter(getter(FargateProfile::subnets)) .setter(setter(Builder::subnets)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("subnets").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 SdkField> SELECTORS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("selectors") .getter(getter(FargateProfile::selectors)) .setter(setter(Builder::selectors)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("selectors").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(FargateProfileSelector::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status") .getter(getter(FargateProfile::statusAsString)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("tags") .getter(getter(FargateProfile::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 HEALTH_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("health").getter(getter(FargateProfile::health)) .setter(setter(Builder::health)).constructor(FargateProfileHealth::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("health").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(FARGATE_PROFILE_NAME_FIELD, FARGATE_PROFILE_ARN_FIELD, CLUSTER_NAME_FIELD, CREATED_AT_FIELD, POD_EXECUTION_ROLE_ARN_FIELD, SUBNETS_FIELD, SELECTORS_FIELD, STATUS_FIELD, TAGS_FIELD, HEALTH_FIELD)); private static final Map> SDK_NAME_TO_FIELD = Collections .unmodifiableMap(new HashMap>() { { put("fargateProfileName", FARGATE_PROFILE_NAME_FIELD); put("fargateProfileArn", FARGATE_PROFILE_ARN_FIELD); put("clusterName", CLUSTER_NAME_FIELD); put("createdAt", CREATED_AT_FIELD); put("podExecutionRoleArn", POD_EXECUTION_ROLE_ARN_FIELD); put("subnets", SUBNETS_FIELD); put("selectors", SELECTORS_FIELD); put("status", STATUS_FIELD); put("tags", TAGS_FIELD); put("health", HEALTH_FIELD); } }); private static final long serialVersionUID = 1L; private final String fargateProfileName; private final String fargateProfileArn; private final String clusterName; private final Instant createdAt; private final String podExecutionRoleArn; private final List subnets; private final List selectors; private final String status; private final Map tags; private final FargateProfileHealth health; private FargateProfile(BuilderImpl builder) { this.fargateProfileName = builder.fargateProfileName; this.fargateProfileArn = builder.fargateProfileArn; this.clusterName = builder.clusterName; this.createdAt = builder.createdAt; this.podExecutionRoleArn = builder.podExecutionRoleArn; this.subnets = builder.subnets; this.selectors = builder.selectors; this.status = builder.status; this.tags = builder.tags; this.health = builder.health; } /** *

* The name of the Fargate profile. *

* * @return The name of the Fargate profile. */ public final String fargateProfileName() { return fargateProfileName; } /** *

* The full Amazon Resource Name (ARN) of the Fargate profile. *

* * @return The full Amazon Resource Name (ARN) of the Fargate profile. */ public final String fargateProfileArn() { return fargateProfileArn; } /** *

* The name of your cluster. *

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

* The Unix epoch timestamp at object creation. *

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

* The Amazon Resource Name (ARN) of the Pod execution role to use for any Pod that * matches the selectors in the Fargate profile. For more information, see Pod execution * role in the Amazon EKS User Guide. *

* * @return The Amazon Resource Name (ARN) of the Pod execution role to use for any Pod * that matches the selectors in the Fargate profile. For more information, see Pod * execution role in the Amazon EKS User Guide. */ public final String podExecutionRoleArn() { return podExecutionRoleArn; } /** * For responses, this returns true if the service returned a value for the Subnets 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 hasSubnets() { return subnets != null && !(subnets instanceof SdkAutoConstructList); } /** *

* The IDs of subnets to launch a Pod into. *

*

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

* * @return The IDs of subnets to launch a Pod into. */ public final List subnets() { return subnets; } /** * For responses, this returns true if the service returned a value for the Selectors 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 hasSelectors() { return selectors != null && !(selectors instanceof SdkAutoConstructList); } /** *

* The selectors to match for a Pod to use this Fargate profile. *

*

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

* * @return The selectors to match for a Pod to use this Fargate profile. */ public final List selectors() { return selectors; } /** *

* The current status of the Fargate profile. *

*

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

* * @return The current status of the Fargate profile. * @see FargateProfileStatus */ public final FargateProfileStatus status() { return FargateProfileStatus.fromValue(status); } /** *

* The current status of the Fargate profile. *

*

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

* * @return The current status of the Fargate profile. * @see FargateProfileStatus */ public final String statusAsString() { return status; } /** * 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 health status of the Fargate profile. If there are issues with your Fargate profile's health, they are listed * here. *

* * @return The health status of the Fargate profile. If there are issues with your Fargate profile's health, they * are listed here. */ public final FargateProfileHealth health() { return health; } @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(fargateProfileName()); hashCode = 31 * hashCode + Objects.hashCode(fargateProfileArn()); hashCode = 31 * hashCode + Objects.hashCode(clusterName()); hashCode = 31 * hashCode + Objects.hashCode(createdAt()); hashCode = 31 * hashCode + Objects.hashCode(podExecutionRoleArn()); hashCode = 31 * hashCode + Objects.hashCode(hasSubnets() ? subnets() : null); hashCode = 31 * hashCode + Objects.hashCode(hasSelectors() ? selectors() : null); hashCode = 31 * hashCode + Objects.hashCode(statusAsString()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(health()); 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 FargateProfile)) { return false; } FargateProfile other = (FargateProfile) obj; return Objects.equals(fargateProfileName(), other.fargateProfileName()) && Objects.equals(fargateProfileArn(), other.fargateProfileArn()) && Objects.equals(clusterName(), other.clusterName()) && Objects.equals(createdAt(), other.createdAt()) && Objects.equals(podExecutionRoleArn(), other.podExecutionRoleArn()) && hasSubnets() == other.hasSubnets() && Objects.equals(subnets(), other.subnets()) && hasSelectors() == other.hasSelectors() && Objects.equals(selectors(), other.selectors()) && Objects.equals(statusAsString(), other.statusAsString()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(health(), other.health()); } /** * 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("FargateProfile").add("FargateProfileName", fargateProfileName()) .add("FargateProfileArn", fargateProfileArn()).add("ClusterName", clusterName()).add("CreatedAt", createdAt()) .add("PodExecutionRoleArn", podExecutionRoleArn()).add("Subnets", hasSubnets() ? subnets() : null) .add("Selectors", hasSelectors() ? selectors() : null).add("Status", statusAsString()) .add("Tags", hasTags() ? tags() : null).add("Health", health()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "fargateProfileName": return Optional.ofNullable(clazz.cast(fargateProfileName())); case "fargateProfileArn": return Optional.ofNullable(clazz.cast(fargateProfileArn())); case "clusterName": return Optional.ofNullable(clazz.cast(clusterName())); case "createdAt": return Optional.ofNullable(clazz.cast(createdAt())); case "podExecutionRoleArn": return Optional.ofNullable(clazz.cast(podExecutionRoleArn())); case "subnets": return Optional.ofNullable(clazz.cast(subnets())); case "selectors": return Optional.ofNullable(clazz.cast(selectors())); case "status": return Optional.ofNullable(clazz.cast(statusAsString())); case "tags": return Optional.ofNullable(clazz.cast(tags())); case "health": return Optional.ofNullable(clazz.cast(health())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } @Override public final Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } private static Function getter(Function g) { return obj -> g.apply((FargateProfile) 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 Fargate profile. *

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

* The full Amazon Resource Name (ARN) of the Fargate profile. *

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

* 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 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 Amazon Resource Name (ARN) of the Pod execution role to use for any Pod that * matches the selectors in the Fargate profile. For more information, see Pod execution * role in the Amazon EKS User Guide. *

* * @param podExecutionRoleArn * The Amazon Resource Name (ARN) of the Pod execution role to use for any Pod * that matches the selectors in the Fargate profile. For more information, see Pod * execution role in the Amazon EKS User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder podExecutionRoleArn(String podExecutionRoleArn); /** *

* The IDs of subnets to launch a Pod into. *

* * @param subnets * The IDs of subnets to launch a Pod into. * @return Returns a reference to this object so that method calls can be chained together. */ Builder subnets(Collection subnets); /** *

* The IDs of subnets to launch a Pod into. *

* * @param subnets * The IDs of subnets to launch a Pod into. * @return Returns a reference to this object so that method calls can be chained together. */ Builder subnets(String... subnets); /** *

* The selectors to match for a Pod to use this Fargate profile. *

* * @param selectors * The selectors to match for a Pod to use this Fargate profile. * @return Returns a reference to this object so that method calls can be chained together. */ Builder selectors(Collection selectors); /** *

* The selectors to match for a Pod to use this Fargate profile. *

* * @param selectors * The selectors to match for a Pod to use this Fargate profile. * @return Returns a reference to this object so that method calls can be chained together. */ Builder selectors(FargateProfileSelector... selectors); /** *

* The selectors to match for a Pod to use this Fargate profile. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.eks.model.FargateProfileSelector.Builder} avoiding the need to create * one manually via {@link software.amazon.awssdk.services.eks.model.FargateProfileSelector#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.eks.model.FargateProfileSelector.Builder#build()} is called * immediately and its result is passed to {@link #selectors(List)}. * * @param selectors * a consumer that will call methods on * {@link software.amazon.awssdk.services.eks.model.FargateProfileSelector.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #selectors(java.util.Collection) */ Builder selectors(Consumer... selectors); /** *

* The current status of the Fargate profile. *

* * @param status * The current status of the Fargate profile. * @see FargateProfileStatus * @return Returns a reference to this object so that method calls can be chained together. * @see FargateProfileStatus */ Builder status(String status); /** *

* The current status of the Fargate profile. *

* * @param status * The current status of the Fargate profile. * @see FargateProfileStatus * @return Returns a reference to this object so that method calls can be chained together. * @see FargateProfileStatus */ Builder status(FargateProfileStatus status); /** *

* 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 health status of the Fargate profile. If there are issues with your Fargate profile's health, they are * listed here. *

* * @param health * The health status of the Fargate profile. If there are issues with your Fargate profile's health, they * are listed here. * @return Returns a reference to this object so that method calls can be chained together. */ Builder health(FargateProfileHealth health); /** *

* The health status of the Fargate profile. If there are issues with your Fargate profile's health, they are * listed here. *

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

* When the {@link Consumer} completes, {@link FargateProfileHealth.Builder#build()} is called immediately and * its result is passed to {@link #health(FargateProfileHealth)}. * * @param health * a consumer that will call methods on {@link FargateProfileHealth.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #health(FargateProfileHealth) */ default Builder health(Consumer health) { return health(FargateProfileHealth.builder().applyMutation(health).build()); } } static final class BuilderImpl implements Builder { private String fargateProfileName; private String fargateProfileArn; private String clusterName; private Instant createdAt; private String podExecutionRoleArn; private List subnets = DefaultSdkAutoConstructList.getInstance(); private List selectors = DefaultSdkAutoConstructList.getInstance(); private String status; private Map tags = DefaultSdkAutoConstructMap.getInstance(); private FargateProfileHealth health; private BuilderImpl() { } private BuilderImpl(FargateProfile model) { fargateProfileName(model.fargateProfileName); fargateProfileArn(model.fargateProfileArn); clusterName(model.clusterName); createdAt(model.createdAt); podExecutionRoleArn(model.podExecutionRoleArn); subnets(model.subnets); selectors(model.selectors); status(model.status); tags(model.tags); health(model.health); } public final String getFargateProfileName() { return fargateProfileName; } public final void setFargateProfileName(String fargateProfileName) { this.fargateProfileName = fargateProfileName; } @Override public final Builder fargateProfileName(String fargateProfileName) { this.fargateProfileName = fargateProfileName; return this; } public final String getFargateProfileArn() { return fargateProfileArn; } public final void setFargateProfileArn(String fargateProfileArn) { this.fargateProfileArn = fargateProfileArn; } @Override public final Builder fargateProfileArn(String fargateProfileArn) { this.fargateProfileArn = fargateProfileArn; 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 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 getPodExecutionRoleArn() { return podExecutionRoleArn; } public final void setPodExecutionRoleArn(String podExecutionRoleArn) { this.podExecutionRoleArn = podExecutionRoleArn; } @Override public final Builder podExecutionRoleArn(String podExecutionRoleArn) { this.podExecutionRoleArn = podExecutionRoleArn; return this; } public final Collection getSubnets() { if (subnets instanceof SdkAutoConstructList) { return null; } return subnets; } public final void setSubnets(Collection subnets) { this.subnets = StringListCopier.copy(subnets); } @Override public final Builder subnets(Collection subnets) { this.subnets = StringListCopier.copy(subnets); return this; } @Override @SafeVarargs public final Builder subnets(String... subnets) { subnets(Arrays.asList(subnets)); return this; } public final List getSelectors() { List result = FargateProfileSelectorsCopier.copyToBuilder(this.selectors); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setSelectors(Collection selectors) { this.selectors = FargateProfileSelectorsCopier.copyFromBuilder(selectors); } @Override public final Builder selectors(Collection selectors) { this.selectors = FargateProfileSelectorsCopier.copy(selectors); return this; } @Override @SafeVarargs public final Builder selectors(FargateProfileSelector... selectors) { selectors(Arrays.asList(selectors)); return this; } @Override @SafeVarargs public final Builder selectors(Consumer... selectors) { selectors(Stream.of(selectors).map(c -> FargateProfileSelector.builder().applyMutation(c).build()) .collect(Collectors.toList())); 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(FargateProfileStatus status) { this.status(status == null ? null : status.toString()); 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 FargateProfileHealth.Builder getHealth() { return health != null ? health.toBuilder() : null; } public final void setHealth(FargateProfileHealth.BuilderImpl health) { this.health = health != null ? health.build() : null; } @Override public final Builder health(FargateProfileHealth health) { this.health = health; return this; } @Override public FargateProfile build() { return new FargateProfile(this); } @Override public List> sdkFields() { return SDK_FIELDS; } @Override public Map> sdkFieldNameToField() { return SDK_NAME_TO_FIELD; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy