aws_sdk_drs/operation/describe_recovery_snapshots/
_describe_recovery_snapshots_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 DescribeRecoverySnapshotsInput {
6    /// <p>Filter Recovery Snapshots by Source Server ID.</p>
7    pub source_server_id: ::std::option::Option<::std::string::String>,
8    /// <p>A set of filters by which to return Recovery Snapshots.</p>
9    pub filters: ::std::option::Option<crate::types::DescribeRecoverySnapshotsRequestFilters>,
10    /// <p>The sorted ordering by which to return Recovery Snapshots.</p>
11    pub order: ::std::option::Option<crate::types::RecoverySnapshotsOrder>,
12    /// <p>Maximum number of Recovery Snapshots to retrieve.</p>
13    pub max_results: ::std::option::Option<i32>,
14    /// <p>The token of the next Recovery Snapshot to retrieve.</p>
15    pub next_token: ::std::option::Option<::std::string::String>,
16}
17impl DescribeRecoverySnapshotsInput {
18    /// <p>Filter Recovery Snapshots by Source Server ID.</p>
19    pub fn source_server_id(&self) -> ::std::option::Option<&str> {
20        self.source_server_id.as_deref()
21    }
22    /// <p>A set of filters by which to return Recovery Snapshots.</p>
23    pub fn filters(&self) -> ::std::option::Option<&crate::types::DescribeRecoverySnapshotsRequestFilters> {
24        self.filters.as_ref()
25    }
26    /// <p>The sorted ordering by which to return Recovery Snapshots.</p>
27    pub fn order(&self) -> ::std::option::Option<&crate::types::RecoverySnapshotsOrder> {
28        self.order.as_ref()
29    }
30    /// <p>Maximum number of Recovery Snapshots to retrieve.</p>
31    pub fn max_results(&self) -> ::std::option::Option<i32> {
32        self.max_results
33    }
34    /// <p>The token of the next Recovery Snapshot to retrieve.</p>
35    pub fn next_token(&self) -> ::std::option::Option<&str> {
36        self.next_token.as_deref()
37    }
38}
39impl DescribeRecoverySnapshotsInput {
40    /// Creates a new builder-style object to manufacture [`DescribeRecoverySnapshotsInput`](crate::operation::describe_recovery_snapshots::DescribeRecoverySnapshotsInput).
41    pub fn builder() -> crate::operation::describe_recovery_snapshots::builders::DescribeRecoverySnapshotsInputBuilder {
42        crate::operation::describe_recovery_snapshots::builders::DescribeRecoverySnapshotsInputBuilder::default()
43    }
44}
45
46/// A builder for [`DescribeRecoverySnapshotsInput`](crate::operation::describe_recovery_snapshots::DescribeRecoverySnapshotsInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct DescribeRecoverySnapshotsInputBuilder {
50    pub(crate) source_server_id: ::std::option::Option<::std::string::String>,
51    pub(crate) filters: ::std::option::Option<crate::types::DescribeRecoverySnapshotsRequestFilters>,
52    pub(crate) order: ::std::option::Option<crate::types::RecoverySnapshotsOrder>,
53    pub(crate) max_results: ::std::option::Option<i32>,
54    pub(crate) next_token: ::std::option::Option<::std::string::String>,
55}
56impl DescribeRecoverySnapshotsInputBuilder {
57    /// <p>Filter Recovery Snapshots by Source Server ID.</p>
58    /// This field is required.
59    pub fn source_server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.source_server_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>Filter Recovery Snapshots by Source Server ID.</p>
64    pub fn set_source_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.source_server_id = input;
66        self
67    }
68    /// <p>Filter Recovery Snapshots by Source Server ID.</p>
69    pub fn get_source_server_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.source_server_id
71    }
72    /// <p>A set of filters by which to return Recovery Snapshots.</p>
73    pub fn filters(mut self, input: crate::types::DescribeRecoverySnapshotsRequestFilters) -> Self {
74        self.filters = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>A set of filters by which to return Recovery Snapshots.</p>
78    pub fn set_filters(mut self, input: ::std::option::Option<crate::types::DescribeRecoverySnapshotsRequestFilters>) -> Self {
79        self.filters = input;
80        self
81    }
82    /// <p>A set of filters by which to return Recovery Snapshots.</p>
83    pub fn get_filters(&self) -> &::std::option::Option<crate::types::DescribeRecoverySnapshotsRequestFilters> {
84        &self.filters
85    }
86    /// <p>The sorted ordering by which to return Recovery Snapshots.</p>
87    pub fn order(mut self, input: crate::types::RecoverySnapshotsOrder) -> Self {
88        self.order = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>The sorted ordering by which to return Recovery Snapshots.</p>
92    pub fn set_order(mut self, input: ::std::option::Option<crate::types::RecoverySnapshotsOrder>) -> Self {
93        self.order = input;
94        self
95    }
96    /// <p>The sorted ordering by which to return Recovery Snapshots.</p>
97    pub fn get_order(&self) -> &::std::option::Option<crate::types::RecoverySnapshotsOrder> {
98        &self.order
99    }
100    /// <p>Maximum number of Recovery Snapshots to retrieve.</p>
101    pub fn max_results(mut self, input: i32) -> Self {
102        self.max_results = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>Maximum number of Recovery Snapshots to retrieve.</p>
106    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
107        self.max_results = input;
108        self
109    }
110    /// <p>Maximum number of Recovery Snapshots to retrieve.</p>
111    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
112        &self.max_results
113    }
114    /// <p>The token of the next Recovery Snapshot to retrieve.</p>
115    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.next_token = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The token of the next Recovery Snapshot to retrieve.</p>
120    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.next_token = input;
122        self
123    }
124    /// <p>The token of the next Recovery Snapshot to retrieve.</p>
125    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
126        &self.next_token
127    }
128    /// Consumes the builder and constructs a [`DescribeRecoverySnapshotsInput`](crate::operation::describe_recovery_snapshots::DescribeRecoverySnapshotsInput).
129    pub fn build(
130        self,
131    ) -> ::std::result::Result<
132        crate::operation::describe_recovery_snapshots::DescribeRecoverySnapshotsInput,
133        ::aws_smithy_types::error::operation::BuildError,
134    > {
135        ::std::result::Result::Ok(crate::operation::describe_recovery_snapshots::DescribeRecoverySnapshotsInput {
136            source_server_id: self.source_server_id,
137            filters: self.filters,
138            order: self.order,
139            max_results: self.max_results,
140            next_token: self.next_token,
141        })
142    }
143}