aws_sdk_s3/types/_owner.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Container for the owner's display name and ID.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Owner {
7 /// <p>Container for the display name of the owner. This value is only supported in the following Amazon Web Services Regions:</p>
8 /// <ul>
9 /// <li>
10 /// <p>US East (N. Virginia)</p></li>
11 /// <li>
12 /// <p>US West (N. California)</p></li>
13 /// <li>
14 /// <p>US West (Oregon)</p></li>
15 /// <li>
16 /// <p>Asia Pacific (Singapore)</p></li>
17 /// <li>
18 /// <p>Asia Pacific (Sydney)</p></li>
19 /// <li>
20 /// <p>Asia Pacific (Tokyo)</p></li>
21 /// <li>
22 /// <p>Europe (Ireland)</p></li>
23 /// <li>
24 /// <p>South America (São Paulo)</p></li>
25 /// </ul><note>
26 /// <p>This functionality is not supported for directory buckets.</p>
27 /// </note>
28 pub display_name: ::std::option::Option<::std::string::String>,
29 /// <p>Container for the ID of the owner.</p>
30 pub id: ::std::option::Option<::std::string::String>,
31}
32impl Owner {
33 /// <p>Container for the display name of the owner. This value is only supported in the following Amazon Web Services Regions:</p>
34 /// <ul>
35 /// <li>
36 /// <p>US East (N. Virginia)</p></li>
37 /// <li>
38 /// <p>US West (N. California)</p></li>
39 /// <li>
40 /// <p>US West (Oregon)</p></li>
41 /// <li>
42 /// <p>Asia Pacific (Singapore)</p></li>
43 /// <li>
44 /// <p>Asia Pacific (Sydney)</p></li>
45 /// <li>
46 /// <p>Asia Pacific (Tokyo)</p></li>
47 /// <li>
48 /// <p>Europe (Ireland)</p></li>
49 /// <li>
50 /// <p>South America (São Paulo)</p></li>
51 /// </ul><note>
52 /// <p>This functionality is not supported for directory buckets.</p>
53 /// </note>
54 pub fn display_name(&self) -> ::std::option::Option<&str> {
55 self.display_name.as_deref()
56 }
57 /// <p>Container for the ID of the owner.</p>
58 pub fn id(&self) -> ::std::option::Option<&str> {
59 self.id.as_deref()
60 }
61}
62impl Owner {
63 /// Creates a new builder-style object to manufacture [`Owner`](crate::types::Owner).
64 pub fn builder() -> crate::types::builders::OwnerBuilder {
65 crate::types::builders::OwnerBuilder::default()
66 }
67}
68
69/// A builder for [`Owner`](crate::types::Owner).
70#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
71#[non_exhaustive]
72pub struct OwnerBuilder {
73 pub(crate) display_name: ::std::option::Option<::std::string::String>,
74 pub(crate) id: ::std::option::Option<::std::string::String>,
75}
76impl OwnerBuilder {
77 /// <p>Container for the display name of the owner. This value is only supported in the following Amazon Web Services Regions:</p>
78 /// <ul>
79 /// <li>
80 /// <p>US East (N. Virginia)</p></li>
81 /// <li>
82 /// <p>US West (N. California)</p></li>
83 /// <li>
84 /// <p>US West (Oregon)</p></li>
85 /// <li>
86 /// <p>Asia Pacific (Singapore)</p></li>
87 /// <li>
88 /// <p>Asia Pacific (Sydney)</p></li>
89 /// <li>
90 /// <p>Asia Pacific (Tokyo)</p></li>
91 /// <li>
92 /// <p>Europe (Ireland)</p></li>
93 /// <li>
94 /// <p>South America (São Paulo)</p></li>
95 /// </ul><note>
96 /// <p>This functionality is not supported for directory buckets.</p>
97 /// </note>
98 pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99 self.display_name = ::std::option::Option::Some(input.into());
100 self
101 }
102 /// <p>Container for the display name of the owner. This value is only supported in the following Amazon Web Services Regions:</p>
103 /// <ul>
104 /// <li>
105 /// <p>US East (N. Virginia)</p></li>
106 /// <li>
107 /// <p>US West (N. California)</p></li>
108 /// <li>
109 /// <p>US West (Oregon)</p></li>
110 /// <li>
111 /// <p>Asia Pacific (Singapore)</p></li>
112 /// <li>
113 /// <p>Asia Pacific (Sydney)</p></li>
114 /// <li>
115 /// <p>Asia Pacific (Tokyo)</p></li>
116 /// <li>
117 /// <p>Europe (Ireland)</p></li>
118 /// <li>
119 /// <p>South America (São Paulo)</p></li>
120 /// </ul><note>
121 /// <p>This functionality is not supported for directory buckets.</p>
122 /// </note>
123 pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.display_name = input;
125 self
126 }
127 /// <p>Container for the display name of the owner. This value is only supported in the following Amazon Web Services Regions:</p>
128 /// <ul>
129 /// <li>
130 /// <p>US East (N. Virginia)</p></li>
131 /// <li>
132 /// <p>US West (N. California)</p></li>
133 /// <li>
134 /// <p>US West (Oregon)</p></li>
135 /// <li>
136 /// <p>Asia Pacific (Singapore)</p></li>
137 /// <li>
138 /// <p>Asia Pacific (Sydney)</p></li>
139 /// <li>
140 /// <p>Asia Pacific (Tokyo)</p></li>
141 /// <li>
142 /// <p>Europe (Ireland)</p></li>
143 /// <li>
144 /// <p>South America (São Paulo)</p></li>
145 /// </ul><note>
146 /// <p>This functionality is not supported for directory buckets.</p>
147 /// </note>
148 pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
149 &self.display_name
150 }
151 /// <p>Container for the ID of the owner.</p>
152 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
153 self.id = ::std::option::Option::Some(input.into());
154 self
155 }
156 /// <p>Container for the ID of the owner.</p>
157 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
158 self.id = input;
159 self
160 }
161 /// <p>Container for the ID of the owner.</p>
162 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
163 &self.id
164 }
165 /// Consumes the builder and constructs a [`Owner`](crate::types::Owner).
166 pub fn build(self) -> crate::types::Owner {
167 crate::types::Owner {
168 display_name: self.display_name,
169 id: self.id,
170 }
171 }
172}