aws-sdk-cloudwatchlogs 1.75.0

AWS SDK for Amazon CloudWatch Logs
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 DescribeConfigurationTemplatesInput {
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the Amazon Web Services service that you specify here.</p>
    pub service: ::std::option::Option<::std::string::String>,
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the log types that you specify here.</p>
    pub log_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the resource types that you specify here.</p>
    pub resource_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the delivery destination types that you specify here.</p>
    pub delivery_destination_types: ::std::option::Option<::std::vec::Vec<crate::types::DeliveryDestinationType>>,
    /// <p>The token for the next set of items to return. The token expires after 24 hours.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>Use this parameter to limit the number of configuration templates that are returned in the response.</p>
    pub limit: ::std::option::Option<i32>,
}
impl DescribeConfigurationTemplatesInput {
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the Amazon Web Services service that you specify here.</p>
    pub fn service(&self) -> ::std::option::Option<&str> {
        self.service.as_deref()
    }
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the log types that you specify here.</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 `.log_types.is_none()`.
    pub fn log_types(&self) -> &[::std::string::String] {
        self.log_types.as_deref().unwrap_or_default()
    }
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the resource types that you specify here.</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 `.resource_types.is_none()`.
    pub fn resource_types(&self) -> &[::std::string::String] {
        self.resource_types.as_deref().unwrap_or_default()
    }
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the delivery destination types that you specify here.</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 `.delivery_destination_types.is_none()`.
    pub fn delivery_destination_types(&self) -> &[crate::types::DeliveryDestinationType] {
        self.delivery_destination_types.as_deref().unwrap_or_default()
    }
    /// <p>The token for the next set of items to return. The token expires after 24 hours.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>Use this parameter to limit the number of configuration templates that are returned in the response.</p>
    pub fn limit(&self) -> ::std::option::Option<i32> {
        self.limit
    }
}
impl DescribeConfigurationTemplatesInput {
    /// Creates a new builder-style object to manufacture [`DescribeConfigurationTemplatesInput`](crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesInput).
    pub fn builder() -> crate::operation::describe_configuration_templates::builders::DescribeConfigurationTemplatesInputBuilder {
        crate::operation::describe_configuration_templates::builders::DescribeConfigurationTemplatesInputBuilder::default()
    }
}

/// A builder for [`DescribeConfigurationTemplatesInput`](crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeConfigurationTemplatesInputBuilder {
    pub(crate) service: ::std::option::Option<::std::string::String>,
    pub(crate) log_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) resource_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) delivery_destination_types: ::std::option::Option<::std::vec::Vec<crate::types::DeliveryDestinationType>>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) limit: ::std::option::Option<i32>,
}
impl DescribeConfigurationTemplatesInputBuilder {
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the Amazon Web Services service that you specify here.</p>
    pub fn service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the Amazon Web Services service that you specify here.</p>
    pub fn set_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service = input;
        self
    }
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the Amazon Web Services service that you specify here.</p>
    pub fn get_service(&self) -> &::std::option::Option<::std::string::String> {
        &self.service
    }
    /// Appends an item to `log_types`.
    ///
    /// To override the contents of this collection use [`set_log_types`](Self::set_log_types).
    ///
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the log types that you specify here.</p>
    pub fn log_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.log_types.unwrap_or_default();
        v.push(input.into());
        self.log_types = ::std::option::Option::Some(v);
        self
    }
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the log types that you specify here.</p>
    pub fn set_log_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.log_types = input;
        self
    }
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the log types that you specify here.</p>
    pub fn get_log_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.log_types
    }
    /// Appends an item to `resource_types`.
    ///
    /// To override the contents of this collection use [`set_resource_types`](Self::set_resource_types).
    ///
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the resource types that you specify here.</p>
    pub fn resource_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.resource_types.unwrap_or_default();
        v.push(input.into());
        self.resource_types = ::std::option::Option::Some(v);
        self
    }
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the resource types that you specify here.</p>
    pub fn set_resource_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.resource_types = input;
        self
    }
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the resource types that you specify here.</p>
    pub fn get_resource_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.resource_types
    }
    /// Appends an item to `delivery_destination_types`.
    ///
    /// To override the contents of this collection use [`set_delivery_destination_types`](Self::set_delivery_destination_types).
    ///
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the delivery destination types that you specify here.</p>
    pub fn delivery_destination_types(mut self, input: crate::types::DeliveryDestinationType) -> Self {
        let mut v = self.delivery_destination_types.unwrap_or_default();
        v.push(input);
        self.delivery_destination_types = ::std::option::Option::Some(v);
        self
    }
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the delivery destination types that you specify here.</p>
    pub fn set_delivery_destination_types(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DeliveryDestinationType>>) -> Self {
        self.delivery_destination_types = input;
        self
    }
    /// <p>Use this parameter to filter the response to include only the configuration templates that apply to the delivery destination types that you specify here.</p>
    pub fn get_delivery_destination_types(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DeliveryDestinationType>> {
        &self.delivery_destination_types
    }
    /// <p>The token for the next set of items to return. The token expires after 24 hours.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The token for the next set of items to return. The token expires after 24 hours.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The token for the next set of items to return. The token expires after 24 hours.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>Use this parameter to limit the number of configuration templates that are returned in the response.</p>
    pub fn limit(mut self, input: i32) -> Self {
        self.limit = ::std::option::Option::Some(input);
        self
    }
    /// <p>Use this parameter to limit the number of configuration templates that are returned in the response.</p>
    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
        self.limit = input;
        self
    }
    /// <p>Use this parameter to limit the number of configuration templates that are returned in the response.</p>
    pub fn get_limit(&self) -> &::std::option::Option<i32> {
        &self.limit
    }
    /// Consumes the builder and constructs a [`DescribeConfigurationTemplatesInput`](crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::describe_configuration_templates::DescribeConfigurationTemplatesInput {
            service: self.service,
            log_types: self.log_types,
            resource_types: self.resource_types,
            delivery_destination_types: self.delivery_destination_types,
            next_token: self.next_token,
            limit: self.limit,
        })
    }
}