aws_sdk_opensearch/operation/get_upgrade_history/_get_upgrade_history_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Container for the request parameters to the <code>GetUpgradeHistory</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetUpgradeHistoryInput {
7    /// <p>The name of an existing domain.</p>
8    pub domain_name: ::std::option::Option<::std::string::String>,
9    /// <p>An optional parameter that specifies the maximum number of results to return. You can use <code>nextToken</code> to get the next page of results.</p>
10    pub max_results: ::std::option::Option<i32>,
11    /// <p>If your initial <code>GetUpgradeHistory</code> operation returns a <code>nextToken</code>, you can include the returned <code>nextToken</code> in subsequent <code>GetUpgradeHistory</code> operations, which returns results in the next page.</p>
12    pub next_token: ::std::option::Option<::std::string::String>,
13}
14impl GetUpgradeHistoryInput {
15    /// <p>The name of an existing domain.</p>
16    pub fn domain_name(&self) -> ::std::option::Option<&str> {
17        self.domain_name.as_deref()
18    }
19    /// <p>An optional parameter that specifies the maximum number of results to return. You can use <code>nextToken</code> to get the next page of results.</p>
20    pub fn max_results(&self) -> ::std::option::Option<i32> {
21        self.max_results
22    }
23    /// <p>If your initial <code>GetUpgradeHistory</code> operation returns a <code>nextToken</code>, you can include the returned <code>nextToken</code> in subsequent <code>GetUpgradeHistory</code> operations, which returns results in the next page.</p>
24    pub fn next_token(&self) -> ::std::option::Option<&str> {
25        self.next_token.as_deref()
26    }
27}
28impl GetUpgradeHistoryInput {
29    /// Creates a new builder-style object to manufacture [`GetUpgradeHistoryInput`](crate::operation::get_upgrade_history::GetUpgradeHistoryInput).
30    pub fn builder() -> crate::operation::get_upgrade_history::builders::GetUpgradeHistoryInputBuilder {
31        crate::operation::get_upgrade_history::builders::GetUpgradeHistoryInputBuilder::default()
32    }
33}
34
35/// A builder for [`GetUpgradeHistoryInput`](crate::operation::get_upgrade_history::GetUpgradeHistoryInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct GetUpgradeHistoryInputBuilder {
39    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
40    pub(crate) max_results: ::std::option::Option<i32>,
41    pub(crate) next_token: ::std::option::Option<::std::string::String>,
42}
43impl GetUpgradeHistoryInputBuilder {
44    /// <p>The name of an existing domain.</p>
45    /// This field is required.
46    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.domain_name = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The name of an existing domain.</p>
51    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.domain_name = input;
53        self
54    }
55    /// <p>The name of an existing domain.</p>
56    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
57        &self.domain_name
58    }
59    /// <p>An optional parameter that specifies the maximum number of results to return. You can use <code>nextToken</code> to get the next page of results.</p>
60    pub fn max_results(mut self, input: i32) -> Self {
61        self.max_results = ::std::option::Option::Some(input);
62        self
63    }
64    /// <p>An optional parameter that specifies the maximum number of results to return. You can use <code>nextToken</code> to get the next page of results.</p>
65    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
66        self.max_results = input;
67        self
68    }
69    /// <p>An optional parameter that specifies the maximum number of results to return. You can use <code>nextToken</code> to get the next page of results.</p>
70    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
71        &self.max_results
72    }
73    /// <p>If your initial <code>GetUpgradeHistory</code> operation returns a <code>nextToken</code>, you can include the returned <code>nextToken</code> in subsequent <code>GetUpgradeHistory</code> operations, which returns results in the next page.</p>
74    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.next_token = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>If your initial <code>GetUpgradeHistory</code> operation returns a <code>nextToken</code>, you can include the returned <code>nextToken</code> in subsequent <code>GetUpgradeHistory</code> operations, which returns results in the next page.</p>
79    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.next_token = input;
81        self
82    }
83    /// <p>If your initial <code>GetUpgradeHistory</code> operation returns a <code>nextToken</code>, you can include the returned <code>nextToken</code> in subsequent <code>GetUpgradeHistory</code> operations, which returns results in the next page.</p>
84    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
85        &self.next_token
86    }
87    /// Consumes the builder and constructs a [`GetUpgradeHistoryInput`](crate::operation::get_upgrade_history::GetUpgradeHistoryInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::get_upgrade_history::GetUpgradeHistoryInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::get_upgrade_history::GetUpgradeHistoryInput {
92            domain_name: self.domain_name,
93            max_results: self.max_results,
94            next_token: self.next_token,
95        })
96    }
97}