#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateAgentProfileOutput {
pub name: ::std::string::String,
pub display_name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub business_overview: ::std::option::Option<::std::string::String>,
pub pillars: ::std::vec::Vec<crate::types::Pillar>,
pub deletion_protection: bool,
pub execution_role_arn: ::std::string::String,
pub aggregation_configuration: ::std::vec::Vec<crate::types::AggregationConfiguration>,
pub arn: ::std::string::String,
pub eligible_for_scheduled_generation: ::std::option::Option<bool>,
pub eligible_for_architecture_generation: ::std::option::Option<bool>,
pub field_errors: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub created_by: ::std::string::String,
pub created_at: ::aws_smithy_types::DateTime,
pub last_modified_by: ::std::option::Option<::std::string::String>,
pub last_modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl CreateAgentProfileOutput {
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn display_name(&self) -> ::std::option::Option<&str> {
self.display_name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn business_overview(&self) -> ::std::option::Option<&str> {
self.business_overview.as_deref()
}
pub fn pillars(&self) -> &[crate::types::Pillar] {
use std::ops::Deref;
self.pillars.deref()
}
pub fn deletion_protection(&self) -> bool {
self.deletion_protection
}
pub fn execution_role_arn(&self) -> &str {
use std::ops::Deref;
self.execution_role_arn.deref()
}
pub fn aggregation_configuration(&self) -> &[crate::types::AggregationConfiguration] {
use std::ops::Deref;
self.aggregation_configuration.deref()
}
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
pub fn eligible_for_scheduled_generation(&self) -> ::std::option::Option<bool> {
self.eligible_for_scheduled_generation
}
pub fn eligible_for_architecture_generation(&self) -> ::std::option::Option<bool> {
self.eligible_for_architecture_generation
}
pub fn field_errors(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.field_errors.as_ref()
}
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
pub fn created_by(&self) -> &str {
use std::ops::Deref;
self.created_by.deref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn last_modified_by(&self) -> ::std::option::Option<&str> {
self.last_modified_by.as_deref()
}
pub fn last_modified_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_modified_at.as_ref()
}
}
impl ::std::fmt::Debug for CreateAgentProfileOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateAgentProfileOutput");
formatter.field("name", &self.name);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("business_overview", &"*** Sensitive Data Redacted ***");
formatter.field("pillars", &self.pillars);
formatter.field("deletion_protection", &self.deletion_protection);
formatter.field("execution_role_arn", &self.execution_role_arn);
formatter.field("aggregation_configuration", &self.aggregation_configuration);
formatter.field("arn", &self.arn);
formatter.field("eligible_for_scheduled_generation", &self.eligible_for_scheduled_generation);
formatter.field("eligible_for_architecture_generation", &self.eligible_for_architecture_generation);
formatter.field("field_errors", &self.field_errors);
formatter.field("tags", &self.tags);
formatter.field("created_by", &self.created_by);
formatter.field("created_at", &self.created_at);
formatter.field("last_modified_by", &self.last_modified_by);
formatter.field("last_modified_at", &self.last_modified_at);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for CreateAgentProfileOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateAgentProfileOutput {
pub fn builder() -> crate::operation::create_agent_profile::builders::CreateAgentProfileOutputBuilder {
crate::operation::create_agent_profile::builders::CreateAgentProfileOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateAgentProfileOutputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) display_name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) business_overview: ::std::option::Option<::std::string::String>,
pub(crate) pillars: ::std::option::Option<::std::vec::Vec<crate::types::Pillar>>,
pub(crate) deletion_protection: ::std::option::Option<bool>,
pub(crate) execution_role_arn: ::std::option::Option<::std::string::String>,
pub(crate) aggregation_configuration: ::std::option::Option<::std::vec::Vec<crate::types::AggregationConfiguration>>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) eligible_for_scheduled_generation: ::std::option::Option<bool>,
pub(crate) eligible_for_architecture_generation: ::std::option::Option<bool>,
pub(crate) field_errors: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) created_by: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_modified_by: ::std::option::Option<::std::string::String>,
pub(crate) last_modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl CreateAgentProfileOutputBuilder {
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.display_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.display_name = input;
self
}
pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
&self.display_name
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn business_overview(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.business_overview = ::std::option::Option::Some(input.into());
self
}
pub fn set_business_overview(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.business_overview = input;
self
}
pub fn get_business_overview(&self) -> &::std::option::Option<::std::string::String> {
&self.business_overview
}
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
}
pub fn set_pillars(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Pillar>>) -> Self {
self.pillars = input;
self
}
pub fn get_pillars(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Pillar>> {
&self.pillars
}
pub fn deletion_protection(mut self, input: bool) -> Self {
self.deletion_protection = ::std::option::Option::Some(input);
self
}
pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
self.deletion_protection = input;
self
}
pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
&self.deletion_protection
}
pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.execution_role_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.execution_role_arn = input;
self
}
pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.execution_role_arn
}
pub fn aggregation_configuration(mut self, input: crate::types::AggregationConfiguration) -> Self {
let mut v = self.aggregation_configuration.unwrap_or_default();
v.push(input);
self.aggregation_configuration = ::std::option::Option::Some(v);
self
}
pub fn set_aggregation_configuration(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AggregationConfiguration>>) -> Self {
self.aggregation_configuration = input;
self
}
pub fn get_aggregation_configuration(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AggregationConfiguration>> {
&self.aggregation_configuration
}
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
pub fn eligible_for_scheduled_generation(mut self, input: bool) -> Self {
self.eligible_for_scheduled_generation = ::std::option::Option::Some(input);
self
}
pub fn set_eligible_for_scheduled_generation(mut self, input: ::std::option::Option<bool>) -> Self {
self.eligible_for_scheduled_generation = input;
self
}
pub fn get_eligible_for_scheduled_generation(&self) -> &::std::option::Option<bool> {
&self.eligible_for_scheduled_generation
}
pub fn eligible_for_architecture_generation(mut self, input: bool) -> Self {
self.eligible_for_architecture_generation = ::std::option::Option::Some(input);
self
}
pub fn set_eligible_for_architecture_generation(mut self, input: ::std::option::Option<bool>) -> Self {
self.eligible_for_architecture_generation = input;
self
}
pub fn get_eligible_for_architecture_generation(&self) -> &::std::option::Option<bool> {
&self.eligible_for_architecture_generation
}
pub fn field_errors(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.field_errors.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.field_errors = ::std::option::Option::Some(hash_map);
self
}
pub fn set_field_errors(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.field_errors = input;
self
}
pub fn get_field_errors(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.field_errors
}
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.created_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.created_by = input;
self
}
pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
&self.created_by
}
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
pub fn last_modified_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.last_modified_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_last_modified_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.last_modified_by = input;
self
}
pub fn get_last_modified_by(&self) -> &::std::option::Option<::std::string::String> {
&self.last_modified_by
}
pub fn last_modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_modified_at = ::std::option::Option::Some(input);
self
}
pub fn set_last_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_modified_at = input;
self
}
pub fn get_last_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_modified_at
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_agent_profile::CreateAgentProfileOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_agent_profile::CreateAgentProfileOutput {
name: self.name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"name",
"name was not specified but it is required when building CreateAgentProfileOutput",
)
})?,
display_name: self.display_name,
description: self.description,
business_overview: self.business_overview,
pillars: self.pillars.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"pillars",
"pillars was not specified but it is required when building CreateAgentProfileOutput",
)
})?,
deletion_protection: self.deletion_protection.unwrap_or(true),
execution_role_arn: self.execution_role_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"execution_role_arn",
"execution_role_arn was not specified but it is required when building CreateAgentProfileOutput",
)
})?,
aggregation_configuration: self.aggregation_configuration.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"aggregation_configuration",
"aggregation_configuration was not specified but it is required when building CreateAgentProfileOutput",
)
})?,
arn: self.arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"arn",
"arn was not specified but it is required when building CreateAgentProfileOutput",
)
})?,
eligible_for_scheduled_generation: self.eligible_for_scheduled_generation,
eligible_for_architecture_generation: self.eligible_for_architecture_generation,
field_errors: self.field_errors,
tags: self.tags,
created_by: self.created_by.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_by",
"created_by was not specified but it is required when building CreateAgentProfileOutput",
)
})?,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building CreateAgentProfileOutput",
)
})?,
last_modified_by: self.last_modified_by,
last_modified_at: self.last_modified_at,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for CreateAgentProfileOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateAgentProfileOutputBuilder");
formatter.field("name", &self.name);
formatter.field("display_name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("business_overview", &"*** Sensitive Data Redacted ***");
formatter.field("pillars", &self.pillars);
formatter.field("deletion_protection", &self.deletion_protection);
formatter.field("execution_role_arn", &self.execution_role_arn);
formatter.field("aggregation_configuration", &self.aggregation_configuration);
formatter.field("arn", &self.arn);
formatter.field("eligible_for_scheduled_generation", &self.eligible_for_scheduled_generation);
formatter.field("eligible_for_architecture_generation", &self.eligible_for_architecture_generation);
formatter.field("field_errors", &self.field_errors);
formatter.field("tags", &self.tags);
formatter.field("created_by", &self.created_by);
formatter.field("created_at", &self.created_at);
formatter.field("last_modified_by", &self.last_modified_by);
formatter.field("last_modified_at", &self.last_modified_at);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}