#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateProfileOutput {
pub id: ::std::string::String,
pub name: ::std::string::String,
pub arn: ::std::string::String,
pub entry_count: i32,
pub created_at: ::aws_smithy_types::DateTime,
pub updated_at: ::aws_smithy_types::DateTime,
pub description: ::std::option::Option<::std::string::String>,
pub extension_defaults: ::std::option::Option<crate::types::ExtensionDefaults>,
_request_id: Option<String>,
}
impl UpdateProfileOutput {
pub fn id(&self) -> &str {
use std::ops::Deref;
self.id.deref()
}
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
pub fn entry_count(&self) -> i32 {
self.entry_count
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.updated_at
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn extension_defaults(&self) -> ::std::option::Option<&crate::types::ExtensionDefaults> {
self.extension_defaults.as_ref()
}
}
impl ::aws_types::request_id::RequestId for UpdateProfileOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl UpdateProfileOutput {
pub fn builder() -> crate::operation::update_profile::builders::UpdateProfileOutputBuilder {
crate::operation::update_profile::builders::UpdateProfileOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateProfileOutputBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) entry_count: ::std::option::Option<i32>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) extension_defaults: ::std::option::Option<crate::types::ExtensionDefaults>,
_request_id: Option<String>,
}
impl UpdateProfileOutputBuilder {
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
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 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 entry_count(mut self, input: i32) -> Self {
self.entry_count = ::std::option::Option::Some(input);
self
}
pub fn set_entry_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.entry_count = input;
self
}
pub fn get_entry_count(&self) -> &::std::option::Option<i32> {
&self.entry_count
}
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 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 extension_defaults(mut self, input: crate::types::ExtensionDefaults) -> Self {
self.extension_defaults = ::std::option::Option::Some(input);
self
}
pub fn set_extension_defaults(mut self, input: ::std::option::Option<crate::types::ExtensionDefaults>) -> Self {
self.extension_defaults = input;
self
}
pub fn get_extension_defaults(&self) -> &::std::option::Option<crate::types::ExtensionDefaults> {
&self.extension_defaults
}
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::update_profile::UpdateProfileOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_profile::UpdateProfileOutput {
id: self.id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"id",
"id was not specified but it is required when building UpdateProfileOutput",
)
})?,
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 UpdateProfileOutput",
)
})?,
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 UpdateProfileOutput",
)
})?,
entry_count: self.entry_count.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"entry_count",
"entry_count was not specified but it is required when building UpdateProfileOutput",
)
})?,
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 UpdateProfileOutput",
)
})?,
updated_at: self.updated_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"updated_at",
"updated_at was not specified but it is required when building UpdateProfileOutput",
)
})?,
description: self.description,
extension_defaults: self.extension_defaults,
_request_id: self._request_id,
})
}
}