aws_sdk_ssm/operation/describe_patch_properties/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_patch_properties::_describe_patch_properties_output::DescribePatchPropertiesOutputBuilder;
3
4pub use crate::operation::describe_patch_properties::_describe_patch_properties_input::DescribePatchPropertiesInputBuilder;
5
6impl crate::operation::describe_patch_properties::builders::DescribePatchPropertiesInputBuilder {
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_patch_properties::DescribePatchPropertiesOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_patch_properties::DescribePatchPropertiesError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_patch_properties();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribePatchProperties`.
24///
25/// <p>Lists the properties of available patches organized by product, product family, classification, severity, and other properties of available patches. You can use the reported properties in the filters you specify in requests for operations such as <code>CreatePatchBaseline</code>, <code>UpdatePatchBaseline</code>, <code>DescribeAvailablePatches</code>, and <code>DescribePatchBaselines</code>.</p>
26/// <p>The following section lists the properties that can be used in filters for each major operating system type:</p>
27/// <dl>
28/// <dt>
29/// AMAZON_LINUX
30/// </dt>
31/// <dd>
32/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
33/// </dd>
34/// <dt>
35/// AMAZON_LINUX_2
36/// </dt>
37/// <dd>
38/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
39/// </dd>
40/// <dt>
41/// AMAZON_LINUX_2023
42/// </dt>
43/// <dd>
44/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
45/// </dd>
46/// <dt>
47/// CENTOS
48/// </dt>
49/// <dd>
50/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
51/// </dd>
52/// <dt>
53/// DEBIAN
54/// </dt>
55/// <dd>
56/// <p>Valid properties: <code>PRODUCT</code> | <code>PRIORITY</code></p>
57/// </dd>
58/// <dt>
59/// MACOS
60/// </dt>
61/// <dd>
62/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code></p>
63/// </dd>
64/// <dt>
65/// ORACLE_LINUX
66/// </dt>
67/// <dd>
68/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
69/// </dd>
70/// <dt>
71/// REDHAT_ENTERPRISE_LINUX
72/// </dt>
73/// <dd>
74/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
75/// </dd>
76/// <dt>
77/// SUSE
78/// </dt>
79/// <dd>
80/// <p>Valid properties: <code>PRODUCT</code> | <code>CLASSIFICATION</code> | <code>SEVERITY</code></p>
81/// </dd>
82/// <dt>
83/// UBUNTU
84/// </dt>
85/// <dd>
86/// <p>Valid properties: <code>PRODUCT</code> | <code>PRIORITY</code></p>
87/// </dd>
88/// <dt>
89/// WINDOWS
90/// </dt>
91/// <dd>
92/// <p>Valid properties: <code>PRODUCT</code> | <code>PRODUCT_FAMILY</code> | <code>CLASSIFICATION</code> | <code>MSRC_SEVERITY</code></p>
93/// </dd>
94/// </dl>
95#[derive(::std::clone::Clone, ::std::fmt::Debug)]
96pub struct DescribePatchPropertiesFluentBuilder {
97    handle: ::std::sync::Arc<crate::client::Handle>,
98    inner: crate::operation::describe_patch_properties::builders::DescribePatchPropertiesInputBuilder,
99    config_override: ::std::option::Option<crate::config::Builder>,
100}
101impl
102    crate::client::customize::internal::CustomizableSend<
103        crate::operation::describe_patch_properties::DescribePatchPropertiesOutput,
104        crate::operation::describe_patch_properties::DescribePatchPropertiesError,
105    > for DescribePatchPropertiesFluentBuilder
106{
107    fn send(
108        self,
109        config_override: crate::config::Builder,
110    ) -> crate::client::customize::internal::BoxFuture<
111        crate::client::customize::internal::SendResult<
112            crate::operation::describe_patch_properties::DescribePatchPropertiesOutput,
113            crate::operation::describe_patch_properties::DescribePatchPropertiesError,
114        >,
115    > {
116        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
117    }
118}
119impl DescribePatchPropertiesFluentBuilder {
120    /// Creates a new `DescribePatchPropertiesFluentBuilder`.
121    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
122        Self {
123            handle,
124            inner: ::std::default::Default::default(),
125            config_override: ::std::option::Option::None,
126        }
127    }
128    /// Access the DescribePatchProperties as a reference.
129    pub fn as_input(&self) -> &crate::operation::describe_patch_properties::builders::DescribePatchPropertiesInputBuilder {
130        &self.inner
131    }
132    /// Sends the request and returns the response.
133    ///
134    /// If an error occurs, an `SdkError` will be returned with additional details that
135    /// can be matched against.
136    ///
137    /// By default, any retryable failures will be retried twice. Retry behavior
138    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
139    /// set when configuring the client.
140    pub async fn send(
141        self,
142    ) -> ::std::result::Result<
143        crate::operation::describe_patch_properties::DescribePatchPropertiesOutput,
144        ::aws_smithy_runtime_api::client::result::SdkError<
145            crate::operation::describe_patch_properties::DescribePatchPropertiesError,
146            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
147        >,
148    > {
149        let input = self
150            .inner
151            .build()
152            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
153        let runtime_plugins = crate::operation::describe_patch_properties::DescribePatchProperties::operation_runtime_plugins(
154            self.handle.runtime_plugins.clone(),
155            &self.handle.conf,
156            self.config_override,
157        );
158        crate::operation::describe_patch_properties::DescribePatchProperties::orchestrate(&runtime_plugins, input).await
159    }
160
161    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
162    pub fn customize(
163        self,
164    ) -> crate::client::customize::CustomizableOperation<
165        crate::operation::describe_patch_properties::DescribePatchPropertiesOutput,
166        crate::operation::describe_patch_properties::DescribePatchPropertiesError,
167        Self,
168    > {
169        crate::client::customize::CustomizableOperation::new(self)
170    }
171    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
172        self.set_config_override(::std::option::Option::Some(config_override.into()));
173        self
174    }
175
176    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
177        self.config_override = config_override;
178        self
179    }
180    /// Create a paginator for this request
181    ///
182    /// Paginators are used by calling [`send().await`](crate::operation::describe_patch_properties::paginator::DescribePatchPropertiesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
183    pub fn into_paginator(self) -> crate::operation::describe_patch_properties::paginator::DescribePatchPropertiesPaginator {
184        crate::operation::describe_patch_properties::paginator::DescribePatchPropertiesPaginator::new(self.handle, self.inner)
185    }
186    /// <p>The operating system type for which to list patches.</p>
187    pub fn operating_system(mut self, input: crate::types::OperatingSystem) -> Self {
188        self.inner = self.inner.operating_system(input);
189        self
190    }
191    /// <p>The operating system type for which to list patches.</p>
192    pub fn set_operating_system(mut self, input: ::std::option::Option<crate::types::OperatingSystem>) -> Self {
193        self.inner = self.inner.set_operating_system(input);
194        self
195    }
196    /// <p>The operating system type for which to list patches.</p>
197    pub fn get_operating_system(&self) -> &::std::option::Option<crate::types::OperatingSystem> {
198        self.inner.get_operating_system()
199    }
200    /// <p>The patch property for which you want to view patch details.</p>
201    pub fn property(mut self, input: crate::types::PatchProperty) -> Self {
202        self.inner = self.inner.property(input);
203        self
204    }
205    /// <p>The patch property for which you want to view patch details.</p>
206    pub fn set_property(mut self, input: ::std::option::Option<crate::types::PatchProperty>) -> Self {
207        self.inner = self.inner.set_property(input);
208        self
209    }
210    /// <p>The patch property for which you want to view patch details.</p>
211    pub fn get_property(&self) -> &::std::option::Option<crate::types::PatchProperty> {
212        self.inner.get_property()
213    }
214    /// <p>Indicates whether to list patches for the Windows operating system or for applications released by Microsoft. Not applicable for the Linux or macOS operating systems.</p>
215    pub fn patch_set(mut self, input: crate::types::PatchSet) -> Self {
216        self.inner = self.inner.patch_set(input);
217        self
218    }
219    /// <p>Indicates whether to list patches for the Windows operating system or for applications released by Microsoft. Not applicable for the Linux or macOS operating systems.</p>
220    pub fn set_patch_set(mut self, input: ::std::option::Option<crate::types::PatchSet>) -> Self {
221        self.inner = self.inner.set_patch_set(input);
222        self
223    }
224    /// <p>Indicates whether to list patches for the Windows operating system or for applications released by Microsoft. Not applicable for the Linux or macOS operating systems.</p>
225    pub fn get_patch_set(&self) -> &::std::option::Option<crate::types::PatchSet> {
226        self.inner.get_patch_set()
227    }
228    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
229    pub fn max_results(mut self, input: i32) -> Self {
230        self.inner = self.inner.max_results(input);
231        self
232    }
233    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
234    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
235        self.inner = self.inner.set_max_results(input);
236        self
237    }
238    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
239    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
240        self.inner.get_max_results()
241    }
242    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
243    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
244        self.inner = self.inner.next_token(input.into());
245        self
246    }
247    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
248    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
249        self.inner = self.inner.set_next_token(input);
250        self
251    }
252    /// <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
253    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
254        self.inner.get_next_token()
255    }
256}