/** * 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 CodeBuild { namespace Model { /** */ class CreateWebhookRequest : public CodeBuildRequest { public: AWS_CODEBUILD_API CreateWebhookRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateWebhook"; } AWS_CODEBUILD_API Aws::String SerializePayload() const override; AWS_CODEBUILD_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the CodeBuild project.

*/ inline const Aws::String& GetProjectName() const{ return m_projectName; } /** *

The name of the CodeBuild project.

*/ inline bool ProjectNameHasBeenSet() const { return m_projectNameHasBeenSet; } /** *

The name of the CodeBuild project.

*/ inline void SetProjectName(const Aws::String& value) { m_projectNameHasBeenSet = true; m_projectName = value; } /** *

The name of the CodeBuild project.

*/ inline void SetProjectName(Aws::String&& value) { m_projectNameHasBeenSet = true; m_projectName = std::move(value); } /** *

The name of the CodeBuild project.

*/ inline void SetProjectName(const char* value) { m_projectNameHasBeenSet = true; m_projectName.assign(value); } /** *

The name of the CodeBuild project.

*/ inline CreateWebhookRequest& WithProjectName(const Aws::String& value) { SetProjectName(value); return *this;} /** *

The name of the CodeBuild project.

*/ inline CreateWebhookRequest& WithProjectName(Aws::String&& value) { SetProjectName(std::move(value)); return *this;} /** *

The name of the CodeBuild project.

*/ inline CreateWebhookRequest& WithProjectName(const char* value) { SetProjectName(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 CreateWebhookRequest& 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 CreateWebhookRequest& 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 CreateWebhookRequest& 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 CreateWebhookRequest& 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 CreateWebhookRequest& 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 CreateWebhookRequest& 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 CreateWebhookRequest& 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 CreateWebhookRequest& WithBuildType(const WebhookBuildType& value) { SetBuildType(value); return *this;} /** *

Specifies the type of build this webhook will trigger.

*/ inline CreateWebhookRequest& WithBuildType(WebhookBuildType&& value) { SetBuildType(std::move(value)); return *this;} private: Aws::String m_projectName; bool m_projectNameHasBeenSet = false; Aws::String m_branchFilter; bool m_branchFilterHasBeenSet = false; Aws::Vector> m_filterGroups; bool m_filterGroupsHasBeenSet = false; WebhookBuildType m_buildType; bool m_buildTypeHasBeenSet = false; }; } // namespace Model } // namespace CodeBuild } // namespace Aws