#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetVersionOutput {
#[allow(missing_docs)] pub id: ::std::string::String,
#[allow(missing_docs)] pub config: ::aws_smithy_types::Document,
#[allow(missing_docs)] pub config_hash: ::std::string::String,
#[allow(missing_docs)] pub created_at: ::aws_smithy_types::DateTime,
#[allow(missing_docs)] pub description: ::std::string::String,
#[allow(missing_docs)] pub tags: ::std::option::Option<::std::vec::Vec::<::std::string::String>>,
}
impl GetVersionOutput {
#[allow(missing_docs)] pub fn id(&self) -> &str {
use std::ops::Deref; self.id.deref()
}
#[allow(missing_docs)] pub fn config(&self) -> &::aws_smithy_types::Document {
&self.config
}
#[allow(missing_docs)] pub fn config_hash(&self) -> &str {
use std::ops::Deref; self.config_hash.deref()
}
#[allow(missing_docs)] pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
#[allow(missing_docs)] pub fn description(&self) -> &str {
use std::ops::Deref; self.description.deref()
}
#[allow(missing_docs)] pub fn tags(&self) -> &[::std::string::String] {
self.tags.as_deref()
.unwrap_or_default()
}
}
impl GetVersionOutput {
pub fn builder() -> crate::operation::get_version::builders::GetVersionOutputBuilder {
crate::operation::get_version::builders::GetVersionOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetVersionOutputBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) config: ::std::option::Option<::aws_smithy_types::Document>,
pub(crate) config_hash: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec::<::std::string::String>>,
}
impl GetVersionOutputBuilder {
#[allow(missing_docs)] pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input; self
}
#[allow(missing_docs)] pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
#[allow(missing_docs)] pub fn config(mut self, input: ::aws_smithy_types::Document) -> Self {
self.config = ::std::option::Option::Some(input);
self
}
#[allow(missing_docs)] pub fn set_config(mut self, input: ::std::option::Option<::aws_smithy_types::Document>) -> Self {
self.config = input; self
}
#[allow(missing_docs)] pub fn get_config(&self) -> &::std::option::Option<::aws_smithy_types::Document> {
&self.config
}
#[allow(missing_docs)] pub fn config_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.config_hash = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_config_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.config_hash = input; self
}
#[allow(missing_docs)] pub fn get_config_hash(&self) -> &::std::option::Option<::std::string::String> {
&self.config_hash
}
#[allow(missing_docs)] pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
#[allow(missing_docs)] pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input; self
}
#[allow(missing_docs)] pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
#[allow(missing_docs)] pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input; self
}
#[allow(missing_docs)] pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn tags(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input.into());
self.tags = ::std::option::Option::Some(v);
self
}
#[allow(missing_docs)] pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec::<::std::string::String>>) -> Self {
self.tags = input; self
}
#[allow(missing_docs)] pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec::<::std::string::String>> {
&self.tags
}
pub fn build(self) -> ::std::result::Result<crate::operation::get_version::GetVersionOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(
crate::operation::get_version::GetVersionOutput {
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 GetVersionOutput")
)?
,
config: self.config
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("config", "config was not specified but it is required when building GetVersionOutput")
)?
,
config_hash: self.config_hash
.ok_or_else(||
::aws_smithy_types::error::operation::BuildError::missing_field("config_hash", "config_hash was not specified but it is required when building GetVersionOutput")
)?
,
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 GetVersionOutput")
)?
,
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 GetVersionOutput")
)?
,
tags: self.tags
,
}
)
}
}