aws_sdk_applicationsignals/operation/list_service_operations/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::list_service_operations::_list_service_operations_output::ListServiceOperationsOutputBuilder;
3
4pub use crate::operation::list_service_operations::_list_service_operations_input::ListServiceOperationsInputBuilder;
5
6impl crate::operation::list_service_operations::builders::ListServiceOperationsInputBuilder {
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::list_service_operations::ListServiceOperationsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::list_service_operations::ListServiceOperationsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.list_service_operations();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `ListServiceOperations`.
24///
25/// <p>Returns a list of the <i>operations</i> of this service that have been discovered by Application Signals. Only the operations that were invoked during the specified time range are returned.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct ListServiceOperationsFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::list_service_operations::builders::ListServiceOperationsInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::list_service_operations::ListServiceOperationsOutput,
35 crate::operation::list_service_operations::ListServiceOperationsError,
36 > for ListServiceOperationsFluentBuilder
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::list_service_operations::ListServiceOperationsOutput,
44 crate::operation::list_service_operations::ListServiceOperationsError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl ListServiceOperationsFluentBuilder {
51 /// Creates a new `ListServiceOperationsFluentBuilder`.
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 ListServiceOperations as a reference.
60 pub fn as_input(&self) -> &crate::operation::list_service_operations::builders::ListServiceOperationsInputBuilder {
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::list_service_operations::ListServiceOperationsOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::list_service_operations::ListServiceOperationsError,
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::list_service_operations::ListServiceOperations::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::list_service_operations::ListServiceOperations::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::list_service_operations::ListServiceOperationsOutput,
97 crate::operation::list_service_operations::ListServiceOperationsError,
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::list_service_operations::paginator::ListServiceOperationsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
114 pub fn into_paginator(self) -> crate::operation::list_service_operations::paginator::ListServiceOperationsPaginator {
115 crate::operation::list_service_operations::paginator::ListServiceOperationsPaginator::new(self.handle, self.inner)
116 }
117 /// <p>The start of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code></p>
118 /// <p>Your requested start time will be rounded to the nearest hour.</p>
119 pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
120 self.inner = self.inner.start_time(input);
121 self
122 }
123 /// <p>The start of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code></p>
124 /// <p>Your requested start time will be rounded to the nearest hour.</p>
125 pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
126 self.inner = self.inner.set_start_time(input);
127 self
128 }
129 /// <p>The start of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code></p>
130 /// <p>Your requested start time will be rounded to the nearest hour.</p>
131 pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
132 self.inner.get_start_time()
133 }
134 /// <p>The end of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code></p>
135 /// <p>Your requested end time will be rounded to the nearest hour.</p>
136 pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
137 self.inner = self.inner.end_time(input);
138 self
139 }
140 /// <p>The end of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code></p>
141 /// <p>Your requested end time will be rounded to the nearest hour.</p>
142 pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
143 self.inner = self.inner.set_end_time(input);
144 self
145 }
146 /// <p>The end of the time period to retrieve information about. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code></p>
147 /// <p>Your requested end time will be rounded to the nearest hour.</p>
148 pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
149 self.inner.get_end_time()
150 }
151 ///
152 /// Adds a key-value pair to `KeyAttributes`.
153 ///
154 /// To override the contents of this collection use [`set_key_attributes`](Self::set_key_attributes).
155 ///
156 /// <p>Use this field to specify which service you want to retrieve information for. You must specify at least the <code>Type</code>, <code>Name</code>, and <code>Environment</code> attributes.</p>
157 /// <p>This is a string-to-string map. It can include the following fields.</p>
158 /// <ul>
159 /// <li>
160 /// <p><code>Type</code> designates the type of object this is.</p></li>
161 /// <li>
162 /// <p><code>ResourceType</code> specifies the type of the resource. This field is used only when the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
163 /// <li>
164 /// <p><code>Name</code> specifies the name of the object. This is used only if the value of the <code>Type</code> field is <code>Service</code>, <code>RemoteService</code>, or <code>AWS::Service</code>.</p></li>
165 /// <li>
166 /// <p><code>Identifier</code> identifies the resource objects of this resource. This is used only if the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
167 /// <li>
168 /// <p><code>Environment</code> specifies the location where this object is hosted, or what it belongs to.</p></li>
169 /// </ul>
170 pub fn key_attributes(
171 mut self,
172 k: impl ::std::convert::Into<::std::string::String>,
173 v: impl ::std::convert::Into<::std::string::String>,
174 ) -> Self {
175 self.inner = self.inner.key_attributes(k.into(), v.into());
176 self
177 }
178 /// <p>Use this field to specify which service you want to retrieve information for. You must specify at least the <code>Type</code>, <code>Name</code>, and <code>Environment</code> attributes.</p>
179 /// <p>This is a string-to-string map. It can include the following fields.</p>
180 /// <ul>
181 /// <li>
182 /// <p><code>Type</code> designates the type of object this is.</p></li>
183 /// <li>
184 /// <p><code>ResourceType</code> specifies the type of the resource. This field is used only when the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
185 /// <li>
186 /// <p><code>Name</code> specifies the name of the object. This is used only if the value of the <code>Type</code> field is <code>Service</code>, <code>RemoteService</code>, or <code>AWS::Service</code>.</p></li>
187 /// <li>
188 /// <p><code>Identifier</code> identifies the resource objects of this resource. This is used only if the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
189 /// <li>
190 /// <p><code>Environment</code> specifies the location where this object is hosted, or what it belongs to.</p></li>
191 /// </ul>
192 pub fn set_key_attributes(
193 mut self,
194 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
195 ) -> Self {
196 self.inner = self.inner.set_key_attributes(input);
197 self
198 }
199 /// <p>Use this field to specify which service you want to retrieve information for. You must specify at least the <code>Type</code>, <code>Name</code>, and <code>Environment</code> attributes.</p>
200 /// <p>This is a string-to-string map. It can include the following fields.</p>
201 /// <ul>
202 /// <li>
203 /// <p><code>Type</code> designates the type of object this is.</p></li>
204 /// <li>
205 /// <p><code>ResourceType</code> specifies the type of the resource. This field is used only when the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
206 /// <li>
207 /// <p><code>Name</code> specifies the name of the object. This is used only if the value of the <code>Type</code> field is <code>Service</code>, <code>RemoteService</code>, or <code>AWS::Service</code>.</p></li>
208 /// <li>
209 /// <p><code>Identifier</code> identifies the resource objects of this resource. This is used only if the value of the <code>Type</code> field is <code>Resource</code> or <code>AWS::Resource</code>.</p></li>
210 /// <li>
211 /// <p><code>Environment</code> specifies the location where this object is hosted, or what it belongs to.</p></li>
212 /// </ul>
213 pub fn get_key_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
214 self.inner.get_key_attributes()
215 }
216 /// <p>The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.</p>
217 pub fn max_results(mut self, input: i32) -> Self {
218 self.inner = self.inner.max_results(input);
219 self
220 }
221 /// <p>The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.</p>
222 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
223 self.inner = self.inner.set_max_results(input);
224 self
225 }
226 /// <p>The maximum number of results to return in one operation. If you omit this parameter, the default of 50 is used.</p>
227 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
228 self.inner.get_max_results()
229 }
230 /// <p>Include this value, if it was returned by the previous operation, to get the next set of service operations.</p>
231 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
232 self.inner = self.inner.next_token(input.into());
233 self
234 }
235 /// <p>Include this value, if it was returned by the previous operation, to get the next set of service operations.</p>
236 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
237 self.inner = self.inner.set_next_token(input);
238 self
239 }
240 /// <p>Include this value, if it was returned by the previous operation, to get the next set of service operations.</p>
241 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
242 self.inner.get_next_token()
243 }
244}