#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateChannelInput {
#[doc(hidden)]
pub description: std::option::Option<std::string::String>,
#[doc(hidden)]
pub id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateChannelInput {
pub fn description(&self) -> std::option::Option<&str> {
self.description.as_deref()
}
pub fn id(&self) -> std::option::Option<&str> {
self.id.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl CreateChannelInput {
pub fn builder() -> crate::operation::create_channel::builders::CreateChannelInputBuilder {
crate::operation::create_channel::builders::CreateChannelInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreateChannelInputBuilder {
pub(crate) description: std::option::Option<std::string::String>,
pub(crate) id: std::option::Option<std::string::String>,
pub(crate) tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreateChannelInputBuilder {
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.description = Some(input.into());
self
}
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.description = input;
self
}
pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
self.id = Some(input.into());
self
}
pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.id = input;
self
}
pub fn tags(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = 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 build(
self,
) -> Result<
crate::operation::create_channel::CreateChannelInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::create_channel::CreateChannelInput {
description: self.description,
id: self.id,
tags: self.tags,
})
}
}