aws_sdk_panorama/types/
_storage_location.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct StorageLocation {
7 pub bucket: ::std::string::String,
9 pub repo_prefix_location: ::std::string::String,
11 pub generated_prefix_location: ::std::string::String,
13 pub binary_prefix_location: ::std::string::String,
15 pub manifest_prefix_location: ::std::string::String,
17}
18impl StorageLocation {
19 pub fn bucket(&self) -> &str {
21 use std::ops::Deref;
22 self.bucket.deref()
23 }
24 pub fn repo_prefix_location(&self) -> &str {
26 use std::ops::Deref;
27 self.repo_prefix_location.deref()
28 }
29 pub fn generated_prefix_location(&self) -> &str {
31 use std::ops::Deref;
32 self.generated_prefix_location.deref()
33 }
34 pub fn binary_prefix_location(&self) -> &str {
36 use std::ops::Deref;
37 self.binary_prefix_location.deref()
38 }
39 pub fn manifest_prefix_location(&self) -> &str {
41 use std::ops::Deref;
42 self.manifest_prefix_location.deref()
43 }
44}
45impl StorageLocation {
46 pub fn builder() -> crate::types::builders::StorageLocationBuilder {
48 crate::types::builders::StorageLocationBuilder::default()
49 }
50}
51
52#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct StorageLocationBuilder {
56 pub(crate) bucket: ::std::option::Option<::std::string::String>,
57 pub(crate) repo_prefix_location: ::std::option::Option<::std::string::String>,
58 pub(crate) generated_prefix_location: ::std::option::Option<::std::string::String>,
59 pub(crate) binary_prefix_location: ::std::option::Option<::std::string::String>,
60 pub(crate) manifest_prefix_location: ::std::option::Option<::std::string::String>,
61}
62impl StorageLocationBuilder {
63 pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66 self.bucket = ::std::option::Option::Some(input.into());
67 self
68 }
69 pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71 self.bucket = input;
72 self
73 }
74 pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
76 &self.bucket
77 }
78 pub fn repo_prefix_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.repo_prefix_location = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_repo_prefix_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.repo_prefix_location = input;
87 self
88 }
89 pub fn get_repo_prefix_location(&self) -> &::std::option::Option<::std::string::String> {
91 &self.repo_prefix_location
92 }
93 pub fn generated_prefix_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.generated_prefix_location = ::std::option::Option::Some(input.into());
97 self
98 }
99 pub fn set_generated_prefix_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.generated_prefix_location = input;
102 self
103 }
104 pub fn get_generated_prefix_location(&self) -> &::std::option::Option<::std::string::String> {
106 &self.generated_prefix_location
107 }
108 pub fn binary_prefix_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111 self.binary_prefix_location = ::std::option::Option::Some(input.into());
112 self
113 }
114 pub fn set_binary_prefix_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116 self.binary_prefix_location = input;
117 self
118 }
119 pub fn get_binary_prefix_location(&self) -> &::std::option::Option<::std::string::String> {
121 &self.binary_prefix_location
122 }
123 pub fn manifest_prefix_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126 self.manifest_prefix_location = ::std::option::Option::Some(input.into());
127 self
128 }
129 pub fn set_manifest_prefix_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131 self.manifest_prefix_location = input;
132 self
133 }
134 pub fn get_manifest_prefix_location(&self) -> &::std::option::Option<::std::string::String> {
136 &self.manifest_prefix_location
137 }
138 pub fn build(self) -> ::std::result::Result<crate::types::StorageLocation, ::aws_smithy_types::error::operation::BuildError> {
146 ::std::result::Result::Ok(crate::types::StorageLocation {
147 bucket: self.bucket.ok_or_else(|| {
148 ::aws_smithy_types::error::operation::BuildError::missing_field(
149 "bucket",
150 "bucket was not specified but it is required when building StorageLocation",
151 )
152 })?,
153 repo_prefix_location: self.repo_prefix_location.ok_or_else(|| {
154 ::aws_smithy_types::error::operation::BuildError::missing_field(
155 "repo_prefix_location",
156 "repo_prefix_location was not specified but it is required when building StorageLocation",
157 )
158 })?,
159 generated_prefix_location: self.generated_prefix_location.ok_or_else(|| {
160 ::aws_smithy_types::error::operation::BuildError::missing_field(
161 "generated_prefix_location",
162 "generated_prefix_location was not specified but it is required when building StorageLocation",
163 )
164 })?,
165 binary_prefix_location: self.binary_prefix_location.ok_or_else(|| {
166 ::aws_smithy_types::error::operation::BuildError::missing_field(
167 "binary_prefix_location",
168 "binary_prefix_location was not specified but it is required when building StorageLocation",
169 )
170 })?,
171 manifest_prefix_location: self.manifest_prefix_location.ok_or_else(|| {
172 ::aws_smithy_types::error::operation::BuildError::missing_field(
173 "manifest_prefix_location",
174 "manifest_prefix_location was not specified but it is required when building StorageLocation",
175 )
176 })?,
177 })
178 }
179}