com.amazonaws.services.codepipeline.model.ActionTypeIdentifier 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Specifies the category, owner, provider, and version of the action type.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ActionTypeIdentifier implements Serializable, Cloneable, StructuredPojo {
/**
*
* Defines what kind of action can be taken in the stage, one of the following:
*
*
* -
*
* Source
*
*
* -
*
* Build
*
*
* -
*
* Test
*
*
* -
*
* Deploy
*
*
* -
*
* Approval
*
*
* -
*
* Invoke
*
*
*
*/
private String category;
/**
*
* The creator of the action type being called: AWS
or ThirdParty
.
*
*/
private String owner;
/**
*
* The provider of the action type being called. The provider name is supplied when the action type is created.
*
*/
private String provider;
/**
*
* A string that describes the action type version.
*
*/
private String version;
/**
*
* Defines what kind of action can be taken in the stage, one of the following:
*
*
* -
*
* Source
*
*
* -
*
* Build
*
*
* -
*
* Test
*
*
* -
*
* Deploy
*
*
* -
*
* Approval
*
*
* -
*
* Invoke
*
*
*
*
* @param category
* Defines what kind of action can be taken in the stage, one of the following:
*
* -
*
* Source
*
*
* -
*
* Build
*
*
* -
*
* Test
*
*
* -
*
* Deploy
*
*
* -
*
* Approval
*
*
* -
*
* Invoke
*
*
* @see ActionCategory
*/
public void setCategory(String category) {
this.category = category;
}
/**
*
* Defines what kind of action can be taken in the stage, one of the following:
*
*
* -
*
* Source
*
*
* -
*
* Build
*
*
* -
*
* Test
*
*
* -
*
* Deploy
*
*
* -
*
* Approval
*
*
* -
*
* Invoke
*
*
*
*
* @return Defines what kind of action can be taken in the stage, one of the following:
*
* -
*
* Source
*
*
* -
*
* Build
*
*
* -
*
* Test
*
*
* -
*
* Deploy
*
*
* -
*
* Approval
*
*
* -
*
* Invoke
*
*
* @see ActionCategory
*/
public String getCategory() {
return this.category;
}
/**
*
* Defines what kind of action can be taken in the stage, one of the following:
*
*
* -
*
* Source
*
*
* -
*
* Build
*
*
* -
*
* Test
*
*
* -
*
* Deploy
*
*
* -
*
* Approval
*
*
* -
*
* Invoke
*
*
*
*
* @param category
* Defines what kind of action can be taken in the stage, one of the following:
*
* -
*
* Source
*
*
* -
*
* Build
*
*
* -
*
* Test
*
*
* -
*
* Deploy
*
*
* -
*
* Approval
*
*
* -
*
* Invoke
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionCategory
*/
public ActionTypeIdentifier withCategory(String category) {
setCategory(category);
return this;
}
/**
*
* Defines what kind of action can be taken in the stage, one of the following:
*
*
* -
*
* Source
*
*
* -
*
* Build
*
*
* -
*
* Test
*
*
* -
*
* Deploy
*
*
* -
*
* Approval
*
*
* -
*
* Invoke
*
*
*
*
* @param category
* Defines what kind of action can be taken in the stage, one of the following:
*
* -
*
* Source
*
*
* -
*
* Build
*
*
* -
*
* Test
*
*
* -
*
* Deploy
*
*
* -
*
* Approval
*
*
* -
*
* Invoke
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionCategory
*/
public ActionTypeIdentifier withCategory(ActionCategory category) {
this.category = category.toString();
return this;
}
/**
*
* The creator of the action type being called: AWS
or ThirdParty
.
*
*
* @param owner
* The creator of the action type being called: AWS
or ThirdParty
.
*/
public void setOwner(String owner) {
this.owner = owner;
}
/**
*
* The creator of the action type being called: AWS
or ThirdParty
.
*
*
* @return The creator of the action type being called: AWS
or ThirdParty
.
*/
public String getOwner() {
return this.owner;
}
/**
*
* The creator of the action type being called: AWS
or ThirdParty
.
*
*
* @param owner
* The creator of the action type being called: AWS
or ThirdParty
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ActionTypeIdentifier withOwner(String owner) {
setOwner(owner);
return this;
}
/**
*
* The provider of the action type being called. The provider name is supplied when the action type is created.
*
*
* @param provider
* The provider of the action type being called. The provider name is supplied when the action type is
* created.
*/
public void setProvider(String provider) {
this.provider = provider;
}
/**
*
* The provider of the action type being called. The provider name is supplied when the action type is created.
*
*
* @return The provider of the action type being called. The provider name is supplied when the action type is
* created.
*/
public String getProvider() {
return this.provider;
}
/**
*
* The provider of the action type being called. The provider name is supplied when the action type is created.
*
*
* @param provider
* The provider of the action type being called. The provider name is supplied when the action type is
* created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ActionTypeIdentifier withProvider(String provider) {
setProvider(provider);
return this;
}
/**
*
* A string that describes the action type version.
*
*
* @param version
* A string that describes the action type version.
*/
public void setVersion(String version) {
this.version = version;
}
/**
*
* A string that describes the action type version.
*
*
* @return A string that describes the action type version.
*/
public String getVersion() {
return this.version;
}
/**
*
* A string that describes the action type version.
*
*
* @param version
* A string that describes the action type version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ActionTypeIdentifier withVersion(String version) {
setVersion(version);
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 (getOwner() != null)
sb.append("Owner: ").append(getOwner()).append(",");
if (getProvider() != null)
sb.append("Provider: ").append(getProvider()).append(",");
if (getVersion() != null)
sb.append("Version: ").append(getVersion());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ActionTypeIdentifier == false)
return false;
ActionTypeIdentifier other = (ActionTypeIdentifier) obj;
if (other.getCategory() == null ^ this.getCategory() == null)
return false;
if (other.getCategory() != null && other.getCategory().equals(this.getCategory()) == 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.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;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCategory() == null) ? 0 : getCategory().hashCode());
hashCode = prime * hashCode + ((getOwner() == null) ? 0 : getOwner().hashCode());
hashCode = prime * hashCode + ((getProvider() == null) ? 0 : getProvider().hashCode());
hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode());
return hashCode;
}
@Override
public ActionTypeIdentifier clone() {
try {
return (ActionTypeIdentifier) 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.codepipeline.model.transform.ActionTypeIdentifierMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}