#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateChannelOutput {
pub arn: ::std::string::String,
pub channel_name: ::std::string::String,
pub channel_group_name: ::std::string::String,
pub created_at: ::aws_smithy_types::DateTime,
pub modified_at: ::aws_smithy_types::DateTime,
pub description: ::std::option::Option<::std::string::String>,
pub ingest_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::IngestEndpoint>>,
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl CreateChannelOutput {
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
pub fn channel_name(&self) -> &str {
use std::ops::Deref;
self.channel_name.deref()
}
pub fn channel_group_name(&self) -> &str {
use std::ops::Deref;
self.channel_group_name.deref()
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn modified_at(&self) -> &::aws_smithy_types::DateTime {
&self.modified_at
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn ingest_endpoints(&self) -> &[crate::types::IngestEndpoint] {
self.ingest_endpoints.as_deref().unwrap_or_default()
}
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl ::aws_types::request_id::RequestId for CreateChannelOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateChannelOutput {
pub fn builder() -> crate::operation::create_channel::builders::CreateChannelOutputBuilder {
crate::operation::create_channel::builders::CreateChannelOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateChannelOutputBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) channel_name: ::std::option::Option<::std::string::String>,
pub(crate) channel_group_name: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) ingest_endpoints: ::std::option::Option<::std::vec::Vec<crate::types::IngestEndpoint>>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl CreateChannelOutputBuilder {
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 channel_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.channel_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_channel_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.channel_name = input;
self
}
pub fn get_channel_name(&self) -> &::std::option::Option<::std::string::String> {
&self.channel_name
}
pub fn channel_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.channel_group_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_channel_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.channel_group_name = input;
self
}
pub fn get_channel_group_name(&self) -> &::std::option::Option<::std::string::String> {
&self.channel_group_name
}
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 modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.modified_at = ::std::option::Option::Some(input);
self
}
pub fn set_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.modified_at = input;
self
}
pub fn get_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.modified_at
}
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 ingest_endpoints(mut self, input: crate::types::IngestEndpoint) -> Self {
let mut v = self.ingest_endpoints.unwrap_or_default();
v.push(input);
self.ingest_endpoints = ::std::option::Option::Some(v);
self
}
pub fn set_ingest_endpoints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IngestEndpoint>>) -> Self {
self.ingest_endpoints = input;
self
}
pub fn get_ingest_endpoints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IngestEndpoint>> {
&self.ingest_endpoints
}
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
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_channel::CreateChannelOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::create_channel::CreateChannelOutput {
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 CreateChannelOutput",
)
})?,
channel_name: self.channel_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"channel_name",
"channel_name was not specified but it is required when building CreateChannelOutput",
)
})?,
channel_group_name: self.channel_group_name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"channel_group_name",
"channel_group_name was not specified but it is required when building CreateChannelOutput",
)
})?,
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 CreateChannelOutput",
)
})?,
modified_at: self.modified_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"modified_at",
"modified_at was not specified but it is required when building CreateChannelOutput",
)
})?,
description: self.description,
ingest_endpoints: self.ingest_endpoints,
tags: self.tags,
_request_id: self._request_id,
})
}
}