aws_sdk_rekognition/operation/describe_projects/
_describe_projects_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 DescribeProjectsInput {
6    /// <p>If the previous response was incomplete (because there is more results to retrieve), Rekognition returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.</p>
7    pub next_token: ::std::option::Option<::std::string::String>,
8    /// <p>The maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.</p>
9    pub max_results: ::std::option::Option<i32>,
10    /// <p>A list of the projects that you want Rekognition to describe. If you don't specify a value, the response includes descriptions for all the projects in your AWS account.</p>
11    pub project_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12    /// <p>Specifies the type of customization to filter projects by. If no value is specified, CUSTOM_LABELS is used as a default.</p>
13    pub features: ::std::option::Option<::std::vec::Vec<crate::types::CustomizationFeature>>,
14}
15impl DescribeProjectsInput {
16    /// <p>If the previous response was incomplete (because there is more results to retrieve), Rekognition returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.</p>
17    pub fn next_token(&self) -> ::std::option::Option<&str> {
18        self.next_token.as_deref()
19    }
20    /// <p>The maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.</p>
21    pub fn max_results(&self) -> ::std::option::Option<i32> {
22        self.max_results
23    }
24    /// <p>A list of the projects that you want Rekognition to describe. If you don't specify a value, the response includes descriptions for all the projects in your AWS account.</p>
25    ///
26    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.project_names.is_none()`.
27    pub fn project_names(&self) -> &[::std::string::String] {
28        self.project_names.as_deref().unwrap_or_default()
29    }
30    /// <p>Specifies the type of customization to filter projects by. If no value is specified, CUSTOM_LABELS is used as a default.</p>
31    ///
32    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.features.is_none()`.
33    pub fn features(&self) -> &[crate::types::CustomizationFeature] {
34        self.features.as_deref().unwrap_or_default()
35    }
36}
37impl DescribeProjectsInput {
38    /// Creates a new builder-style object to manufacture [`DescribeProjectsInput`](crate::operation::describe_projects::DescribeProjectsInput).
39    pub fn builder() -> crate::operation::describe_projects::builders::DescribeProjectsInputBuilder {
40        crate::operation::describe_projects::builders::DescribeProjectsInputBuilder::default()
41    }
42}
43
44/// A builder for [`DescribeProjectsInput`](crate::operation::describe_projects::DescribeProjectsInput).
45#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
46#[non_exhaustive]
47pub struct DescribeProjectsInputBuilder {
48    pub(crate) next_token: ::std::option::Option<::std::string::String>,
49    pub(crate) max_results: ::std::option::Option<i32>,
50    pub(crate) project_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
51    pub(crate) features: ::std::option::Option<::std::vec::Vec<crate::types::CustomizationFeature>>,
52}
53impl DescribeProjectsInputBuilder {
54    /// <p>If the previous response was incomplete (because there is more results to retrieve), Rekognition returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.</p>
55    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
56        self.next_token = ::std::option::Option::Some(input.into());
57        self
58    }
59    /// <p>If the previous response was incomplete (because there is more results to retrieve), Rekognition returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.</p>
60    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
61        self.next_token = input;
62        self
63    }
64    /// <p>If the previous response was incomplete (because there is more results to retrieve), Rekognition returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.</p>
65    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
66        &self.next_token
67    }
68    /// <p>The maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.</p>
69    pub fn max_results(mut self, input: i32) -> Self {
70        self.max_results = ::std::option::Option::Some(input);
71        self
72    }
73    /// <p>The maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.</p>
74    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
75        self.max_results = input;
76        self
77    }
78    /// <p>The maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.</p>
79    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
80        &self.max_results
81    }
82    /// Appends an item to `project_names`.
83    ///
84    /// To override the contents of this collection use [`set_project_names`](Self::set_project_names).
85    ///
86    /// <p>A list of the projects that you want Rekognition to describe. If you don't specify a value, the response includes descriptions for all the projects in your AWS account.</p>
87    pub fn project_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        let mut v = self.project_names.unwrap_or_default();
89        v.push(input.into());
90        self.project_names = ::std::option::Option::Some(v);
91        self
92    }
93    /// <p>A list of the projects that you want Rekognition to describe. If you don't specify a value, the response includes descriptions for all the projects in your AWS account.</p>
94    pub fn set_project_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
95        self.project_names = input;
96        self
97    }
98    /// <p>A list of the projects that you want Rekognition to describe. If you don't specify a value, the response includes descriptions for all the projects in your AWS account.</p>
99    pub fn get_project_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
100        &self.project_names
101    }
102    /// Appends an item to `features`.
103    ///
104    /// To override the contents of this collection use [`set_features`](Self::set_features).
105    ///
106    /// <p>Specifies the type of customization to filter projects by. If no value is specified, CUSTOM_LABELS is used as a default.</p>
107    pub fn features(mut self, input: crate::types::CustomizationFeature) -> Self {
108        let mut v = self.features.unwrap_or_default();
109        v.push(input);
110        self.features = ::std::option::Option::Some(v);
111        self
112    }
113    /// <p>Specifies the type of customization to filter projects by. If no value is specified, CUSTOM_LABELS is used as a default.</p>
114    pub fn set_features(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CustomizationFeature>>) -> Self {
115        self.features = input;
116        self
117    }
118    /// <p>Specifies the type of customization to filter projects by. If no value is specified, CUSTOM_LABELS is used as a default.</p>
119    pub fn get_features(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CustomizationFeature>> {
120        &self.features
121    }
122    /// Consumes the builder and constructs a [`DescribeProjectsInput`](crate::operation::describe_projects::DescribeProjectsInput).
123    pub fn build(
124        self,
125    ) -> ::std::result::Result<crate::operation::describe_projects::DescribeProjectsInput, ::aws_smithy_types::error::operation::BuildError> {
126        ::std::result::Result::Ok(crate::operation::describe_projects::DescribeProjectsInput {
127            next_token: self.next_token,
128            max_results: self.max_results,
129            project_names: self.project_names,
130            features: self.features,
131        })
132    }
133}