#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetSegmentMembershipOutput {
pub segment_definition_name: ::std::option::Option<::std::string::String>,
pub profiles: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQueryResult>>,
pub failures: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQueryFailures>>,
pub last_computed_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetSegmentMembershipOutput {
pub fn segment_definition_name(&self) -> ::std::option::Option<&str> {
self.segment_definition_name.as_deref()
}
pub fn profiles(&self) -> &[crate::types::ProfileQueryResult] {
self.profiles.as_deref().unwrap_or_default()
}
pub fn failures(&self) -> &[crate::types::ProfileQueryFailures] {
self.failures.as_deref().unwrap_or_default()
}
pub fn last_computed_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_computed_at.as_ref()
}
}
impl ::aws_types::request_id::RequestId for GetSegmentMembershipOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetSegmentMembershipOutput {
pub fn builder() -> crate::operation::get_segment_membership::builders::GetSegmentMembershipOutputBuilder {
crate::operation::get_segment_membership::builders::GetSegmentMembershipOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetSegmentMembershipOutputBuilder {
pub(crate) segment_definition_name: ::std::option::Option<::std::string::String>,
pub(crate) profiles: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQueryResult>>,
pub(crate) failures: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQueryFailures>>,
pub(crate) last_computed_at: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetSegmentMembershipOutputBuilder {
pub fn segment_definition_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.segment_definition_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_segment_definition_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.segment_definition_name = input;
self
}
pub fn get_segment_definition_name(&self) -> &::std::option::Option<::std::string::String> {
&self.segment_definition_name
}
pub fn profiles(mut self, input: crate::types::ProfileQueryResult) -> Self {
let mut v = self.profiles.unwrap_or_default();
v.push(input);
self.profiles = ::std::option::Option::Some(v);
self
}
pub fn set_profiles(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQueryResult>>) -> Self {
self.profiles = input;
self
}
pub fn get_profiles(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProfileQueryResult>> {
&self.profiles
}
pub fn failures(mut self, input: crate::types::ProfileQueryFailures) -> Self {
let mut v = self.failures.unwrap_or_default();
v.push(input);
self.failures = ::std::option::Option::Some(v);
self
}
pub fn set_failures(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProfileQueryFailures>>) -> Self {
self.failures = input;
self
}
pub fn get_failures(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProfileQueryFailures>> {
&self.failures
}
pub fn last_computed_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_computed_at = ::std::option::Option::Some(input);
self
}
pub fn set_last_computed_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_computed_at = input;
self
}
pub fn get_last_computed_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_computed_at
}
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) -> crate::operation::get_segment_membership::GetSegmentMembershipOutput {
crate::operation::get_segment_membership::GetSegmentMembershipOutput {
segment_definition_name: self.segment_definition_name,
profiles: self.profiles,
failures: self.failures,
last_computed_at: self.last_computed_at,
_request_id: self._request_id,
}
}
}