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

Request to create an ApiKey resource.

See Also:

AWS * API Reference

*/ class CreateApiKeyRequest : public APIGatewayRequest { public: AWS_APIGATEWAY_API CreateApiKeyRequest(); // 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 "CreateApiKey"; } AWS_APIGATEWAY_API Aws::String SerializePayload() const override; /** *

The name of the ApiKey.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the ApiKey.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the ApiKey.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the ApiKey.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the ApiKey.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the ApiKey.

*/ inline CreateApiKeyRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the ApiKey.

*/ inline CreateApiKeyRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the ApiKey.

*/ inline CreateApiKeyRequest& WithName(const char* value) { SetName(value); return *this;} /** *

The description of the ApiKey.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description of the ApiKey.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description of the ApiKey.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description of the ApiKey.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description of the ApiKey.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description of the ApiKey.

*/ inline CreateApiKeyRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description of the ApiKey.

*/ inline CreateApiKeyRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description of the ApiKey.

*/ inline CreateApiKeyRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

Specifies whether the ApiKey can be used by callers.

*/ inline bool GetEnabled() const{ return m_enabled; } /** *

Specifies whether the ApiKey can be used by callers.

*/ inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; } /** *

Specifies whether the ApiKey can be used by callers.

*/ inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; } /** *

Specifies whether the ApiKey can be used by callers.

*/ inline CreateApiKeyRequest& WithEnabled(bool value) { SetEnabled(value); return *this;} /** *

Specifies whether (true) or not (false) the key * identifier is distinct from the created API key value. This parameter is * deprecated and should not be used.

*/ inline bool GetGenerateDistinctId() const{ return m_generateDistinctId; } /** *

Specifies whether (true) or not (false) the key * identifier is distinct from the created API key value. This parameter is * deprecated and should not be used.

*/ inline bool GenerateDistinctIdHasBeenSet() const { return m_generateDistinctIdHasBeenSet; } /** *

Specifies whether (true) or not (false) the key * identifier is distinct from the created API key value. This parameter is * deprecated and should not be used.

*/ inline void SetGenerateDistinctId(bool value) { m_generateDistinctIdHasBeenSet = true; m_generateDistinctId = value; } /** *

Specifies whether (true) or not (false) the key * identifier is distinct from the created API key value. This parameter is * deprecated and should not be used.

*/ inline CreateApiKeyRequest& WithGenerateDistinctId(bool value) { SetGenerateDistinctId(value); return *this;} /** *

Specifies a value of the API key.

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

Specifies a value of the API key.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

Specifies a value of the API key.

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

Specifies a value of the API key.

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

Specifies a value of the API key.

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

Specifies a value of the API key.

*/ inline CreateApiKeyRequest& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

Specifies a value of the API key.

*/ inline CreateApiKeyRequest& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

Specifies a value of the API key.

*/ inline CreateApiKeyRequest& WithValue(const char* value) { SetValue(value); return *this;} /** *

DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API * key.

*/ inline const Aws::Vector& GetStageKeys() const{ return m_stageKeys; } /** *

DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API * key.

*/ inline bool StageKeysHasBeenSet() const { return m_stageKeysHasBeenSet; } /** *

DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API * key.

*/ inline void SetStageKeys(const Aws::Vector& value) { m_stageKeysHasBeenSet = true; m_stageKeys = value; } /** *

DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API * key.

*/ inline void SetStageKeys(Aws::Vector&& value) { m_stageKeysHasBeenSet = true; m_stageKeys = std::move(value); } /** *

DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API * key.

*/ inline CreateApiKeyRequest& WithStageKeys(const Aws::Vector& value) { SetStageKeys(value); return *this;} /** *

DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API * key.

*/ inline CreateApiKeyRequest& WithStageKeys(Aws::Vector&& value) { SetStageKeys(std::move(value)); return *this;} /** *

DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API * key.

*/ inline CreateApiKeyRequest& AddStageKeys(const StageKey& value) { m_stageKeysHasBeenSet = true; m_stageKeys.push_back(value); return *this; } /** *

DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API * key.

*/ inline CreateApiKeyRequest& AddStageKeys(StageKey&& value) { m_stageKeysHasBeenSet = true; m_stageKeys.push_back(std::move(value)); return *this; } /** *

An AWS Marketplace customer identifier , when integrating with the AWS SaaS * Marketplace.

*/ inline const Aws::String& GetCustomerId() const{ return m_customerId; } /** *

An AWS Marketplace customer identifier , when integrating with the AWS SaaS * Marketplace.

*/ inline bool CustomerIdHasBeenSet() const { return m_customerIdHasBeenSet; } /** *

An AWS Marketplace customer identifier , when integrating with the AWS SaaS * Marketplace.

*/ inline void SetCustomerId(const Aws::String& value) { m_customerIdHasBeenSet = true; m_customerId = value; } /** *

An AWS Marketplace customer identifier , when integrating with the AWS SaaS * Marketplace.

*/ inline void SetCustomerId(Aws::String&& value) { m_customerIdHasBeenSet = true; m_customerId = std::move(value); } /** *

An AWS Marketplace customer identifier , when integrating with the AWS SaaS * Marketplace.

*/ inline void SetCustomerId(const char* value) { m_customerIdHasBeenSet = true; m_customerId.assign(value); } /** *

An AWS Marketplace customer identifier , when integrating with the AWS SaaS * Marketplace.

*/ inline CreateApiKeyRequest& WithCustomerId(const Aws::String& value) { SetCustomerId(value); return *this;} /** *

An AWS Marketplace customer identifier , when integrating with the AWS SaaS * Marketplace.

*/ inline CreateApiKeyRequest& WithCustomerId(Aws::String&& value) { SetCustomerId(std::move(value)); return *this;} /** *

An AWS Marketplace customer identifier , when integrating with the AWS SaaS * Marketplace.

*/ inline CreateApiKeyRequest& WithCustomerId(const char* value) { SetCustomerId(value); return *this;} /** *

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

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

The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The * tag key can be up to 128 characters and must not start with aws:. * The tag value can be up to 256 characters.

*/ inline CreateApiKeyRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; bool m_enabled; bool m_enabledHasBeenSet = false; bool m_generateDistinctId; bool m_generateDistinctIdHasBeenSet = false; Aws::String m_value; bool m_valueHasBeenSet = false; Aws::Vector m_stageKeys; bool m_stageKeysHasBeenSet = false; Aws::String m_customerId; bool m_customerIdHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace APIGateway } // namespace Aws