#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Profile {
pub profile_arn: ::std::option::Option<::std::string::String>,
pub profile_version: ::std::option::Option<::std::string::String>,
pub profile_name: ::std::option::Option<::std::string::String>,
pub profile_description: ::std::option::Option<::std::string::String>,
pub profile_questions: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestion>>,
pub owner: ::std::option::Option<::std::string::String>,
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub share_invitation_id: ::std::option::Option<::std::string::String>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl Profile {
pub fn profile_arn(&self) -> ::std::option::Option<&str> {
self.profile_arn.as_deref()
}
pub fn profile_version(&self) -> ::std::option::Option<&str> {
self.profile_version.as_deref()
}
pub fn profile_name(&self) -> ::std::option::Option<&str> {
self.profile_name.as_deref()
}
pub fn profile_description(&self) -> ::std::option::Option<&str> {
self.profile_description.as_deref()
}
pub fn profile_questions(&self) -> &[crate::types::ProfileQuestion] {
self.profile_questions.as_deref().unwrap_or_default()
}
pub fn owner(&self) -> ::std::option::Option<&str> {
self.owner.as_deref()
}
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.updated_at.as_ref()
}
pub fn share_invitation_id(&self) -> ::std::option::Option<&str> {
self.share_invitation_id.as_deref()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl Profile {
pub fn builder() -> crate::types::builders::ProfileBuilder {
crate::types::builders::ProfileBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ProfileBuilder {
pub(crate) profile_arn: ::std::option::Option<::std::string::String>,
pub(crate) profile_version: ::std::option::Option<::std::string::String>,
pub(crate) profile_name: ::std::option::Option<::std::string::String>,
pub(crate) profile_description: ::std::option::Option<::std::string::String>,
pub(crate) profile_questions: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestion>>,
pub(crate) owner: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) share_invitation_id: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl ProfileBuilder {
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 profile_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.profile_version = ::std::option::Option::Some(input.into());
self
}
pub fn set_profile_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profile_version = input;
self
}
pub fn get_profile_version(&self) -> &::std::option::Option<::std::string::String> {
&self.profile_version
}
pub fn profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.profile_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profile_name = input;
self
}
pub fn get_profile_name(&self) -> &::std::option::Option<::std::string::String> {
&self.profile_name
}
pub fn profile_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.profile_description = ::std::option::Option::Some(input.into());
self
}
pub fn set_profile_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.profile_description = input;
self
}
pub fn get_profile_description(&self) -> &::std::option::Option<::std::string::String> {
&self.profile_description
}
pub fn profile_questions(mut self, input: crate::types::ProfileQuestion) -> Self {
let mut v = self.profile_questions.unwrap_or_default();
v.push(input);
self.profile_questions = ::std::option::Option::Some(v);
self
}
pub fn set_profile_questions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestion>>) -> Self {
self.profile_questions = input;
self
}
pub fn get_profile_questions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProfileQuestion>> {
&self.profile_questions
}
pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owner = ::std::option::Option::Some(input.into());
self
}
pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owner = input;
self
}
pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
&self.owner
}
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 updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
pub fn share_invitation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.share_invitation_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_share_invitation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.share_invitation_id = input;
self
}
pub fn get_share_invitation_id(&self) -> &::std::option::Option<::std::string::String> {
&self.share_invitation_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) -> crate::types::Profile {
crate::types::Profile {
profile_arn: self.profile_arn,
profile_version: self.profile_version,
profile_name: self.profile_name,
profile_description: self.profile_description,
profile_questions: self.profile_questions,
owner: self.owner,
created_at: self.created_at,
updated_at: self.updated_at,
share_invitation_id: self.share_invitation_id,
tags: self.tags,
}
}
}