aws-sdk-licensemanagerlinuxsubscriptions 0.2.0

AWS SDK for AWS License Manager Linux Subscriptions
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
use std::fmt::Write;

/// See [`GetServiceSettingsInput`](crate::input::GetServiceSettingsInput).
pub mod get_service_settings_input {

    /// A builder for [`GetServiceSettingsInput`](crate::input::GetServiceSettingsInput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {}
    impl Builder {
        /// Consumes the builder and constructs a [`GetServiceSettingsInput`](crate::input::GetServiceSettingsInput).
        pub fn build(
            self,
        ) -> Result<
            crate::input::GetServiceSettingsInput,
            aws_smithy_http::operation::error::BuildError,
        > {
            Ok(crate::input::GetServiceSettingsInput {})
        }
    }
}
impl GetServiceSettingsInput {
    /// Consumes the builder and constructs an Operation<[`GetServiceSettings`](crate::operation::GetServiceSettings)>
    #[allow(unused_mut)]
    #[allow(clippy::let_and_return)]
    #[allow(clippy::needless_borrow)]
    pub async fn make_operation(
        &self,
        _config: &crate::config::Config,
    ) -> std::result::Result<
        aws_smithy_http::operation::Operation<
            crate::operation::GetServiceSettings,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::operation::error::BuildError,
    > {
        let params_result = crate::endpoint::Params::builder()
            .set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
            .set_use_dual_stack(_config.use_dual_stack)
            .set_use_fips(_config.use_fips)
            .set_endpoint(_config.endpoint_url.clone())
            .build()
            .map_err(|err| {
                aws_smithy_http::endpoint::ResolveEndpointError::from_source(
                    "could not construct endpoint parameters",
                    err,
                )
            });
        let (endpoint_result, params) = match params_result {
            Ok(params) => (
                _config.endpoint_resolver.resolve_endpoint(&params),
                Some(params),
            ),
            Err(e) => (Err(e), None),
        };
        let mut request = {
            fn uri_base(
                _input: &crate::input::GetServiceSettingsInput,
                output: &mut String,
            ) -> Result<(), aws_smithy_http::operation::error::BuildError> {
                write!(output, "/subscription/GetServiceSettings")
                    .expect("formatting should succeed");
                Ok(())
            }
            #[allow(clippy::unnecessary_wraps)]
            fn update_http_builder(
                input: &crate::input::GetServiceSettingsInput,
                builder: http::request::Builder,
            ) -> std::result::Result<
                http::request::Builder,
                aws_smithy_http::operation::error::BuildError,
            > {
                let mut uri = String::new();
                uri_base(input, &mut uri)?;
                Ok(builder.method("POST").uri(uri))
            }
            let mut builder = update_http_builder(&self, http::request::Builder::new())?;
            builder
        };
        let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
        #[allow(clippy::useless_conversion)]
        let body = aws_smithy_http::body::SdkBody::from("");
        let request = request.body(body).expect("should be valid request");
        let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
        request.properties_mut().insert(endpoint_result);
        if let Some(params) = params {
            request.properties_mut().insert(params);
        }
        request
            .properties_mut()
            .insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
        let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
            aws_types::os_shim_internal::Env::real(),
            crate::API_METADATA.clone(),
        );
        if let Some(app_name) = _config.app_name() {
            user_agent = user_agent.with_app_name(app_name.clone());
        }
        request.properties_mut().insert(user_agent);
        let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
        request.properties_mut().insert(signing_config);
        request
            .properties_mut()
            .insert(aws_types::SigningService::from_static(
                _config.signing_service(),
            ));
        if let Some(region) = &_config.region {
            request
                .properties_mut()
                .insert(aws_types::region::SigningRegion::from(region.clone()));
        }
        if let Some(region) = &_config.region {
            request.properties_mut().insert(region.clone());
        }
        aws_http::auth::set_credentials_cache(
            &mut request.properties_mut(),
            _config.credentials_cache.clone(),
        );
        let op = aws_smithy_http::operation::Operation::new(
            request,
            crate::operation::GetServiceSettings::new(),
        )
        .with_metadata(aws_smithy_http::operation::Metadata::new(
            "GetServiceSettings",
            "licensemanagerlinuxsubscriptions",
        ));
        let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
        Ok(op)
    }
    /// Creates a new builder-style object to manufacture [`GetServiceSettingsInput`](crate::input::GetServiceSettingsInput).
    pub fn builder() -> crate::input::get_service_settings_input::Builder {
        crate::input::get_service_settings_input::Builder::default()
    }
}

/// See [`ListLinuxSubscriptionInstancesInput`](crate::input::ListLinuxSubscriptionInstancesInput).
pub mod list_linux_subscription_instances_input {

    /// A builder for [`ListLinuxSubscriptionInstancesInput`](crate::input::ListLinuxSubscriptionInstancesInput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
        pub(crate) max_results: std::option::Option<i32>,
        pub(crate) next_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `filters`.
        ///
        /// To override the contents of this collection use [`set_filters`](Self::set_filters).
        ///
        /// <p>An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of <code>AmiID</code> with an optional operator to see subscriptions that match, partially match, or don't match a certain Amazon Machine Image (AMI) ID.</p>
        /// <p>The valid names for this filter are:</p>
        /// <ul>
        /// <li> <p> <code>AmiID</code> </p> </li>
        /// <li> <p> <code>InstanceID</code> </p> </li>
        /// <li> <p> <code>AccountID</code> </p> </li>
        /// <li> <p> <code>Status</code> </p> </li>
        /// <li> <p> <code>Region</code> </p> </li>
        /// <li> <p> <code>UsageOperation</code> </p> </li>
        /// <li> <p> <code>ProductCode</code> </p> </li>
        /// <li> <p> <code>InstanceType</code> </p> </li>
        /// </ul>
        /// <p>The valid Operators for this filter are:</p>
        /// <ul>
        /// <li> <p> <code>contains</code> </p> </li>
        /// <li> <p> <code>equals</code> </p> </li>
        /// <li> <p> <code>Notequal</code> </p> </li>
        /// </ul>
        pub fn filters(mut self, input: crate::model::Filter) -> Self {
            let mut v = self.filters.unwrap_or_default();
            v.push(input);
            self.filters = Some(v);
            self
        }
        /// <p>An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of <code>AmiID</code> with an optional operator to see subscriptions that match, partially match, or don't match a certain Amazon Machine Image (AMI) ID.</p>
        /// <p>The valid names for this filter are:</p>
        /// <ul>
        /// <li> <p> <code>AmiID</code> </p> </li>
        /// <li> <p> <code>InstanceID</code> </p> </li>
        /// <li> <p> <code>AccountID</code> </p> </li>
        /// <li> <p> <code>Status</code> </p> </li>
        /// <li> <p> <code>Region</code> </p> </li>
        /// <li> <p> <code>UsageOperation</code> </p> </li>
        /// <li> <p> <code>ProductCode</code> </p> </li>
        /// <li> <p> <code>InstanceType</code> </p> </li>
        /// </ul>
        /// <p>The valid Operators for this filter are:</p>
        /// <ul>
        /// <li> <p> <code>contains</code> </p> </li>
        /// <li> <p> <code>equals</code> </p> </li>
        /// <li> <p> <code>Notequal</code> </p> </li>
        /// </ul>
        pub fn set_filters(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
        ) -> Self {
            self.filters = input;
            self
        }
        /// <p>Maximum number of results to return in a single call.</p>
        pub fn max_results(mut self, input: i32) -> Self {
            self.max_results = Some(input);
            self
        }
        /// <p>Maximum number of results to return in a single call.</p>
        pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
            self.max_results = input;
            self
        }
        /// <p>Token for the next set of results.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>Token for the next set of results.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// Consumes the builder and constructs a [`ListLinuxSubscriptionInstancesInput`](crate::input::ListLinuxSubscriptionInstancesInput).
        pub fn build(
            self,
        ) -> Result<
            crate::input::ListLinuxSubscriptionInstancesInput,
            aws_smithy_http::operation::error::BuildError,
        > {
            Ok(crate::input::ListLinuxSubscriptionInstancesInput {
                filters: self.filters,
                max_results: self.max_results,
                next_token: self.next_token,
            })
        }
    }
}
impl ListLinuxSubscriptionInstancesInput {
    /// Consumes the builder and constructs an Operation<[`ListLinuxSubscriptionInstances`](crate::operation::ListLinuxSubscriptionInstances)>
    #[allow(unused_mut)]
    #[allow(clippy::let_and_return)]
    #[allow(clippy::needless_borrow)]
    pub async fn make_operation(
        &self,
        _config: &crate::config::Config,
    ) -> std::result::Result<
        aws_smithy_http::operation::Operation<
            crate::operation::ListLinuxSubscriptionInstances,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::operation::error::BuildError,
    > {
        let params_result = crate::endpoint::Params::builder()
            .set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
            .set_use_dual_stack(_config.use_dual_stack)
            .set_use_fips(_config.use_fips)
            .set_endpoint(_config.endpoint_url.clone())
            .build()
            .map_err(|err| {
                aws_smithy_http::endpoint::ResolveEndpointError::from_source(
                    "could not construct endpoint parameters",
                    err,
                )
            });
        let (endpoint_result, params) = match params_result {
            Ok(params) => (
                _config.endpoint_resolver.resolve_endpoint(&params),
                Some(params),
            ),
            Err(e) => (Err(e), None),
        };
        let mut request = {
            fn uri_base(
                _input: &crate::input::ListLinuxSubscriptionInstancesInput,
                output: &mut String,
            ) -> Result<(), aws_smithy_http::operation::error::BuildError> {
                write!(output, "/subscription/ListLinuxSubscriptionInstances")
                    .expect("formatting should succeed");
                Ok(())
            }
            #[allow(clippy::unnecessary_wraps)]
            fn update_http_builder(
                input: &crate::input::ListLinuxSubscriptionInstancesInput,
                builder: http::request::Builder,
            ) -> std::result::Result<
                http::request::Builder,
                aws_smithy_http::operation::error::BuildError,
            > {
                let mut uri = String::new();
                uri_base(input, &mut uri)?;
                Ok(builder.method("POST").uri(uri))
            }
            let mut builder = update_http_builder(&self, http::request::Builder::new())?;
            builder = aws_smithy_http::header::set_request_header_if_absent(
                builder,
                http::header::CONTENT_TYPE,
                "application/json",
            );
            builder
        };
        let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
        #[allow(clippy::useless_conversion)]
        let body = aws_smithy_http::body::SdkBody::from(
            crate::operation_ser::serialize_operation_crate_operation_list_linux_subscription_instances(&self)?
        );
        if let Some(content_length) = body.content_length() {
            request = aws_smithy_http::header::set_request_header_if_absent(
                request,
                http::header::CONTENT_LENGTH,
                content_length,
            );
        }
        let request = request.body(body).expect("should be valid request");
        let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
        request.properties_mut().insert(endpoint_result);
        if let Some(params) = params {
            request.properties_mut().insert(params);
        }
        request
            .properties_mut()
            .insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
        let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
            aws_types::os_shim_internal::Env::real(),
            crate::API_METADATA.clone(),
        );
        if let Some(app_name) = _config.app_name() {
            user_agent = user_agent.with_app_name(app_name.clone());
        }
        request.properties_mut().insert(user_agent);
        let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
        request.properties_mut().insert(signing_config);
        request
            .properties_mut()
            .insert(aws_types::SigningService::from_static(
                _config.signing_service(),
            ));
        if let Some(region) = &_config.region {
            request
                .properties_mut()
                .insert(aws_types::region::SigningRegion::from(region.clone()));
        }
        if let Some(region) = &_config.region {
            request.properties_mut().insert(region.clone());
        }
        aws_http::auth::set_credentials_cache(
            &mut request.properties_mut(),
            _config.credentials_cache.clone(),
        );
        let op = aws_smithy_http::operation::Operation::new(
            request,
            crate::operation::ListLinuxSubscriptionInstances::new(),
        )
        .with_metadata(aws_smithy_http::operation::Metadata::new(
            "ListLinuxSubscriptionInstances",
            "licensemanagerlinuxsubscriptions",
        ));
        let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
        Ok(op)
    }
    /// Creates a new builder-style object to manufacture [`ListLinuxSubscriptionInstancesInput`](crate::input::ListLinuxSubscriptionInstancesInput).
    pub fn builder() -> crate::input::list_linux_subscription_instances_input::Builder {
        crate::input::list_linux_subscription_instances_input::Builder::default()
    }
}

/// See [`ListLinuxSubscriptionsInput`](crate::input::ListLinuxSubscriptionsInput).
pub mod list_linux_subscriptions_input {

    /// A builder for [`ListLinuxSubscriptionsInput`](crate::input::ListLinuxSubscriptionsInput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
        pub(crate) max_results: std::option::Option<i32>,
        pub(crate) next_token: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// Appends an item to `filters`.
        ///
        /// To override the contents of this collection use [`set_filters`](Self::set_filters).
        ///
        /// <p>An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of <code>Subscription</code> with an optional operator to see subscriptions that match, partially match, or don't match a certain subscription's name.</p>
        /// <p>The valid names for this filter are:</p>
        /// <ul>
        /// <li> <p> <code>Subscription</code> </p> </li>
        /// </ul>
        /// <p>The valid Operators for this filter are:</p>
        /// <ul>
        /// <li> <p> <code>contains</code> </p> </li>
        /// <li> <p> <code>equals</code> </p> </li>
        /// <li> <p> <code>Notequal</code> </p> </li>
        /// </ul>
        pub fn filters(mut self, input: crate::model::Filter) -> Self {
            let mut v = self.filters.unwrap_or_default();
            v.push(input);
            self.filters = Some(v);
            self
        }
        /// <p>An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of <code>Subscription</code> with an optional operator to see subscriptions that match, partially match, or don't match a certain subscription's name.</p>
        /// <p>The valid names for this filter are:</p>
        /// <ul>
        /// <li> <p> <code>Subscription</code> </p> </li>
        /// </ul>
        /// <p>The valid Operators for this filter are:</p>
        /// <ul>
        /// <li> <p> <code>contains</code> </p> </li>
        /// <li> <p> <code>equals</code> </p> </li>
        /// <li> <p> <code>Notequal</code> </p> </li>
        /// </ul>
        pub fn set_filters(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
        ) -> Self {
            self.filters = input;
            self
        }
        /// <p>Maximum number of results to return in a single call.</p>
        pub fn max_results(mut self, input: i32) -> Self {
            self.max_results = Some(input);
            self
        }
        /// <p>Maximum number of results to return in a single call.</p>
        pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
            self.max_results = input;
            self
        }
        /// <p>Token for the next set of results.</p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.next_token = Some(input.into());
            self
        }
        /// <p>Token for the next set of results.</p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.next_token = input;
            self
        }
        /// Consumes the builder and constructs a [`ListLinuxSubscriptionsInput`](crate::input::ListLinuxSubscriptionsInput).
        pub fn build(
            self,
        ) -> Result<
            crate::input::ListLinuxSubscriptionsInput,
            aws_smithy_http::operation::error::BuildError,
        > {
            Ok(crate::input::ListLinuxSubscriptionsInput {
                filters: self.filters,
                max_results: self.max_results,
                next_token: self.next_token,
            })
        }
    }
}
impl ListLinuxSubscriptionsInput {
    /// Consumes the builder and constructs an Operation<[`ListLinuxSubscriptions`](crate::operation::ListLinuxSubscriptions)>
    #[allow(unused_mut)]
    #[allow(clippy::let_and_return)]
    #[allow(clippy::needless_borrow)]
    pub async fn make_operation(
        &self,
        _config: &crate::config::Config,
    ) -> std::result::Result<
        aws_smithy_http::operation::Operation<
            crate::operation::ListLinuxSubscriptions,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::operation::error::BuildError,
    > {
        let params_result = crate::endpoint::Params::builder()
            .set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
            .set_use_dual_stack(_config.use_dual_stack)
            .set_use_fips(_config.use_fips)
            .set_endpoint(_config.endpoint_url.clone())
            .build()
            .map_err(|err| {
                aws_smithy_http::endpoint::ResolveEndpointError::from_source(
                    "could not construct endpoint parameters",
                    err,
                )
            });
        let (endpoint_result, params) = match params_result {
            Ok(params) => (
                _config.endpoint_resolver.resolve_endpoint(&params),
                Some(params),
            ),
            Err(e) => (Err(e), None),
        };
        let mut request = {
            fn uri_base(
                _input: &crate::input::ListLinuxSubscriptionsInput,
                output: &mut String,
            ) -> Result<(), aws_smithy_http::operation::error::BuildError> {
                write!(output, "/subscription/ListLinuxSubscriptions")
                    .expect("formatting should succeed");
                Ok(())
            }
            #[allow(clippy::unnecessary_wraps)]
            fn update_http_builder(
                input: &crate::input::ListLinuxSubscriptionsInput,
                builder: http::request::Builder,
            ) -> std::result::Result<
                http::request::Builder,
                aws_smithy_http::operation::error::BuildError,
            > {
                let mut uri = String::new();
                uri_base(input, &mut uri)?;
                Ok(builder.method("POST").uri(uri))
            }
            let mut builder = update_http_builder(&self, http::request::Builder::new())?;
            builder = aws_smithy_http::header::set_request_header_if_absent(
                builder,
                http::header::CONTENT_TYPE,
                "application/json",
            );
            builder
        };
        let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
        #[allow(clippy::useless_conversion)]
        let body = aws_smithy_http::body::SdkBody::from(
            crate::operation_ser::serialize_operation_crate_operation_list_linux_subscriptions(
                &self,
            )?,
        );
        if let Some(content_length) = body.content_length() {
            request = aws_smithy_http::header::set_request_header_if_absent(
                request,
                http::header::CONTENT_LENGTH,
                content_length,
            );
        }
        let request = request.body(body).expect("should be valid request");
        let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
        request.properties_mut().insert(endpoint_result);
        if let Some(params) = params {
            request.properties_mut().insert(params);
        }
        request
            .properties_mut()
            .insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
        let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
            aws_types::os_shim_internal::Env::real(),
            crate::API_METADATA.clone(),
        );
        if let Some(app_name) = _config.app_name() {
            user_agent = user_agent.with_app_name(app_name.clone());
        }
        request.properties_mut().insert(user_agent);
        let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
        request.properties_mut().insert(signing_config);
        request
            .properties_mut()
            .insert(aws_types::SigningService::from_static(
                _config.signing_service(),
            ));
        if let Some(region) = &_config.region {
            request
                .properties_mut()
                .insert(aws_types::region::SigningRegion::from(region.clone()));
        }
        if let Some(region) = &_config.region {
            request.properties_mut().insert(region.clone());
        }
        aws_http::auth::set_credentials_cache(
            &mut request.properties_mut(),
            _config.credentials_cache.clone(),
        );
        let op = aws_smithy_http::operation::Operation::new(
            request,
            crate::operation::ListLinuxSubscriptions::new(),
        )
        .with_metadata(aws_smithy_http::operation::Metadata::new(
            "ListLinuxSubscriptions",
            "licensemanagerlinuxsubscriptions",
        ));
        let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
        Ok(op)
    }
    /// Creates a new builder-style object to manufacture [`ListLinuxSubscriptionsInput`](crate::input::ListLinuxSubscriptionsInput).
    pub fn builder() -> crate::input::list_linux_subscriptions_input::Builder {
        crate::input::list_linux_subscriptions_input::Builder::default()
    }
}

/// See [`UpdateServiceSettingsInput`](crate::input::UpdateServiceSettingsInput).
pub mod update_service_settings_input {

    /// A builder for [`UpdateServiceSettingsInput`](crate::input::UpdateServiceSettingsInput).
    #[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) linux_subscriptions_discovery:
            std::option::Option<crate::model::LinuxSubscriptionsDiscovery>,
        pub(crate) linux_subscriptions_discovery_settings:
            std::option::Option<crate::model::LinuxSubscriptionsDiscoverySettings>,
        pub(crate) allow_update: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>Describes if the discovery of Linux subscriptions is enabled.</p>
        pub fn linux_subscriptions_discovery(
            mut self,
            input: crate::model::LinuxSubscriptionsDiscovery,
        ) -> Self {
            self.linux_subscriptions_discovery = Some(input);
            self
        }
        /// <p>Describes if the discovery of Linux subscriptions is enabled.</p>
        pub fn set_linux_subscriptions_discovery(
            mut self,
            input: std::option::Option<crate::model::LinuxSubscriptionsDiscovery>,
        ) -> Self {
            self.linux_subscriptions_discovery = input;
            self
        }
        /// <p>The settings defined for Linux subscriptions discovery. The settings include if Organizations integration has been enabled, and which Regions data will be aggregated from.</p>
        pub fn linux_subscriptions_discovery_settings(
            mut self,
            input: crate::model::LinuxSubscriptionsDiscoverySettings,
        ) -> Self {
            self.linux_subscriptions_discovery_settings = Some(input);
            self
        }
        /// <p>The settings defined for Linux subscriptions discovery. The settings include if Organizations integration has been enabled, and which Regions data will be aggregated from.</p>
        pub fn set_linux_subscriptions_discovery_settings(
            mut self,
            input: std::option::Option<crate::model::LinuxSubscriptionsDiscoverySettings>,
        ) -> Self {
            self.linux_subscriptions_discovery_settings = input;
            self
        }
        /// <p>Describes if updates are allowed to the service settings for Linux subscriptions. If you allow updates, you can aggregate Linux subscription data in more than one home Region.</p>
        pub fn allow_update(mut self, input: bool) -> Self {
            self.allow_update = Some(input);
            self
        }
        /// <p>Describes if updates are allowed to the service settings for Linux subscriptions. If you allow updates, you can aggregate Linux subscription data in more than one home Region.</p>
        pub fn set_allow_update(mut self, input: std::option::Option<bool>) -> Self {
            self.allow_update = input;
            self
        }
        /// Consumes the builder and constructs a [`UpdateServiceSettingsInput`](crate::input::UpdateServiceSettingsInput).
        pub fn build(
            self,
        ) -> Result<
            crate::input::UpdateServiceSettingsInput,
            aws_smithy_http::operation::error::BuildError,
        > {
            Ok(crate::input::UpdateServiceSettingsInput {
                linux_subscriptions_discovery: self.linux_subscriptions_discovery,
                linux_subscriptions_discovery_settings: self.linux_subscriptions_discovery_settings,
                allow_update: self.allow_update,
            })
        }
    }
}
impl UpdateServiceSettingsInput {
    /// Consumes the builder and constructs an Operation<[`UpdateServiceSettings`](crate::operation::UpdateServiceSettings)>
    #[allow(unused_mut)]
    #[allow(clippy::let_and_return)]
    #[allow(clippy::needless_borrow)]
    pub async fn make_operation(
        &self,
        _config: &crate::config::Config,
    ) -> std::result::Result<
        aws_smithy_http::operation::Operation<
            crate::operation::UpdateServiceSettings,
            aws_http::retry::AwsResponseRetryClassifier,
        >,
        aws_smithy_http::operation::error::BuildError,
    > {
        let params_result = crate::endpoint::Params::builder()
            .set_region(_config.region.as_ref().map(|r| r.as_ref().to_owned()))
            .set_use_dual_stack(_config.use_dual_stack)
            .set_use_fips(_config.use_fips)
            .set_endpoint(_config.endpoint_url.clone())
            .build()
            .map_err(|err| {
                aws_smithy_http::endpoint::ResolveEndpointError::from_source(
                    "could not construct endpoint parameters",
                    err,
                )
            });
        let (endpoint_result, params) = match params_result {
            Ok(params) => (
                _config.endpoint_resolver.resolve_endpoint(&params),
                Some(params),
            ),
            Err(e) => (Err(e), None),
        };
        let mut request = {
            fn uri_base(
                _input: &crate::input::UpdateServiceSettingsInput,
                output: &mut String,
            ) -> Result<(), aws_smithy_http::operation::error::BuildError> {
                write!(output, "/subscription/UpdateServiceSettings")
                    .expect("formatting should succeed");
                Ok(())
            }
            #[allow(clippy::unnecessary_wraps)]
            fn update_http_builder(
                input: &crate::input::UpdateServiceSettingsInput,
                builder: http::request::Builder,
            ) -> std::result::Result<
                http::request::Builder,
                aws_smithy_http::operation::error::BuildError,
            > {
                let mut uri = String::new();
                uri_base(input, &mut uri)?;
                Ok(builder.method("POST").uri(uri))
            }
            let mut builder = update_http_builder(&self, http::request::Builder::new())?;
            builder = aws_smithy_http::header::set_request_header_if_absent(
                builder,
                http::header::CONTENT_TYPE,
                "application/json",
            );
            builder
        };
        let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
        #[allow(clippy::useless_conversion)]
        let body = aws_smithy_http::body::SdkBody::from(
            crate::operation_ser::serialize_operation_crate_operation_update_service_settings(
                &self,
            )?,
        );
        if let Some(content_length) = body.content_length() {
            request = aws_smithy_http::header::set_request_header_if_absent(
                request,
                http::header::CONTENT_LENGTH,
                content_length,
            );
        }
        let request = request.body(body).expect("should be valid request");
        let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
        request.properties_mut().insert(endpoint_result);
        if let Some(params) = params {
            request.properties_mut().insert(params);
        }
        request
            .properties_mut()
            .insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
        let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
            aws_types::os_shim_internal::Env::real(),
            crate::API_METADATA.clone(),
        );
        if let Some(app_name) = _config.app_name() {
            user_agent = user_agent.with_app_name(app_name.clone());
        }
        request.properties_mut().insert(user_agent);
        let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
        request.properties_mut().insert(signing_config);
        request
            .properties_mut()
            .insert(aws_types::SigningService::from_static(
                _config.signing_service(),
            ));
        if let Some(region) = &_config.region {
            request
                .properties_mut()
                .insert(aws_types::region::SigningRegion::from(region.clone()));
        }
        if let Some(region) = &_config.region {
            request.properties_mut().insert(region.clone());
        }
        aws_http::auth::set_credentials_cache(
            &mut request.properties_mut(),
            _config.credentials_cache.clone(),
        );
        let op = aws_smithy_http::operation::Operation::new(
            request,
            crate::operation::UpdateServiceSettings::new(),
        )
        .with_metadata(aws_smithy_http::operation::Metadata::new(
            "UpdateServiceSettings",
            "licensemanagerlinuxsubscriptions",
        ));
        let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
        Ok(op)
    }
    /// Creates a new builder-style object to manufacture [`UpdateServiceSettingsInput`](crate::input::UpdateServiceSettingsInput).
    pub fn builder() -> crate::input::update_service_settings_input::Builder {
        crate::input::update_service_settings_input::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UpdateServiceSettingsInput {
    /// <p>Describes if the discovery of Linux subscriptions is enabled.</p>
    #[doc(hidden)]
    pub linux_subscriptions_discovery:
        std::option::Option<crate::model::LinuxSubscriptionsDiscovery>,
    /// <p>The settings defined for Linux subscriptions discovery. The settings include if Organizations integration has been enabled, and which Regions data will be aggregated from.</p>
    #[doc(hidden)]
    pub linux_subscriptions_discovery_settings:
        std::option::Option<crate::model::LinuxSubscriptionsDiscoverySettings>,
    /// <p>Describes if updates are allowed to the service settings for Linux subscriptions. If you allow updates, you can aggregate Linux subscription data in more than one home Region.</p>
    #[doc(hidden)]
    pub allow_update: std::option::Option<bool>,
}
impl UpdateServiceSettingsInput {
    /// <p>Describes if the discovery of Linux subscriptions is enabled.</p>
    pub fn linux_subscriptions_discovery(
        &self,
    ) -> std::option::Option<&crate::model::LinuxSubscriptionsDiscovery> {
        self.linux_subscriptions_discovery.as_ref()
    }
    /// <p>The settings defined for Linux subscriptions discovery. The settings include if Organizations integration has been enabled, and which Regions data will be aggregated from.</p>
    pub fn linux_subscriptions_discovery_settings(
        &self,
    ) -> std::option::Option<&crate::model::LinuxSubscriptionsDiscoverySettings> {
        self.linux_subscriptions_discovery_settings.as_ref()
    }
    /// <p>Describes if updates are allowed to the service settings for Linux subscriptions. If you allow updates, you can aggregate Linux subscription data in more than one home Region.</p>
    pub fn allow_update(&self) -> std::option::Option<bool> {
        self.allow_update
    }
}

/// NextToken length limit is half of ddb accepted limit. Increase this limit if parameters in request increases.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListLinuxSubscriptionsInput {
    /// <p>An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of <code>Subscription</code> with an optional operator to see subscriptions that match, partially match, or don't match a certain subscription's name.</p>
    /// <p>The valid names for this filter are:</p>
    /// <ul>
    /// <li> <p> <code>Subscription</code> </p> </li>
    /// </ul>
    /// <p>The valid Operators for this filter are:</p>
    /// <ul>
    /// <li> <p> <code>contains</code> </p> </li>
    /// <li> <p> <code>equals</code> </p> </li>
    /// <li> <p> <code>Notequal</code> </p> </li>
    /// </ul>
    #[doc(hidden)]
    pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
    /// <p>Maximum number of results to return in a single call.</p>
    #[doc(hidden)]
    pub max_results: std::option::Option<i32>,
    /// <p>Token for the next set of results.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
}
impl ListLinuxSubscriptionsInput {
    /// <p>An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of <code>Subscription</code> with an optional operator to see subscriptions that match, partially match, or don't match a certain subscription's name.</p>
    /// <p>The valid names for this filter are:</p>
    /// <ul>
    /// <li> <p> <code>Subscription</code> </p> </li>
    /// </ul>
    /// <p>The valid Operators for this filter are:</p>
    /// <ul>
    /// <li> <p> <code>contains</code> </p> </li>
    /// <li> <p> <code>equals</code> </p> </li>
    /// <li> <p> <code>Notequal</code> </p> </li>
    /// </ul>
    pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
        self.filters.as_deref()
    }
    /// <p>Maximum number of results to return in a single call.</p>
    pub fn max_results(&self) -> std::option::Option<i32> {
        self.max_results
    }
    /// <p>Token for the next set of results.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}

/// NextToken length limit is half of ddb accepted limit. Increase this limit if parameters in request increases.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ListLinuxSubscriptionInstancesInput {
    /// <p>An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of <code>AmiID</code> with an optional operator to see subscriptions that match, partially match, or don't match a certain Amazon Machine Image (AMI) ID.</p>
    /// <p>The valid names for this filter are:</p>
    /// <ul>
    /// <li> <p> <code>AmiID</code> </p> </li>
    /// <li> <p> <code>InstanceID</code> </p> </li>
    /// <li> <p> <code>AccountID</code> </p> </li>
    /// <li> <p> <code>Status</code> </p> </li>
    /// <li> <p> <code>Region</code> </p> </li>
    /// <li> <p> <code>UsageOperation</code> </p> </li>
    /// <li> <p> <code>ProductCode</code> </p> </li>
    /// <li> <p> <code>InstanceType</code> </p> </li>
    /// </ul>
    /// <p>The valid Operators for this filter are:</p>
    /// <ul>
    /// <li> <p> <code>contains</code> </p> </li>
    /// <li> <p> <code>equals</code> </p> </li>
    /// <li> <p> <code>Notequal</code> </p> </li>
    /// </ul>
    #[doc(hidden)]
    pub filters: std::option::Option<std::vec::Vec<crate::model::Filter>>,
    /// <p>Maximum number of results to return in a single call.</p>
    #[doc(hidden)]
    pub max_results: std::option::Option<i32>,
    /// <p>Token for the next set of results.</p>
    #[doc(hidden)]
    pub next_token: std::option::Option<std::string::String>,
}
impl ListLinuxSubscriptionInstancesInput {
    /// <p>An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify. For example, you can filter by the name of <code>AmiID</code> with an optional operator to see subscriptions that match, partially match, or don't match a certain Amazon Machine Image (AMI) ID.</p>
    /// <p>The valid names for this filter are:</p>
    /// <ul>
    /// <li> <p> <code>AmiID</code> </p> </li>
    /// <li> <p> <code>InstanceID</code> </p> </li>
    /// <li> <p> <code>AccountID</code> </p> </li>
    /// <li> <p> <code>Status</code> </p> </li>
    /// <li> <p> <code>Region</code> </p> </li>
    /// <li> <p> <code>UsageOperation</code> </p> </li>
    /// <li> <p> <code>ProductCode</code> </p> </li>
    /// <li> <p> <code>InstanceType</code> </p> </li>
    /// </ul>
    /// <p>The valid Operators for this filter are:</p>
    /// <ul>
    /// <li> <p> <code>contains</code> </p> </li>
    /// <li> <p> <code>equals</code> </p> </li>
    /// <li> <p> <code>Notequal</code> </p> </li>
    /// </ul>
    pub fn filters(&self) -> std::option::Option<&[crate::model::Filter]> {
        self.filters.as_deref()
    }
    /// <p>Maximum number of results to return in a single call.</p>
    pub fn max_results(&self) -> std::option::Option<i32> {
        self.max_results
    }
    /// <p>Token for the next set of results.</p>
    pub fn next_token(&self) -> std::option::Option<&str> {
        self.next_token.as_deref()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GetServiceSettingsInput {}