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 CreateAgentContextInput {
    /// <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 context with.</p>
    pub profile_arn: ::std::option::Option<::std::string::String>,
    /// <p>The title of the context.</p>
    pub title: ::std::option::Option<::std::string::String>,
    /// <p>The type of the context.</p>
    pub context_type: ::std::option::Option<crate::types::ContextType>,
    /// <p>The typed content of the context. The structure contains application-specific fields such as account IDs, Regions, services, and resource types.</p>
    pub content: ::std::option::Option<crate::types::ContextContent>,
}
impl CreateAgentContextInput {
    /// <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 context with.</p>
    pub fn profile_arn(&self) -> ::std::option::Option<&str> {
        self.profile_arn.as_deref()
    }
    /// <p>The title of the context.</p>
    pub fn title(&self) -> ::std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The type of the context.</p>
    pub fn context_type(&self) -> ::std::option::Option<&crate::types::ContextType> {
        self.context_type.as_ref()
    }
    /// <p>The typed content of the context. The structure contains application-specific fields such as account IDs, Regions, services, and resource types.</p>
    pub fn content(&self) -> ::std::option::Option<&crate::types::ContextContent> {
        self.content.as_ref()
    }
}
impl ::std::fmt::Debug for CreateAgentContextInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAgentContextInput");
        formatter.field("client_token", &self.client_token);
        formatter.field("profile_arn", &self.profile_arn);
        formatter.field("title", &"*** Sensitive Data Redacted ***");
        formatter.field("context_type", &self.context_type);
        formatter.field("content", &self.content);
        formatter.finish()
    }
}
impl CreateAgentContextInput {
    /// Creates a new builder-style object to manufacture [`CreateAgentContextInput`](crate::operation::create_agent_context::CreateAgentContextInput).
    pub fn builder() -> crate::operation::create_agent_context::builders::CreateAgentContextInputBuilder {
        crate::operation::create_agent_context::builders::CreateAgentContextInputBuilder::default()
    }
}

/// A builder for [`CreateAgentContextInput`](crate::operation::create_agent_context::CreateAgentContextInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateAgentContextInputBuilder {
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) profile_arn: ::std::option::Option<::std::string::String>,
    pub(crate) title: ::std::option::Option<::std::string::String>,
    pub(crate) context_type: ::std::option::Option<crate::types::ContextType>,
    pub(crate) content: ::std::option::Option<crate::types::ContextContent>,
}
impl CreateAgentContextInputBuilder {
    /// <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 context 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 context 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 context with.</p>
    pub fn get_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.profile_arn
    }
    /// <p>The title of the context.</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 context.</p>
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.title = input;
        self
    }
    /// <p>The title of the context.</p>
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        &self.title
    }
    /// <p>The type of the context.</p>
    /// This field is required.
    pub fn context_type(mut self, input: crate::types::ContextType) -> Self {
        self.context_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the context.</p>
    pub fn set_context_type(mut self, input: ::std::option::Option<crate::types::ContextType>) -> Self {
        self.context_type = input;
        self
    }
    /// <p>The type of the context.</p>
    pub fn get_context_type(&self) -> &::std::option::Option<crate::types::ContextType> {
        &self.context_type
    }
    /// <p>The typed content of the context. The structure contains application-specific fields such as account IDs, Regions, services, and resource types.</p>
    /// This field is required.
    pub fn content(mut self, input: crate::types::ContextContent) -> Self {
        self.content = ::std::option::Option::Some(input);
        self
    }
    /// <p>The typed content of the context. The structure contains application-specific fields such as account IDs, Regions, services, and resource types.</p>
    pub fn set_content(mut self, input: ::std::option::Option<crate::types::ContextContent>) -> Self {
        self.content = input;
        self
    }
    /// <p>The typed content of the context. The structure contains application-specific fields such as account IDs, Regions, services, and resource types.</p>
    pub fn get_content(&self) -> &::std::option::Option<crate::types::ContextContent> {
        &self.content
    }
    /// Consumes the builder and constructs a [`CreateAgentContextInput`](crate::operation::create_agent_context::CreateAgentContextInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_agent_context::CreateAgentContextInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_agent_context::CreateAgentContextInput {
            client_token: self.client_token,
            profile_arn: self.profile_arn,
            title: self.title,
            context_type: self.context_type,
            content: self.content,
        })
    }
}
impl ::std::fmt::Debug for CreateAgentContextInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAgentContextInputBuilder");
        formatter.field("client_token", &self.client_token);
        formatter.field("profile_arn", &self.profile_arn);
        formatter.field("title", &"*** Sensitive Data Redacted ***");
        formatter.field("context_type", &self.context_type);
        formatter.field("content", &self.content);
        formatter.finish()
    }
}