aws_sdk_workdocs/operation/describe_activities/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_activities::_describe_activities_output::DescribeActivitiesOutputBuilder;
3
4pub use crate::operation::describe_activities::_describe_activities_input::DescribeActivitiesInputBuilder;
5
6impl crate::operation::describe_activities::builders::DescribeActivitiesInputBuilder {
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::describe_activities::DescribeActivitiesOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_activities::DescribeActivitiesError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_activities();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeActivities`.
24///
25/// <p>Describes the user activities in a specified time period.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DescribeActivitiesFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::describe_activities::builders::DescribeActivitiesInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::describe_activities::DescribeActivitiesOutput,
35        crate::operation::describe_activities::DescribeActivitiesError,
36    > for DescribeActivitiesFluentBuilder
37{
38    fn send(
39        self,
40        config_override: crate::config::Builder,
41    ) -> crate::client::customize::internal::BoxFuture<
42        crate::client::customize::internal::SendResult<
43            crate::operation::describe_activities::DescribeActivitiesOutput,
44            crate::operation::describe_activities::DescribeActivitiesError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl DescribeActivitiesFluentBuilder {
51    /// Creates a new `DescribeActivitiesFluentBuilder`.
52    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53        Self {
54            handle,
55            inner: ::std::default::Default::default(),
56            config_override: ::std::option::Option::None,
57        }
58    }
59    /// Access the DescribeActivities as a reference.
60    pub fn as_input(&self) -> &crate::operation::describe_activities::builders::DescribeActivitiesInputBuilder {
61        &self.inner
62    }
63    /// Sends the request and returns the response.
64    ///
65    /// If an error occurs, an `SdkError` will be returned with additional details that
66    /// can be matched against.
67    ///
68    /// By default, any retryable failures will be retried twice. Retry behavior
69    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70    /// set when configuring the client.
71    pub async fn send(
72        self,
73    ) -> ::std::result::Result<
74        crate::operation::describe_activities::DescribeActivitiesOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::describe_activities::DescribeActivitiesError,
77            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78        >,
79    > {
80        let input = self
81            .inner
82            .build()
83            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84        let runtime_plugins = crate::operation::describe_activities::DescribeActivities::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::describe_activities::DescribeActivities::orchestrate(&runtime_plugins, input).await
90    }
91
92    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93    pub fn customize(
94        self,
95    ) -> crate::client::customize::CustomizableOperation<
96        crate::operation::describe_activities::DescribeActivitiesOutput,
97        crate::operation::describe_activities::DescribeActivitiesError,
98        Self,
99    > {
100        crate::client::customize::CustomizableOperation::new(self)
101    }
102    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103        self.set_config_override(::std::option::Option::Some(config_override.into()));
104        self
105    }
106
107    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108        self.config_override = config_override;
109        self
110    }
111    /// Create a paginator for this request
112    ///
113    /// Paginators are used by calling [`send().await`](crate::operation::describe_activities::paginator::DescribeActivitiesPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114    pub fn into_paginator(self) -> crate::operation::describe_activities::paginator::DescribeActivitiesPaginator {
115        crate::operation::describe_activities::paginator::DescribeActivitiesPaginator::new(self.handle, self.inner)
116    }
117    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
118    pub fn authentication_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119        self.inner = self.inner.authentication_token(input.into());
120        self
121    }
122    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
123    pub fn set_authentication_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.inner = self.inner.set_authentication_token(input);
125        self
126    }
127    /// <p>Amazon WorkDocs authentication token. Not required when using Amazon Web Services administrator credentials to access the API.</p>
128    pub fn get_authentication_token(&self) -> &::std::option::Option<::std::string::String> {
129        self.inner.get_authentication_token()
130    }
131    /// <p>The timestamp that determines the starting time of the activities. The response includes the activities performed after the specified timestamp.</p>
132    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
133        self.inner = self.inner.start_time(input);
134        self
135    }
136    /// <p>The timestamp that determines the starting time of the activities. The response includes the activities performed after the specified timestamp.</p>
137    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
138        self.inner = self.inner.set_start_time(input);
139        self
140    }
141    /// <p>The timestamp that determines the starting time of the activities. The response includes the activities performed after the specified timestamp.</p>
142    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
143        self.inner.get_start_time()
144    }
145    /// <p>The timestamp that determines the end time of the activities. The response includes the activities performed before the specified timestamp.</p>
146    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
147        self.inner = self.inner.end_time(input);
148        self
149    }
150    /// <p>The timestamp that determines the end time of the activities. The response includes the activities performed before the specified timestamp.</p>
151    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
152        self.inner = self.inner.set_end_time(input);
153        self
154    }
155    /// <p>The timestamp that determines the end time of the activities. The response includes the activities performed before the specified timestamp.</p>
156    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
157        self.inner.get_end_time()
158    }
159    /// <p>The ID of the organization. This is a mandatory parameter when using administrative API (SigV4) requests.</p>
160    pub fn organization_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161        self.inner = self.inner.organization_id(input.into());
162        self
163    }
164    /// <p>The ID of the organization. This is a mandatory parameter when using administrative API (SigV4) requests.</p>
165    pub fn set_organization_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166        self.inner = self.inner.set_organization_id(input);
167        self
168    }
169    /// <p>The ID of the organization. This is a mandatory parameter when using administrative API (SigV4) requests.</p>
170    pub fn get_organization_id(&self) -> &::std::option::Option<::std::string::String> {
171        self.inner.get_organization_id()
172    }
173    /// <p>Specifies which activity types to include in the response. If this field is left empty, all activity types are returned.</p>
174    pub fn activity_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
175        self.inner = self.inner.activity_types(input.into());
176        self
177    }
178    /// <p>Specifies which activity types to include in the response. If this field is left empty, all activity types are returned.</p>
179    pub fn set_activity_types(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
180        self.inner = self.inner.set_activity_types(input);
181        self
182    }
183    /// <p>Specifies which activity types to include in the response. If this field is left empty, all activity types are returned.</p>
184    pub fn get_activity_types(&self) -> &::std::option::Option<::std::string::String> {
185        self.inner.get_activity_types()
186    }
187    /// <p>The document or folder ID for which to describe activity types.</p>
188    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189        self.inner = self.inner.resource_id(input.into());
190        self
191    }
192    /// <p>The document or folder ID for which to describe activity types.</p>
193    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194        self.inner = self.inner.set_resource_id(input);
195        self
196    }
197    /// <p>The document or folder ID for which to describe activity types.</p>
198    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
199        self.inner.get_resource_id()
200    }
201    /// <p>The ID of the user who performed the action. The response includes activities pertaining to this user. This is an optional parameter and is only applicable for administrative API (SigV4) requests.</p>
202    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203        self.inner = self.inner.user_id(input.into());
204        self
205    }
206    /// <p>The ID of the user who performed the action. The response includes activities pertaining to this user. This is an optional parameter and is only applicable for administrative API (SigV4) requests.</p>
207    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208        self.inner = self.inner.set_user_id(input);
209        self
210    }
211    /// <p>The ID of the user who performed the action. The response includes activities pertaining to this user. This is an optional parameter and is only applicable for administrative API (SigV4) requests.</p>
212    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
213        self.inner.get_user_id()
214    }
215    /// <p>Includes indirect activities. An indirect activity results from a direct activity performed on a parent resource. For example, sharing a parent folder (the direct activity) shares all of the subfolders and documents within the parent folder (the indirect activity).</p>
216    pub fn include_indirect_activities(mut self, input: bool) -> Self {
217        self.inner = self.inner.include_indirect_activities(input);
218        self
219    }
220    /// <p>Includes indirect activities. An indirect activity results from a direct activity performed on a parent resource. For example, sharing a parent folder (the direct activity) shares all of the subfolders and documents within the parent folder (the indirect activity).</p>
221    pub fn set_include_indirect_activities(mut self, input: ::std::option::Option<bool>) -> Self {
222        self.inner = self.inner.set_include_indirect_activities(input);
223        self
224    }
225    /// <p>Includes indirect activities. An indirect activity results from a direct activity performed on a parent resource. For example, sharing a parent folder (the direct activity) shares all of the subfolders and documents within the parent folder (the indirect activity).</p>
226    pub fn get_include_indirect_activities(&self) -> &::std::option::Option<bool> {
227        self.inner.get_include_indirect_activities()
228    }
229    /// <p>The maximum number of items to return.</p>
230    pub fn limit(mut self, input: i32) -> Self {
231        self.inner = self.inner.limit(input);
232        self
233    }
234    /// <p>The maximum number of items to return.</p>
235    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
236        self.inner = self.inner.set_limit(input);
237        self
238    }
239    /// <p>The maximum number of items to return.</p>
240    pub fn get_limit(&self) -> &::std::option::Option<i32> {
241        self.inner.get_limit()
242    }
243    /// <p>The marker for the next set of results.</p>
244    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
245        self.inner = self.inner.marker(input.into());
246        self
247    }
248    /// <p>The marker for the next set of results.</p>
249    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
250        self.inner = self.inner.set_marker(input);
251        self
252    }
253    /// <p>The marker for the next set of results.</p>
254    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
255        self.inner.get_marker()
256    }
257}