aws_sdk_geomaps/operation/get_tile/
_get_tile_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetTileOutput {
6 pub blob: ::std::option::Option<::aws_smithy_types::Blob>,
8 pub content_type: ::std::option::Option<::std::string::String>,
10 pub cache_control: ::std::option::Option<::std::string::String>,
12 pub e_tag: ::std::option::Option<::std::string::String>,
14 pub pricing_bucket: ::std::string::String,
16 _request_id: Option<String>,
17}
18impl GetTileOutput {
19 pub fn blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
21 self.blob.as_ref()
22 }
23 pub fn content_type(&self) -> ::std::option::Option<&str> {
25 self.content_type.as_deref()
26 }
27 pub fn cache_control(&self) -> ::std::option::Option<&str> {
29 self.cache_control.as_deref()
30 }
31 pub fn e_tag(&self) -> ::std::option::Option<&str> {
33 self.e_tag.as_deref()
34 }
35 pub fn pricing_bucket(&self) -> &str {
37 use std::ops::Deref;
38 self.pricing_bucket.deref()
39 }
40}
41impl ::aws_types::request_id::RequestId for GetTileOutput {
42 fn request_id(&self) -> Option<&str> {
43 self._request_id.as_deref()
44 }
45}
46impl GetTileOutput {
47 pub fn builder() -> crate::operation::get_tile::builders::GetTileOutputBuilder {
49 crate::operation::get_tile::builders::GetTileOutputBuilder::default()
50 }
51}
52
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
55#[non_exhaustive]
56pub struct GetTileOutputBuilder {
57 pub(crate) blob: ::std::option::Option<::aws_smithy_types::Blob>,
58 pub(crate) content_type: ::std::option::Option<::std::string::String>,
59 pub(crate) cache_control: ::std::option::Option<::std::string::String>,
60 pub(crate) e_tag: ::std::option::Option<::std::string::String>,
61 pub(crate) pricing_bucket: ::std::option::Option<::std::string::String>,
62 _request_id: Option<String>,
63}
64impl GetTileOutputBuilder {
65 pub fn blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
67 self.blob = ::std::option::Option::Some(input);
68 self
69 }
70 pub fn set_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
72 self.blob = input;
73 self
74 }
75 pub fn get_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
77 &self.blob
78 }
79 pub fn content_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.content_type = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_content_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.content_type = input;
87 self
88 }
89 pub fn get_content_type(&self) -> &::std::option::Option<::std::string::String> {
91 &self.content_type
92 }
93 pub fn cache_control(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.cache_control = ::std::option::Option::Some(input.into());
96 self
97 }
98 pub fn set_cache_control(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.cache_control = input;
101 self
102 }
103 pub fn get_cache_control(&self) -> &::std::option::Option<::std::string::String> {
105 &self.cache_control
106 }
107 pub fn e_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.e_tag = ::std::option::Option::Some(input.into());
110 self
111 }
112 pub fn set_e_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
114 self.e_tag = input;
115 self
116 }
117 pub fn get_e_tag(&self) -> &::std::option::Option<::std::string::String> {
119 &self.e_tag
120 }
121 pub fn pricing_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124 self.pricing_bucket = ::std::option::Option::Some(input.into());
125 self
126 }
127 pub fn set_pricing_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.pricing_bucket = input;
130 self
131 }
132 pub fn get_pricing_bucket(&self) -> &::std::option::Option<::std::string::String> {
134 &self.pricing_bucket
135 }
136 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
137 self._request_id = Some(request_id.into());
138 self
139 }
140
141 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
142 self._request_id = request_id;
143 self
144 }
145 pub fn build(self) -> ::std::result::Result<crate::operation::get_tile::GetTileOutput, ::aws_smithy_types::error::operation::BuildError> {
149 ::std::result::Result::Ok(crate::operation::get_tile::GetTileOutput {
150 blob: self.blob,
151 content_type: self.content_type,
152 cache_control: self.cache_control,
153 e_tag: self.e_tag,
154 pricing_bucket: self.pricing_bucket.ok_or_else(|| {
155 ::aws_smithy_types::error::operation::BuildError::missing_field(
156 "pricing_bucket",
157 "pricing_bucket was not specified but it is required when building GetTileOutput",
158 )
159 })?,
160 _request_id: self._request_id,
161 })
162 }
163}