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
// 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 GetServiceOutput {
/// <p>A structure containing information about the service.</p>
pub service: ::std::option::Option<crate::types::Service>,
/// <p>The start time of the data included in the response. In a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code>.</p>
/// <p>This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.</p>
pub start_time: ::aws_smithy_types::DateTime,
/// <p>The end time of the data included in the response. In a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code>.</p>
/// <p>This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.</p>
pub end_time: ::aws_smithy_types::DateTime,
/// <p>An array of string-to-string maps that each contain information about one log group associated with this service. Each string-to-string map includes the following fields:</p>
/// <ul>
/// <li>
/// <p><code>"Type": "AWS::Resource"</code></p></li>
/// <li>
/// <p><code>"ResourceType": "AWS::Logs::LogGroup"</code></p></li>
/// <li>
/// <p><code>"Identifier": "<i>name-of-log-group</i>"</code></p></li>
/// </ul>
pub log_group_references: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
_request_id: Option<String>,
}
impl GetServiceOutput {
/// <p>A structure containing information about the service.</p>
pub fn service(&self) -> ::std::option::Option<&crate::types::Service> {
self.service.as_ref()
}
/// <p>The start time of the data included in the response. In a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code>.</p>
/// <p>This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.</p>
pub fn start_time(&self) -> &::aws_smithy_types::DateTime {
&self.start_time
}
/// <p>The end time of the data included in the response. In a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code>.</p>
/// <p>This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.</p>
pub fn end_time(&self) -> &::aws_smithy_types::DateTime {
&self.end_time
}
/// <p>An array of string-to-string maps that each contain information about one log group associated with this service. Each string-to-string map includes the following fields:</p>
/// <ul>
/// <li>
/// <p><code>"Type": "AWS::Resource"</code></p></li>
/// <li>
/// <p><code>"ResourceType": "AWS::Logs::LogGroup"</code></p></li>
/// <li>
/// <p><code>"Identifier": "<i>name-of-log-group</i>"</code></p></li>
/// </ul>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.log_group_references.is_none()`.
pub fn log_group_references(&self) -> &[::std::collections::HashMap<::std::string::String, ::std::string::String>] {
self.log_group_references.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for GetServiceOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetServiceOutput {
/// Creates a new builder-style object to manufacture [`GetServiceOutput`](crate::operation::get_service::GetServiceOutput).
pub fn builder() -> crate::operation::get_service::builders::GetServiceOutputBuilder {
crate::operation::get_service::builders::GetServiceOutputBuilder::default()
}
}
/// A builder for [`GetServiceOutput`](crate::operation::get_service::GetServiceOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetServiceOutputBuilder {
pub(crate) service: ::std::option::Option<crate::types::Service>,
pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) log_group_references:
::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
_request_id: Option<String>,
}
impl GetServiceOutputBuilder {
/// <p>A structure containing information about the service.</p>
/// This field is required.
pub fn service(mut self, input: crate::types::Service) -> Self {
self.service = ::std::option::Option::Some(input);
self
}
/// <p>A structure containing information about the service.</p>
pub fn set_service(mut self, input: ::std::option::Option<crate::types::Service>) -> Self {
self.service = input;
self
}
/// <p>A structure containing information about the service.</p>
pub fn get_service(&self) -> &::std::option::Option<crate::types::Service> {
&self.service
}
/// <p>The start time of the data included in the response. In a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code>.</p>
/// <p>This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.</p>
/// This field is required.
pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.start_time = ::std::option::Option::Some(input);
self
}
/// <p>The start time of the data included in the response. In a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code>.</p>
/// <p>This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.</p>
pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.start_time = input;
self
}
/// <p>The start time of the data included in the response. In a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code>.</p>
/// <p>This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.</p>
pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.start_time
}
/// <p>The end time of the data included in the response. In a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code>.</p>
/// <p>This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.</p>
/// This field is required.
pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.end_time = ::std::option::Option::Some(input);
self
}
/// <p>The end time of the data included in the response. In a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code>.</p>
/// <p>This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.</p>
pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.end_time = input;
self
}
/// <p>The end time of the data included in the response. In a raw HTTP Query API, it is formatted as be epoch time in seconds. For example: <code>1698778057</code>.</p>
/// <p>This displays the time that Application Signals used for the request. It might not match your request exactly, because it was rounded to the nearest hour.</p>
pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.end_time
}
/// Appends an item to `log_group_references`.
///
/// To override the contents of this collection use [`set_log_group_references`](Self::set_log_group_references).
///
/// <p>An array of string-to-string maps that each contain information about one log group associated with this service. Each string-to-string map includes the following fields:</p>
/// <ul>
/// <li>
/// <p><code>"Type": "AWS::Resource"</code></p></li>
/// <li>
/// <p><code>"ResourceType": "AWS::Logs::LogGroup"</code></p></li>
/// <li>
/// <p><code>"Identifier": "<i>name-of-log-group</i>"</code></p></li>
/// </ul>
pub fn log_group_references(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::string::String>) -> Self {
let mut v = self.log_group_references.unwrap_or_default();
v.push(input);
self.log_group_references = ::std::option::Option::Some(v);
self
}
/// <p>An array of string-to-string maps that each contain information about one log group associated with this service. Each string-to-string map includes the following fields:</p>
/// <ul>
/// <li>
/// <p><code>"Type": "AWS::Resource"</code></p></li>
/// <li>
/// <p><code>"ResourceType": "AWS::Logs::LogGroup"</code></p></li>
/// <li>
/// <p><code>"Identifier": "<i>name-of-log-group</i>"</code></p></li>
/// </ul>
pub fn set_log_group_references(
mut self,
input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>>,
) -> Self {
self.log_group_references = input;
self
}
/// <p>An array of string-to-string maps that each contain information about one log group associated with this service. Each string-to-string map includes the following fields:</p>
/// <ul>
/// <li>
/// <p><code>"Type": "AWS::Resource"</code></p></li>
/// <li>
/// <p><code>"ResourceType": "AWS::Logs::LogGroup"</code></p></li>
/// <li>
/// <p><code>"Identifier": "<i>name-of-log-group</i>"</code></p></li>
/// </ul>
pub fn get_log_group_references(
&self,
) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::string::String>>> {
&self.log_group_references
}
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 [`GetServiceOutput`](crate::operation::get_service::GetServiceOutput).
/// This method will fail if any of the following fields are not set:
/// - [`start_time`](crate::operation::get_service::builders::GetServiceOutputBuilder::start_time)
/// - [`end_time`](crate::operation::get_service::builders::GetServiceOutputBuilder::end_time)
pub fn build(self) -> ::std::result::Result<crate::operation::get_service::GetServiceOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_service::GetServiceOutput {
service: self.service,
start_time: self.start_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"start_time",
"start_time was not specified but it is required when building GetServiceOutput",
)
})?,
end_time: self.end_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"end_time",
"end_time was not specified but it is required when building GetServiceOutput",
)
})?,
log_group_references: self.log_group_references,
_request_id: self._request_id,
})
}
}