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

com.amazonaws.services.codebuild.model.CreateWebhookRequest Maven / Gradle / Ivy

/*
 * Copyright 2014-2019 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.codebuild.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

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

    /**
     * 

* The name of the AWS CodeBuild project. *

*/ private String projectName; /** *

* A regular expression used to determine which repository branches are built when a webhook is triggered. If the * name of a branch matches the regular expression, then it is built. If branchFilter is empty, then * all branches are built. *

* *

* It is recommended that you use filterGroups instead of branchFilter. *

*
*/ private String branchFilter; /** *

* An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least * one WebhookFilter in the array must specify EVENT as its type. *

*

* For a build to be triggered, at least one filter group in the filterGroups array must pass. For a * filter group to pass, each of its filters must pass. *

*/ private java.util.List> filterGroups; /** *

* The name of the AWS CodeBuild project. *

* * @param projectName * The name of the AWS CodeBuild project. */ public void setProjectName(String projectName) { this.projectName = projectName; } /** *

* The name of the AWS CodeBuild project. *

* * @return The name of the AWS CodeBuild project. */ public String getProjectName() { return this.projectName; } /** *

* The name of the AWS CodeBuild project. *

* * @param projectName * The name of the AWS CodeBuild project. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWebhookRequest withProjectName(String projectName) { setProjectName(projectName); return this; } /** *

* A regular expression used to determine which repository branches are built when a webhook is triggered. If the * name of a branch matches the regular expression, then it is built. If branchFilter is empty, then * all branches are built. *

* *

* It is recommended that you use filterGroups instead of branchFilter. *

*
* * @param branchFilter * A regular expression used to determine which repository branches are built when a webhook is triggered. If * the name of a branch matches the regular expression, then it is built. If branchFilter is * empty, then all branches are built.

*

* It is recommended that you use filterGroups instead of branchFilter. *

*/ public void setBranchFilter(String branchFilter) { this.branchFilter = branchFilter; } /** *

* A regular expression used to determine which repository branches are built when a webhook is triggered. If the * name of a branch matches the regular expression, then it is built. If branchFilter is empty, then * all branches are built. *

* *

* It is recommended that you use filterGroups instead of branchFilter. *

*
* * @return A regular expression used to determine which repository branches are built when a webhook is triggered. * If the name of a branch matches the regular expression, then it is built. If branchFilter is * empty, then all branches are built.

*

* It is recommended that you use filterGroups instead of branchFilter. *

*/ public String getBranchFilter() { return this.branchFilter; } /** *

* A regular expression used to determine which repository branches are built when a webhook is triggered. If the * name of a branch matches the regular expression, then it is built. If branchFilter is empty, then * all branches are built. *

* *

* It is recommended that you use filterGroups instead of branchFilter. *

*
* * @param branchFilter * A regular expression used to determine which repository branches are built when a webhook is triggered. If * the name of a branch matches the regular expression, then it is built. If branchFilter is * empty, then all branches are built.

*

* It is recommended that you use filterGroups instead of branchFilter. *

* @return Returns a reference to this object so that method calls can be chained together. */ public CreateWebhookRequest withBranchFilter(String branchFilter) { setBranchFilter(branchFilter); return this; } /** *

* An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least * one WebhookFilter in the array must specify EVENT as its type. *

*

* For a build to be triggered, at least one filter group in the filterGroups array must pass. For a * filter group to pass, each of its filters must pass. *

* * @return An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. * At least one WebhookFilter in the array must specify EVENT as its * type.

*

* For a build to be triggered, at least one filter group in the filterGroups array must pass. * For a filter group to pass, each of its filters must pass. */ public java.util.List> getFilterGroups() { return filterGroups; } /** *

* An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least * one WebhookFilter in the array must specify EVENT as its type. *

*

* For a build to be triggered, at least one filter group in the filterGroups array must pass. For a * filter group to pass, each of its filters must pass. *

* * @param filterGroups * An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. * At least one WebhookFilter in the array must specify EVENT as its * type.

*

* For a build to be triggered, at least one filter group in the filterGroups array must pass. * For a filter group to pass, each of its filters must pass. */ public void setFilterGroups(java.util.Collection> filterGroups) { if (filterGroups == null) { this.filterGroups = null; return; } this.filterGroups = new java.util.ArrayList>(filterGroups); } /** *

* An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least * one WebhookFilter in the array must specify EVENT as its type. *

*

* For a build to be triggered, at least one filter group in the filterGroups array must pass. For a * filter group to pass, each of its filters must pass. *

*

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

* * @param filterGroups * An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. * At least one WebhookFilter in the array must specify EVENT as its * type.

*

* For a build to be triggered, at least one filter group in the filterGroups array must pass. * For a filter group to pass, each of its filters must pass. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWebhookRequest withFilterGroups(java.util.List... filterGroups) { if (this.filterGroups == null) { setFilterGroups(new java.util.ArrayList>(filterGroups.length)); } for (java.util.List ele : filterGroups) { this.filterGroups.add(ele); } return this; } /** *

* An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. At least * one WebhookFilter in the array must specify EVENT as its type. *

*

* For a build to be triggered, at least one filter group in the filterGroups array must pass. For a * filter group to pass, each of its filters must pass. *

* * @param filterGroups * An array of arrays of WebhookFilter objects used to determine which webhooks are triggered. * At least one WebhookFilter in the array must specify EVENT as its * type.

*

* For a build to be triggered, at least one filter group in the filterGroups array must pass. * For a filter group to pass, each of its filters must pass. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWebhookRequest withFilterGroups(java.util.Collection> filterGroups) { setFilterGroups(filterGroups); 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 (getProjectName() != null) sb.append("ProjectName: ").append(getProjectName()).append(","); if (getBranchFilter() != null) sb.append("BranchFilter: ").append(getBranchFilter()).append(","); if (getFilterGroups() != null) sb.append("FilterGroups: ").append(getFilterGroups()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateWebhookRequest == false) return false; CreateWebhookRequest other = (CreateWebhookRequest) obj; if (other.getProjectName() == null ^ this.getProjectName() == null) return false; if (other.getProjectName() != null && other.getProjectName().equals(this.getProjectName()) == false) return false; if (other.getBranchFilter() == null ^ this.getBranchFilter() == null) return false; if (other.getBranchFilter() != null && other.getBranchFilter().equals(this.getBranchFilter()) == false) return false; if (other.getFilterGroups() == null ^ this.getFilterGroups() == null) return false; if (other.getFilterGroups() != null && other.getFilterGroups().equals(this.getFilterGroups()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProjectName() == null) ? 0 : getProjectName().hashCode()); hashCode = prime * hashCode + ((getBranchFilter() == null) ? 0 : getBranchFilter().hashCode()); hashCode = prime * hashCode + ((getFilterGroups() == null) ? 0 : getFilterGroups().hashCode()); return hashCode; } @Override public CreateWebhookRequest clone() { return (CreateWebhookRequest) super.clone(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy