#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateSubscriptionTargetOutput {
pub id: ::std::string::String,
pub authorized_principals: ::std::vec::Vec<::std::string::String>,
pub domain_id: ::std::string::String,
pub project_id: ::std::string::String,
pub environment_id: ::std::string::String,
pub name: ::std::string::String,
pub r#type: ::std::string::String,
pub created_by: ::std::string::String,
pub updated_by: ::std::option::Option<::std::string::String>,
pub created_at: ::aws_smithy_types::DateTime,
pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub manage_access_role: ::std::string::String,
pub applicable_asset_types: ::std::vec::Vec<::std::string::String>,
pub subscription_target_config: ::std::vec::Vec<crate::types::SubscriptionTargetForm>,
pub provider: ::std::string::String,
_request_id: Option<String>,
}
impl CreateSubscriptionTargetOutput {
pub fn id(&self) -> &str {
use std::ops::Deref;
self.id.deref()
}
pub fn authorized_principals(&self) -> &[::std::string::String] {
use std::ops::Deref;
self.authorized_principals.deref()
}
pub fn domain_id(&self) -> &str {
use std::ops::Deref;
self.domain_id.deref()
}
pub fn project_id(&self) -> &str {
use std::ops::Deref;
self.project_id.deref()
}
pub fn environment_id(&self) -> &str {
use std::ops::Deref;
self.environment_id.deref()
}
pub fn name(&self) -> &str {
use std::ops::Deref;
self.name.deref()
}
pub fn r#type(&self) -> &str {
use std::ops::Deref;
self.r#type.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 created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.updated_at.as_ref()
}
pub fn manage_access_role(&self) -> &str {
use std::ops::Deref;
self.manage_access_role.deref()
}
pub fn applicable_asset_types(&self) -> &[::std::string::String] {
use std::ops::Deref;
self.applicable_asset_types.deref()
}
pub fn subscription_target_config(&self) -> &[crate::types::SubscriptionTargetForm] {
use std::ops::Deref;
self.subscription_target_config.deref()
}
pub fn provider(&self) -> &str {
use std::ops::Deref;
self.provider.deref()
}
}
impl ::std::fmt::Debug for CreateSubscriptionTargetOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateSubscriptionTargetOutput");
formatter.field("id", &self.id);
formatter.field("authorized_principals", &self.authorized_principals);
formatter.field("domain_id", &self.domain_id);
formatter.field("project_id", &self.project_id);
formatter.field("environment_id", &self.environment_id);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("r#type", &self.r#type);
formatter.field("created_by", &self.created_by);
formatter.field("updated_by", &self.updated_by);
formatter.field("created_at", &self.created_at);
formatter.field("updated_at", &self.updated_at);
formatter.field("manage_access_role", &self.manage_access_role);
formatter.field("applicable_asset_types", &self.applicable_asset_types);
formatter.field("subscription_target_config", &self.subscription_target_config);
formatter.field("provider", &self.provider);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for CreateSubscriptionTargetOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateSubscriptionTargetOutput {
pub fn builder() -> crate::operation::create_subscription_target::builders::CreateSubscriptionTargetOutputBuilder {
crate::operation::create_subscription_target::builders::CreateSubscriptionTargetOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct CreateSubscriptionTargetOutputBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) authorized_principals: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) domain_id: ::std::option::Option<::std::string::String>,
pub(crate) project_id: ::std::option::Option<::std::string::String>,
pub(crate) environment_id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::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) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) manage_access_role: ::std::option::Option<::std::string::String>,
pub(crate) applicable_asset_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) subscription_target_config: ::std::option::Option<::std::vec::Vec<crate::types::SubscriptionTargetForm>>,
pub(crate) provider: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateSubscriptionTargetOutputBuilder {
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 authorized_principals(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.authorized_principals.unwrap_or_default();
v.push(input.into());
self.authorized_principals = ::std::option::Option::Some(v);
self
}
pub fn set_authorized_principals(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.authorized_principals = input;
self
}
pub fn get_authorized_principals(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.authorized_principals
}
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 project_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.project_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_project_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.project_id = input;
self
}
pub fn get_project_id(&self) -> &::std::option::Option<::std::string::String> {
&self.project_id
}
pub fn environment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_environment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment_id = input;
self
}
pub fn get_environment_id(&self) -> &::std::option::Option<::std::string::String> {
&self.environment_id
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.r#type = ::std::option::Option::Some(input.into());
self
}
pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.r#type = input;
self
}
pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
&self.r#type
}
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 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 manage_access_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.manage_access_role = ::std::option::Option::Some(input.into());
self
}
pub fn set_manage_access_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.manage_access_role = input;
self
}
pub fn get_manage_access_role(&self) -> &::std::option::Option<::std::string::String> {
&self.manage_access_role
}
pub fn applicable_asset_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.applicable_asset_types.unwrap_or_default();
v.push(input.into());
self.applicable_asset_types = ::std::option::Option::Some(v);
self
}
pub fn set_applicable_asset_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.applicable_asset_types = input;
self
}
pub fn get_applicable_asset_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.applicable_asset_types
}
pub fn subscription_target_config(mut self, input: crate::types::SubscriptionTargetForm) -> Self {
let mut v = self.subscription_target_config.unwrap_or_default();
v.push(input);
self.subscription_target_config = ::std::option::Option::Some(v);
self
}
pub fn set_subscription_target_config(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SubscriptionTargetForm>>) -> Self {
self.subscription_target_config = input;
self
}
pub fn get_subscription_target_config(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SubscriptionTargetForm>> {
&self.subscription_target_config
}
pub fn provider(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.provider = ::std::option::Option::Some(input.into());
self
}
pub fn set_provider(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.provider = input;
self
}
pub fn get_provider(&self) -> &::std::option::Option<::std::string::String> {
&self.provider
}
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::create_subscription_target::CreateSubscriptionTargetOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_subscription_target::CreateSubscriptionTargetOutput {
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 CreateSubscriptionTargetOutput",
)
})?,
authorized_principals: self.authorized_principals.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"authorized_principals",
"authorized_principals was not specified but it is required when building CreateSubscriptionTargetOutput",
)
})?,
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 CreateSubscriptionTargetOutput",
)
})?,
project_id: self.project_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"project_id",
"project_id was not specified but it is required when building CreateSubscriptionTargetOutput",
)
})?,
environment_id: self.environment_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"environment_id",
"environment_id was not specified but it is required when building CreateSubscriptionTargetOutput",
)
})?,
name: self.name.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"name",
"name was not specified but it is required when building CreateSubscriptionTargetOutput",
)
})?,
r#type: self.r#type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"r#type",
"r#type was not specified but it is required when building CreateSubscriptionTargetOutput",
)
})?,
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 CreateSubscriptionTargetOutput",
)
})?,
updated_by: self.updated_by,
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 CreateSubscriptionTargetOutput",
)
})?,
updated_at: self.updated_at,
manage_access_role: self.manage_access_role.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"manage_access_role",
"manage_access_role was not specified but it is required when building CreateSubscriptionTargetOutput",
)
})?,
applicable_asset_types: self.applicable_asset_types.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"applicable_asset_types",
"applicable_asset_types was not specified but it is required when building CreateSubscriptionTargetOutput",
)
})?,
subscription_target_config: self.subscription_target_config.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"subscription_target_config",
"subscription_target_config was not specified but it is required when building CreateSubscriptionTargetOutput",
)
})?,
provider: self.provider.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"provider",
"provider was not specified but it is required when building CreateSubscriptionTargetOutput",
)
})?,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for CreateSubscriptionTargetOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("CreateSubscriptionTargetOutputBuilder");
formatter.field("id", &self.id);
formatter.field("authorized_principals", &self.authorized_principals);
formatter.field("domain_id", &self.domain_id);
formatter.field("project_id", &self.project_id);
formatter.field("environment_id", &self.environment_id);
formatter.field("name", &"*** Sensitive Data Redacted ***");
formatter.field("r#type", &self.r#type);
formatter.field("created_by", &self.created_by);
formatter.field("updated_by", &self.updated_by);
formatter.field("created_at", &self.created_at);
formatter.field("updated_at", &self.updated_at);
formatter.field("manage_access_role", &self.manage_access_role);
formatter.field("applicable_asset_types", &self.applicable_asset_types);
formatter.field("subscription_target_config", &self.subscription_target_config);
formatter.field("provider", &self.provider);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}