/** * 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 #include #include #include #include namespace Aws { namespace ChimeSDKMessaging { namespace Model { /** */ class SendChannelMessageRequest : public ChimeSDKMessagingRequest { public: AWS_CHIMESDKMESSAGING_API SendChannelMessageRequest(); // 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 "SendChannelMessage"; } AWS_CHIMESDKMESSAGING_API Aws::String SerializePayload() const override; AWS_CHIMESDKMESSAGING_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The ARN of the channel.

*/ inline const Aws::String& GetChannelArn() const{ return m_channelArn; } /** *

The ARN of the channel.

*/ inline bool ChannelArnHasBeenSet() const { return m_channelArnHasBeenSet; } /** *

The ARN of the channel.

*/ inline void SetChannelArn(const Aws::String& value) { m_channelArnHasBeenSet = true; m_channelArn = value; } /** *

The ARN of the channel.

*/ inline void SetChannelArn(Aws::String&& value) { m_channelArnHasBeenSet = true; m_channelArn = std::move(value); } /** *

The ARN of the channel.

*/ inline void SetChannelArn(const char* value) { m_channelArnHasBeenSet = true; m_channelArn.assign(value); } /** *

The ARN of the channel.

*/ inline SendChannelMessageRequest& WithChannelArn(const Aws::String& value) { SetChannelArn(value); return *this;} /** *

The ARN of the channel.

*/ inline SendChannelMessageRequest& WithChannelArn(Aws::String&& value) { SetChannelArn(std::move(value)); return *this;} /** *

The ARN of the channel.

*/ inline SendChannelMessageRequest& WithChannelArn(const char* value) { SetChannelArn(value); return *this;} /** *

The content of the channel message.

*/ inline const Aws::String& GetContent() const{ return m_content; } /** *

The content of the channel message.

*/ inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; } /** *

The content of the channel message.

*/ inline void SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; } /** *

The content of the channel message.

*/ inline void SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); } /** *

The content of the channel message.

*/ inline void SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); } /** *

The content of the channel message.

*/ inline SendChannelMessageRequest& WithContent(const Aws::String& value) { SetContent(value); return *this;} /** *

The content of the channel message.

*/ inline SendChannelMessageRequest& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;} /** *

The content of the channel message.

*/ inline SendChannelMessageRequest& WithContent(const char* value) { SetContent(value); return *this;} /** *

The type of message, STANDARD or CONTROL.

* STANDARD messages can be up to 4KB in size and contain metadata. * Metadata is arbitrary, and you can use it in a variety of ways, such as * containing a link to an attachment.

CONTROL messages are * limited to 30 bytes and do not contain metadata.

*/ inline const ChannelMessageType& GetType() const{ return m_type; } /** *

The type of message, STANDARD or CONTROL.

* STANDARD messages can be up to 4KB in size and contain metadata. * Metadata is arbitrary, and you can use it in a variety of ways, such as * containing a link to an attachment.

CONTROL messages are * limited to 30 bytes and do not contain metadata.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of message, STANDARD or CONTROL.

* STANDARD messages can be up to 4KB in size and contain metadata. * Metadata is arbitrary, and you can use it in a variety of ways, such as * containing a link to an attachment.

CONTROL messages are * limited to 30 bytes and do not contain metadata.

*/ inline void SetType(const ChannelMessageType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of message, STANDARD or CONTROL.

* STANDARD messages can be up to 4KB in size and contain metadata. * Metadata is arbitrary, and you can use it in a variety of ways, such as * containing a link to an attachment.

CONTROL messages are * limited to 30 bytes and do not contain metadata.

*/ inline void SetType(ChannelMessageType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of message, STANDARD or CONTROL.

* STANDARD messages can be up to 4KB in size and contain metadata. * Metadata is arbitrary, and you can use it in a variety of ways, such as * containing a link to an attachment.

CONTROL messages are * limited to 30 bytes and do not contain metadata.

*/ inline SendChannelMessageRequest& WithType(const ChannelMessageType& value) { SetType(value); return *this;} /** *

The type of message, STANDARD or CONTROL.

* STANDARD messages can be up to 4KB in size and contain metadata. * Metadata is arbitrary, and you can use it in a variety of ways, such as * containing a link to an attachment.

CONTROL messages are * limited to 30 bytes and do not contain metadata.

*/ inline SendChannelMessageRequest& WithType(ChannelMessageType&& value) { SetType(std::move(value)); return *this;} /** *

Boolean that controls whether the message is persisted on the back end. * Required.

*/ inline const ChannelMessagePersistenceType& GetPersistence() const{ return m_persistence; } /** *

Boolean that controls whether the message is persisted on the back end. * Required.

*/ inline bool PersistenceHasBeenSet() const { return m_persistenceHasBeenSet; } /** *

Boolean that controls whether the message is persisted on the back end. * Required.

*/ inline void SetPersistence(const ChannelMessagePersistenceType& value) { m_persistenceHasBeenSet = true; m_persistence = value; } /** *

Boolean that controls whether the message is persisted on the back end. * Required.

*/ inline void SetPersistence(ChannelMessagePersistenceType&& value) { m_persistenceHasBeenSet = true; m_persistence = std::move(value); } /** *

Boolean that controls whether the message is persisted on the back end. * Required.

*/ inline SendChannelMessageRequest& WithPersistence(const ChannelMessagePersistenceType& value) { SetPersistence(value); return *this;} /** *

Boolean that controls whether the message is persisted on the back end. * Required.

*/ inline SendChannelMessageRequest& WithPersistence(ChannelMessagePersistenceType&& value) { SetPersistence(std::move(value)); return *this;} /** *

The optional metadata for each message.

*/ inline const Aws::String& GetMetadata() const{ return m_metadata; } /** *

The optional metadata for each message.

*/ inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; } /** *

The optional metadata for each message.

*/ inline void SetMetadata(const Aws::String& value) { m_metadataHasBeenSet = true; m_metadata = value; } /** *

The optional metadata for each message.

*/ inline void SetMetadata(Aws::String&& value) { m_metadataHasBeenSet = true; m_metadata = std::move(value); } /** *

The optional metadata for each message.

*/ inline void SetMetadata(const char* value) { m_metadataHasBeenSet = true; m_metadata.assign(value); } /** *

The optional metadata for each message.

*/ inline SendChannelMessageRequest& WithMetadata(const Aws::String& value) { SetMetadata(value); return *this;} /** *

The optional metadata for each message.

*/ inline SendChannelMessageRequest& WithMetadata(Aws::String&& value) { SetMetadata(std::move(value)); return *this;} /** *

The optional metadata for each message.

*/ inline SendChannelMessageRequest& WithMetadata(const char* value) { SetMetadata(value); return *this;} /** *

The Idempotency token for each client request.

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

The Idempotency token for each client request.

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

The Idempotency token for each client request.

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

The Idempotency token for each client request.

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

The Idempotency token for each client request.

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

The Idempotency token for each client request.

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

The Idempotency token for each client request.

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

The Idempotency token for each client request.

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

The ARN of the AppInstanceUser or AppInstanceBot * that makes the API call.

*/ inline const Aws::String& GetChimeBearer() const{ return m_chimeBearer; } /** *

The ARN of the AppInstanceUser or AppInstanceBot * that makes the API call.

*/ inline bool ChimeBearerHasBeenSet() const { return m_chimeBearerHasBeenSet; } /** *

The ARN of the AppInstanceUser or AppInstanceBot * that makes the API call.

*/ inline void SetChimeBearer(const Aws::String& value) { m_chimeBearerHasBeenSet = true; m_chimeBearer = value; } /** *

The ARN of the AppInstanceUser or AppInstanceBot * that makes the API call.

*/ inline void SetChimeBearer(Aws::String&& value) { m_chimeBearerHasBeenSet = true; m_chimeBearer = std::move(value); } /** *

The ARN of the AppInstanceUser or AppInstanceBot * that makes the API call.

*/ inline void SetChimeBearer(const char* value) { m_chimeBearerHasBeenSet = true; m_chimeBearer.assign(value); } /** *

The ARN of the AppInstanceUser or AppInstanceBot * that makes the API call.

*/ inline SendChannelMessageRequest& WithChimeBearer(const Aws::String& value) { SetChimeBearer(value); return *this;} /** *

The ARN of the AppInstanceUser or AppInstanceBot * that makes the API call.

*/ inline SendChannelMessageRequest& WithChimeBearer(Aws::String&& value) { SetChimeBearer(std::move(value)); return *this;} /** *

The ARN of the AppInstanceUser or AppInstanceBot * that makes the API call.

*/ inline SendChannelMessageRequest& WithChimeBearer(const char* value) { SetChimeBearer(value); return *this;} /** *

The push notification configuration of the message.

*/ inline const PushNotificationConfiguration& GetPushNotification() const{ return m_pushNotification; } /** *

The push notification configuration of the message.

*/ inline bool PushNotificationHasBeenSet() const { return m_pushNotificationHasBeenSet; } /** *

The push notification configuration of the message.

*/ inline void SetPushNotification(const PushNotificationConfiguration& value) { m_pushNotificationHasBeenSet = true; m_pushNotification = value; } /** *

The push notification configuration of the message.

*/ inline void SetPushNotification(PushNotificationConfiguration&& value) { m_pushNotificationHasBeenSet = true; m_pushNotification = std::move(value); } /** *

The push notification configuration of the message.

*/ inline SendChannelMessageRequest& WithPushNotification(const PushNotificationConfiguration& value) { SetPushNotification(value); return *this;} /** *

The push notification configuration of the message.

*/ inline SendChannelMessageRequest& WithPushNotification(PushNotificationConfiguration&& value) { SetPushNotification(std::move(value)); return *this;} /** *

The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences.

*/ inline const Aws::Map& GetMessageAttributes() const{ return m_messageAttributes; } /** *

The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences.

*/ inline bool MessageAttributesHasBeenSet() const { return m_messageAttributesHasBeenSet; } /** *

The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences.

*/ inline void SetMessageAttributes(const Aws::Map& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = value; } /** *

The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences.

*/ inline void SetMessageAttributes(Aws::Map&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes = std::move(value); } /** *

The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences.

*/ inline SendChannelMessageRequest& WithMessageAttributes(const Aws::Map& value) { SetMessageAttributes(value); return *this;} /** *

The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences.

*/ inline SendChannelMessageRequest& WithMessageAttributes(Aws::Map&& value) { SetMessageAttributes(std::move(value)); return *this;} /** *

The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences.

*/ inline SendChannelMessageRequest& AddMessageAttributes(const Aws::String& key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(key, value); return *this; } /** *

The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences.

*/ inline SendChannelMessageRequest& AddMessageAttributes(Aws::String&& key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(std::move(key), value); return *this; } /** *

The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences.

*/ inline SendChannelMessageRequest& AddMessageAttributes(const Aws::String& key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(key, std::move(value)); return *this; } /** *

The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences.

*/ inline SendChannelMessageRequest& AddMessageAttributes(Aws::String&& key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(std::move(key), std::move(value)); return *this; } /** *

The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences.

*/ inline SendChannelMessageRequest& AddMessageAttributes(const char* key, MessageAttributeValue&& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(key, std::move(value)); return *this; } /** *

The attributes for the message, used for message filtering along with a * FilterRule defined in the * PushNotificationPreferences.

*/ inline SendChannelMessageRequest& AddMessageAttributes(const char* key, const MessageAttributeValue& value) { m_messageAttributesHasBeenSet = true; m_messageAttributes.emplace(key, value); return *this; } /** *

The ID of the SubChannel in the request.

*/ inline const Aws::String& GetSubChannelId() const{ return m_subChannelId; } /** *

The ID of the SubChannel in the request.

*/ inline bool SubChannelIdHasBeenSet() const { return m_subChannelIdHasBeenSet; } /** *

The ID of the SubChannel in the request.

*/ inline void SetSubChannelId(const Aws::String& value) { m_subChannelIdHasBeenSet = true; m_subChannelId = value; } /** *

The ID of the SubChannel in the request.

*/ inline void SetSubChannelId(Aws::String&& value) { m_subChannelIdHasBeenSet = true; m_subChannelId = std::move(value); } /** *

The ID of the SubChannel in the request.

*/ inline void SetSubChannelId(const char* value) { m_subChannelIdHasBeenSet = true; m_subChannelId.assign(value); } /** *

The ID of the SubChannel in the request.

*/ inline SendChannelMessageRequest& WithSubChannelId(const Aws::String& value) { SetSubChannelId(value); return *this;} /** *

The ID of the SubChannel in the request.

*/ inline SendChannelMessageRequest& WithSubChannelId(Aws::String&& value) { SetSubChannelId(std::move(value)); return *this;} /** *

The ID of the SubChannel in the request.

*/ inline SendChannelMessageRequest& WithSubChannelId(const char* value) { SetSubChannelId(value); return *this;} /** *

The content type of the channel message.

*/ inline const Aws::String& GetContentType() const{ return m_contentType; } /** *

The content type of the channel message.

*/ inline bool ContentTypeHasBeenSet() const { return m_contentTypeHasBeenSet; } /** *

The content type of the channel message.

*/ inline void SetContentType(const Aws::String& value) { m_contentTypeHasBeenSet = true; m_contentType = value; } /** *

The content type of the channel message.

*/ inline void SetContentType(Aws::String&& value) { m_contentTypeHasBeenSet = true; m_contentType = std::move(value); } /** *

The content type of the channel message.

*/ inline void SetContentType(const char* value) { m_contentTypeHasBeenSet = true; m_contentType.assign(value); } /** *

The content type of the channel message.

*/ inline SendChannelMessageRequest& WithContentType(const Aws::String& value) { SetContentType(value); return *this;} /** *

The content type of the channel message.

*/ inline SendChannelMessageRequest& WithContentType(Aws::String&& value) { SetContentType(std::move(value)); return *this;} /** *

The content type of the channel message.

*/ inline SendChannelMessageRequest& WithContentType(const char* value) { SetContentType(value); return *this;} /** *

The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view targeted * messages. Only users who can see targeted messages can take actions on them. * However, administrators can delete targeted messages that they can’t see.

*/ inline const Aws::Vector& GetTarget() const{ return m_target; } /** *

The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view targeted * messages. Only users who can see targeted messages can take actions on them. * However, administrators can delete targeted messages that they can’t see.

*/ inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; } /** *

The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view targeted * messages. Only users who can see targeted messages can take actions on them. * However, administrators can delete targeted messages that they can’t see.

*/ inline void SetTarget(const Aws::Vector& value) { m_targetHasBeenSet = true; m_target = value; } /** *

The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view targeted * messages. Only users who can see targeted messages can take actions on them. * However, administrators can delete targeted messages that they can’t see.

*/ inline void SetTarget(Aws::Vector&& value) { m_targetHasBeenSet = true; m_target = std::move(value); } /** *

The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view targeted * messages. Only users who can see targeted messages can take actions on them. * However, administrators can delete targeted messages that they can’t see.

*/ inline SendChannelMessageRequest& WithTarget(const Aws::Vector& value) { SetTarget(value); return *this;} /** *

The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view targeted * messages. Only users who can see targeted messages can take actions on them. * However, administrators can delete targeted messages that they can’t see.

*/ inline SendChannelMessageRequest& WithTarget(Aws::Vector&& value) { SetTarget(std::move(value)); return *this;} /** *

The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view targeted * messages. Only users who can see targeted messages can take actions on them. * However, administrators can delete targeted messages that they can’t see.

*/ inline SendChannelMessageRequest& AddTarget(const Target& value) { m_targetHasBeenSet = true; m_target.push_back(value); return *this; } /** *

The target of a message. Must be a member of the channel, such as another * user, a bot, or the sender. Only the target and the sender can view targeted * messages. Only users who can see targeted messages can take actions on them. * However, administrators can delete targeted messages that they can’t see.

*/ inline SendChannelMessageRequest& AddTarget(Target&& value) { m_targetHasBeenSet = true; m_target.push_back(std::move(value)); return *this; } private: Aws::String m_channelArn; bool m_channelArnHasBeenSet = false; Aws::String m_content; bool m_contentHasBeenSet = false; ChannelMessageType m_type; bool m_typeHasBeenSet = false; ChannelMessagePersistenceType m_persistence; bool m_persistenceHasBeenSet = false; Aws::String m_metadata; bool m_metadataHasBeenSet = false; Aws::String m_clientRequestToken; bool m_clientRequestTokenHasBeenSet = false; Aws::String m_chimeBearer; bool m_chimeBearerHasBeenSet = false; PushNotificationConfiguration m_pushNotification; bool m_pushNotificationHasBeenSet = false; Aws::Map m_messageAttributes; bool m_messageAttributesHasBeenSet = false; Aws::String m_subChannelId; bool m_subChannelIdHasBeenSet = false; Aws::String m_contentType; bool m_contentTypeHasBeenSet = false; Aws::Vector m_target; bool m_targetHasBeenSet = false; }; } // namespace Model } // namespace ChimeSDKMessaging } // namespace Aws