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 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435
// 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)]
pub struct GetResourceMetricsOutput {
/// <p>The start time for the returned metrics, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or
/// equal to the value of the user-specified <code>StartTime</code>.</p>
pub aligned_start_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The end time for the returned metrics, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than
/// or equal to the value of the user-specified <code>Endtime</code>.</p>
pub aligned_end_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from
/// this data source.</p>
/// <p>To use a DB instance as a data source, you specify its
/// <code>DbiResourceId</code> value - for example:
/// <code>db-FAIHNTYBKTGAUSUZQYPDS2GW4A</code>
/// </p>
pub identifier: std::option::Option<std::string::String>,
/// <p>An array of metric results,, where each array element contains all of the data points for a particular dimension.</p>
pub metric_list: std::option::Option<std::vec::Vec<crate::model::MetricKeyDataPoints>>,
/// <p>An optional pagination token provided by a previous request. If
/// this parameter is specified, the response includes only records beyond the token, up to the
/// value specified by <code>MaxRecords</code>.</p>
pub next_token: std::option::Option<std::string::String>,
}
impl GetResourceMetricsOutput {
/// <p>The start time for the returned metrics, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or
/// equal to the value of the user-specified <code>StartTime</code>.</p>
pub fn aligned_start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.aligned_start_time.as_ref()
}
/// <p>The end time for the returned metrics, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than
/// or equal to the value of the user-specified <code>Endtime</code>.</p>
pub fn aligned_end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.aligned_end_time.as_ref()
}
/// <p>An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from
/// this data source.</p>
/// <p>To use a DB instance as a data source, you specify its
/// <code>DbiResourceId</code> value - for example:
/// <code>db-FAIHNTYBKTGAUSUZQYPDS2GW4A</code>
/// </p>
pub fn identifier(&self) -> std::option::Option<&str> {
self.identifier.as_deref()
}
/// <p>An array of metric results,, where each array element contains all of the data points for a particular dimension.</p>
pub fn metric_list(&self) -> std::option::Option<&[crate::model::MetricKeyDataPoints]> {
self.metric_list.as_deref()
}
/// <p>An optional pagination token provided by a previous request. If
/// this parameter is specified, the response includes only records beyond the token, up to the
/// value specified by <code>MaxRecords</code>.</p>
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for GetResourceMetricsOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetResourceMetricsOutput");
formatter.field("aligned_start_time", &self.aligned_start_time);
formatter.field("aligned_end_time", &self.aligned_end_time);
formatter.field("identifier", &self.identifier);
formatter.field("metric_list", &self.metric_list);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
/// See [`GetResourceMetricsOutput`](crate::output::GetResourceMetricsOutput)
pub mod get_resource_metrics_output {
/// A builder for [`GetResourceMetricsOutput`](crate::output::GetResourceMetricsOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) aligned_start_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) aligned_end_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) identifier: std::option::Option<std::string::String>,
pub(crate) metric_list:
std::option::Option<std::vec::Vec<crate::model::MetricKeyDataPoints>>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The start time for the returned metrics, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or
/// equal to the value of the user-specified <code>StartTime</code>.</p>
pub fn aligned_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.aligned_start_time = Some(input);
self
}
/// <p>The start time for the returned metrics, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or
/// equal to the value of the user-specified <code>StartTime</code>.</p>
pub fn set_aligned_start_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.aligned_start_time = input;
self
}
/// <p>The end time for the returned metrics, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than
/// or equal to the value of the user-specified <code>Endtime</code>.</p>
pub fn aligned_end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.aligned_end_time = Some(input);
self
}
/// <p>The end time for the returned metrics, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than
/// or equal to the value of the user-specified <code>Endtime</code>.</p>
pub fn set_aligned_end_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.aligned_end_time = input;
self
}
/// <p>An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from
/// this data source.</p>
/// <p>To use a DB instance as a data source, you specify its
/// <code>DbiResourceId</code> value - for example:
/// <code>db-FAIHNTYBKTGAUSUZQYPDS2GW4A</code>
/// </p>
pub fn identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.identifier = Some(input.into());
self
}
/// <p>An immutable, AWS Region-unique identifier for a data source. Performance Insights gathers metrics from
/// this data source.</p>
/// <p>To use a DB instance as a data source, you specify its
/// <code>DbiResourceId</code> value - for example:
/// <code>db-FAIHNTYBKTGAUSUZQYPDS2GW4A</code>
/// </p>
pub fn set_identifier(mut self, input: std::option::Option<std::string::String>) -> Self {
self.identifier = input;
self
}
/// Appends an item to `metric_list`.
///
/// To override the contents of this collection use [`set_metric_list`](Self::set_metric_list).
///
/// <p>An array of metric results,, where each array element contains all of the data points for a particular dimension.</p>
pub fn metric_list(mut self, input: impl Into<crate::model::MetricKeyDataPoints>) -> Self {
let mut v = self.metric_list.unwrap_or_default();
v.push(input.into());
self.metric_list = Some(v);
self
}
/// <p>An array of metric results,, where each array element contains all of the data points for a particular dimension.</p>
pub fn set_metric_list(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::MetricKeyDataPoints>>,
) -> Self {
self.metric_list = input;
self
}
/// <p>An optional pagination token provided by a previous request. If
/// this parameter is specified, the response includes only records beyond the token, up to the
/// value specified by <code>MaxRecords</code>.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
/// <p>An optional pagination token provided by a previous request. If
/// this parameter is specified, the response includes only records beyond the token, up to the
/// value specified by <code>MaxRecords</code>.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
/// Consumes the builder and constructs a [`GetResourceMetricsOutput`](crate::output::GetResourceMetricsOutput)
pub fn build(self) -> crate::output::GetResourceMetricsOutput {
crate::output::GetResourceMetricsOutput {
aligned_start_time: self.aligned_start_time,
aligned_end_time: self.aligned_end_time,
identifier: self.identifier,
metric_list: self.metric_list,
next_token: self.next_token,
}
}
}
}
impl GetResourceMetricsOutput {
/// Creates a new builder-style object to manufacture [`GetResourceMetricsOutput`](crate::output::GetResourceMetricsOutput)
pub fn builder() -> crate::output::get_resource_metrics_output::Builder {
crate::output::get_resource_metrics_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetDimensionKeyDetailsOutput {
/// <p>The details for the requested dimensions.</p>
pub dimensions: std::option::Option<std::vec::Vec<crate::model::DimensionKeyDetail>>,
}
impl GetDimensionKeyDetailsOutput {
/// <p>The details for the requested dimensions.</p>
pub fn dimensions(&self) -> std::option::Option<&[crate::model::DimensionKeyDetail]> {
self.dimensions.as_deref()
}
}
impl std::fmt::Debug for GetDimensionKeyDetailsOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetDimensionKeyDetailsOutput");
formatter.field("dimensions", &self.dimensions);
formatter.finish()
}
}
/// See [`GetDimensionKeyDetailsOutput`](crate::output::GetDimensionKeyDetailsOutput)
pub mod get_dimension_key_details_output {
/// A builder for [`GetDimensionKeyDetailsOutput`](crate::output::GetDimensionKeyDetailsOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) dimensions: std::option::Option<std::vec::Vec<crate::model::DimensionKeyDetail>>,
}
impl Builder {
/// Appends an item to `dimensions`.
///
/// To override the contents of this collection use [`set_dimensions`](Self::set_dimensions).
///
/// <p>The details for the requested dimensions.</p>
pub fn dimensions(mut self, input: impl Into<crate::model::DimensionKeyDetail>) -> Self {
let mut v = self.dimensions.unwrap_or_default();
v.push(input.into());
self.dimensions = Some(v);
self
}
/// <p>The details for the requested dimensions.</p>
pub fn set_dimensions(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::DimensionKeyDetail>>,
) -> Self {
self.dimensions = input;
self
}
/// Consumes the builder and constructs a [`GetDimensionKeyDetailsOutput`](crate::output::GetDimensionKeyDetailsOutput)
pub fn build(self) -> crate::output::GetDimensionKeyDetailsOutput {
crate::output::GetDimensionKeyDetailsOutput {
dimensions: self.dimensions,
}
}
}
}
impl GetDimensionKeyDetailsOutput {
/// Creates a new builder-style object to manufacture [`GetDimensionKeyDetailsOutput`](crate::output::GetDimensionKeyDetailsOutput)
pub fn builder() -> crate::output::get_dimension_key_details_output::Builder {
crate::output::get_dimension_key_details_output::Builder::default()
}
}
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DescribeDimensionKeysOutput {
/// <p>The start time for the returned dimension keys, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or
/// equal to the value of the user-specified <code>StartTime</code>.</p>
pub aligned_start_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The end time for the returned dimension keys, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than
/// or equal to the value of the user-specified <code>Endtime</code>.</p>
pub aligned_end_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>If <code>PartitionBy</code> was present in the request, <code>PartitionKeys</code> contains the breakdown of dimension keys by the specified partitions.</p>
pub partition_keys: std::option::Option<std::vec::Vec<crate::model::ResponsePartitionKey>>,
/// <p>The dimension keys that were requested.</p>
pub keys: std::option::Option<std::vec::Vec<crate::model::DimensionKeyDescription>>,
/// <p>An optional pagination token provided by a previous request. If
/// this parameter is specified, the response includes only records beyond the token, up to the
/// value specified by <code>MaxRecords</code>.</p>
pub next_token: std::option::Option<std::string::String>,
}
impl DescribeDimensionKeysOutput {
/// <p>The start time for the returned dimension keys, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or
/// equal to the value of the user-specified <code>StartTime</code>.</p>
pub fn aligned_start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.aligned_start_time.as_ref()
}
/// <p>The end time for the returned dimension keys, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than
/// or equal to the value of the user-specified <code>Endtime</code>.</p>
pub fn aligned_end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.aligned_end_time.as_ref()
}
/// <p>If <code>PartitionBy</code> was present in the request, <code>PartitionKeys</code> contains the breakdown of dimension keys by the specified partitions.</p>
pub fn partition_keys(&self) -> std::option::Option<&[crate::model::ResponsePartitionKey]> {
self.partition_keys.as_deref()
}
/// <p>The dimension keys that were requested.</p>
pub fn keys(&self) -> std::option::Option<&[crate::model::DimensionKeyDescription]> {
self.keys.as_deref()
}
/// <p>An optional pagination token provided by a previous request. If
/// this parameter is specified, the response includes only records beyond the token, up to the
/// value specified by <code>MaxRecords</code>.</p>
pub fn next_token(&self) -> std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl std::fmt::Debug for DescribeDimensionKeysOutput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DescribeDimensionKeysOutput");
formatter.field("aligned_start_time", &self.aligned_start_time);
formatter.field("aligned_end_time", &self.aligned_end_time);
formatter.field("partition_keys", &self.partition_keys);
formatter.field("keys", &self.keys);
formatter.field("next_token", &self.next_token);
formatter.finish()
}
}
/// See [`DescribeDimensionKeysOutput`](crate::output::DescribeDimensionKeysOutput)
pub mod describe_dimension_keys_output {
/// A builder for [`DescribeDimensionKeysOutput`](crate::output::DescribeDimensionKeysOutput)
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) aligned_start_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) aligned_end_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) partition_keys:
std::option::Option<std::vec::Vec<crate::model::ResponsePartitionKey>>,
pub(crate) keys: std::option::Option<std::vec::Vec<crate::model::DimensionKeyDescription>>,
pub(crate) next_token: std::option::Option<std::string::String>,
}
impl Builder {
/// <p>The start time for the returned dimension keys, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or
/// equal to the value of the user-specified <code>StartTime</code>.</p>
pub fn aligned_start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.aligned_start_time = Some(input);
self
}
/// <p>The start time for the returned dimension keys, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or
/// equal to the value of the user-specified <code>StartTime</code>.</p>
pub fn set_aligned_start_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.aligned_start_time = input;
self
}
/// <p>The end time for the returned dimension keys, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than
/// or equal to the value of the user-specified <code>Endtime</code>.</p>
pub fn aligned_end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.aligned_end_time = Some(input);
self
}
/// <p>The end time for the returned dimension keys, after alignment to a granular boundary (as
/// specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than
/// or equal to the value of the user-specified <code>Endtime</code>.</p>
pub fn set_aligned_end_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.aligned_end_time = input;
self
}
/// Appends an item to `partition_keys`.
///
/// To override the contents of this collection use [`set_partition_keys`](Self::set_partition_keys).
///
/// <p>If <code>PartitionBy</code> was present in the request, <code>PartitionKeys</code> contains the breakdown of dimension keys by the specified partitions.</p>
pub fn partition_keys(
mut self,
input: impl Into<crate::model::ResponsePartitionKey>,
) -> Self {
let mut v = self.partition_keys.unwrap_or_default();
v.push(input.into());
self.partition_keys = Some(v);
self
}
/// <p>If <code>PartitionBy</code> was present in the request, <code>PartitionKeys</code> contains the breakdown of dimension keys by the specified partitions.</p>
pub fn set_partition_keys(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ResponsePartitionKey>>,
) -> Self {
self.partition_keys = input;
self
}
/// Appends an item to `keys`.
///
/// To override the contents of this collection use [`set_keys`](Self::set_keys).
///
/// <p>The dimension keys that were requested.</p>
pub fn keys(mut self, input: impl Into<crate::model::DimensionKeyDescription>) -> Self {
let mut v = self.keys.unwrap_or_default();
v.push(input.into());
self.keys = Some(v);
self
}
/// <p>The dimension keys that were requested.</p>
pub fn set_keys(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::DimensionKeyDescription>>,
) -> Self {
self.keys = input;
self
}
/// <p>An optional pagination token provided by a previous request. If
/// this parameter is specified, the response includes only records beyond the token, up to the
/// value specified by <code>MaxRecords</code>.</p>
pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
self.next_token = Some(input.into());
self
}
/// <p>An optional pagination token provided by a previous request. If
/// this parameter is specified, the response includes only records beyond the token, up to the
/// value specified by <code>MaxRecords</code>.</p>
pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_token = input;
self
}
/// Consumes the builder and constructs a [`DescribeDimensionKeysOutput`](crate::output::DescribeDimensionKeysOutput)
pub fn build(self) -> crate::output::DescribeDimensionKeysOutput {
crate::output::DescribeDimensionKeysOutput {
aligned_start_time: self.aligned_start_time,
aligned_end_time: self.aligned_end_time,
partition_keys: self.partition_keys,
keys: self.keys,
next_token: self.next_token,
}
}
}
}
impl DescribeDimensionKeysOutput {
/// Creates a new builder-style object to manufacture [`DescribeDimensionKeysOutput`](crate::output::DescribeDimensionKeysOutput)
pub fn builder() -> crate::output::describe_dimension_keys_output::Builder {
crate::output::describe_dimension_keys_output::Builder::default()
}
}