aws-sdk-wellarchitected 1.102.0

AWS SDK for AWS Well-Architected Tool
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A profile.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Profile {
    /// <p>The profile ARN.</p>
    pub profile_arn: ::std::option::Option<::std::string::String>,
    /// <p>The profile version.</p>
    pub profile_version: ::std::option::Option<::std::string::String>,
    /// <p>The profile name.</p>
    pub profile_name: ::std::option::Option<::std::string::String>,
    /// <p>The profile description.</p>
    pub profile_description: ::std::option::Option<::std::string::String>,
    /// <p>Profile questions.</p>
    pub profile_questions: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestion>>,
    /// <p>An Amazon Web Services account ID.</p>
    pub owner: ::std::option::Option<::std::string::String>,
    /// <p>The date and time recorded.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time recorded.</p>
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The ID assigned to the share invitation.</p>
    pub share_invitation_id: ::std::option::Option<::std::string::String>,
    /// <p>The tags assigned to the profile.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl Profile {
    /// <p>The profile ARN.</p>
    pub fn profile_arn(&self) -> ::std::option::Option<&str> {
        self.profile_arn.as_deref()
    }
    /// <p>The profile version.</p>
    pub fn profile_version(&self) -> ::std::option::Option<&str> {
        self.profile_version.as_deref()
    }
    /// <p>The profile name.</p>
    pub fn profile_name(&self) -> ::std::option::Option<&str> {
        self.profile_name.as_deref()
    }
    /// <p>The profile description.</p>
    pub fn profile_description(&self) -> ::std::option::Option<&str> {
        self.profile_description.as_deref()
    }
    /// <p>Profile questions.</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 `.profile_questions.is_none()`.
    pub fn profile_questions(&self) -> &[crate::types::ProfileQuestion] {
        self.profile_questions.as_deref().unwrap_or_default()
    }
    /// <p>An Amazon Web Services account ID.</p>
    pub fn owner(&self) -> ::std::option::Option<&str> {
        self.owner.as_deref()
    }
    /// <p>The date and time recorded.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>The date and time recorded.</p>
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <p>The ID assigned to the share invitation.</p>
    pub fn share_invitation_id(&self) -> ::std::option::Option<&str> {
        self.share_invitation_id.as_deref()
    }
    /// <p>The tags assigned to the profile.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl Profile {
    /// Creates a new builder-style object to manufacture [`Profile`](crate::types::Profile).
    pub fn builder() -> crate::types::builders::ProfileBuilder {
        crate::types::builders::ProfileBuilder::default()
    }
}

/// A builder for [`Profile`](crate::types::Profile).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ProfileBuilder {
    pub(crate) profile_arn: ::std::option::Option<::std::string::String>,
    pub(crate) profile_version: ::std::option::Option<::std::string::String>,
    pub(crate) profile_name: ::std::option::Option<::std::string::String>,
    pub(crate) profile_description: ::std::option::Option<::std::string::String>,
    pub(crate) profile_questions: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestion>>,
    pub(crate) owner: ::std::option::Option<::std::string::String>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) share_invitation_id: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl ProfileBuilder {
    /// <p>The profile ARN.</p>
    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 profile ARN.</p>
    pub fn set_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_arn = input;
        self
    }
    /// <p>The profile ARN.</p>
    pub fn get_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_arn
    }
    /// <p>The profile version.</p>
    pub fn profile_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The profile version.</p>
    pub fn set_profile_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_version = input;
        self
    }
    /// <p>The profile version.</p>
    pub fn get_profile_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_version
    }
    /// <p>The profile name.</p>
    pub fn profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The profile name.</p>
    pub fn set_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_name = input;
        self
    }
    /// <p>The profile name.</p>
    pub fn get_profile_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_name
    }
    /// <p>The profile description.</p>
    pub fn profile_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.profile_description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The profile description.</p>
    pub fn set_profile_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.profile_description = input;
        self
    }
    /// <p>The profile description.</p>
    pub fn get_profile_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_description
    }
    /// Appends an item to `profile_questions`.
    ///
    /// To override the contents of this collection use [`set_profile_questions`](Self::set_profile_questions).
    ///
    /// <p>Profile questions.</p>
    pub fn profile_questions(mut self, input: crate::types::ProfileQuestion) -> Self {
        let mut v = self.profile_questions.unwrap_or_default();
        v.push(input);
        self.profile_questions = ::std::option::Option::Some(v);
        self
    }
    /// <p>Profile questions.</p>
    pub fn set_profile_questions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestion>>) -> Self {
        self.profile_questions = input;
        self
    }
    /// <p>Profile questions.</p>
    pub fn get_profile_questions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestion>> {
        &self.profile_questions
    }
    /// <p>An Amazon Web Services account ID.</p>
    pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An Amazon Web Services account ID.</p>
    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner = input;
        self
    }
    /// <p>An Amazon Web Services account ID.</p>
    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner
    }
    /// <p>The date and time recorded.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time recorded.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The date and time recorded.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The date and time recorded.</p>
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time recorded.</p>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <p>The date and time recorded.</p>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// <p>The ID assigned to the share invitation.</p>
    pub fn share_invitation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.share_invitation_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID assigned to the share invitation.</p>
    pub fn set_share_invitation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.share_invitation_id = input;
        self
    }
    /// <p>The ID assigned to the share invitation.</p>
    pub fn get_share_invitation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.share_invitation_id
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags assigned to the profile.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags assigned to the profile.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags assigned to the profile.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`Profile`](crate::types::Profile).
    pub fn build(self) -> crate::types::Profile {
        crate::types::Profile {
            profile_arn: self.profile_arn,
            profile_version: self.profile_version,
            profile_name: self.profile_name,
            profile_description: self.profile_description,
            profile_questions: self.profile_questions,
            owner: self.owner,
            created_at: self.created_at,
            updated_at: self.updated_at,
            share_invitation_id: self.share_invitation_id,
            tags: self.tags,
        }
    }
}