aws_sdk_datazone/operation/query_graph/_query_graph_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 QueryGraphInput {
6 /// <p>The identifier of the Amazon DataZone domain.</p>
7 pub domain_identifier: ::std::option::Option<::std::string::String>,
8 /// <p>List of query match clauses.</p>
9 pub r#match: ::std::option::Option<::std::vec::Vec<crate::types::MatchClause>>,
10 /// <p>The maximum number of entities to return in a single call to <code>QueryGraph</code>. When the number of entities to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>QueryGraph</code> to list the next set of entities.</p>
11 pub max_results: ::std::option::Option<i32>,
12 /// <p>When the number of entities is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of entities, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>QueryGraph</code> to list the next set of entities.</p>
13 pub next_token: ::std::option::Option<::std::string::String>,
14 /// <p>Additional details on the queried entity that can be requested in the response.</p>
15 pub additional_attributes: ::std::option::Option<crate::types::AdditionalAttributes>,
16}
17impl QueryGraphInput {
18 /// <p>The identifier of the Amazon DataZone domain.</p>
19 pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
20 self.domain_identifier.as_deref()
21 }
22 /// <p>List of query match clauses.</p>
23 ///
24 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.r#match.is_none()`.
25 pub fn r#match(&self) -> &[crate::types::MatchClause] {
26 self.r#match.as_deref().unwrap_or_default()
27 }
28 /// <p>The maximum number of entities to return in a single call to <code>QueryGraph</code>. When the number of entities to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>QueryGraph</code> to list the next set of entities.</p>
29 pub fn max_results(&self) -> ::std::option::Option<i32> {
30 self.max_results
31 }
32 /// <p>When the number of entities is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of entities, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>QueryGraph</code> to list the next set of entities.</p>
33 pub fn next_token(&self) -> ::std::option::Option<&str> {
34 self.next_token.as_deref()
35 }
36 /// <p>Additional details on the queried entity that can be requested in the response.</p>
37 pub fn additional_attributes(&self) -> ::std::option::Option<&crate::types::AdditionalAttributes> {
38 self.additional_attributes.as_ref()
39 }
40}
41impl QueryGraphInput {
42 /// Creates a new builder-style object to manufacture [`QueryGraphInput`](crate::operation::query_graph::QueryGraphInput).
43 pub fn builder() -> crate::operation::query_graph::builders::QueryGraphInputBuilder {
44 crate::operation::query_graph::builders::QueryGraphInputBuilder::default()
45 }
46}
47
48/// A builder for [`QueryGraphInput`](crate::operation::query_graph::QueryGraphInput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct QueryGraphInputBuilder {
52 pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
53 pub(crate) r#match: ::std::option::Option<::std::vec::Vec<crate::types::MatchClause>>,
54 pub(crate) max_results: ::std::option::Option<i32>,
55 pub(crate) next_token: ::std::option::Option<::std::string::String>,
56 pub(crate) additional_attributes: ::std::option::Option<crate::types::AdditionalAttributes>,
57}
58impl QueryGraphInputBuilder {
59 /// <p>The identifier of the Amazon DataZone domain.</p>
60 /// This field is required.
61 pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.domain_identifier = ::std::option::Option::Some(input.into());
63 self
64 }
65 /// <p>The identifier of the Amazon DataZone domain.</p>
66 pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.domain_identifier = input;
68 self
69 }
70 /// <p>The identifier of the Amazon DataZone domain.</p>
71 pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
72 &self.domain_identifier
73 }
74 /// Appends an item to `r#match`.
75 ///
76 /// To override the contents of this collection use [`set_match`](Self::set_match).
77 ///
78 /// <p>List of query match clauses.</p>
79 pub fn r#match(mut self, input: crate::types::MatchClause) -> Self {
80 let mut v = self.r#match.unwrap_or_default();
81 v.push(input);
82 self.r#match = ::std::option::Option::Some(v);
83 self
84 }
85 /// <p>List of query match clauses.</p>
86 pub fn set_match(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MatchClause>>) -> Self {
87 self.r#match = input;
88 self
89 }
90 /// <p>List of query match clauses.</p>
91 pub fn get_match(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MatchClause>> {
92 &self.r#match
93 }
94 /// <p>The maximum number of entities to return in a single call to <code>QueryGraph</code>. When the number of entities to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>QueryGraph</code> to list the next set of entities.</p>
95 pub fn max_results(mut self, input: i32) -> Self {
96 self.max_results = ::std::option::Option::Some(input);
97 self
98 }
99 /// <p>The maximum number of entities to return in a single call to <code>QueryGraph</code>. When the number of entities to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>QueryGraph</code> to list the next set of entities.</p>
100 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
101 self.max_results = input;
102 self
103 }
104 /// <p>The maximum number of entities to return in a single call to <code>QueryGraph</code>. When the number of entities to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>QueryGraph</code> to list the next set of entities.</p>
105 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
106 &self.max_results
107 }
108 /// <p>When the number of entities is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of entities, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>QueryGraph</code> to list the next set of entities.</p>
109 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110 self.next_token = ::std::option::Option::Some(input.into());
111 self
112 }
113 /// <p>When the number of entities is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of entities, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>QueryGraph</code> to list the next set of entities.</p>
114 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115 self.next_token = input;
116 self
117 }
118 /// <p>When the number of entities is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of entities, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>QueryGraph</code> to list the next set of entities.</p>
119 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
120 &self.next_token
121 }
122 /// <p>Additional details on the queried entity that can be requested in the response.</p>
123 pub fn additional_attributes(mut self, input: crate::types::AdditionalAttributes) -> Self {
124 self.additional_attributes = ::std::option::Option::Some(input);
125 self
126 }
127 /// <p>Additional details on the queried entity that can be requested in the response.</p>
128 pub fn set_additional_attributes(mut self, input: ::std::option::Option<crate::types::AdditionalAttributes>) -> Self {
129 self.additional_attributes = input;
130 self
131 }
132 /// <p>Additional details on the queried entity that can be requested in the response.</p>
133 pub fn get_additional_attributes(&self) -> &::std::option::Option<crate::types::AdditionalAttributes> {
134 &self.additional_attributes
135 }
136 /// Consumes the builder and constructs a [`QueryGraphInput`](crate::operation::query_graph::QueryGraphInput).
137 pub fn build(self) -> ::std::result::Result<crate::operation::query_graph::QueryGraphInput, ::aws_smithy_types::error::operation::BuildError> {
138 ::std::result::Result::Ok(crate::operation::query_graph::QueryGraphInput {
139 domain_identifier: self.domain_identifier,
140 r#match: self.r#match,
141 max_results: self.max_results,
142 next_token: self.next_token,
143 additional_attributes: self.additional_attributes,
144 })
145 }
146}