#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateAgentContextInput {
pub client_token: ::std::option::Option<::std::string::String>,
pub profile_arn: ::std::option::Option<::std::string::String>,
pub title: ::std::option::Option<::std::string::String>,
pub context_type: ::std::option::Option<crate::types::ContextType>,
pub content: ::std::option::Option<crate::types::ContextContent>,
}
impl CreateAgentContextInput {
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn profile_arn(&self) -> ::std::option::Option<&str> {
self.profile_arn.as_deref()
}
pub fn title(&self) -> ::std::option::Option<&str> {
self.title.as_deref()
}
pub fn context_type(&self) -> ::std::option::Option<&crate::types::ContextType> {
self.context_type.as_ref()
}
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 {
pub fn builder() -> crate::operation::create_agent_context::builders::CreateAgentContextInputBuilder {
crate::operation::create_agent_context::builders::CreateAgentContextInputBuilder::default()
}
}
#[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 {
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
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
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
}
pub fn set_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profile_arn = input;
self
}
pub fn get_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.profile_arn
}
pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.title = ::std::option::Option::Some(input.into());
self
}
pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.title = input;
self
}
pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
&self.title
}
pub fn context_type(mut self, input: crate::types::ContextType) -> Self {
self.context_type = ::std::option::Option::Some(input);
self
}
pub fn set_context_type(mut self, input: ::std::option::Option<crate::types::ContextType>) -> Self {
self.context_type = input;
self
}
pub fn get_context_type(&self) -> &::std::option::Option<crate::types::ContextType> {
&self.context_type
}
pub fn content(mut self, input: crate::types::ContextContent) -> Self {
self.content = ::std::option::Option::Some(input);
self
}
pub fn set_content(mut self, input: ::std::option::Option<crate::types::ContextContent>) -> Self {
self.content = input;
self
}
pub fn get_content(&self) -> &::std::option::Option<crate::types::ContextContent> {
&self.content
}
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()
}
}