aws_sdk_ssm/operation/list_ops_item_events/
_list_ops_item_events_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ListOpsItemEventsInput {
6    /// <p>One or more OpsItem filters. Use a filter to return a more specific list of results.</p>
7    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemEventFilter>>,
8    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
9    pub max_results: ::std::option::Option<i32>,
10    /// <p>A token to start the list. Use this token to get the next set of results.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12}
13impl ListOpsItemEventsInput {
14    /// <p>One or more OpsItem filters. Use a filter to return a more specific list of results.</p>
15    ///
16    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
17    pub fn filters(&self) -> &[crate::types::OpsItemEventFilter] {
18        self.filters.as_deref().unwrap_or_default()
19    }
20    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
21    pub fn max_results(&self) -> ::std::option::Option<i32> {
22        self.max_results
23    }
24    /// <p>A token to start the list. Use this token to get the next set of results.</p>
25    pub fn next_token(&self) -> ::std::option::Option<&str> {
26        self.next_token.as_deref()
27    }
28}
29impl ListOpsItemEventsInput {
30    /// Creates a new builder-style object to manufacture [`ListOpsItemEventsInput`](crate::operation::list_ops_item_events::ListOpsItemEventsInput).
31    pub fn builder() -> crate::operation::list_ops_item_events::builders::ListOpsItemEventsInputBuilder {
32        crate::operation::list_ops_item_events::builders::ListOpsItemEventsInputBuilder::default()
33    }
34}
35
36/// A builder for [`ListOpsItemEventsInput`](crate::operation::list_ops_item_events::ListOpsItemEventsInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct ListOpsItemEventsInputBuilder {
40    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemEventFilter>>,
41    pub(crate) max_results: ::std::option::Option<i32>,
42    pub(crate) next_token: ::std::option::Option<::std::string::String>,
43}
44impl ListOpsItemEventsInputBuilder {
45    /// Appends an item to `filters`.
46    ///
47    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
48    ///
49    /// <p>One or more OpsItem filters. Use a filter to return a more specific list of results.</p>
50    pub fn filters(mut self, input: crate::types::OpsItemEventFilter) -> Self {
51        let mut v = self.filters.unwrap_or_default();
52        v.push(input);
53        self.filters = ::std::option::Option::Some(v);
54        self
55    }
56    /// <p>One or more OpsItem filters. Use a filter to return a more specific list of results.</p>
57    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemEventFilter>>) -> Self {
58        self.filters = input;
59        self
60    }
61    /// <p>One or more OpsItem filters. Use a filter to return a more specific list of results.</p>
62    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OpsItemEventFilter>> {
63        &self.filters
64    }
65    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
66    pub fn max_results(mut self, input: i32) -> Self {
67        self.max_results = ::std::option::Option::Some(input);
68        self
69    }
70    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
71    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
72        self.max_results = input;
73        self
74    }
75    /// <p>The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.</p>
76    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
77        &self.max_results
78    }
79    /// <p>A token to start the list. Use this token to get the next set of results.</p>
80    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.next_token = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>A token to start the list. Use this token to get the next set of results.</p>
85    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.next_token = input;
87        self
88    }
89    /// <p>A token to start the list. Use this token to get the next set of results.</p>
90    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
91        &self.next_token
92    }
93    /// Consumes the builder and constructs a [`ListOpsItemEventsInput`](crate::operation::list_ops_item_events::ListOpsItemEventsInput).
94    pub fn build(
95        self,
96    ) -> ::std::result::Result<crate::operation::list_ops_item_events::ListOpsItemEventsInput, ::aws_smithy_types::error::operation::BuildError> {
97        ::std::result::Result::Ok(crate::operation::list_ops_item_events::ListOpsItemEventsInput {
98            filters: self.filters,
99            max_results: self.max_results,
100            next_token: self.next_token,
101        })
102    }
103}