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

Describes the automated branch creation configuration.

See * Also:

AWS * API Reference

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

Describes the current stage for the autocreated branch.

*/ inline const Stage& GetStage() const{ return m_stage; } /** *

Describes the current stage for the autocreated branch.

*/ inline bool StageHasBeenSet() const { return m_stageHasBeenSet; } /** *

Describes the current stage for the autocreated branch.

*/ inline void SetStage(const Stage& value) { m_stageHasBeenSet = true; m_stage = value; } /** *

Describes the current stage for the autocreated branch.

*/ inline void SetStage(Stage&& value) { m_stageHasBeenSet = true; m_stage = std::move(value); } /** *

Describes the current stage for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithStage(const Stage& value) { SetStage(value); return *this;} /** *

Describes the current stage for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithStage(Stage&& value) { SetStage(std::move(value)); return *this;} /** *

The framework for the autocreated branch.

*/ inline const Aws::String& GetFramework() const{ return m_framework; } /** *

The framework for the autocreated branch.

*/ inline bool FrameworkHasBeenSet() const { return m_frameworkHasBeenSet; } /** *

The framework for the autocreated branch.

*/ inline void SetFramework(const Aws::String& value) { m_frameworkHasBeenSet = true; m_framework = value; } /** *

The framework for the autocreated branch.

*/ inline void SetFramework(Aws::String&& value) { m_frameworkHasBeenSet = true; m_framework = std::move(value); } /** *

The framework for the autocreated branch.

*/ inline void SetFramework(const char* value) { m_frameworkHasBeenSet = true; m_framework.assign(value); } /** *

The framework for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithFramework(const Aws::String& value) { SetFramework(value); return *this;} /** *

The framework for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithFramework(Aws::String&& value) { SetFramework(std::move(value)); return *this;} /** *

The framework for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithFramework(const char* value) { SetFramework(value); return *this;} /** *

Enables auto building for the autocreated branch.

*/ inline bool GetEnableAutoBuild() const{ return m_enableAutoBuild; } /** *

Enables auto building for the autocreated branch.

*/ inline bool EnableAutoBuildHasBeenSet() const { return m_enableAutoBuildHasBeenSet; } /** *

Enables auto building for the autocreated branch.

*/ inline void SetEnableAutoBuild(bool value) { m_enableAutoBuildHasBeenSet = true; m_enableAutoBuild = value; } /** *

Enables auto building for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithEnableAutoBuild(bool value) { SetEnableAutoBuild(value); return *this;} /** *

The environment variables for the autocreated branch.

*/ inline const Aws::Map& GetEnvironmentVariables() const{ return m_environmentVariables; } /** *

The environment variables for the autocreated branch.

*/ inline bool EnvironmentVariablesHasBeenSet() const { return m_environmentVariablesHasBeenSet; } /** *

The environment variables for the autocreated branch.

*/ inline void SetEnvironmentVariables(const Aws::Map& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables = value; } /** *

The environment variables for the autocreated branch.

*/ inline void SetEnvironmentVariables(Aws::Map&& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables = std::move(value); } /** *

The environment variables for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithEnvironmentVariables(const Aws::Map& value) { SetEnvironmentVariables(value); return *this;} /** *

The environment variables for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithEnvironmentVariables(Aws::Map&& value) { SetEnvironmentVariables(std::move(value)); return *this;} /** *

The environment variables for the autocreated branch.

*/ inline AutoBranchCreationConfig& AddEnvironmentVariables(const Aws::String& key, const Aws::String& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(key, value); return *this; } /** *

The environment variables for the autocreated branch.

*/ inline AutoBranchCreationConfig& AddEnvironmentVariables(Aws::String&& key, const Aws::String& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(std::move(key), value); return *this; } /** *

The environment variables for the autocreated branch.

*/ inline AutoBranchCreationConfig& AddEnvironmentVariables(const Aws::String& key, Aws::String&& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(key, std::move(value)); return *this; } /** *

The environment variables for the autocreated branch.

*/ inline AutoBranchCreationConfig& AddEnvironmentVariables(Aws::String&& key, Aws::String&& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(std::move(key), std::move(value)); return *this; } /** *

The environment variables for the autocreated branch.

*/ inline AutoBranchCreationConfig& AddEnvironmentVariables(const char* key, Aws::String&& value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(key, std::move(value)); return *this; } /** *

The environment variables for the autocreated branch.

*/ inline AutoBranchCreationConfig& AddEnvironmentVariables(Aws::String&& key, const char* value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(std::move(key), value); return *this; } /** *

The environment variables for the autocreated branch.

*/ inline AutoBranchCreationConfig& AddEnvironmentVariables(const char* key, const char* value) { m_environmentVariablesHasBeenSet = true; m_environmentVariables.emplace(key, value); return *this; } /** *

The basic authorization credentials for the autocreated branch. You must * base64-encode the authorization credentials and provide them in the format * user:password.

*/ inline const Aws::String& GetBasicAuthCredentials() const{ return m_basicAuthCredentials; } /** *

The basic authorization credentials for the autocreated branch. You must * base64-encode the authorization credentials and provide them in the format * user:password.

*/ inline bool BasicAuthCredentialsHasBeenSet() const { return m_basicAuthCredentialsHasBeenSet; } /** *

The basic authorization credentials for the autocreated branch. You must * base64-encode the authorization credentials and provide them in the format * user:password.

*/ inline void SetBasicAuthCredentials(const Aws::String& value) { m_basicAuthCredentialsHasBeenSet = true; m_basicAuthCredentials = value; } /** *

The basic authorization credentials for the autocreated branch. You must * base64-encode the authorization credentials and provide them in the format * user:password.

*/ inline void SetBasicAuthCredentials(Aws::String&& value) { m_basicAuthCredentialsHasBeenSet = true; m_basicAuthCredentials = std::move(value); } /** *

The basic authorization credentials for the autocreated branch. You must * base64-encode the authorization credentials and provide them in the format * user:password.

*/ inline void SetBasicAuthCredentials(const char* value) { m_basicAuthCredentialsHasBeenSet = true; m_basicAuthCredentials.assign(value); } /** *

The basic authorization credentials for the autocreated branch. You must * base64-encode the authorization credentials and provide them in the format * user:password.

*/ inline AutoBranchCreationConfig& WithBasicAuthCredentials(const Aws::String& value) { SetBasicAuthCredentials(value); return *this;} /** *

The basic authorization credentials for the autocreated branch. You must * base64-encode the authorization credentials and provide them in the format * user:password.

*/ inline AutoBranchCreationConfig& WithBasicAuthCredentials(Aws::String&& value) { SetBasicAuthCredentials(std::move(value)); return *this;} /** *

The basic authorization credentials for the autocreated branch. You must * base64-encode the authorization credentials and provide them in the format * user:password.

*/ inline AutoBranchCreationConfig& WithBasicAuthCredentials(const char* value) { SetBasicAuthCredentials(value); return *this;} /** *

Enables basic authorization for the autocreated branch.

*/ inline bool GetEnableBasicAuth() const{ return m_enableBasicAuth; } /** *

Enables basic authorization for the autocreated branch.

*/ inline bool EnableBasicAuthHasBeenSet() const { return m_enableBasicAuthHasBeenSet; } /** *

Enables basic authorization for the autocreated branch.

*/ inline void SetEnableBasicAuth(bool value) { m_enableBasicAuthHasBeenSet = true; m_enableBasicAuth = value; } /** *

Enables basic authorization for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithEnableBasicAuth(bool value) { SetEnableBasicAuth(value); return *this;} /** *

Enables performance mode for the branch.

Performance mode optimizes * for faster hosting performance by keeping content cached at the edge for a * longer interval. When performance mode is enabled, hosting configuration or code * changes can take up to 10 minutes to roll out.

*/ inline bool GetEnablePerformanceMode() const{ return m_enablePerformanceMode; } /** *

Enables performance mode for the branch.

Performance mode optimizes * for faster hosting performance by keeping content cached at the edge for a * longer interval. When performance mode is enabled, hosting configuration or code * changes can take up to 10 minutes to roll out.

*/ inline bool EnablePerformanceModeHasBeenSet() const { return m_enablePerformanceModeHasBeenSet; } /** *

Enables performance mode for the branch.

Performance mode optimizes * for faster hosting performance by keeping content cached at the edge for a * longer interval. When performance mode is enabled, hosting configuration or code * changes can take up to 10 minutes to roll out.

*/ inline void SetEnablePerformanceMode(bool value) { m_enablePerformanceModeHasBeenSet = true; m_enablePerformanceMode = value; } /** *

Enables performance mode for the branch.

Performance mode optimizes * for faster hosting performance by keeping content cached at the edge for a * longer interval. When performance mode is enabled, hosting configuration or code * changes can take up to 10 minutes to roll out.

*/ inline AutoBranchCreationConfig& WithEnablePerformanceMode(bool value) { SetEnablePerformanceMode(value); return *this;} /** *

The build specification (build spec) for the autocreated branch.

*/ inline const Aws::String& GetBuildSpec() const{ return m_buildSpec; } /** *

The build specification (build spec) for the autocreated branch.

*/ inline bool BuildSpecHasBeenSet() const { return m_buildSpecHasBeenSet; } /** *

The build specification (build spec) for the autocreated branch.

*/ inline void SetBuildSpec(const Aws::String& value) { m_buildSpecHasBeenSet = true; m_buildSpec = value; } /** *

The build specification (build spec) for the autocreated branch.

*/ inline void SetBuildSpec(Aws::String&& value) { m_buildSpecHasBeenSet = true; m_buildSpec = std::move(value); } /** *

The build specification (build spec) for the autocreated branch.

*/ inline void SetBuildSpec(const char* value) { m_buildSpecHasBeenSet = true; m_buildSpec.assign(value); } /** *

The build specification (build spec) for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithBuildSpec(const Aws::String& value) { SetBuildSpec(value); return *this;} /** *

The build specification (build spec) for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithBuildSpec(Aws::String&& value) { SetBuildSpec(std::move(value)); return *this;} /** *

The build specification (build spec) for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithBuildSpec(const char* value) { SetBuildSpec(value); return *this;} /** *

Enables pull request previews for the autocreated branch.

*/ inline bool GetEnablePullRequestPreview() const{ return m_enablePullRequestPreview; } /** *

Enables pull request previews for the autocreated branch.

*/ inline bool EnablePullRequestPreviewHasBeenSet() const { return m_enablePullRequestPreviewHasBeenSet; } /** *

Enables pull request previews for the autocreated branch.

*/ inline void SetEnablePullRequestPreview(bool value) { m_enablePullRequestPreviewHasBeenSet = true; m_enablePullRequestPreview = value; } /** *

Enables pull request previews for the autocreated branch.

*/ inline AutoBranchCreationConfig& WithEnablePullRequestPreview(bool value) { SetEnablePullRequestPreview(value); return *this;} /** *

The Amplify environment name for the pull request.

*/ inline const Aws::String& GetPullRequestEnvironmentName() const{ return m_pullRequestEnvironmentName; } /** *

The Amplify environment name for the pull request.

*/ inline bool PullRequestEnvironmentNameHasBeenSet() const { return m_pullRequestEnvironmentNameHasBeenSet; } /** *

The Amplify environment name for the pull request.

*/ inline void SetPullRequestEnvironmentName(const Aws::String& value) { m_pullRequestEnvironmentNameHasBeenSet = true; m_pullRequestEnvironmentName = value; } /** *

The Amplify environment name for the pull request.

*/ inline void SetPullRequestEnvironmentName(Aws::String&& value) { m_pullRequestEnvironmentNameHasBeenSet = true; m_pullRequestEnvironmentName = std::move(value); } /** *

The Amplify environment name for the pull request.

*/ inline void SetPullRequestEnvironmentName(const char* value) { m_pullRequestEnvironmentNameHasBeenSet = true; m_pullRequestEnvironmentName.assign(value); } /** *

The Amplify environment name for the pull request.

*/ inline AutoBranchCreationConfig& WithPullRequestEnvironmentName(const Aws::String& value) { SetPullRequestEnvironmentName(value); return *this;} /** *

The Amplify environment name for the pull request.

*/ inline AutoBranchCreationConfig& WithPullRequestEnvironmentName(Aws::String&& value) { SetPullRequestEnvironmentName(std::move(value)); return *this;} /** *

The Amplify environment name for the pull request.

*/ inline AutoBranchCreationConfig& WithPullRequestEnvironmentName(const char* value) { SetPullRequestEnvironmentName(value); return *this;} private: Stage m_stage; bool m_stageHasBeenSet = false; Aws::String m_framework; bool m_frameworkHasBeenSet = false; bool m_enableAutoBuild; bool m_enableAutoBuildHasBeenSet = false; Aws::Map m_environmentVariables; bool m_environmentVariablesHasBeenSet = false; Aws::String m_basicAuthCredentials; bool m_basicAuthCredentialsHasBeenSet = false; bool m_enableBasicAuth; bool m_enableBasicAuthHasBeenSet = false; bool m_enablePerformanceMode; bool m_enablePerformanceModeHasBeenSet = false; Aws::String m_buildSpec; bool m_buildSpecHasBeenSet = false; bool m_enablePullRequestPreview; bool m_enablePullRequestPreviewHasBeenSet = false; Aws::String m_pullRequestEnvironmentName; bool m_pullRequestEnvironmentNameHasBeenSet = false; }; } // namespace Model } // namespace Amplify } // namespace Aws