#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateAssessmentInput {
pub name: ::std::option::Option<::std::string::String>,
pub description: ::std::option::Option<::std::string::String>,
pub assessment_reports_destination: ::std::option::Option<crate::types::AssessmentReportsDestination>,
pub scope: ::std::option::Option<crate::types::Scope>,
pub roles: ::std::option::Option<::std::vec::Vec<crate::types::Role>>,
pub framework_id: ::std::option::Option<::std::string::String>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateAssessmentInput {
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn assessment_reports_destination(&self) -> ::std::option::Option<&crate::types::AssessmentReportsDestination> {
self.assessment_reports_destination.as_ref()
}
pub fn scope(&self) -> ::std::option::Option<&crate::types::Scope> {
self.scope.as_ref()
}
pub fn roles(&self) -> &[crate::types::Role] {
self.roles.as_deref().unwrap_or_default()
}
pub fn framework_id(&self) -> ::std::option::Option<&str> {
self.framework_id.as_deref()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl ::std::fmt::Debug for CreateAssessmentInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateAssessmentInput");
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("assessment_reports_destination", &"*** Sensitive Data Redacted ***");
formatter.field("scope", &"*** Sensitive Data Redacted ***");
formatter.field("roles", &"*** Sensitive Data Redacted ***");
formatter.field("framework_id", &self.framework_id);
formatter.field("tags", &self.tags);
formatter.finish()
}
}
impl CreateAssessmentInput {
pub fn builder() -> crate::operation::create_assessment::builders::CreateAssessmentInputBuilder {
crate::operation::create_assessment::builders::CreateAssessmentInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct CreateAssessmentInputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) assessment_reports_destination: ::std::option::Option<crate::types::AssessmentReportsDestination>,
pub(crate) scope: ::std::option::Option<crate::types::Scope>,
pub(crate) roles: ::std::option::Option<::std::vec::Vec<crate::types::Role>>,
pub(crate) framework_id: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateAssessmentInputBuilder {
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 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 assessment_reports_destination(mut self, input: crate::types::AssessmentReportsDestination) -> Self {
self.assessment_reports_destination = ::std::option::Option::Some(input);
self
}
pub fn set_assessment_reports_destination(mut self, input: ::std::option::Option<crate::types::AssessmentReportsDestination>) -> Self {
self.assessment_reports_destination = input;
self
}
pub fn get_assessment_reports_destination(&self) -> &::std::option::Option<crate::types::AssessmentReportsDestination> {
&self.assessment_reports_destination
}
pub fn scope(mut self, input: crate::types::Scope) -> Self {
self.scope = ::std::option::Option::Some(input);
self
}
pub fn set_scope(mut self, input: ::std::option::Option<crate::types::Scope>) -> Self {
self.scope = input;
self
}
pub fn get_scope(&self) -> &::std::option::Option<crate::types::Scope> {
&self.scope
}
pub fn roles(mut self, input: crate::types::Role) -> Self {
let mut v = self.roles.unwrap_or_default();
v.push(input);
self.roles = ::std::option::Option::Some(v);
self
}
pub fn set_roles(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Role>>) -> Self {
self.roles = input;
self
}
pub fn get_roles(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Role>> {
&self.roles
}
pub fn framework_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.framework_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_framework_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.framework_id = input;
self
}
pub fn get_framework_id(&self) -> &::std::option::Option<::std::string::String> {
&self.framework_id
}
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
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_assessment::CreateAssessmentInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_assessment::CreateAssessmentInput {
name: self.name,
description: self.description,
assessment_reports_destination: self.assessment_reports_destination,
scope: self.scope,
roles: self.roles,
framework_id: self.framework_id,
tags: self.tags,
})
}
}
impl ::std::fmt::Debug for CreateAssessmentInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateAssessmentInputBuilder");
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("assessment_reports_destination", &"*** Sensitive Data Redacted ***");
formatter.field("scope", &"*** Sensitive Data Redacted ***");
formatter.field("roles", &"*** Sensitive Data Redacted ***");
formatter.field("framework_id", &self.framework_id);
formatter.field("tags", &self.tags);
formatter.finish()
}
}