aws_sdk_iotsitewise/operation/describe_dataset/
_describe_dataset_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeDatasetOutput {
pub dataset_id: ::std::string::String,
pub dataset_arn: ::std::string::String,
pub dataset_name: ::std::string::String,
pub dataset_description: ::std::string::String,
pub dataset_source: ::std::option::Option<crate::types::DatasetSource>,
pub dataset_status: ::std::option::Option<crate::types::DatasetStatus>,
pub dataset_creation_date: ::aws_smithy_types::DateTime,
pub dataset_last_update_date: ::aws_smithy_types::DateTime,
pub dataset_version: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl DescribeDatasetOutput {
pub fn dataset_id(&self) -> &str {
use std::ops::Deref;
self.dataset_id.deref()
}
pub fn dataset_arn(&self) -> &str {
use std::ops::Deref;
self.dataset_arn.deref()
}
pub fn dataset_name(&self) -> &str {
use std::ops::Deref;
self.dataset_name.deref()
}
pub fn dataset_description(&self) -> &str {
use std::ops::Deref;
self.dataset_description.deref()
}
pub fn dataset_source(&self) -> ::std::option::Option<&crate::types::DatasetSource> {
self.dataset_source.as_ref()
}
pub fn dataset_status(&self) -> ::std::option::Option<&crate::types::DatasetStatus> {
self.dataset_status.as_ref()
}
pub fn dataset_creation_date(&self) -> &::aws_smithy_types::DateTime {
&self.dataset_creation_date
}
pub fn dataset_last_update_date(&self) -> &::aws_smithy_types::DateTime {
&self.dataset_last_update_date
}
pub fn dataset_version(&self) -> ::std::option::Option<&str> {
self.dataset_version.as_deref()
}
}
impl ::aws_types::request_id::RequestId for DescribeDatasetOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeDatasetOutput {
pub fn builder() -> crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder {
crate::operation::describe_dataset::builders::DescribeDatasetOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeDatasetOutputBuilder {
pub(crate) dataset_id: ::std::option::Option<::std::string::String>,
pub(crate) dataset_arn: ::std::option::Option<::std::string::String>,
pub(crate) dataset_name: ::std::option::Option<::std::string::String>,
pub(crate) dataset_description: ::std::option::Option<::std::string::String>,
pub(crate) dataset_source: ::std::option::Option<crate::types::DatasetSource>,
pub(crate) dataset_status: ::std::option::Option<crate::types::DatasetStatus>,
pub(crate) dataset_creation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) dataset_last_update_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) dataset_version: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl DescribeDatasetOutputBuilder {
pub fn dataset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.dataset_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_dataset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.dataset_id = input;
self
}
pub fn get_dataset_id(&self) -> &::std::option::Option<::std::string::String> {
&self.dataset_id
}
pub fn dataset_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.dataset_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_dataset_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.dataset_arn = input;
self
}
pub fn get_dataset_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.dataset_arn
}
pub fn dataset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.dataset_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.dataset_name = input;
self
}
pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
&self.dataset_name
}
pub fn dataset_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.dataset_description = ::std::option::Option::Some(input.into());
self
}
pub fn set_dataset_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.dataset_description = input;
self
}
pub fn get_dataset_description(&self) -> &::std::option::Option<::std::string::String> {
&self.dataset_description
}
pub fn dataset_source(mut self, input: crate::types::DatasetSource) -> Self {
self.dataset_source = ::std::option::Option::Some(input);
self
}
pub fn set_dataset_source(mut self, input: ::std::option::Option<crate::types::DatasetSource>) -> Self {
self.dataset_source = input;
self
}
pub fn get_dataset_source(&self) -> &::std::option::Option<crate::types::DatasetSource> {
&self.dataset_source
}
pub fn dataset_status(mut self, input: crate::types::DatasetStatus) -> Self {
self.dataset_status = ::std::option::Option::Some(input);
self
}
pub fn set_dataset_status(mut self, input: ::std::option::Option<crate::types::DatasetStatus>) -> Self {
self.dataset_status = input;
self
}
pub fn get_dataset_status(&self) -> &::std::option::Option<crate::types::DatasetStatus> {
&self.dataset_status
}
pub fn dataset_creation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.dataset_creation_date = ::std::option::Option::Some(input);
self
}
pub fn set_dataset_creation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.dataset_creation_date = input;
self
}
pub fn get_dataset_creation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.dataset_creation_date
}
pub fn dataset_last_update_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.dataset_last_update_date = ::std::option::Option::Some(input);
self
}
pub fn set_dataset_last_update_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.dataset_last_update_date = input;
self
}
pub fn get_dataset_last_update_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.dataset_last_update_date
}
pub fn dataset_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.dataset_version = ::std::option::Option::Some(input.into());
self
}
pub fn set_dataset_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.dataset_version = input;
self
}
pub fn get_dataset_version(&self) -> &::std::option::Option<::std::string::String> {
&self.dataset_version
}
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::describe_dataset::DescribeDatasetOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::describe_dataset::DescribeDatasetOutput {
dataset_id: self.dataset_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"dataset_id",
"dataset_id was not specified but it is required when building DescribeDatasetOutput",
)
})?,
dataset_arn: self.dataset_arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"dataset_arn",
"dataset_arn was not specified but it is required when building DescribeDatasetOutput",
)
})?,
dataset_name: self.dataset_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"dataset_name",
"dataset_name was not specified but it is required when building DescribeDatasetOutput",
)
})?,
dataset_description: self.dataset_description.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"dataset_description",
"dataset_description was not specified but it is required when building DescribeDatasetOutput",
)
})?,
dataset_source: self.dataset_source,
dataset_status: self.dataset_status,
dataset_creation_date: self.dataset_creation_date.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"dataset_creation_date",
"dataset_creation_date was not specified but it is required when building DescribeDatasetOutput",
)
})?,
dataset_last_update_date: self.dataset_last_update_date.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"dataset_last_update_date",
"dataset_last_update_date was not specified but it is required when building DescribeDatasetOutput",
)
})?,
dataset_version: self.dataset_version,
_request_id: self._request_id,
})
}
}