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

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

Go to download

The AWS Java SDK for AWS Code Build module holds the client classes that are used for communicating with AWS Code Build.

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.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 UpdateWebhookRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The name of the 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; /** *

* A boolean value that specifies whether the associated GitHub repository's secret token should be updated. If you * use Bitbucket for your repository, rotateSecret is ignored. *

*/ private Boolean rotateSecret; /** *

* An array of arrays of WebhookFilter objects used to determine if a webhook event can trigger a * build. A filter group must contain at least one EVENT WebhookFilter. *

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

* Specifies the type of build this webhook will trigger. *

*/ private String buildType; /** *

* The name of the CodeBuild project. *

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

* The name of the CodeBuild project. *

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

* The name of the CodeBuild project. *

* * @param projectName * The name of the CodeBuild project. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateWebhookRequest 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 UpdateWebhookRequest withBranchFilter(String branchFilter) { setBranchFilter(branchFilter); return this; } /** *

* A boolean value that specifies whether the associated GitHub repository's secret token should be updated. If you * use Bitbucket for your repository, rotateSecret is ignored. *

* * @param rotateSecret * A boolean value that specifies whether the associated GitHub repository's secret token should be updated. * If you use Bitbucket for your repository, rotateSecret is ignored. */ public void setRotateSecret(Boolean rotateSecret) { this.rotateSecret = rotateSecret; } /** *

* A boolean value that specifies whether the associated GitHub repository's secret token should be updated. If you * use Bitbucket for your repository, rotateSecret is ignored. *

* * @return A boolean value that specifies whether the associated GitHub repository's secret token should be updated. * If you use Bitbucket for your repository, rotateSecret is ignored. */ public Boolean getRotateSecret() { return this.rotateSecret; } /** *

* A boolean value that specifies whether the associated GitHub repository's secret token should be updated. If you * use Bitbucket for your repository, rotateSecret is ignored. *

* * @param rotateSecret * A boolean value that specifies whether the associated GitHub repository's secret token should be updated. * If you use Bitbucket for your repository, rotateSecret is ignored. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateWebhookRequest withRotateSecret(Boolean rotateSecret) { setRotateSecret(rotateSecret); return this; } /** *

* A boolean value that specifies whether the associated GitHub repository's secret token should be updated. If you * use Bitbucket for your repository, rotateSecret is ignored. *

* * @return A boolean value that specifies whether the associated GitHub repository's secret token should be updated. * If you use Bitbucket for your repository, rotateSecret is ignored. */ public Boolean isRotateSecret() { return this.rotateSecret; } /** *

* An array of arrays of WebhookFilter objects used to determine if a webhook event can trigger a * build. A filter group must contain at least one EVENT WebhookFilter. *

* * @return An array of arrays of WebhookFilter objects used to determine if a webhook event can trigger * a build. A filter group must contain at least one EVENT WebhookFilter. */ public java.util.List> getFilterGroups() { return filterGroups; } /** *

* An array of arrays of WebhookFilter objects used to determine if a webhook event can trigger a * build. A filter group must contain at least one EVENT WebhookFilter. *

* * @param filterGroups * An array of arrays of WebhookFilter objects used to determine if a webhook event can trigger * a build. A filter group must contain at least one EVENT WebhookFilter. */ 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 if a webhook event can trigger a * build. A filter group must contain at least one EVENT WebhookFilter. *

*

* 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 if a webhook event can trigger * a build. A filter group must contain at least one EVENT WebhookFilter. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateWebhookRequest 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 if a webhook event can trigger a * build. A filter group must contain at least one EVENT WebhookFilter. *

* * @param filterGroups * An array of arrays of WebhookFilter objects used to determine if a webhook event can trigger * a build. A filter group must contain at least one EVENT WebhookFilter. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateWebhookRequest withFilterGroups(java.util.Collection> filterGroups) { setFilterGroups(filterGroups); return this; } /** *

* Specifies the type of build this webhook will trigger. *

* * @param buildType * Specifies the type of build this webhook will trigger. * @see WebhookBuildType */ public void setBuildType(String buildType) { this.buildType = buildType; } /** *

* Specifies the type of build this webhook will trigger. *

* * @return Specifies the type of build this webhook will trigger. * @see WebhookBuildType */ public String getBuildType() { return this.buildType; } /** *

* Specifies the type of build this webhook will trigger. *

* * @param buildType * Specifies the type of build this webhook will trigger. * @return Returns a reference to this object so that method calls can be chained together. * @see WebhookBuildType */ public UpdateWebhookRequest withBuildType(String buildType) { setBuildType(buildType); return this; } /** *

* Specifies the type of build this webhook will trigger. *

* * @param buildType * Specifies the type of build this webhook will trigger. * @return Returns a reference to this object so that method calls can be chained together. * @see WebhookBuildType */ public UpdateWebhookRequest withBuildType(WebhookBuildType buildType) { this.buildType = buildType.toString(); 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 (getRotateSecret() != null) sb.append("RotateSecret: ").append(getRotateSecret()).append(","); if (getFilterGroups() != null) sb.append("FilterGroups: ").append(getFilterGroups()).append(","); if (getBuildType() != null) sb.append("BuildType: ").append(getBuildType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateWebhookRequest == false) return false; UpdateWebhookRequest other = (UpdateWebhookRequest) 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.getRotateSecret() == null ^ this.getRotateSecret() == null) return false; if (other.getRotateSecret() != null && other.getRotateSecret().equals(this.getRotateSecret()) == false) return false; if (other.getFilterGroups() == null ^ this.getFilterGroups() == null) return false; if (other.getFilterGroups() != null && other.getFilterGroups().equals(this.getFilterGroups()) == false) return false; if (other.getBuildType() == null ^ this.getBuildType() == null) return false; if (other.getBuildType() != null && other.getBuildType().equals(this.getBuildType()) == 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 + ((getRotateSecret() == null) ? 0 : getRotateSecret().hashCode()); hashCode = prime * hashCode + ((getFilterGroups() == null) ? 0 : getFilterGroups().hashCode()); hashCode = prime * hashCode + ((getBuildType() == null) ? 0 : getBuildType().hashCode()); return hashCode; } @Override public UpdateWebhookRequest clone() { return (UpdateWebhookRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy