aws-sdk-applicationinsights 1.103.0

AWS SDK for Amazon CloudWatch Application Insights
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 UpdateComponentConfigurationInput {
    /// <p>The name of the resource group.</p>
    pub resource_group_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the component.</p>
    pub component_name: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether the application component is monitored.</p>
    pub monitor: ::std::option::Option<bool>,
    /// <p>The tier of the application component.</p>
    pub tier: ::std::option::Option<crate::types::Tier>,
    /// <p>The configuration settings of the component. The value is the escaped JSON of the configuration. For more information about the JSON format, see <a href="https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/working-with-json.html">Working with JSON</a>. You can send a request to <code>DescribeComponentConfigurationRecommendation</code> to see the recommended configuration for a component. For the complete format of the component configuration file, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/component-config.html">Component Configuration</a>.</p>
    pub component_configuration: ::std::option::Option<::std::string::String>,
    /// <p>Automatically configures the component by applying the recommended configurations.</p>
    pub auto_config_enabled: ::std::option::Option<bool>,
}
impl UpdateComponentConfigurationInput {
    /// <p>The name of the resource group.</p>
    pub fn resource_group_name(&self) -> ::std::option::Option<&str> {
        self.resource_group_name.as_deref()
    }
    /// <p>The name of the component.</p>
    pub fn component_name(&self) -> ::std::option::Option<&str> {
        self.component_name.as_deref()
    }
    /// <p>Indicates whether the application component is monitored.</p>
    pub fn monitor(&self) -> ::std::option::Option<bool> {
        self.monitor
    }
    /// <p>The tier of the application component.</p>
    pub fn tier(&self) -> ::std::option::Option<&crate::types::Tier> {
        self.tier.as_ref()
    }
    /// <p>The configuration settings of the component. The value is the escaped JSON of the configuration. For more information about the JSON format, see <a href="https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/working-with-json.html">Working with JSON</a>. You can send a request to <code>DescribeComponentConfigurationRecommendation</code> to see the recommended configuration for a component. For the complete format of the component configuration file, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/component-config.html">Component Configuration</a>.</p>
    pub fn component_configuration(&self) -> ::std::option::Option<&str> {
        self.component_configuration.as_deref()
    }
    /// <p>Automatically configures the component by applying the recommended configurations.</p>
    pub fn auto_config_enabled(&self) -> ::std::option::Option<bool> {
        self.auto_config_enabled
    }
}
impl UpdateComponentConfigurationInput {
    /// Creates a new builder-style object to manufacture [`UpdateComponentConfigurationInput`](crate::operation::update_component_configuration::UpdateComponentConfigurationInput).
    pub fn builder() -> crate::operation::update_component_configuration::builders::UpdateComponentConfigurationInputBuilder {
        crate::operation::update_component_configuration::builders::UpdateComponentConfigurationInputBuilder::default()
    }
}

/// A builder for [`UpdateComponentConfigurationInput`](crate::operation::update_component_configuration::UpdateComponentConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateComponentConfigurationInputBuilder {
    pub(crate) resource_group_name: ::std::option::Option<::std::string::String>,
    pub(crate) component_name: ::std::option::Option<::std::string::String>,
    pub(crate) monitor: ::std::option::Option<bool>,
    pub(crate) tier: ::std::option::Option<crate::types::Tier>,
    pub(crate) component_configuration: ::std::option::Option<::std::string::String>,
    pub(crate) auto_config_enabled: ::std::option::Option<bool>,
}
impl UpdateComponentConfigurationInputBuilder {
    /// <p>The name of the resource group.</p>
    /// This field is required.
    pub fn resource_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_group_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the resource group.</p>
    pub fn set_resource_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_group_name = input;
        self
    }
    /// <p>The name of the resource group.</p>
    pub fn get_resource_group_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_group_name
    }
    /// <p>The name of the component.</p>
    /// This field is required.
    pub fn component_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.component_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the component.</p>
    pub fn set_component_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.component_name = input;
        self
    }
    /// <p>The name of the component.</p>
    pub fn get_component_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.component_name
    }
    /// <p>Indicates whether the application component is monitored.</p>
    pub fn monitor(mut self, input: bool) -> Self {
        self.monitor = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the application component is monitored.</p>
    pub fn set_monitor(mut self, input: ::std::option::Option<bool>) -> Self {
        self.monitor = input;
        self
    }
    /// <p>Indicates whether the application component is monitored.</p>
    pub fn get_monitor(&self) -> &::std::option::Option<bool> {
        &self.monitor
    }
    /// <p>The tier of the application component.</p>
    pub fn tier(mut self, input: crate::types::Tier) -> Self {
        self.tier = ::std::option::Option::Some(input);
        self
    }
    /// <p>The tier of the application component.</p>
    pub fn set_tier(mut self, input: ::std::option::Option<crate::types::Tier>) -> Self {
        self.tier = input;
        self
    }
    /// <p>The tier of the application component.</p>
    pub fn get_tier(&self) -> &::std::option::Option<crate::types::Tier> {
        &self.tier
    }
    /// <p>The configuration settings of the component. The value is the escaped JSON of the configuration. For more information about the JSON format, see <a href="https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/working-with-json.html">Working with JSON</a>. You can send a request to <code>DescribeComponentConfigurationRecommendation</code> to see the recommended configuration for a component. For the complete format of the component configuration file, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/component-config.html">Component Configuration</a>.</p>
    pub fn component_configuration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.component_configuration = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The configuration settings of the component. The value is the escaped JSON of the configuration. For more information about the JSON format, see <a href="https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/working-with-json.html">Working with JSON</a>. You can send a request to <code>DescribeComponentConfigurationRecommendation</code> to see the recommended configuration for a component. For the complete format of the component configuration file, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/component-config.html">Component Configuration</a>.</p>
    pub fn set_component_configuration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.component_configuration = input;
        self
    }
    /// <p>The configuration settings of the component. The value is the escaped JSON of the configuration. For more information about the JSON format, see <a href="https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/working-with-json.html">Working with JSON</a>. You can send a request to <code>DescribeComponentConfigurationRecommendation</code> to see the recommended configuration for a component. For the complete format of the component configuration file, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/component-config.html">Component Configuration</a>.</p>
    pub fn get_component_configuration(&self) -> &::std::option::Option<::std::string::String> {
        &self.component_configuration
    }
    /// <p>Automatically configures the component by applying the recommended configurations.</p>
    pub fn auto_config_enabled(mut self, input: bool) -> Self {
        self.auto_config_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Automatically configures the component by applying the recommended configurations.</p>
    pub fn set_auto_config_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.auto_config_enabled = input;
        self
    }
    /// <p>Automatically configures the component by applying the recommended configurations.</p>
    pub fn get_auto_config_enabled(&self) -> &::std::option::Option<bool> {
        &self.auto_config_enabled
    }
    /// Consumes the builder and constructs a [`UpdateComponentConfigurationInput`](crate::operation::update_component_configuration::UpdateComponentConfigurationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_component_configuration::UpdateComponentConfigurationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_component_configuration::UpdateComponentConfigurationInput {
            resource_group_name: self.resource_group_name,
            component_name: self.component_name,
            monitor: self.monitor,
            tier: self.tier,
            component_configuration: self.component_configuration,
            auto_config_enabled: self.auto_config_enabled,
        })
    }
}