/* * Copyright 2018-2023 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about a webhook that connects repository events to a build project in CodeBuild. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Webhook implements Serializable, Cloneable, StructuredPojo { /** ** The URL to the webhook. *
*/ private String url; /** ** The CodeBuild endpoint where webhook events are sent. *
*/ private String payloadUrl; /** ** The secret token of the associated repository. *
*
* A Bitbucket webhook does not support secret
.
*
* 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
.
*
* 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.
*
* Specifies the type of build this webhook will trigger. *
*/ private String buildType; /** ** A timestamp that indicates the last time a repository's secret token was modified. *
*/ private java.util.Date lastModifiedSecret; /** ** The URL to the webhook. *
* * @param url * The URL to the webhook. */ public void setUrl(String url) { this.url = url; } /** ** The URL to the webhook. *
* * @return The URL to the webhook. */ public String getUrl() { return this.url; } /** ** The URL to the webhook. *
* * @param url * The URL to the webhook. * @return Returns a reference to this object so that method calls can be chained together. */ public Webhook withUrl(String url) { setUrl(url); return this; } /** ** The CodeBuild endpoint where webhook events are sent. *
* * @param payloadUrl * The CodeBuild endpoint where webhook events are sent. */ public void setPayloadUrl(String payloadUrl) { this.payloadUrl = payloadUrl; } /** ** The CodeBuild endpoint where webhook events are sent. *
* * @return The CodeBuild endpoint where webhook events are sent. */ public String getPayloadUrl() { return this.payloadUrl; } /** ** The CodeBuild endpoint where webhook events are sent. *
* * @param payloadUrl * The CodeBuild endpoint where webhook events are sent. * @return Returns a reference to this object so that method calls can be chained together. */ public Webhook withPayloadUrl(String payloadUrl) { setPayloadUrl(payloadUrl); return this; } /** ** The secret token of the associated repository. *
*
* A Bitbucket webhook does not support secret
.
*
* A Bitbucket webhook does not support secret
.
*
* The secret token of the associated repository. *
*
* A Bitbucket webhook does not support secret
.
*
* A Bitbucket webhook does not support secret
.
*
* The secret token of the associated repository. *
*
* A Bitbucket webhook does not support secret
.
*
* A Bitbucket webhook does not support secret
.
*
* 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
.
*
branchFilter
is
* empty, then all branches are built.
* It is recommended that you use filterGroups
instead of 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
.
*
branchFilter
is
* empty, then all branches are built.
* It is recommended that you use filterGroups
instead of 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
.
*
branchFilter
is
* empty, then all branches are built.
* It is recommended that you use filterGroups
instead of 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.
*
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
* An array of arrays of
* 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.ListWebhookFilter
objects used to determine which webhooks are triggered. At least
* one WebhookFilter
in the array must specify EVENT
as its type
.
* filterGroups
array must pass. For a
* filter group to pass, each of its filters must pass.
* 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
* An array of arrays of
* For a build to be triggered, at least one filter group in the
* 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.
* filterGroups
array must pass.
* For a filter group to pass, each of its filters must pass.
*/
public void setFilterGroups(java.util.CollectionWebhookFilter
objects used to determine which webhooks are triggered. At least
* one WebhookFilter
in the array must specify EVENT
as its type
.
* filterGroups
array must pass. For a
* filter group to pass, each of its filters must pass.
* 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
* An array of arrays of
* 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 Webhook withFilterGroups(java.util.ListWebhookFilter
objects used to determine which webhooks are triggered. At least
* one WebhookFilter
in the array must specify EVENT
as its type
.
* filterGroups
array must pass. For a
* filter group to pass, each of its filters must pass.
* 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
* Specifies the type of build this webhook will trigger.
*
* Specifies the type of build this webhook will trigger.
*
* Specifies the type of build this webhook will trigger.
*
* Specifies the type of build this webhook will trigger.
*
* A timestamp that indicates the last time a repository's secret token was modified.
*
* A timestamp that indicates the last time a repository's secret token was modified.
*
* A timestamp that indicates the last time a repository's secret token was modified.
* 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 Webhook withFilterGroups(java.util.Collection