
com.amazonaws.services.imagebuilder.model.ContainerRecipe Maven / Gradle / Ivy
/*
* Copyright 2019-2024 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 com.amazonaws.services.imagebuilder.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* A container recipe.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ContainerRecipe implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) of the container recipe.
*
*
*
* Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that
* object as follows:
*
*
* -
*
* Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off
* entirely, or they are specified as wildcards, for example: x.x.x.
*
*
* -
*
* Version ARNs have only the first three nodes: <major>.<minor>.<patch>
*
*
* -
*
* Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.
*
*
*
*
*/
private String arn;
/**
*
* Specifies the type of container, such as Docker.
*
*/
private String containerType;
/**
*
* The name of the container recipe.
*
*/
private String name;
/**
*
* The description of the container recipe.
*
*/
private String description;
/**
*
* The system platform for the container, such as Windows or Linux.
*
*/
private String platform;
/**
*
* The owner of the container recipe.
*
*/
private String owner;
/**
*
* The semantic version of the container recipe.
*
*
*
* The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign
* values for the first three, and can filter on all of them.
*
*
* Assignment: For the first three nodes you can assign any positive integer value, including zero, with an
* upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the
* fourth node.
*
*
* Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that
* you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as
* 2021.01.01.
*
*
* Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most
* recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in
* any node, all nodes to the right of the first wildcard must also be wildcards.
*
*
*/
private String version;
/**
*
* Build and test components that are included in the container recipe. Recipes require a minimum of one build
* component, and can have a maximum of 20 build and test components in any combination.
*
*/
private java.util.List components;
/**
*
* A group of options that can be used to configure an instance for building and testing container images.
*
*/
private InstanceConfiguration instanceConfiguration;
/**
*
* Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all of the
* elements required by the application running inside. The template data consists of contextual variables where
* Image Builder places build information or scripts, based on your container image recipe.
*
*/
private String dockerfileTemplateData;
/**
*
* Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
*
*/
private String kmsKeyId;
/**
*
* A flag that indicates if the target container is encrypted.
*
*/
private Boolean encrypted;
/**
*
* The base image for the container recipe.
*
*/
private String parentImage;
/**
*
* The date when this container recipe was created.
*
*/
private String dateCreated;
/**
*
* Tags that are attached to the container recipe.
*
*/
private java.util.Map tags;
/**
*
* The working directory for use during build and test workflows.
*
*/
private String workingDirectory;
/**
*
* The destination repository for the container image.
*
*/
private TargetContainerRepository targetRepository;
/**
*
* The Amazon Resource Name (ARN) of the container recipe.
*
*
*
* Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that
* object as follows:
*
*
* -
*
* Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off
* entirely, or they are specified as wildcards, for example: x.x.x.
*
*
* -
*
* Version ARNs have only the first three nodes: <major>.<minor>.<patch>
*
*
* -
*
* Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.
*
*
*
*
*
* @param arn
* The Amazon Resource Name (ARN) of the container recipe.
*
* Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to
* that object as follows:
*
*
* -
*
* Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either
* left off entirely, or they are specified as wildcards, for example: x.x.x.
*
*
* -
*
* Version ARNs have only the first three nodes: <major>.<minor>.<patch>
*
*
* -
*
* Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.
*
*
*
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The Amazon Resource Name (ARN) of the container recipe.
*
*
*
* Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that
* object as follows:
*
*
* -
*
* Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off
* entirely, or they are specified as wildcards, for example: x.x.x.
*
*
* -
*
* Version ARNs have only the first three nodes: <major>.<minor>.<patch>
*
*
* -
*
* Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.
*
*
*
*
*
* @return The Amazon Resource Name (ARN) of the container recipe.
*
* Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to
* that object as follows:
*
*
* -
*
* Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either
* left off entirely, or they are specified as wildcards, for example: x.x.x.
*
*
* -
*
* Version ARNs have only the first three nodes: <major>.<minor>.<patch>
*
*
* -
*
* Build version ARNs have all four nodes, and point to a specific build for a specific version of an
* object.
*
*
*
*/
public String getArn() {
return this.arn;
}
/**
*
* The Amazon Resource Name (ARN) of the container recipe.
*
*
*
* Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to that
* object as follows:
*
*
* -
*
* Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either left off
* entirely, or they are specified as wildcards, for example: x.x.x.
*
*
* -
*
* Version ARNs have only the first three nodes: <major>.<minor>.<patch>
*
*
* -
*
* Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.
*
*
*
*
*
* @param arn
* The Amazon Resource Name (ARN) of the container recipe.
*
* Semantic versioning is included in each object's Amazon Resource Name (ARN), at the level that applies to
* that object as follows:
*
*
* -
*
* Versionless ARNs and Name ARNs do not include specific values in any of the nodes. The nodes are either
* left off entirely, or they are specified as wildcards, for example: x.x.x.
*
*
* -
*
* Version ARNs have only the first three nodes: <major>.<minor>.<patch>
*
*
* -
*
* Build version ARNs have all four nodes, and point to a specific build for a specific version of an object.
*
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* Specifies the type of container, such as Docker.
*
*
* @param containerType
* Specifies the type of container, such as Docker.
* @see ContainerType
*/
public void setContainerType(String containerType) {
this.containerType = containerType;
}
/**
*
* Specifies the type of container, such as Docker.
*
*
* @return Specifies the type of container, such as Docker.
* @see ContainerType
*/
public String getContainerType() {
return this.containerType;
}
/**
*
* Specifies the type of container, such as Docker.
*
*
* @param containerType
* Specifies the type of container, such as Docker.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ContainerType
*/
public ContainerRecipe withContainerType(String containerType) {
setContainerType(containerType);
return this;
}
/**
*
* Specifies the type of container, such as Docker.
*
*
* @param containerType
* Specifies the type of container, such as Docker.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ContainerType
*/
public ContainerRecipe withContainerType(ContainerType containerType) {
this.containerType = containerType.toString();
return this;
}
/**
*
* The name of the container recipe.
*
*
* @param name
* The name of the container recipe.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the container recipe.
*
*
* @return The name of the container recipe.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the container recipe.
*
*
* @param name
* The name of the container recipe.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withName(String name) {
setName(name);
return this;
}
/**
*
* The description of the container recipe.
*
*
* @param description
* The description of the container recipe.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description of the container recipe.
*
*
* @return The description of the container recipe.
*/
public String getDescription() {
return this.description;
}
/**
*
* The description of the container recipe.
*
*
* @param description
* The description of the container recipe.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The system platform for the container, such as Windows or Linux.
*
*
* @param platform
* The system platform for the container, such as Windows or Linux.
* @see Platform
*/
public void setPlatform(String platform) {
this.platform = platform;
}
/**
*
* The system platform for the container, such as Windows or Linux.
*
*
* @return The system platform for the container, such as Windows or Linux.
* @see Platform
*/
public String getPlatform() {
return this.platform;
}
/**
*
* The system platform for the container, such as Windows or Linux.
*
*
* @param platform
* The system platform for the container, such as Windows or Linux.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Platform
*/
public ContainerRecipe withPlatform(String platform) {
setPlatform(platform);
return this;
}
/**
*
* The system platform for the container, such as Windows or Linux.
*
*
* @param platform
* The system platform for the container, such as Windows or Linux.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Platform
*/
public ContainerRecipe withPlatform(Platform platform) {
this.platform = platform.toString();
return this;
}
/**
*
* The owner of the container recipe.
*
*
* @param owner
* The owner of the container recipe.
*/
public void setOwner(String owner) {
this.owner = owner;
}
/**
*
* The owner of the container recipe.
*
*
* @return The owner of the container recipe.
*/
public String getOwner() {
return this.owner;
}
/**
*
* The owner of the container recipe.
*
*
* @param owner
* The owner of the container recipe.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withOwner(String owner) {
setOwner(owner);
return this;
}
/**
*
* The semantic version of the container recipe.
*
*
*
* The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign
* values for the first three, and can filter on all of them.
*
*
* Assignment: For the first three nodes you can assign any positive integer value, including zero, with an
* upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the
* fourth node.
*
*
* Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that
* you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as
* 2021.01.01.
*
*
* Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most
* recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in
* any node, all nodes to the right of the first wildcard must also be wildcards.
*
*
*
* @param version
* The semantic version of the container recipe.
*
* The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can
* assign values for the first three, and can filter on all of them.
*
*
* Assignment: For the first three nodes you can assign any positive integer value, including zero,
* with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build
* number to the fourth node.
*
*
* Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes
* that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date,
* such as 2021.01.01.
*
*
* Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the
* most recent versions or nodes when selecting the base image or components for your recipe. When you use a
* wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
*
*/
public void setVersion(String version) {
this.version = version;
}
/**
*
* The semantic version of the container recipe.
*
*
*
* The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign
* values for the first three, and can filter on all of them.
*
*
* Assignment: For the first three nodes you can assign any positive integer value, including zero, with an
* upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the
* fourth node.
*
*
* Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that
* you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as
* 2021.01.01.
*
*
* Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most
* recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in
* any node, all nodes to the right of the first wildcard must also be wildcards.
*
*
*
* @return The semantic version of the container recipe.
*
* The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can
* assign values for the first three, and can filter on all of them.
*
*
* Assignment: For the first three nodes you can assign any positive integer value, including zero,
* with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build
* number to the fourth node.
*
*
* Patterns: You can use any numeric pattern that adheres to the assignment requirements for the
* nodes that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a
* date, such as 2021.01.01.
*
*
* Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the
* most recent versions or nodes when selecting the base image or components for your recipe. When you use a
* wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
*
*/
public String getVersion() {
return this.version;
}
/**
*
* The semantic version of the container recipe.
*
*
*
* The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can assign
* values for the first three, and can filter on all of them.
*
*
* Assignment: For the first three nodes you can assign any positive integer value, including zero, with an
* upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build number to the
* fourth node.
*
*
* Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes that
* you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date, such as
* 2021.01.01.
*
*
* Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the most
* recent versions or nodes when selecting the base image or components for your recipe. When you use a wildcard in
* any node, all nodes to the right of the first wildcard must also be wildcards.
*
*
*
* @param version
* The semantic version of the container recipe.
*
* The semantic version has four nodes: <major>.<minor>.<patch>/<build>. You can
* assign values for the first three, and can filter on all of them.
*
*
* Assignment: For the first three nodes you can assign any positive integer value, including zero,
* with an upper limit of 2^30-1, or 1073741823 for each node. Image Builder automatically assigns the build
* number to the fourth node.
*
*
* Patterns: You can use any numeric pattern that adheres to the assignment requirements for the nodes
* that you can assign. For example, you might choose a software version pattern, such as 1.0.0, or a date,
* such as 2021.01.01.
*
*
* Filtering: With semantic versioning, you have the flexibility to use wildcards (x) to specify the
* most recent versions or nodes when selecting the base image or components for your recipe. When you use a
* wildcard in any node, all nodes to the right of the first wildcard must also be wildcards.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withVersion(String version) {
setVersion(version);
return this;
}
/**
*
* Build and test components that are included in the container recipe. Recipes require a minimum of one build
* component, and can have a maximum of 20 build and test components in any combination.
*
*
* @return Build and test components that are included in the container recipe. Recipes require a minimum of one
* build component, and can have a maximum of 20 build and test components in any combination.
*/
public java.util.List getComponents() {
return components;
}
/**
*
* Build and test components that are included in the container recipe. Recipes require a minimum of one build
* component, and can have a maximum of 20 build and test components in any combination.
*
*
* @param components
* Build and test components that are included in the container recipe. Recipes require a minimum of one
* build component, and can have a maximum of 20 build and test components in any combination.
*/
public void setComponents(java.util.Collection components) {
if (components == null) {
this.components = null;
return;
}
this.components = new java.util.ArrayList(components);
}
/**
*
* Build and test components that are included in the container recipe. Recipes require a minimum of one build
* component, and can have a maximum of 20 build and test components in any combination.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setComponents(java.util.Collection)} or {@link #withComponents(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param components
* Build and test components that are included in the container recipe. Recipes require a minimum of one
* build component, and can have a maximum of 20 build and test components in any combination.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withComponents(ComponentConfiguration... components) {
if (this.components == null) {
setComponents(new java.util.ArrayList(components.length));
}
for (ComponentConfiguration ele : components) {
this.components.add(ele);
}
return this;
}
/**
*
* Build and test components that are included in the container recipe. Recipes require a minimum of one build
* component, and can have a maximum of 20 build and test components in any combination.
*
*
* @param components
* Build and test components that are included in the container recipe. Recipes require a minimum of one
* build component, and can have a maximum of 20 build and test components in any combination.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withComponents(java.util.Collection components) {
setComponents(components);
return this;
}
/**
*
* A group of options that can be used to configure an instance for building and testing container images.
*
*
* @param instanceConfiguration
* A group of options that can be used to configure an instance for building and testing container images.
*/
public void setInstanceConfiguration(InstanceConfiguration instanceConfiguration) {
this.instanceConfiguration = instanceConfiguration;
}
/**
*
* A group of options that can be used to configure an instance for building and testing container images.
*
*
* @return A group of options that can be used to configure an instance for building and testing container images.
*/
public InstanceConfiguration getInstanceConfiguration() {
return this.instanceConfiguration;
}
/**
*
* A group of options that can be used to configure an instance for building and testing container images.
*
*
* @param instanceConfiguration
* A group of options that can be used to configure an instance for building and testing container images.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withInstanceConfiguration(InstanceConfiguration instanceConfiguration) {
setInstanceConfiguration(instanceConfiguration);
return this;
}
/**
*
* Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all of the
* elements required by the application running inside. The template data consists of contextual variables where
* Image Builder places build information or scripts, based on your container image recipe.
*
*
* @param dockerfileTemplateData
* Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all
* of the elements required by the application running inside. The template data consists of contextual
* variables where Image Builder places build information or scripts, based on your container image recipe.
*/
public void setDockerfileTemplateData(String dockerfileTemplateData) {
this.dockerfileTemplateData = dockerfileTemplateData;
}
/**
*
* Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all of the
* elements required by the application running inside. The template data consists of contextual variables where
* Image Builder places build information or scripts, based on your container image recipe.
*
*
* @return Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all
* of the elements required by the application running inside. The template data consists of contextual
* variables where Image Builder places build information or scripts, based on your container image recipe.
*/
public String getDockerfileTemplateData() {
return this.dockerfileTemplateData;
}
/**
*
* Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all of the
* elements required by the application running inside. The template data consists of contextual variables where
* Image Builder places build information or scripts, based on your container image recipe.
*
*
* @param dockerfileTemplateData
* Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all
* of the elements required by the application running inside. The template data consists of contextual
* variables where Image Builder places build information or scripts, based on your container image recipe.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withDockerfileTemplateData(String dockerfileTemplateData) {
setDockerfileTemplateData(dockerfileTemplateData);
return this;
}
/**
*
* Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
*
*
* @param kmsKeyId
* Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
*/
public void setKmsKeyId(String kmsKeyId) {
this.kmsKeyId = kmsKeyId;
}
/**
*
* Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
*
*
* @return Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
*/
public String getKmsKeyId() {
return this.kmsKeyId;
}
/**
*
* Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
*
*
* @param kmsKeyId
* Identifies which KMS key is used to encrypt the container image for distribution to the target Region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withKmsKeyId(String kmsKeyId) {
setKmsKeyId(kmsKeyId);
return this;
}
/**
*
* A flag that indicates if the target container is encrypted.
*
*
* @param encrypted
* A flag that indicates if the target container is encrypted.
*/
public void setEncrypted(Boolean encrypted) {
this.encrypted = encrypted;
}
/**
*
* A flag that indicates if the target container is encrypted.
*
*
* @return A flag that indicates if the target container is encrypted.
*/
public Boolean getEncrypted() {
return this.encrypted;
}
/**
*
* A flag that indicates if the target container is encrypted.
*
*
* @param encrypted
* A flag that indicates if the target container is encrypted.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withEncrypted(Boolean encrypted) {
setEncrypted(encrypted);
return this;
}
/**
*
* A flag that indicates if the target container is encrypted.
*
*
* @return A flag that indicates if the target container is encrypted.
*/
public Boolean isEncrypted() {
return this.encrypted;
}
/**
*
* The base image for the container recipe.
*
*
* @param parentImage
* The base image for the container recipe.
*/
public void setParentImage(String parentImage) {
this.parentImage = parentImage;
}
/**
*
* The base image for the container recipe.
*
*
* @return The base image for the container recipe.
*/
public String getParentImage() {
return this.parentImage;
}
/**
*
* The base image for the container recipe.
*
*
* @param parentImage
* The base image for the container recipe.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withParentImage(String parentImage) {
setParentImage(parentImage);
return this;
}
/**
*
* The date when this container recipe was created.
*
*
* @param dateCreated
* The date when this container recipe was created.
*/
public void setDateCreated(String dateCreated) {
this.dateCreated = dateCreated;
}
/**
*
* The date when this container recipe was created.
*
*
* @return The date when this container recipe was created.
*/
public String getDateCreated() {
return this.dateCreated;
}
/**
*
* The date when this container recipe was created.
*
*
* @param dateCreated
* The date when this container recipe was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withDateCreated(String dateCreated) {
setDateCreated(dateCreated);
return this;
}
/**
*
* Tags that are attached to the container recipe.
*
*
* @return Tags that are attached to the container recipe.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* Tags that are attached to the container recipe.
*
*
* @param tags
* Tags that are attached to the container recipe.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* Tags that are attached to the container recipe.
*
*
* @param tags
* Tags that are attached to the container recipe.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see ContainerRecipe#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap();
}
if (this.tags.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.tags.put(key, value);
return this;
}
/**
* Removes all the entries added into Tags.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe clearTagsEntries() {
this.tags = null;
return this;
}
/**
*
* The working directory for use during build and test workflows.
*
*
* @param workingDirectory
* The working directory for use during build and test workflows.
*/
public void setWorkingDirectory(String workingDirectory) {
this.workingDirectory = workingDirectory;
}
/**
*
* The working directory for use during build and test workflows.
*
*
* @return The working directory for use during build and test workflows.
*/
public String getWorkingDirectory() {
return this.workingDirectory;
}
/**
*
* The working directory for use during build and test workflows.
*
*
* @param workingDirectory
* The working directory for use during build and test workflows.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withWorkingDirectory(String workingDirectory) {
setWorkingDirectory(workingDirectory);
return this;
}
/**
*
* The destination repository for the container image.
*
*
* @param targetRepository
* The destination repository for the container image.
*/
public void setTargetRepository(TargetContainerRepository targetRepository) {
this.targetRepository = targetRepository;
}
/**
*
* The destination repository for the container image.
*
*
* @return The destination repository for the container image.
*/
public TargetContainerRepository getTargetRepository() {
return this.targetRepository;
}
/**
*
* The destination repository for the container image.
*
*
* @param targetRepository
* The destination repository for the container image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ContainerRecipe withTargetRepository(TargetContainerRepository targetRepository) {
setTargetRepository(targetRepository);
return this;
}
/**
* 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.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getContainerType() != null)
sb.append("ContainerType: ").append(getContainerType()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getPlatform() != null)
sb.append("Platform: ").append(getPlatform()).append(",");
if (getOwner() != null)
sb.append("Owner: ").append(getOwner()).append(",");
if (getVersion() != null)
sb.append("Version: ").append(getVersion()).append(",");
if (getComponents() != null)
sb.append("Components: ").append(getComponents()).append(",");
if (getInstanceConfiguration() != null)
sb.append("InstanceConfiguration: ").append(getInstanceConfiguration()).append(",");
if (getDockerfileTemplateData() != null)
sb.append("DockerfileTemplateData: ").append(getDockerfileTemplateData()).append(",");
if (getKmsKeyId() != null)
sb.append("KmsKeyId: ").append(getKmsKeyId()).append(",");
if (getEncrypted() != null)
sb.append("Encrypted: ").append(getEncrypted()).append(",");
if (getParentImage() != null)
sb.append("ParentImage: ").append(getParentImage()).append(",");
if (getDateCreated() != null)
sb.append("DateCreated: ").append(getDateCreated()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getWorkingDirectory() != null)
sb.append("WorkingDirectory: ").append(getWorkingDirectory()).append(",");
if (getTargetRepository() != null)
sb.append("TargetRepository: ").append(getTargetRepository());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ContainerRecipe == false)
return false;
ContainerRecipe other = (ContainerRecipe) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getContainerType() == null ^ this.getContainerType() == null)
return false;
if (other.getContainerType() != null && other.getContainerType().equals(this.getContainerType()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getPlatform() == null ^ this.getPlatform() == null)
return false;
if (other.getPlatform() != null && other.getPlatform().equals(this.getPlatform()) == false)
return false;
if (other.getOwner() == null ^ this.getOwner() == null)
return false;
if (other.getOwner() != null && other.getOwner().equals(this.getOwner()) == false)
return false;
if (other.getVersion() == null ^ this.getVersion() == null)
return false;
if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false)
return false;
if (other.getComponents() == null ^ this.getComponents() == null)
return false;
if (other.getComponents() != null && other.getComponents().equals(this.getComponents()) == false)
return false;
if (other.getInstanceConfiguration() == null ^ this.getInstanceConfiguration() == null)
return false;
if (other.getInstanceConfiguration() != null && other.getInstanceConfiguration().equals(this.getInstanceConfiguration()) == false)
return false;
if (other.getDockerfileTemplateData() == null ^ this.getDockerfileTemplateData() == null)
return false;
if (other.getDockerfileTemplateData() != null && other.getDockerfileTemplateData().equals(this.getDockerfileTemplateData()) == false)
return false;
if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null)
return false;
if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false)
return false;
if (other.getEncrypted() == null ^ this.getEncrypted() == null)
return false;
if (other.getEncrypted() != null && other.getEncrypted().equals(this.getEncrypted()) == false)
return false;
if (other.getParentImage() == null ^ this.getParentImage() == null)
return false;
if (other.getParentImage() != null && other.getParentImage().equals(this.getParentImage()) == false)
return false;
if (other.getDateCreated() == null ^ this.getDateCreated() == null)
return false;
if (other.getDateCreated() != null && other.getDateCreated().equals(this.getDateCreated()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getWorkingDirectory() == null ^ this.getWorkingDirectory() == null)
return false;
if (other.getWorkingDirectory() != null && other.getWorkingDirectory().equals(this.getWorkingDirectory()) == false)
return false;
if (other.getTargetRepository() == null ^ this.getTargetRepository() == null)
return false;
if (other.getTargetRepository() != null && other.getTargetRepository().equals(this.getTargetRepository()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getContainerType() == null) ? 0 : getContainerType().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getPlatform() == null) ? 0 : getPlatform().hashCode());
hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode());
hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode());
hashCode = prime * hashCode + ((getComponents() == null) ? 0 : getComponents().hashCode());
hashCode = prime * hashCode + ((getInstanceConfiguration() == null) ? 0 : getInstanceConfiguration().hashCode());
hashCode = prime * hashCode + ((getDockerfileTemplateData() == null) ? 0 : getDockerfileTemplateData().hashCode());
hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode());
hashCode = prime * hashCode + ((getEncrypted() == null) ? 0 : getEncrypted().hashCode());
hashCode = prime * hashCode + ((getParentImage() == null) ? 0 : getParentImage().hashCode());
hashCode = prime * hashCode + ((getDateCreated() == null) ? 0 : getDateCreated().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getWorkingDirectory() == null) ? 0 : getWorkingDirectory().hashCode());
hashCode = prime * hashCode + ((getTargetRepository() == null) ? 0 : getTargetRepository().hashCode());
return hashCode;
}
@Override
public ContainerRecipe clone() {
try {
return (ContainerRecipe) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.imagebuilder.model.transform.ContainerRecipeMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}