#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateStreamOutput {
pub cluster_identifier: ::std::string::String,
pub stream_identifier: ::std::string::String,
pub arn: ::std::string::String,
pub status: crate::types::StreamStatus,
pub creation_time: ::aws_smithy_types::DateTime,
pub ordering: crate::types::StreamOrdering,
pub format: crate::types::StreamFormat,
_request_id: Option<String>,
}
impl CreateStreamOutput {
pub fn cluster_identifier(&self) -> &str {
use std::ops::Deref;
self.cluster_identifier.deref()
}
pub fn stream_identifier(&self) -> &str {
use std::ops::Deref;
self.stream_identifier.deref()
}
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
pub fn status(&self) -> &crate::types::StreamStatus {
&self.status
}
pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
&self.creation_time
}
pub fn ordering(&self) -> &crate::types::StreamOrdering {
&self.ordering
}
pub fn format(&self) -> &crate::types::StreamFormat {
&self.format
}
}
impl ::aws_types::request_id::RequestId for CreateStreamOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateStreamOutput {
pub fn builder() -> crate::operation::create_stream::builders::CreateStreamOutputBuilder {
crate::operation::create_stream::builders::CreateStreamOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateStreamOutputBuilder {
pub(crate) cluster_identifier: ::std::option::Option<::std::string::String>,
pub(crate) stream_identifier: ::std::option::Option<::std::string::String>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::StreamStatus>,
pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) ordering: ::std::option::Option<crate::types::StreamOrdering>,
pub(crate) format: ::std::option::Option<crate::types::StreamFormat>,
_request_id: Option<String>,
}
impl CreateStreamOutputBuilder {
pub fn cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cluster_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster_identifier = input;
self
}
pub fn get_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster_identifier
}
pub fn stream_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.stream_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_stream_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.stream_identifier = input;
self
}
pub fn get_stream_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.stream_identifier
}
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 status(mut self, input: crate::types::StreamStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::StreamStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::StreamStatus> {
&self.status
}
pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_time = ::std::option::Option::Some(input);
self
}
pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_time = input;
self
}
pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_time
}
pub fn ordering(mut self, input: crate::types::StreamOrdering) -> Self {
self.ordering = ::std::option::Option::Some(input);
self
}
pub fn set_ordering(mut self, input: ::std::option::Option<crate::types::StreamOrdering>) -> Self {
self.ordering = input;
self
}
pub fn get_ordering(&self) -> &::std::option::Option<crate::types::StreamOrdering> {
&self.ordering
}
pub fn format(mut self, input: crate::types::StreamFormat) -> Self {
self.format = ::std::option::Option::Some(input);
self
}
pub fn set_format(mut self, input: ::std::option::Option<crate::types::StreamFormat>) -> Self {
self.format = input;
self
}
pub fn get_format(&self) -> &::std::option::Option<crate::types::StreamFormat> {
&self.format
}
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_stream::CreateStreamOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_stream::CreateStreamOutput {
cluster_identifier: self.cluster_identifier.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"cluster_identifier",
"cluster_identifier was not specified but it is required when building CreateStreamOutput",
)
})?,
stream_identifier: self.stream_identifier.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"stream_identifier",
"stream_identifier was not specified but it is required when building CreateStreamOutput",
)
})?,
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 CreateStreamOutput",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building CreateStreamOutput",
)
})?,
creation_time: self.creation_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"creation_time",
"creation_time was not specified but it is required when building CreateStreamOutput",
)
})?,
ordering: self.ordering.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"ordering",
"ordering was not specified but it is required when building CreateStreamOutput",
)
})?,
format: self.format.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"format",
"format was not specified but it is required when building CreateStreamOutput",
)
})?,
_request_id: self._request_id,
})
}
}