aws-sdk-backup 1.110.0

AWS SDK for AWS Backup
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateFrameworkInput {
    /// <p>The unique name of a framework. This name is between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
    pub framework_name: ::std::option::Option<::std::string::String>,
    /// <p>An optional description of the framework with a maximum 1,024 characters.</p>
    pub framework_description: ::std::option::Option<::std::string::String>,
    /// <p>The controls that make up the framework. Each control in the list has a name, input parameters, and scope.</p>
    pub framework_controls: ::std::option::Option<::std::vec::Vec<crate::types::FrameworkControl>>,
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>UpdateFrameworkInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub idempotency_token: ::std::option::Option<::std::string::String>,
}
impl UpdateFrameworkInput {
    /// <p>The unique name of a framework. This name is between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
    pub fn framework_name(&self) -> ::std::option::Option<&str> {
        self.framework_name.as_deref()
    }
    /// <p>An optional description of the framework with a maximum 1,024 characters.</p>
    pub fn framework_description(&self) -> ::std::option::Option<&str> {
        self.framework_description.as_deref()
    }
    /// <p>The controls that make up the framework. Each control in the list has a name, input parameters, and scope.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.framework_controls.is_none()`.
    pub fn framework_controls(&self) -> &[crate::types::FrameworkControl] {
        self.framework_controls.as_deref().unwrap_or_default()
    }
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>UpdateFrameworkInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub fn idempotency_token(&self) -> ::std::option::Option<&str> {
        self.idempotency_token.as_deref()
    }
}
impl UpdateFrameworkInput {
    /// Creates a new builder-style object to manufacture [`UpdateFrameworkInput`](crate::operation::update_framework::UpdateFrameworkInput).
    pub fn builder() -> crate::operation::update_framework::builders::UpdateFrameworkInputBuilder {
        crate::operation::update_framework::builders::UpdateFrameworkInputBuilder::default()
    }
}

/// A builder for [`UpdateFrameworkInput`](crate::operation::update_framework::UpdateFrameworkInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateFrameworkInputBuilder {
    pub(crate) framework_name: ::std::option::Option<::std::string::String>,
    pub(crate) framework_description: ::std::option::Option<::std::string::String>,
    pub(crate) framework_controls: ::std::option::Option<::std::vec::Vec<crate::types::FrameworkControl>>,
    pub(crate) idempotency_token: ::std::option::Option<::std::string::String>,
}
impl UpdateFrameworkInputBuilder {
    /// <p>The unique name of a framework. This name is between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
    /// This field is required.
    pub fn framework_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.framework_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique name of a framework. This name is between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
    pub fn set_framework_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.framework_name = input;
        self
    }
    /// <p>The unique name of a framework. This name is between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
    pub fn get_framework_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.framework_name
    }
    /// <p>An optional description of the framework with a maximum 1,024 characters.</p>
    pub fn framework_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.framework_description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An optional description of the framework with a maximum 1,024 characters.</p>
    pub fn set_framework_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.framework_description = input;
        self
    }
    /// <p>An optional description of the framework with a maximum 1,024 characters.</p>
    pub fn get_framework_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.framework_description
    }
    /// Appends an item to `framework_controls`.
    ///
    /// To override the contents of this collection use [`set_framework_controls`](Self::set_framework_controls).
    ///
    /// <p>The controls that make up the framework. Each control in the list has a name, input parameters, and scope.</p>
    pub fn framework_controls(mut self, input: crate::types::FrameworkControl) -> Self {
        let mut v = self.framework_controls.unwrap_or_default();
        v.push(input);
        self.framework_controls = ::std::option::Option::Some(v);
        self
    }
    /// <p>The controls that make up the framework. Each control in the list has a name, input parameters, and scope.</p>
    pub fn set_framework_controls(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FrameworkControl>>) -> Self {
        self.framework_controls = input;
        self
    }
    /// <p>The controls that make up the framework. Each control in the list has a name, input parameters, and scope.</p>
    pub fn get_framework_controls(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FrameworkControl>> {
        &self.framework_controls
    }
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>UpdateFrameworkInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub fn idempotency_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.idempotency_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>UpdateFrameworkInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub fn set_idempotency_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.idempotency_token = input;
        self
    }
    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>UpdateFrameworkInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
    pub fn get_idempotency_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.idempotency_token
    }
    /// Consumes the builder and constructs a [`UpdateFrameworkInput`](crate::operation::update_framework::UpdateFrameworkInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_framework::UpdateFrameworkInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_framework::UpdateFrameworkInput {
            framework_name: self.framework_name,
            framework_description: self.framework_description,
            framework_controls: self.framework_controls,
            idempotency_token: self.idempotency_token,
        })
    }
}