#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetWorkspaceOutput {
pub workspace_id: ::std::string::String,
pub arn: ::std::string::String,
pub description: ::std::option::Option<::std::string::String>,
pub linked_services: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub s3_location: ::std::option::Option<::std::string::String>,
pub role: ::std::option::Option<::std::string::String>,
pub creation_date_time: ::aws_smithy_types::DateTime,
pub update_date_time: ::aws_smithy_types::DateTime,
_request_id: Option<String>,
}
impl GetWorkspaceOutput {
pub fn workspace_id(&self) -> &str {
use std::ops::Deref;
self.workspace_id.deref()
}
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn linked_services(&self) -> &[::std::string::String] {
self.linked_services.as_deref().unwrap_or_default()
}
pub fn s3_location(&self) -> ::std::option::Option<&str> {
self.s3_location.as_deref()
}
pub fn role(&self) -> ::std::option::Option<&str> {
self.role.as_deref()
}
pub fn creation_date_time(&self) -> &::aws_smithy_types::DateTime {
&self.creation_date_time
}
pub fn update_date_time(&self) -> &::aws_smithy_types::DateTime {
&self.update_date_time
}
}
impl ::aws_types::request_id::RequestId for GetWorkspaceOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetWorkspaceOutput {
pub fn builder() -> crate::operation::get_workspace::builders::GetWorkspaceOutputBuilder {
crate::operation::get_workspace::builders::GetWorkspaceOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetWorkspaceOutputBuilder {
pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) linked_services: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) s3_location: ::std::option::Option<::std::string::String>,
pub(crate) role: ::std::option::Option<::std::string::String>,
pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) update_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetWorkspaceOutputBuilder {
pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.workspace_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.workspace_id = input;
self
}
pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
&self.workspace_id
}
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 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 linked_services(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.linked_services.unwrap_or_default();
v.push(input.into());
self.linked_services = ::std::option::Option::Some(v);
self
}
pub fn set_linked_services(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.linked_services = input;
self
}
pub fn get_linked_services(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.linked_services
}
pub fn s3_location(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.s3_location = ::std::option::Option::Some(input.into());
self
}
pub fn set_s3_location(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.s3_location = input;
self
}
pub fn get_s3_location(&self) -> &::std::option::Option<::std::string::String> {
&self.s3_location
}
pub fn role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role = ::std::option::Option::Some(input.into());
self
}
pub fn set_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role = input;
self
}
pub fn get_role(&self) -> &::std::option::Option<::std::string::String> {
&self.role
}
pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_date_time = ::std::option::Option::Some(input);
self
}
pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_date_time = input;
self
}
pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_date_time
}
pub fn update_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.update_date_time = ::std::option::Option::Some(input);
self
}
pub fn set_update_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.update_date_time = input;
self
}
pub fn get_update_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.update_date_time
}
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::get_workspace::GetWorkspaceOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_workspace::GetWorkspaceOutput {
workspace_id: self.workspace_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"workspace_id",
"workspace_id was not specified but it is required when building GetWorkspaceOutput",
)
})?,
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 GetWorkspaceOutput",
)
})?,
description: self.description,
linked_services: self.linked_services,
s3_location: self.s3_location,
role: self.role,
creation_date_time: self.creation_date_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"creation_date_time",
"creation_date_time was not specified but it is required when building GetWorkspaceOutput",
)
})?,
update_date_time: self.update_date_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"update_date_time",
"update_date_time was not specified but it is required when building GetWorkspaceOutput",
)
})?,
_request_id: self._request_id,
})
}
}