aws_sdk_chimesdkmessaging/operation/update_channel_read_marker/
_update_channel_read_marker_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateChannelReadMarkerInput {
6    /// <p>The ARN of the channel.</p>
7    pub channel_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the <code>AppInstanceUser</code> or <code>AppInstanceBot</code> that makes the API call.</p>
9    pub chime_bearer: ::std::option::Option<::std::string::String>,
10}
11impl UpdateChannelReadMarkerInput {
12    /// <p>The ARN of the channel.</p>
13    pub fn channel_arn(&self) -> ::std::option::Option<&str> {
14        self.channel_arn.as_deref()
15    }
16    /// <p>The ARN of the <code>AppInstanceUser</code> or <code>AppInstanceBot</code> that makes the API call.</p>
17    pub fn chime_bearer(&self) -> ::std::option::Option<&str> {
18        self.chime_bearer.as_deref()
19    }
20}
21impl UpdateChannelReadMarkerInput {
22    /// Creates a new builder-style object to manufacture [`UpdateChannelReadMarkerInput`](crate::operation::update_channel_read_marker::UpdateChannelReadMarkerInput).
23    pub fn builder() -> crate::operation::update_channel_read_marker::builders::UpdateChannelReadMarkerInputBuilder {
24        crate::operation::update_channel_read_marker::builders::UpdateChannelReadMarkerInputBuilder::default()
25    }
26}
27
28/// A builder for [`UpdateChannelReadMarkerInput`](crate::operation::update_channel_read_marker::UpdateChannelReadMarkerInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct UpdateChannelReadMarkerInputBuilder {
32    pub(crate) channel_arn: ::std::option::Option<::std::string::String>,
33    pub(crate) chime_bearer: ::std::option::Option<::std::string::String>,
34}
35impl UpdateChannelReadMarkerInputBuilder {
36    /// <p>The ARN of the channel.</p>
37    /// This field is required.
38    pub fn channel_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.channel_arn = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The ARN of the channel.</p>
43    pub fn set_channel_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.channel_arn = input;
45        self
46    }
47    /// <p>The ARN of the channel.</p>
48    pub fn get_channel_arn(&self) -> &::std::option::Option<::std::string::String> {
49        &self.channel_arn
50    }
51    /// <p>The ARN of the <code>AppInstanceUser</code> or <code>AppInstanceBot</code> that makes the API call.</p>
52    /// This field is required.
53    pub fn chime_bearer(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.chime_bearer = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The ARN of the <code>AppInstanceUser</code> or <code>AppInstanceBot</code> that makes the API call.</p>
58    pub fn set_chime_bearer(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.chime_bearer = input;
60        self
61    }
62    /// <p>The ARN of the <code>AppInstanceUser</code> or <code>AppInstanceBot</code> that makes the API call.</p>
63    pub fn get_chime_bearer(&self) -> &::std::option::Option<::std::string::String> {
64        &self.chime_bearer
65    }
66    /// Consumes the builder and constructs a [`UpdateChannelReadMarkerInput`](crate::operation::update_channel_read_marker::UpdateChannelReadMarkerInput).
67    pub fn build(
68        self,
69    ) -> ::std::result::Result<
70        crate::operation::update_channel_read_marker::UpdateChannelReadMarkerInput,
71        ::aws_smithy_types::error::operation::BuildError,
72    > {
73        ::std::result::Result::Ok(crate::operation::update_channel_read_marker::UpdateChannelReadMarkerInput {
74            channel_arn: self.channel_arn,
75            chime_bearer: self.chime_bearer,
76        })
77    }
78}