aws_sdk_sagemakergeospatial/operation/get_tile/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_tile::_get_tile_output::GetTileOutputBuilder;
3
4pub use crate::operation::get_tile::_get_tile_input::GetTileInputBuilder;
5
6impl crate::operation::get_tile::builders::GetTileInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::get_tile::GetTileOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_tile::GetTileError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_tile();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetTile`.
24///
25/// <p>Gets a web mercator tile for the given Earth Observation job.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct GetTileFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::get_tile::builders::GetTileInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl crate::client::customize::internal::CustomizableSend<crate::operation::get_tile::GetTileOutput, crate::operation::get_tile::GetTileError>
33    for GetTileFluentBuilder
34{
35    fn send(
36        self,
37        config_override: crate::config::Builder,
38    ) -> crate::client::customize::internal::BoxFuture<
39        crate::client::customize::internal::SendResult<crate::operation::get_tile::GetTileOutput, crate::operation::get_tile::GetTileError>,
40    > {
41        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
42    }
43}
44impl GetTileFluentBuilder {
45    /// Creates a new `GetTileFluentBuilder`.
46    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
47        Self {
48            handle,
49            inner: ::std::default::Default::default(),
50            config_override: ::std::option::Option::None,
51        }
52    }
53    /// Access the GetTile as a reference.
54    pub fn as_input(&self) -> &crate::operation::get_tile::builders::GetTileInputBuilder {
55        &self.inner
56    }
57    /// Sends the request and returns the response.
58    ///
59    /// If an error occurs, an `SdkError` will be returned with additional details that
60    /// can be matched against.
61    ///
62    /// By default, any retryable failures will be retried twice. Retry behavior
63    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
64    /// set when configuring the client.
65    pub async fn send(
66        self,
67    ) -> ::std::result::Result<
68        crate::operation::get_tile::GetTileOutput,
69        ::aws_smithy_runtime_api::client::result::SdkError<
70            crate::operation::get_tile::GetTileError,
71            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
72        >,
73    > {
74        let input = self
75            .inner
76            .build()
77            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
78        let runtime_plugins = crate::operation::get_tile::GetTile::operation_runtime_plugins(
79            self.handle.runtime_plugins.clone(),
80            &self.handle.conf,
81            self.config_override,
82        );
83        crate::operation::get_tile::GetTile::orchestrate(&runtime_plugins, input).await
84    }
85
86    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
87    pub fn customize(
88        self,
89    ) -> crate::client::customize::CustomizableOperation<crate::operation::get_tile::GetTileOutput, crate::operation::get_tile::GetTileError, Self>
90    {
91        crate::client::customize::CustomizableOperation::new(self)
92    }
93    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
94        self.set_config_override(::std::option::Option::Some(config_override.into()));
95        self
96    }
97
98    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
99        self.config_override = config_override;
100        self
101    }
102    /// <p>The x coordinate of the tile input.</p>
103    pub fn x(mut self, input: i32) -> Self {
104        self.inner = self.inner.x(input);
105        self
106    }
107    /// <p>The x coordinate of the tile input.</p>
108    pub fn set_x(mut self, input: ::std::option::Option<i32>) -> Self {
109        self.inner = self.inner.set_x(input);
110        self
111    }
112    /// <p>The x coordinate of the tile input.</p>
113    pub fn get_x(&self) -> &::std::option::Option<i32> {
114        self.inner.get_x()
115    }
116    /// <p>The y coordinate of the tile input.</p>
117    pub fn y(mut self, input: i32) -> Self {
118        self.inner = self.inner.y(input);
119        self
120    }
121    /// <p>The y coordinate of the tile input.</p>
122    pub fn set_y(mut self, input: ::std::option::Option<i32>) -> Self {
123        self.inner = self.inner.set_y(input);
124        self
125    }
126    /// <p>The y coordinate of the tile input.</p>
127    pub fn get_y(&self) -> &::std::option::Option<i32> {
128        self.inner.get_y()
129    }
130    /// <p>The z coordinate of the tile input.</p>
131    pub fn z(mut self, input: i32) -> Self {
132        self.inner = self.inner.z(input);
133        self
134    }
135    /// <p>The z coordinate of the tile input.</p>
136    pub fn set_z(mut self, input: ::std::option::Option<i32>) -> Self {
137        self.inner = self.inner.set_z(input);
138        self
139    }
140    /// <p>The z coordinate of the tile input.</p>
141    pub fn get_z(&self) -> &::std::option::Option<i32> {
142        self.inner.get_z()
143    }
144    ///
145    /// Appends an item to `ImageAssets`.
146    ///
147    /// To override the contents of this collection use [`set_image_assets`](Self::set_image_assets).
148    ///
149    /// <p>The particular assets or bands to tile.</p>
150    pub fn image_assets(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
151        self.inner = self.inner.image_assets(input.into());
152        self
153    }
154    /// <p>The particular assets or bands to tile.</p>
155    pub fn set_image_assets(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
156        self.inner = self.inner.set_image_assets(input);
157        self
158    }
159    /// <p>The particular assets or bands to tile.</p>
160    pub fn get_image_assets(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
161        self.inner.get_image_assets()
162    }
163    /// <p>Determines what part of the Earth Observation job to tile. 'INPUT' or 'OUTPUT' are the valid options.</p>
164    pub fn target(mut self, input: crate::types::TargetOptions) -> Self {
165        self.inner = self.inner.target(input);
166        self
167    }
168    /// <p>Determines what part of the Earth Observation job to tile. 'INPUT' or 'OUTPUT' are the valid options.</p>
169    pub fn set_target(mut self, input: ::std::option::Option<crate::types::TargetOptions>) -> Self {
170        self.inner = self.inner.set_target(input);
171        self
172    }
173    /// <p>Determines what part of the Earth Observation job to tile. 'INPUT' or 'OUTPUT' are the valid options.</p>
174    pub fn get_target(&self) -> &::std::option::Option<crate::types::TargetOptions> {
175        self.inner.get_target()
176    }
177    /// <p>The Amazon Resource Name (ARN) of the tile operation.</p>
178    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
179        self.inner = self.inner.arn(input.into());
180        self
181    }
182    /// <p>The Amazon Resource Name (ARN) of the tile operation.</p>
183    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184        self.inner = self.inner.set_arn(input);
185        self
186    }
187    /// <p>The Amazon Resource Name (ARN) of the tile operation.</p>
188    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
189        self.inner.get_arn()
190    }
191    /// <p>Determines whether or not to return a valid data mask.</p>
192    pub fn image_mask(mut self, input: bool) -> Self {
193        self.inner = self.inner.image_mask(input);
194        self
195    }
196    /// <p>Determines whether or not to return a valid data mask.</p>
197    pub fn set_image_mask(mut self, input: ::std::option::Option<bool>) -> Self {
198        self.inner = self.inner.set_image_mask(input);
199        self
200    }
201    /// <p>Determines whether or not to return a valid data mask.</p>
202    pub fn get_image_mask(&self) -> &::std::option::Option<bool> {
203        self.inner.get_image_mask()
204    }
205    /// <p>The data format of the output tile. The formats include .npy, .png and .jpg.</p>
206    pub fn output_format(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
207        self.inner = self.inner.output_format(input.into());
208        self
209    }
210    /// <p>The data format of the output tile. The formats include .npy, .png and .jpg.</p>
211    pub fn set_output_format(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
212        self.inner = self.inner.set_output_format(input);
213        self
214    }
215    /// <p>The data format of the output tile. The formats include .npy, .png and .jpg.</p>
216    pub fn get_output_format(&self) -> &::std::option::Option<::std::string::String> {
217        self.inner.get_output_format()
218    }
219    /// <p>Time range filter applied to imagery to find the images to tile.</p>
220    pub fn time_range_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
221        self.inner = self.inner.time_range_filter(input.into());
222        self
223    }
224    /// <p>Time range filter applied to imagery to find the images to tile.</p>
225    pub fn set_time_range_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
226        self.inner = self.inner.set_time_range_filter(input);
227        self
228    }
229    /// <p>Time range filter applied to imagery to find the images to tile.</p>
230    pub fn get_time_range_filter(&self) -> &::std::option::Option<::std::string::String> {
231        self.inner.get_time_range_filter()
232    }
233    /// <p>Property filters for the imagery to tile.</p>
234    pub fn property_filters(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
235        self.inner = self.inner.property_filters(input.into());
236        self
237    }
238    /// <p>Property filters for the imagery to tile.</p>
239    pub fn set_property_filters(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
240        self.inner = self.inner.set_property_filters(input);
241        self
242    }
243    /// <p>Property filters for the imagery to tile.</p>
244    pub fn get_property_filters(&self) -> &::std::option::Option<::std::string::String> {
245        self.inner.get_property_filters()
246    }
247    /// <p>The output data type of the tile operation.</p>
248    pub fn output_data_type(mut self, input: crate::types::OutputType) -> Self {
249        self.inner = self.inner.output_data_type(input);
250        self
251    }
252    /// <p>The output data type of the tile operation.</p>
253    pub fn set_output_data_type(mut self, input: ::std::option::Option<crate::types::OutputType>) -> Self {
254        self.inner = self.inner.set_output_data_type(input);
255        self
256    }
257    /// <p>The output data type of the tile operation.</p>
258    pub fn get_output_data_type(&self) -> &::std::option::Option<crate::types::OutputType> {
259        self.inner.get_output_data_type()
260    }
261    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specify.</p>
262    pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
263        self.inner = self.inner.execution_role_arn(input.into());
264        self
265    }
266    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specify.</p>
267    pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268        self.inner = self.inner.set_execution_role_arn(input);
269        self
270    }
271    /// <p>The Amazon Resource Name (ARN) of the IAM role that you specify.</p>
272    pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
273        self.inner.get_execution_role_arn()
274    }
275}