/** * 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 LocationService { namespace Model { /** */ class CreateKeyRequest : public LocationServiceRequest { public: AWS_LOCATIONSERVICE_API CreateKeyRequest(); // 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 "CreateKey"; } AWS_LOCATIONSERVICE_API Aws::String SerializePayload() const override; /** *

An optional description for the API key resource.

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

An optional description for the API key resource.

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

An optional description for the API key resource.

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

An optional description for the API key resource.

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

An optional description for the API key resource.

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

An optional description for the API key resource.

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

An optional description for the API key resource.

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

An optional description for the API key resource.

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

The optional timestamp for when the API key resource will expire in ISO 8601 * format: YYYY-MM-DDThh:mm:ss.sssZ. One of NoExpiry or * ExpireTime must be set.

*/ inline const Aws::Utils::DateTime& GetExpireTime() const{ return m_expireTime; } /** *

The optional timestamp for when the API key resource will expire in ISO 8601 * format: YYYY-MM-DDThh:mm:ss.sssZ. One of NoExpiry or * ExpireTime must be set.

*/ inline bool ExpireTimeHasBeenSet() const { return m_expireTimeHasBeenSet; } /** *

The optional timestamp for when the API key resource will expire in ISO 8601 * format: YYYY-MM-DDThh:mm:ss.sssZ. One of NoExpiry or * ExpireTime must be set.

*/ inline void SetExpireTime(const Aws::Utils::DateTime& value) { m_expireTimeHasBeenSet = true; m_expireTime = value; } /** *

The optional timestamp for when the API key resource will expire in ISO 8601 * format: YYYY-MM-DDThh:mm:ss.sssZ. One of NoExpiry or * ExpireTime must be set.

*/ inline void SetExpireTime(Aws::Utils::DateTime&& value) { m_expireTimeHasBeenSet = true; m_expireTime = std::move(value); } /** *

The optional timestamp for when the API key resource will expire in ISO 8601 * format: YYYY-MM-DDThh:mm:ss.sssZ. One of NoExpiry or * ExpireTime must be set.

*/ inline CreateKeyRequest& WithExpireTime(const Aws::Utils::DateTime& value) { SetExpireTime(value); return *this;} /** *

The optional timestamp for when the API key resource will expire in ISO 8601 * format: YYYY-MM-DDThh:mm:ss.sssZ. One of NoExpiry or * ExpireTime must be set.

*/ inline CreateKeyRequest& WithExpireTime(Aws::Utils::DateTime&& value) { SetExpireTime(std::move(value)); return *this;} /** *

A custom name for the API key resource.

Requirements:

  • *

    Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods * (.), and underscores (_).

  • Must be a unique API key name.

    *
  • No spaces allowed. For example, ExampleAPIKey.

    *
*/ inline const Aws::String& GetKeyName() const{ return m_keyName; } /** *

A custom name for the API key resource.

Requirements:

  • *

    Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods * (.), and underscores (_).

  • Must be a unique API key name.

    *
  • No spaces allowed. For example, ExampleAPIKey.

    *
*/ inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; } /** *

A custom name for the API key resource.

Requirements:

  • *

    Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods * (.), and underscores (_).

  • Must be a unique API key name.

    *
  • No spaces allowed. For example, ExampleAPIKey.

    *
*/ inline void SetKeyName(const Aws::String& value) { m_keyNameHasBeenSet = true; m_keyName = value; } /** *

A custom name for the API key resource.

Requirements:

  • *

    Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods * (.), and underscores (_).

  • Must be a unique API key name.

    *
  • No spaces allowed. For example, ExampleAPIKey.

    *
*/ inline void SetKeyName(Aws::String&& value) { m_keyNameHasBeenSet = true; m_keyName = std::move(value); } /** *

A custom name for the API key resource.

Requirements:

  • *

    Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods * (.), and underscores (_).

  • Must be a unique API key name.

    *
  • No spaces allowed. For example, ExampleAPIKey.

    *
*/ inline void SetKeyName(const char* value) { m_keyNameHasBeenSet = true; m_keyName.assign(value); } /** *

A custom name for the API key resource.

Requirements:

  • *

    Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods * (.), and underscores (_).

  • Must be a unique API key name.

    *
  • No spaces allowed. For example, ExampleAPIKey.

    *
*/ inline CreateKeyRequest& WithKeyName(const Aws::String& value) { SetKeyName(value); return *this;} /** *

A custom name for the API key resource.

Requirements:

  • *

    Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods * (.), and underscores (_).

  • Must be a unique API key name.

    *
  • No spaces allowed. For example, ExampleAPIKey.

    *
*/ inline CreateKeyRequest& WithKeyName(Aws::String&& value) { SetKeyName(std::move(value)); return *this;} /** *

A custom name for the API key resource.

Requirements:

  • *

    Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods * (.), and underscores (_).

  • Must be a unique API key name.

    *
  • No spaces allowed. For example, ExampleAPIKey.

    *
*/ inline CreateKeyRequest& WithKeyName(const char* value) { SetKeyName(value); return *this;} /** *

Optionally set to true to set no expiration time for the API * key. One of NoExpiry or ExpireTime must be set.

*/ inline bool GetNoExpiry() const{ return m_noExpiry; } /** *

Optionally set to true to set no expiration time for the API * key. One of NoExpiry or ExpireTime must be set.

*/ inline bool NoExpiryHasBeenSet() const { return m_noExpiryHasBeenSet; } /** *

Optionally set to true to set no expiration time for the API * key. One of NoExpiry or ExpireTime must be set.

*/ inline void SetNoExpiry(bool value) { m_noExpiryHasBeenSet = true; m_noExpiry = value; } /** *

Optionally set to true to set no expiration time for the API * key. One of NoExpiry or ExpireTime must be set.

*/ inline CreateKeyRequest& WithNoExpiry(bool value) { SetNoExpiry(value); return *this;} /** *

The API key restrictions for the API key resource.

*/ inline const ApiKeyRestrictions& GetRestrictions() const{ return m_restrictions; } /** *

The API key restrictions for the API key resource.

*/ inline bool RestrictionsHasBeenSet() const { return m_restrictionsHasBeenSet; } /** *

The API key restrictions for the API key resource.

*/ inline void SetRestrictions(const ApiKeyRestrictions& value) { m_restrictionsHasBeenSet = true; m_restrictions = value; } /** *

The API key restrictions for the API key resource.

*/ inline void SetRestrictions(ApiKeyRestrictions&& value) { m_restrictionsHasBeenSet = true; m_restrictions = std::move(value); } /** *

The API key restrictions for the API key resource.

*/ inline CreateKeyRequest& WithRestrictions(const ApiKeyRestrictions& value) { SetRestrictions(value); return *this;} /** *

The API key restrictions for the API key resource.

*/ inline CreateKeyRequest& WithRestrictions(ApiKeyRestrictions&& value) { SetRestrictions(std::move(value)); return *this;} /** *

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

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

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

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

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

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

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

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

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

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

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

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

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

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

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

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

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

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

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

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

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

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

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

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

Applies one or more tags to the map resource. A tag is a key-value pair that * helps manage, identify, search, and filter your resources by labelling them.

*

Format: "key" : "value"

Restrictions:

  • *

    Maximum 50 tags per resource

  • Each resource tag must be * unique with a maximum of one value.

  • Maximum key length: 128 * Unicode characters in UTF-8

  • Maximum value length: 256 Unicode * characters in UTF-8

  • Can use alphanumeric characters (A–Z, a–z, * 0–9), and the following characters: + - = . _ : / @.

  • Cannot * use "aws:" as a prefix for a key.

*/ inline CreateKeyRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } private: Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Utils::DateTime m_expireTime; bool m_expireTimeHasBeenSet = false; Aws::String m_keyName; bool m_keyNameHasBeenSet = false; bool m_noExpiry; bool m_noExpiryHasBeenSet = false; ApiKeyRestrictions m_restrictions; bool m_restrictionsHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace LocationService } // namespace Aws