/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CodeBuild { namespace Model { /** *

Information about a webhook that connects repository events to a build * project in CodeBuild.

See Also:

AWS * API Reference

*/ class Webhook { public: AWS_CODEBUILD_API Webhook(); AWS_CODEBUILD_API Webhook(Aws::Utils::Json::JsonView jsonValue); AWS_CODEBUILD_API Webhook& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CODEBUILD_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The URL to the webhook.

*/ inline const Aws::String& GetUrl() const{ return m_url; } /** *

The URL to the webhook.

*/ inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; } /** *

The URL to the webhook.

*/ inline void SetUrl(const Aws::String& value) { m_urlHasBeenSet = true; m_url = value; } /** *

The URL to the webhook.

*/ inline void SetUrl(Aws::String&& value) { m_urlHasBeenSet = true; m_url = std::move(value); } /** *

The URL to the webhook.

*/ inline void SetUrl(const char* value) { m_urlHasBeenSet = true; m_url.assign(value); } /** *

The URL to the webhook.

*/ inline Webhook& WithUrl(const Aws::String& value) { SetUrl(value); return *this;} /** *

The URL to the webhook.

*/ inline Webhook& WithUrl(Aws::String&& value) { SetUrl(std::move(value)); return *this;} /** *

The URL to the webhook.

*/ inline Webhook& WithUrl(const char* value) { SetUrl(value); return *this;} /** *

The CodeBuild endpoint where webhook events are sent.

*/ inline const Aws::String& GetPayloadUrl() const{ return m_payloadUrl; } /** *

The CodeBuild endpoint where webhook events are sent.

*/ inline bool PayloadUrlHasBeenSet() const { return m_payloadUrlHasBeenSet; } /** *

The CodeBuild endpoint where webhook events are sent.

*/ inline void SetPayloadUrl(const Aws::String& value) { m_payloadUrlHasBeenSet = true; m_payloadUrl = value; } /** *

The CodeBuild endpoint where webhook events are sent.

*/ inline void SetPayloadUrl(Aws::String&& value) { m_payloadUrlHasBeenSet = true; m_payloadUrl = std::move(value); } /** *

The CodeBuild endpoint where webhook events are sent.

*/ inline void SetPayloadUrl(const char* value) { m_payloadUrlHasBeenSet = true; m_payloadUrl.assign(value); } /** *

The CodeBuild endpoint where webhook events are sent.

*/ inline Webhook& WithPayloadUrl(const Aws::String& value) { SetPayloadUrl(value); return *this;} /** *

The CodeBuild endpoint where webhook events are sent.

*/ inline Webhook& WithPayloadUrl(Aws::String&& value) { SetPayloadUrl(std::move(value)); return *this;} /** *

The CodeBuild endpoint where webhook events are sent.

*/ inline Webhook& WithPayloadUrl(const char* value) { SetPayloadUrl(value); return *this;} /** *

The secret token of the associated repository.

A Bitbucket * webhook does not support secret.

*/ inline const Aws::String& GetSecret() const{ return m_secret; } /** *

The secret token of the associated repository.

A Bitbucket * webhook does not support secret.

*/ inline bool SecretHasBeenSet() const { return m_secretHasBeenSet; } /** *

The secret token of the associated repository.

A Bitbucket * webhook does not support secret.

*/ inline void SetSecret(const Aws::String& value) { m_secretHasBeenSet = true; m_secret = value; } /** *

The secret token of the associated repository.

A Bitbucket * webhook does not support secret.

*/ inline void SetSecret(Aws::String&& value) { m_secretHasBeenSet = true; m_secret = std::move(value); } /** *

The secret token of the associated repository.

A Bitbucket * webhook does not support secret.

*/ inline void SetSecret(const char* value) { m_secretHasBeenSet = true; m_secret.assign(value); } /** *

The secret token of the associated repository.

A Bitbucket * webhook does not support secret.

*/ inline Webhook& WithSecret(const Aws::String& value) { SetSecret(value); return *this;} /** *

The secret token of the associated repository.

A Bitbucket * webhook does not support secret.

*/ inline Webhook& WithSecret(Aws::String&& value) { SetSecret(std::move(value)); return *this;} /** *

The secret token of the associated repository.

A Bitbucket * webhook does not support secret.

*/ inline Webhook& WithSecret(const char* value) { SetSecret(value); 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.

*/ inline const Aws::String& GetBranchFilter() const{ return m_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.

*/ inline bool BranchFilterHasBeenSet() const { return m_branchFilterHasBeenSet; } /** *

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.

*/ inline void SetBranchFilter(const Aws::String& value) { m_branchFilterHasBeenSet = true; m_branchFilter = value; } /** *

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.

*/ inline void SetBranchFilter(Aws::String&& value) { m_branchFilterHasBeenSet = true; m_branchFilter = std::move(value); } /** *

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.

*/ inline void SetBranchFilter(const char* value) { m_branchFilterHasBeenSet = true; m_branchFilter.assign(value); } /** *

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.

*/ inline Webhook& WithBranchFilter(const Aws::String& value) { SetBranchFilter(value); 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.

*/ inline Webhook& WithBranchFilter(Aws::String&& value) { SetBranchFilter(std::move(value)); 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.

*/ inline Webhook& WithBranchFilter(const char* value) { SetBranchFilter(value); 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.

*/ inline const Aws::Vector>& GetFilterGroups() const{ return m_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.

*/ inline bool FilterGroupsHasBeenSet() const { return m_filterGroupsHasBeenSet; } /** *

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.

*/ inline void SetFilterGroups(const Aws::Vector>& value) { m_filterGroupsHasBeenSet = true; m_filterGroups = value; } /** *

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.

*/ inline void SetFilterGroups(Aws::Vector>&& value) { m_filterGroupsHasBeenSet = true; m_filterGroups = std::move(value); } /** *

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.

*/ inline Webhook& WithFilterGroups(const Aws::Vector>& value) { SetFilterGroups(value); 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.

*/ inline Webhook& WithFilterGroups(Aws::Vector>&& value) { SetFilterGroups(std::move(value)); 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.

*/ inline Webhook& AddFilterGroups(const Aws::Vector& value) { m_filterGroupsHasBeenSet = true; m_filterGroups.push_back(value); 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.

*/ inline Webhook& AddFilterGroups(Aws::Vector&& value) { m_filterGroupsHasBeenSet = true; m_filterGroups.push_back(std::move(value)); return *this; } /** *

Specifies the type of build this webhook will trigger.

*/ inline const WebhookBuildType& GetBuildType() const{ return m_buildType; } /** *

Specifies the type of build this webhook will trigger.

*/ inline bool BuildTypeHasBeenSet() const { return m_buildTypeHasBeenSet; } /** *

Specifies the type of build this webhook will trigger.

*/ inline void SetBuildType(const WebhookBuildType& value) { m_buildTypeHasBeenSet = true; m_buildType = value; } /** *

Specifies the type of build this webhook will trigger.

*/ inline void SetBuildType(WebhookBuildType&& value) { m_buildTypeHasBeenSet = true; m_buildType = std::move(value); } /** *

Specifies the type of build this webhook will trigger.

*/ inline Webhook& WithBuildType(const WebhookBuildType& value) { SetBuildType(value); return *this;} /** *

Specifies the type of build this webhook will trigger.

*/ inline Webhook& WithBuildType(WebhookBuildType&& value) { SetBuildType(std::move(value)); return *this;} /** *

A timestamp that indicates the last time a repository's secret token was * modified.

*/ inline const Aws::Utils::DateTime& GetLastModifiedSecret() const{ return m_lastModifiedSecret; } /** *

A timestamp that indicates the last time a repository's secret token was * modified.

*/ inline bool LastModifiedSecretHasBeenSet() const { return m_lastModifiedSecretHasBeenSet; } /** *

A timestamp that indicates the last time a repository's secret token was * modified.

*/ inline void SetLastModifiedSecret(const Aws::Utils::DateTime& value) { m_lastModifiedSecretHasBeenSet = true; m_lastModifiedSecret = value; } /** *

A timestamp that indicates the last time a repository's secret token was * modified.

*/ inline void SetLastModifiedSecret(Aws::Utils::DateTime&& value) { m_lastModifiedSecretHasBeenSet = true; m_lastModifiedSecret = std::move(value); } /** *

A timestamp that indicates the last time a repository's secret token was * modified.

*/ inline Webhook& WithLastModifiedSecret(const Aws::Utils::DateTime& value) { SetLastModifiedSecret(value); return *this;} /** *

A timestamp that indicates the last time a repository's secret token was * modified.

*/ inline Webhook& WithLastModifiedSecret(Aws::Utils::DateTime&& value) { SetLastModifiedSecret(std::move(value)); return *this;} private: Aws::String m_url; bool m_urlHasBeenSet = false; Aws::String m_payloadUrl; bool m_payloadUrlHasBeenSet = false; Aws::String m_secret; bool m_secretHasBeenSet = false; Aws::String m_branchFilter; bool m_branchFilterHasBeenSet = false; Aws::Vector> m_filterGroups; bool m_filterGroupsHasBeenSet = false; WebhookBuildType m_buildType; bool m_buildTypeHasBeenSet = false; Aws::Utils::DateTime m_lastModifiedSecret; bool m_lastModifiedSecretHasBeenSet = false; }; } // namespace Model } // namespace CodeBuild } // namespace Aws