aws_sdk_connectparticipant/operation/get_attachment/
_get_attachment_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetAttachmentInput {
6 pub attachment_id: ::std::option::Option<::std::string::String>,
8 pub connection_token: ::std::option::Option<::std::string::String>,
10 pub url_expiry_in_seconds: ::std::option::Option<i32>,
12}
13impl GetAttachmentInput {
14 pub fn attachment_id(&self) -> ::std::option::Option<&str> {
16 self.attachment_id.as_deref()
17 }
18 pub fn connection_token(&self) -> ::std::option::Option<&str> {
20 self.connection_token.as_deref()
21 }
22 pub fn url_expiry_in_seconds(&self) -> ::std::option::Option<i32> {
24 self.url_expiry_in_seconds
25 }
26}
27impl GetAttachmentInput {
28 pub fn builder() -> crate::operation::get_attachment::builders::GetAttachmentInputBuilder {
30 crate::operation::get_attachment::builders::GetAttachmentInputBuilder::default()
31 }
32}
33
34#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetAttachmentInputBuilder {
38 pub(crate) attachment_id: ::std::option::Option<::std::string::String>,
39 pub(crate) connection_token: ::std::option::Option<::std::string::String>,
40 pub(crate) url_expiry_in_seconds: ::std::option::Option<i32>,
41}
42impl GetAttachmentInputBuilder {
43 pub fn attachment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.attachment_id = ::std::option::Option::Some(input.into());
47 self
48 }
49 pub fn set_attachment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.attachment_id = input;
52 self
53 }
54 pub fn get_attachment_id(&self) -> &::std::option::Option<::std::string::String> {
56 &self.attachment_id
57 }
58 pub fn connection_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.connection_token = ::std::option::Option::Some(input.into());
62 self
63 }
64 pub fn set_connection_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.connection_token = input;
67 self
68 }
69 pub fn get_connection_token(&self) -> &::std::option::Option<::std::string::String> {
71 &self.connection_token
72 }
73 pub fn url_expiry_in_seconds(mut self, input: i32) -> Self {
75 self.url_expiry_in_seconds = ::std::option::Option::Some(input);
76 self
77 }
78 pub fn set_url_expiry_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
80 self.url_expiry_in_seconds = input;
81 self
82 }
83 pub fn get_url_expiry_in_seconds(&self) -> &::std::option::Option<i32> {
85 &self.url_expiry_in_seconds
86 }
87 pub fn build(
89 self,
90 ) -> ::std::result::Result<crate::operation::get_attachment::GetAttachmentInput, ::aws_smithy_types::error::operation::BuildError> {
91 ::std::result::Result::Ok(crate::operation::get_attachment::GetAttachmentInput {
92 attachment_id: self.attachment_id,
93 connection_token: self.connection_token,
94 url_expiry_in_seconds: self.url_expiry_in_seconds,
95 })
96 }
97}