/** * 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 AppRunner { namespace Model { /** *

Describes the source deployed to an App Runner service. It can be a code or * an image repository.

See Also:

AWS * API Reference

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

The description of a source code repository.

You must provide either * this member or ImageRepository (but not both).

*/ inline const CodeRepository& GetCodeRepository() const{ return m_codeRepository; } /** *

The description of a source code repository.

You must provide either * this member or ImageRepository (but not both).

*/ inline bool CodeRepositoryHasBeenSet() const { return m_codeRepositoryHasBeenSet; } /** *

The description of a source code repository.

You must provide either * this member or ImageRepository (but not both).

*/ inline void SetCodeRepository(const CodeRepository& value) { m_codeRepositoryHasBeenSet = true; m_codeRepository = value; } /** *

The description of a source code repository.

You must provide either * this member or ImageRepository (but not both).

*/ inline void SetCodeRepository(CodeRepository&& value) { m_codeRepositoryHasBeenSet = true; m_codeRepository = std::move(value); } /** *

The description of a source code repository.

You must provide either * this member or ImageRepository (but not both).

*/ inline SourceConfiguration& WithCodeRepository(const CodeRepository& value) { SetCodeRepository(value); return *this;} /** *

The description of a source code repository.

You must provide either * this member or ImageRepository (but not both).

*/ inline SourceConfiguration& WithCodeRepository(CodeRepository&& value) { SetCodeRepository(std::move(value)); return *this;} /** *

The description of a source image repository.

You must provide either * this member or CodeRepository (but not both).

*/ inline const ImageRepository& GetImageRepository() const{ return m_imageRepository; } /** *

The description of a source image repository.

You must provide either * this member or CodeRepository (but not both).

*/ inline bool ImageRepositoryHasBeenSet() const { return m_imageRepositoryHasBeenSet; } /** *

The description of a source image repository.

You must provide either * this member or CodeRepository (but not both).

*/ inline void SetImageRepository(const ImageRepository& value) { m_imageRepositoryHasBeenSet = true; m_imageRepository = value; } /** *

The description of a source image repository.

You must provide either * this member or CodeRepository (but not both).

*/ inline void SetImageRepository(ImageRepository&& value) { m_imageRepositoryHasBeenSet = true; m_imageRepository = std::move(value); } /** *

The description of a source image repository.

You must provide either * this member or CodeRepository (but not both).

*/ inline SourceConfiguration& WithImageRepository(const ImageRepository& value) { SetImageRepository(value); return *this;} /** *

The description of a source image repository.

You must provide either * this member or CodeRepository (but not both).

*/ inline SourceConfiguration& WithImageRepository(ImageRepository&& value) { SetImageRepository(std::move(value)); return *this;} /** *

If true, continuous integration from the source repository is * enabled for the App Runner service. Each repository change (including any source * code commit or new image version) starts a deployment.

Default: App * Runner sets to false for a source image that uses an ECR Public * repository or an ECR repository that's in an Amazon Web Services account other * than the one that the service is in. App Runner sets to true in all * other cases (which currently include a source code repository or a source image * using a same-account ECR repository).

*/ inline bool GetAutoDeploymentsEnabled() const{ return m_autoDeploymentsEnabled; } /** *

If true, continuous integration from the source repository is * enabled for the App Runner service. Each repository change (including any source * code commit or new image version) starts a deployment.

Default: App * Runner sets to false for a source image that uses an ECR Public * repository or an ECR repository that's in an Amazon Web Services account other * than the one that the service is in. App Runner sets to true in all * other cases (which currently include a source code repository or a source image * using a same-account ECR repository).

*/ inline bool AutoDeploymentsEnabledHasBeenSet() const { return m_autoDeploymentsEnabledHasBeenSet; } /** *

If true, continuous integration from the source repository is * enabled for the App Runner service. Each repository change (including any source * code commit or new image version) starts a deployment.

Default: App * Runner sets to false for a source image that uses an ECR Public * repository or an ECR repository that's in an Amazon Web Services account other * than the one that the service is in. App Runner sets to true in all * other cases (which currently include a source code repository or a source image * using a same-account ECR repository).

*/ inline void SetAutoDeploymentsEnabled(bool value) { m_autoDeploymentsEnabledHasBeenSet = true; m_autoDeploymentsEnabled = value; } /** *

If true, continuous integration from the source repository is * enabled for the App Runner service. Each repository change (including any source * code commit or new image version) starts a deployment.

Default: App * Runner sets to false for a source image that uses an ECR Public * repository or an ECR repository that's in an Amazon Web Services account other * than the one that the service is in. App Runner sets to true in all * other cases (which currently include a source code repository or a source image * using a same-account ECR repository).

*/ inline SourceConfiguration& WithAutoDeploymentsEnabled(bool value) { SetAutoDeploymentsEnabled(value); return *this;} /** *

Describes the resources that are needed to authenticate access to some source * repositories.

*/ inline const AuthenticationConfiguration& GetAuthenticationConfiguration() const{ return m_authenticationConfiguration; } /** *

Describes the resources that are needed to authenticate access to some source * repositories.

*/ inline bool AuthenticationConfigurationHasBeenSet() const { return m_authenticationConfigurationHasBeenSet; } /** *

Describes the resources that are needed to authenticate access to some source * repositories.

*/ inline void SetAuthenticationConfiguration(const AuthenticationConfiguration& value) { m_authenticationConfigurationHasBeenSet = true; m_authenticationConfiguration = value; } /** *

Describes the resources that are needed to authenticate access to some source * repositories.

*/ inline void SetAuthenticationConfiguration(AuthenticationConfiguration&& value) { m_authenticationConfigurationHasBeenSet = true; m_authenticationConfiguration = std::move(value); } /** *

Describes the resources that are needed to authenticate access to some source * repositories.

*/ inline SourceConfiguration& WithAuthenticationConfiguration(const AuthenticationConfiguration& value) { SetAuthenticationConfiguration(value); return *this;} /** *

Describes the resources that are needed to authenticate access to some source * repositories.

*/ inline SourceConfiguration& WithAuthenticationConfiguration(AuthenticationConfiguration&& value) { SetAuthenticationConfiguration(std::move(value)); return *this;} private: CodeRepository m_codeRepository; bool m_codeRepositoryHasBeenSet = false; ImageRepository m_imageRepository; bool m_imageRepositoryHasBeenSet = false; bool m_autoDeploymentsEnabled; bool m_autoDeploymentsEnabledHasBeenSet = false; AuthenticationConfiguration m_authenticationConfiguration; bool m_authenticationConfigurationHasBeenSet = false; }; } // namespace Model } // namespace AppRunner } // namespace Aws