aws-sdk-pricing 1.96.0

AWS SDK for AWS Price List Service
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 GetAttributeValuesInput {
    /// <p>The service code for the service whose attributes you want to retrieve. For example, if you want the retrieve an EC2 attribute, use <code>AmazonEC2</code>.</p>
    pub service_code: ::std::option::Option<::std::string::String>,
    /// <p>The name of the attribute that you want to retrieve the values for, such as <code>volumeType</code>.</p>
    pub attribute_name: ::std::option::Option<::std::string::String>,
    /// <p>The pagination token that indicates the next set of results that you want to retrieve.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of results to return in response.</p>
    pub max_results: ::std::option::Option<i32>,
}
impl GetAttributeValuesInput {
    /// <p>The service code for the service whose attributes you want to retrieve. For example, if you want the retrieve an EC2 attribute, use <code>AmazonEC2</code>.</p>
    pub fn service_code(&self) -> ::std::option::Option<&str> {
        self.service_code.as_deref()
    }
    /// <p>The name of the attribute that you want to retrieve the values for, such as <code>volumeType</code>.</p>
    pub fn attribute_name(&self) -> ::std::option::Option<&str> {
        self.attribute_name.as_deref()
    }
    /// <p>The pagination token that indicates the next set of results that you want to retrieve.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The maximum number of results to return in response.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
}
impl GetAttributeValuesInput {
    /// Creates a new builder-style object to manufacture [`GetAttributeValuesInput`](crate::operation::get_attribute_values::GetAttributeValuesInput).
    pub fn builder() -> crate::operation::get_attribute_values::builders::GetAttributeValuesInputBuilder {
        crate::operation::get_attribute_values::builders::GetAttributeValuesInputBuilder::default()
    }
}

/// A builder for [`GetAttributeValuesInput`](crate::operation::get_attribute_values::GetAttributeValuesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAttributeValuesInputBuilder {
    pub(crate) service_code: ::std::option::Option<::std::string::String>,
    pub(crate) attribute_name: ::std::option::Option<::std::string::String>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
}
impl GetAttributeValuesInputBuilder {
    /// <p>The service code for the service whose attributes you want to retrieve. For example, if you want the retrieve an EC2 attribute, use <code>AmazonEC2</code>.</p>
    /// This field is required.
    pub fn service_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_code = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The service code for the service whose attributes you want to retrieve. For example, if you want the retrieve an EC2 attribute, use <code>AmazonEC2</code>.</p>
    pub fn set_service_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_code = input;
        self
    }
    /// <p>The service code for the service whose attributes you want to retrieve. For example, if you want the retrieve an EC2 attribute, use <code>AmazonEC2</code>.</p>
    pub fn get_service_code(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_code
    }
    /// <p>The name of the attribute that you want to retrieve the values for, such as <code>volumeType</code>.</p>
    /// This field is required.
    pub fn attribute_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.attribute_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the attribute that you want to retrieve the values for, such as <code>volumeType</code>.</p>
    pub fn set_attribute_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.attribute_name = input;
        self
    }
    /// <p>The name of the attribute that you want to retrieve the values for, such as <code>volumeType</code>.</p>
    pub fn get_attribute_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.attribute_name
    }
    /// <p>The pagination token that indicates the next set of results that you want to retrieve.</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 pagination token that indicates the next set of results that you want to retrieve.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The pagination token that indicates the next set of results that you want to retrieve.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The maximum number of results to return in response.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of results to return in response.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of results to return in response.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// Consumes the builder and constructs a [`GetAttributeValuesInput`](crate::operation::get_attribute_values::GetAttributeValuesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_attribute_values::GetAttributeValuesInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_attribute_values::GetAttributeValuesInput {
            service_code: self.service_code,
            attribute_name: self.attribute_name,
            next_token: self.next_token,
            max_results: self.max_results,
        })
    }
}