com.amazonaws.services.codepipeline.model.CreateCustomActionTypeRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codepipeline Show documentation
/*
* Copyright 2016-2021 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.codepipeline.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Represents the input of a CreateCustomActionType operation.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateCustomActionTypeRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The category of the custom action, such as a build action or a test action.
*
*/
private String category;
/**
*
* The provider of the service used in the custom action, such as AWS CodeDeploy.
*
*/
private String provider;
/**
*
* The version identifier of the custom action.
*
*/
private String version;
/**
*
* URLs that provide users information about this custom action.
*
*/
private ActionTypeSettings settings;
/**
*
* The configuration properties for the custom action.
*
*
*
* You can refer to a name in the configuration properties of the custom action within the URL templates by
* following the format of {Config:name}, as long as the configuration property is both required and not secret. For
* more information, see Create a Custom
* Action for a Pipeline.
*
*
*/
private java.util.List configurationProperties;
/**
*
* The details of the input artifact for the action, such as its commit ID.
*
*/
private ArtifactDetails inputArtifactDetails;
/**
*
* The details of the output artifact of the action, such as its commit ID.
*
*/
private ArtifactDetails outputArtifactDetails;
/**
*
* The tags for the custom action.
*
*/
private java.util.List tags;
/**
*
* The category of the custom action, such as a build action or a test action.
*
*
* @param category
* The category of the custom action, such as a build action or a test action.
* @see ActionCategory
*/
public void setCategory(String category) {
this.category = category;
}
/**
*
* The category of the custom action, such as a build action or a test action.
*
*
* @return The category of the custom action, such as a build action or a test action.
* @see ActionCategory
*/
public String getCategory() {
return this.category;
}
/**
*
* The category of the custom action, such as a build action or a test action.
*
*
* @param category
* The category of the custom action, such as a build action or a test action.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionCategory
*/
public CreateCustomActionTypeRequest withCategory(String category) {
setCategory(category);
return this;
}
/**
*
* The category of the custom action, such as a build action or a test action.
*
*
* @param category
* The category of the custom action, such as a build action or a test action.
* @see ActionCategory
*/
public void setCategory(ActionCategory category) {
withCategory(category);
}
/**
*
* The category of the custom action, such as a build action or a test action.
*
*
* @param category
* The category of the custom action, such as a build action or a test action.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionCategory
*/
public CreateCustomActionTypeRequest withCategory(ActionCategory category) {
this.category = category.toString();
return this;
}
/**
*
* The provider of the service used in the custom action, such as AWS CodeDeploy.
*
*
* @param provider
* The provider of the service used in the custom action, such as AWS CodeDeploy.
*/
public void setProvider(String provider) {
this.provider = provider;
}
/**
*
* The provider of the service used in the custom action, such as AWS CodeDeploy.
*
*
* @return The provider of the service used in the custom action, such as AWS CodeDeploy.
*/
public String getProvider() {
return this.provider;
}
/**
*
* The provider of the service used in the custom action, such as AWS CodeDeploy.
*
*
* @param provider
* The provider of the service used in the custom action, such as AWS CodeDeploy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCustomActionTypeRequest withProvider(String provider) {
setProvider(provider);
return this;
}
/**
*
* The version identifier of the custom action.
*
*
* @param version
* The version identifier of the custom action.
*/
public void setVersion(String version) {
this.version = version;
}
/**
*
* The version identifier of the custom action.
*
*
* @return The version identifier of the custom action.
*/
public String getVersion() {
return this.version;
}
/**
*
* The version identifier of the custom action.
*
*
* @param version
* The version identifier of the custom action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCustomActionTypeRequest withVersion(String version) {
setVersion(version);
return this;
}
/**
*
* URLs that provide users information about this custom action.
*
*
* @param settings
* URLs that provide users information about this custom action.
*/
public void setSettings(ActionTypeSettings settings) {
this.settings = settings;
}
/**
*
* URLs that provide users information about this custom action.
*
*
* @return URLs that provide users information about this custom action.
*/
public ActionTypeSettings getSettings() {
return this.settings;
}
/**
*
* URLs that provide users information about this custom action.
*
*
* @param settings
* URLs that provide users information about this custom action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCustomActionTypeRequest withSettings(ActionTypeSettings settings) {
setSettings(settings);
return this;
}
/**
*
* The configuration properties for the custom action.
*
*
*
* You can refer to a name in the configuration properties of the custom action within the URL templates by
* following the format of {Config:name}, as long as the configuration property is both required and not secret. For
* more information, see Create a Custom
* Action for a Pipeline.
*
*
*
* @return The configuration properties for the custom action.
*
* You can refer to a name in the configuration properties of the custom action within the URL templates by
* following the format of {Config:name}, as long as the configuration property is both required and not
* secret. For more information, see Create
* a Custom Action for a Pipeline.
*
*/
public java.util.List getConfigurationProperties() {
return configurationProperties;
}
/**
*
* The configuration properties for the custom action.
*
*
*
* You can refer to a name in the configuration properties of the custom action within the URL templates by
* following the format of {Config:name}, as long as the configuration property is both required and not secret. For
* more information, see Create a Custom
* Action for a Pipeline.
*
*
*
* @param configurationProperties
* The configuration properties for the custom action.
*
* You can refer to a name in the configuration properties of the custom action within the URL templates by
* following the format of {Config:name}, as long as the configuration property is both required and not
* secret. For more information, see Create a
* Custom Action for a Pipeline.
*
*/
public void setConfigurationProperties(java.util.Collection configurationProperties) {
if (configurationProperties == null) {
this.configurationProperties = null;
return;
}
this.configurationProperties = new java.util.ArrayList(configurationProperties);
}
/**
*
* The configuration properties for the custom action.
*
*
*
* You can refer to a name in the configuration properties of the custom action within the URL templates by
* following the format of {Config:name}, as long as the configuration property is both required and not secret. For
* more information, see Create a Custom
* Action for a Pipeline.
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setConfigurationProperties(java.util.Collection)} or
* {@link #withConfigurationProperties(java.util.Collection)} if you want to override the existing values.
*
*
* @param configurationProperties
* The configuration properties for the custom action.
*
* You can refer to a name in the configuration properties of the custom action within the URL templates by
* following the format of {Config:name}, as long as the configuration property is both required and not
* secret. For more information, see Create a
* Custom Action for a Pipeline.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCustomActionTypeRequest withConfigurationProperties(ActionConfigurationProperty... configurationProperties) {
if (this.configurationProperties == null) {
setConfigurationProperties(new java.util.ArrayList(configurationProperties.length));
}
for (ActionConfigurationProperty ele : configurationProperties) {
this.configurationProperties.add(ele);
}
return this;
}
/**
*
* The configuration properties for the custom action.
*
*
*
* You can refer to a name in the configuration properties of the custom action within the URL templates by
* following the format of {Config:name}, as long as the configuration property is both required and not secret. For
* more information, see Create a Custom
* Action for a Pipeline.
*
*
*
* @param configurationProperties
* The configuration properties for the custom action.
*
* You can refer to a name in the configuration properties of the custom action within the URL templates by
* following the format of {Config:name}, as long as the configuration property is both required and not
* secret. For more information, see Create a
* Custom Action for a Pipeline.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCustomActionTypeRequest withConfigurationProperties(java.util.Collection configurationProperties) {
setConfigurationProperties(configurationProperties);
return this;
}
/**
*
* The details of the input artifact for the action, such as its commit ID.
*
*
* @param inputArtifactDetails
* The details of the input artifact for the action, such as its commit ID.
*/
public void setInputArtifactDetails(ArtifactDetails inputArtifactDetails) {
this.inputArtifactDetails = inputArtifactDetails;
}
/**
*
* The details of the input artifact for the action, such as its commit ID.
*
*
* @return The details of the input artifact for the action, such as its commit ID.
*/
public ArtifactDetails getInputArtifactDetails() {
return this.inputArtifactDetails;
}
/**
*
* The details of the input artifact for the action, such as its commit ID.
*
*
* @param inputArtifactDetails
* The details of the input artifact for the action, such as its commit ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCustomActionTypeRequest withInputArtifactDetails(ArtifactDetails inputArtifactDetails) {
setInputArtifactDetails(inputArtifactDetails);
return this;
}
/**
*
* The details of the output artifact of the action, such as its commit ID.
*
*
* @param outputArtifactDetails
* The details of the output artifact of the action, such as its commit ID.
*/
public void setOutputArtifactDetails(ArtifactDetails outputArtifactDetails) {
this.outputArtifactDetails = outputArtifactDetails;
}
/**
*
* The details of the output artifact of the action, such as its commit ID.
*
*
* @return The details of the output artifact of the action, such as its commit ID.
*/
public ArtifactDetails getOutputArtifactDetails() {
return this.outputArtifactDetails;
}
/**
*
* The details of the output artifact of the action, such as its commit ID.
*
*
* @param outputArtifactDetails
* The details of the output artifact of the action, such as its commit ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCustomActionTypeRequest withOutputArtifactDetails(ArtifactDetails outputArtifactDetails) {
setOutputArtifactDetails(outputArtifactDetails);
return this;
}
/**
*
* The tags for the custom action.
*
*
* @return The tags for the custom action.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* The tags for the custom action.
*
*
* @param tags
* The tags for the custom action.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* The tags for the custom action.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* The tags for the custom action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCustomActionTypeRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* The tags for the custom action.
*
*
* @param tags
* The tags for the custom action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCustomActionTypeRequest withTags(java.util.Collection tags) {
setTags(tags);
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 (getCategory() != null)
sb.append("Category: ").append(getCategory()).append(",");
if (getProvider() != null)
sb.append("Provider: ").append(getProvider()).append(",");
if (getVersion() != null)
sb.append("Version: ").append(getVersion()).append(",");
if (getSettings() != null)
sb.append("Settings: ").append(getSettings()).append(",");
if (getConfigurationProperties() != null)
sb.append("ConfigurationProperties: ").append(getConfigurationProperties()).append(",");
if (getInputArtifactDetails() != null)
sb.append("InputArtifactDetails: ").append(getInputArtifactDetails()).append(",");
if (getOutputArtifactDetails() != null)
sb.append("OutputArtifactDetails: ").append(getOutputArtifactDetails()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateCustomActionTypeRequest == false)
return false;
CreateCustomActionTypeRequest other = (CreateCustomActionTypeRequest) obj;
if (other.getCategory() == null ^ this.getCategory() == null)
return false;
if (other.getCategory() != null && other.getCategory().equals(this.getCategory()) == false)
return false;
if (other.getProvider() == null ^ this.getProvider() == null)
return false;
if (other.getProvider() != null && other.getProvider().equals(this.getProvider()) == 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.getSettings() == null ^ this.getSettings() == null)
return false;
if (other.getSettings() != null && other.getSettings().equals(this.getSettings()) == false)
return false;
if (other.getConfigurationProperties() == null ^ this.getConfigurationProperties() == null)
return false;
if (other.getConfigurationProperties() != null && other.getConfigurationProperties().equals(this.getConfigurationProperties()) == false)
return false;
if (other.getInputArtifactDetails() == null ^ this.getInputArtifactDetails() == null)
return false;
if (other.getInputArtifactDetails() != null && other.getInputArtifactDetails().equals(this.getInputArtifactDetails()) == false)
return false;
if (other.getOutputArtifactDetails() == null ^ this.getOutputArtifactDetails() == null)
return false;
if (other.getOutputArtifactDetails() != null && other.getOutputArtifactDetails().equals(this.getOutputArtifactDetails()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCategory() == null) ? 0 : getCategory().hashCode());
hashCode = prime * hashCode + ((getProvider() == null) ? 0 : getProvider().hashCode());
hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode());
hashCode = prime * hashCode + ((getSettings() == null) ? 0 : getSettings().hashCode());
hashCode = prime * hashCode + ((getConfigurationProperties() == null) ? 0 : getConfigurationProperties().hashCode());
hashCode = prime * hashCode + ((getInputArtifactDetails() == null) ? 0 : getInputArtifactDetails().hashCode());
hashCode = prime * hashCode + ((getOutputArtifactDetails() == null) ? 0 : getOutputArtifactDetails().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateCustomActionTypeRequest clone() {
return (CreateCustomActionTypeRequest) super.clone();
}
}