// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The request to list invalidations.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListInvalidationsInput {
/// <p>The distribution's ID.</p>
pub distribution_id: ::std::option::Option<::std::string::String>,
/// <p>Use this parameter when paginating results to indicate where to begin in your list of invalidation batches. Because the results are returned in decreasing order from most recent to oldest, the most recent results are on the first page, the second page will contain earlier results, and so on. To get the next page of results, set <code>Marker</code> to the value of the <code>NextMarker</code> from the current page's response. This value is the same as the ID of the last invalidation batch on that page.</p>
pub marker: ::std::option::Option<::std::string::String>,
/// <p>The maximum number of invalidation batches that you want in the response body.</p>
pub max_items: ::std::option::Option<i32>,
}
impl ListInvalidationsInput {
/// <p>The distribution's ID.</p>
pub fn distribution_id(&self) -> ::std::option::Option<&str> {
self.distribution_id.as_deref()
}
/// <p>Use this parameter when paginating results to indicate where to begin in your list of invalidation batches. Because the results are returned in decreasing order from most recent to oldest, the most recent results are on the first page, the second page will contain earlier results, and so on. To get the next page of results, set <code>Marker</code> to the value of the <code>NextMarker</code> from the current page's response. This value is the same as the ID of the last invalidation batch on that page.</p>
pub fn marker(&self) -> ::std::option::Option<&str> {
self.marker.as_deref()
}
/// <p>The maximum number of invalidation batches that you want in the response body.</p>
pub fn max_items(&self) -> ::std::option::Option<i32> {
self.max_items
}
}
impl ListInvalidationsInput {
/// Creates a new builder-style object to manufacture [`ListInvalidationsInput`](crate::operation::list_invalidations::ListInvalidationsInput).
pub fn builder() -> crate::operation::list_invalidations::builders::ListInvalidationsInputBuilder {
crate::operation::list_invalidations::builders::ListInvalidationsInputBuilder::default()
}
}
/// A builder for [`ListInvalidationsInput`](crate::operation::list_invalidations::ListInvalidationsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListInvalidationsInputBuilder {
pub(crate) distribution_id: ::std::option::Option<::std::string::String>,
pub(crate) marker: ::std::option::Option<::std::string::String>,
pub(crate) max_items: ::std::option::Option<i32>,
}
impl ListInvalidationsInputBuilder {
/// <p>The distribution's ID.</p>
/// This field is required.
pub fn distribution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.distribution_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The distribution's ID.</p>
pub fn set_distribution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.distribution_id = input;
self
}
/// <p>The distribution's ID.</p>
pub fn get_distribution_id(&self) -> &::std::option::Option<::std::string::String> {
&self.distribution_id
}
/// <p>Use this parameter when paginating results to indicate where to begin in your list of invalidation batches. Because the results are returned in decreasing order from most recent to oldest, the most recent results are on the first page, the second page will contain earlier results, and so on. To get the next page of results, set <code>Marker</code> to the value of the <code>NextMarker</code> from the current page's response. This value is the same as the ID of the last invalidation batch on that page.</p>
pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.marker = ::std::option::Option::Some(input.into());
self
}
/// <p>Use this parameter when paginating results to indicate where to begin in your list of invalidation batches. Because the results are returned in decreasing order from most recent to oldest, the most recent results are on the first page, the second page will contain earlier results, and so on. To get the next page of results, set <code>Marker</code> to the value of the <code>NextMarker</code> from the current page's response. This value is the same as the ID of the last invalidation batch on that page.</p>
pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.marker = input;
self
}
/// <p>Use this parameter when paginating results to indicate where to begin in your list of invalidation batches. Because the results are returned in decreasing order from most recent to oldest, the most recent results are on the first page, the second page will contain earlier results, and so on. To get the next page of results, set <code>Marker</code> to the value of the <code>NextMarker</code> from the current page's response. This value is the same as the ID of the last invalidation batch on that page.</p>
pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
&self.marker
}
/// <p>The maximum number of invalidation batches that you want in the response body.</p>
pub fn max_items(mut self, input: i32) -> Self {
self.max_items = ::std::option::Option::Some(input);
self
}
/// <p>The maximum number of invalidation batches that you want in the response body.</p>
pub fn set_max_items(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_items = input;
self
}
/// <p>The maximum number of invalidation batches that you want in the response body.</p>
pub fn get_max_items(&self) -> &::std::option::Option<i32> {
&self.max_items
}
/// Consumes the builder and constructs a [`ListInvalidationsInput`](crate::operation::list_invalidations::ListInvalidationsInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::list_invalidations::ListInvalidationsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::list_invalidations::ListInvalidationsInput {
distribution_id: self.distribution_id,
marker: self.marker,
max_items: self.max_items,
})
}
}