aws_sdk_datapipeline/operation/describe_objects/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_objects::_describe_objects_output::DescribeObjectsOutputBuilder;
3
4pub use crate::operation::describe_objects::_describe_objects_input::DescribeObjectsInputBuilder;
5
6impl crate::operation::describe_objects::builders::DescribeObjectsInputBuilder {
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::describe_objects::DescribeObjectsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_objects::DescribeObjectsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_objects();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeObjects`.
24///
25/// <p>Gets the object definitions for a set of objects associated with the pipeline. Object definitions are composed of a set of fields that define the properties of the object.</p><examples>
26/// <request>
27/// POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: DataPipeline.DescribeObjects Content-Length: 98 Host: datapipeline.us-east-1.amazonaws.com X-Amz-Date: Mon, 12 Nov 2012 17:49:52 GMT Authorization: AuthParams {"pipelineId": "df-06372391ZG65EXAMPLE", "objectIds": \["Schedule"\], "evaluateExpressions": true}
28/// </request>
29/// <response>
30/// x-amzn-RequestId: 4c18ea5d-0777-11e2-8a14-21bb8a1f50ef Content-Type: application/x-amz-json-1.1 Content-Length: 1488 Date: Mon, 12 Nov 2012 17:50:53 GMT {"hasMoreResults": false, "pipelineObjects": \[ {"fields": \[ {"key": "startDateTime", "stringValue": "2012-12-12T00:00:00"}, {"key": "parent", "refValue": "Default"}, {"key": "@sphere", "stringValue": "COMPONENT"}, {"key": "type", "stringValue": "Schedule"}, {"key": "period", "stringValue": "1 hour"}, {"key": "endDateTime", "stringValue": "2012-12-21T18:00:00"}, {"key": "@version", "stringValue": "1"}, {"key": "@status", "stringValue": "PENDING"}, {"key": "@pipelineId", "stringValue": "df-06372391ZG65EXAMPLE"} \], "id": "Schedule", "name": "Schedule"} \] }
31/// </response>
32/// </examples>
33#[derive(::std::clone::Clone, ::std::fmt::Debug)]
34pub struct DescribeObjectsFluentBuilder {
35    handle: ::std::sync::Arc<crate::client::Handle>,
36    inner: crate::operation::describe_objects::builders::DescribeObjectsInputBuilder,
37    config_override: ::std::option::Option<crate::config::Builder>,
38}
39impl
40    crate::client::customize::internal::CustomizableSend<
41        crate::operation::describe_objects::DescribeObjectsOutput,
42        crate::operation::describe_objects::DescribeObjectsError,
43    > for DescribeObjectsFluentBuilder
44{
45    fn send(
46        self,
47        config_override: crate::config::Builder,
48    ) -> crate::client::customize::internal::BoxFuture<
49        crate::client::customize::internal::SendResult<
50            crate::operation::describe_objects::DescribeObjectsOutput,
51            crate::operation::describe_objects::DescribeObjectsError,
52        >,
53    > {
54        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
55    }
56}
57impl DescribeObjectsFluentBuilder {
58    /// Creates a new `DescribeObjectsFluentBuilder`.
59    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
60        Self {
61            handle,
62            inner: ::std::default::Default::default(),
63            config_override: ::std::option::Option::None,
64        }
65    }
66    /// Access the DescribeObjects as a reference.
67    pub fn as_input(&self) -> &crate::operation::describe_objects::builders::DescribeObjectsInputBuilder {
68        &self.inner
69    }
70    /// Sends the request and returns the response.
71    ///
72    /// If an error occurs, an `SdkError` will be returned with additional details that
73    /// can be matched against.
74    ///
75    /// By default, any retryable failures will be retried twice. Retry behavior
76    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
77    /// set when configuring the client.
78    pub async fn send(
79        self,
80    ) -> ::std::result::Result<
81        crate::operation::describe_objects::DescribeObjectsOutput,
82        ::aws_smithy_runtime_api::client::result::SdkError<
83            crate::operation::describe_objects::DescribeObjectsError,
84            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
85        >,
86    > {
87        let input = self
88            .inner
89            .build()
90            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
91        let runtime_plugins = crate::operation::describe_objects::DescribeObjects::operation_runtime_plugins(
92            self.handle.runtime_plugins.clone(),
93            &self.handle.conf,
94            self.config_override,
95        );
96        crate::operation::describe_objects::DescribeObjects::orchestrate(&runtime_plugins, input).await
97    }
98
99    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
100    pub fn customize(
101        self,
102    ) -> crate::client::customize::CustomizableOperation<
103        crate::operation::describe_objects::DescribeObjectsOutput,
104        crate::operation::describe_objects::DescribeObjectsError,
105        Self,
106    > {
107        crate::client::customize::CustomizableOperation::new(self)
108    }
109    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
110        self.set_config_override(::std::option::Option::Some(config_override.into()));
111        self
112    }
113
114    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
115        self.config_override = config_override;
116        self
117    }
118    /// Create a paginator for this request
119    ///
120    /// Paginators are used by calling [`send().await`](crate::operation::describe_objects::paginator::DescribeObjectsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
121    pub fn into_paginator(self) -> crate::operation::describe_objects::paginator::DescribeObjectsPaginator {
122        crate::operation::describe_objects::paginator::DescribeObjectsPaginator::new(self.handle, self.inner)
123    }
124    /// <p>The ID of the pipeline that contains the object definitions.</p>
125    pub fn pipeline_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.inner = self.inner.pipeline_id(input.into());
127        self
128    }
129    /// <p>The ID of the pipeline that contains the object definitions.</p>
130    pub fn set_pipeline_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.inner = self.inner.set_pipeline_id(input);
132        self
133    }
134    /// <p>The ID of the pipeline that contains the object definitions.</p>
135    pub fn get_pipeline_id(&self) -> &::std::option::Option<::std::string::String> {
136        self.inner.get_pipeline_id()
137    }
138    ///
139    /// Appends an item to `objectIds`.
140    ///
141    /// To override the contents of this collection use [`set_object_ids`](Self::set_object_ids).
142    ///
143    /// <p>The IDs of the pipeline objects that contain the definitions to be described. You can pass as many as 25 identifiers in a single call to <code>DescribeObjects</code>.</p>
144    pub fn object_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.inner = self.inner.object_ids(input.into());
146        self
147    }
148    /// <p>The IDs of the pipeline objects that contain the definitions to be described. You can pass as many as 25 identifiers in a single call to <code>DescribeObjects</code>.</p>
149    pub fn set_object_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
150        self.inner = self.inner.set_object_ids(input);
151        self
152    }
153    /// <p>The IDs of the pipeline objects that contain the definitions to be described. You can pass as many as 25 identifiers in a single call to <code>DescribeObjects</code>.</p>
154    pub fn get_object_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
155        self.inner.get_object_ids()
156    }
157    /// <p>Indicates whether any expressions in the object should be evaluated when the object descriptions are returned.</p>
158    pub fn evaluate_expressions(mut self, input: bool) -> Self {
159        self.inner = self.inner.evaluate_expressions(input);
160        self
161    }
162    /// <p>Indicates whether any expressions in the object should be evaluated when the object descriptions are returned.</p>
163    pub fn set_evaluate_expressions(mut self, input: ::std::option::Option<bool>) -> Self {
164        self.inner = self.inner.set_evaluate_expressions(input);
165        self
166    }
167    /// <p>Indicates whether any expressions in the object should be evaluated when the object descriptions are returned.</p>
168    pub fn get_evaluate_expressions(&self) -> &::std::option::Option<bool> {
169        self.inner.get_evaluate_expressions()
170    }
171    /// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>DescribeObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
172    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
173        self.inner = self.inner.marker(input.into());
174        self
175    }
176    /// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>DescribeObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
177    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178        self.inner = self.inner.set_marker(input);
179        self
180    }
181    /// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>DescribeObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
182    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
183        self.inner.get_marker()
184    }
185}