aws_sdk_forecast/operation/create_explainability_export/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_explainability_export::_create_explainability_export_output::CreateExplainabilityExportOutputBuilder;
3
4pub use crate::operation::create_explainability_export::_create_explainability_export_input::CreateExplainabilityExportInputBuilder;
5
6impl crate::operation::create_explainability_export::builders::CreateExplainabilityExportInputBuilder {
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::create_explainability_export::CreateExplainabilityExportOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::create_explainability_export::CreateExplainabilityExportError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.create_explainability_export();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `CreateExplainabilityExport`.
24///
25/// <p>Exports an Explainability resource created by the <code>CreateExplainability</code> operation. Exported files are exported to an Amazon Simple Storage Service (Amazon S3) bucket.</p>
26/// <p>You must specify a <code>DataDestination</code> object that includes an Amazon S3 bucket and an Identity and Access Management (IAM) role that Amazon Forecast can assume to access the Amazon S3 bucket. For more information, see <code>aws-forecast-iam-roles</code>.</p><note>
27/// <p>The <code>Status</code> of the export job must be <code>ACTIVE</code> before you can access the export in your Amazon S3 bucket. To get the status, use the <code>DescribeExplainabilityExport</code> operation.</p>
28/// </note>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct CreateExplainabilityExportFluentBuilder {
31    handle: ::std::sync::Arc<crate::client::Handle>,
32    inner: crate::operation::create_explainability_export::builders::CreateExplainabilityExportInputBuilder,
33    config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36    crate::client::customize::internal::CustomizableSend<
37        crate::operation::create_explainability_export::CreateExplainabilityExportOutput,
38        crate::operation::create_explainability_export::CreateExplainabilityExportError,
39    > for CreateExplainabilityExportFluentBuilder
40{
41    fn send(
42        self,
43        config_override: crate::config::Builder,
44    ) -> crate::client::customize::internal::BoxFuture<
45        crate::client::customize::internal::SendResult<
46            crate::operation::create_explainability_export::CreateExplainabilityExportOutput,
47            crate::operation::create_explainability_export::CreateExplainabilityExportError,
48        >,
49    > {
50        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51    }
52}
53impl CreateExplainabilityExportFluentBuilder {
54    /// Creates a new `CreateExplainabilityExportFluentBuilder`.
55    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56        Self {
57            handle,
58            inner: ::std::default::Default::default(),
59            config_override: ::std::option::Option::None,
60        }
61    }
62    /// Access the CreateExplainabilityExport as a reference.
63    pub fn as_input(&self) -> &crate::operation::create_explainability_export::builders::CreateExplainabilityExportInputBuilder {
64        &self.inner
65    }
66    /// Sends the request and returns the response.
67    ///
68    /// If an error occurs, an `SdkError` will be returned with additional details that
69    /// can be matched against.
70    ///
71    /// By default, any retryable failures will be retried twice. Retry behavior
72    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73    /// set when configuring the client.
74    pub async fn send(
75        self,
76    ) -> ::std::result::Result<
77        crate::operation::create_explainability_export::CreateExplainabilityExportOutput,
78        ::aws_smithy_runtime_api::client::result::SdkError<
79            crate::operation::create_explainability_export::CreateExplainabilityExportError,
80            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81        >,
82    > {
83        let input = self
84            .inner
85            .build()
86            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87        let runtime_plugins = crate::operation::create_explainability_export::CreateExplainabilityExport::operation_runtime_plugins(
88            self.handle.runtime_plugins.clone(),
89            &self.handle.conf,
90            self.config_override,
91        );
92        crate::operation::create_explainability_export::CreateExplainabilityExport::orchestrate(&runtime_plugins, input).await
93    }
94
95    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96    pub fn customize(
97        self,
98    ) -> crate::client::customize::CustomizableOperation<
99        crate::operation::create_explainability_export::CreateExplainabilityExportOutput,
100        crate::operation::create_explainability_export::CreateExplainabilityExportError,
101        Self,
102    > {
103        crate::client::customize::CustomizableOperation::new(self)
104    }
105    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106        self.set_config_override(::std::option::Option::Some(config_override.into()));
107        self
108    }
109
110    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111        self.config_override = config_override;
112        self
113    }
114    /// <p>A unique name for the Explainability export.</p>
115    pub fn explainability_export_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.inner = self.inner.explainability_export_name(input.into());
117        self
118    }
119    /// <p>A unique name for the Explainability export.</p>
120    pub fn set_explainability_export_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.inner = self.inner.set_explainability_export_name(input);
122        self
123    }
124    /// <p>A unique name for the Explainability export.</p>
125    pub fn get_explainability_export_name(&self) -> &::std::option::Option<::std::string::String> {
126        self.inner.get_explainability_export_name()
127    }
128    /// <p>The Amazon Resource Name (ARN) of the Explainability to export.</p>
129    pub fn explainability_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.inner = self.inner.explainability_arn(input.into());
131        self
132    }
133    /// <p>The Amazon Resource Name (ARN) of the Explainability to export.</p>
134    pub fn set_explainability_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.inner = self.inner.set_explainability_arn(input);
136        self
137    }
138    /// <p>The Amazon Resource Name (ARN) of the Explainability to export.</p>
139    pub fn get_explainability_arn(&self) -> &::std::option::Option<::std::string::String> {
140        self.inner.get_explainability_arn()
141    }
142    /// <p>The destination for an export job. Provide an S3 path, an Identity and Access Management (IAM) role that allows Amazon Forecast to access the location, and an Key Management Service (KMS) key (optional).</p>
143    pub fn destination(mut self, input: crate::types::DataDestination) -> Self {
144        self.inner = self.inner.destination(input);
145        self
146    }
147    /// <p>The destination for an export job. Provide an S3 path, an Identity and Access Management (IAM) role that allows Amazon Forecast to access the location, and an Key Management Service (KMS) key (optional).</p>
148    pub fn set_destination(mut self, input: ::std::option::Option<crate::types::DataDestination>) -> Self {
149        self.inner = self.inner.set_destination(input);
150        self
151    }
152    /// <p>The destination for an export job. Provide an S3 path, an Identity and Access Management (IAM) role that allows Amazon Forecast to access the location, and an Key Management Service (KMS) key (optional).</p>
153    pub fn get_destination(&self) -> &::std::option::Option<crate::types::DataDestination> {
154        self.inner.get_destination()
155    }
156    ///
157    /// Appends an item to `Tags`.
158    ///
159    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
160    ///
161    /// <p>Optional metadata to help you categorize and organize your resources. Each tag consists of a key and an optional value, both of which you define. Tag keys and values are case sensitive.</p>
162    /// <p>The following restrictions apply to tags:</p>
163    /// <ul>
164    /// <li>
165    /// <p>For each resource, each tag key must be unique and each tag key must have one value.</p></li>
166    /// <li>
167    /// <p>Maximum number of tags per resource: 50.</p></li>
168    /// <li>
169    /// <p>Maximum key length: 128 Unicode characters in UTF-8.</p></li>
170    /// <li>
171    /// <p>Maximum value length: 256 Unicode characters in UTF-8.</p></li>
172    /// <li>
173    /// <p>Accepted characters: all letters and numbers, spaces representable in UTF-8, and + - = . _ : / @. If your tagging schema is used across other services and resources, the character restrictions of those services also apply.</p></li>
174    /// <li>
175    /// <p>Key prefixes cannot include any upper or lowercase combination of <code>aws:</code> or <code>AWS:</code>. Values can have this prefix. If a tag value has <code>aws</code> as its prefix but the key does not, Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of <code>aws</code> do not count against your tags per resource limit. You cannot edit or delete tag keys with this prefix.</p></li>
176    /// </ul>
177    pub fn tags(mut self, input: crate::types::Tag) -> Self {
178        self.inner = self.inner.tags(input);
179        self
180    }
181    /// <p>Optional metadata to help you categorize and organize your resources. Each tag consists of a key and an optional value, both of which you define. Tag keys and values are case sensitive.</p>
182    /// <p>The following restrictions apply to tags:</p>
183    /// <ul>
184    /// <li>
185    /// <p>For each resource, each tag key must be unique and each tag key must have one value.</p></li>
186    /// <li>
187    /// <p>Maximum number of tags per resource: 50.</p></li>
188    /// <li>
189    /// <p>Maximum key length: 128 Unicode characters in UTF-8.</p></li>
190    /// <li>
191    /// <p>Maximum value length: 256 Unicode characters in UTF-8.</p></li>
192    /// <li>
193    /// <p>Accepted characters: all letters and numbers, spaces representable in UTF-8, and + - = . _ : / @. If your tagging schema is used across other services and resources, the character restrictions of those services also apply.</p></li>
194    /// <li>
195    /// <p>Key prefixes cannot include any upper or lowercase combination of <code>aws:</code> or <code>AWS:</code>. Values can have this prefix. If a tag value has <code>aws</code> as its prefix but the key does not, Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of <code>aws</code> do not count against your tags per resource limit. You cannot edit or delete tag keys with this prefix.</p></li>
196    /// </ul>
197    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
198        self.inner = self.inner.set_tags(input);
199        self
200    }
201    /// <p>Optional metadata to help you categorize and organize your resources. Each tag consists of a key and an optional value, both of which you define. Tag keys and values are case sensitive.</p>
202    /// <p>The following restrictions apply to tags:</p>
203    /// <ul>
204    /// <li>
205    /// <p>For each resource, each tag key must be unique and each tag key must have one value.</p></li>
206    /// <li>
207    /// <p>Maximum number of tags per resource: 50.</p></li>
208    /// <li>
209    /// <p>Maximum key length: 128 Unicode characters in UTF-8.</p></li>
210    /// <li>
211    /// <p>Maximum value length: 256 Unicode characters in UTF-8.</p></li>
212    /// <li>
213    /// <p>Accepted characters: all letters and numbers, spaces representable in UTF-8, and + - = . _ : / @. If your tagging schema is used across other services and resources, the character restrictions of those services also apply.</p></li>
214    /// <li>
215    /// <p>Key prefixes cannot include any upper or lowercase combination of <code>aws:</code> or <code>AWS:</code>. Values can have this prefix. If a tag value has <code>aws</code> as its prefix but the key does not, Forecast considers it to be a user tag and will count against the limit of 50 tags. Tags with only the key prefix of <code>aws</code> do not count against your tags per resource limit. You cannot edit or delete tag keys with this prefix.</p></li>
216    /// </ul>
217    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
218        self.inner.get_tags()
219    }
220    /// <p>The format of the exported data, CSV or PARQUET.</p>
221    pub fn format(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
222        self.inner = self.inner.format(input.into());
223        self
224    }
225    /// <p>The format of the exported data, CSV or PARQUET.</p>
226    pub fn set_format(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227        self.inner = self.inner.set_format(input);
228        self
229    }
230    /// <p>The format of the exported data, CSV or PARQUET.</p>
231    pub fn get_format(&self) -> &::std::option::Option<::std::string::String> {
232        self.inner.get_format()
233    }
234}