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

software.amazon.awssdk.services.databrew.model.Recipe Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Data Brew module holds the client classes that are used for communicating with Data Brew.

There is a newer version: 2.29.15
Show newest version
/*
 * 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.databrew.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;

/**
 * 

* Represents one or more actions to be performed on a DataBrew dataset. *

*/ @Generated("software.amazon.awssdk:codegen") public final class Recipe implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField CREATED_BY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CreatedBy").getter(getter(Recipe::createdBy)).setter(setter(Builder::createdBy)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedBy").build()).build(); private static final SdkField CREATE_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreateDate").getter(getter(Recipe::createDate)).setter(setter(Builder::createDate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreateDate").build()).build(); private static final SdkField LAST_MODIFIED_BY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LastModifiedBy").getter(getter(Recipe::lastModifiedBy)).setter(setter(Builder::lastModifiedBy)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedBy").build()).build(); private static final SdkField LAST_MODIFIED_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("LastModifiedDate").getter(getter(Recipe::lastModifiedDate)).setter(setter(Builder::lastModifiedDate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LastModifiedDate").build()).build(); private static final SdkField PROJECT_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ProjectName").getter(getter(Recipe::projectName)).setter(setter(Builder::projectName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ProjectName").build()).build(); private static final SdkField PUBLISHED_BY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("PublishedBy").getter(getter(Recipe::publishedBy)).setter(setter(Builder::publishedBy)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PublishedBy").build()).build(); private static final SdkField PUBLISHED_DATE_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("PublishedDate").getter(getter(Recipe::publishedDate)).setter(setter(Builder::publishedDate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PublishedDate").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Description").getter(getter(Recipe::description)).setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build(); private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name") .getter(getter(Recipe::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build(); private static final SdkField RESOURCE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ResourceArn").getter(getter(Recipe::resourceArn)).setter(setter(Builder::resourceArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ResourceArn").build()).build(); private static final SdkField> STEPS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Steps") .getter(getter(Recipe::steps)) .setter(setter(Builder::steps)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Steps").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(RecipeStep::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.MAP) .memberName("Tags") .getter(getter(Recipe::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 RECIPE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("RecipeVersion").getter(getter(Recipe::recipeVersion)).setter(setter(Builder::recipeVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("RecipeVersion").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(CREATED_BY_FIELD, CREATE_DATE_FIELD, LAST_MODIFIED_BY_FIELD, LAST_MODIFIED_DATE_FIELD, PROJECT_NAME_FIELD, PUBLISHED_BY_FIELD, PUBLISHED_DATE_FIELD, DESCRIPTION_FIELD, NAME_FIELD, RESOURCE_ARN_FIELD, STEPS_FIELD, TAGS_FIELD, RECIPE_VERSION_FIELD)); private static final long serialVersionUID = 1L; private final String createdBy; private final Instant createDate; private final String lastModifiedBy; private final Instant lastModifiedDate; private final String projectName; private final String publishedBy; private final Instant publishedDate; private final String description; private final String name; private final String resourceArn; private final List steps; private final Map tags; private final String recipeVersion; private Recipe(BuilderImpl builder) { this.createdBy = builder.createdBy; this.createDate = builder.createDate; this.lastModifiedBy = builder.lastModifiedBy; this.lastModifiedDate = builder.lastModifiedDate; this.projectName = builder.projectName; this.publishedBy = builder.publishedBy; this.publishedDate = builder.publishedDate; this.description = builder.description; this.name = builder.name; this.resourceArn = builder.resourceArn; this.steps = builder.steps; this.tags = builder.tags; this.recipeVersion = builder.recipeVersion; } /** *

* The Amazon Resource Name (ARN) of the user who created the recipe. *

* * @return The Amazon Resource Name (ARN) of the user who created the recipe. */ public final String createdBy() { return createdBy; } /** *

* The date and time that the recipe was created. *

* * @return The date and time that the recipe was created. */ public final Instant createDate() { return createDate; } /** *

* The Amazon Resource Name (ARN) of the user who last modified the recipe. *

* * @return The Amazon Resource Name (ARN) of the user who last modified the recipe. */ public final String lastModifiedBy() { return lastModifiedBy; } /** *

* The last modification date and time of the recipe. *

* * @return The last modification date and time of the recipe. */ public final Instant lastModifiedDate() { return lastModifiedDate; } /** *

* The name of the project that the recipe is associated with. *

* * @return The name of the project that the recipe is associated with. */ public final String projectName() { return projectName; } /** *

* The Amazon Resource Name (ARN) of the user who published the recipe. *

* * @return The Amazon Resource Name (ARN) of the user who published the recipe. */ public final String publishedBy() { return publishedBy; } /** *

* The date and time when the recipe was published. *

* * @return The date and time when the recipe was published. */ public final Instant publishedDate() { return publishedDate; } /** *

* The description of the recipe. *

* * @return The description of the recipe. */ public final String description() { return description; } /** *

* The unique name for the recipe. *

* * @return The unique name for the recipe. */ public final String name() { return name; } /** *

* The Amazon Resource Name (ARN) for the recipe. *

* * @return The Amazon Resource Name (ARN) for the recipe. */ public final String resourceArn() { return resourceArn; } /** * For responses, this returns true if the service returned a value for the Steps 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 hasSteps() { return steps != null && !(steps instanceof SdkAutoConstructList); } /** *

* A list of steps that are defined by the recipe. *

*

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

* * @return A list of steps that are defined by the recipe. */ public final List steps() { return steps; } /** * 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 tags that have been applied to the recipe. *

*

* 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 tags that have been applied to the recipe. */ public final Map tags() { return tags; } /** *

* The identifier for the version for the recipe. Must be one of the following: *

*
    *
  • *

    * Numeric version (X.Y) - X and Y stand for major and minor version numbers. * The maximum length of each is 6 digits, and neither can be negative values. Both X and * Y are required, and "0.0" isn't a valid version. *

    *
  • *
  • *

    * LATEST_WORKING - the most recent valid version being developed in a DataBrew project. *

    *
  • *
  • *

    * LATEST_PUBLISHED - the most recent published version. *

    *
  • *
* * @return The identifier for the version for the recipe. Must be one of the following:

*
    *
  • *

    * Numeric version (X.Y) - X and Y stand for major and minor version * numbers. The maximum length of each is 6 digits, and neither can be negative values. Both X * and Y are required, and "0.0" isn't a valid version. *

    *
  • *
  • *

    * LATEST_WORKING - the most recent valid version being developed in a DataBrew project. *

    *
  • *
  • *

    * LATEST_PUBLISHED - the most recent published version. *

    *
  • */ public final String recipeVersion() { return recipeVersion; } @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(createdBy()); hashCode = 31 * hashCode + Objects.hashCode(createDate()); hashCode = 31 * hashCode + Objects.hashCode(lastModifiedBy()); hashCode = 31 * hashCode + Objects.hashCode(lastModifiedDate()); hashCode = 31 * hashCode + Objects.hashCode(projectName()); hashCode = 31 * hashCode + Objects.hashCode(publishedBy()); hashCode = 31 * hashCode + Objects.hashCode(publishedDate()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(resourceArn()); hashCode = 31 * hashCode + Objects.hashCode(hasSteps() ? steps() : null); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(recipeVersion()); 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 Recipe)) { return false; } Recipe other = (Recipe) obj; return Objects.equals(createdBy(), other.createdBy()) && Objects.equals(createDate(), other.createDate()) && Objects.equals(lastModifiedBy(), other.lastModifiedBy()) && Objects.equals(lastModifiedDate(), other.lastModifiedDate()) && Objects.equals(projectName(), other.projectName()) && Objects.equals(publishedBy(), other.publishedBy()) && Objects.equals(publishedDate(), other.publishedDate()) && Objects.equals(description(), other.description()) && Objects.equals(name(), other.name()) && Objects.equals(resourceArn(), other.resourceArn()) && hasSteps() == other.hasSteps() && Objects.equals(steps(), other.steps()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && Objects.equals(recipeVersion(), other.recipeVersion()); } /** * 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("Recipe").add("CreatedBy", createdBy()).add("CreateDate", createDate()) .add("LastModifiedBy", lastModifiedBy()).add("LastModifiedDate", lastModifiedDate()) .add("ProjectName", projectName()).add("PublishedBy", publishedBy()).add("PublishedDate", publishedDate()) .add("Description", description()).add("Name", name()).add("ResourceArn", resourceArn()) .add("Steps", hasSteps() ? steps() : null).add("Tags", hasTags() ? tags() : null) .add("RecipeVersion", recipeVersion()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "CreatedBy": return Optional.ofNullable(clazz.cast(createdBy())); case "CreateDate": return Optional.ofNullable(clazz.cast(createDate())); case "LastModifiedBy": return Optional.ofNullable(clazz.cast(lastModifiedBy())); case "LastModifiedDate": return Optional.ofNullable(clazz.cast(lastModifiedDate())); case "ProjectName": return Optional.ofNullable(clazz.cast(projectName())); case "PublishedBy": return Optional.ofNullable(clazz.cast(publishedBy())); case "PublishedDate": return Optional.ofNullable(clazz.cast(publishedDate())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "Name": return Optional.ofNullable(clazz.cast(name())); case "ResourceArn": return Optional.ofNullable(clazz.cast(resourceArn())); case "Steps": return Optional.ofNullable(clazz.cast(steps())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "RecipeVersion": return Optional.ofNullable(clazz.cast(recipeVersion())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Recipe) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

    * The Amazon Resource Name (ARN) of the user who created the recipe. *

    * * @param createdBy * The Amazon Resource Name (ARN) of the user who created the recipe. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdBy(String createdBy); /** *

    * The date and time that the recipe was created. *

    * * @param createDate * The date and time that the recipe was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createDate(Instant createDate); /** *

    * The Amazon Resource Name (ARN) of the user who last modified the recipe. *

    * * @param lastModifiedBy * The Amazon Resource Name (ARN) of the user who last modified the recipe. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastModifiedBy(String lastModifiedBy); /** *

    * The last modification date and time of the recipe. *

    * * @param lastModifiedDate * The last modification date and time of the recipe. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastModifiedDate(Instant lastModifiedDate); /** *

    * The name of the project that the recipe is associated with. *

    * * @param projectName * The name of the project that the recipe is associated with. * @return Returns a reference to this object so that method calls can be chained together. */ Builder projectName(String projectName); /** *

    * The Amazon Resource Name (ARN) of the user who published the recipe. *

    * * @param publishedBy * The Amazon Resource Name (ARN) of the user who published the recipe. * @return Returns a reference to this object so that method calls can be chained together. */ Builder publishedBy(String publishedBy); /** *

    * The date and time when the recipe was published. *

    * * @param publishedDate * The date and time when the recipe was published. * @return Returns a reference to this object so that method calls can be chained together. */ Builder publishedDate(Instant publishedDate); /** *

    * The description of the recipe. *

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

    * The unique name for the recipe. *

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

    * The Amazon Resource Name (ARN) for the recipe. *

    * * @param resourceArn * The Amazon Resource Name (ARN) for the recipe. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceArn(String resourceArn); /** *

    * A list of steps that are defined by the recipe. *

    * * @param steps * A list of steps that are defined by the recipe. * @return Returns a reference to this object so that method calls can be chained together. */ Builder steps(Collection steps); /** *

    * A list of steps that are defined by the recipe. *

    * * @param steps * A list of steps that are defined by the recipe. * @return Returns a reference to this object so that method calls can be chained together. */ Builder steps(RecipeStep... steps); /** *

    * A list of steps that are defined by the recipe. *

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

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

    * Metadata tags that have been applied to the recipe. *

    * * @param tags * Metadata tags that have been applied to the recipe. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Map tags); /** *

    * The identifier for the version for the recipe. Must be one of the following: *

    *
      *
    • *

      * Numeric version (X.Y) - X and Y stand for major and minor version * numbers. The maximum length of each is 6 digits, and neither can be negative values. Both X and * Y are required, and "0.0" isn't a valid version. *

      *
    • *
    • *

      * LATEST_WORKING - the most recent valid version being developed in a DataBrew project. *

      *
    • *
    • *

      * LATEST_PUBLISHED - the most recent published version. *

      *
    • *
    * * @param recipeVersion * The identifier for the version for the recipe. Must be one of the following:

    *
      *
    • *

      * Numeric version (X.Y) - X and Y stand for major and minor * version numbers. The maximum length of each is 6 digits, and neither can be negative values. Both * X and Y are required, and "0.0" isn't a valid version. *

      *
    • *
    • *

      * LATEST_WORKING - the most recent valid version being developed in a DataBrew project. *

      *
    • *
    • *

      * LATEST_PUBLISHED - the most recent published version. *

      *
    • * @return Returns a reference to this object so that method calls can be chained together. */ Builder recipeVersion(String recipeVersion); } static final class BuilderImpl implements Builder { private String createdBy; private Instant createDate; private String lastModifiedBy; private Instant lastModifiedDate; private String projectName; private String publishedBy; private Instant publishedDate; private String description; private String name; private String resourceArn; private List steps = DefaultSdkAutoConstructList.getInstance(); private Map tags = DefaultSdkAutoConstructMap.getInstance(); private String recipeVersion; private BuilderImpl() { } private BuilderImpl(Recipe model) { createdBy(model.createdBy); createDate(model.createDate); lastModifiedBy(model.lastModifiedBy); lastModifiedDate(model.lastModifiedDate); projectName(model.projectName); publishedBy(model.publishedBy); publishedDate(model.publishedDate); description(model.description); name(model.name); resourceArn(model.resourceArn); steps(model.steps); tags(model.tags); recipeVersion(model.recipeVersion); } public final String getCreatedBy() { return createdBy; } public final void setCreatedBy(String createdBy) { this.createdBy = createdBy; } @Override public final Builder createdBy(String createdBy) { this.createdBy = createdBy; return this; } public final Instant getCreateDate() { return createDate; } public final void setCreateDate(Instant createDate) { this.createDate = createDate; } @Override public final Builder createDate(Instant createDate) { this.createDate = createDate; return this; } public final String getLastModifiedBy() { return lastModifiedBy; } public final void setLastModifiedBy(String lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; } @Override public final Builder lastModifiedBy(String lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; return this; } public final Instant getLastModifiedDate() { return lastModifiedDate; } public final void setLastModifiedDate(Instant lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } @Override public final Builder lastModifiedDate(Instant lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; return this; } public final String getProjectName() { return projectName; } public final void setProjectName(String projectName) { this.projectName = projectName; } @Override public final Builder projectName(String projectName) { this.projectName = projectName; return this; } public final String getPublishedBy() { return publishedBy; } public final void setPublishedBy(String publishedBy) { this.publishedBy = publishedBy; } @Override public final Builder publishedBy(String publishedBy) { this.publishedBy = publishedBy; return this; } public final Instant getPublishedDate() { return publishedDate; } public final void setPublishedDate(Instant publishedDate) { this.publishedDate = publishedDate; } @Override public final Builder publishedDate(Instant publishedDate) { this.publishedDate = publishedDate; return this; } public final String getDescription() { return description; } public final void setDescription(String description) { this.description = description; } @Override public final Builder description(String description) { this.description = description; return this; } 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 getResourceArn() { return resourceArn; } public final void setResourceArn(String resourceArn) { this.resourceArn = resourceArn; } @Override public final Builder resourceArn(String resourceArn) { this.resourceArn = resourceArn; return this; } public final List getSteps() { List result = RecipeStepListCopier.copyToBuilder(this.steps); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setSteps(Collection steps) { this.steps = RecipeStepListCopier.copyFromBuilder(steps); } @Override public final Builder steps(Collection steps) { this.steps = RecipeStepListCopier.copy(steps); return this; } @Override @SafeVarargs public final Builder steps(RecipeStep... steps) { steps(Arrays.asList(steps)); return this; } @Override @SafeVarargs public final Builder steps(Consumer... steps) { steps(Stream.of(steps).map(c -> RecipeStep.builder().applyMutation(c).build()).collect(Collectors.toList())); 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 getRecipeVersion() { return recipeVersion; } public final void setRecipeVersion(String recipeVersion) { this.recipeVersion = recipeVersion; } @Override public final Builder recipeVersion(String recipeVersion) { this.recipeVersion = recipeVersion; return this; } @Override public Recipe build() { return new Recipe(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy