aws-sdk-rds 1.131.0

AWS SDK for Amazon Relational Database Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::describe_reserved_db_instances::_describe_reserved_db_instances_input::DescribeReservedDbInstancesInputBuilder;

pub use crate::operation::describe_reserved_db_instances::_describe_reserved_db_instances_output::DescribeReservedDbInstancesOutputBuilder;

impl crate::operation::describe_reserved_db_instances::builders::DescribeReservedDbInstancesInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::describe_reserved_db_instances::DescribeReservedDbInstancesOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::describe_reserved_db_instances::DescribeReservedDBInstancesError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.describe_reserved_db_instances();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `DescribeReservedDBInstances`.
///
/// <p>Returns information about reserved DB instances for this account, or about a specified reserved DB instance.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct DescribeReservedDBInstancesFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::describe_reserved_db_instances::builders::DescribeReservedDbInstancesInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::describe_reserved_db_instances::DescribeReservedDbInstancesOutput,
        crate::operation::describe_reserved_db_instances::DescribeReservedDBInstancesError,
    > for DescribeReservedDBInstancesFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::describe_reserved_db_instances::DescribeReservedDbInstancesOutput,
            crate::operation::describe_reserved_db_instances::DescribeReservedDBInstancesError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl DescribeReservedDBInstancesFluentBuilder {
    /// Creates a new `DescribeReservedDBInstancesFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the DescribeReservedDBInstances as a reference.
    pub fn as_input(&self) -> &crate::operation::describe_reserved_db_instances::builders::DescribeReservedDbInstancesInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::describe_reserved_db_instances::DescribeReservedDbInstancesOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::describe_reserved_db_instances::DescribeReservedDBInstancesError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::describe_reserved_db_instances::DescribeReservedDBInstances::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::describe_reserved_db_instances::DescribeReservedDBInstances::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::describe_reserved_db_instances::DescribeReservedDbInstancesOutput,
        crate::operation::describe_reserved_db_instances::DescribeReservedDBInstancesError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// Create a paginator for this request
    ///
    /// Paginators are used by calling [`send().await`](crate::operation::describe_reserved_db_instances::paginator::DescribeReservedDbInstancesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
    pub fn into_paginator(self) -> crate::operation::describe_reserved_db_instances::paginator::DescribeReservedDbInstancesPaginator {
        crate::operation::describe_reserved_db_instances::paginator::DescribeReservedDbInstancesPaginator::new(self.handle, self.inner)
    }
    /// <p>The reserved DB instance identifier filter value. Specify this parameter to show only the reservation that matches the specified reservation ID.</p>
    pub fn reserved_db_instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.reserved_db_instance_id(input.into());
        self
    }
    /// <p>The reserved DB instance identifier filter value. Specify this parameter to show only the reservation that matches the specified reservation ID.</p>
    pub fn set_reserved_db_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_reserved_db_instance_id(input);
        self
    }
    /// <p>The reserved DB instance identifier filter value. Specify this parameter to show only the reservation that matches the specified reservation ID.</p>
    pub fn get_reserved_db_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_reserved_db_instance_id()
    }
    /// <p>The offering identifier filter value. Specify this parameter to show only purchased reservations matching the specified offering identifier.</p>
    pub fn reserved_db_instances_offering_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.reserved_db_instances_offering_id(input.into());
        self
    }
    /// <p>The offering identifier filter value. Specify this parameter to show only purchased reservations matching the specified offering identifier.</p>
    pub fn set_reserved_db_instances_offering_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_reserved_db_instances_offering_id(input);
        self
    }
    /// <p>The offering identifier filter value. Specify this parameter to show only purchased reservations matching the specified offering identifier.</p>
    pub fn get_reserved_db_instances_offering_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_reserved_db_instances_offering_id()
    }
    /// <p>The DB instance class filter value. Specify this parameter to show only those reservations matching the specified DB instances class.</p>
    pub fn db_instance_class(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.db_instance_class(input.into());
        self
    }
    /// <p>The DB instance class filter value. Specify this parameter to show only those reservations matching the specified DB instances class.</p>
    pub fn set_db_instance_class(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_db_instance_class(input);
        self
    }
    /// <p>The DB instance class filter value. Specify this parameter to show only those reservations matching the specified DB instances class.</p>
    pub fn get_db_instance_class(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_db_instance_class()
    }
    /// <p>The duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration.</p>
    /// <p>Valid Values: <code>1 | 3 | 31536000 | 94608000</code></p>
    pub fn duration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.duration(input.into());
        self
    }
    /// <p>The duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration.</p>
    /// <p>Valid Values: <code>1 | 3 | 31536000 | 94608000</code></p>
    pub fn set_duration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_duration(input);
        self
    }
    /// <p>The duration filter value, specified in years or seconds. Specify this parameter to show only reservations for this duration.</p>
    /// <p>Valid Values: <code>1 | 3 | 31536000 | 94608000</code></p>
    pub fn get_duration(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_duration()
    }
    /// <p>The product description filter value. Specify this parameter to show only those reservations matching the specified product description.</p>
    pub fn product_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.product_description(input.into());
        self
    }
    /// <p>The product description filter value. Specify this parameter to show only those reservations matching the specified product description.</p>
    pub fn set_product_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_product_description(input);
        self
    }
    /// <p>The product description filter value. Specify this parameter to show only those reservations matching the specified product description.</p>
    pub fn get_product_description(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_product_description()
    }
    /// <p>The offering type filter value. Specify this parameter to show only the available offerings matching the specified offering type.</p>
    /// <p>Valid Values: <code>"Partial Upfront" | "All Upfront" | "No Upfront" </code></p>
    pub fn offering_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.offering_type(input.into());
        self
    }
    /// <p>The offering type filter value. Specify this parameter to show only the available offerings matching the specified offering type.</p>
    /// <p>Valid Values: <code>"Partial Upfront" | "All Upfront" | "No Upfront" </code></p>
    pub fn set_offering_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_offering_type(input);
        self
    }
    /// <p>The offering type filter value. Specify this parameter to show only the available offerings matching the specified offering type.</p>
    /// <p>Valid Values: <code>"Partial Upfront" | "All Upfront" | "No Upfront" </code></p>
    pub fn get_offering_type(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_offering_type()
    }
    /// <p>Specifies whether to show only those reservations that support Multi-AZ.</p>
    pub fn multi_az(mut self, input: bool) -> Self {
        self.inner = self.inner.multi_az(input);
        self
    }
    /// <p>Specifies whether to show only those reservations that support Multi-AZ.</p>
    pub fn set_multi_az(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_multi_az(input);
        self
    }
    /// <p>Specifies whether to show only those reservations that support Multi-AZ.</p>
    pub fn get_multi_az(&self) -> &::std::option::Option<bool> {
        self.inner.get_multi_az()
    }
    /// <p>The lease identifier filter value. Specify this parameter to show only the reservation that matches the specified lease ID.</p><note>
    /// <p>Amazon Web Services Support might request the lease ID for an issue related to a reserved DB instance.</p>
    /// </note>
    pub fn lease_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.lease_id(input.into());
        self
    }
    /// <p>The lease identifier filter value. Specify this parameter to show only the reservation that matches the specified lease ID.</p><note>
    /// <p>Amazon Web Services Support might request the lease ID for an issue related to a reserved DB instance.</p>
    /// </note>
    pub fn set_lease_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_lease_id(input);
        self
    }
    /// <p>The lease identifier filter value. Specify this parameter to show only the reservation that matches the specified lease ID.</p><note>
    /// <p>Amazon Web Services Support might request the lease ID for an issue related to a reserved DB instance.</p>
    /// </note>
    pub fn get_lease_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_lease_id()
    }
    ///
    /// Appends an item to `Filters`.
    ///
    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
    ///
    /// <p>This parameter isn't currently supported.</p>
    pub fn filters(mut self, input: crate::types::Filter) -> Self {
        self.inner = self.inner.filters(input);
        self
    }
    /// <p>This parameter isn't currently supported.</p>
    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
        self.inner = self.inner.set_filters(input);
        self
    }
    /// <p>This parameter isn't currently supported.</p>
    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
        self.inner.get_filters()
    }
    /// <p>The maximum number of records to include in the response. If more than the <code>MaxRecords</code> value is available, a pagination token called a marker is included in the response so you can retrieve the remaining results.</p>
    /// <p>Default: 100</p>
    /// <p>Constraints: Minimum 20, maximum 100.</p>
    pub fn max_records(mut self, input: i32) -> Self {
        self.inner = self.inner.max_records(input);
        self
    }
    /// <p>The maximum number of records to include in the response. If more than the <code>MaxRecords</code> value is available, a pagination token called a marker is included in the response so you can retrieve the remaining results.</p>
    /// <p>Default: 100</p>
    /// <p>Constraints: Minimum 20, maximum 100.</p>
    pub fn set_max_records(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_max_records(input);
        self
    }
    /// <p>The maximum number of records to include in the response. If more than the <code>MaxRecords</code> value is available, a pagination token called a marker is included in the response so you can retrieve the remaining results.</p>
    /// <p>Default: 100</p>
    /// <p>Constraints: Minimum 20, maximum 100.</p>
    pub fn get_max_records(&self) -> &::std::option::Option<i32> {
        self.inner.get_max_records()
    }
    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.marker(input.into());
        self
    }
    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_marker(input);
        self
    }
    /// <p>An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>
    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_marker()
    }
}