#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CheckoutLicenseInput {
pub product_sku: ::std::option::Option<::std::string::String>,
pub checkout_type: ::std::option::Option<crate::types::CheckoutType>,
pub key_fingerprint: ::std::option::Option<::std::string::String>,
pub entitlements: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementData>>,
pub client_token: ::std::option::Option<::std::string::String>,
pub beneficiary: ::std::option::Option<::std::string::String>,
pub node_id: ::std::option::Option<::std::string::String>,
}
impl CheckoutLicenseInput {
pub fn product_sku(&self) -> ::std::option::Option<&str> {
self.product_sku.as_deref()
}
pub fn checkout_type(&self) -> ::std::option::Option<&crate::types::CheckoutType> {
self.checkout_type.as_ref()
}
pub fn key_fingerprint(&self) -> ::std::option::Option<&str> {
self.key_fingerprint.as_deref()
}
pub fn entitlements(&self) -> &[crate::types::EntitlementData] {
self.entitlements.as_deref().unwrap_or_default()
}
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
pub fn beneficiary(&self) -> ::std::option::Option<&str> {
self.beneficiary.as_deref()
}
pub fn node_id(&self) -> ::std::option::Option<&str> {
self.node_id.as_deref()
}
}
impl CheckoutLicenseInput {
pub fn builder() -> crate::operation::checkout_license::builders::CheckoutLicenseInputBuilder {
crate::operation::checkout_license::builders::CheckoutLicenseInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CheckoutLicenseInputBuilder {
pub(crate) product_sku: ::std::option::Option<::std::string::String>,
pub(crate) checkout_type: ::std::option::Option<crate::types::CheckoutType>,
pub(crate) key_fingerprint: ::std::option::Option<::std::string::String>,
pub(crate) entitlements: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementData>>,
pub(crate) client_token: ::std::option::Option<::std::string::String>,
pub(crate) beneficiary: ::std::option::Option<::std::string::String>,
pub(crate) node_id: ::std::option::Option<::std::string::String>,
}
impl CheckoutLicenseInputBuilder {
pub fn product_sku(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.product_sku = ::std::option::Option::Some(input.into());
self
}
pub fn set_product_sku(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.product_sku = input;
self
}
pub fn get_product_sku(&self) -> &::std::option::Option<::std::string::String> {
&self.product_sku
}
pub fn checkout_type(mut self, input: crate::types::CheckoutType) -> Self {
self.checkout_type = ::std::option::Option::Some(input);
self
}
pub fn set_checkout_type(mut self, input: ::std::option::Option<crate::types::CheckoutType>) -> Self {
self.checkout_type = input;
self
}
pub fn get_checkout_type(&self) -> &::std::option::Option<crate::types::CheckoutType> {
&self.checkout_type
}
pub fn key_fingerprint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.key_fingerprint = ::std::option::Option::Some(input.into());
self
}
pub fn set_key_fingerprint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.key_fingerprint = input;
self
}
pub fn get_key_fingerprint(&self) -> &::std::option::Option<::std::string::String> {
&self.key_fingerprint
}
pub fn entitlements(mut self, input: crate::types::EntitlementData) -> Self {
let mut v = self.entitlements.unwrap_or_default();
v.push(input);
self.entitlements = ::std::option::Option::Some(v);
self
}
pub fn set_entitlements(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementData>>) -> Self {
self.entitlements = input;
self
}
pub fn get_entitlements(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EntitlementData>> {
&self.entitlements
}
pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
pub fn beneficiary(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.beneficiary = ::std::option::Option::Some(input.into());
self
}
pub fn set_beneficiary(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.beneficiary = input;
self
}
pub fn get_beneficiary(&self) -> &::std::option::Option<::std::string::String> {
&self.beneficiary
}
pub fn node_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.node_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_node_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.node_id = input;
self
}
pub fn get_node_id(&self) -> &::std::option::Option<::std::string::String> {
&self.node_id
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::checkout_license::CheckoutLicenseInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::checkout_license::CheckoutLicenseInput {
product_sku: self.product_sku,
checkout_type: self.checkout_type,
key_fingerprint: self.key_fingerprint,
entitlements: self.entitlements,
client_token: self.client_token,
beneficiary: self.beneficiary,
node_id: self.node_id,
})
}
}