aws_sdk_connectcampaignsv2/operation/create_campaign/
_create_campaign_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateCampaignOutput {
7 pub id: ::std::option::Option<::std::string::String>,
9 pub arn: ::std::option::Option<::std::string::String>,
11 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
13 _request_id: Option<String>,
14}
15impl CreateCampaignOutput {
16 pub fn id(&self) -> ::std::option::Option<&str> {
18 self.id.as_deref()
19 }
20 pub fn arn(&self) -> ::std::option::Option<&str> {
22 self.arn.as_deref()
23 }
24 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
26 self.tags.as_ref()
27 }
28}
29impl ::aws_types::request_id::RequestId for CreateCampaignOutput {
30 fn request_id(&self) -> Option<&str> {
31 self._request_id.as_deref()
32 }
33}
34impl CreateCampaignOutput {
35 pub fn builder() -> crate::operation::create_campaign::builders::CreateCampaignOutputBuilder {
37 crate::operation::create_campaign::builders::CreateCampaignOutputBuilder::default()
38 }
39}
40
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct CreateCampaignOutputBuilder {
45 pub(crate) id: ::std::option::Option<::std::string::String>,
46 pub(crate) arn: ::std::option::Option<::std::string::String>,
47 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
48 _request_id: Option<String>,
49}
50impl CreateCampaignOutputBuilder {
51 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.id = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.id = input;
59 self
60 }
61 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.id
64 }
65 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.arn = ::std::option::Option::Some(input.into());
68 self
69 }
70 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.arn = input;
73 self
74 }
75 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
77 &self.arn
78 }
79 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
85 let mut hash_map = self.tags.unwrap_or_default();
86 hash_map.insert(k.into(), v.into());
87 self.tags = ::std::option::Option::Some(hash_map);
88 self
89 }
90 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
92 self.tags = input;
93 self
94 }
95 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
97 &self.tags
98 }
99 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
100 self._request_id = Some(request_id.into());
101 self
102 }
103
104 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
105 self._request_id = request_id;
106 self
107 }
108 pub fn build(self) -> crate::operation::create_campaign::CreateCampaignOutput {
110 crate::operation::create_campaign::CreateCampaignOutput {
111 id: self.id,
112 arn: self.arn,
113 tags: self.tags,
114 _request_id: self._request_id,
115 }
116 }
117}