aws_sdk_iotthingsgraph/operation/search_things/_search_things_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 SearchThingsInput {
6 /// <p>The ID of the entity to which the things are associated.</p>
7 /// <p>The IDs should be in the following format.</p>
8 /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME</code></p>
9 pub entity_id: ::std::option::Option<::std::string::String>,
10 /// <p>The string that specifies the next page of results. Use this when you're paginating results.</p>
11 pub next_token: ::std::option::Option<::std::string::String>,
12 /// <p>The maximum number of results to return in the response.</p>
13 pub max_results: ::std::option::Option<i32>,
14 /// <p>The version of the user's namespace. Defaults to the latest version of the user's namespace.</p>
15 pub namespace_version: ::std::option::Option<i64>,
16}
17impl SearchThingsInput {
18 /// <p>The ID of the entity to which the things are associated.</p>
19 /// <p>The IDs should be in the following format.</p>
20 /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME</code></p>
21 pub fn entity_id(&self) -> ::std::option::Option<&str> {
22 self.entity_id.as_deref()
23 }
24 /// <p>The string that specifies the next page of results. Use this when you're paginating results.</p>
25 pub fn next_token(&self) -> ::std::option::Option<&str> {
26 self.next_token.as_deref()
27 }
28 /// <p>The maximum number of results to return in the response.</p>
29 pub fn max_results(&self) -> ::std::option::Option<i32> {
30 self.max_results
31 }
32 /// <p>The version of the user's namespace. Defaults to the latest version of the user's namespace.</p>
33 pub fn namespace_version(&self) -> ::std::option::Option<i64> {
34 self.namespace_version
35 }
36}
37impl SearchThingsInput {
38 /// Creates a new builder-style object to manufacture [`SearchThingsInput`](crate::operation::search_things::SearchThingsInput).
39 pub fn builder() -> crate::operation::search_things::builders::SearchThingsInputBuilder {
40 crate::operation::search_things::builders::SearchThingsInputBuilder::default()
41 }
42}
43
44/// A builder for [`SearchThingsInput`](crate::operation::search_things::SearchThingsInput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct SearchThingsInputBuilder {
48 pub(crate) entity_id: ::std::option::Option<::std::string::String>,
49 pub(crate) next_token: ::std::option::Option<::std::string::String>,
50 pub(crate) max_results: ::std::option::Option<i32>,
51 pub(crate) namespace_version: ::std::option::Option<i64>,
52}
53impl SearchThingsInputBuilder {
54 /// <p>The ID of the entity to which the things are associated.</p>
55 /// <p>The IDs should be in the following format.</p>
56 /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME</code></p>
57 /// This field is required.
58 pub fn entity_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59 self.entity_id = ::std::option::Option::Some(input.into());
60 self
61 }
62 /// <p>The ID of the entity to which the things are associated.</p>
63 /// <p>The IDs should be in the following format.</p>
64 /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME</code></p>
65 pub fn set_entity_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.entity_id = input;
67 self
68 }
69 /// <p>The ID of the entity to which the things are associated.</p>
70 /// <p>The IDs should be in the following format.</p>
71 /// <p><code>urn:tdm:REGION/ACCOUNT ID/default:device:DEVICENAME</code></p>
72 pub fn get_entity_id(&self) -> &::std::option::Option<::std::string::String> {
73 &self.entity_id
74 }
75 /// <p>The string that specifies the next page of results. Use this when you're paginating results.</p>
76 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77 self.next_token = ::std::option::Option::Some(input.into());
78 self
79 }
80 /// <p>The string that specifies the next page of results. Use this when you're paginating results.</p>
81 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82 self.next_token = input;
83 self
84 }
85 /// <p>The string that specifies the next page of results. Use this when you're paginating results.</p>
86 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
87 &self.next_token
88 }
89 /// <p>The maximum number of results to return in the response.</p>
90 pub fn max_results(mut self, input: i32) -> Self {
91 self.max_results = ::std::option::Option::Some(input);
92 self
93 }
94 /// <p>The maximum number of results to return in the response.</p>
95 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
96 self.max_results = input;
97 self
98 }
99 /// <p>The maximum number of results to return in the response.</p>
100 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
101 &self.max_results
102 }
103 /// <p>The version of the user's namespace. Defaults to the latest version of the user's namespace.</p>
104 pub fn namespace_version(mut self, input: i64) -> Self {
105 self.namespace_version = ::std::option::Option::Some(input);
106 self
107 }
108 /// <p>The version of the user's namespace. Defaults to the latest version of the user's namespace.</p>
109 pub fn set_namespace_version(mut self, input: ::std::option::Option<i64>) -> Self {
110 self.namespace_version = input;
111 self
112 }
113 /// <p>The version of the user's namespace. Defaults to the latest version of the user's namespace.</p>
114 pub fn get_namespace_version(&self) -> &::std::option::Option<i64> {
115 &self.namespace_version
116 }
117 /// Consumes the builder and constructs a [`SearchThingsInput`](crate::operation::search_things::SearchThingsInput).
118 pub fn build(
119 self,
120 ) -> ::std::result::Result<crate::operation::search_things::SearchThingsInput, ::aws_smithy_types::error::operation::BuildError> {
121 ::std::result::Result::Ok(crate::operation::search_things::SearchThingsInput {
122 entity_id: self.entity_id,
123 next_token: self.next_token,
124 max_results: self.max_results,
125 namespace_version: self.namespace_version,
126 })
127 }
128}