aws_sdk_schemas/operation/export_schema/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::export_schema::_export_schema_output::ExportSchemaOutputBuilder;
3
4pub use crate::operation::export_schema::_export_schema_input::ExportSchemaInputBuilder;
5
6impl crate::operation::export_schema::builders::ExportSchemaInputBuilder {
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::export_schema::ExportSchemaOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::export_schema::ExportSchemaError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.export_schema();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ExportSchema`.
24///
25#[derive(::std::clone::Clone, ::std::fmt::Debug)]
26pub struct ExportSchemaFluentBuilder {
27    handle: ::std::sync::Arc<crate::client::Handle>,
28    inner: crate::operation::export_schema::builders::ExportSchemaInputBuilder,
29    config_override: ::std::option::Option<crate::config::Builder>,
30}
31impl
32    crate::client::customize::internal::CustomizableSend<
33        crate::operation::export_schema::ExportSchemaOutput,
34        crate::operation::export_schema::ExportSchemaError,
35    > for ExportSchemaFluentBuilder
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::export_schema::ExportSchemaOutput,
43            crate::operation::export_schema::ExportSchemaError,
44        >,
45    > {
46        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
47    }
48}
49impl ExportSchemaFluentBuilder {
50    /// Creates a new `ExportSchemaFluentBuilder`.
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 ExportSchema as a reference.
59    pub fn as_input(&self) -> &crate::operation::export_schema::builders::ExportSchemaInputBuilder {
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::export_schema::ExportSchemaOutput,
74        ::aws_smithy_runtime_api::client::result::SdkError<
75            crate::operation::export_schema::ExportSchemaError,
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::export_schema::ExportSchema::operation_runtime_plugins(
84            self.handle.runtime_plugins.clone(),
85            &self.handle.conf,
86            self.config_override,
87        );
88        crate::operation::export_schema::ExportSchema::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::export_schema::ExportSchemaOutput,
96        crate::operation::export_schema::ExportSchemaError,
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    /// <p>The name of the registry.</p>
111    pub fn registry_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
112        self.inner = self.inner.registry_name(input.into());
113        self
114    }
115    /// <p>The name of the registry.</p>
116    pub fn set_registry_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.inner = self.inner.set_registry_name(input);
118        self
119    }
120    /// <p>The name of the registry.</p>
121    pub fn get_registry_name(&self) -> &::std::option::Option<::std::string::String> {
122        self.inner.get_registry_name()
123    }
124    /// <p>The name of the schema.</p>
125    pub fn schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126        self.inner = self.inner.schema_name(input.into());
127        self
128    }
129    /// <p>The name of the schema.</p>
130    pub fn set_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131        self.inner = self.inner.set_schema_name(input);
132        self
133    }
134    /// <p>The name of the schema.</p>
135    pub fn get_schema_name(&self) -> &::std::option::Option<::std::string::String> {
136        self.inner.get_schema_name()
137    }
138    /// <p>Specifying this limits the results to only this schema version.</p>
139    pub fn schema_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140        self.inner = self.inner.schema_version(input.into());
141        self
142    }
143    /// <p>Specifying this limits the results to only this schema version.</p>
144    pub fn set_schema_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145        self.inner = self.inner.set_schema_version(input);
146        self
147    }
148    /// <p>Specifying this limits the results to only this schema version.</p>
149    pub fn get_schema_version(&self) -> &::std::option::Option<::std::string::String> {
150        self.inner.get_schema_version()
151    }
152    #[allow(missing_docs)] // documentation missing in model
153    pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        self.inner = self.inner.r#type(input.into());
155        self
156    }
157    #[allow(missing_docs)] // documentation missing in model
158    pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159        self.inner = self.inner.set_type(input);
160        self
161    }
162    #[allow(missing_docs)] // documentation missing in model
163    pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
164        self.inner.get_type()
165    }
166}