aws_sdk_lexmodelbuilding/operation/get_migrations/
_get_migrations_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 GetMigrationsInput {
6    /// <p>The field to sort the list of migrations by. You can sort by the Amazon Lex V1 bot name or the date and time that the migration was started.</p>
7    pub sort_by_attribute: ::std::option::Option<crate::types::MigrationSortAttribute>,
8    /// <p>The order so sort the list.</p>
9    pub sort_by_order: ::std::option::Option<crate::types::SortOrder>,
10    /// <p>Filters the list to contain only bots whose name contains the specified string. The string is matched anywhere in bot name.</p>
11    pub v1_bot_name_contains: ::std::option::Option<::std::string::String>,
12    /// <p>Filters the list to contain only migrations in the specified state.</p>
13    pub migration_status_equals: ::std::option::Option<crate::types::MigrationStatus>,
14    /// <p>The maximum number of migrations to return in the response. The default is 10.</p>
15    pub max_results: ::std::option::Option<i32>,
16    /// <p>A pagination token that fetches the next page of migrations. If the response to this operation is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of migrations, specify the pagination token in the request.</p>
17    pub next_token: ::std::option::Option<::std::string::String>,
18}
19impl GetMigrationsInput {
20    /// <p>The field to sort the list of migrations by. You can sort by the Amazon Lex V1 bot name or the date and time that the migration was started.</p>
21    pub fn sort_by_attribute(&self) -> ::std::option::Option<&crate::types::MigrationSortAttribute> {
22        self.sort_by_attribute.as_ref()
23    }
24    /// <p>The order so sort the list.</p>
25    pub fn sort_by_order(&self) -> ::std::option::Option<&crate::types::SortOrder> {
26        self.sort_by_order.as_ref()
27    }
28    /// <p>Filters the list to contain only bots whose name contains the specified string. The string is matched anywhere in bot name.</p>
29    pub fn v1_bot_name_contains(&self) -> ::std::option::Option<&str> {
30        self.v1_bot_name_contains.as_deref()
31    }
32    /// <p>Filters the list to contain only migrations in the specified state.</p>
33    pub fn migration_status_equals(&self) -> ::std::option::Option<&crate::types::MigrationStatus> {
34        self.migration_status_equals.as_ref()
35    }
36    /// <p>The maximum number of migrations to return in the response. The default is 10.</p>
37    pub fn max_results(&self) -> ::std::option::Option<i32> {
38        self.max_results
39    }
40    /// <p>A pagination token that fetches the next page of migrations. If the response to this operation is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of migrations, specify the pagination token in the request.</p>
41    pub fn next_token(&self) -> ::std::option::Option<&str> {
42        self.next_token.as_deref()
43    }
44}
45impl GetMigrationsInput {
46    /// Creates a new builder-style object to manufacture [`GetMigrationsInput`](crate::operation::get_migrations::GetMigrationsInput).
47    pub fn builder() -> crate::operation::get_migrations::builders::GetMigrationsInputBuilder {
48        crate::operation::get_migrations::builders::GetMigrationsInputBuilder::default()
49    }
50}
51
52/// A builder for [`GetMigrationsInput`](crate::operation::get_migrations::GetMigrationsInput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct GetMigrationsInputBuilder {
56    pub(crate) sort_by_attribute: ::std::option::Option<crate::types::MigrationSortAttribute>,
57    pub(crate) sort_by_order: ::std::option::Option<crate::types::SortOrder>,
58    pub(crate) v1_bot_name_contains: ::std::option::Option<::std::string::String>,
59    pub(crate) migration_status_equals: ::std::option::Option<crate::types::MigrationStatus>,
60    pub(crate) max_results: ::std::option::Option<i32>,
61    pub(crate) next_token: ::std::option::Option<::std::string::String>,
62}
63impl GetMigrationsInputBuilder {
64    /// <p>The field to sort the list of migrations by. You can sort by the Amazon Lex V1 bot name or the date and time that the migration was started.</p>
65    pub fn sort_by_attribute(mut self, input: crate::types::MigrationSortAttribute) -> Self {
66        self.sort_by_attribute = ::std::option::Option::Some(input);
67        self
68    }
69    /// <p>The field to sort the list of migrations by. You can sort by the Amazon Lex V1 bot name or the date and time that the migration was started.</p>
70    pub fn set_sort_by_attribute(mut self, input: ::std::option::Option<crate::types::MigrationSortAttribute>) -> Self {
71        self.sort_by_attribute = input;
72        self
73    }
74    /// <p>The field to sort the list of migrations by. You can sort by the Amazon Lex V1 bot name or the date and time that the migration was started.</p>
75    pub fn get_sort_by_attribute(&self) -> &::std::option::Option<crate::types::MigrationSortAttribute> {
76        &self.sort_by_attribute
77    }
78    /// <p>The order so sort the list.</p>
79    pub fn sort_by_order(mut self, input: crate::types::SortOrder) -> Self {
80        self.sort_by_order = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>The order so sort the list.</p>
84    pub fn set_sort_by_order(mut self, input: ::std::option::Option<crate::types::SortOrder>) -> Self {
85        self.sort_by_order = input;
86        self
87    }
88    /// <p>The order so sort the list.</p>
89    pub fn get_sort_by_order(&self) -> &::std::option::Option<crate::types::SortOrder> {
90        &self.sort_by_order
91    }
92    /// <p>Filters the list to contain only bots whose name contains the specified string. The string is matched anywhere in bot name.</p>
93    pub fn v1_bot_name_contains(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
94        self.v1_bot_name_contains = ::std::option::Option::Some(input.into());
95        self
96    }
97    /// <p>Filters the list to contain only bots whose name contains the specified string. The string is matched anywhere in bot name.</p>
98    pub fn set_v1_bot_name_contains(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
99        self.v1_bot_name_contains = input;
100        self
101    }
102    /// <p>Filters the list to contain only bots whose name contains the specified string. The string is matched anywhere in bot name.</p>
103    pub fn get_v1_bot_name_contains(&self) -> &::std::option::Option<::std::string::String> {
104        &self.v1_bot_name_contains
105    }
106    /// <p>Filters the list to contain only migrations in the specified state.</p>
107    pub fn migration_status_equals(mut self, input: crate::types::MigrationStatus) -> Self {
108        self.migration_status_equals = ::std::option::Option::Some(input);
109        self
110    }
111    /// <p>Filters the list to contain only migrations in the specified state.</p>
112    pub fn set_migration_status_equals(mut self, input: ::std::option::Option<crate::types::MigrationStatus>) -> Self {
113        self.migration_status_equals = input;
114        self
115    }
116    /// <p>Filters the list to contain only migrations in the specified state.</p>
117    pub fn get_migration_status_equals(&self) -> &::std::option::Option<crate::types::MigrationStatus> {
118        &self.migration_status_equals
119    }
120    /// <p>The maximum number of migrations to return in the response. The default is 10.</p>
121    pub fn max_results(mut self, input: i32) -> Self {
122        self.max_results = ::std::option::Option::Some(input);
123        self
124    }
125    /// <p>The maximum number of migrations to return in the response. The default is 10.</p>
126    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
127        self.max_results = input;
128        self
129    }
130    /// <p>The maximum number of migrations to return in the response. The default is 10.</p>
131    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
132        &self.max_results
133    }
134    /// <p>A pagination token that fetches the next page of migrations. If the response to this operation is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of migrations, specify the pagination token in the request.</p>
135    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
136        self.next_token = ::std::option::Option::Some(input.into());
137        self
138    }
139    /// <p>A pagination token that fetches the next page of migrations. If the response to this operation is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of migrations, specify the pagination token in the request.</p>
140    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
141        self.next_token = input;
142        self
143    }
144    /// <p>A pagination token that fetches the next page of migrations. If the response to this operation is truncated, Amazon Lex returns a pagination token in the response. To fetch the next page of migrations, specify the pagination token in the request.</p>
145    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
146        &self.next_token
147    }
148    /// Consumes the builder and constructs a [`GetMigrationsInput`](crate::operation::get_migrations::GetMigrationsInput).
149    pub fn build(
150        self,
151    ) -> ::std::result::Result<crate::operation::get_migrations::GetMigrationsInput, ::aws_smithy_types::error::operation::BuildError> {
152        ::std::result::Result::Ok(crate::operation::get_migrations::GetMigrationsInput {
153            sort_by_attribute: self.sort_by_attribute,
154            sort_by_order: self.sort_by_order,
155            v1_bot_name_contains: self.v1_bot_name_contains,
156            migration_status_equals: self.migration_status_equals,
157            max_results: self.max_results,
158            next_token: self.next_token,
159        })
160    }
161}