1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
// 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 ListDistributionsByCachePolicyIdInput {
/// <p>Use this field when paginating results to indicate where to begin in your list of distribution IDs. The response includes distribution IDs in the list that occur after the marker. To get the next page of the list, set this field's value to the value of <code>NextMarker</code> from the current page's response.</p>
pub marker: ::std::option::Option<::std::string::String>,
/// <p>The maximum number of distribution IDs that you want in the response.</p>
pub max_items: ::std::option::Option<i32>,
/// <p>The ID of the cache policy whose associated distribution IDs you want to list.</p>
pub cache_policy_id: ::std::option::Option<::std::string::String>,
}
impl ListDistributionsByCachePolicyIdInput {
/// <p>Use this field when paginating results to indicate where to begin in your list of distribution IDs. The response includes distribution IDs in the list that occur after the marker. To get the next page of the list, set this field's value to the value of <code>NextMarker</code> from the current page's response.</p>
pub fn marker(&self) -> ::std::option::Option<&str> {
self.marker.as_deref()
}
/// <p>The maximum number of distribution IDs that you want in the response.</p>
pub fn max_items(&self) -> ::std::option::Option<i32> {
self.max_items
}
/// <p>The ID of the cache policy whose associated distribution IDs you want to list.</p>
pub fn cache_policy_id(&self) -> ::std::option::Option<&str> {
self.cache_policy_id.as_deref()
}
}
impl ListDistributionsByCachePolicyIdInput {
/// Creates a new builder-style object to manufacture [`ListDistributionsByCachePolicyIdInput`](crate::operation::list_distributions_by_cache_policy_id::ListDistributionsByCachePolicyIdInput).
pub fn builder() -> crate::operation::list_distributions_by_cache_policy_id::builders::ListDistributionsByCachePolicyIdInputBuilder {
crate::operation::list_distributions_by_cache_policy_id::builders::ListDistributionsByCachePolicyIdInputBuilder::default()
}
}
/// A builder for [`ListDistributionsByCachePolicyIdInput`](crate::operation::list_distributions_by_cache_policy_id::ListDistributionsByCachePolicyIdInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ListDistributionsByCachePolicyIdInputBuilder {
pub(crate) marker: ::std::option::Option<::std::string::String>,
pub(crate) max_items: ::std::option::Option<i32>,
pub(crate) cache_policy_id: ::std::option::Option<::std::string::String>,
}
impl ListDistributionsByCachePolicyIdInputBuilder {
/// <p>Use this field when paginating results to indicate where to begin in your list of distribution IDs. The response includes distribution IDs in the list that occur after the marker. To get the next page of the list, set this field's value to the value of <code>NextMarker</code> from the current page's response.</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 field when paginating results to indicate where to begin in your list of distribution IDs. The response includes distribution IDs in the list that occur after the marker. To get the next page of the list, set this field's value to the value of <code>NextMarker</code> from the current page's response.</p>
pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.marker = input;
self
}
/// <p>Use this field when paginating results to indicate where to begin in your list of distribution IDs. The response includes distribution IDs in the list that occur after the marker. To get the next page of the list, set this field's value to the value of <code>NextMarker</code> from the current page's response.</p>
pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
&self.marker
}
/// <p>The maximum number of distribution IDs that you want in the response.</p>
pub fn max_items(mut self, input: i32) -> Self {
self.max_items = ::std::option::Option::Some(input);
self
}
/// <p>The maximum number of distribution IDs that you want in the response.</p>
pub fn set_max_items(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_items = input;
self
}
/// <p>The maximum number of distribution IDs that you want in the response.</p>
pub fn get_max_items(&self) -> &::std::option::Option<i32> {
&self.max_items
}
/// <p>The ID of the cache policy whose associated distribution IDs you want to list.</p>
/// This field is required.
pub fn cache_policy_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.cache_policy_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the cache policy whose associated distribution IDs you want to list.</p>
pub fn set_cache_policy_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cache_policy_id = input;
self
}
/// <p>The ID of the cache policy whose associated distribution IDs you want to list.</p>
pub fn get_cache_policy_id(&self) -> &::std::option::Option<::std::string::String> {
&self.cache_policy_id
}
/// Consumes the builder and constructs a [`ListDistributionsByCachePolicyIdInput`](crate::operation::list_distributions_by_cache_policy_id::ListDistributionsByCachePolicyIdInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::list_distributions_by_cache_policy_id::ListDistributionsByCachePolicyIdInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(
crate::operation::list_distributions_by_cache_policy_id::ListDistributionsByCachePolicyIdInput {
marker: self.marker,
max_items: self.max_items,
cache_policy_id: self.cache_policy_id,
},
)
}
}