#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GenerateMatchIdOutput {
pub match_groups: ::std::vec::Vec<crate::types::MatchGroup>,
pub failed_records: ::std::vec::Vec<crate::types::FailedRecord>,
_request_id: Option<String>,
}
impl GenerateMatchIdOutput {
pub fn match_groups(&self) -> &[crate::types::MatchGroup] {
use std::ops::Deref;
self.match_groups.deref()
}
pub fn failed_records(&self) -> &[crate::types::FailedRecord] {
use std::ops::Deref;
self.failed_records.deref()
}
}
impl ::aws_types::request_id::RequestId for GenerateMatchIdOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GenerateMatchIdOutput {
pub fn builder() -> crate::operation::generate_match_id::builders::GenerateMatchIdOutputBuilder {
crate::operation::generate_match_id::builders::GenerateMatchIdOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GenerateMatchIdOutputBuilder {
pub(crate) match_groups: ::std::option::Option<::std::vec::Vec<crate::types::MatchGroup>>,
pub(crate) failed_records: ::std::option::Option<::std::vec::Vec<crate::types::FailedRecord>>,
_request_id: Option<String>,
}
impl GenerateMatchIdOutputBuilder {
pub fn match_groups(mut self, input: crate::types::MatchGroup) -> Self {
let mut v = self.match_groups.unwrap_or_default();
v.push(input);
self.match_groups = ::std::option::Option::Some(v);
self
}
pub fn set_match_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MatchGroup>>) -> Self {
self.match_groups = input;
self
}
pub fn get_match_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MatchGroup>> {
&self.match_groups
}
pub fn failed_records(mut self, input: crate::types::FailedRecord) -> Self {
let mut v = self.failed_records.unwrap_or_default();
v.push(input);
self.failed_records = ::std::option::Option::Some(v);
self
}
pub fn set_failed_records(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FailedRecord>>) -> Self {
self.failed_records = input;
self
}
pub fn get_failed_records(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FailedRecord>> {
&self.failed_records
}
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::generate_match_id::GenerateMatchIdOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::generate_match_id::GenerateMatchIdOutput {
match_groups: self.match_groups.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"match_groups",
"match_groups was not specified but it is required when building GenerateMatchIdOutput",
)
})?,
failed_records: self.failed_records.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"failed_records",
"failed_records was not specified but it is required when building GenerateMatchIdOutput",
)
})?,
_request_id: self._request_id,
})
}
}