aws_sdk_ssm/operation/list_ops_item_events/
_list_ops_item_events_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ListOpsItemEventsInput {
6 pub filters: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemEventFilter>>,
8 pub max_results: ::std::option::Option<i32>,
10 pub next_token: ::std::option::Option<::std::string::String>,
12}
13impl ListOpsItemEventsInput {
14 pub fn filters(&self) -> &[crate::types::OpsItemEventFilter] {
18 self.filters.as_deref().unwrap_or_default()
19 }
20 pub fn max_results(&self) -> ::std::option::Option<i32> {
22 self.max_results
23 }
24 pub fn next_token(&self) -> ::std::option::Option<&str> {
26 self.next_token.as_deref()
27 }
28}
29impl ListOpsItemEventsInput {
30 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#[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 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 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 pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OpsItemEventFilter>> {
63 &self.filters
64 }
65 pub fn max_results(mut self, input: i32) -> Self {
67 self.max_results = ::std::option::Option::Some(input);
68 self
69 }
70 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
72 self.max_results = input;
73 self
74 }
75 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
77 &self.max_results
78 }
79 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 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.next_token = input;
87 self
88 }
89 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
91 &self.next_token
92 }
93 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}