#[non_exhaustive]pub struct CreateChatTokenInputBuilder { /* private fields */ }
Expand description
A builder for CreateChatTokenInput
.
Implementations§
source§impl CreateChatTokenInputBuilder
impl CreateChatTokenInputBuilder
sourcepub fn room_identifier(self, input: impl Into<String>) -> Self
pub fn room_identifier(self, input: impl Into<String>) -> Self
Identifier of the room that the client is trying to access. Currently this must be an ARN.
This field is required.sourcepub fn set_room_identifier(self, input: Option<String>) -> Self
pub fn set_room_identifier(self, input: Option<String>) -> Self
Identifier of the room that the client is trying to access. Currently this must be an ARN.
sourcepub fn get_room_identifier(&self) -> &Option<String>
pub fn get_room_identifier(&self) -> &Option<String>
Identifier of the room that the client is trying to access. Currently this must be an ARN.
sourcepub fn user_id(self, input: impl Into<String>) -> Self
pub fn user_id(self, input: impl Into<String>) -> Self
Application-provided ID that uniquely identifies the user associated with this token. This can be any UTF-8 encoded text.
This field is required.sourcepub fn set_user_id(self, input: Option<String>) -> Self
pub fn set_user_id(self, input: Option<String>) -> Self
Application-provided ID that uniquely identifies the user associated with this token. This can be any UTF-8 encoded text.
sourcepub fn get_user_id(&self) -> &Option<String>
pub fn get_user_id(&self) -> &Option<String>
Application-provided ID that uniquely identifies the user associated with this token. This can be any UTF-8 encoded text.
sourcepub fn capabilities(self, input: ChatTokenCapability) -> Self
pub fn capabilities(self, input: ChatTokenCapability) -> Self
Appends an item to capabilities
.
To override the contents of this collection use set_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).
sourcepub fn set_capabilities(self, input: Option<Vec<ChatTokenCapability>>) -> Self
pub fn set_capabilities(self, input: Option<Vec<ChatTokenCapability>>) -> Self
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).
sourcepub fn get_capabilities(&self) -> &Option<Vec<ChatTokenCapability>>
pub fn get_capabilities(&self) -> &Option<Vec<ChatTokenCapability>>
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).
sourcepub fn session_duration_in_minutes(self, input: i32) -> Self
pub fn session_duration_in_minutes(self, input: i32) -> Self
Session duration (in minutes), after which the session expires. Default: 60 (1 hour).
sourcepub fn set_session_duration_in_minutes(self, input: Option<i32>) -> Self
pub fn set_session_duration_in_minutes(self, input: Option<i32>) -> Self
Session duration (in minutes), after which the session expires. Default: 60 (1 hour).
sourcepub fn get_session_duration_in_minutes(&self) -> &Option<i32>
pub fn get_session_duration_in_minutes(&self) -> &Option<i32>
Session duration (in minutes), after which the session expires. Default: 60 (1 hour).
sourcepub fn attributes(self, k: impl Into<String>, v: impl Into<String>) -> Self
pub fn attributes(self, k: impl Into<String>, v: impl Into<String>) -> Self
Adds a key-value pair to attributes
.
To override the contents of this collection use set_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.
sourcepub fn set_attributes(self, input: Option<HashMap<String, String>>) -> Self
pub fn set_attributes(self, input: Option<HashMap<String, String>>) -> Self
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.
sourcepub fn get_attributes(&self) -> &Option<HashMap<String, String>>
pub fn get_attributes(&self) -> &Option<HashMap<String, String>>
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.
sourcepub fn build(self) -> Result<CreateChatTokenInput, BuildError>
pub fn build(self) -> Result<CreateChatTokenInput, BuildError>
Consumes the builder and constructs a CreateChatTokenInput
.
source§impl CreateChatTokenInputBuilder
impl CreateChatTokenInputBuilder
sourcepub async fn send_with(
self,
client: &Client
) -> Result<CreateChatTokenOutput, SdkError<CreateChatTokenError, HttpResponse>>
pub async fn send_with( self, client: &Client ) -> Result<CreateChatTokenOutput, SdkError<CreateChatTokenError, HttpResponse>>
Sends a request with this input using the given client.
Trait Implementations§
source§impl Clone for CreateChatTokenInputBuilder
impl Clone for CreateChatTokenInputBuilder
source§fn clone(&self) -> CreateChatTokenInputBuilder
fn clone(&self) -> CreateChatTokenInputBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CreateChatTokenInputBuilder
impl Debug for CreateChatTokenInputBuilder
source§impl Default for CreateChatTokenInputBuilder
impl Default for CreateChatTokenInputBuilder
source§fn default() -> CreateChatTokenInputBuilder
fn default() -> CreateChatTokenInputBuilder
source§impl PartialEq for CreateChatTokenInputBuilder
impl PartialEq for CreateChatTokenInputBuilder
source§fn eq(&self, other: &CreateChatTokenInputBuilder) -> bool
fn eq(&self, other: &CreateChatTokenInputBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CreateChatTokenInputBuilder
Auto Trait Implementations§
impl Freeze for CreateChatTokenInputBuilder
impl RefUnwindSafe for CreateChatTokenInputBuilder
impl Send for CreateChatTokenInputBuilder
impl Sync for CreateChatTokenInputBuilder
impl Unpin for CreateChatTokenInputBuilder
impl UnwindSafe for CreateChatTokenInputBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more