aws_sdk_codeartifact/operation/list_package_version_assets/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_package_version_assets::_list_package_version_assets_output::ListPackageVersionAssetsOutputBuilder;
3
4pub use crate::operation::list_package_version_assets::_list_package_version_assets_input::ListPackageVersionAssetsInputBuilder;
5
6impl crate::operation::list_package_version_assets::builders::ListPackageVersionAssetsInputBuilder {
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::list_package_version_assets::ListPackageVersionAssetsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::list_package_version_assets::ListPackageVersionAssetsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.list_package_version_assets();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `ListPackageVersionAssets`.
24///
25/// <p>Returns a list of <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_AssetSummary.html">AssetSummary</a> objects for assets in a package version.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ListPackageVersionAssetsFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::list_package_version_assets::builders::ListPackageVersionAssetsInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::list_package_version_assets::ListPackageVersionAssetsOutput,
35        crate::operation::list_package_version_assets::ListPackageVersionAssetsError,
36    > for ListPackageVersionAssetsFluentBuilder
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::list_package_version_assets::ListPackageVersionAssetsOutput,
44            crate::operation::list_package_version_assets::ListPackageVersionAssetsError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl ListPackageVersionAssetsFluentBuilder {
51    /// Creates a new `ListPackageVersionAssetsFluentBuilder`.
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 ListPackageVersionAssets as a reference.
60    pub fn as_input(&self) -> &crate::operation::list_package_version_assets::builders::ListPackageVersionAssetsInputBuilder {
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::list_package_version_assets::ListPackageVersionAssetsOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::list_package_version_assets::ListPackageVersionAssetsError,
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::list_package_version_assets::ListPackageVersionAssets::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::list_package_version_assets::ListPackageVersionAssets::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::list_package_version_assets::ListPackageVersionAssetsOutput,
97        crate::operation::list_package_version_assets::ListPackageVersionAssetsError,
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    /// Create a paginator for this request
112    ///
113    /// Paginators are used by calling [`send().await`](crate::operation::list_package_version_assets::paginator::ListPackageVersionAssetsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114    pub fn into_paginator(self) -> crate::operation::list_package_version_assets::paginator::ListPackageVersionAssetsPaginator {
115        crate::operation::list_package_version_assets::paginator::ListPackageVersionAssetsPaginator::new(self.handle, self.inner)
116    }
117    /// <p>The name of the domain that contains the repository associated with the package version assets.</p>
118    pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119        self.inner = self.inner.domain(input.into());
120        self
121    }
122    /// <p>The name of the domain that contains the repository associated with the package version assets.</p>
123    pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.inner = self.inner.set_domain(input);
125        self
126    }
127    /// <p>The name of the domain that contains the repository associated with the package version assets.</p>
128    pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
129        self.inner.get_domain()
130    }
131    /// <p>The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.</p>
132    pub fn domain_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133        self.inner = self.inner.domain_owner(input.into());
134        self
135    }
136    /// <p>The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.</p>
137    pub fn set_domain_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138        self.inner = self.inner.set_domain_owner(input);
139        self
140    }
141    /// <p>The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.</p>
142    pub fn get_domain_owner(&self) -> &::std::option::Option<::std::string::String> {
143        self.inner.get_domain_owner()
144    }
145    /// <p>The name of the repository that contains the package that contains the requested package version assets.</p>
146    pub fn repository(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
147        self.inner = self.inner.repository(input.into());
148        self
149    }
150    /// <p>The name of the repository that contains the package that contains the requested package version assets.</p>
151    pub fn set_repository(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
152        self.inner = self.inner.set_repository(input);
153        self
154    }
155    /// <p>The name of the repository that contains the package that contains the requested package version assets.</p>
156    pub fn get_repository(&self) -> &::std::option::Option<::std::string::String> {
157        self.inner.get_repository()
158    }
159    /// <p>The format of the package that contains the requested package version assets.</p>
160    pub fn format(mut self, input: crate::types::PackageFormat) -> Self {
161        self.inner = self.inner.format(input);
162        self
163    }
164    /// <p>The format of the package that contains the requested package version assets.</p>
165    pub fn set_format(mut self, input: ::std::option::Option<crate::types::PackageFormat>) -> Self {
166        self.inner = self.inner.set_format(input);
167        self
168    }
169    /// <p>The format of the package that contains the requested package version assets.</p>
170    pub fn get_format(&self) -> &::std::option::Option<crate::types::PackageFormat> {
171        self.inner.get_format()
172    }
173    /// <p>The namespace of the package version that contains the requested package version assets. The package component that specifies its namespace depends on its type. For example:</p><note>
174    /// <p>The namespace is required requesting assets from package versions of the following formats:</p>
175    /// <ul>
176    /// <li>
177    /// <p>Maven</p></li>
178    /// <li>
179    /// <p>Swift</p></li>
180    /// <li>
181    /// <p>generic</p></li>
182    /// </ul>
183    /// </note>
184    /// <ul>
185    /// <li>
186    /// <p>The namespace of a Maven package version is its <code>groupId</code>.</p></li>
187    /// <li>
188    /// <p>The namespace of an npm or Swift package version is its <code>scope</code>.</p></li>
189    /// <li>
190    /// <p>The namespace of a generic package is its <code>namespace</code>.</p></li>
191    /// <li>
192    /// <p>Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.</p></li>
193    /// </ul>
194    pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.inner = self.inner.namespace(input.into());
196        self
197    }
198    /// <p>The namespace of the package version that contains the requested package version assets. The package component that specifies its namespace depends on its type. For example:</p><note>
199    /// <p>The namespace is required requesting assets from package versions of the following formats:</p>
200    /// <ul>
201    /// <li>
202    /// <p>Maven</p></li>
203    /// <li>
204    /// <p>Swift</p></li>
205    /// <li>
206    /// <p>generic</p></li>
207    /// </ul>
208    /// </note>
209    /// <ul>
210    /// <li>
211    /// <p>The namespace of a Maven package version is its <code>groupId</code>.</p></li>
212    /// <li>
213    /// <p>The namespace of an npm or Swift package version is its <code>scope</code>.</p></li>
214    /// <li>
215    /// <p>The namespace of a generic package is its <code>namespace</code>.</p></li>
216    /// <li>
217    /// <p>Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.</p></li>
218    /// </ul>
219    pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220        self.inner = self.inner.set_namespace(input);
221        self
222    }
223    /// <p>The namespace of the package version that contains the requested package version assets. The package component that specifies its namespace depends on its type. For example:</p><note>
224    /// <p>The namespace is required requesting assets from package versions of the following formats:</p>
225    /// <ul>
226    /// <li>
227    /// <p>Maven</p></li>
228    /// <li>
229    /// <p>Swift</p></li>
230    /// <li>
231    /// <p>generic</p></li>
232    /// </ul>
233    /// </note>
234    /// <ul>
235    /// <li>
236    /// <p>The namespace of a Maven package version is its <code>groupId</code>.</p></li>
237    /// <li>
238    /// <p>The namespace of an npm or Swift package version is its <code>scope</code>.</p></li>
239    /// <li>
240    /// <p>The namespace of a generic package is its <code>namespace</code>.</p></li>
241    /// <li>
242    /// <p>Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of those formats do not have a namespace.</p></li>
243    /// </ul>
244    pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
245        self.inner.get_namespace()
246    }
247    /// <p>The name of the package that contains the requested package version assets.</p>
248    pub fn package(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
249        self.inner = self.inner.package(input.into());
250        self
251    }
252    /// <p>The name of the package that contains the requested package version assets.</p>
253    pub fn set_package(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
254        self.inner = self.inner.set_package(input);
255        self
256    }
257    /// <p>The name of the package that contains the requested package version assets.</p>
258    pub fn get_package(&self) -> &::std::option::Option<::std::string::String> {
259        self.inner.get_package()
260    }
261    /// <p>A string that contains the package version (for example, <code>3.5.2</code>).</p>
262    pub fn package_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
263        self.inner = self.inner.package_version(input.into());
264        self
265    }
266    /// <p>A string that contains the package version (for example, <code>3.5.2</code>).</p>
267    pub fn set_package_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268        self.inner = self.inner.set_package_version(input);
269        self
270    }
271    /// <p>A string that contains the package version (for example, <code>3.5.2</code>).</p>
272    pub fn get_package_version(&self) -> &::std::option::Option<::std::string::String> {
273        self.inner.get_package_version()
274    }
275    /// <p>The maximum number of results to return per page.</p>
276    pub fn max_results(mut self, input: i32) -> Self {
277        self.inner = self.inner.max_results(input);
278        self
279    }
280    /// <p>The maximum number of results to return per page.</p>
281    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
282        self.inner = self.inner.set_max_results(input);
283        self
284    }
285    /// <p>The maximum number of results to return per page.</p>
286    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
287        self.inner.get_max_results()
288    }
289    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
290    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
291        self.inner = self.inner.next_token(input.into());
292        self
293    }
294    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
295    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
296        self.inner = self.inner.set_next_token(input);
297        self
298    }
299    /// <p>The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.</p>
300    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
301        self.inner.get_next_token()
302    }
303}