1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | pub use crate::operation::input_stream_with_initial_request::_input_stream_with_initial_request_input::InputStreamWithInitialRequestInputBuilder;
|
3 + |
|
4 + | pub use crate::operation::input_stream_with_initial_request::_input_stream_with_initial_request_output::InputStreamWithInitialRequestOutputBuilder;
|
5 + |
|
6 + | impl crate::operation::input_stream_with_initial_request::builders::InputStreamWithInitialRequestInputBuilder {
|
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::input_stream_with_initial_request::InputStreamWithInitialRequestOutput,
|
13 + | ::aws_smithy_runtime_api::client::result::SdkError<
|
14 + | crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestError,
|
15 + | ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
16 + | >,
|
17 + | > {
|
18 + | let mut fluent_builder = client.input_stream_with_initial_request();
|
19 + | fluent_builder.inner = self;
|
20 + | fluent_builder.send().await
|
21 + | }
|
22 + | }
|
23 + | /// Fluent builder constructing a request to `InputStreamWithInitialRequest`.
|
24 + | ///
|
25 + | #[derive(::std::fmt::Debug)]
|
26 + | pub struct InputStreamWithInitialRequestFluentBuilder {
|
27 + | handle: ::std::sync::Arc<crate::client::Handle>,
|
28 + | inner: crate::operation::input_stream_with_initial_request::builders::InputStreamWithInitialRequestInputBuilder,
|
29 + | config_override: ::std::option::Option<crate::config::Builder>,
|
30 + | }
|
31 + | impl
|
32 + | crate::client::customize::internal::CustomizableSend<
|
33 + | crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestOutput,
|
34 + | crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestError,
|
35 + | > for InputStreamWithInitialRequestFluentBuilder
|
36 + | {
|
37 + | fn send(
|
38 + | self,
|
39 + | config_override: crate::config::Builder,
|
40 + | ) -> crate::client::customize::internal::BoxFuture<
|
41 + | crate::client::customize::internal::SendResult<
|
42 + | crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestOutput,
|
43 + | crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestError,
|
44 + | >,
|
45 + | > {
|
46 + | ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
|
47 + | }
|
48 + | }
|
49 + | impl InputStreamWithInitialRequestFluentBuilder {
|
50 + | /// Creates a new `InputStreamWithInitialRequestFluentBuilder`.
|
51 + | pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
|
52 + | Self {
|
53 + | handle,
|
54 + | inner: ::std::default::Default::default(),
|
55 + | config_override: ::std::option::Option::None,
|
56 + | }
|
57 + | }
|
58 + | /// Access the InputStreamWithInitialRequest as a reference.
|
59 + | pub fn as_input(&self) -> &crate::operation::input_stream_with_initial_request::builders::InputStreamWithInitialRequestInputBuilder {
|
60 + | &self.inner
|
61 + | }
|
62 + | /// Sends the request and returns the response.
|
63 + | ///
|
64 + | /// If an error occurs, an `SdkError` will be returned with additional details that
|
65 + | /// can be matched against.
|
66 + | ///
|
67 + | /// By default, any retryable failures will be retried twice. Retry behavior
|
68 + | /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
|
69 + | /// set when configuring the client.
|
70 + | pub async fn send(
|
71 + | self,
|
72 + | ) -> ::std::result::Result<
|
73 + | crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestOutput,
|
74 + | ::aws_smithy_runtime_api::client::result::SdkError<
|
75 + | crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestError,
|
76 + | ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
|
77 + | >,
|
78 + | > {
|
79 + | let input = self
|
80 + | .inner
|
81 + | .build()
|
82 + | .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
|
83 + | let runtime_plugins = crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequest::operation_runtime_plugins(
|
84 + | self.handle.runtime_plugins.clone(),
|
85 + | &self.handle.conf,
|
86 + | self.config_override,
|
87 + | );
|
88 + | crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequest::orchestrate(&runtime_plugins, input).await
|
89 + | }
|
90 + |
|
91 + | /// Consumes this builder, creating a customizable operation that can be modified before being sent.
|
92 + | pub fn customize(
|
93 + | self,
|
94 + | ) -> crate::client::customize::CustomizableOperation<
|
95 + | crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestOutput,
|
96 + | crate::operation::input_stream_with_initial_request::InputStreamWithInitialRequestError,
|
97 + | Self,
|
98 + | > {
|
99 + | crate::client::customize::CustomizableOperation::new(self)
|
100 + | }
|
101 + | pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
|
102 + | self.set_config_override(::std::option::Option::Some(config_override.into()));
|
103 + | self
|
104 + | }
|
105 + |
|
106 + | pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
|
107 + | self.config_override = config_override;
|
108 + | self
|
109 + | }
|
110 + | #[allow(missing_docs)] // documentation missing in model
|
111 + | pub fn initial_request_member(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
112 + | self.inner = self.inner.initial_request_member(input.into());
|
113 + | self
|
114 + | }
|
115 + | #[allow(missing_docs)] // documentation missing in model
|
116 + | pub fn set_initial_request_member(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
117 + | self.inner = self.inner.set_initial_request_member(input);
|
118 + | self
|
119 + | }
|
120 + | #[allow(missing_docs)] // documentation missing in model
|
121 + | pub fn get_initial_request_member(&self) -> &::std::option::Option<::std::string::String> {
|
122 + | self.inner.get_initial_request_member()
|
123 + | }
|
124 + | #[allow(missing_docs)] // documentation missing in model
|
125 + | pub fn stream(
|
126 + | mut self,
|
127 + | input: ::aws_smithy_http::event_stream::EventStreamSender<crate::types::EventStream, crate::types::error::EventStreamError>,
|
128 + | ) -> Self {
|
129 + | self.inner = self.inner.stream(input);
|
130 + | self
|
131 + | }
|
132 + | #[allow(missing_docs)] // documentation missing in model
|
133 + | pub fn set_stream(
|
134 + | mut self,
|
135 + | input: ::std::option::Option<
|
136 + | ::aws_smithy_http::event_stream::EventStreamSender<crate::types::EventStream, crate::types::error::EventStreamError>,
|
137 + | >,
|
138 + | ) -> Self {
|
139 + | self.inner = self.inner.set_stream(input);
|
140 + | self
|
141 + | }
|
142 + | #[allow(missing_docs)] // documentation missing in model
|
143 + | pub fn get_stream(
|
144 + | &self,
|
145 + | ) -> &::std::option::Option<::aws_smithy_http::event_stream::EventStreamSender<crate::types::EventStream, crate::types::error::EventStreamError>>
|
146 + | {
|
147 + | self.inner.get_stream()
|
148 + | }
|
149 + | }
|