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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
// 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 ListCachePoliciesInput {
/// <p>A filter to return only the specified kinds of cache policies. Valid values are:</p>
/// <ul>
/// <li>
/// <p><code>managed</code> – Returns only the managed policies created by Amazon Web Services.</p></li>
/// <li>
/// <p><code>custom</code> – Returns only the custom policies created in your Amazon Web Services account.</p></li>
/// </ul>
pub r#type: ::std::option::Option<crate::types::CachePolicyType>,
/// <p>Use this field when paginating results to indicate where to begin in your list of cache policies. The response includes cache policies 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 cache policies that you want in the response.</p>
pub max_items: ::std::option::Option<i32>,
}
impl ListCachePoliciesInput {
/// <p>A filter to return only the specified kinds of cache policies. Valid values are:</p>
/// <ul>
/// <li>
/// <p><code>managed</code> – Returns only the managed policies created by Amazon Web Services.</p></li>
/// <li>
/// <p><code>custom</code> – Returns only the custom policies created in your Amazon Web Services account.</p></li>
/// </ul>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::CachePolicyType> {
self.r#type.as_ref()
}
/// <p>Use this field when paginating results to indicate where to begin in your list of cache policies. The response includes cache policies 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 cache policies that you want in the response.</p>
pub fn max_items(&self) -> ::std::option::Option<i32> {
self.max_items
}
}
impl ListCachePoliciesInput {
/// Creates a new builder-style object to manufacture [`ListCachePoliciesInput`](crate::operation::list_cache_policies::ListCachePoliciesInput).
pub fn builder() -> crate::operation::list_cache_policies::builders::ListCachePoliciesInputBuilder {
crate::operation::list_cache_policies::builders::ListCachePoliciesInputBuilder::default()
}
}
/// A builder for [`ListCachePoliciesInput`](crate::operation::list_cache_policies::ListCachePoliciesInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ListCachePoliciesInputBuilder {
pub(crate) r#type: ::std::option::Option<crate::types::CachePolicyType>,
pub(crate) marker: ::std::option::Option<::std::string::String>,
pub(crate) max_items: ::std::option::Option<i32>,
}
impl ListCachePoliciesInputBuilder {
/// <p>A filter to return only the specified kinds of cache policies. Valid values are:</p>
/// <ul>
/// <li>
/// <p><code>managed</code> – Returns only the managed policies created by Amazon Web Services.</p></li>
/// <li>
/// <p><code>custom</code> – Returns only the custom policies created in your Amazon Web Services account.</p></li>
/// </ul>
pub fn r#type(mut self, input: crate::types::CachePolicyType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>A filter to return only the specified kinds of cache policies. Valid values are:</p>
/// <ul>
/// <li>
/// <p><code>managed</code> – Returns only the managed policies created by Amazon Web Services.</p></li>
/// <li>
/// <p><code>custom</code> – Returns only the custom policies created in your Amazon Web Services account.</p></li>
/// </ul>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::CachePolicyType>) -> Self {
self.r#type = input;
self
}
/// <p>A filter to return only the specified kinds of cache policies. Valid values are:</p>
/// <ul>
/// <li>
/// <p><code>managed</code> – Returns only the managed policies created by Amazon Web Services.</p></li>
/// <li>
/// <p><code>custom</code> – Returns only the custom policies created in your Amazon Web Services account.</p></li>
/// </ul>
pub fn get_type(&self) -> &::std::option::Option<crate::types::CachePolicyType> {
&self.r#type
}
/// <p>Use this field when paginating results to indicate where to begin in your list of cache policies. The response includes cache policies 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 cache policies. The response includes cache policies 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 cache policies. The response includes cache policies 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 cache policies 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 cache policies 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 cache policies that you want in the response.</p>
pub fn get_max_items(&self) -> &::std::option::Option<i32> {
&self.max_items
}
/// Consumes the builder and constructs a [`ListCachePoliciesInput`](crate::operation::list_cache_policies::ListCachePoliciesInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::list_cache_policies::ListCachePoliciesInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::list_cache_policies::ListCachePoliciesInput {
r#type: self.r#type,
marker: self.marker,
max_items: self.max_items,
})
}
}