aws-sdk-elastictranscoder 1.99.0

AWS SDK for Amazon Elastic Transcoder
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The <code>ListPresetsRequest</code> structure.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListPresetsInput {
    /// <p>To list presets in chronological order by the date and time that they were created, enter <code>true</code>. To list presets in reverse chronological order, enter <code>false</code>.</p>
    pub ascending: ::std::option::Option<::std::string::String>,
    /// <p>When Elastic Transcoder returns more than one page of results, use <code>pageToken</code> in subsequent <code>GET</code> requests to get each successive page of results.</p>
    pub page_token: ::std::option::Option<::std::string::String>,
}
impl ListPresetsInput {
    /// <p>To list presets in chronological order by the date and time that they were created, enter <code>true</code>. To list presets in reverse chronological order, enter <code>false</code>.</p>
    pub fn ascending(&self) -> ::std::option::Option<&str> {
        self.ascending.as_deref()
    }
    /// <p>When Elastic Transcoder returns more than one page of results, use <code>pageToken</code> in subsequent <code>GET</code> requests to get each successive page of results.</p>
    pub fn page_token(&self) -> ::std::option::Option<&str> {
        self.page_token.as_deref()
    }
}
impl ListPresetsInput {
    /// Creates a new builder-style object to manufacture [`ListPresetsInput`](crate::operation::list_presets::ListPresetsInput).
    pub fn builder() -> crate::operation::list_presets::builders::ListPresetsInputBuilder {
        crate::operation::list_presets::builders::ListPresetsInputBuilder::default()
    }
}

/// A builder for [`ListPresetsInput`](crate::operation::list_presets::ListPresetsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListPresetsInputBuilder {
    pub(crate) ascending: ::std::option::Option<::std::string::String>,
    pub(crate) page_token: ::std::option::Option<::std::string::String>,
}
impl ListPresetsInputBuilder {
    /// <p>To list presets in chronological order by the date and time that they were created, enter <code>true</code>. To list presets in reverse chronological order, enter <code>false</code>.</p>
    pub fn ascending(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ascending = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>To list presets in chronological order by the date and time that they were created, enter <code>true</code>. To list presets in reverse chronological order, enter <code>false</code>.</p>
    pub fn set_ascending(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ascending = input;
        self
    }
    /// <p>To list presets in chronological order by the date and time that they were created, enter <code>true</code>. To list presets in reverse chronological order, enter <code>false</code>.</p>
    pub fn get_ascending(&self) -> &::std::option::Option<::std::string::String> {
        &self.ascending
    }
    /// <p>When Elastic Transcoder returns more than one page of results, use <code>pageToken</code> in subsequent <code>GET</code> requests to get each successive page of results.</p>
    pub fn page_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.page_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>When Elastic Transcoder returns more than one page of results, use <code>pageToken</code> in subsequent <code>GET</code> requests to get each successive page of results.</p>
    pub fn set_page_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.page_token = input;
        self
    }
    /// <p>When Elastic Transcoder returns more than one page of results, use <code>pageToken</code> in subsequent <code>GET</code> requests to get each successive page of results.</p>
    pub fn get_page_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.page_token
    }
    /// Consumes the builder and constructs a [`ListPresetsInput`](crate::operation::list_presets::ListPresetsInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::list_presets::ListPresetsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_presets::ListPresetsInput {
            ascending: self.ascending,
            page_token: self.page_token,
        })
    }
}