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