aws-sdk-licensemanager 1.95.0

AWS SDK for AWS License Manager
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateLicenseConfigurationInput {
    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
    pub license_configuration_arn: ::std::option::Option<::std::string::String>,
    /// <p>New status of the license configuration.</p>
    pub license_configuration_status: ::std::option::Option<crate::types::LicenseConfigurationStatus>,
    /// <p>New license rule. The only rule that you can add after you create a license configuration is licenseAffinityToHost.</p>
    pub license_rules: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>New number of licenses managed by the license configuration.</p>
    pub license_count: ::std::option::Option<i64>,
    /// <p>New hard limit of the number of available licenses.</p>
    pub license_count_hard_limit: ::std::option::Option<bool>,
    /// <p>New name of the license configuration.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>New description of the license configuration.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>New product information.</p>
    pub product_information_list: ::std::option::Option<::std::vec::Vec<crate::types::ProductInformation>>,
    /// <p>When true, disassociates a resource when software is uninstalled.</p>
    pub disassociate_when_not_found: ::std::option::Option<bool>,
    /// <p>License configuration expiry time.</p>
    pub license_expiry: ::std::option::Option<i64>,
}
impl UpdateLicenseConfigurationInput {
    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
    pub fn license_configuration_arn(&self) -> ::std::option::Option<&str> {
        self.license_configuration_arn.as_deref()
    }
    /// <p>New status of the license configuration.</p>
    pub fn license_configuration_status(&self) -> ::std::option::Option<&crate::types::LicenseConfigurationStatus> {
        self.license_configuration_status.as_ref()
    }
    /// <p>New license rule. The only rule that you can add after you create a license configuration is licenseAffinityToHost.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.license_rules.is_none()`.
    pub fn license_rules(&self) -> &[::std::string::String] {
        self.license_rules.as_deref().unwrap_or_default()
    }
    /// <p>New number of licenses managed by the license configuration.</p>
    pub fn license_count(&self) -> ::std::option::Option<i64> {
        self.license_count
    }
    /// <p>New hard limit of the number of available licenses.</p>
    pub fn license_count_hard_limit(&self) -> ::std::option::Option<bool> {
        self.license_count_hard_limit
    }
    /// <p>New name of the license configuration.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>New description of the license configuration.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>New product information.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.product_information_list.is_none()`.
    pub fn product_information_list(&self) -> &[crate::types::ProductInformation] {
        self.product_information_list.as_deref().unwrap_or_default()
    }
    /// <p>When true, disassociates a resource when software is uninstalled.</p>
    pub fn disassociate_when_not_found(&self) -> ::std::option::Option<bool> {
        self.disassociate_when_not_found
    }
    /// <p>License configuration expiry time.</p>
    pub fn license_expiry(&self) -> ::std::option::Option<i64> {
        self.license_expiry
    }
}
impl UpdateLicenseConfigurationInput {
    /// Creates a new builder-style object to manufacture [`UpdateLicenseConfigurationInput`](crate::operation::update_license_configuration::UpdateLicenseConfigurationInput).
    pub fn builder() -> crate::operation::update_license_configuration::builders::UpdateLicenseConfigurationInputBuilder {
        crate::operation::update_license_configuration::builders::UpdateLicenseConfigurationInputBuilder::default()
    }
}

/// A builder for [`UpdateLicenseConfigurationInput`](crate::operation::update_license_configuration::UpdateLicenseConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateLicenseConfigurationInputBuilder {
    pub(crate) license_configuration_arn: ::std::option::Option<::std::string::String>,
    pub(crate) license_configuration_status: ::std::option::Option<crate::types::LicenseConfigurationStatus>,
    pub(crate) license_rules: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) license_count: ::std::option::Option<i64>,
    pub(crate) license_count_hard_limit: ::std::option::Option<bool>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) product_information_list: ::std::option::Option<::std::vec::Vec<crate::types::ProductInformation>>,
    pub(crate) disassociate_when_not_found: ::std::option::Option<bool>,
    pub(crate) license_expiry: ::std::option::Option<i64>,
}
impl UpdateLicenseConfigurationInputBuilder {
    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
    /// This field is required.
    pub fn license_configuration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.license_configuration_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
    pub fn set_license_configuration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.license_configuration_arn = input;
        self
    }
    /// <p>Amazon Resource Name (ARN) of the license configuration.</p>
    pub fn get_license_configuration_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.license_configuration_arn
    }
    /// <p>New status of the license configuration.</p>
    pub fn license_configuration_status(mut self, input: crate::types::LicenseConfigurationStatus) -> Self {
        self.license_configuration_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>New status of the license configuration.</p>
    pub fn set_license_configuration_status(mut self, input: ::std::option::Option<crate::types::LicenseConfigurationStatus>) -> Self {
        self.license_configuration_status = input;
        self
    }
    /// <p>New status of the license configuration.</p>
    pub fn get_license_configuration_status(&self) -> &::std::option::Option<crate::types::LicenseConfigurationStatus> {
        &self.license_configuration_status
    }
    /// Appends an item to `license_rules`.
    ///
    /// To override the contents of this collection use [`set_license_rules`](Self::set_license_rules).
    ///
    /// <p>New license rule. The only rule that you can add after you create a license configuration is licenseAffinityToHost.</p>
    pub fn license_rules(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.license_rules.unwrap_or_default();
        v.push(input.into());
        self.license_rules = ::std::option::Option::Some(v);
        self
    }
    /// <p>New license rule. The only rule that you can add after you create a license configuration is licenseAffinityToHost.</p>
    pub fn set_license_rules(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.license_rules = input;
        self
    }
    /// <p>New license rule. The only rule that you can add after you create a license configuration is licenseAffinityToHost.</p>
    pub fn get_license_rules(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.license_rules
    }
    /// <p>New number of licenses managed by the license configuration.</p>
    pub fn license_count(mut self, input: i64) -> Self {
        self.license_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>New number of licenses managed by the license configuration.</p>
    pub fn set_license_count(mut self, input: ::std::option::Option<i64>) -> Self {
        self.license_count = input;
        self
    }
    /// <p>New number of licenses managed by the license configuration.</p>
    pub fn get_license_count(&self) -> &::std::option::Option<i64> {
        &self.license_count
    }
    /// <p>New hard limit of the number of available licenses.</p>
    pub fn license_count_hard_limit(mut self, input: bool) -> Self {
        self.license_count_hard_limit = ::std::option::Option::Some(input);
        self
    }
    /// <p>New hard limit of the number of available licenses.</p>
    pub fn set_license_count_hard_limit(mut self, input: ::std::option::Option<bool>) -> Self {
        self.license_count_hard_limit = input;
        self
    }
    /// <p>New hard limit of the number of available licenses.</p>
    pub fn get_license_count_hard_limit(&self) -> &::std::option::Option<bool> {
        &self.license_count_hard_limit
    }
    /// <p>New name of the license configuration.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>New name of the license configuration.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>New name of the license configuration.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>New description of the license configuration.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>New description of the license configuration.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>New description of the license configuration.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Appends an item to `product_information_list`.
    ///
    /// To override the contents of this collection use [`set_product_information_list`](Self::set_product_information_list).
    ///
    /// <p>New product information.</p>
    pub fn product_information_list(mut self, input: crate::types::ProductInformation) -> Self {
        let mut v = self.product_information_list.unwrap_or_default();
        v.push(input);
        self.product_information_list = ::std::option::Option::Some(v);
        self
    }
    /// <p>New product information.</p>
    pub fn set_product_information_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ProductInformation>>) -> Self {
        self.product_information_list = input;
        self
    }
    /// <p>New product information.</p>
    pub fn get_product_information_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ProductInformation>> {
        &self.product_information_list
    }
    /// <p>When true, disassociates a resource when software is uninstalled.</p>
    pub fn disassociate_when_not_found(mut self, input: bool) -> Self {
        self.disassociate_when_not_found = ::std::option::Option::Some(input);
        self
    }
    /// <p>When true, disassociates a resource when software is uninstalled.</p>
    pub fn set_disassociate_when_not_found(mut self, input: ::std::option::Option<bool>) -> Self {
        self.disassociate_when_not_found = input;
        self
    }
    /// <p>When true, disassociates a resource when software is uninstalled.</p>
    pub fn get_disassociate_when_not_found(&self) -> &::std::option::Option<bool> {
        &self.disassociate_when_not_found
    }
    /// <p>License configuration expiry time.</p>
    pub fn license_expiry(mut self, input: i64) -> Self {
        self.license_expiry = ::std::option::Option::Some(input);
        self
    }
    /// <p>License configuration expiry time.</p>
    pub fn set_license_expiry(mut self, input: ::std::option::Option<i64>) -> Self {
        self.license_expiry = input;
        self
    }
    /// <p>License configuration expiry time.</p>
    pub fn get_license_expiry(&self) -> &::std::option::Option<i64> {
        &self.license_expiry
    }
    /// Consumes the builder and constructs a [`UpdateLicenseConfigurationInput`](crate::operation::update_license_configuration::UpdateLicenseConfigurationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_license_configuration::UpdateLicenseConfigurationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_license_configuration::UpdateLicenseConfigurationInput {
            license_configuration_arn: self.license_configuration_arn,
            license_configuration_status: self.license_configuration_status,
            license_rules: self.license_rules,
            license_count: self.license_count,
            license_count_hard_limit: self.license_count_hard_limit,
            name: self.name,
            description: self.description,
            product_information_list: self.product_information_list,
            disassociate_when_not_found: self.disassociate_when_not_found,
            license_expiry: self.license_expiry,
        })
    }
}