aws_sdk_support/operation/describe_communications/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::describe_communications::_describe_communications_output::DescribeCommunicationsOutputBuilder;
3
4pub use crate::operation::describe_communications::_describe_communications_input::DescribeCommunicationsInputBuilder;
5
6impl crate::operation::describe_communications::builders::DescribeCommunicationsInputBuilder {
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_communications::DescribeCommunicationsOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::describe_communications::DescribeCommunicationsError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.describe_communications();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `DescribeCommunications`.
24///
25/// <p>Returns communications and attachments for one or more support cases. Use the <code>afterTime</code> and <code>beforeTime</code> parameters to filter by date. You can use the <code>caseId</code> parameter to restrict the results to a specific case.</p>
26/// <p>Case data is available for 12 months after creation. If a case was created more than 12 months ago, a request for data might cause an error.</p>
27/// <p>You can use the <code>maxResults</code> and <code>nextToken</code> parameters to control the pagination of the results. Set <code>maxResults</code> to the number of cases that you want to display on each page, and use <code>nextToken</code> to specify the resumption of pagination.</p><note>
28/// <ul>
29/// <li>
30/// <p>You must have a Business, Enterprise On-Ramp, or Enterprise Support plan to use the Amazon Web Services Support API.</p></li>
31/// <li>
32/// <p>If you call the Amazon Web Services Support API from an account that doesn't have a Business, Enterprise On-Ramp, or Enterprise Support plan, the <code>SubscriptionRequiredException</code> error message appears. For information about changing your support plan, see <a href="http://aws.amazon.com/premiumsupport/">Amazon Web Services Support</a>.</p></li>
33/// </ul>
34/// </note>
35#[derive(::std::clone::Clone, ::std::fmt::Debug)]
36pub struct DescribeCommunicationsFluentBuilder {
37    handle: ::std::sync::Arc<crate::client::Handle>,
38    inner: crate::operation::describe_communications::builders::DescribeCommunicationsInputBuilder,
39    config_override: ::std::option::Option<crate::config::Builder>,
40}
41impl
42    crate::client::customize::internal::CustomizableSend<
43        crate::operation::describe_communications::DescribeCommunicationsOutput,
44        crate::operation::describe_communications::DescribeCommunicationsError,
45    > for DescribeCommunicationsFluentBuilder
46{
47    fn send(
48        self,
49        config_override: crate::config::Builder,
50    ) -> crate::client::customize::internal::BoxFuture<
51        crate::client::customize::internal::SendResult<
52            crate::operation::describe_communications::DescribeCommunicationsOutput,
53            crate::operation::describe_communications::DescribeCommunicationsError,
54        >,
55    > {
56        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
57    }
58}
59impl DescribeCommunicationsFluentBuilder {
60    /// Creates a new `DescribeCommunicationsFluentBuilder`.
61    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
62        Self {
63            handle,
64            inner: ::std::default::Default::default(),
65            config_override: ::std::option::Option::None,
66        }
67    }
68    /// Access the DescribeCommunications as a reference.
69    pub fn as_input(&self) -> &crate::operation::describe_communications::builders::DescribeCommunicationsInputBuilder {
70        &self.inner
71    }
72    /// Sends the request and returns the response.
73    ///
74    /// If an error occurs, an `SdkError` will be returned with additional details that
75    /// can be matched against.
76    ///
77    /// By default, any retryable failures will be retried twice. Retry behavior
78    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
79    /// set when configuring the client.
80    pub async fn send(
81        self,
82    ) -> ::std::result::Result<
83        crate::operation::describe_communications::DescribeCommunicationsOutput,
84        ::aws_smithy_runtime_api::client::result::SdkError<
85            crate::operation::describe_communications::DescribeCommunicationsError,
86            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
87        >,
88    > {
89        let input = self
90            .inner
91            .build()
92            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
93        let runtime_plugins = crate::operation::describe_communications::DescribeCommunications::operation_runtime_plugins(
94            self.handle.runtime_plugins.clone(),
95            &self.handle.conf,
96            self.config_override,
97        );
98        crate::operation::describe_communications::DescribeCommunications::orchestrate(&runtime_plugins, input).await
99    }
100
101    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
102    pub fn customize(
103        self,
104    ) -> crate::client::customize::CustomizableOperation<
105        crate::operation::describe_communications::DescribeCommunicationsOutput,
106        crate::operation::describe_communications::DescribeCommunicationsError,
107        Self,
108    > {
109        crate::client::customize::CustomizableOperation::new(self)
110    }
111    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
112        self.set_config_override(::std::option::Option::Some(config_override.into()));
113        self
114    }
115
116    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
117        self.config_override = config_override;
118        self
119    }
120    /// Create a paginator for this request
121    ///
122    /// Paginators are used by calling [`send().await`](crate::operation::describe_communications::paginator::DescribeCommunicationsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
123    pub fn into_paginator(self) -> crate::operation::describe_communications::paginator::DescribeCommunicationsPaginator {
124        crate::operation::describe_communications::paginator::DescribeCommunicationsPaginator::new(self.handle, self.inner)
125    }
126    /// <p>The support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-<i>12345678910-2013-c4c1d2bf33c5cf47</i></p>
127    pub fn case_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
128        self.inner = self.inner.case_id(input.into());
129        self
130    }
131    /// <p>The support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-<i>12345678910-2013-c4c1d2bf33c5cf47</i></p>
132    pub fn set_case_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
133        self.inner = self.inner.set_case_id(input);
134        self
135    }
136    /// <p>The support case ID requested or returned in the call. The case ID is an alphanumeric string formatted as shown in this example: case-<i>12345678910-2013-c4c1d2bf33c5cf47</i></p>
137    pub fn get_case_id(&self) -> &::std::option::Option<::std::string::String> {
138        self.inner.get_case_id()
139    }
140    /// <p>The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.</p>
141    pub fn before_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.inner = self.inner.before_time(input.into());
143        self
144    }
145    /// <p>The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.</p>
146    pub fn set_before_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.inner = self.inner.set_before_time(input);
148        self
149    }
150    /// <p>The end date for a filtered date search on support case communications. Case communications are available for 12 months after creation.</p>
151    pub fn get_before_time(&self) -> &::std::option::Option<::std::string::String> {
152        self.inner.get_before_time()
153    }
154    /// <p>The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.</p>
155    pub fn after_time(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156        self.inner = self.inner.after_time(input.into());
157        self
158    }
159    /// <p>The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.</p>
160    pub fn set_after_time(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161        self.inner = self.inner.set_after_time(input);
162        self
163    }
164    /// <p>The start date for a filtered date search on support case communications. Case communications are available for 12 months after creation.</p>
165    pub fn get_after_time(&self) -> &::std::option::Option<::std::string::String> {
166        self.inner.get_after_time()
167    }
168    /// <p>A resumption point for pagination.</p>
169    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
170        self.inner = self.inner.next_token(input.into());
171        self
172    }
173    /// <p>A resumption point for pagination.</p>
174    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
175        self.inner = self.inner.set_next_token(input);
176        self
177    }
178    /// <p>A resumption point for pagination.</p>
179    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
180        self.inner.get_next_token()
181    }
182    /// <p>The maximum number of results to return before paginating.</p>
183    pub fn max_results(mut self, input: i32) -> Self {
184        self.inner = self.inner.max_results(input);
185        self
186    }
187    /// <p>The maximum number of results to return before paginating.</p>
188    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
189        self.inner = self.inner.set_max_results(input);
190        self
191    }
192    /// <p>The maximum number of results to return before paginating.</p>
193    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
194        self.inner.get_max_results()
195    }
196}