1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateInstrumentationConfigurationOutput {
/// <p>The type of instrumentation that was created, echoed from the request.</p>
pub instrumentation_type: crate::types::InstrumentationType,
/// <p>The service name for the instrumentation configuration, echoed from the request.</p>
pub service: ::std::string::String,
/// <p>The environment for the instrumentation configuration, echoed from the request.</p>
pub environment: ::std::string::String,
/// <p>The telemetry signal type for the instrumentation configuration, echoed from the request.</p>
pub signal_type: crate::types::DynamicInstrumentationSignalType,
/// <p>The location where instrumentation is applied, echoed from the request.</p>
pub location: ::std::option::Option<crate::types::Location>,
/// <p>A stable hash computed from the location that uniquely identifies this instrumentation point within the service, environment, and signal type.</p>
pub location_hash: ::std::string::String,
/// <p>The optional description that was stored with the instrumentation configuration.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>The timestamp after which this configuration is no longer served to clients. Present only for <code>BREAKPOINT</code> configurations; <code>PROBE</code> configurations do not expire.</p>
pub expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The attribute filters returned with the configuration so SDKs can perform client-side targeting.</p>
pub attribute_filters: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
/// <p>The capture settings that were stored for this instrumentation configuration.</p>
pub capture_configuration: ::std::option::Option<crate::types::CaptureConfiguration>,
/// <p>The server-generated creation timestamp for this instrumentation configuration.</p>
pub created_at: ::aws_smithy_types::DateTime,
/// ARN for the created instrumentation configuration
pub arn: ::std::string::String,
_request_id: Option<String>,
}
impl CreateInstrumentationConfigurationOutput {
/// <p>The type of instrumentation that was created, echoed from the request.</p>
pub fn instrumentation_type(&self) -> &crate::types::InstrumentationType {
&self.instrumentation_type
}
/// <p>The service name for the instrumentation configuration, echoed from the request.</p>
pub fn service(&self) -> &str {
use std::ops::Deref;
self.service.deref()
}
/// <p>The environment for the instrumentation configuration, echoed from the request.</p>
pub fn environment(&self) -> &str {
use std::ops::Deref;
self.environment.deref()
}
/// <p>The telemetry signal type for the instrumentation configuration, echoed from the request.</p>
pub fn signal_type(&self) -> &crate::types::DynamicInstrumentationSignalType {
&self.signal_type
}
/// <p>The location where instrumentation is applied, echoed from the request.</p>
pub fn location(&self) -> ::std::option::Option<&crate::types::Location> {
self.location.as_ref()
}
/// <p>A stable hash computed from the location that uniquely identifies this instrumentation point within the service, environment, and signal type.</p>
pub fn location_hash(&self) -> &str {
use std::ops::Deref;
self.location_hash.deref()
}
/// <p>The optional description that was stored with the instrumentation configuration.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The timestamp after which this configuration is no longer served to clients. Present only for <code>BREAKPOINT</code> configurations; <code>PROBE</code> configurations do not expire.</p>
pub fn expires_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.expires_at.as_ref()
}
/// <p>The attribute filters returned with the configuration so SDKs can perform client-side targeting.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.attribute_filters.is_none()`.
pub fn attribute_filters(&self) -> &[::std::collections::HashMap<::std::string::String, ::std::string::String>] {
self.attribute_filters.as_deref().unwrap_or_default()
}
/// <p>The capture settings that were stored for this instrumentation configuration.</p>
pub fn capture_configuration(&self) -> ::std::option::Option<&crate::types::CaptureConfiguration> {
self.capture_configuration.as_ref()
}
/// <p>The server-generated creation timestamp for this instrumentation configuration.</p>
pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
&self.created_at
}
/// ARN for the created instrumentation configuration
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
}
impl ::aws_types::request_id::RequestId for CreateInstrumentationConfigurationOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateInstrumentationConfigurationOutput {
/// Creates a new builder-style object to manufacture [`CreateInstrumentationConfigurationOutput`](crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationOutput).
pub fn builder() -> crate::operation::create_instrumentation_configuration::builders::CreateInstrumentationConfigurationOutputBuilder {
crate::operation::create_instrumentation_configuration::builders::CreateInstrumentationConfigurationOutputBuilder::default()
}
}
/// A builder for [`CreateInstrumentationConfigurationOutput`](crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateInstrumentationConfigurationOutputBuilder {
pub(crate) instrumentation_type: ::std::option::Option<crate::types::InstrumentationType>,
pub(crate) service: ::std::option::Option<::std::string::String>,
pub(crate) environment: ::std::option::Option<::std::string::String>,
pub(crate) signal_type: ::std::option::Option<crate::types::DynamicInstrumentationSignalType>,
pub(crate) location: ::std::option::Option<crate::types::Location>,
pub(crate) location_hash: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) attribute_filters: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
pub(crate) capture_configuration: ::std::option::Option<crate::types::CaptureConfiguration>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) arn: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateInstrumentationConfigurationOutputBuilder {
/// <p>The type of instrumentation that was created, echoed from the request.</p>
/// This field is required.
pub fn instrumentation_type(mut self, input: crate::types::InstrumentationType) -> Self {
self.instrumentation_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of instrumentation that was created, echoed from the request.</p>
pub fn set_instrumentation_type(mut self, input: ::std::option::Option<crate::types::InstrumentationType>) -> Self {
self.instrumentation_type = input;
self
}
/// <p>The type of instrumentation that was created, echoed from the request.</p>
pub fn get_instrumentation_type(&self) -> &::std::option::Option<crate::types::InstrumentationType> {
&self.instrumentation_type
}
/// <p>The service name for the instrumentation configuration, echoed from the request.</p>
/// This field is required.
pub fn service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.service = ::std::option::Option::Some(input.into());
self
}
/// <p>The service name for the instrumentation configuration, echoed from the request.</p>
pub fn set_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.service = input;
self
}
/// <p>The service name for the instrumentation configuration, echoed from the request.</p>
pub fn get_service(&self) -> &::std::option::Option<::std::string::String> {
&self.service
}
/// <p>The environment for the instrumentation configuration, echoed from the request.</p>
/// This field is required.
pub fn environment(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.environment = ::std::option::Option::Some(input.into());
self
}
/// <p>The environment for the instrumentation configuration, echoed from the request.</p>
pub fn set_environment(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.environment = input;
self
}
/// <p>The environment for the instrumentation configuration, echoed from the request.</p>
pub fn get_environment(&self) -> &::std::option::Option<::std::string::String> {
&self.environment
}
/// <p>The telemetry signal type for the instrumentation configuration, echoed from the request.</p>
/// This field is required.
pub fn signal_type(mut self, input: crate::types::DynamicInstrumentationSignalType) -> Self {
self.signal_type = ::std::option::Option::Some(input);
self
}
/// <p>The telemetry signal type for the instrumentation configuration, echoed from the request.</p>
pub fn set_signal_type(mut self, input: ::std::option::Option<crate::types::DynamicInstrumentationSignalType>) -> Self {
self.signal_type = input;
self
}
/// <p>The telemetry signal type for the instrumentation configuration, echoed from the request.</p>
pub fn get_signal_type(&self) -> &::std::option::Option<crate::types::DynamicInstrumentationSignalType> {
&self.signal_type
}
/// <p>The location where instrumentation is applied, echoed from the request.</p>
/// This field is required.
pub fn location(mut self, input: crate::types::Location) -> Self {
self.location = ::std::option::Option::Some(input);
self
}
/// <p>The location where instrumentation is applied, echoed from the request.</p>
pub fn set_location(mut self, input: ::std::option::Option<crate::types::Location>) -> Self {
self.location = input;
self
}
/// <p>The location where instrumentation is applied, echoed from the request.</p>
pub fn get_location(&self) -> &::std::option::Option<crate::types::Location> {
&self.location
}
/// <p>A stable hash computed from the location that uniquely identifies this instrumentation point within the service, environment, and signal type.</p>
/// This field is required.
pub fn location_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.location_hash = ::std::option::Option::Some(input.into());
self
}
/// <p>A stable hash computed from the location that uniquely identifies this instrumentation point within the service, environment, and signal type.</p>
pub fn set_location_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.location_hash = input;
self
}
/// <p>A stable hash computed from the location that uniquely identifies this instrumentation point within the service, environment, and signal type.</p>
pub fn get_location_hash(&self) -> &::std::option::Option<::std::string::String> {
&self.location_hash
}
/// <p>The optional description that was stored with the instrumentation configuration.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>The optional description that was stored with the instrumentation configuration.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>The optional description that was stored with the instrumentation configuration.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>The timestamp after which this configuration is no longer served to clients. Present only for <code>BREAKPOINT</code> configurations; <code>PROBE</code> configurations do not expire.</p>
pub fn expires_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.expires_at = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp after which this configuration is no longer served to clients. Present only for <code>BREAKPOINT</code> configurations; <code>PROBE</code> configurations do not expire.</p>
pub fn set_expires_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.expires_at = input;
self
}
/// <p>The timestamp after which this configuration is no longer served to clients. Present only for <code>BREAKPOINT</code> configurations; <code>PROBE</code> configurations do not expire.</p>
pub fn get_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.expires_at
}
/// Appends an item to `attribute_filters`.
///
/// To override the contents of this collection use [`set_attribute_filters`](Self::set_attribute_filters).
///
/// <p>The attribute filters returned with the configuration so SDKs can perform client-side targeting.</p>
pub fn attribute_filters(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::string::String>) -> Self {
let mut v = self.attribute_filters.unwrap_or_default();
v.push(input);
self.attribute_filters = ::std::option::Option::Some(v);
self
}
/// <p>The attribute filters returned with the configuration so SDKs can perform client-side targeting.</p>
pub fn set_attribute_filters(
mut self,
input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
) -> Self {
self.attribute_filters = input;
self
}
/// <p>The attribute filters returned with the configuration so SDKs can perform client-side targeting.</p>
pub fn get_attribute_filters(
&self,
) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>> {
&self.attribute_filters
}
/// <p>The capture settings that were stored for this instrumentation configuration.</p>
/// This field is required.
pub fn capture_configuration(mut self, input: crate::types::CaptureConfiguration) -> Self {
self.capture_configuration = ::std::option::Option::Some(input);
self
}
/// <p>The capture settings that were stored for this instrumentation configuration.</p>
pub fn set_capture_configuration(mut self, input: ::std::option::Option<crate::types::CaptureConfiguration>) -> Self {
self.capture_configuration = input;
self
}
/// <p>The capture settings that were stored for this instrumentation configuration.</p>
pub fn get_capture_configuration(&self) -> &::std::option::Option<crate::types::CaptureConfiguration> {
&self.capture_configuration
}
/// <p>The server-generated creation timestamp for this instrumentation configuration.</p>
/// This field is required.
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
/// <p>The server-generated creation timestamp for this instrumentation configuration.</p>
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
/// <p>The server-generated creation timestamp for this instrumentation configuration.</p>
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
/// ARN for the created instrumentation configuration
/// This field is required.
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// ARN for the created instrumentation configuration
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// ARN for the created instrumentation configuration
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`CreateInstrumentationConfigurationOutput`](crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationOutput).
/// This method will fail if any of the following fields are not set:
/// - [`instrumentation_type`](crate::operation::create_instrumentation_configuration::builders::CreateInstrumentationConfigurationOutputBuilder::instrumentation_type)
/// - [`service`](crate::operation::create_instrumentation_configuration::builders::CreateInstrumentationConfigurationOutputBuilder::service)
/// - [`environment`](crate::operation::create_instrumentation_configuration::builders::CreateInstrumentationConfigurationOutputBuilder::environment)
/// - [`signal_type`](crate::operation::create_instrumentation_configuration::builders::CreateInstrumentationConfigurationOutputBuilder::signal_type)
/// - [`location_hash`](crate::operation::create_instrumentation_configuration::builders::CreateInstrumentationConfigurationOutputBuilder::location_hash)
/// - [`created_at`](crate::operation::create_instrumentation_configuration::builders::CreateInstrumentationConfigurationOutputBuilder::created_at)
/// - [`arn`](crate::operation::create_instrumentation_configuration::builders::CreateInstrumentationConfigurationOutputBuilder::arn)
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationOutput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(
crate::operation::create_instrumentation_configuration::CreateInstrumentationConfigurationOutput {
instrumentation_type: self.instrumentation_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"instrumentation_type",
"instrumentation_type was not specified but it is required when building CreateInstrumentationConfigurationOutput",
)
})?,
service: self.service.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"service",
"service was not specified but it is required when building CreateInstrumentationConfigurationOutput",
)
})?,
environment: self.environment.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"environment",
"environment was not specified but it is required when building CreateInstrumentationConfigurationOutput",
)
})?,
signal_type: self.signal_type.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"signal_type",
"signal_type was not specified but it is required when building CreateInstrumentationConfigurationOutput",
)
})?,
location: self.location,
location_hash: self.location_hash.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"location_hash",
"location_hash was not specified but it is required when building CreateInstrumentationConfigurationOutput",
)
})?,
description: self.description,
expires_at: self.expires_at,
attribute_filters: self.attribute_filters,
capture_configuration: self.capture_configuration,
created_at: self.created_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"created_at",
"created_at was not specified but it is required when building CreateInstrumentationConfigurationOutput",
)
})?,
arn: self.arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"arn",
"arn was not specified but it is required when building CreateInstrumentationConfigurationOutput",
)
})?,
_request_id: self._request_id,
},
)
}
}