/** * 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 ivschat { namespace Model { /** */ class CreateChatTokenRequest : public IvschatRequest { public: AWS_IVSCHAT_API CreateChatTokenRequest(); // 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 "CreateChatToken"; } AWS_IVSCHAT_API Aws::String SerializePayload() const override; /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline const Aws::Map& GetAttributes() const{ return m_attributes; } /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; } /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline void SetAttributes(const Aws::Map& value) { m_attributesHasBeenSet = true; m_attributes = value; } /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline void SetAttributes(Aws::Map&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); } /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline CreateChatTokenRequest& WithAttributes(const Aws::Map& value) { SetAttributes(value); return *this;} /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline CreateChatTokenRequest& WithAttributes(Aws::Map&& value) { SetAttributes(std::move(value)); return *this;} /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline CreateChatTokenRequest& AddAttributes(const Aws::String& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline CreateChatTokenRequest& AddAttributes(Aws::String&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline CreateChatTokenRequest& AddAttributes(const Aws::String& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline CreateChatTokenRequest& AddAttributes(Aws::String&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; } /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline CreateChatTokenRequest& AddAttributes(const char* key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline CreateChatTokenRequest& AddAttributes(Aws::String&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

Application-provided attributes to encode into the token and attach to a chat * session. Map keys and values can contain UTF-8 encoded text. The maximum length * of this field is 1 KB total.

*/ inline CreateChatTokenRequest& AddAttributes(const char* key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

Set of capabilities that the user is allowed to perform in the room. Default: * None (the capability to view messages is implicitly included in all * requests).

*/ inline const Aws::Vector& GetCapabilities() const{ return m_capabilities; } /** *

Set of capabilities that the user is allowed to perform in the room. Default: * None (the capability to view messages is implicitly included in all * requests).

*/ inline bool CapabilitiesHasBeenSet() const { return m_capabilitiesHasBeenSet; } /** *

Set of capabilities that the user is allowed to perform in the room. Default: * None (the capability to view messages is implicitly included in all * requests).

*/ inline void SetCapabilities(const Aws::Vector& value) { m_capabilitiesHasBeenSet = true; m_capabilities = value; } /** *

Set of capabilities that the user is allowed to perform in the room. Default: * None (the capability to view messages is implicitly included in all * requests).

*/ inline void SetCapabilities(Aws::Vector&& value) { m_capabilitiesHasBeenSet = true; m_capabilities = std::move(value); } /** *

Set of capabilities that the user is allowed to perform in the room. Default: * None (the capability to view messages is implicitly included in all * requests).

*/ inline CreateChatTokenRequest& WithCapabilities(const Aws::Vector& value) { SetCapabilities(value); return *this;} /** *

Set of capabilities that the user is allowed to perform in the room. Default: * None (the capability to view messages is implicitly included in all * requests).

*/ inline CreateChatTokenRequest& WithCapabilities(Aws::Vector&& value) { SetCapabilities(std::move(value)); return *this;} /** *

Set of capabilities that the user is allowed to perform in the room. Default: * None (the capability to view messages is implicitly included in all * requests).

*/ inline CreateChatTokenRequest& AddCapabilities(const ChatTokenCapability& value) { m_capabilitiesHasBeenSet = true; m_capabilities.push_back(value); return *this; } /** *

Set of capabilities that the user is allowed to perform in the room. Default: * None (the capability to view messages is implicitly included in all * requests).

*/ inline CreateChatTokenRequest& AddCapabilities(ChatTokenCapability&& value) { m_capabilitiesHasBeenSet = true; m_capabilities.push_back(std::move(value)); return *this; } /** *

Identifier of the room that the client is trying to access. Currently this * must be an ARN.

*/ inline const Aws::String& GetRoomIdentifier() const{ return m_roomIdentifier; } /** *

Identifier of the room that the client is trying to access. Currently this * must be an ARN.

*/ inline bool RoomIdentifierHasBeenSet() const { return m_roomIdentifierHasBeenSet; } /** *

Identifier of the room that the client is trying to access. Currently this * must be an ARN.

*/ inline void SetRoomIdentifier(const Aws::String& value) { m_roomIdentifierHasBeenSet = true; m_roomIdentifier = value; } /** *

Identifier of the room that the client is trying to access. Currently this * must be an ARN.

*/ inline void SetRoomIdentifier(Aws::String&& value) { m_roomIdentifierHasBeenSet = true; m_roomIdentifier = std::move(value); } /** *

Identifier of the room that the client is trying to access. Currently this * must be an ARN.

*/ inline void SetRoomIdentifier(const char* value) { m_roomIdentifierHasBeenSet = true; m_roomIdentifier.assign(value); } /** *

Identifier of the room that the client is trying to access. Currently this * must be an ARN.

*/ inline CreateChatTokenRequest& WithRoomIdentifier(const Aws::String& value) { SetRoomIdentifier(value); return *this;} /** *

Identifier of the room that the client is trying to access. Currently this * must be an ARN.

*/ inline CreateChatTokenRequest& WithRoomIdentifier(Aws::String&& value) { SetRoomIdentifier(std::move(value)); return *this;} /** *

Identifier of the room that the client is trying to access. Currently this * must be an ARN.

*/ inline CreateChatTokenRequest& WithRoomIdentifier(const char* value) { SetRoomIdentifier(value); return *this;} /** *

Session duration (in minutes), after which the session expires. Default: 60 * (1 hour).

*/ inline int GetSessionDurationInMinutes() const{ return m_sessionDurationInMinutes; } /** *

Session duration (in minutes), after which the session expires. Default: 60 * (1 hour).

*/ inline bool SessionDurationInMinutesHasBeenSet() const { return m_sessionDurationInMinutesHasBeenSet; } /** *

Session duration (in minutes), after which the session expires. Default: 60 * (1 hour).

*/ inline void SetSessionDurationInMinutes(int value) { m_sessionDurationInMinutesHasBeenSet = true; m_sessionDurationInMinutes = value; } /** *

Session duration (in minutes), after which the session expires. Default: 60 * (1 hour).

*/ inline CreateChatTokenRequest& WithSessionDurationInMinutes(int value) { SetSessionDurationInMinutes(value); return *this;} /** *

Application-provided ID that uniquely identifies the user associated with * this token. This can be any UTF-8 encoded text.

*/ inline const Aws::String& GetUserId() const{ return m_userId; } /** *

Application-provided ID that uniquely identifies the user associated with * this token. This can be any UTF-8 encoded text.

*/ inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; } /** *

Application-provided ID that uniquely identifies the user associated with * this token. This can be any UTF-8 encoded text.

*/ inline void SetUserId(const Aws::String& value) { m_userIdHasBeenSet = true; m_userId = value; } /** *

Application-provided ID that uniquely identifies the user associated with * this token. This can be any UTF-8 encoded text.

*/ inline void SetUserId(Aws::String&& value) { m_userIdHasBeenSet = true; m_userId = std::move(value); } /** *

Application-provided ID that uniquely identifies the user associated with * this token. This can be any UTF-8 encoded text.

*/ inline void SetUserId(const char* value) { m_userIdHasBeenSet = true; m_userId.assign(value); } /** *

Application-provided ID that uniquely identifies the user associated with * this token. This can be any UTF-8 encoded text.

*/ inline CreateChatTokenRequest& WithUserId(const Aws::String& value) { SetUserId(value); return *this;} /** *

Application-provided ID that uniquely identifies the user associated with * this token. This can be any UTF-8 encoded text.

*/ inline CreateChatTokenRequest& WithUserId(Aws::String&& value) { SetUserId(std::move(value)); return *this;} /** *

Application-provided ID that uniquely identifies the user associated with * this token. This can be any UTF-8 encoded text.

*/ inline CreateChatTokenRequest& WithUserId(const char* value) { SetUserId(value); return *this;} private: Aws::Map m_attributes; bool m_attributesHasBeenSet = false; Aws::Vector m_capabilities; bool m_capabilitiesHasBeenSet = false; Aws::String m_roomIdentifier; bool m_roomIdentifierHasBeenSet = false; int m_sessionDurationInMinutes; bool m_sessionDurationInMinutesHasBeenSet = false; Aws::String m_userId; bool m_userIdHasBeenSet = false; }; } // namespace Model } // namespace ivschat } // namespace Aws