Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
software.amazon.awssdk.services.imagebuilder.model.ImagePipeline 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.imagebuilder.model;
import java.io.Serializable;
import java.util.Arrays;
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 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.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
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;
/**
*
* Details of an image pipeline.
*
*/
@Generated("software.amazon.awssdk:codegen")
public final class ImagePipeline implements SdkPojo, Serializable, ToCopyableBuilder {
private static final SdkField ARN_FIELD = SdkField. builder(MarshallingType.STRING).memberName("arn")
.getter(getter(ImagePipeline::arn)).setter(setter(Builder::arn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("arn").build()).build();
private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("name")
.getter(getter(ImagePipeline::name)).setter(setter(Builder::name))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build();
private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("description").getter(getter(ImagePipeline::description)).setter(setter(Builder::description))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("description").build()).build();
private static final SdkField PLATFORM_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("platform").getter(getter(ImagePipeline::platformAsString)).setter(setter(Builder::platform))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("platform").build()).build();
private static final SdkField ENHANCED_IMAGE_METADATA_ENABLED_FIELD = SdkField
. builder(MarshallingType.BOOLEAN)
.memberName("enhancedImageMetadataEnabled")
.getter(getter(ImagePipeline::enhancedImageMetadataEnabled))
.setter(setter(Builder::enhancedImageMetadataEnabled))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("enhancedImageMetadataEnabled")
.build()).build();
private static final SdkField IMAGE_RECIPE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("imageRecipeArn").getter(getter(ImagePipeline::imageRecipeArn)).setter(setter(Builder::imageRecipeArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("imageRecipeArn").build()).build();
private static final SdkField CONTAINER_RECIPE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("containerRecipeArn").getter(getter(ImagePipeline::containerRecipeArn))
.setter(setter(Builder::containerRecipeArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("containerRecipeArn").build())
.build();
private static final SdkField INFRASTRUCTURE_CONFIGURATION_ARN_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("infrastructureConfigurationArn")
.getter(getter(ImagePipeline::infrastructureConfigurationArn))
.setter(setter(Builder::infrastructureConfigurationArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("infrastructureConfigurationArn")
.build()).build();
private static final SdkField DISTRIBUTION_CONFIGURATION_ARN_FIELD = SdkField
. builder(MarshallingType.STRING)
.memberName("distributionConfigurationArn")
.getter(getter(ImagePipeline::distributionConfigurationArn))
.setter(setter(Builder::distributionConfigurationArn))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("distributionConfigurationArn")
.build()).build();
private static final SdkField IMAGE_TESTS_CONFIGURATION_FIELD = SdkField
. builder(MarshallingType.SDK_POJO).memberName("imageTestsConfiguration")
.getter(getter(ImagePipeline::imageTestsConfiguration)).setter(setter(Builder::imageTestsConfiguration))
.constructor(ImageTestsConfiguration::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("imageTestsConfiguration").build())
.build();
private static final SdkField SCHEDULE_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
.memberName("schedule").getter(getter(ImagePipeline::schedule)).setter(setter(Builder::schedule))
.constructor(Schedule::builder)
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("schedule").build()).build();
private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("status")
.getter(getter(ImagePipeline::statusAsString)).setter(setter(Builder::status))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("status").build()).build();
private static final SdkField DATE_CREATED_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("dateCreated").getter(getter(ImagePipeline::dateCreated)).setter(setter(Builder::dateCreated))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dateCreated").build()).build();
private static final SdkField DATE_UPDATED_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("dateUpdated").getter(getter(ImagePipeline::dateUpdated)).setter(setter(Builder::dateUpdated))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dateUpdated").build()).build();
private static final SdkField DATE_LAST_RUN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("dateLastRun").getter(getter(ImagePipeline::dateLastRun)).setter(setter(Builder::dateLastRun))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dateLastRun").build()).build();
private static final SdkField DATE_NEXT_RUN_FIELD = SdkField. builder(MarshallingType.STRING)
.memberName("dateNextRun").getter(getter(ImagePipeline::dateNextRun)).setter(setter(Builder::dateNextRun))
.traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dateNextRun").build()).build();
private static final SdkField> TAGS_FIELD = SdkField
.> builder(MarshallingType.MAP)
.memberName("tags")
.getter(getter(ImagePipeline::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 List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ARN_FIELD, NAME_FIELD,
DESCRIPTION_FIELD, PLATFORM_FIELD, ENHANCED_IMAGE_METADATA_ENABLED_FIELD, IMAGE_RECIPE_ARN_FIELD,
CONTAINER_RECIPE_ARN_FIELD, INFRASTRUCTURE_CONFIGURATION_ARN_FIELD, DISTRIBUTION_CONFIGURATION_ARN_FIELD,
IMAGE_TESTS_CONFIGURATION_FIELD, SCHEDULE_FIELD, STATUS_FIELD, DATE_CREATED_FIELD, DATE_UPDATED_FIELD,
DATE_LAST_RUN_FIELD, DATE_NEXT_RUN_FIELD, TAGS_FIELD));
private static final long serialVersionUID = 1L;
private final String arn;
private final String name;
private final String description;
private final String platform;
private final Boolean enhancedImageMetadataEnabled;
private final String imageRecipeArn;
private final String containerRecipeArn;
private final String infrastructureConfigurationArn;
private final String distributionConfigurationArn;
private final ImageTestsConfiguration imageTestsConfiguration;
private final Schedule schedule;
private final String status;
private final String dateCreated;
private final String dateUpdated;
private final String dateLastRun;
private final String dateNextRun;
private final Map tags;
private ImagePipeline(BuilderImpl builder) {
this.arn = builder.arn;
this.name = builder.name;
this.description = builder.description;
this.platform = builder.platform;
this.enhancedImageMetadataEnabled = builder.enhancedImageMetadataEnabled;
this.imageRecipeArn = builder.imageRecipeArn;
this.containerRecipeArn = builder.containerRecipeArn;
this.infrastructureConfigurationArn = builder.infrastructureConfigurationArn;
this.distributionConfigurationArn = builder.distributionConfigurationArn;
this.imageTestsConfiguration = builder.imageTestsConfiguration;
this.schedule = builder.schedule;
this.status = builder.status;
this.dateCreated = builder.dateCreated;
this.dateUpdated = builder.dateUpdated;
this.dateLastRun = builder.dateLastRun;
this.dateNextRun = builder.dateNextRun;
this.tags = builder.tags;
}
/**
*
* The Amazon Resource Name (ARN) of the image pipeline.
*
*
* @return The Amazon Resource Name (ARN) of the image pipeline.
*/
public final String arn() {
return arn;
}
/**
*
* The name of the image pipeline.
*
*
* @return The name of the image pipeline.
*/
public final String name() {
return name;
}
/**
*
* The description of the image pipeline.
*
*
* @return The description of the image pipeline.
*/
public final String description() {
return description;
}
/**
*
* The platform of the image pipeline.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #platform} will
* return {@link Platform#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #platformAsString}.
*
*
* @return The platform of the image pipeline.
* @see Platform
*/
public final Platform platform() {
return Platform.fromValue(platform);
}
/**
*
* The platform of the image pipeline.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #platform} will
* return {@link Platform#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #platformAsString}.
*
*
* @return The platform of the image pipeline.
* @see Platform
*/
public final String platformAsString() {
return platform;
}
/**
*
* Collects additional information about the image being created, including the operating system (OS) version and
* package list. This information is used to enhance the overall experience of using EC2 Image Builder. Enabled by
* default.
*
*
* @return Collects additional information about the image being created, including the operating system (OS)
* version and package list. This information is used to enhance the overall experience of using EC2 Image
* Builder. Enabled by default.
*/
public final Boolean enhancedImageMetadataEnabled() {
return enhancedImageMetadataEnabled;
}
/**
*
* The Amazon Resource Name (ARN) of the image recipe associated with this image pipeline.
*
*
* @return The Amazon Resource Name (ARN) of the image recipe associated with this image pipeline.
*/
public final String imageRecipeArn() {
return imageRecipeArn;
}
/**
*
* The Amazon Resource Name (ARN) of the container recipe that is used for this pipeline.
*
*
* @return The Amazon Resource Name (ARN) of the container recipe that is used for this pipeline.
*/
public final String containerRecipeArn() {
return containerRecipeArn;
}
/**
*
* The Amazon Resource Name (ARN) of the infrastructure configuration associated with this image pipeline.
*
*
* @return The Amazon Resource Name (ARN) of the infrastructure configuration associated with this image pipeline.
*/
public final String infrastructureConfigurationArn() {
return infrastructureConfigurationArn;
}
/**
*
* The Amazon Resource Name (ARN) of the distribution configuration associated with this image pipeline.
*
*
* @return The Amazon Resource Name (ARN) of the distribution configuration associated with this image pipeline.
*/
public final String distributionConfigurationArn() {
return distributionConfigurationArn;
}
/**
*
* The image tests configuration of the image pipeline.
*
*
* @return The image tests configuration of the image pipeline.
*/
public final ImageTestsConfiguration imageTestsConfiguration() {
return imageTestsConfiguration;
}
/**
*
* The schedule of the image pipeline.
*
*
* @return The schedule of the image pipeline.
*/
public final Schedule schedule() {
return schedule;
}
/**
*
* The status of the image pipeline.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link PipelineStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #statusAsString}.
*
*
* @return The status of the image pipeline.
* @see PipelineStatus
*/
public final PipelineStatus status() {
return PipelineStatus.fromValue(status);
}
/**
*
* The status of the image pipeline.
*
*
* If the service returns an enum value that is not available in the current SDK version, {@link #status} will
* return {@link PipelineStatus#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from
* {@link #statusAsString}.
*
*
* @return The status of the image pipeline.
* @see PipelineStatus
*/
public final String statusAsString() {
return status;
}
/**
*
* The date on which this image pipeline was created.
*
*
* @return The date on which this image pipeline was created.
*/
public final String dateCreated() {
return dateCreated;
}
/**
*
* The date on which this image pipeline was last updated.
*
*
* @return The date on which this image pipeline was last updated.
*/
public final String dateUpdated() {
return dateUpdated;
}
/**
*
* The date on which this image pipeline was last run.
*
*
* @return The date on which this image pipeline was last run.
*/
public final String dateLastRun() {
return dateLastRun;
}
/**
*
* The date on which this image pipeline will next be run.
*
*
* @return The date on which this image pipeline will next be run.
*/
public final String dateNextRun() {
return dateNextRun;
}
/**
* 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);
}
/**
*
* The tags of this image pipeline.
*
*
* 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 The tags of this image pipeline.
*/
public final Map tags() {
return tags;
}
@Override
public Builder toBuilder() {
return new BuilderImpl(this);
}
public static Builder builder() {
return new BuilderImpl();
}
public static Class extends Builder> serializableBuilderClass() {
return BuilderImpl.class;
}
@Override
public final int hashCode() {
int hashCode = 1;
hashCode = 31 * hashCode + Objects.hashCode(arn());
hashCode = 31 * hashCode + Objects.hashCode(name());
hashCode = 31 * hashCode + Objects.hashCode(description());
hashCode = 31 * hashCode + Objects.hashCode(platformAsString());
hashCode = 31 * hashCode + Objects.hashCode(enhancedImageMetadataEnabled());
hashCode = 31 * hashCode + Objects.hashCode(imageRecipeArn());
hashCode = 31 * hashCode + Objects.hashCode(containerRecipeArn());
hashCode = 31 * hashCode + Objects.hashCode(infrastructureConfigurationArn());
hashCode = 31 * hashCode + Objects.hashCode(distributionConfigurationArn());
hashCode = 31 * hashCode + Objects.hashCode(imageTestsConfiguration());
hashCode = 31 * hashCode + Objects.hashCode(schedule());
hashCode = 31 * hashCode + Objects.hashCode(statusAsString());
hashCode = 31 * hashCode + Objects.hashCode(dateCreated());
hashCode = 31 * hashCode + Objects.hashCode(dateUpdated());
hashCode = 31 * hashCode + Objects.hashCode(dateLastRun());
hashCode = 31 * hashCode + Objects.hashCode(dateNextRun());
hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : 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 ImagePipeline)) {
return false;
}
ImagePipeline other = (ImagePipeline) obj;
return Objects.equals(arn(), other.arn()) && Objects.equals(name(), other.name())
&& Objects.equals(description(), other.description())
&& Objects.equals(platformAsString(), other.platformAsString())
&& Objects.equals(enhancedImageMetadataEnabled(), other.enhancedImageMetadataEnabled())
&& Objects.equals(imageRecipeArn(), other.imageRecipeArn())
&& Objects.equals(containerRecipeArn(), other.containerRecipeArn())
&& Objects.equals(infrastructureConfigurationArn(), other.infrastructureConfigurationArn())
&& Objects.equals(distributionConfigurationArn(), other.distributionConfigurationArn())
&& Objects.equals(imageTestsConfiguration(), other.imageTestsConfiguration())
&& Objects.equals(schedule(), other.schedule()) && Objects.equals(statusAsString(), other.statusAsString())
&& Objects.equals(dateCreated(), other.dateCreated()) && Objects.equals(dateUpdated(), other.dateUpdated())
&& Objects.equals(dateLastRun(), other.dateLastRun()) && Objects.equals(dateNextRun(), other.dateNextRun())
&& hasTags() == other.hasTags() && Objects.equals(tags(), other.tags());
}
/**
* 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("ImagePipeline").add("Arn", arn()).add("Name", name()).add("Description", description())
.add("Platform", platformAsString()).add("EnhancedImageMetadataEnabled", enhancedImageMetadataEnabled())
.add("ImageRecipeArn", imageRecipeArn()).add("ContainerRecipeArn", containerRecipeArn())
.add("InfrastructureConfigurationArn", infrastructureConfigurationArn())
.add("DistributionConfigurationArn", distributionConfigurationArn())
.add("ImageTestsConfiguration", imageTestsConfiguration()).add("Schedule", schedule())
.add("Status", statusAsString()).add("DateCreated", dateCreated()).add("DateUpdated", dateUpdated())
.add("DateLastRun", dateLastRun()).add("DateNextRun", dateNextRun()).add("Tags", hasTags() ? tags() : null)
.build();
}
public final Optional getValueForField(String fieldName, Class clazz) {
switch (fieldName) {
case "arn":
return Optional.ofNullable(clazz.cast(arn()));
case "name":
return Optional.ofNullable(clazz.cast(name()));
case "description":
return Optional.ofNullable(clazz.cast(description()));
case "platform":
return Optional.ofNullable(clazz.cast(platformAsString()));
case "enhancedImageMetadataEnabled":
return Optional.ofNullable(clazz.cast(enhancedImageMetadataEnabled()));
case "imageRecipeArn":
return Optional.ofNullable(clazz.cast(imageRecipeArn()));
case "containerRecipeArn":
return Optional.ofNullable(clazz.cast(containerRecipeArn()));
case "infrastructureConfigurationArn":
return Optional.ofNullable(clazz.cast(infrastructureConfigurationArn()));
case "distributionConfigurationArn":
return Optional.ofNullable(clazz.cast(distributionConfigurationArn()));
case "imageTestsConfiguration":
return Optional.ofNullable(clazz.cast(imageTestsConfiguration()));
case "schedule":
return Optional.ofNullable(clazz.cast(schedule()));
case "status":
return Optional.ofNullable(clazz.cast(statusAsString()));
case "dateCreated":
return Optional.ofNullable(clazz.cast(dateCreated()));
case "dateUpdated":
return Optional.ofNullable(clazz.cast(dateUpdated()));
case "dateLastRun":
return Optional.ofNullable(clazz.cast(dateLastRun()));
case "dateNextRun":
return Optional.ofNullable(clazz.cast(dateNextRun()));
case "tags":
return Optional.ofNullable(clazz.cast(tags()));
default:
return Optional.empty();
}
}
@Override
public final List> sdkFields() {
return SDK_FIELDS;
}
private static Function getter(Function g) {
return obj -> g.apply((ImagePipeline) 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 image pipeline.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the image pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder arn(String arn);
/**
*
* The name of the image pipeline.
*
*
* @param name
* The name of the image pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder name(String name);
/**
*
* The description of the image pipeline.
*
*
* @param description
* The description of the image pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder description(String description);
/**
*
* The platform of the image pipeline.
*
*
* @param platform
* The platform of the image pipeline.
* @see Platform
* @return Returns a reference to this object so that method calls can be chained together.
* @see Platform
*/
Builder platform(String platform);
/**
*
* The platform of the image pipeline.
*
*
* @param platform
* The platform of the image pipeline.
* @see Platform
* @return Returns a reference to this object so that method calls can be chained together.
* @see Platform
*/
Builder platform(Platform platform);
/**
*
* Collects additional information about the image being created, including the operating system (OS) version
* and package list. This information is used to enhance the overall experience of using EC2 Image Builder.
* Enabled by default.
*
*
* @param enhancedImageMetadataEnabled
* Collects additional information about the image being created, including the operating system (OS)
* version and package list. This information is used to enhance the overall experience of using EC2
* Image Builder. Enabled by default.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder enhancedImageMetadataEnabled(Boolean enhancedImageMetadataEnabled);
/**
*
* The Amazon Resource Name (ARN) of the image recipe associated with this image pipeline.
*
*
* @param imageRecipeArn
* The Amazon Resource Name (ARN) of the image recipe associated with this image pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder imageRecipeArn(String imageRecipeArn);
/**
*
* The Amazon Resource Name (ARN) of the container recipe that is used for this pipeline.
*
*
* @param containerRecipeArn
* The Amazon Resource Name (ARN) of the container recipe that is used for this pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder containerRecipeArn(String containerRecipeArn);
/**
*
* The Amazon Resource Name (ARN) of the infrastructure configuration associated with this image pipeline.
*
*
* @param infrastructureConfigurationArn
* The Amazon Resource Name (ARN) of the infrastructure configuration associated with this image
* pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder infrastructureConfigurationArn(String infrastructureConfigurationArn);
/**
*
* The Amazon Resource Name (ARN) of the distribution configuration associated with this image pipeline.
*
*
* @param distributionConfigurationArn
* The Amazon Resource Name (ARN) of the distribution configuration associated with this image pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder distributionConfigurationArn(String distributionConfigurationArn);
/**
*
* The image tests configuration of the image pipeline.
*
*
* @param imageTestsConfiguration
* The image tests configuration of the image pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder imageTestsConfiguration(ImageTestsConfiguration imageTestsConfiguration);
/**
*
* The image tests configuration of the image pipeline.
*
* This is a convenience method that creates an instance of the {@link ImageTestsConfiguration.Builder} avoiding
* the need to create one manually via {@link ImageTestsConfiguration#builder()}.
*
* When the {@link Consumer} completes, {@link ImageTestsConfiguration.Builder#build()} is called immediately
* and its result is passed to {@link #imageTestsConfiguration(ImageTestsConfiguration)}.
*
* @param imageTestsConfiguration
* a consumer that will call methods on {@link ImageTestsConfiguration.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #imageTestsConfiguration(ImageTestsConfiguration)
*/
default Builder imageTestsConfiguration(Consumer imageTestsConfiguration) {
return imageTestsConfiguration(ImageTestsConfiguration.builder().applyMutation(imageTestsConfiguration).build());
}
/**
*
* The schedule of the image pipeline.
*
*
* @param schedule
* The schedule of the image pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder schedule(Schedule schedule);
/**
*
* The schedule of the image pipeline.
*
* This is a convenience method that creates an instance of the {@link Schedule.Builder} avoiding the need to
* create one manually via {@link Schedule#builder()}.
*
* When the {@link Consumer} completes, {@link Schedule.Builder#build()} is called immediately and its result is
* passed to {@link #schedule(Schedule)}.
*
* @param schedule
* a consumer that will call methods on {@link Schedule.Builder}
* @return Returns a reference to this object so that method calls can be chained together.
* @see #schedule(Schedule)
*/
default Builder schedule(Consumer schedule) {
return schedule(Schedule.builder().applyMutation(schedule).build());
}
/**
*
* The status of the image pipeline.
*
*
* @param status
* The status of the image pipeline.
* @see PipelineStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see PipelineStatus
*/
Builder status(String status);
/**
*
* The status of the image pipeline.
*
*
* @param status
* The status of the image pipeline.
* @see PipelineStatus
* @return Returns a reference to this object so that method calls can be chained together.
* @see PipelineStatus
*/
Builder status(PipelineStatus status);
/**
*
* The date on which this image pipeline was created.
*
*
* @param dateCreated
* The date on which this image pipeline was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder dateCreated(String dateCreated);
/**
*
* The date on which this image pipeline was last updated.
*
*
* @param dateUpdated
* The date on which this image pipeline was last updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder dateUpdated(String dateUpdated);
/**
*
* The date on which this image pipeline was last run.
*
*
* @param dateLastRun
* The date on which this image pipeline was last run.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder dateLastRun(String dateLastRun);
/**
*
* The date on which this image pipeline will next be run.
*
*
* @param dateNextRun
* The date on which this image pipeline will next be run.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder dateNextRun(String dateNextRun);
/**
*
* The tags of this image pipeline.
*
*
* @param tags
* The tags of this image pipeline.
* @return Returns a reference to this object so that method calls can be chained together.
*/
Builder tags(Map tags);
}
static final class BuilderImpl implements Builder {
private String arn;
private String name;
private String description;
private String platform;
private Boolean enhancedImageMetadataEnabled;
private String imageRecipeArn;
private String containerRecipeArn;
private String infrastructureConfigurationArn;
private String distributionConfigurationArn;
private ImageTestsConfiguration imageTestsConfiguration;
private Schedule schedule;
private String status;
private String dateCreated;
private String dateUpdated;
private String dateLastRun;
private String dateNextRun;
private Map tags = DefaultSdkAutoConstructMap.getInstance();
private BuilderImpl() {
}
private BuilderImpl(ImagePipeline model) {
arn(model.arn);
name(model.name);
description(model.description);
platform(model.platform);
enhancedImageMetadataEnabled(model.enhancedImageMetadataEnabled);
imageRecipeArn(model.imageRecipeArn);
containerRecipeArn(model.containerRecipeArn);
infrastructureConfigurationArn(model.infrastructureConfigurationArn);
distributionConfigurationArn(model.distributionConfigurationArn);
imageTestsConfiguration(model.imageTestsConfiguration);
schedule(model.schedule);
status(model.status);
dateCreated(model.dateCreated);
dateUpdated(model.dateUpdated);
dateLastRun(model.dateLastRun);
dateNextRun(model.dateNextRun);
tags(model.tags);
}
public final String getArn() {
return arn;
}
public final void setArn(String arn) {
this.arn = arn;
}
@Override
public final Builder arn(String arn) {
this.arn = arn;
return this;
}
public final 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 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 getPlatform() {
return platform;
}
public final void setPlatform(String platform) {
this.platform = platform;
}
@Override
public final Builder platform(String platform) {
this.platform = platform;
return this;
}
@Override
public final Builder platform(Platform platform) {
this.platform(platform == null ? null : platform.toString());
return this;
}
public final Boolean getEnhancedImageMetadataEnabled() {
return enhancedImageMetadataEnabled;
}
public final void setEnhancedImageMetadataEnabled(Boolean enhancedImageMetadataEnabled) {
this.enhancedImageMetadataEnabled = enhancedImageMetadataEnabled;
}
@Override
public final Builder enhancedImageMetadataEnabled(Boolean enhancedImageMetadataEnabled) {
this.enhancedImageMetadataEnabled = enhancedImageMetadataEnabled;
return this;
}
public final String getImageRecipeArn() {
return imageRecipeArn;
}
public final void setImageRecipeArn(String imageRecipeArn) {
this.imageRecipeArn = imageRecipeArn;
}
@Override
public final Builder imageRecipeArn(String imageRecipeArn) {
this.imageRecipeArn = imageRecipeArn;
return this;
}
public final String getContainerRecipeArn() {
return containerRecipeArn;
}
public final void setContainerRecipeArn(String containerRecipeArn) {
this.containerRecipeArn = containerRecipeArn;
}
@Override
public final Builder containerRecipeArn(String containerRecipeArn) {
this.containerRecipeArn = containerRecipeArn;
return this;
}
public final String getInfrastructureConfigurationArn() {
return infrastructureConfigurationArn;
}
public final void setInfrastructureConfigurationArn(String infrastructureConfigurationArn) {
this.infrastructureConfigurationArn = infrastructureConfigurationArn;
}
@Override
public final Builder infrastructureConfigurationArn(String infrastructureConfigurationArn) {
this.infrastructureConfigurationArn = infrastructureConfigurationArn;
return this;
}
public final String getDistributionConfigurationArn() {
return distributionConfigurationArn;
}
public final void setDistributionConfigurationArn(String distributionConfigurationArn) {
this.distributionConfigurationArn = distributionConfigurationArn;
}
@Override
public final Builder distributionConfigurationArn(String distributionConfigurationArn) {
this.distributionConfigurationArn = distributionConfigurationArn;
return this;
}
public final ImageTestsConfiguration.Builder getImageTestsConfiguration() {
return imageTestsConfiguration != null ? imageTestsConfiguration.toBuilder() : null;
}
public final void setImageTestsConfiguration(ImageTestsConfiguration.BuilderImpl imageTestsConfiguration) {
this.imageTestsConfiguration = imageTestsConfiguration != null ? imageTestsConfiguration.build() : null;
}
@Override
public final Builder imageTestsConfiguration(ImageTestsConfiguration imageTestsConfiguration) {
this.imageTestsConfiguration = imageTestsConfiguration;
return this;
}
public final Schedule.Builder getSchedule() {
return schedule != null ? schedule.toBuilder() : null;
}
public final void setSchedule(Schedule.BuilderImpl schedule) {
this.schedule = schedule != null ? schedule.build() : null;
}
@Override
public final Builder schedule(Schedule schedule) {
this.schedule = schedule;
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(PipelineStatus status) {
this.status(status == null ? null : status.toString());
return this;
}
public final String getDateCreated() {
return dateCreated;
}
public final void setDateCreated(String dateCreated) {
this.dateCreated = dateCreated;
}
@Override
public final Builder dateCreated(String dateCreated) {
this.dateCreated = dateCreated;
return this;
}
public final String getDateUpdated() {
return dateUpdated;
}
public final void setDateUpdated(String dateUpdated) {
this.dateUpdated = dateUpdated;
}
@Override
public final Builder dateUpdated(String dateUpdated) {
this.dateUpdated = dateUpdated;
return this;
}
public final String getDateLastRun() {
return dateLastRun;
}
public final void setDateLastRun(String dateLastRun) {
this.dateLastRun = dateLastRun;
}
@Override
public final Builder dateLastRun(String dateLastRun) {
this.dateLastRun = dateLastRun;
return this;
}
public final String getDateNextRun() {
return dateNextRun;
}
public final void setDateNextRun(String dateNextRun) {
this.dateNextRun = dateNextRun;
}
@Override
public final Builder dateNextRun(String dateNextRun) {
this.dateNextRun = dateNextRun;
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;
}
@Override
public ImagePipeline build() {
return new ImagePipeline(this);
}
@Override
public List> sdkFields() {
return SDK_FIELDS;
}
}
}