/** * 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 #include namespace Aws { namespace CodeGuruReviewer { namespace Model { /** */ class AssociateRepositoryRequest : public CodeGuruReviewerRequest { public: AWS_CODEGURUREVIEWER_API AssociateRepositoryRequest(); // 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 "AssociateRepository"; } AWS_CODEGURUREVIEWER_API Aws::String SerializePayload() const override; /** *

The repository to associate.

*/ inline const Repository& GetRepository() const{ return m_repository; } /** *

The repository to associate.

*/ inline bool RepositoryHasBeenSet() const { return m_repositoryHasBeenSet; } /** *

The repository to associate.

*/ inline void SetRepository(const Repository& value) { m_repositoryHasBeenSet = true; m_repository = value; } /** *

The repository to associate.

*/ inline void SetRepository(Repository&& value) { m_repositoryHasBeenSet = true; m_repository = std::move(value); } /** *

The repository to associate.

*/ inline AssociateRepositoryRequest& WithRepository(const Repository& value) { SetRepository(value); return *this;} /** *

The repository to associate.

*/ inline AssociateRepositoryRequest& WithRepository(Repository&& value) { SetRepository(std::move(value)); return *this;} /** *

Amazon CodeGuru Reviewer uses this value to prevent the accidental creation * of duplicate repository associations if there are failures and retries.

*/ inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; } /** *

Amazon CodeGuru Reviewer uses this value to prevent the accidental creation * of duplicate repository associations if there are failures and retries.

*/ inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; } /** *

Amazon CodeGuru Reviewer uses this value to prevent the accidental creation * of duplicate repository associations if there are failures and retries.

*/ inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; } /** *

Amazon CodeGuru Reviewer uses this value to prevent the accidental creation * of duplicate repository associations if there are failures and retries.

*/ inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); } /** *

Amazon CodeGuru Reviewer uses this value to prevent the accidental creation * of duplicate repository associations if there are failures and retries.

*/ inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); } /** *

Amazon CodeGuru Reviewer uses this value to prevent the accidental creation * of duplicate repository associations if there are failures and retries.

*/ inline AssociateRepositoryRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;} /** *

Amazon CodeGuru Reviewer uses this value to prevent the accidental creation * of duplicate repository associations if there are failures and retries.

*/ inline AssociateRepositoryRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;} /** *

Amazon CodeGuru Reviewer uses this value to prevent the accidental creation * of duplicate repository associations if there are failures and retries.

*/ inline AssociateRepositoryRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;} /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline const Aws::Map& GetTags() const{ return m_tags; } /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline void SetTags(const Aws::Map& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline void SetTags(Aws::Map&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline AssociateRepositoryRequest& WithTags(const Aws::Map& value) { SetTags(value); return *this;} /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline AssociateRepositoryRequest& WithTags(Aws::Map&& value) { SetTags(std::move(value)); return *this;} /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline AssociateRepositoryRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline AssociateRepositoryRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline AssociateRepositoryRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline AssociateRepositoryRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline AssociateRepositoryRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline AssociateRepositoryRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

An array of key-value pairs used to tag an associated repository. A tag is a * custom attribute label with two parts:

  • A tag key (for * example, CostCenter, Environment, * Project, or Secret). Tag keys are case sensitive.

    *
  • An optional field known as a tag value (for example, * 111122223333, Production, or a team name). Omitting * the tag value is the same as using an empty string. Like tag keys, tag values * are case sensitive.

*/ inline AssociateRepositoryRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

A KMSKeyDetails object that contains:

  • The * encryption option for this repository association. It is either owned by Amazon * Web Services Key Management Service (KMS) (AWS_OWNED_CMK) or * customer managed (CUSTOMER_MANAGED_CMK).

  • The ID * of the Amazon Web Services KMS key that is associated with this repository * association.

*/ inline const KMSKeyDetails& GetKMSKeyDetails() const{ return m_kMSKeyDetails; } /** *

A KMSKeyDetails object that contains:

  • The * encryption option for this repository association. It is either owned by Amazon * Web Services Key Management Service (KMS) (AWS_OWNED_CMK) or * customer managed (CUSTOMER_MANAGED_CMK).

  • The ID * of the Amazon Web Services KMS key that is associated with this repository * association.

*/ inline bool KMSKeyDetailsHasBeenSet() const { return m_kMSKeyDetailsHasBeenSet; } /** *

A KMSKeyDetails object that contains:

  • The * encryption option for this repository association. It is either owned by Amazon * Web Services Key Management Service (KMS) (AWS_OWNED_CMK) or * customer managed (CUSTOMER_MANAGED_CMK).

  • The ID * of the Amazon Web Services KMS key that is associated with this repository * association.

*/ inline void SetKMSKeyDetails(const KMSKeyDetails& value) { m_kMSKeyDetailsHasBeenSet = true; m_kMSKeyDetails = value; } /** *

A KMSKeyDetails object that contains:

  • The * encryption option for this repository association. It is either owned by Amazon * Web Services Key Management Service (KMS) (AWS_OWNED_CMK) or * customer managed (CUSTOMER_MANAGED_CMK).

  • The ID * of the Amazon Web Services KMS key that is associated with this repository * association.

*/ inline void SetKMSKeyDetails(KMSKeyDetails&& value) { m_kMSKeyDetailsHasBeenSet = true; m_kMSKeyDetails = std::move(value); } /** *

A KMSKeyDetails object that contains:

  • The * encryption option for this repository association. It is either owned by Amazon * Web Services Key Management Service (KMS) (AWS_OWNED_CMK) or * customer managed (CUSTOMER_MANAGED_CMK).

  • The ID * of the Amazon Web Services KMS key that is associated with this repository * association.

*/ inline AssociateRepositoryRequest& WithKMSKeyDetails(const KMSKeyDetails& value) { SetKMSKeyDetails(value); return *this;} /** *

A KMSKeyDetails object that contains:

  • The * encryption option for this repository association. It is either owned by Amazon * Web Services Key Management Service (KMS) (AWS_OWNED_CMK) or * customer managed (CUSTOMER_MANAGED_CMK).

  • The ID * of the Amazon Web Services KMS key that is associated with this repository * association.

*/ inline AssociateRepositoryRequest& WithKMSKeyDetails(KMSKeyDetails&& value) { SetKMSKeyDetails(std::move(value)); return *this;} private: Repository m_repository; bool m_repositoryHasBeenSet = false; Aws::String m_clientRequestToken; bool m_clientRequestTokenHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; KMSKeyDetails m_kMSKeyDetails; bool m_kMSKeyDetailsHasBeenSet = false; }; } // namespace Model } // namespace CodeGuruReviewer } // namespace Aws