aws_sdk_ec2/types/
_storage_location.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct StorageLocation {
7 pub bucket: ::std::option::Option<::std::string::String>,
9 pub key: ::std::option::Option<::std::string::String>,
11}
12impl StorageLocation {
13 pub fn bucket(&self) -> ::std::option::Option<&str> {
15 self.bucket.as_deref()
16 }
17 pub fn key(&self) -> ::std::option::Option<&str> {
19 self.key.as_deref()
20 }
21}
22impl StorageLocation {
23 pub fn builder() -> crate::types::builders::StorageLocationBuilder {
25 crate::types::builders::StorageLocationBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct StorageLocationBuilder {
33 pub(crate) bucket: ::std::option::Option<::std::string::String>,
34 pub(crate) key: ::std::option::Option<::std::string::String>,
35}
36impl StorageLocationBuilder {
37 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.bucket = ::std::option::Option::Some(input.into());
40 self
41 }
42 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.bucket = input;
45 self
46 }
47 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
49 &self.bucket
50 }
51 pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.key = ::std::option::Option::Some(input.into());
54 self
55 }
56 pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.key = input;
59 self
60 }
61 pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
63 &self.key
64 }
65 pub fn build(self) -> crate::types::StorageLocation {
67 crate::types::StorageLocation {
68 bucket: self.bucket,
69 key: self.key,
70 }
71 }
72}