#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CheckoutLicenseOutput {
pub checkout_type: ::std::option::Option<crate::types::CheckoutType>,
pub license_consumption_token: ::std::option::Option<::std::string::String>,
pub entitlements_allowed: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementData>>,
pub signed_token: ::std::option::Option<::std::string::String>,
pub node_id: ::std::option::Option<::std::string::String>,
pub issued_at: ::std::option::Option<::std::string::String>,
pub expiration: ::std::option::Option<::std::string::String>,
pub license_arn: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CheckoutLicenseOutput {
pub fn checkout_type(&self) -> ::std::option::Option<&crate::types::CheckoutType> {
self.checkout_type.as_ref()
}
pub fn license_consumption_token(&self) -> ::std::option::Option<&str> {
self.license_consumption_token.as_deref()
}
pub fn entitlements_allowed(&self) -> ::std::option::Option<&[crate::types::EntitlementData]> {
self.entitlements_allowed.as_deref()
}
pub fn signed_token(&self) -> ::std::option::Option<&str> {
self.signed_token.as_deref()
}
pub fn node_id(&self) -> ::std::option::Option<&str> {
self.node_id.as_deref()
}
pub fn issued_at(&self) -> ::std::option::Option<&str> {
self.issued_at.as_deref()
}
pub fn expiration(&self) -> ::std::option::Option<&str> {
self.expiration.as_deref()
}
pub fn license_arn(&self) -> ::std::option::Option<&str> {
self.license_arn.as_deref()
}
}
impl ::aws_http::request_id::RequestId for CheckoutLicenseOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CheckoutLicenseOutput {
pub fn builder() -> crate::operation::checkout_license::builders::CheckoutLicenseOutputBuilder {
crate::operation::checkout_license::builders::CheckoutLicenseOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CheckoutLicenseOutputBuilder {
pub(crate) checkout_type: ::std::option::Option<crate::types::CheckoutType>,
pub(crate) license_consumption_token: ::std::option::Option<::std::string::String>,
pub(crate) entitlements_allowed: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementData>>,
pub(crate) signed_token: ::std::option::Option<::std::string::String>,
pub(crate) node_id: ::std::option::Option<::std::string::String>,
pub(crate) issued_at: ::std::option::Option<::std::string::String>,
pub(crate) expiration: ::std::option::Option<::std::string::String>,
pub(crate) license_arn: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CheckoutLicenseOutputBuilder {
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 license_consumption_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.license_consumption_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_license_consumption_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.license_consumption_token = input;
self
}
pub fn get_license_consumption_token(&self) -> &::std::option::Option<::std::string::String> {
&self.license_consumption_token
}
pub fn entitlements_allowed(mut self, input: crate::types::EntitlementData) -> Self {
let mut v = self.entitlements_allowed.unwrap_or_default();
v.push(input);
self.entitlements_allowed = ::std::option::Option::Some(v);
self
}
pub fn set_entitlements_allowed(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EntitlementData>>) -> Self {
self.entitlements_allowed = input;
self
}
pub fn get_entitlements_allowed(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EntitlementData>> {
&self.entitlements_allowed
}
pub fn signed_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.signed_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_signed_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.signed_token = input;
self
}
pub fn get_signed_token(&self) -> &::std::option::Option<::std::string::String> {
&self.signed_token
}
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 issued_at(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.issued_at = ::std::option::Option::Some(input.into());
self
}
pub fn set_issued_at(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.issued_at = input;
self
}
pub fn get_issued_at(&self) -> &::std::option::Option<::std::string::String> {
&self.issued_at
}
pub fn expiration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.expiration = ::std::option::Option::Some(input.into());
self
}
pub fn set_expiration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.expiration = input;
self
}
pub fn get_expiration(&self) -> &::std::option::Option<::std::string::String> {
&self.expiration
}
pub fn license_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.license_arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_license_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.license_arn = input;
self
}
pub fn get_license_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.license_arn
}
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::checkout_license::CheckoutLicenseOutput {
crate::operation::checkout_license::CheckoutLicenseOutput {
checkout_type: self.checkout_type,
license_consumption_token: self.license_consumption_token,
entitlements_allowed: self.entitlements_allowed,
signed_token: self.signed_token,
node_id: self.node_id,
issued_at: self.issued_at,
expiration: self.expiration,
license_arn: self.license_arn,
_request_id: self._request_id,
}
}
}