aws_sdk_schemas/operation/search_schemas/
_search_schemas_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 SearchSchemasInput {
6    /// <p>Specifying this limits the results to only schemas that include the provided keywords.</p>
7    pub keywords: ::std::option::Option<::std::string::String>,
8    #[allow(missing_docs)] // documentation missing in model
9    pub limit: ::std::option::Option<i32>,
10    /// <p>The token that specifies the next page of results to return. To request the first page, leave NextToken empty. The token will expire in 24 hours, and cannot be shared with other accounts.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12    /// <p>The name of the registry.</p>
13    pub registry_name: ::std::option::Option<::std::string::String>,
14}
15impl SearchSchemasInput {
16    /// <p>Specifying this limits the results to only schemas that include the provided keywords.</p>
17    pub fn keywords(&self) -> ::std::option::Option<&str> {
18        self.keywords.as_deref()
19    }
20    #[allow(missing_docs)] // documentation missing in model
21    pub fn limit(&self) -> ::std::option::Option<i32> {
22        self.limit
23    }
24    /// <p>The token that specifies the next page of results to return. To request the first page, leave NextToken empty. The token will expire in 24 hours, and cannot be shared with other accounts.</p>
25    pub fn next_token(&self) -> ::std::option::Option<&str> {
26        self.next_token.as_deref()
27    }
28    /// <p>The name of the registry.</p>
29    pub fn registry_name(&self) -> ::std::option::Option<&str> {
30        self.registry_name.as_deref()
31    }
32}
33impl SearchSchemasInput {
34    /// Creates a new builder-style object to manufacture [`SearchSchemasInput`](crate::operation::search_schemas::SearchSchemasInput).
35    pub fn builder() -> crate::operation::search_schemas::builders::SearchSchemasInputBuilder {
36        crate::operation::search_schemas::builders::SearchSchemasInputBuilder::default()
37    }
38}
39
40/// A builder for [`SearchSchemasInput`](crate::operation::search_schemas::SearchSchemasInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct SearchSchemasInputBuilder {
44    pub(crate) keywords: ::std::option::Option<::std::string::String>,
45    pub(crate) limit: ::std::option::Option<i32>,
46    pub(crate) next_token: ::std::option::Option<::std::string::String>,
47    pub(crate) registry_name: ::std::option::Option<::std::string::String>,
48}
49impl SearchSchemasInputBuilder {
50    /// <p>Specifying this limits the results to only schemas that include the provided keywords.</p>
51    /// This field is required.
52    pub fn keywords(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.keywords = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>Specifying this limits the results to only schemas that include the provided keywords.</p>
57    pub fn set_keywords(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.keywords = input;
59        self
60    }
61    /// <p>Specifying this limits the results to only schemas that include the provided keywords.</p>
62    pub fn get_keywords(&self) -> &::std::option::Option<::std::string::String> {
63        &self.keywords
64    }
65    #[allow(missing_docs)] // documentation missing in model
66    pub fn limit(mut self, input: i32) -> Self {
67        self.limit = ::std::option::Option::Some(input);
68        self
69    }
70    #[allow(missing_docs)] // documentation missing in model
71    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
72        self.limit = input;
73        self
74    }
75    #[allow(missing_docs)] // documentation missing in model
76    pub fn get_limit(&self) -> &::std::option::Option<i32> {
77        &self.limit
78    }
79    /// <p>The token that specifies the next page of results to return. To request the first page, leave NextToken empty. The token will expire in 24 hours, and cannot be shared with other accounts.</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>The token that specifies the next page of results to return. To request the first page, leave NextToken empty. The token will expire in 24 hours, and cannot be shared with other accounts.</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>The token that specifies the next page of results to return. To request the first page, leave NextToken empty. The token will expire in 24 hours, and cannot be shared with other accounts.</p>
90    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
91        &self.next_token
92    }
93    /// <p>The name of the registry.</p>
94    /// This field is required.
95    pub fn registry_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.registry_name = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The name of the registry.</p>
100    pub fn set_registry_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.registry_name = input;
102        self
103    }
104    /// <p>The name of the registry.</p>
105    pub fn get_registry_name(&self) -> &::std::option::Option<::std::string::String> {
106        &self.registry_name
107    }
108    /// Consumes the builder and constructs a [`SearchSchemasInput`](crate::operation::search_schemas::SearchSchemasInput).
109    pub fn build(
110        self,
111    ) -> ::std::result::Result<crate::operation::search_schemas::SearchSchemasInput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::search_schemas::SearchSchemasInput {
113            keywords: self.keywords,
114            limit: self.limit,
115            next_token: self.next_token,
116            registry_name: self.registry_name,
117        })
118    }
119}