#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreatePartnerInputInput {
#[doc(hidden)]
pub input_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub request_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreatePartnerInputInput {
pub fn input_id(&self) -> std::option::Option<&str> {
self.input_id.as_deref()
}
pub fn request_id(&self) -> std::option::Option<&str> {
self.request_id.as_deref()
}
pub fn tags(
&self,
) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
{
self.tags.as_ref()
}
}
impl CreatePartnerInputInput {
pub fn builder(
) -> crate::operation::create_partner_input::builders::CreatePartnerInputInputBuilder {
crate::operation::create_partner_input::builders::CreatePartnerInputInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreatePartnerInputInputBuilder {
pub(crate) input_id: std::option::Option<std::string::String>,
pub(crate) request_id: std::option::Option<std::string::String>,
pub(crate) tags:
std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl CreatePartnerInputInputBuilder {
pub fn input_id(mut self, input: impl Into<std::string::String>) -> Self {
self.input_id = Some(input.into());
self
}
pub fn set_input_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.input_id = input;
self
}
pub fn request_id(mut self, input: impl Into<std::string::String>) -> Self {
self.request_id = Some(input.into());
self
}
pub fn set_request_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.request_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_partner_input::CreatePartnerInputInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::operation::create_partner_input::CreatePartnerInputInput {
input_id: self.input_id,
request_id: self.request_id,
tags: self.tags,
},
)
}
}