#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Entitlement {
pub data_transfer_subscriber_fee_percent: ::std::option::Option<i32>,
pub description: ::std::option::Option<::std::string::String>,
pub encryption: ::std::option::Option<crate::types::Encryption>,
pub entitlement_arn: ::std::option::Option<::std::string::String>,
pub entitlement_status: ::std::option::Option<crate::types::EntitlementStatus>,
pub name: ::std::option::Option<::std::string::String>,
pub subscribers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Entitlement {
pub fn data_transfer_subscriber_fee_percent(&self) -> ::std::option::Option<i32> {
self.data_transfer_subscriber_fee_percent
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
pub fn encryption(&self) -> ::std::option::Option<&crate::types::Encryption> {
self.encryption.as_ref()
}
pub fn entitlement_arn(&self) -> ::std::option::Option<&str> {
self.entitlement_arn.as_deref()
}
pub fn entitlement_status(&self) -> ::std::option::Option<&crate::types::EntitlementStatus> {
self.entitlement_status.as_ref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn subscribers(&self) -> &[::std::string::String] {
self.subscribers.as_deref().unwrap_or_default()
}
}
impl Entitlement {
pub fn builder() -> crate::types::builders::EntitlementBuilder {
crate::types::builders::EntitlementBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct EntitlementBuilder {
pub(crate) data_transfer_subscriber_fee_percent: ::std::option::Option<i32>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) encryption: ::std::option::Option<crate::types::Encryption>,
pub(crate) entitlement_arn: ::std::option::Option<::std::string::String>,
pub(crate) entitlement_status: ::std::option::Option<crate::types::EntitlementStatus>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) subscribers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl EntitlementBuilder {
pub fn data_transfer_subscriber_fee_percent(mut self, input: i32) -> Self {
self.data_transfer_subscriber_fee_percent = ::std::option::Option::Some(input);
self
}
pub fn set_data_transfer_subscriber_fee_percent(mut self, input: ::std::option::Option<i32>) -> Self {
self.data_transfer_subscriber_fee_percent = input;
self
}
pub fn get_data_transfer_subscriber_fee_percent(&self) -> &::std::option::Option<i32> {
&self.data_transfer_subscriber_fee_percent
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn encryption(mut self, input: crate::types::Encryption) -> Self {
self.encryption = ::std::option::Option::Some(input);
self
}
pub fn set_encryption(mut self, input: ::std::option::Option<crate::types::Encryption>) -> Self {
self.encryption = input;
self
}
pub fn get_encryption(&self) -> &::std::option::Option<crate::types::Encryption> {
&self.encryption
}
pub fn entitlement_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.entitlement_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_entitlement_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.entitlement_arn = input;
self
}
pub fn get_entitlement_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.entitlement_arn
}
pub fn entitlement_status(mut self, input: crate::types::EntitlementStatus) -> Self {
self.entitlement_status = ::std::option::Option::Some(input);
self
}
pub fn set_entitlement_status(mut self, input: ::std::option::Option<crate::types::EntitlementStatus>) -> Self {
self.entitlement_status = input;
self
}
pub fn get_entitlement_status(&self) -> &::std::option::Option<crate::types::EntitlementStatus> {
&self.entitlement_status
}
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 subscribers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.subscribers.unwrap_or_default();
v.push(input.into());
self.subscribers = ::std::option::Option::Some(v);
self
}
pub fn set_subscribers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.subscribers = input;
self
}
pub fn get_subscribers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.subscribers
}
pub fn build(self) -> crate::types::Entitlement {
crate::types::Entitlement {
data_transfer_subscriber_fee_percent: self.data_transfer_subscriber_fee_percent,
description: self.description,
encryption: self.encryption,
entitlement_arn: self.entitlement_arn,
entitlement_status: self.entitlement_status,
name: self.name,
subscribers: self.subscribers,
}
}
}