#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateViewOutput {
pub name: ::std::string::String,
pub r#type: crate::types::ViewType,
pub description: ::std::option::Option<::std::string::String>,
pub definition: ::std::string::String,
pub created_at: ::aws_smithy_types::DateTime,
pub updated_at: ::aws_smithy_types::DateTime,
pub arn: ::std::string::String,
_request_id: Option<String>,
}
impl CreateViewOutput {
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn r#type(&self) -> &crate::types::ViewType {
&self.r#type
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn definition(&self) -> &str {
use std::ops::Deref;
self.definition.deref()
}
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 arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
}
impl ::aws_types::request_id::RequestId for CreateViewOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateViewOutput {
pub fn builder() -> crate::operation::create_view::builders::CreateViewOutputBuilder {
crate::operation::create_view::builders::CreateViewOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateViewOutputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<crate::types::ViewType>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) definition: ::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) arn: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateViewOutputBuilder {
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 r#type(mut self, input: crate::types::ViewType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
pub fn set_type(mut self, input: ::std::option::Option<crate::types::ViewType>) -> Self {
self.r#type = input;
self
}
pub fn get_type(&self) -> &::std::option::Option<crate::types::ViewType> {
&self.r#type
}
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 definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.definition = ::std::option::Option::Some(input.into());
self
}
pub fn set_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.definition = input;
self
}
pub fn get_definition(&self) -> &::std::option::Option<::std::string::String> {
&self.definition
}
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 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(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_view::CreateViewOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_view::CreateViewOutput {
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 CreateViewOutput",
)
})?,
r#type: self.r#type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"r#type",
"r#type was not specified but it is required when building CreateViewOutput",
)
})?,
description: self.description,
definition: self.definition.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"definition",
"definition was not specified but it is required when building CreateViewOutput",
)
})?,
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 CreateViewOutput",
)
})?,
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 CreateViewOutput",
)
})?,
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 CreateViewOutput",
)
})?,
_request_id: self._request_id,
})
}
}