Skip to main content

aws_sdk_codepipeline/operation/get_action_type/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_action_type::_get_action_type_input::GetActionTypeInputBuilder;
3
4pub use crate::operation::get_action_type::_get_action_type_output::GetActionTypeOutputBuilder;
5
6impl crate::operation::get_action_type::builders::GetActionTypeInputBuilder {
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_action_type::GetActionTypeOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_action_type::GetActionTypeError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_action_type();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetActionType`.
24///
25/// <p>Returns information about an action type created for an external provider, where the action is to be used by customers of the external provider. The action can be created with any supported integration model.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct GetActionTypeFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::get_action_type::builders::GetActionTypeInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::get_action_type::GetActionTypeOutput,
35        crate::operation::get_action_type::GetActionTypeError,
36    > for GetActionTypeFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::get_action_type::GetActionTypeOutput,
44            crate::operation::get_action_type::GetActionTypeError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl GetActionTypeFluentBuilder {
51    /// Creates a new `GetActionTypeFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the GetActionType as a reference.
60    pub fn as_input(&self) -> &crate::operation::get_action_type::builders::GetActionTypeInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::get_action_type::GetActionTypeOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::get_action_type::GetActionTypeError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::get_action_type::GetActionType::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::get_action_type::GetActionType::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::get_action_type::GetActionTypeOutput,
97        crate::operation::get_action_type::GetActionTypeError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// <p>Defines what kind of action can be taken in the stage. The following are the valid values:</p>
112    /// <ul>
113    /// <li>
114    /// <p><code>Source</code></p></li>
115    /// <li>
116    /// <p><code>Build</code></p></li>
117    /// <li>
118    /// <p><code>Test</code></p></li>
119    /// <li>
120    /// <p><code>Deploy</code></p></li>
121    /// <li>
122    /// <p><code>Approval</code></p></li>
123    /// <li>
124    /// <p><code>Invoke</code></p></li>
125    /// <li>
126    /// <p><code>Compute</code></p></li>
127    /// </ul>
128    pub fn category(mut self, input: crate::types::ActionCategory) -> Self {
129        self.inner = self.inner.category(input);
130        self
131    }
132    /// <p>Defines what kind of action can be taken in the stage. The following are the valid values:</p>
133    /// <ul>
134    /// <li>
135    /// <p><code>Source</code></p></li>
136    /// <li>
137    /// <p><code>Build</code></p></li>
138    /// <li>
139    /// <p><code>Test</code></p></li>
140    /// <li>
141    /// <p><code>Deploy</code></p></li>
142    /// <li>
143    /// <p><code>Approval</code></p></li>
144    /// <li>
145    /// <p><code>Invoke</code></p></li>
146    /// <li>
147    /// <p><code>Compute</code></p></li>
148    /// </ul>
149    pub fn set_category(mut self, input: ::std::option::Option<crate::types::ActionCategory>) -> Self {
150        self.inner = self.inner.set_category(input);
151        self
152    }
153    /// <p>Defines what kind of action can be taken in the stage. The following are the valid values:</p>
154    /// <ul>
155    /// <li>
156    /// <p><code>Source</code></p></li>
157    /// <li>
158    /// <p><code>Build</code></p></li>
159    /// <li>
160    /// <p><code>Test</code></p></li>
161    /// <li>
162    /// <p><code>Deploy</code></p></li>
163    /// <li>
164    /// <p><code>Approval</code></p></li>
165    /// <li>
166    /// <p><code>Invoke</code></p></li>
167    /// <li>
168    /// <p><code>Compute</code></p></li>
169    /// </ul>
170    pub fn get_category(&self) -> &::std::option::Option<crate::types::ActionCategory> {
171        self.inner.get_category()
172    }
173    /// <p>The creator of an action type that was created with any supported integration model. There are two valid values: <code>AWS</code> and <code>ThirdParty</code>.</p>
174    pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175        self.inner = self.inner.owner(input.into());
176        self
177    }
178    /// <p>The creator of an action type that was created with any supported integration model. There are two valid values: <code>AWS</code> and <code>ThirdParty</code>.</p>
179    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180        self.inner = self.inner.set_owner(input);
181        self
182    }
183    /// <p>The creator of an action type that was created with any supported integration model. There are two valid values: <code>AWS</code> and <code>ThirdParty</code>.</p>
184    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
185        self.inner.get_owner()
186    }
187    /// <p>The provider of the action type being called. The provider name is specified when the action type is created.</p>
188    pub fn provider(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189        self.inner = self.inner.provider(input.into());
190        self
191    }
192    /// <p>The provider of the action type being called. The provider name is specified when the action type is created.</p>
193    pub fn set_provider(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194        self.inner = self.inner.set_provider(input);
195        self
196    }
197    /// <p>The provider of the action type being called. The provider name is specified when the action type is created.</p>
198    pub fn get_provider(&self) -> &::std::option::Option<::std::string::String> {
199        self.inner.get_provider()
200    }
201    /// <p>A string that describes the action type version.</p>
202    pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203        self.inner = self.inner.version(input.into());
204        self
205    }
206    /// <p>A string that describes the action type version.</p>
207    pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208        self.inner = self.inner.set_version(input);
209        self
210    }
211    /// <p>A string that describes the action type version.</p>
212    pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
213        self.inner.get_version()
214    }
215}