aws_sdk_rekognition/operation/describe_collection/
_describe_collection_output.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 DescribeCollectionOutput {
6    /// <p>The number of faces that are indexed into the collection. To index faces into a collection, use <code>IndexFaces</code>.</p>
7    pub face_count: ::std::option::Option<i64>,
8    /// <p>The version of the face model that's used by the collection for face detection.</p>
9    /// <p>For more information, see Model versioning in the Amazon Rekognition Developer Guide.</p>
10    pub face_model_version: ::std::option::Option<::std::string::String>,
11    /// <p>The Amazon Resource Name (ARN) of the collection.</p>
12    pub collection_arn: ::std::option::Option<::std::string::String>,
13    /// <p>The number of milliseconds since the Unix epoch time until the creation of the collection. The Unix epoch time is 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.</p>
14    pub creation_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
15    /// <p>The number of UserIDs assigned to the specified colleciton.</p>
16    pub user_count: ::std::option::Option<i64>,
17    _request_id: Option<String>,
18}
19impl DescribeCollectionOutput {
20    /// <p>The number of faces that are indexed into the collection. To index faces into a collection, use <code>IndexFaces</code>.</p>
21    pub fn face_count(&self) -> ::std::option::Option<i64> {
22        self.face_count
23    }
24    /// <p>The version of the face model that's used by the collection for face detection.</p>
25    /// <p>For more information, see Model versioning in the Amazon Rekognition Developer Guide.</p>
26    pub fn face_model_version(&self) -> ::std::option::Option<&str> {
27        self.face_model_version.as_deref()
28    }
29    /// <p>The Amazon Resource Name (ARN) of the collection.</p>
30    pub fn collection_arn(&self) -> ::std::option::Option<&str> {
31        self.collection_arn.as_deref()
32    }
33    /// <p>The number of milliseconds since the Unix epoch time until the creation of the collection. The Unix epoch time is 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.</p>
34    pub fn creation_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
35        self.creation_timestamp.as_ref()
36    }
37    /// <p>The number of UserIDs assigned to the specified colleciton.</p>
38    pub fn user_count(&self) -> ::std::option::Option<i64> {
39        self.user_count
40    }
41}
42impl ::aws_types::request_id::RequestId for DescribeCollectionOutput {
43    fn request_id(&self) -> Option<&str> {
44        self._request_id.as_deref()
45    }
46}
47impl DescribeCollectionOutput {
48    /// Creates a new builder-style object to manufacture [`DescribeCollectionOutput`](crate::operation::describe_collection::DescribeCollectionOutput).
49    pub fn builder() -> crate::operation::describe_collection::builders::DescribeCollectionOutputBuilder {
50        crate::operation::describe_collection::builders::DescribeCollectionOutputBuilder::default()
51    }
52}
53
54/// A builder for [`DescribeCollectionOutput`](crate::operation::describe_collection::DescribeCollectionOutput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct DescribeCollectionOutputBuilder {
58    pub(crate) face_count: ::std::option::Option<i64>,
59    pub(crate) face_model_version: ::std::option::Option<::std::string::String>,
60    pub(crate) collection_arn: ::std::option::Option<::std::string::String>,
61    pub(crate) creation_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
62    pub(crate) user_count: ::std::option::Option<i64>,
63    _request_id: Option<String>,
64}
65impl DescribeCollectionOutputBuilder {
66    /// <p>The number of faces that are indexed into the collection. To index faces into a collection, use <code>IndexFaces</code>.</p>
67    pub fn face_count(mut self, input: i64) -> Self {
68        self.face_count = ::std::option::Option::Some(input);
69        self
70    }
71    /// <p>The number of faces that are indexed into the collection. To index faces into a collection, use <code>IndexFaces</code>.</p>
72    pub fn set_face_count(mut self, input: ::std::option::Option<i64>) -> Self {
73        self.face_count = input;
74        self
75    }
76    /// <p>The number of faces that are indexed into the collection. To index faces into a collection, use <code>IndexFaces</code>.</p>
77    pub fn get_face_count(&self) -> &::std::option::Option<i64> {
78        &self.face_count
79    }
80    /// <p>The version of the face model that's used by the collection for face detection.</p>
81    /// <p>For more information, see Model versioning in the Amazon Rekognition Developer Guide.</p>
82    pub fn face_model_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.face_model_version = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>The version of the face model that's used by the collection for face detection.</p>
87    /// <p>For more information, see Model versioning in the Amazon Rekognition Developer Guide.</p>
88    pub fn set_face_model_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.face_model_version = input;
90        self
91    }
92    /// <p>The version of the face model that's used by the collection for face detection.</p>
93    /// <p>For more information, see Model versioning in the Amazon Rekognition Developer Guide.</p>
94    pub fn get_face_model_version(&self) -> &::std::option::Option<::std::string::String> {
95        &self.face_model_version
96    }
97    /// <p>The Amazon Resource Name (ARN) of the collection.</p>
98    pub fn collection_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99        self.collection_arn = ::std::option::Option::Some(input.into());
100        self
101    }
102    /// <p>The Amazon Resource Name (ARN) of the collection.</p>
103    pub fn set_collection_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104        self.collection_arn = input;
105        self
106    }
107    /// <p>The Amazon Resource Name (ARN) of the collection.</p>
108    pub fn get_collection_arn(&self) -> &::std::option::Option<::std::string::String> {
109        &self.collection_arn
110    }
111    /// <p>The number of milliseconds since the Unix epoch time until the creation of the collection. The Unix epoch time is 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.</p>
112    pub fn creation_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
113        self.creation_timestamp = ::std::option::Option::Some(input);
114        self
115    }
116    /// <p>The number of milliseconds since the Unix epoch time until the creation of the collection. The Unix epoch time is 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.</p>
117    pub fn set_creation_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
118        self.creation_timestamp = input;
119        self
120    }
121    /// <p>The number of milliseconds since the Unix epoch time until the creation of the collection. The Unix epoch time is 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.</p>
122    pub fn get_creation_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
123        &self.creation_timestamp
124    }
125    /// <p>The number of UserIDs assigned to the specified colleciton.</p>
126    pub fn user_count(mut self, input: i64) -> Self {
127        self.user_count = ::std::option::Option::Some(input);
128        self
129    }
130    /// <p>The number of UserIDs assigned to the specified colleciton.</p>
131    pub fn set_user_count(mut self, input: ::std::option::Option<i64>) -> Self {
132        self.user_count = input;
133        self
134    }
135    /// <p>The number of UserIDs assigned to the specified colleciton.</p>
136    pub fn get_user_count(&self) -> &::std::option::Option<i64> {
137        &self.user_count
138    }
139    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
140        self._request_id = Some(request_id.into());
141        self
142    }
143
144    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
145        self._request_id = request_id;
146        self
147    }
148    /// Consumes the builder and constructs a [`DescribeCollectionOutput`](crate::operation::describe_collection::DescribeCollectionOutput).
149    pub fn build(self) -> crate::operation::describe_collection::DescribeCollectionOutput {
150        crate::operation::describe_collection::DescribeCollectionOutput {
151            face_count: self.face_count,
152            face_model_version: self.face_model_version,
153            collection_arn: self.collection_arn,
154            creation_timestamp: self.creation_timestamp,
155            user_count: self.user_count,
156            _request_id: self._request_id,
157        }
158    }
159}