aws_sdk_datapipeline/operation/query_objects/
_query_objects_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the parameters for QueryObjects.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct QueryObjectsInput {
7    /// <p>The ID of the pipeline.</p>
8    pub pipeline_id: ::std::option::Option<::std::string::String>,
9    /// <p>The query that defines the objects to be returned. The <code>Query</code> object can contain a maximum of ten selectors. The conditions in the query are limited to top-level String fields in the object. These filters can be applied to components, instances, and attempts.</p>
10    pub query: ::std::option::Option<crate::types::Query>,
11    /// <p>Indicates whether the query applies to components or instances. The possible values are: <code>COMPONENT</code>, <code>INSTANCE</code>, and <code>ATTEMPT</code>.</p>
12    pub sphere: ::std::option::Option<::std::string::String>,
13    /// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>QueryObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
14    pub marker: ::std::option::Option<::std::string::String>,
15    /// <p>The maximum number of object names that <code>QueryObjects</code> will return in a single call. The default value is 100.</p>
16    pub limit: ::std::option::Option<i32>,
17}
18impl QueryObjectsInput {
19    /// <p>The ID of the pipeline.</p>
20    pub fn pipeline_id(&self) -> ::std::option::Option<&str> {
21        self.pipeline_id.as_deref()
22    }
23    /// <p>The query that defines the objects to be returned. The <code>Query</code> object can contain a maximum of ten selectors. The conditions in the query are limited to top-level String fields in the object. These filters can be applied to components, instances, and attempts.</p>
24    pub fn query(&self) -> ::std::option::Option<&crate::types::Query> {
25        self.query.as_ref()
26    }
27    /// <p>Indicates whether the query applies to components or instances. The possible values are: <code>COMPONENT</code>, <code>INSTANCE</code>, and <code>ATTEMPT</code>.</p>
28    pub fn sphere(&self) -> ::std::option::Option<&str> {
29        self.sphere.as_deref()
30    }
31    /// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>QueryObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
32    pub fn marker(&self) -> ::std::option::Option<&str> {
33        self.marker.as_deref()
34    }
35    /// <p>The maximum number of object names that <code>QueryObjects</code> will return in a single call. The default value is 100.</p>
36    pub fn limit(&self) -> ::std::option::Option<i32> {
37        self.limit
38    }
39}
40impl QueryObjectsInput {
41    /// Creates a new builder-style object to manufacture [`QueryObjectsInput`](crate::operation::query_objects::QueryObjectsInput).
42    pub fn builder() -> crate::operation::query_objects::builders::QueryObjectsInputBuilder {
43        crate::operation::query_objects::builders::QueryObjectsInputBuilder::default()
44    }
45}
46
47/// A builder for [`QueryObjectsInput`](crate::operation::query_objects::QueryObjectsInput).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct QueryObjectsInputBuilder {
51    pub(crate) pipeline_id: ::std::option::Option<::std::string::String>,
52    pub(crate) query: ::std::option::Option<crate::types::Query>,
53    pub(crate) sphere: ::std::option::Option<::std::string::String>,
54    pub(crate) marker: ::std::option::Option<::std::string::String>,
55    pub(crate) limit: ::std::option::Option<i32>,
56}
57impl QueryObjectsInputBuilder {
58    /// <p>The ID of the pipeline.</p>
59    /// This field is required.
60    pub fn pipeline_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.pipeline_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The ID of the pipeline.</p>
65    pub fn set_pipeline_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.pipeline_id = input;
67        self
68    }
69    /// <p>The ID of the pipeline.</p>
70    pub fn get_pipeline_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.pipeline_id
72    }
73    /// <p>The query that defines the objects to be returned. The <code>Query</code> object can contain a maximum of ten selectors. The conditions in the query are limited to top-level String fields in the object. These filters can be applied to components, instances, and attempts.</p>
74    pub fn query(mut self, input: crate::types::Query) -> Self {
75        self.query = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>The query that defines the objects to be returned. The <code>Query</code> object can contain a maximum of ten selectors. The conditions in the query are limited to top-level String fields in the object. These filters can be applied to components, instances, and attempts.</p>
79    pub fn set_query(mut self, input: ::std::option::Option<crate::types::Query>) -> Self {
80        self.query = input;
81        self
82    }
83    /// <p>The query that defines the objects to be returned. The <code>Query</code> object can contain a maximum of ten selectors. The conditions in the query are limited to top-level String fields in the object. These filters can be applied to components, instances, and attempts.</p>
84    pub fn get_query(&self) -> &::std::option::Option<crate::types::Query> {
85        &self.query
86    }
87    /// <p>Indicates whether the query applies to components or instances. The possible values are: <code>COMPONENT</code>, <code>INSTANCE</code>, and <code>ATTEMPT</code>.</p>
88    /// This field is required.
89    pub fn sphere(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.sphere = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>Indicates whether the query applies to components or instances. The possible values are: <code>COMPONENT</code>, <code>INSTANCE</code>, and <code>ATTEMPT</code>.</p>
94    pub fn set_sphere(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.sphere = input;
96        self
97    }
98    /// <p>Indicates whether the query applies to components or instances. The possible values are: <code>COMPONENT</code>, <code>INSTANCE</code>, and <code>ATTEMPT</code>.</p>
99    pub fn get_sphere(&self) -> &::std::option::Option<::std::string::String> {
100        &self.sphere
101    }
102    /// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>QueryObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
103    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
104        self.marker = ::std::option::Option::Some(input.into());
105        self
106    }
107    /// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>QueryObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
108    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
109        self.marker = input;
110        self
111    }
112    /// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>QueryObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
113    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
114        &self.marker
115    }
116    /// <p>The maximum number of object names that <code>QueryObjects</code> will return in a single call. The default value is 100.</p>
117    pub fn limit(mut self, input: i32) -> Self {
118        self.limit = ::std::option::Option::Some(input);
119        self
120    }
121    /// <p>The maximum number of object names that <code>QueryObjects</code> will return in a single call. The default value is 100.</p>
122    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
123        self.limit = input;
124        self
125    }
126    /// <p>The maximum number of object names that <code>QueryObjects</code> will return in a single call. The default value is 100.</p>
127    pub fn get_limit(&self) -> &::std::option::Option<i32> {
128        &self.limit
129    }
130    /// Consumes the builder and constructs a [`QueryObjectsInput`](crate::operation::query_objects::QueryObjectsInput).
131    pub fn build(
132        self,
133    ) -> ::std::result::Result<crate::operation::query_objects::QueryObjectsInput, ::aws_smithy_types::error::operation::BuildError> {
134        ::std::result::Result::Ok(crate::operation::query_objects::QueryObjectsInput {
135            pipeline_id: self.pipeline_id,
136            query: self.query,
137            sphere: self.sphere,
138            marker: self.marker,
139            limit: self.limit,
140        })
141    }
142}