aws_sdk_rekognition/operation/get_person_tracking/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_person_tracking::_get_person_tracking_output::GetPersonTrackingOutputBuilder;
3
4pub use crate::operation::get_person_tracking::_get_person_tracking_input::GetPersonTrackingInputBuilder;
5
6impl crate::operation::get_person_tracking::builders::GetPersonTrackingInputBuilder {
7    /// Sends a request with this input using the given client.
8    pub async fn send_with(
9        self,
10        client: &crate::Client,
11    ) -> ::std::result::Result<
12        crate::operation::get_person_tracking::GetPersonTrackingOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_person_tracking::GetPersonTrackingError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_person_tracking();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetPersonTracking`.
24///
25/// <note>
26/// <p><i>End of support notice:</i> On October 31, 2025, AWS will discontinue support for Amazon Rekognition People Pathing. After October 31, 2025, you will no longer be able to use the Rekognition People Pathing capability. For more information, visit this <a href="https://aws.amazon.com/blogs/machine-learning/transitioning-from-amazon-rekognition-people-pathing-exploring-other-alternatives/">blog post</a>.</p>
27/// </note>
28/// <p>Gets the path tracking results of a Amazon Rekognition Video analysis started by <code>StartPersonTracking</code>.</p>
29/// <p>The person path tracking operation is started by a call to <code>StartPersonTracking</code> which returns a job identifier (<code>JobId</code>). When the operation finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to <code>StartPersonTracking</code>.</p>
30/// <p>To get the results of the person path tracking operation, first check that the status value published to the Amazon SNS topic is <code>SUCCEEDED</code>. If so, call <code>GetPersonTracking</code> and pass the job identifier (<code>JobId</code>) from the initial call to <code>StartPersonTracking</code>.</p>
31/// <p><code>GetPersonTracking</code> returns an array, <code>Persons</code>, of tracked persons and the time(s) their paths were tracked in the video.</p><note>
32/// <p><code>GetPersonTracking</code> only returns the default facial attributes (<code>BoundingBox</code>, <code>Confidence</code>, <code>Landmarks</code>, <code>Pose</code>, and <code>Quality</code>). The other facial attributes listed in the <code>Face</code> object of the following response syntax are not returned.</p>
33/// <p>For more information, see FaceDetail in the Amazon Rekognition Developer Guide.</p>
34/// </note>
35/// <p>By default, the array is sorted by the time(s) a person's path is tracked in the video. You can sort by tracked persons by specifying <code>INDEX</code> for the <code>SortBy</code> input parameter.</p>
36/// <p>Use the <code>MaxResults</code> parameter to limit the number of items returned. If there are more results than specified in <code>MaxResults</code>, the value of <code>NextToken</code> in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call <code>GetPersonTracking</code> and populate the <code>NextToken</code> request parameter with the token value returned from the previous call to <code>GetPersonTracking</code>.</p>
37#[derive(::std::clone::Clone, ::std::fmt::Debug)]
38pub struct GetPersonTrackingFluentBuilder {
39    handle: ::std::sync::Arc<crate::client::Handle>,
40    inner: crate::operation::get_person_tracking::builders::GetPersonTrackingInputBuilder,
41    config_override: ::std::option::Option<crate::config::Builder>,
42}
43impl
44    crate::client::customize::internal::CustomizableSend<
45        crate::operation::get_person_tracking::GetPersonTrackingOutput,
46        crate::operation::get_person_tracking::GetPersonTrackingError,
47    > for GetPersonTrackingFluentBuilder
48{
49    fn send(
50        self,
51        config_override: crate::config::Builder,
52    ) -> crate::client::customize::internal::BoxFuture<
53        crate::client::customize::internal::SendResult<
54            crate::operation::get_person_tracking::GetPersonTrackingOutput,
55            crate::operation::get_person_tracking::GetPersonTrackingError,
56        >,
57    > {
58        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
59    }
60}
61impl GetPersonTrackingFluentBuilder {
62    /// Creates a new `GetPersonTrackingFluentBuilder`.
63    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
64        Self {
65            handle,
66            inner: ::std::default::Default::default(),
67            config_override: ::std::option::Option::None,
68        }
69    }
70    /// Access the GetPersonTracking as a reference.
71    pub fn as_input(&self) -> &crate::operation::get_person_tracking::builders::GetPersonTrackingInputBuilder {
72        &self.inner
73    }
74    /// Sends the request and returns the response.
75    ///
76    /// If an error occurs, an `SdkError` will be returned with additional details that
77    /// can be matched against.
78    ///
79    /// By default, any retryable failures will be retried twice. Retry behavior
80    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
81    /// set when configuring the client.
82    pub async fn send(
83        self,
84    ) -> ::std::result::Result<
85        crate::operation::get_person_tracking::GetPersonTrackingOutput,
86        ::aws_smithy_runtime_api::client::result::SdkError<
87            crate::operation::get_person_tracking::GetPersonTrackingError,
88            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
89        >,
90    > {
91        let input = self
92            .inner
93            .build()
94            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
95        let runtime_plugins = crate::operation::get_person_tracking::GetPersonTracking::operation_runtime_plugins(
96            self.handle.runtime_plugins.clone(),
97            &self.handle.conf,
98            self.config_override,
99        );
100        crate::operation::get_person_tracking::GetPersonTracking::orchestrate(&runtime_plugins, input).await
101    }
102
103    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
104    pub fn customize(
105        self,
106    ) -> crate::client::customize::CustomizableOperation<
107        crate::operation::get_person_tracking::GetPersonTrackingOutput,
108        crate::operation::get_person_tracking::GetPersonTrackingError,
109        Self,
110    > {
111        crate::client::customize::CustomizableOperation::new(self)
112    }
113    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
114        self.set_config_override(::std::option::Option::Some(config_override.into()));
115        self
116    }
117
118    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
119        self.config_override = config_override;
120        self
121    }
122    /// Create a paginator for this request
123    ///
124    /// Paginators are used by calling [`send().await`](crate::operation::get_person_tracking::paginator::GetPersonTrackingPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
125    pub fn into_paginator(self) -> crate::operation::get_person_tracking::paginator::GetPersonTrackingPaginator {
126        crate::operation::get_person_tracking::paginator::GetPersonTrackingPaginator::new(self.handle, self.inner)
127    }
128    /// <p>The identifier for a job that tracks persons in a video. You get the <code>JobId</code> from a call to <code>StartPersonTracking</code>.</p>
129    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.inner = self.inner.job_id(input.into());
131        self
132    }
133    /// <p>The identifier for a job that tracks persons in a video. You get the <code>JobId</code> from a call to <code>StartPersonTracking</code>.</p>
134    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.inner = self.inner.set_job_id(input);
136        self
137    }
138    /// <p>The identifier for a job that tracks persons in a video. You get the <code>JobId</code> from a call to <code>StartPersonTracking</code>.</p>
139    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
140        self.inner.get_job_id()
141    }
142    /// <p>Maximum number of results to return per paginated call. The largest value you can specify is 1000. If you specify a value greater than 1000, a maximum of 1000 results is returned. The default value is 1000.</p>
143    pub fn max_results(mut self, input: i32) -> Self {
144        self.inner = self.inner.max_results(input);
145        self
146    }
147    /// <p>Maximum number of results to return per paginated call. The largest value you can specify is 1000. If you specify a value greater than 1000, a maximum of 1000 results is returned. The default value is 1000.</p>
148    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
149        self.inner = self.inner.set_max_results(input);
150        self
151    }
152    /// <p>Maximum number of results to return per paginated call. The largest value you can specify is 1000. If you specify a value greater than 1000, a maximum of 1000 results is returned. The default value is 1000.</p>
153    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
154        self.inner.get_max_results()
155    }
156    /// <p>If the previous response was incomplete (because there are more persons to retrieve), Amazon Rekognition Video returns a pagination token in the response. You can use this pagination token to retrieve the next set of persons.</p>
157    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
158        self.inner = self.inner.next_token(input.into());
159        self
160    }
161    /// <p>If the previous response was incomplete (because there are more persons to retrieve), Amazon Rekognition Video returns a pagination token in the response. You can use this pagination token to retrieve the next set of persons.</p>
162    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
163        self.inner = self.inner.set_next_token(input);
164        self
165    }
166    /// <p>If the previous response was incomplete (because there are more persons to retrieve), Amazon Rekognition Video returns a pagination token in the response. You can use this pagination token to retrieve the next set of persons.</p>
167    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
168        self.inner.get_next_token()
169    }
170    /// <p>Sort to use for elements in the <code>Persons</code> array. Use <code>TIMESTAMP</code> to sort array elements by the time persons are detected. Use <code>INDEX</code> to sort by the tracked persons. If you sort by <code>INDEX</code>, the array elements for each person are sorted by detection confidence. The default sort is by <code>TIMESTAMP</code>.</p>
171    pub fn sort_by(mut self, input: crate::types::PersonTrackingSortBy) -> Self {
172        self.inner = self.inner.sort_by(input);
173        self
174    }
175    /// <p>Sort to use for elements in the <code>Persons</code> array. Use <code>TIMESTAMP</code> to sort array elements by the time persons are detected. Use <code>INDEX</code> to sort by the tracked persons. If you sort by <code>INDEX</code>, the array elements for each person are sorted by detection confidence. The default sort is by <code>TIMESTAMP</code>.</p>
176    pub fn set_sort_by(mut self, input: ::std::option::Option<crate::types::PersonTrackingSortBy>) -> Self {
177        self.inner = self.inner.set_sort_by(input);
178        self
179    }
180    /// <p>Sort to use for elements in the <code>Persons</code> array. Use <code>TIMESTAMP</code> to sort array elements by the time persons are detected. Use <code>INDEX</code> to sort by the tracked persons. If you sort by <code>INDEX</code>, the array elements for each person are sorted by detection confidence. The default sort is by <code>TIMESTAMP</code>.</p>
181    pub fn get_sort_by(&self) -> &::std::option::Option<crate::types::PersonTrackingSortBy> {
182        self.inner.get_sort_by()
183    }
184}