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

com.amazonaws.services.imagebuilder.model.Workflow 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;

/**
 * 

* Defines a process that Image Builder uses to build and test images during the image creation process. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Workflow implements Serializable, Cloneable, StructuredPojo { /** *

* The Amazon Resource Name (ARN) of the workflow resource. *

*/ private String arn; /** *

* The name of the workflow resource. *

*/ private String name; /** *

* The workflow resource version. Workflow resources are immutable. To make a change, you can clone a workflow or * create a new version. *

*/ private String version; /** *

* The description of the workflow. *

*/ private String description; /** *

* Describes what change has been made in this version of the workflow, or what makes this version different from * other versions of the workflow. *

*/ private String changeDescription; /** *

* Specifies the image creation stage that the workflow applies to. Image Builder currently supports build and test * workflows. *

*/ private String type; /** *

* Describes the current status of the workflow and the reason for that status. *

*/ private WorkflowState state; /** *

* The owner of the workflow resource. *

*/ private String owner; /** *

* Contains the YAML document content for the workflow. *

*/ private String data; /** *

* The KMS key identifier used to encrypt the workflow resource. *

*/ private String kmsKeyId; /** *

* The timestamp when Image Builder created the workflow resource. *

*/ private String dateCreated; /** *

* The tags that apply to the workflow resource *

*/ private java.util.Map tags; /** *

* An array of input parameters that that the image workflow uses to control actions or configure settings. *

*/ private java.util.List parameters; /** *

* The Amazon Resource Name (ARN) of the workflow resource. *

* * @param arn * The Amazon Resource Name (ARN) of the workflow resource. */ public void setArn(String arn) { this.arn = arn; } /** *

* The Amazon Resource Name (ARN) of the workflow resource. *

* * @return The Amazon Resource Name (ARN) of the workflow resource. */ public String getArn() { return this.arn; } /** *

* The Amazon Resource Name (ARN) of the workflow resource. *

* * @param arn * The Amazon Resource Name (ARN) of the workflow resource. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withArn(String arn) { setArn(arn); return this; } /** *

* The name of the workflow resource. *

* * @param name * The name of the workflow resource. */ public void setName(String name) { this.name = name; } /** *

* The name of the workflow resource. *

* * @return The name of the workflow resource. */ public String getName() { return this.name; } /** *

* The name of the workflow resource. *

* * @param name * The name of the workflow resource. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withName(String name) { setName(name); return this; } /** *

* The workflow resource version. Workflow resources are immutable. To make a change, you can clone a workflow or * create a new version. *

* * @param version * The workflow resource version. Workflow resources are immutable. To make a change, you can clone a * workflow or create a new version. */ public void setVersion(String version) { this.version = version; } /** *

* The workflow resource version. Workflow resources are immutable. To make a change, you can clone a workflow or * create a new version. *

* * @return The workflow resource version. Workflow resources are immutable. To make a change, you can clone a * workflow or create a new version. */ public String getVersion() { return this.version; } /** *

* The workflow resource version. Workflow resources are immutable. To make a change, you can clone a workflow or * create a new version. *

* * @param version * The workflow resource version. Workflow resources are immutable. To make a change, you can clone a * workflow or create a new version. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withVersion(String version) { setVersion(version); return this; } /** *

* The description of the workflow. *

* * @param description * The description of the workflow. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the workflow. *

* * @return The description of the workflow. */ public String getDescription() { return this.description; } /** *

* The description of the workflow. *

* * @param description * The description of the workflow. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withDescription(String description) { setDescription(description); return this; } /** *

* Describes what change has been made in this version of the workflow, or what makes this version different from * other versions of the workflow. *

* * @param changeDescription * Describes what change has been made in this version of the workflow, or what makes this version different * from other versions of the workflow. */ public void setChangeDescription(String changeDescription) { this.changeDescription = changeDescription; } /** *

* Describes what change has been made in this version of the workflow, or what makes this version different from * other versions of the workflow. *

* * @return Describes what change has been made in this version of the workflow, or what makes this version different * from other versions of the workflow. */ public String getChangeDescription() { return this.changeDescription; } /** *

* Describes what change has been made in this version of the workflow, or what makes this version different from * other versions of the workflow. *

* * @param changeDescription * Describes what change has been made in this version of the workflow, or what makes this version different * from other versions of the workflow. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withChangeDescription(String changeDescription) { setChangeDescription(changeDescription); return this; } /** *

* Specifies the image creation stage that the workflow applies to. Image Builder currently supports build and test * workflows. *

* * @param type * Specifies the image creation stage that the workflow applies to. Image Builder currently supports build * and test workflows. * @see WorkflowType */ public void setType(String type) { this.type = type; } /** *

* Specifies the image creation stage that the workflow applies to. Image Builder currently supports build and test * workflows. *

* * @return Specifies the image creation stage that the workflow applies to. Image Builder currently supports build * and test workflows. * @see WorkflowType */ public String getType() { return this.type; } /** *

* Specifies the image creation stage that the workflow applies to. Image Builder currently supports build and test * workflows. *

* * @param type * Specifies the image creation stage that the workflow applies to. Image Builder currently supports build * and test workflows. * @return Returns a reference to this object so that method calls can be chained together. * @see WorkflowType */ public Workflow withType(String type) { setType(type); return this; } /** *

* Specifies the image creation stage that the workflow applies to. Image Builder currently supports build and test * workflows. *

* * @param type * Specifies the image creation stage that the workflow applies to. Image Builder currently supports build * and test workflows. * @return Returns a reference to this object so that method calls can be chained together. * @see WorkflowType */ public Workflow withType(WorkflowType type) { this.type = type.toString(); return this; } /** *

* Describes the current status of the workflow and the reason for that status. *

* * @param state * Describes the current status of the workflow and the reason for that status. */ public void setState(WorkflowState state) { this.state = state; } /** *

* Describes the current status of the workflow and the reason for that status. *

* * @return Describes the current status of the workflow and the reason for that status. */ public WorkflowState getState() { return this.state; } /** *

* Describes the current status of the workflow and the reason for that status. *

* * @param state * Describes the current status of the workflow and the reason for that status. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withState(WorkflowState state) { setState(state); return this; } /** *

* The owner of the workflow resource. *

* * @param owner * The owner of the workflow resource. */ public void setOwner(String owner) { this.owner = owner; } /** *

* The owner of the workflow resource. *

* * @return The owner of the workflow resource. */ public String getOwner() { return this.owner; } /** *

* The owner of the workflow resource. *

* * @param owner * The owner of the workflow resource. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withOwner(String owner) { setOwner(owner); return this; } /** *

* Contains the YAML document content for the workflow. *

* * @param data * Contains the YAML document content for the workflow. */ public void setData(String data) { this.data = data; } /** *

* Contains the YAML document content for the workflow. *

* * @return Contains the YAML document content for the workflow. */ public String getData() { return this.data; } /** *

* Contains the YAML document content for the workflow. *

* * @param data * Contains the YAML document content for the workflow. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withData(String data) { setData(data); return this; } /** *

* The KMS key identifier used to encrypt the workflow resource. *

* * @param kmsKeyId * The KMS key identifier used to encrypt the workflow resource. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** *

* The KMS key identifier used to encrypt the workflow resource. *

* * @return The KMS key identifier used to encrypt the workflow resource. */ public String getKmsKeyId() { return this.kmsKeyId; } /** *

* The KMS key identifier used to encrypt the workflow resource. *

* * @param kmsKeyId * The KMS key identifier used to encrypt the workflow resource. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *

* The timestamp when Image Builder created the workflow resource. *

* * @param dateCreated * The timestamp when Image Builder created the workflow resource. */ public void setDateCreated(String dateCreated) { this.dateCreated = dateCreated; } /** *

* The timestamp when Image Builder created the workflow resource. *

* * @return The timestamp when Image Builder created the workflow resource. */ public String getDateCreated() { return this.dateCreated; } /** *

* The timestamp when Image Builder created the workflow resource. *

* * @param dateCreated * The timestamp when Image Builder created the workflow resource. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withDateCreated(String dateCreated) { setDateCreated(dateCreated); return this; } /** *

* The tags that apply to the workflow resource *

* * @return The tags that apply to the workflow resource */ public java.util.Map getTags() { return tags; } /** *

* The tags that apply to the workflow resource *

* * @param tags * The tags that apply to the workflow resource */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* The tags that apply to the workflow resource *

* * @param tags * The tags that apply to the workflow resource * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see Workflow#withTags * @returns a reference to this object so that method calls can be chained together. */ public Workflow 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 Workflow clearTagsEntries() { this.tags = null; return this; } /** *

* An array of input parameters that that the image workflow uses to control actions or configure settings. *

* * @return An array of input parameters that that the image workflow uses to control actions or configure settings. */ public java.util.List getParameters() { return parameters; } /** *

* An array of input parameters that that the image workflow uses to control actions or configure settings. *

* * @param parameters * An array of input parameters that that the image workflow uses to control actions or configure settings. */ public void setParameters(java.util.Collection parameters) { if (parameters == null) { this.parameters = null; return; } this.parameters = new java.util.ArrayList(parameters); } /** *

* An array of input parameters that that the image workflow uses to control actions or configure settings. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setParameters(java.util.Collection)} or {@link #withParameters(java.util.Collection)} if you want to * override the existing values. *

* * @param parameters * An array of input parameters that that the image workflow uses to control actions or configure settings. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withParameters(WorkflowParameterDetail... parameters) { if (this.parameters == null) { setParameters(new java.util.ArrayList(parameters.length)); } for (WorkflowParameterDetail ele : parameters) { this.parameters.add(ele); } return this; } /** *

* An array of input parameters that that the image workflow uses to control actions or configure settings. *

* * @param parameters * An array of input parameters that that the image workflow uses to control actions or configure settings. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withParameters(java.util.Collection parameters) { setParameters(parameters); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getVersion() != null) sb.append("Version: ").append(getVersion()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getChangeDescription() != null) sb.append("ChangeDescription: ").append(getChangeDescription()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getOwner() != null) sb.append("Owner: ").append(getOwner()).append(","); if (getData() != null) sb.append("Data: ").append(getData()).append(","); if (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getDateCreated() != null) sb.append("DateCreated: ").append(getDateCreated()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getParameters() != null) sb.append("Parameters: ").append(getParameters()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Workflow == false) return false; Workflow other = (Workflow) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == 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.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == 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.getChangeDescription() == null ^ this.getChangeDescription() == null) return false; if (other.getChangeDescription() != null && other.getChangeDescription().equals(this.getChangeDescription()) == false) return false; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == 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.getData() == null ^ this.getData() == null) return false; if (other.getData() != null && other.getData().equals(this.getData()) == 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.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.getParameters() == null ^ this.getParameters() == null) return false; if (other.getParameters() != null && other.getParameters().equals(this.getParameters()) == 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 + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getChangeDescription() == null) ? 0 : getChangeDescription().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode()); hashCode = prime * hashCode + ((getData() == null) ? 0 : getData().hashCode()); hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getDateCreated() == null) ? 0 : getDateCreated().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode()); return hashCode; } @Override public Workflow clone() { try { return (Workflow) 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.WorkflowMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy