aws-sdk-wellarchitected 1.110.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)]
pub struct CreateAgentGoalInput {
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the profile to associate the goal with.</p>
    pub profile_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Well-Architected Tool Framework pillars to associate with this goal.</p>
    pub pillars: ::std::option::Option<::std::vec::Vec<crate::types::Pillar>>,
    /// <p>The title of the goal.</p>
    pub title: ::std::option::Option<::std::string::String>,
    /// <p>A description of the goal.</p>
    pub description: ::std::option::Option<::std::string::String>,
}
impl CreateAgentGoalInput {
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the profile to associate the goal with.</p>
    pub fn profile_arn(&self) -> ::std::option::Option<&str> {
        self.profile_arn.as_deref()
    }
    /// <p>The Well-Architected Tool Framework pillars to associate with this goal.</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 `.pillars.is_none()`.
    pub fn pillars(&self) -> &[crate::types::Pillar] {
        self.pillars.as_deref().unwrap_or_default()
    }
    /// <p>The title of the goal.</p>
    pub fn title(&self) -> ::std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>A description of the goal.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
}
impl ::std::fmt::Debug for CreateAgentGoalInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAgentGoalInput");
        formatter.field("client_token", &self.client_token);
        formatter.field("profile_arn", &self.profile_arn);
        formatter.field("pillars", &self.pillars);
        formatter.field("title", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl CreateAgentGoalInput {
    /// Creates a new builder-style object to manufacture [`CreateAgentGoalInput`](crate::operation::create_agent_goal::CreateAgentGoalInput).
    pub fn builder() -> crate::operation::create_agent_goal::builders::CreateAgentGoalInputBuilder {
        crate::operation::create_agent_goal::builders::CreateAgentGoalInputBuilder::default()
    }
}

/// A builder for [`CreateAgentGoalInput`](crate::operation::create_agent_goal::CreateAgentGoalInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateAgentGoalInputBuilder {
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) profile_arn: ::std::option::Option<::std::string::String>,
    pub(crate) pillars: ::std::option::Option<::std::vec::Vec<crate::types::Pillar>>,
    pub(crate) title: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
}
impl CreateAgentGoalInputBuilder {
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>The Amazon Resource Name (ARN) of the profile to associate the goal with.</p>
    /// This field is required.
    pub fn profile_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the profile to associate the goal with.</p>
    pub fn set_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the profile to associate the goal with.</p>
    pub fn get_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_arn
    }
    /// Appends an item to `pillars`.
    ///
    /// To override the contents of this collection use [`set_pillars`](Self::set_pillars).
    ///
    /// <p>The Well-Architected Tool Framework pillars to associate with this goal.</p>
    pub fn pillars(mut self, input: crate::types::Pillar) -> Self {
        let mut v = self.pillars.unwrap_or_default();
        v.push(input);
        self.pillars = ::std::option::Option::Some(v);
        self
    }
    /// <p>The Well-Architected Tool Framework pillars to associate with this goal.</p>
    pub fn set_pillars(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Pillar>>) -> Self {
        self.pillars = input;
        self
    }
    /// <p>The Well-Architected Tool Framework pillars to associate with this goal.</p>
    pub fn get_pillars(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Pillar>> {
        &self.pillars
    }
    /// <p>The title of the goal.</p>
    /// This field is required.
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.title = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The title of the goal.</p>
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.title = input;
        self
    }
    /// <p>The title of the goal.</p>
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        &self.title
    }
    /// <p>A description of the goal.</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>A description of the goal.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the goal.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Consumes the builder and constructs a [`CreateAgentGoalInput`](crate::operation::create_agent_goal::CreateAgentGoalInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_agent_goal::CreateAgentGoalInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_agent_goal::CreateAgentGoalInput {
            client_token: self.client_token,
            profile_arn: self.profile_arn,
            pillars: self.pillars,
            title: self.title,
            description: self.description,
        })
    }
}
impl ::std::fmt::Debug for CreateAgentGoalInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAgentGoalInputBuilder");
        formatter.field("client_token", &self.client_token);
        formatter.field("profile_arn", &self.profile_arn);
        formatter.field("pillars", &self.pillars);
        formatter.field("title", &"*** Sensitive Data Redacted ***");
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}