#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct RejectSubscriptionRequestOutput {
pub id: ::std::string::String,
pub created_by: ::std::string::String,
pub updated_by: ::std::option::Option<::std::string::String>,
pub domain_id: ::std::string::String,
pub status: crate::types::SubscriptionRequestStatus,
pub created_at: ::aws_smithy_types::DateTime,
pub updated_at: ::aws_smithy_types::DateTime,
pub request_reason: ::std::string::String,
pub subscribed_principals: ::std::vec::Vec<crate::types::SubscribedPrincipal>,
pub subscribed_listings: ::std::vec::Vec<crate::types::SubscribedListing>,
pub reviewer_id: ::std::option::Option<::std::string::String>,
pub decision_comment: ::std::option::Option<::std::string::String>,
pub existing_subscription_id: ::std::option::Option<::std::string::String>,
pub metadata_forms: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
_request_id: Option<String>,
}
impl RejectSubscriptionRequestOutput {
pub fn id(&self) -> &str {
use std::ops::Deref;
self.id.deref()
}
pub fn created_by(&self) -> &str {
use std::ops::Deref;
self.created_by.deref()
}
pub fn updated_by(&self) -> ::std::option::Option<&str> {
self.updated_by.as_deref()
}
pub fn domain_id(&self) -> &str {
use std::ops::Deref;
self.domain_id.deref()
}
pub fn status(&self) -> &crate::types::SubscriptionRequestStatus {
&self.status
}
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.updated_at
}
pub fn request_reason(&self) -> &str {
use std::ops::Deref;
self.request_reason.deref()
}
pub fn subscribed_principals(&self) -> &[crate::types::SubscribedPrincipal] {
use std::ops::Deref;
self.subscribed_principals.deref()
}
pub fn subscribed_listings(&self) -> &[crate::types::SubscribedListing] {
use std::ops::Deref;
self.subscribed_listings.deref()
}
pub fn reviewer_id(&self) -> ::std::option::Option<&str> {
self.reviewer_id.as_deref()
}
pub fn decision_comment(&self) -> ::std::option::Option<&str> {
self.decision_comment.as_deref()
}
pub fn existing_subscription_id(&self) -> ::std::option::Option<&str> {
self.existing_subscription_id.as_deref()
}
pub fn metadata_forms(&self) -> &[crate::types::FormOutput] {
self.metadata_forms.as_deref().unwrap_or_default()
}
}
impl ::std::fmt::Debug for RejectSubscriptionRequestOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("RejectSubscriptionRequestOutput");
formatter.field("id", &self.id);
formatter.field("created_by", &self.created_by);
formatter.field("updated_by", &self.updated_by);
formatter.field("domain_id", &self.domain_id);
formatter.field("status", &self.status);
formatter.field("created_at", &self.created_at);
formatter.field("updated_at", &self.updated_at);
formatter.field("request_reason", &"*** Sensitive Data Redacted ***");
formatter.field("subscribed_principals", &self.subscribed_principals);
formatter.field("subscribed_listings", &self.subscribed_listings);
formatter.field("reviewer_id", &self.reviewer_id);
formatter.field("decision_comment", &"*** Sensitive Data Redacted ***");
formatter.field("existing_subscription_id", &self.existing_subscription_id);
formatter.field("metadata_forms", &self.metadata_forms);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for RejectSubscriptionRequestOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl RejectSubscriptionRequestOutput {
pub fn builder() -> crate::operation::reject_subscription_request::builders::RejectSubscriptionRequestOutputBuilder {
crate::operation::reject_subscription_request::builders::RejectSubscriptionRequestOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct RejectSubscriptionRequestOutputBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) created_by: ::std::option::Option<::std::string::String>,
pub(crate) updated_by: ::std::option::Option<::std::string::String>,
pub(crate) domain_id: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::SubscriptionRequestStatus>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) request_reason: ::std::option::Option<::std::string::String>,
pub(crate) subscribed_principals: ::std::option::Option<::std::vec::Vec<crate::types::SubscribedPrincipal>>,
pub(crate) subscribed_listings: ::std::option::Option<::std::vec::Vec<crate::types::SubscribedListing>>,
pub(crate) reviewer_id: ::std::option::Option<::std::string::String>,
pub(crate) decision_comment: ::std::option::Option<::std::string::String>,
pub(crate) existing_subscription_id: ::std::option::Option<::std::string::String>,
pub(crate) metadata_forms: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>,
_request_id: Option<String>,
}
impl RejectSubscriptionRequestOutputBuilder {
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
pub fn created_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.created_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_created_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.created_by = input;
self
}
pub fn get_created_by(&self) -> &::std::option::Option<::std::string::String> {
&self.created_by
}
pub fn updated_by(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.updated_by = ::std::option::Option::Some(input.into());
self
}
pub fn set_updated_by(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.updated_by = input;
self
}
pub fn get_updated_by(&self) -> &::std::option::Option<::std::string::String> {
&self.updated_by
}
pub fn domain_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.domain_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_domain_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.domain_id = input;
self
}
pub fn get_domain_id(&self) -> &::std::option::Option<::std::string::String> {
&self.domain_id
}
pub fn status(mut self, input: crate::types::SubscriptionRequestStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
pub fn set_status(mut self, input: ::std::option::Option<crate::types::SubscriptionRequestStatus>) -> Self {
self.status = input;
self
}
pub fn get_status(&self) -> &::std::option::Option<crate::types::SubscriptionRequestStatus> {
&self.status
}
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 updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
pub fn request_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.request_reason = ::std::option::Option::Some(input.into());
self
}
pub fn set_request_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.request_reason = input;
self
}
pub fn get_request_reason(&self) -> &::std::option::Option<::std::string::String> {
&self.request_reason
}
pub fn subscribed_principals(mut self, input: crate::types::SubscribedPrincipal) -> Self {
let mut v = self.subscribed_principals.unwrap_or_default();
v.push(input);
self.subscribed_principals = ::std::option::Option::Some(v);
self
}
pub fn set_subscribed_principals(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SubscribedPrincipal>>) -> Self {
self.subscribed_principals = input;
self
}
pub fn get_subscribed_principals(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SubscribedPrincipal>> {
&self.subscribed_principals
}
pub fn subscribed_listings(mut self, input: crate::types::SubscribedListing) -> Self {
let mut v = self.subscribed_listings.unwrap_or_default();
v.push(input);
self.subscribed_listings = ::std::option::Option::Some(v);
self
}
pub fn set_subscribed_listings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SubscribedListing>>) -> Self {
self.subscribed_listings = input;
self
}
pub fn get_subscribed_listings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SubscribedListing>> {
&self.subscribed_listings
}
pub fn reviewer_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.reviewer_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_reviewer_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.reviewer_id = input;
self
}
pub fn get_reviewer_id(&self) -> &::std::option::Option<::std::string::String> {
&self.reviewer_id
}
pub fn decision_comment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.decision_comment = ::std::option::Option::Some(input.into());
self
}
pub fn set_decision_comment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.decision_comment = input;
self
}
pub fn get_decision_comment(&self) -> &::std::option::Option<::std::string::String> {
&self.decision_comment
}
pub fn existing_subscription_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.existing_subscription_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_existing_subscription_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.existing_subscription_id = input;
self
}
pub fn get_existing_subscription_id(&self) -> &::std::option::Option<::std::string::String> {
&self.existing_subscription_id
}
pub fn metadata_forms(mut self, input: crate::types::FormOutput) -> Self {
let mut v = self.metadata_forms.unwrap_or_default();
v.push(input);
self.metadata_forms = ::std::option::Option::Some(v);
self
}
pub fn set_metadata_forms(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FormOutput>>) -> Self {
self.metadata_forms = input;
self
}
pub fn get_metadata_forms(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FormOutput>> {
&self.metadata_forms
}
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::reject_subscription_request::RejectSubscriptionRequestOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::reject_subscription_request::RejectSubscriptionRequestOutput {
id: self.id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"id",
"id was not specified but it is required when building RejectSubscriptionRequestOutput",
)
})?,
created_by: self.created_by.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_by",
"created_by was not specified but it is required when building RejectSubscriptionRequestOutput",
)
})?,
updated_by: self.updated_by,
domain_id: self.domain_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"domain_id",
"domain_id was not specified but it is required when building RejectSubscriptionRequestOutput",
)
})?,
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building RejectSubscriptionRequestOutput",
)
})?,
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 RejectSubscriptionRequestOutput",
)
})?,
updated_at: self.updated_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"updated_at",
"updated_at was not specified but it is required when building RejectSubscriptionRequestOutput",
)
})?,
request_reason: self.request_reason.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"request_reason",
"request_reason was not specified but it is required when building RejectSubscriptionRequestOutput",
)
})?,
subscribed_principals: self.subscribed_principals.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"subscribed_principals",
"subscribed_principals was not specified but it is required when building RejectSubscriptionRequestOutput",
)
})?,
subscribed_listings: self.subscribed_listings.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"subscribed_listings",
"subscribed_listings was not specified but it is required when building RejectSubscriptionRequestOutput",
)
})?,
reviewer_id: self.reviewer_id,
decision_comment: self.decision_comment,
existing_subscription_id: self.existing_subscription_id,
metadata_forms: self.metadata_forms,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for RejectSubscriptionRequestOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("RejectSubscriptionRequestOutputBuilder");
formatter.field("id", &self.id);
formatter.field("created_by", &self.created_by);
formatter.field("updated_by", &self.updated_by);
formatter.field("domain_id", &self.domain_id);
formatter.field("status", &self.status);
formatter.field("created_at", &self.created_at);
formatter.field("updated_at", &self.updated_at);
formatter.field("request_reason", &"*** Sensitive Data Redacted ***");
formatter.field("subscribed_principals", &self.subscribed_principals);
formatter.field("subscribed_listings", &self.subscribed_listings);
formatter.field("reviewer_id", &self.reviewer_id);
formatter.field("decision_comment", &"*** Sensitive Data Redacted ***");
formatter.field("existing_subscription_id", &self.existing_subscription_id);
formatter.field("metadata_forms", &self.metadata_forms);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}