aws-sdk-wellarchitected 1.95.0

AWS SDK for AWS Well-Architected Tool
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 UpdateReviewTemplateInput {
    /// <p>The review template ARN.</p>
    pub template_arn: ::std::option::Option<::std::string::String>,
    /// <p>The review template name.</p>
    pub template_name: ::std::option::Option<::std::string::String>,
    /// <p>The review template description.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The notes associated with the workload.</p>
    /// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
    pub notes: ::std::option::Option<::std::string::String>,
    /// <p>A list of lens aliases or ARNs to apply to the review template.</p>
    pub lenses_to_associate: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>A list of lens aliases or ARNs to unapply to the review template. The <code>wellarchitected</code> lens cannot be unapplied.</p>
    pub lenses_to_disassociate: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateReviewTemplateInput {
    /// <p>The review template ARN.</p>
    pub fn template_arn(&self) -> ::std::option::Option<&str> {
        self.template_arn.as_deref()
    }
    /// <p>The review template name.</p>
    pub fn template_name(&self) -> ::std::option::Option<&str> {
        self.template_name.as_deref()
    }
    /// <p>The review template description.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The notes associated with the workload.</p>
    /// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
    pub fn notes(&self) -> ::std::option::Option<&str> {
        self.notes.as_deref()
    }
    /// <p>A list of lens aliases or ARNs to apply to the review template.</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 `.lenses_to_associate.is_none()`.
    pub fn lenses_to_associate(&self) -> &[::std::string::String] {
        self.lenses_to_associate.as_deref().unwrap_or_default()
    }
    /// <p>A list of lens aliases or ARNs to unapply to the review template. The <code>wellarchitected</code> lens cannot be unapplied.</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 `.lenses_to_disassociate.is_none()`.
    pub fn lenses_to_disassociate(&self) -> &[::std::string::String] {
        self.lenses_to_disassociate.as_deref().unwrap_or_default()
    }
}
impl UpdateReviewTemplateInput {
    /// Creates a new builder-style object to manufacture [`UpdateReviewTemplateInput`](crate::operation::update_review_template::UpdateReviewTemplateInput).
    pub fn builder() -> crate::operation::update_review_template::builders::UpdateReviewTemplateInputBuilder {
        crate::operation::update_review_template::builders::UpdateReviewTemplateInputBuilder::default()
    }
}

/// A builder for [`UpdateReviewTemplateInput`](crate::operation::update_review_template::UpdateReviewTemplateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateReviewTemplateInputBuilder {
    pub(crate) template_arn: ::std::option::Option<::std::string::String>,
    pub(crate) template_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) notes: ::std::option::Option<::std::string::String>,
    pub(crate) lenses_to_associate: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) lenses_to_disassociate: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateReviewTemplateInputBuilder {
    /// <p>The review template ARN.</p>
    /// This field is required.
    pub fn template_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.template_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The review template ARN.</p>
    pub fn set_template_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.template_arn = input;
        self
    }
    /// <p>The review template ARN.</p>
    pub fn get_template_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.template_arn
    }
    /// <p>The review template name.</p>
    pub fn template_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.template_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The review template name.</p>
    pub fn set_template_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.template_name = input;
        self
    }
    /// <p>The review template name.</p>
    pub fn get_template_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.template_name
    }
    /// <p>The review template description.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The review template description.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The review template description.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The notes associated with the workload.</p>
    /// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
    pub fn notes(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.notes = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The notes associated with the workload.</p>
    /// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
    pub fn set_notes(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.notes = input;
        self
    }
    /// <p>The notes associated with the workload.</p>
    /// <p>For a review template, these are the notes that will be associated with the workload when the template is applied.</p>
    pub fn get_notes(&self) -> &::std::option::Option<::std::string::String> {
        &self.notes
    }
    /// Appends an item to `lenses_to_associate`.
    ///
    /// To override the contents of this collection use [`set_lenses_to_associate`](Self::set_lenses_to_associate).
    ///
    /// <p>A list of lens aliases or ARNs to apply to the review template.</p>
    pub fn lenses_to_associate(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.lenses_to_associate.unwrap_or_default();
        v.push(input.into());
        self.lenses_to_associate = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of lens aliases or ARNs to apply to the review template.</p>
    pub fn set_lenses_to_associate(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.lenses_to_associate = input;
        self
    }
    /// <p>A list of lens aliases or ARNs to apply to the review template.</p>
    pub fn get_lenses_to_associate(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.lenses_to_associate
    }
    /// Appends an item to `lenses_to_disassociate`.
    ///
    /// To override the contents of this collection use [`set_lenses_to_disassociate`](Self::set_lenses_to_disassociate).
    ///
    /// <p>A list of lens aliases or ARNs to unapply to the review template. The <code>wellarchitected</code> lens cannot be unapplied.</p>
    pub fn lenses_to_disassociate(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.lenses_to_disassociate.unwrap_or_default();
        v.push(input.into());
        self.lenses_to_disassociate = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of lens aliases or ARNs to unapply to the review template. The <code>wellarchitected</code> lens cannot be unapplied.</p>
    pub fn set_lenses_to_disassociate(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.lenses_to_disassociate = input;
        self
    }
    /// <p>A list of lens aliases or ARNs to unapply to the review template. The <code>wellarchitected</code> lens cannot be unapplied.</p>
    pub fn get_lenses_to_disassociate(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.lenses_to_disassociate
    }
    /// Consumes the builder and constructs a [`UpdateReviewTemplateInput`](crate::operation::update_review_template::UpdateReviewTemplateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_review_template::UpdateReviewTemplateInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::update_review_template::UpdateReviewTemplateInput {
            template_arn: self.template_arn,
            template_name: self.template_name,
            description: self.description,
            notes: self.notes,
            lenses_to_associate: self.lenses_to_associate,
            lenses_to_disassociate: self.lenses_to_disassociate,
        })
    }
}