AWS SDK

AWS SDK

rev. aa190e630077955f0bc8f58dee6a16530c1e0578

Files changed:

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/update_patch_baseline/builders.rs

@@ -0,1 +0,394 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
pub use crate::operation::update_patch_baseline::_update_patch_baseline_input::UpdatePatchBaselineInputBuilder;
           3  +
           4  +
pub use crate::operation::update_patch_baseline::_update_patch_baseline_output::UpdatePatchBaselineOutputBuilder;
           5  +
           6  +
impl crate::operation::update_patch_baseline::builders::UpdatePatchBaselineInputBuilder {
           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::update_patch_baseline::UpdatePatchBaselineOutput,
          13  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          14  +
            crate::operation::update_patch_baseline::UpdatePatchBaselineError,
          15  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          16  +
        >,
          17  +
    > {
          18  +
        let mut fluent_builder = client.update_patch_baseline();
          19  +
        fluent_builder.inner = self;
          20  +
        fluent_builder.send().await
          21  +
    }
          22  +
}
          23  +
/// Fluent builder constructing a request to `UpdatePatchBaseline`.
          24  +
///
          25  +
/// <p>Modifies an existing patch baseline. Fields not specified in the request are left unchanged.</p><note>
          26  +
/// <p>For information about valid key-value pairs in <code>PatchFilters</code> for each supported operating system type, see <code>PatchFilter</code>.</p>
          27  +
/// </note>
          28  +
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
          29  +
pub struct UpdatePatchBaselineFluentBuilder {
          30  +
    handle: ::std::sync::Arc<crate::client::Handle>,
          31  +
    inner: crate::operation::update_patch_baseline::builders::UpdatePatchBaselineInputBuilder,
          32  +
    config_override: ::std::option::Option<crate::config::Builder>,
          33  +
}
          34  +
impl
          35  +
    crate::client::customize::internal::CustomizableSend<
          36  +
        crate::operation::update_patch_baseline::UpdatePatchBaselineOutput,
          37  +
        crate::operation::update_patch_baseline::UpdatePatchBaselineError,
          38  +
    > for UpdatePatchBaselineFluentBuilder
          39  +
{
          40  +
    fn send(
          41  +
        self,
          42  +
        config_override: crate::config::Builder,
          43  +
    ) -> crate::client::customize::internal::BoxFuture<
          44  +
        crate::client::customize::internal::SendResult<
          45  +
            crate::operation::update_patch_baseline::UpdatePatchBaselineOutput,
          46  +
            crate::operation::update_patch_baseline::UpdatePatchBaselineError,
          47  +
        >,
          48  +
    > {
          49  +
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
          50  +
    }
          51  +
}
          52  +
impl UpdatePatchBaselineFluentBuilder {
          53  +
    /// Creates a new `UpdatePatchBaselineFluentBuilder`.
          54  +
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
          55  +
        Self {
          56  +
            handle,
          57  +
            inner: ::std::default::Default::default(),
          58  +
            config_override: ::std::option::Option::None,
          59  +
        }
          60  +
    }
          61  +
    /// Access the UpdatePatchBaseline as a reference.
          62  +
    pub fn as_input(&self) -> &crate::operation::update_patch_baseline::builders::UpdatePatchBaselineInputBuilder {
          63  +
        &self.inner
          64  +
    }
          65  +
    /// Sends the request and returns the response.
          66  +
    ///
          67  +
    /// If an error occurs, an `SdkError` will be returned with additional details that
          68  +
    /// can be matched against.
          69  +
    ///
          70  +
    /// By default, any retryable failures will be retried twice. Retry behavior
          71  +
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
          72  +
    /// set when configuring the client.
          73  +
    pub async fn send(
          74  +
        self,
          75  +
    ) -> ::std::result::Result<
          76  +
        crate::operation::update_patch_baseline::UpdatePatchBaselineOutput,
          77  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          78  +
            crate::operation::update_patch_baseline::UpdatePatchBaselineError,
          79  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          80  +
        >,
          81  +
    > {
          82  +
        let input = self
          83  +
            .inner
          84  +
            .build()
          85  +
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
          86  +
        let runtime_plugins = crate::operation::update_patch_baseline::UpdatePatchBaseline::operation_runtime_plugins(
          87  +
            self.handle.runtime_plugins.clone(),
          88  +
            &self.handle.conf,
          89  +
            self.config_override,
          90  +
        );
          91  +
        crate::operation::update_patch_baseline::UpdatePatchBaseline::orchestrate(&runtime_plugins, input).await
          92  +
    }
          93  +
          94  +
    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
          95  +
    pub fn customize(
          96  +
        self,
          97  +
    ) -> crate::client::customize::CustomizableOperation<
          98  +
        crate::operation::update_patch_baseline::UpdatePatchBaselineOutput,
          99  +
        crate::operation::update_patch_baseline::UpdatePatchBaselineError,
         100  +
        Self,
         101  +
    > {
         102  +
        crate::client::customize::CustomizableOperation::new(self)
         103  +
    }
         104  +
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
         105  +
        self.set_config_override(::std::option::Option::Some(config_override.into()));
         106  +
        self
         107  +
    }
         108  +
         109  +
    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
         110  +
        self.config_override = config_override;
         111  +
        self
         112  +
    }
         113  +
    /// <p>The ID of the patch baseline to update.</p>
         114  +
    pub fn baseline_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         115  +
        self.inner = self.inner.baseline_id(input.into());
         116  +
        self
         117  +
    }
         118  +
    /// <p>The ID of the patch baseline to update.</p>
         119  +
    pub fn set_baseline_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         120  +
        self.inner = self.inner.set_baseline_id(input);
         121  +
        self
         122  +
    }
         123  +
    /// <p>The ID of the patch baseline to update.</p>
         124  +
    pub fn get_baseline_id(&self) -> &::std::option::Option<::std::string::String> {
         125  +
        self.inner.get_baseline_id()
         126  +
    }
         127  +
    /// <p>The name of the patch baseline.</p>
         128  +
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         129  +
        self.inner = self.inner.name(input.into());
         130  +
        self
         131  +
    }
         132  +
    /// <p>The name of the patch baseline.</p>
         133  +
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         134  +
        self.inner = self.inner.set_name(input);
         135  +
        self
         136  +
    }
         137  +
    /// <p>The name of the patch baseline.</p>
         138  +
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
         139  +
        self.inner.get_name()
         140  +
    }
         141  +
    /// <p>A set of global filters used to include patches in the baseline.</p><important>
         142  +
    /// <p>The <code>GlobalFilters</code> parameter can be configured only by using the CLI or an Amazon Web Services SDK. It can't be configured from the Patch Manager console, and its value isn't displayed in the console.</p>
         143  +
    /// </important>
         144  +
    pub fn global_filters(mut self, input: crate::types::PatchFilterGroup) -> Self {
         145  +
        self.inner = self.inner.global_filters(input);
         146  +
        self
         147  +
    }
         148  +
    /// <p>A set of global filters used to include patches in the baseline.</p><important>
         149  +
    /// <p>The <code>GlobalFilters</code> parameter can be configured only by using the CLI or an Amazon Web Services SDK. It can't be configured from the Patch Manager console, and its value isn't displayed in the console.</p>
         150  +
    /// </important>
         151  +
    pub fn set_global_filters(mut self, input: ::std::option::Option<crate::types::PatchFilterGroup>) -> Self {
         152  +
        self.inner = self.inner.set_global_filters(input);
         153  +
        self
         154  +
    }
         155  +
    /// <p>A set of global filters used to include patches in the baseline.</p><important>
         156  +
    /// <p>The <code>GlobalFilters</code> parameter can be configured only by using the CLI or an Amazon Web Services SDK. It can't be configured from the Patch Manager console, and its value isn't displayed in the console.</p>
         157  +
    /// </important>
         158  +
    pub fn get_global_filters(&self) -> &::std::option::Option<crate::types::PatchFilterGroup> {
         159  +
        self.inner.get_global_filters()
         160  +
    }
         161  +
    /// <p>A set of rules used to include patches in the baseline.</p>
         162  +
    pub fn approval_rules(mut self, input: crate::types::PatchRuleGroup) -> Self {
         163  +
        self.inner = self.inner.approval_rules(input);
         164  +
        self
         165  +
    }
         166  +
    /// <p>A set of rules used to include patches in the baseline.</p>
         167  +
    pub fn set_approval_rules(mut self, input: ::std::option::Option<crate::types::PatchRuleGroup>) -> Self {
         168  +
        self.inner = self.inner.set_approval_rules(input);
         169  +
        self
         170  +
    }
         171  +
    /// <p>A set of rules used to include patches in the baseline.</p>
         172  +
    pub fn get_approval_rules(&self) -> &::std::option::Option<crate::types::PatchRuleGroup> {
         173  +
        self.inner.get_approval_rules()
         174  +
    }
         175  +
    ///
         176  +
    /// Appends an item to `ApprovedPatches`.
         177  +
    ///
         178  +
    /// To override the contents of this collection use [`set_approved_patches`](Self::set_approved_patches).
         179  +
    ///
         180  +
    /// <p>A list of explicitly approved patches for the baseline.</p>
         181  +
    /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         182  +
    pub fn approved_patches(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         183  +
        self.inner = self.inner.approved_patches(input.into());
         184  +
        self
         185  +
    }
         186  +
    /// <p>A list of explicitly approved patches for the baseline.</p>
         187  +
    /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         188  +
    pub fn set_approved_patches(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         189  +
        self.inner = self.inner.set_approved_patches(input);
         190  +
        self
         191  +
    }
         192  +
    /// <p>A list of explicitly approved patches for the baseline.</p>
         193  +
    /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         194  +
    pub fn get_approved_patches(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         195  +
        self.inner.get_approved_patches()
         196  +
    }
         197  +
    /// <p>Assigns a new compliance severity level to an existing patch baseline.</p>
         198  +
    pub fn approved_patches_compliance_level(mut self, input: crate::types::PatchComplianceLevel) -> Self {
         199  +
        self.inner = self.inner.approved_patches_compliance_level(input);
         200  +
        self
         201  +
    }
         202  +
    /// <p>Assigns a new compliance severity level to an existing patch baseline.</p>
         203  +
    pub fn set_approved_patches_compliance_level(mut self, input: ::std::option::Option<crate::types::PatchComplianceLevel>) -> Self {
         204  +
        self.inner = self.inner.set_approved_patches_compliance_level(input);
         205  +
        self
         206  +
    }
         207  +
    /// <p>Assigns a new compliance severity level to an existing patch baseline.</p>
         208  +
    pub fn get_approved_patches_compliance_level(&self) -> &::std::option::Option<crate::types::PatchComplianceLevel> {
         209  +
        self.inner.get_approved_patches_compliance_level()
         210  +
    }
         211  +
    /// <p>Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is <code>false</code>. Applies to Linux managed nodes only.</p>
         212  +
    pub fn approved_patches_enable_non_security(mut self, input: bool) -> Self {
         213  +
        self.inner = self.inner.approved_patches_enable_non_security(input);
         214  +
        self
         215  +
    }
         216  +
    /// <p>Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is <code>false</code>. Applies to Linux managed nodes only.</p>
         217  +
    pub fn set_approved_patches_enable_non_security(mut self, input: ::std::option::Option<bool>) -> Self {
         218  +
        self.inner = self.inner.set_approved_patches_enable_non_security(input);
         219  +
        self
         220  +
    }
         221  +
    /// <p>Indicates whether the list of approved patches includes non-security updates that should be applied to the managed nodes. The default value is <code>false</code>. Applies to Linux managed nodes only.</p>
         222  +
    pub fn get_approved_patches_enable_non_security(&self) -> &::std::option::Option<bool> {
         223  +
        self.inner.get_approved_patches_enable_non_security()
         224  +
    }
         225  +
    ///
         226  +
    /// Appends an item to `RejectedPatches`.
         227  +
    ///
         228  +
    /// To override the contents of this collection use [`set_rejected_patches`](Self::set_rejected_patches).
         229  +
    ///
         230  +
    /// <p>A list of explicitly rejected patches for the baseline.</p>
         231  +
    /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         232  +
    pub fn rejected_patches(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         233  +
        self.inner = self.inner.rejected_patches(input.into());
         234  +
        self
         235  +
    }
         236  +
    /// <p>A list of explicitly rejected patches for the baseline.</p>
         237  +
    /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         238  +
    pub fn set_rejected_patches(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
         239  +
        self.inner = self.inner.set_rejected_patches(input);
         240  +
        self
         241  +
    }
         242  +
    /// <p>A list of explicitly rejected patches for the baseline.</p>
         243  +
    /// <p>For information about accepted formats for lists of approved patches and rejected patches, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-approved-rejected-package-name-formats.html">Package name formats for approved and rejected patch lists</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
         244  +
    pub fn get_rejected_patches(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
         245  +
        self.inner.get_rejected_patches()
         246  +
    }
         247  +
    /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list.</p>
         248  +
    /// <dl>
         249  +
    /// <dt>
         250  +
    /// ALLOW_AS_DEPENDENCY
         251  +
    /// </dt>
         252  +
    /// <dd>
         253  +
    /// <p><b>Linux and macOS</b>: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as <code>INSTALLED_OTHER</code>. This is the default action if no option is specified.</p>
         254  +
    /// <p><b>Windows Server</b>: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as <code>INSTALLED_OTHER</code>. Any package not already installed on the node is skipped. This is the default action if no option is specified.</p>
         255  +
    /// </dd>
         256  +
    /// <dt>
         257  +
    /// BLOCK
         258  +
    /// </dt>
         259  +
    /// <dd>
         260  +
    /// <p><b>All OSs</b>: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances.</p>
         261  +
    /// <p>State value assignment for patch compliance:</p>
         262  +
    /// <ul>
         263  +
    /// <li>
         264  +
    /// <p>If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as <code>INSTALLED_REJECTED</code>.</p></li>
         265  +
    /// <li>
         266  +
    /// <p>If an update attempts to install a dependency package that is now rejected by the baseline, when previous versions of the package were not rejected, the package being updated is reported as <code>MISSING</code> for <code>SCAN</code> operations and as <code>FAILED</code> for <code>INSTALL</code> operations.</p></li>
         267  +
    /// </ul>
         268  +
    /// </dd>
         269  +
    /// </dl>
         270  +
    pub fn rejected_patches_action(mut self, input: crate::types::PatchAction) -> Self {
         271  +
        self.inner = self.inner.rejected_patches_action(input);
         272  +
        self
         273  +
    }
         274  +
    /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list.</p>
         275  +
    /// <dl>
         276  +
    /// <dt>
         277  +
    /// ALLOW_AS_DEPENDENCY
         278  +
    /// </dt>
         279  +
    /// <dd>
         280  +
    /// <p><b>Linux and macOS</b>: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as <code>INSTALLED_OTHER</code>. This is the default action if no option is specified.</p>
         281  +
    /// <p><b>Windows Server</b>: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as <code>INSTALLED_OTHER</code>. Any package not already installed on the node is skipped. This is the default action if no option is specified.</p>
         282  +
    /// </dd>
         283  +
    /// <dt>
         284  +
    /// BLOCK
         285  +
    /// </dt>
         286  +
    /// <dd>
         287  +
    /// <p><b>All OSs</b>: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances.</p>
         288  +
    /// <p>State value assignment for patch compliance:</p>
         289  +
    /// <ul>
         290  +
    /// <li>
         291  +
    /// <p>If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as <code>INSTALLED_REJECTED</code>.</p></li>
         292  +
    /// <li>
         293  +
    /// <p>If an update attempts to install a dependency package that is now rejected by the baseline, when previous versions of the package were not rejected, the package being updated is reported as <code>MISSING</code> for <code>SCAN</code> operations and as <code>FAILED</code> for <code>INSTALL</code> operations.</p></li>
         294  +
    /// </ul>
         295  +
    /// </dd>
         296  +
    /// </dl>
         297  +
    pub fn set_rejected_patches_action(mut self, input: ::std::option::Option<crate::types::PatchAction>) -> Self {
         298  +
        self.inner = self.inner.set_rejected_patches_action(input);
         299  +
        self
         300  +
    }
         301  +
    /// <p>The action for Patch Manager to take on patches included in the <code>RejectedPackages</code> list.</p>
         302  +
    /// <dl>
         303  +
    /// <dt>
         304  +
    /// ALLOW_AS_DEPENDENCY
         305  +
    /// </dt>
         306  +
    /// <dd>
         307  +
    /// <p><b>Linux and macOS</b>: A package in the rejected patches list is installed only if it is a dependency of another package. It is considered compliant with the patch baseline, and its status is reported as <code>INSTALLED_OTHER</code>. This is the default action if no option is specified.</p>
         308  +
    /// <p><b>Windows Server</b>: Windows Server doesn't support the concept of package dependencies. If a package in the rejected patches list and already installed on the node, its status is reported as <code>INSTALLED_OTHER</code>. Any package not already installed on the node is skipped. This is the default action if no option is specified.</p>
         309  +
    /// </dd>
         310  +
    /// <dt>
         311  +
    /// BLOCK
         312  +
    /// </dt>
         313  +
    /// <dd>
         314  +
    /// <p><b>All OSs</b>: Packages in the rejected patches list, and packages that include them as dependencies, aren't installed by Patch Manager under any circumstances.</p>
         315  +
    /// <p>State value assignment for patch compliance:</p>
         316  +
    /// <ul>
         317  +
    /// <li>
         318  +
    /// <p>If a package was installed before it was added to the rejected patches list, or is installed outside of Patch Manager afterward, it's considered noncompliant with the patch baseline and its status is reported as <code>INSTALLED_REJECTED</code>.</p></li>
         319  +
    /// <li>
         320  +
    /// <p>If an update attempts to install a dependency package that is now rejected by the baseline, when previous versions of the package were not rejected, the package being updated is reported as <code>MISSING</code> for <code>SCAN</code> operations and as <code>FAILED</code> for <code>INSTALL</code> operations.</p></li>
         321  +
    /// </ul>
         322  +
    /// </dd>
         323  +
    /// </dl>
         324  +
    pub fn get_rejected_patches_action(&self) -> &::std::option::Option<crate::types::PatchAction> {
         325  +
        self.inner.get_rejected_patches_action()
         326  +
    }
         327  +
    /// <p>A description of the patch baseline.</p>
         328  +
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
         329  +
        self.inner = self.inner.description(input.into());
         330  +
        self
         331  +
    }
         332  +
    /// <p>A description of the patch baseline.</p>
         333  +
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
         334  +
        self.inner = self.inner.set_description(input);
         335  +
        self
         336  +
    }
         337  +
    /// <p>A description of the patch baseline.</p>
         338  +
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
         339  +
        self.inner.get_description()
         340  +
    }
         341  +
    ///
         342  +
    /// Appends an item to `Sources`.
         343  +
    ///
         344  +
    /// To override the contents of this collection use [`set_sources`](Self::set_sources).
         345  +
    ///
         346  +
    /// <p>Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.</p>
         347  +
    pub fn sources(mut self, input: crate::types::PatchSource) -> Self {
         348  +
        self.inner = self.inner.sources(input);
         349  +
        self
         350  +
    }
         351  +
    /// <p>Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.</p>
         352  +
    pub fn set_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PatchSource>>) -> Self {
         353  +
        self.inner = self.inner.set_sources(input);
         354  +
        self
         355  +
    }
         356  +
    /// <p>Information about the patches to use to update the managed nodes, including target operating systems and source repositories. Applies to Linux managed nodes only.</p>
         357  +
    pub fn get_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PatchSource>> {
         358  +
        self.inner.get_sources()
         359  +
    }
         360  +
    /// <p>Indicates the status to be assigned to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.</p>
         361  +
    /// <p>Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.</p>
         362  +
    /// <p>Supported for Windows Server managed nodes only.</p>
         363  +
    pub fn available_security_updates_compliance_status(mut self, input: crate::types::PatchComplianceStatus) -> Self {
         364  +
        self.inner = self.inner.available_security_updates_compliance_status(input);
         365  +
        self
         366  +
    }
         367  +
    /// <p>Indicates the status to be assigned to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.</p>
         368  +
    /// <p>Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.</p>
         369  +
    /// <p>Supported for Windows Server managed nodes only.</p>
         370  +
    pub fn set_available_security_updates_compliance_status(mut self, input: ::std::option::Option<crate::types::PatchComplianceStatus>) -> Self {
         371  +
        self.inner = self.inner.set_available_security_updates_compliance_status(input);
         372  +
        self
         373  +
    }
         374  +
    /// <p>Indicates the status to be assigned to security patches that are available but not approved because they don't meet the installation criteria specified in the patch baseline.</p>
         375  +
    /// <p>Example scenario: Security patches that you might want installed can be skipped if you have specified a long period to wait after a patch is released before installation. If an update to the patch is released during your specified waiting period, the waiting period for installing the patch starts over. If the waiting period is too long, multiple versions of the patch could be released but never installed.</p>
         376  +
    /// <p>Supported for Windows Server managed nodes only.</p>
         377  +
    pub fn get_available_security_updates_compliance_status(&self) -> &::std::option::Option<crate::types::PatchComplianceStatus> {
         378  +
        self.inner.get_available_security_updates_compliance_status()
         379  +
    }
         380  +
    /// <p>If True, then all fields that are required by the <code>CreatePatchBaseline</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
         381  +
    pub fn replace(mut self, input: bool) -> Self {
         382  +
        self.inner = self.inner.replace(input);
         383  +
        self
         384  +
    }
         385  +
    /// <p>If True, then all fields that are required by the <code>CreatePatchBaseline</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
         386  +
    pub fn set_replace(mut self, input: ::std::option::Option<bool>) -> Self {
         387  +
        self.inner = self.inner.set_replace(input);
         388  +
        self
         389  +
    }
         390  +
    /// <p>If True, then all fields that are required by the <code>CreatePatchBaseline</code> operation are also required for this API request. Optional fields that aren't specified are set to null.</p>
         391  +
    pub fn get_replace(&self) -> &::std::option::Option<bool> {
         392  +
        self.inner.get_replace()
         393  +
    }
         394  +
}

tmp-codegen-diff/aws-sdk/sdk/ssm/src/operation/update_resource_data_sync.rs

@@ -0,1 +0,655 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/// Orchestration and serialization glue logic for `UpdateResourceDataSync`.
           3  +
#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
           4  +
#[non_exhaustive]
           5  +
pub struct UpdateResourceDataSync;
           6  +
impl UpdateResourceDataSync {
           7  +
    /// Creates a new `UpdateResourceDataSync`
           8  +
    pub fn new() -> Self {
           9  +
        Self
          10  +
    }
          11  +
    /// The schema for this operation's input shape.
          12  +
    pub const INPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          13  +
        crate::operation::update_resource_data_sync::UpdateResourceDataSyncInput::SCHEMA;
          14  +
    /// The schema for this operation's output shape.
          15  +
    pub const OUTPUT_SCHEMA: &'static ::aws_smithy_schema::Schema<'static> =
          16  +
        crate::operation::update_resource_data_sync::UpdateResourceDataSyncOutput::SCHEMA;
          17  +
    pub(crate) async fn orchestrate(
          18  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          19  +
        input: crate::operation::update_resource_data_sync::UpdateResourceDataSyncInput,
          20  +
    ) -> ::std::result::Result<
          21  +
        crate::operation::update_resource_data_sync::UpdateResourceDataSyncOutput,
          22  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          23  +
            crate::operation::update_resource_data_sync::UpdateResourceDataSyncError,
          24  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          25  +
        >,
          26  +
    > {
          27  +
        let map_err = |err: ::aws_smithy_runtime_api::client::result::SdkError<
          28  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          29  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          30  +
        >| {
          31  +
            err.map_service_error(|err| {
          32  +
                err.downcast::<crate::operation::update_resource_data_sync::UpdateResourceDataSyncError>()
          33  +
                    .expect("correct error type")
          34  +
            })
          35  +
        };
          36  +
        let context = Self::orchestrate_with_stop_point(runtime_plugins, input, ::aws_smithy_runtime::client::orchestrator::StopPoint::None)
          37  +
            .await
          38  +
            .map_err(map_err)?;
          39  +
        let output = context.finalize().map_err(map_err)?;
          40  +
        ::std::result::Result::Ok(
          41  +
            output
          42  +
                .downcast::<crate::operation::update_resource_data_sync::UpdateResourceDataSyncOutput>()
          43  +
                .expect("correct output type"),
          44  +
        )
          45  +
    }
          46  +
          47  +
    pub(crate) async fn orchestrate_with_stop_point(
          48  +
        runtime_plugins: &::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          49  +
        input: crate::operation::update_resource_data_sync::UpdateResourceDataSyncInput,
          50  +
        stop_point: ::aws_smithy_runtime::client::orchestrator::StopPoint,
          51  +
    ) -> ::std::result::Result<
          52  +
        ::aws_smithy_runtime_api::client::interceptors::context::InterceptorContext,
          53  +
        ::aws_smithy_runtime_api::client::result::SdkError<
          54  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
          55  +
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
          56  +
        >,
          57  +
    > {
          58  +
        let input = ::aws_smithy_runtime_api::client::interceptors::context::Input::erase(input);
          59  +
        use ::tracing::Instrument;
          60  +
        ::aws_smithy_runtime::client::orchestrator::invoke_with_stop_point("SSM", "UpdateResourceDataSync", input, runtime_plugins, stop_point)
          61  +
            // Create a parent span for the entire operation. Includes a random, internal-only,
          62  +
            // seven-digit ID for the operation orchestration so that it can be correlated in the logs.
          63  +
            .instrument(::tracing::debug_span!(
          64  +
                "SSM.UpdateResourceDataSync",
          65  +
                "rpc.service" = "SSM",
          66  +
                "rpc.method" = "UpdateResourceDataSync",
          67  +
                "sdk_invocation_id" = ::fastrand::u32(1_000_000..10_000_000),
          68  +
                "rpc.system" = "aws-api",
          69  +
            ))
          70  +
            .await
          71  +
    }
          72  +
          73  +
    pub(crate) fn operation_runtime_plugins(
          74  +
        client_runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
          75  +
        client_config: &crate::config::Config,
          76  +
        config_override: ::std::option::Option<crate::config::Builder>,
          77  +
    ) -> ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins {
          78  +
        let mut runtime_plugins = client_runtime_plugins.with_operation_plugin(Self::new());
          79  +
          80  +
        if let ::std::option::Option::Some(config_override) = config_override {
          81  +
            for plugin in config_override.runtime_plugins.iter().cloned() {
          82  +
                runtime_plugins = runtime_plugins.with_operation_plugin(plugin);
          83  +
            }
          84  +
            runtime_plugins = runtime_plugins.with_operation_plugin(crate::config::ConfigOverrideRuntimePlugin::new(
          85  +
                config_override,
          86  +
                client_config.config.clone(),
          87  +
                &client_config.runtime_components,
          88  +
            ));
          89  +
        }
          90  +
        runtime_plugins
          91  +
    }
          92  +
}
          93  +
/// Per-operation error registry. Contains an entry for every modeled
          94  +
/// error this operation can throw.
          95  +
///
          96  +
/// Used by the schema-serde error path as the operation-scoped lookup
          97  +
/// for registry-backed error reification: an error code that does not
          98  +
/// match one of the operation's modeled errors directly is resolved
          99  +
/// against this registry first, then widened to the service-wide error
         100  +
/// registry.
         101  +
pub(crate) mod error_registry {
         102  +
    pub(crate) static REGISTRY: ::std::sync::LazyLock<::aws_smithy_schema::registry::TypeRegistry> = ::std::sync::LazyLock::new(|| {
         103  +
        ::aws_smithy_schema::registry::TypeRegistry::builder()
         104  +
                            .insert_error_shape(
         105  +
                        crate::types::error::InternalServerError::SCHEMA,
         106  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         107  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::InternalServerError::deserialize(d)?))
         108  +
                        },
         109  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         110  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::InternalServerError::deserialize(d)?))
         111  +
                        },
         112  +
                    )
         113  +
.insert_error_shape(
         114  +
                        crate::types::error::ResourceDataSyncConflictException::SCHEMA,
         115  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         116  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceDataSyncConflictException::deserialize(d)?))
         117  +
                        },
         118  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         119  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceDataSyncConflictException::deserialize(d)?))
         120  +
                        },
         121  +
                    )
         122  +
.insert_error_shape(
         123  +
                        crate::types::error::ResourceDataSyncInvalidConfigurationException::SCHEMA,
         124  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         125  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceDataSyncInvalidConfigurationException::deserialize(d)?))
         126  +
                        },
         127  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         128  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceDataSyncInvalidConfigurationException::deserialize(d)?))
         129  +
                        },
         130  +
                    )
         131  +
.insert_error_shape(
         132  +
                        crate::types::error::ResourceDataSyncNotFoundException::SCHEMA,
         133  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::aws_smithy_types::type_erasure::TypeErasedBox, ::aws_smithy_schema::serde::SerdeError> {
         134  +
                            ::std::result::Result::Ok(::aws_smithy_types::type_erasure::TypeErasedBox::new(crate::types::error::ResourceDataSyncNotFoundException::deserialize(d)?))
         135  +
                        },
         136  +
                        |d: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer| -> ::std::result::Result<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync>, ::aws_smithy_schema::serde::SerdeError> {
         137  +
                            ::std::result::Result::Ok(::std::boxed::Box::new(crate::types::error::ResourceDataSyncNotFoundException::deserialize(d)?))
         138  +
                        },
         139  +
                    )
         140  +
                            .build()
         141  +
    });
         142  +
}
         143  +
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for UpdateResourceDataSync {
         144  +
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
         145  +
        let mut cfg = ::aws_smithy_types::config_bag::Layer::new("UpdateResourceDataSync");
         146  +
         147  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedRequestSerializer::new(
         148  +
            UpdateResourceDataSyncRequestSerializer,
         149  +
        ));
         150  +
        cfg.store_put(::aws_smithy_runtime_api::client::ser_de::SharedResponseDeserializer::new(
         151  +
            UpdateResourceDataSyncResponseDeserializer,
         152  +
        ));
         153  +
         154  +
        cfg.store_put(::aws_smithy_runtime_api::client::auth::AuthSchemeOptionResolverParams::new(
         155  +
            crate::config::auth::Params::builder()
         156  +
                .operation_name("UpdateResourceDataSync")
         157  +
                .build()
         158  +
                .expect("required fields set"),
         159  +
        ));
         160  +
         161  +
        cfg.store_put(::aws_smithy_runtime_api::client::orchestrator::Metadata::new(
         162  +
            "UpdateResourceDataSync",
         163  +
            "SSM",
         164  +
        ));
         165  +
        let mut signing_options = ::aws_runtime::auth::SigningOptions::default();
         166  +
        signing_options.double_uri_encode = true;
         167  +
        signing_options.content_sha256_header = false;
         168  +
        signing_options.normalize_uri_path = true;
         169  +
        signing_options.payload_override = None;
         170  +
         171  +
        cfg.store_put(::aws_runtime::auth::SigV4OperationSigningConfig {
         172  +
            signing_options,
         173  +
            ..::std::default::Default::default()
         174  +
        });
         175  +
         176  +
        ::std::option::Option::Some(cfg.freeze())
         177  +
    }
         178  +
         179  +
    fn runtime_components(
         180  +
        &self,
         181  +
        _: &::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder,
         182  +
    ) -> ::std::borrow::Cow<'_, ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder> {
         183  +
        #[allow(unused_mut)]
         184  +
        let mut rcb = ::aws_smithy_runtime_api::client::runtime_components::RuntimeComponentsBuilder::new("UpdateResourceDataSync")
         185  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         186  +
                UpdateResourceDataSyncTelemetryInputCaptureInterceptor,
         187  +
            ))
         188  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         189  +
                ::aws_smithy_runtime::client::stalled_stream_protection::StalledStreamProtectionInterceptor::default(),
         190  +
            ))
         191  +
            .with_interceptor(::aws_smithy_runtime_api::client::interceptors::SharedInterceptor::permanent(
         192  +
                UpdateResourceDataSyncEndpointParamsInterceptor,
         193  +
            ))
         194  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::TransientErrorClassifier::<
         195  +
                crate::operation::update_resource_data_sync::UpdateResourceDataSyncError,
         196  +
            >::new())
         197  +
            .with_retry_classifier(::aws_smithy_runtime::client::retries::classifiers::ModeledAsRetryableClassifier::<
         198  +
                crate::operation::update_resource_data_sync::UpdateResourceDataSyncError,
         199  +
            >::new())
         200  +
            .with_retry_classifier(::aws_runtime::retries::classifiers::AwsErrorCodeClassifier::<
         201  +
                crate::operation::update_resource_data_sync::UpdateResourceDataSyncError,
         202  +
            >::new())
         203  +
            .with_retry_classifier(::aws_runtime::service_clock_skew::ServiceClockSkewClassifier::<
         204  +
                crate::operation::update_resource_data_sync::UpdateResourceDataSyncError,
         205  +
            >::new());
         206  +
         207  +
        ::std::borrow::Cow::Owned(rcb)
         208  +
    }
         209  +
}
         210  +
         211  +
#[derive(Debug)]
         212  +
struct UpdateResourceDataSyncTelemetryInputCaptureInterceptor;
         213  +
         214  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         215  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateResourceDataSyncTelemetryInputCaptureInterceptor {
         216  +
    fn name(&self) -> &'static str {
         217  +
        "UpdateResourceDataSyncTelemetryInputCaptureInterceptor"
         218  +
    }
         219  +
         220  +
    fn read_before_execution(
         221  +
        &self,
         222  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         223  +
            '_,
         224  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         225  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         226  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         227  +
        >,
         228  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         229  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         230  +
        // Nothing to do unless the customer opted in by naming members to record.
         231  +
        let ::std::option::Option::Some(requested) = cfg
         232  +
            .load::<::aws_smithy_types::telemetry::RequestedTelemetryAttributes>()
         233  +
            .filter(|r| !r.is_empty())
         234  +
        else {
         235  +
            return ::std::result::Result::Ok(());
         236  +
        };
         237  +
         238  +
        let ::std::option::Option::Some(input) = context.input().downcast_ref::<UpdateResourceDataSyncInput>() else {
         239  +
            // A mismatched input is not this interceptor's concern; skip quietly.
         240  +
            return ::std::result::Result::Ok(());
         241  +
        };
         242  +
         243  +
        let mut captured = ::aws_smithy_types::telemetry::CapturedTelemetryAttributes::default();
         244  +
        if requested.should_capture("SyncName") {
         245  +
            if let ::std::option::Option::Some(value) = input.sync_name.as_deref() {
         246  +
                captured.insert("SyncName", value);
         247  +
            }
         248  +
        }
         249  +
        if requested.should_capture("SyncType") {
         250  +
            if let ::std::option::Option::Some(value) = input.sync_type.as_deref() {
         251  +
                captured.insert("SyncType", value);
         252  +
            }
         253  +
        }
         254  +
         255  +
        cfg.interceptor_state().store_put(captured);
         256  +
        ::std::result::Result::Ok(())
         257  +
    }
         258  +
}
         259  +
#[derive(Debug)]
         260  +
struct UpdateResourceDataSyncResponseDeserializer;
         261  +
impl ::aws_smithy_runtime_api::client::ser_de::DeserializeResponse for UpdateResourceDataSyncResponseDeserializer {
         262  +
    fn deserialize_nonstreaming_with_config(
         263  +
        &self,
         264  +
        response: &::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
         265  +
        _cfg: &::aws_smithy_types::config_bag::ConfigBag,
         266  +
    ) -> ::aws_smithy_runtime_api::client::interceptors::context::OutputOrError {
         267  +
        let (success, status) = (response.status().is_success(), response.status().as_u16());
         268  +
        // Load body and headers BEFORE BeforeParseResponse so customizations
         269  +
        // (e.g., S3's `body_is_error` check that detects errors returned with
         270  +
        // HTTP 200) can inspect them. The legacy non-streaming path also
         271  +
        // loads `body` before firing this hook.
         272  +
        let body = response.body().bytes().expect("body loaded");
         273  +
        let headers = response.headers();
         274  +
        #[allow(unused_mut)]
         275  +
        let mut force_error = false;
         276  +
        ::tracing::debug!(request_id = ?::aws_types::request_id::RequestId::request_id(response));
         277  +
        if !success && status != 200 || force_error {
         278  +
            let protocol = _cfg
         279  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         280  +
                .expect("a SharedClientProtocol is required");
         281  +
            #[allow(unused_mut)]
         282  +
            let mut generic_builder = protocol.parse_error_metadata(response, _cfg).map_err(|e| {
         283  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         284  +
            })?;
         285  +
            generic_builder = ::aws_types::request_id::apply_request_id(generic_builder, headers);
         286  +
            let generic = generic_builder.build();
         287  +
            let error_code = match generic.code() {
         288  +
                ::std::option::Option::Some(code) => code,
         289  +
                ::std::option::Option::None => {
         290  +
                    return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         291  +
                        ::aws_smithy_runtime_api::box_error::BoxError::from(
         292  +
                            crate::operation::update_resource_data_sync::UpdateResourceDataSyncError::unhandled(generic),
         293  +
                        ),
         294  +
                    ))
         295  +
                }
         296  +
            };
         297  +
            let _error_message = generic.message().map(|msg| msg.to_owned());
         298  +
            let err = match error_code {
         299  +
                "InternalServerError" => crate::operation::update_resource_data_sync::UpdateResourceDataSyncError::InternalServerError({
         300  +
                    let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         301  +
                        crate::types::error::InternalServerError::deserialize_with_response(
         302  +
                            &mut *deser,
         303  +
                            response.headers(),
         304  +
                            response.status().into(),
         305  +
                            body,
         306  +
                        )
         307  +
                    }) {
         308  +
                        ::std::result::Result::Ok(val) => val,
         309  +
                        ::std::result::Result::Err(e) => {
         310  +
                            return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         311  +
                                ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         312  +
                            ))
         313  +
                        }
         314  +
                    };
         315  +
                    tmp.meta = generic;
         316  +
                    if tmp.message.is_none() {
         317  +
                        tmp.message = _error_message;
         318  +
                    }
         319  +
                    tmp
         320  +
                }),
         321  +
                "ResourceDataSyncConflictException" => {
         322  +
                    crate::operation::update_resource_data_sync::UpdateResourceDataSyncError::ResourceDataSyncConflictException({
         323  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         324  +
                            crate::types::error::ResourceDataSyncConflictException::deserialize_with_response(
         325  +
                                &mut *deser,
         326  +
                                response.headers(),
         327  +
                                response.status().into(),
         328  +
                                body,
         329  +
                            )
         330  +
                        }) {
         331  +
                            ::std::result::Result::Ok(val) => val,
         332  +
                            ::std::result::Result::Err(e) => {
         333  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         334  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         335  +
                                ))
         336  +
                            }
         337  +
                        };
         338  +
                        tmp.meta = generic;
         339  +
                        if tmp.message.is_none() {
         340  +
                            tmp.message = _error_message;
         341  +
                        }
         342  +
                        tmp
         343  +
                    })
         344  +
                }
         345  +
                "ResourceDataSyncInvalidConfigurationException" => {
         346  +
                    crate::operation::update_resource_data_sync::UpdateResourceDataSyncError::ResourceDataSyncInvalidConfigurationException({
         347  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         348  +
                            crate::types::error::ResourceDataSyncInvalidConfigurationException::deserialize_with_response(
         349  +
                                &mut *deser,
         350  +
                                response.headers(),
         351  +
                                response.status().into(),
         352  +
                                body,
         353  +
                            )
         354  +
                        }) {
         355  +
                            ::std::result::Result::Ok(val) => val,
         356  +
                            ::std::result::Result::Err(e) => {
         357  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         358  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         359  +
                                ))
         360  +
                            }
         361  +
                        };
         362  +
                        tmp.meta = generic;
         363  +
                        if tmp.message.is_none() {
         364  +
                            tmp.message = _error_message;
         365  +
                        }
         366  +
                        tmp
         367  +
                    })
         368  +
                }
         369  +
                "ResourceDataSyncNotFoundException" => {
         370  +
                    crate::operation::update_resource_data_sync::UpdateResourceDataSyncError::ResourceDataSyncNotFoundException({
         371  +
                        let mut tmp = match protocol.deserialize_error_response(response, _cfg).and_then(|mut deser| {
         372  +
                            crate::types::error::ResourceDataSyncNotFoundException::deserialize_with_response(
         373  +
                                &mut *deser,
         374  +
                                response.headers(),
         375  +
                                response.status().into(),
         376  +
                                body,
         377  +
                            )
         378  +
                        }) {
         379  +
                            ::std::result::Result::Ok(val) => val,
         380  +
                            ::std::result::Result::Err(e) => {
         381  +
                                return ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(
         382  +
                                    ::aws_smithy_runtime_api::box_error::BoxError::from(e),
         383  +
                                ))
         384  +
                            }
         385  +
                        };
         386  +
                        tmp.meta = generic;
         387  +
                        if tmp.message.is_none() {
         388  +
                            tmp.message = _error_message;
         389  +
                        }
         390  +
                        tmp
         391  +
                    })
         392  +
                }
         393  +
                _ => {
         394  +
                    // Registry-backed, operation-scoped reification of an error whose
         395  +
                    // code this operation does not model directly: the operation's own
         396  +
                    // error registry is consulted first, then the lookup widens to the
         397  +
                    // service-wide error registry. On a hit, the reified error is attached
         398  +
                    // as the source of the returned unhandled error while its metadata
         399  +
                    // (code, message, request id) is preserved; on a miss the generic
         400  +
                    // error is returned unchanged.
         401  +
                    match protocol
         402  +
                        .deserialize_error_response(response, _cfg)
         403  +
                        .ok()
         404  +
                        .and_then(|mut deser| {
         405  +
                            ::aws_smithy_schema::registry::reify_error(
         406  +
                                crate::operation::update_resource_data_sync::error_registry::REGISTRY
         407  +
                                    .or(&crate::error_type_registry::REGISTRY),
         408  +
                                error_code,
         409  +
                                &mut *deser,
         410  +
                            )
         411  +
                        }) {
         412  +
                        ::std::option::Option::Some(source) => <crate::operation::update_resource_data_sync::UpdateResourceDataSyncError as ::aws_smithy_runtime_api::client::result::CreateUnhandledError>::create_unhandled_error(source, ::std::option::Option::Some(generic)),
         413  +
                        ::std::option::Option::None => crate::operation::update_resource_data_sync::UpdateResourceDataSyncError::generic(generic),
         414  +
                    }
         415  +
                }
         416  +
            };
         417  +
            ::std::result::Result::Err(::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::operation(
         418  +
                ::aws_smithy_runtime_api::client::interceptors::context::Error::erase(err),
         419  +
            ))
         420  +
        } else {
         421  +
            let protocol = _cfg
         422  +
                .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         423  +
                .expect("a SharedClientProtocol is required");
         424  +
            let mut deser = protocol
         425  +
                .deserialize_response(response, UpdateResourceDataSync::OUTPUT_SCHEMA, _cfg)
         426  +
                .map_err(|e| {
         427  +
                    ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         428  +
                })?;
         429  +
            // body and headers are already in scope from the top of the function;
         430  +
            // alias `headers` as `_response_headers` so MutateOutput
         431  +
            // customizations have a stable name to read from.
         432  +
            let _response_headers = headers;
         433  +
            #[allow(unused_mut)]
         434  +
            let mut output = crate::operation::update_resource_data_sync::UpdateResourceDataSyncOutput::deserialize_with_response(
         435  +
                &mut *deser,
         436  +
                _response_headers,
         437  +
                response.status().into(),
         438  +
                body,
         439  +
            )
         440  +
            .map_err(|e| {
         441  +
                ::aws_smithy_runtime_api::client::orchestrator::OrchestratorError::other(::aws_smithy_runtime_api::box_error::BoxError::from(e))
         442  +
            })?;
         443  +
            output._set_request_id(::aws_types::request_id::RequestId::request_id(_response_headers).map(str::to_string));
         444  +
            ::std::result::Result::Ok(::aws_smithy_runtime_api::client::interceptors::context::Output::erase(output))
         445  +
        }
         446  +
    }
         447  +
}
         448  +
#[derive(Debug)]
         449  +
struct UpdateResourceDataSyncRequestSerializer;
         450  +
impl ::aws_smithy_runtime_api::client::ser_de::SerializeRequest for UpdateResourceDataSyncRequestSerializer {
         451  +
    #[allow(unused_mut, clippy::let_and_return, clippy::needless_borrow, clippy::useless_conversion)]
         452  +
    fn serialize_input(
         453  +
        &self,
         454  +
        input: ::aws_smithy_runtime_api::client::interceptors::context::Input,
         455  +
        _cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         456  +
    ) -> ::std::result::Result<::aws_smithy_runtime_api::client::orchestrator::HttpRequest, ::aws_smithy_runtime_api::box_error::BoxError> {
         457  +
        let input = input
         458  +
            .downcast::<crate::operation::update_resource_data_sync::UpdateResourceDataSyncInput>()
         459  +
            .expect("correct type");
         460  +
         461  +
        let protocol = _cfg
         462  +
            .load::<::aws_smithy_schema::protocol::SharedClientProtocol>()
         463  +
            .expect("a SharedClientProtocol is required");
         464  +
        let mut request = protocol
         465  +
            .serialize_request(&input, UpdateResourceDataSync::INPUT_SCHEMA, "/", _cfg)
         466  +
            .map_err(::aws_smithy_runtime_api::box_error::BoxError::from)?;
         467  +
         468  +
        return ::std::result::Result::Ok(request);
         469  +
    }
         470  +
}
         471  +
#[derive(Debug)]
         472  +
struct UpdateResourceDataSyncEndpointParamsInterceptor;
         473  +
         474  +
#[::aws_smithy_runtime_api::client::interceptors::dyn_dispatch_hint]
         475  +
impl ::aws_smithy_runtime_api::client::interceptors::Intercept for UpdateResourceDataSyncEndpointParamsInterceptor {
         476  +
    fn name(&self) -> &'static str {
         477  +
        "UpdateResourceDataSyncEndpointParamsInterceptor"
         478  +
    }
         479  +
         480  +
    fn read_before_execution(
         481  +
        &self,
         482  +
        context: &::aws_smithy_runtime_api::client::interceptors::context::BeforeSerializationInterceptorContextRef<
         483  +
            '_,
         484  +
            ::aws_smithy_runtime_api::client::interceptors::context::Input,
         485  +
            ::aws_smithy_runtime_api::client::interceptors::context::Output,
         486  +
            ::aws_smithy_runtime_api::client::interceptors::context::Error,
         487  +
        >,
         488  +
        cfg: &mut ::aws_smithy_types::config_bag::ConfigBag,
         489  +
    ) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
         490  +
        let _input = context
         491  +
            .input()
         492  +
            .downcast_ref::<UpdateResourceDataSyncInput>()
         493  +
            .ok_or("failed to downcast to UpdateResourceDataSyncInput")?;
         494  +
         495  +
        let params = crate::config::endpoint::Params::builder()
         496  +
            .set_region(cfg.load::<::aws_types::region::Region>().map(|r| r.as_ref().to_owned()))
         497  +
            .set_use_dual_stack(cfg.load::<::aws_types::endpoint_config::UseDualStack>().map(|ty| ty.0))
         498  +
            .set_use_fips(cfg.load::<::aws_types::endpoint_config::UseFips>().map(|ty| ty.0))
         499  +
            .set_endpoint(cfg.load::<::aws_types::endpoint_config::EndpointUrl>().map(|ty| ty.0.clone()))
         500  +
            .build()
         501  +
            .map_err(|err| {
         502  +
                ::aws_smithy_runtime_api::client::interceptors::error::ContextAttachedError::new("endpoint params could not be built", err)
         503  +
            })?;
         504  +
        cfg.interceptor_state()
         505  +
            .store_put(::aws_smithy_runtime_api::client::endpoint::EndpointResolverParams::new(params));
         506  +
        ::std::result::Result::Ok(())
         507  +
    }
         508  +
}
         509  +
         510  +
// The get_* functions below are generated from JMESPath expressions in the
         511  +
// operationContextParams trait. They target the operation's input shape.
         512  +
         513  +
/// Error type for the `UpdateResourceDataSyncError` operation.
         514  +
#[non_exhaustive]
         515  +
#[derive(::std::fmt::Debug)]
         516  +
pub enum UpdateResourceDataSyncError {
         517  +
    /// <p>An error occurred on the server side.</p>
         518  +
    InternalServerError(crate::types::error::InternalServerError),
         519  +
    /// <p>Another <code>UpdateResourceDataSync</code> request is being processed. Wait a few minutes and try again.</p>
         520  +
    ResourceDataSyncConflictException(crate::types::error::ResourceDataSyncConflictException),
         521  +
    /// <p>The specified sync configuration is invalid.</p>
         522  +
    ResourceDataSyncInvalidConfigurationException(crate::types::error::ResourceDataSyncInvalidConfigurationException),
         523  +
    /// <p>The specified sync name wasn't found.</p>
         524  +
    ResourceDataSyncNotFoundException(crate::types::error::ResourceDataSyncNotFoundException),
         525  +
    /// An unexpected error occurred (e.g., invalid JSON returned by the service or an unknown error code).
         526  +
    #[deprecated(note = "Matching `Unhandled` directly is not forwards compatible. Instead, match using a \
         527  +
    variable wildcard pattern and check `.code()`:
         528  +
     \
         529  +
    &nbsp;&nbsp;&nbsp;`err if err.code() == Some(\"SpecificExceptionCode\") => { /* handle the error */ }`
         530  +
     \
         531  +
    See [`ProvideErrorMetadata`](#impl-ProvideErrorMetadata-for-UpdateResourceDataSyncError) for what information is available for the error.")]
         532  +
    Unhandled(crate::error::sealed_unhandled::Unhandled),
         533  +
}
         534  +
impl UpdateResourceDataSyncError {
         535  +
    /// Creates the `UpdateResourceDataSyncError::Unhandled` variant from any error type.
         536  +
    pub fn unhandled(
         537  +
        err: impl ::std::convert::Into<::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>>,
         538  +
    ) -> Self {
         539  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         540  +
            source: err.into(),
         541  +
            meta: ::std::default::Default::default(),
         542  +
        })
         543  +
    }
         544  +
         545  +
    /// Creates the `UpdateResourceDataSyncError::Unhandled` variant from an [`ErrorMetadata`](::aws_smithy_types::error::ErrorMetadata).
         546  +
    pub fn generic(err: ::aws_smithy_types::error::ErrorMetadata) -> Self {
         547  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         548  +
            source: err.clone().into(),
         549  +
            meta: err,
         550  +
        })
         551  +
    }
         552  +
    ///
         553  +
    /// Returns error metadata, which includes the error code, message,
         554  +
    /// request ID, and potentially additional information.
         555  +
    ///
         556  +
    pub fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         557  +
        match self {
         558  +
            Self::InternalServerError(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         559  +
            Self::ResourceDataSyncConflictException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         560  +
            Self::ResourceDataSyncInvalidConfigurationException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         561  +
            Self::ResourceDataSyncNotFoundException(e) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(e),
         562  +
            Self::Unhandled(e) => &e.meta,
         563  +
        }
         564  +
    }
         565  +
    /// Returns `true` if the error kind is `UpdateResourceDataSyncError::InternalServerError`.
         566  +
    pub fn is_internal_server_error(&self) -> bool {
         567  +
        matches!(self, Self::InternalServerError(_))
         568  +
    }
         569  +
    /// Returns `true` if the error kind is `UpdateResourceDataSyncError::ResourceDataSyncConflictException`.
         570  +
    pub fn is_resource_data_sync_conflict_exception(&self) -> bool {
         571  +
        matches!(self, Self::ResourceDataSyncConflictException(_))
         572  +
    }
         573  +
    /// Returns `true` if the error kind is `UpdateResourceDataSyncError::ResourceDataSyncInvalidConfigurationException`.
         574  +
    pub fn is_resource_data_sync_invalid_configuration_exception(&self) -> bool {
         575  +
        matches!(self, Self::ResourceDataSyncInvalidConfigurationException(_))
         576  +
    }
         577  +
    /// Returns `true` if the error kind is `UpdateResourceDataSyncError::ResourceDataSyncNotFoundException`.
         578  +
    pub fn is_resource_data_sync_not_found_exception(&self) -> bool {
         579  +
        matches!(self, Self::ResourceDataSyncNotFoundException(_))
         580  +
    }
         581  +
}
         582  +
impl ::std::error::Error for UpdateResourceDataSyncError {
         583  +
    fn source(&self) -> ::std::option::Option<&(dyn ::std::error::Error + 'static)> {
         584  +
        match self {
         585  +
            Self::InternalServerError(_inner) => ::std::option::Option::Some(_inner),
         586  +
            Self::ResourceDataSyncConflictException(_inner) => ::std::option::Option::Some(_inner),
         587  +
            Self::ResourceDataSyncInvalidConfigurationException(_inner) => ::std::option::Option::Some(_inner),
         588  +
            Self::ResourceDataSyncNotFoundException(_inner) => ::std::option::Option::Some(_inner),
         589  +
            Self::Unhandled(_inner) => ::std::option::Option::Some(&*_inner.source),
         590  +
        }
         591  +
    }
         592  +
}
         593  +
impl ::std::fmt::Display for UpdateResourceDataSyncError {
         594  +
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
         595  +
        match self {
         596  +
            Self::InternalServerError(_inner) => _inner.fmt(f),
         597  +
            Self::ResourceDataSyncConflictException(_inner) => _inner.fmt(f),
         598  +
            Self::ResourceDataSyncInvalidConfigurationException(_inner) => _inner.fmt(f),
         599  +
            Self::ResourceDataSyncNotFoundException(_inner) => _inner.fmt(f),
         600  +
            Self::Unhandled(_inner) => {
         601  +
                if let ::std::option::Option::Some(code) = ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self) {
         602  +
                    write!(f, "unhandled error ({code})")
         603  +
                } else {
         604  +
                    f.write_str("unhandled error")
         605  +
                }
         606  +
            }
         607  +
        }
         608  +
    }
         609  +
}
         610  +
impl ::aws_smithy_types::retry::ProvideErrorKind for UpdateResourceDataSyncError {
         611  +
    fn code(&self) -> ::std::option::Option<&str> {
         612  +
        ::aws_smithy_types::error::metadata::ProvideErrorMetadata::code(self)
         613  +
    }
         614  +
    fn retryable_error_kind(&self) -> ::std::option::Option<::aws_smithy_types::retry::ErrorKind> {
         615  +
        ::std::option::Option::None
         616  +
    }
         617  +
}
         618  +
impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UpdateResourceDataSyncError {
         619  +
    fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
         620  +
        match self {
         621  +
            Self::InternalServerError(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         622  +
            Self::ResourceDataSyncConflictException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         623  +
            Self::ResourceDataSyncInvalidConfigurationException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         624  +
            Self::ResourceDataSyncNotFoundException(_inner) => ::aws_smithy_types::error::metadata::ProvideErrorMetadata::meta(_inner),
         625  +
            Self::Unhandled(_inner) => &_inner.meta,
         626  +
        }
         627  +
    }
         628  +
}
         629  +
impl ::aws_smithy_runtime_api::client::result::CreateUnhandledError for UpdateResourceDataSyncError {
         630  +
    fn create_unhandled_error(
         631  +
        source: ::std::boxed::Box<dyn ::std::error::Error + ::std::marker::Send + ::std::marker::Sync + 'static>,
         632  +
        meta: ::std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
         633  +
    ) -> Self {
         634  +
        Self::Unhandled(crate::error::sealed_unhandled::Unhandled {
         635  +
            source,
         636  +
            meta: meta.unwrap_or_default(),
         637  +
        })
         638  +
    }
         639  +
}
         640  +
impl ::aws_types::request_id::RequestId for crate::operation::update_resource_data_sync::UpdateResourceDataSyncError {
         641  +
    fn request_id(&self) -> Option<&str> {
         642  +
        self.meta().request_id()
         643  +
    }
         644  +
}
         645  +
         646  +
pub use crate::operation::update_resource_data_sync::_update_resource_data_sync_input::UpdateResourceDataSyncInput;
         647  +
         648  +
pub use crate::operation::update_resource_data_sync::_update_resource_data_sync_output::UpdateResourceDataSyncOutput;
         649  +
         650  +
mod _update_resource_data_sync_input;
         651  +
         652  +
mod _update_resource_data_sync_output;
         653  +
         654  +
/// Builders
         655  +
pub mod builders;