#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct PutProfileObjectTypeOutput {
pub object_type_name: ::std::string::String,
pub description: ::std::string::String,
pub template_id: ::std::option::Option<::std::string::String>,
pub expiration_days: ::std::option::Option<i32>,
pub encryption_key: ::std::option::Option<::std::string::String>,
pub allow_profile_creation: bool,
pub source_last_updated_timestamp_format: ::std::option::Option<::std::string::String>,
pub fields: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>>,
pub keys: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>>,
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl PutProfileObjectTypeOutput {
pub fn object_type_name(&self) -> &str {
use std::ops::Deref;
self.object_type_name.deref()
}
pub fn description(&self) -> &str {
use std::ops::Deref;
self.description.deref()
}
pub fn template_id(&self) -> ::std::option::Option<&str> {
self.template_id.as_deref()
}
pub fn expiration_days(&self) -> ::std::option::Option<i32> {
self.expiration_days
}
pub fn encryption_key(&self) -> ::std::option::Option<&str> {
self.encryption_key.as_deref()
}
pub fn allow_profile_creation(&self) -> bool {
self.allow_profile_creation
}
pub fn source_last_updated_timestamp_format(&self) -> ::std::option::Option<&str> {
self.source_last_updated_timestamp_format.as_deref()
}
pub fn fields(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>> {
self.fields.as_ref()
}
pub fn keys(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>> {
self.keys.as_ref()
}
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_updated_at.as_ref()
}
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 PutProfileObjectTypeOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("PutProfileObjectTypeOutput");
formatter.field("object_type_name", &self.object_type_name);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("template_id", &self.template_id);
formatter.field("expiration_days", &self.expiration_days);
formatter.field("encryption_key", &self.encryption_key);
formatter.field("allow_profile_creation", &self.allow_profile_creation);
formatter.field("source_last_updated_timestamp_format", &self.source_last_updated_timestamp_format);
formatter.field("fields", &"*** Sensitive Data Redacted ***");
formatter.field("keys", &"*** Sensitive Data Redacted ***");
formatter.field("created_at", &self.created_at);
formatter.field("last_updated_at", &self.last_updated_at);
formatter.field("tags", &self.tags);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for PutProfileObjectTypeOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl PutProfileObjectTypeOutput {
pub fn builder() -> crate::operation::put_profile_object_type::builders::PutProfileObjectTypeOutputBuilder {
crate::operation::put_profile_object_type::builders::PutProfileObjectTypeOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct PutProfileObjectTypeOutputBuilder {
pub(crate) object_type_name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) template_id: ::std::option::Option<::std::string::String>,
pub(crate) expiration_days: ::std::option::Option<i32>,
pub(crate) encryption_key: ::std::option::Option<::std::string::String>,
pub(crate) allow_profile_creation: ::std::option::Option<bool>,
pub(crate) source_last_updated_timestamp_format: ::std::option::Option<::std::string::String>,
pub(crate) fields: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>>,
pub(crate) keys: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl PutProfileObjectTypeOutputBuilder {
pub fn object_type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.object_type_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_object_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.object_type_name = input;
self
}
pub fn get_object_type_name(&self) -> &::std::option::Option<::std::string::String> {
&self.object_type_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 template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.template_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.template_id = input;
self
}
pub fn get_template_id(&self) -> &::std::option::Option<::std::string::String> {
&self.template_id
}
pub fn expiration_days(mut self, input: i32) -> Self {
self.expiration_days = ::std::option::Option::Some(input);
self
}
pub fn set_expiration_days(mut self, input: ::std::option::Option<i32>) -> Self {
self.expiration_days = input;
self
}
pub fn get_expiration_days(&self) -> &::std::option::Option<i32> {
&self.expiration_days
}
pub fn encryption_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.encryption_key = ::std::option::Option::Some(input.into());
self
}
pub fn set_encryption_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.encryption_key = input;
self
}
pub fn get_encryption_key(&self) -> &::std::option::Option<::std::string::String> {
&self.encryption_key
}
pub fn allow_profile_creation(mut self, input: bool) -> Self {
self.allow_profile_creation = ::std::option::Option::Some(input);
self
}
pub fn set_allow_profile_creation(mut self, input: ::std::option::Option<bool>) -> Self {
self.allow_profile_creation = input;
self
}
pub fn get_allow_profile_creation(&self) -> &::std::option::Option<bool> {
&self.allow_profile_creation
}
pub fn source_last_updated_timestamp_format(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_last_updated_timestamp_format = ::std::option::Option::Some(input.into());
self
}
pub fn set_source_last_updated_timestamp_format(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source_last_updated_timestamp_format = input;
self
}
pub fn get_source_last_updated_timestamp_format(&self) -> &::std::option::Option<::std::string::String> {
&self.source_last_updated_timestamp_format
}
pub fn fields(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ObjectTypeField) -> Self {
let mut hash_map = self.fields.unwrap_or_default();
hash_map.insert(k.into(), v);
self.fields = ::std::option::Option::Some(hash_map);
self
}
pub fn set_fields(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>>,
) -> Self {
self.fields = input;
self
}
pub fn get_fields(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>> {
&self.fields
}
pub fn keys(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<crate::types::ObjectTypeKey>) -> Self {
let mut hash_map = self.keys.unwrap_or_default();
hash_map.insert(k.into(), v);
self.keys = ::std::option::Option::Some(hash_map);
self
}
pub fn set_keys(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>>,
) -> Self {
self.keys = input;
self
}
pub fn get_keys(
&self,
) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::ObjectTypeKey>>> {
&self.keys
}
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_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_updated_at = input;
self
}
pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_updated_at
}
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(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::put_profile_object_type::PutProfileObjectTypeOutput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::put_profile_object_type::PutProfileObjectTypeOutput {
object_type_name: self.object_type_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"object_type_name",
"object_type_name was not specified but it is required when building PutProfileObjectTypeOutput",
)
})?,
description: self.description.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"description",
"description was not specified but it is required when building PutProfileObjectTypeOutput",
)
})?,
template_id: self.template_id,
expiration_days: self.expiration_days,
encryption_key: self.encryption_key,
allow_profile_creation: self.allow_profile_creation.unwrap_or_default(),
source_last_updated_timestamp_format: self.source_last_updated_timestamp_format,
fields: self.fields,
keys: self.keys,
created_at: self.created_at,
last_updated_at: self.last_updated_at,
tags: self.tags,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for PutProfileObjectTypeOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("PutProfileObjectTypeOutputBuilder");
formatter.field("object_type_name", &self.object_type_name);
formatter.field("description", &"*** Sensitive Data Redacted ***");
formatter.field("template_id", &self.template_id);
formatter.field("expiration_days", &self.expiration_days);
formatter.field("encryption_key", &self.encryption_key);
formatter.field("allow_profile_creation", &self.allow_profile_creation);
formatter.field("source_last_updated_timestamp_format", &self.source_last_updated_timestamp_format);
formatter.field("fields", &"*** Sensitive Data Redacted ***");
formatter.field("keys", &"*** Sensitive Data Redacted ***");
formatter.field("created_at", &self.created_at);
formatter.field("last_updated_at", &self.last_updated_at);
formatter.field("tags", &self.tags);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}