aws_sdk_pinpoint/types/
_send_users_message_response.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct SendUsersMessageResponse {
7 pub application_id: ::std::option::Option<::std::string::String>,
9 pub request_id: ::std::option::Option<::std::string::String>,
11 pub result: ::std::option::Option<
13 ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, crate::types::EndpointMessageResult>>,
14 >,
15}
16impl SendUsersMessageResponse {
17 pub fn application_id(&self) -> ::std::option::Option<&str> {
19 self.application_id.as_deref()
20 }
21 pub fn request_id(&self) -> ::std::option::Option<&str> {
23 self.request_id.as_deref()
24 }
25 pub fn result(
27 &self,
28 ) -> ::std::option::Option<
29 &::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, crate::types::EndpointMessageResult>>,
30 > {
31 self.result.as_ref()
32 }
33}
34impl SendUsersMessageResponse {
35 pub fn builder() -> crate::types::builders::SendUsersMessageResponseBuilder {
37 crate::types::builders::SendUsersMessageResponseBuilder::default()
38 }
39}
40
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct SendUsersMessageResponseBuilder {
45 pub(crate) application_id: ::std::option::Option<::std::string::String>,
46 pub(crate) request_id: ::std::option::Option<::std::string::String>,
47 pub(crate) result: ::std::option::Option<
48 ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, crate::types::EndpointMessageResult>>,
49 >,
50}
51impl SendUsersMessageResponseBuilder {
52 pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.application_id = ::std::option::Option::Some(input.into());
56 self
57 }
58 pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.application_id = input;
61 self
62 }
63 pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
65 &self.application_id
66 }
67 pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.request_id = ::std::option::Option::Some(input.into());
70 self
71 }
72 pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.request_id = input;
75 self
76 }
77 pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
79 &self.request_id
80 }
81 pub fn result(
87 mut self,
88 k: impl ::std::convert::Into<::std::string::String>,
89 v: ::std::collections::HashMap<::std::string::String, crate::types::EndpointMessageResult>,
90 ) -> Self {
91 let mut hash_map = self.result.unwrap_or_default();
92 hash_map.insert(k.into(), v);
93 self.result = ::std::option::Option::Some(hash_map);
94 self
95 }
96 pub fn set_result(
98 mut self,
99 input: ::std::option::Option<
100 ::std::collections::HashMap<
101 ::std::string::String,
102 ::std::collections::HashMap<::std::string::String, crate::types::EndpointMessageResult>,
103 >,
104 >,
105 ) -> Self {
106 self.result = input;
107 self
108 }
109 pub fn get_result(
111 &self,
112 ) -> &::std::option::Option<
113 ::std::collections::HashMap<::std::string::String, ::std::collections::HashMap<::std::string::String, crate::types::EndpointMessageResult>>,
114 > {
115 &self.result
116 }
117 pub fn build(self) -> crate::types::SendUsersMessageResponse {
119 crate::types::SendUsersMessageResponse {
120 application_id: self.application_id,
121 request_id: self.request_id,
122 result: self.result,
123 }
124 }
125}