/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace CodeBuild { namespace Model { /** */ class ImportSourceCredentialsRequest : public CodeBuildRequest { public: AWS_CODEBUILD_API ImportSourceCredentialsRequest(); // 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 "ImportSourceCredentials"; } AWS_CODEBUILD_API Aws::String SerializePayload() const override; AWS_CODEBUILD_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The Bitbucket username when the authType is BASIC_AUTH. This * parameter is not valid for other types of source providers or connections.

*/ inline const Aws::String& GetUsername() const{ return m_username; } /** *

The Bitbucket username when the authType is BASIC_AUTH. This * parameter is not valid for other types of source providers or connections.

*/ inline bool UsernameHasBeenSet() const { return m_usernameHasBeenSet; } /** *

The Bitbucket username when the authType is BASIC_AUTH. This * parameter is not valid for other types of source providers or connections.

*/ inline void SetUsername(const Aws::String& value) { m_usernameHasBeenSet = true; m_username = value; } /** *

The Bitbucket username when the authType is BASIC_AUTH. This * parameter is not valid for other types of source providers or connections.

*/ inline void SetUsername(Aws::String&& value) { m_usernameHasBeenSet = true; m_username = std::move(value); } /** *

The Bitbucket username when the authType is BASIC_AUTH. This * parameter is not valid for other types of source providers or connections.

*/ inline void SetUsername(const char* value) { m_usernameHasBeenSet = true; m_username.assign(value); } /** *

The Bitbucket username when the authType is BASIC_AUTH. This * parameter is not valid for other types of source providers or connections.

*/ inline ImportSourceCredentialsRequest& WithUsername(const Aws::String& value) { SetUsername(value); return *this;} /** *

The Bitbucket username when the authType is BASIC_AUTH. This * parameter is not valid for other types of source providers or connections.

*/ inline ImportSourceCredentialsRequest& WithUsername(Aws::String&& value) { SetUsername(std::move(value)); return *this;} /** *

The Bitbucket username when the authType is BASIC_AUTH. This * parameter is not valid for other types of source providers or connections.

*/ inline ImportSourceCredentialsRequest& WithUsername(const char* value) { SetUsername(value); return *this;} /** *

For GitHub or GitHub Enterprise, this is the personal access token. For * Bitbucket, this is the app password.

*/ inline const Aws::String& GetToken() const{ return m_token; } /** *

For GitHub or GitHub Enterprise, this is the personal access token. For * Bitbucket, this is the app password.

*/ inline bool TokenHasBeenSet() const { return m_tokenHasBeenSet; } /** *

For GitHub or GitHub Enterprise, this is the personal access token. For * Bitbucket, this is the app password.

*/ inline void SetToken(const Aws::String& value) { m_tokenHasBeenSet = true; m_token = value; } /** *

For GitHub or GitHub Enterprise, this is the personal access token. For * Bitbucket, this is the app password.

*/ inline void SetToken(Aws::String&& value) { m_tokenHasBeenSet = true; m_token = std::move(value); } /** *

For GitHub or GitHub Enterprise, this is the personal access token. For * Bitbucket, this is the app password.

*/ inline void SetToken(const char* value) { m_tokenHasBeenSet = true; m_token.assign(value); } /** *

For GitHub or GitHub Enterprise, this is the personal access token. For * Bitbucket, this is the app password.

*/ inline ImportSourceCredentialsRequest& WithToken(const Aws::String& value) { SetToken(value); return *this;} /** *

For GitHub or GitHub Enterprise, this is the personal access token. For * Bitbucket, this is the app password.

*/ inline ImportSourceCredentialsRequest& WithToken(Aws::String&& value) { SetToken(std::move(value)); return *this;} /** *

For GitHub or GitHub Enterprise, this is the personal access token. For * Bitbucket, this is the app password.

*/ inline ImportSourceCredentialsRequest& WithToken(const char* value) { SetToken(value); return *this;} /** *

The source provider used for this project.

*/ inline const ServerType& GetServerType() const{ return m_serverType; } /** *

The source provider used for this project.

*/ inline bool ServerTypeHasBeenSet() const { return m_serverTypeHasBeenSet; } /** *

The source provider used for this project.

*/ inline void SetServerType(const ServerType& value) { m_serverTypeHasBeenSet = true; m_serverType = value; } /** *

The source provider used for this project.

*/ inline void SetServerType(ServerType&& value) { m_serverTypeHasBeenSet = true; m_serverType = std::move(value); } /** *

The source provider used for this project.

*/ inline ImportSourceCredentialsRequest& WithServerType(const ServerType& value) { SetServerType(value); return *this;} /** *

The source provider used for this project.

*/ inline ImportSourceCredentialsRequest& WithServerType(ServerType&& value) { SetServerType(std::move(value)); return *this;} /** *

The type of authentication used to connect to a GitHub, GitHub Enterprise, * or Bitbucket repository. An OAUTH connection is not supported by the API and * must be created using the CodeBuild console.

*/ inline const AuthType& GetAuthType() const{ return m_authType; } /** *

The type of authentication used to connect to a GitHub, GitHub Enterprise, * or Bitbucket repository. An OAUTH connection is not supported by the API and * must be created using the CodeBuild console.

*/ inline bool AuthTypeHasBeenSet() const { return m_authTypeHasBeenSet; } /** *

The type of authentication used to connect to a GitHub, GitHub Enterprise, * or Bitbucket repository. An OAUTH connection is not supported by the API and * must be created using the CodeBuild console.

*/ inline void SetAuthType(const AuthType& value) { m_authTypeHasBeenSet = true; m_authType = value; } /** *

The type of authentication used to connect to a GitHub, GitHub Enterprise, * or Bitbucket repository. An OAUTH connection is not supported by the API and * must be created using the CodeBuild console.

*/ inline void SetAuthType(AuthType&& value) { m_authTypeHasBeenSet = true; m_authType = std::move(value); } /** *

The type of authentication used to connect to a GitHub, GitHub Enterprise, * or Bitbucket repository. An OAUTH connection is not supported by the API and * must be created using the CodeBuild console.

*/ inline ImportSourceCredentialsRequest& WithAuthType(const AuthType& value) { SetAuthType(value); return *this;} /** *

The type of authentication used to connect to a GitHub, GitHub Enterprise, * or Bitbucket repository. An OAUTH connection is not supported by the API and * must be created using the CodeBuild console.

*/ inline ImportSourceCredentialsRequest& WithAuthType(AuthType&& value) { SetAuthType(std::move(value)); return *this;} /** *

Set to false to prevent overwriting the repository source * credentials. Set to true to overwrite the repository source * credentials. The default value is true.

*/ inline bool GetShouldOverwrite() const{ return m_shouldOverwrite; } /** *

Set to false to prevent overwriting the repository source * credentials. Set to true to overwrite the repository source * credentials. The default value is true.

*/ inline bool ShouldOverwriteHasBeenSet() const { return m_shouldOverwriteHasBeenSet; } /** *

Set to false to prevent overwriting the repository source * credentials. Set to true to overwrite the repository source * credentials. The default value is true.

*/ inline void SetShouldOverwrite(bool value) { m_shouldOverwriteHasBeenSet = true; m_shouldOverwrite = value; } /** *

Set to false to prevent overwriting the repository source * credentials. Set to true to overwrite the repository source * credentials. The default value is true.

*/ inline ImportSourceCredentialsRequest& WithShouldOverwrite(bool value) { SetShouldOverwrite(value); return *this;} private: Aws::String m_username; bool m_usernameHasBeenSet = false; Aws::String m_token; bool m_tokenHasBeenSet = false; ServerType m_serverType; bool m_serverTypeHasBeenSet = false; AuthType m_authType; bool m_authTypeHasBeenSet = false; bool m_shouldOverwrite; bool m_shouldOverwriteHasBeenSet = false; }; } // namespace Model } // namespace CodeBuild } // namespace Aws