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

com.amazonaws.services.codepipeline.model.GitConfiguration Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS CodePipeline module holds the client classes that are used for communicating with AWS CodePipeline

There is a newer version: 1.12.772
Show newest version
/*
 * 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.codepipeline.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A type of trigger configuration for Git-based source actions. *

* *

* You can specify the Git configuration trigger type for all third-party Git-based source actions that are supported by * the CodeStarSourceConnection action type. *

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

* The name of the pipeline source action where the trigger configuration, such as Git tags, is specified. The * trigger configuration will start the pipeline upon the specified change only. *

* *

* You can only specify one trigger configuration per source action. *

*
*/ private String sourceActionName; /** *

* The field where the repository event that will start the pipeline, such as pushing Git tags, is specified with * details. *

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

* The field where the repository event that will start the pipeline is specified as pull requests. *

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

* The name of the pipeline source action where the trigger configuration, such as Git tags, is specified. The * trigger configuration will start the pipeline upon the specified change only. *

* *

* You can only specify one trigger configuration per source action. *

*
* * @param sourceActionName * The name of the pipeline source action where the trigger configuration, such as Git tags, is specified. * The trigger configuration will start the pipeline upon the specified change only.

*

* You can only specify one trigger configuration per source action. *

*/ public void setSourceActionName(String sourceActionName) { this.sourceActionName = sourceActionName; } /** *

* The name of the pipeline source action where the trigger configuration, such as Git tags, is specified. The * trigger configuration will start the pipeline upon the specified change only. *

* *

* You can only specify one trigger configuration per source action. *

*
* * @return The name of the pipeline source action where the trigger configuration, such as Git tags, is specified. * The trigger configuration will start the pipeline upon the specified change only.

*

* You can only specify one trigger configuration per source action. *

*/ public String getSourceActionName() { return this.sourceActionName; } /** *

* The name of the pipeline source action where the trigger configuration, such as Git tags, is specified. The * trigger configuration will start the pipeline upon the specified change only. *

* *

* You can only specify one trigger configuration per source action. *

*
* * @param sourceActionName * The name of the pipeline source action where the trigger configuration, such as Git tags, is specified. * The trigger configuration will start the pipeline upon the specified change only.

*

* You can only specify one trigger configuration per source action. *

* @return Returns a reference to this object so that method calls can be chained together. */ public GitConfiguration withSourceActionName(String sourceActionName) { setSourceActionName(sourceActionName); return this; } /** *

* The field where the repository event that will start the pipeline, such as pushing Git tags, is specified with * details. *

* * @return The field where the repository event that will start the pipeline, such as pushing Git tags, is specified * with details. */ public java.util.List getPush() { return push; } /** *

* The field where the repository event that will start the pipeline, such as pushing Git tags, is specified with * details. *

* * @param push * The field where the repository event that will start the pipeline, such as pushing Git tags, is specified * with details. */ public void setPush(java.util.Collection push) { if (push == null) { this.push = null; return; } this.push = new java.util.ArrayList(push); } /** *

* The field where the repository event that will start the pipeline, such as pushing Git tags, is specified with * details. *

*

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

* * @param push * The field where the repository event that will start the pipeline, such as pushing Git tags, is specified * with details. * @return Returns a reference to this object so that method calls can be chained together. */ public GitConfiguration withPush(GitPushFilter... push) { if (this.push == null) { setPush(new java.util.ArrayList(push.length)); } for (GitPushFilter ele : push) { this.push.add(ele); } return this; } /** *

* The field where the repository event that will start the pipeline, such as pushing Git tags, is specified with * details. *

* * @param push * The field where the repository event that will start the pipeline, such as pushing Git tags, is specified * with details. * @return Returns a reference to this object so that method calls can be chained together. */ public GitConfiguration withPush(java.util.Collection push) { setPush(push); return this; } /** *

* The field where the repository event that will start the pipeline is specified as pull requests. *

* * @return The field where the repository event that will start the pipeline is specified as pull requests. */ public java.util.List getPullRequest() { return pullRequest; } /** *

* The field where the repository event that will start the pipeline is specified as pull requests. *

* * @param pullRequest * The field where the repository event that will start the pipeline is specified as pull requests. */ public void setPullRequest(java.util.Collection pullRequest) { if (pullRequest == null) { this.pullRequest = null; return; } this.pullRequest = new java.util.ArrayList(pullRequest); } /** *

* The field where the repository event that will start the pipeline is specified as pull requests. *

*

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

* * @param pullRequest * The field where the repository event that will start the pipeline is specified as pull requests. * @return Returns a reference to this object so that method calls can be chained together. */ public GitConfiguration withPullRequest(GitPullRequestFilter... pullRequest) { if (this.pullRequest == null) { setPullRequest(new java.util.ArrayList(pullRequest.length)); } for (GitPullRequestFilter ele : pullRequest) { this.pullRequest.add(ele); } return this; } /** *

* The field where the repository event that will start the pipeline is specified as pull requests. *

* * @param pullRequest * The field where the repository event that will start the pipeline is specified as pull requests. * @return Returns a reference to this object so that method calls can be chained together. */ public GitConfiguration withPullRequest(java.util.Collection pullRequest) { setPullRequest(pullRequest); 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 (getSourceActionName() != null) sb.append("SourceActionName: ").append(getSourceActionName()).append(","); if (getPush() != null) sb.append("Push: ").append(getPush()).append(","); if (getPullRequest() != null) sb.append("PullRequest: ").append(getPullRequest()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GitConfiguration == false) return false; GitConfiguration other = (GitConfiguration) obj; if (other.getSourceActionName() == null ^ this.getSourceActionName() == null) return false; if (other.getSourceActionName() != null && other.getSourceActionName().equals(this.getSourceActionName()) == false) return false; if (other.getPush() == null ^ this.getPush() == null) return false; if (other.getPush() != null && other.getPush().equals(this.getPush()) == false) return false; if (other.getPullRequest() == null ^ this.getPullRequest() == null) return false; if (other.getPullRequest() != null && other.getPullRequest().equals(this.getPullRequest()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSourceActionName() == null) ? 0 : getSourceActionName().hashCode()); hashCode = prime * hashCode + ((getPush() == null) ? 0 : getPush().hashCode()); hashCode = prime * hashCode + ((getPullRequest() == null) ? 0 : getPullRequest().hashCode()); return hashCode; } @Override public GitConfiguration clone() { try { return (GitConfiguration) 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.GitConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy