aws-sdk-pi 1.101.0

AWS SDK for AWS Performance Insights
Documentation
// 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 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::types::ResponsePartitionKey>>,
    /// <p>The dimension keys that were requested.</p>
    pub keys: ::std::option::Option<::std::vec::Vec<crate::types::DimensionKeyDescription>>,
    /// <p>A pagination token that indicates the response didn’t return all available records because <code>MaxRecords</code> was specified in the previous request. To get the remaining records, specify <code>NextToken</code> in a separate request with this value.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<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>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.partition_keys.is_none()`.
    pub fn partition_keys(&self) -> &[crate::types::ResponsePartitionKey] {
        self.partition_keys.as_deref().unwrap_or_default()
    }
    /// <p>The dimension keys that were requested.</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 `.keys.is_none()`.
    pub fn keys(&self) -> &[crate::types::DimensionKeyDescription] {
        self.keys.as_deref().unwrap_or_default()
    }
    /// <p>A pagination token that indicates the response didn’t return all available records because <code>MaxRecords</code> was specified in the previous request. To get the remaining records, specify <code>NextToken</code> in a separate request with this value.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeDimensionKeysOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeDimensionKeysOutput {
    /// Creates a new builder-style object to manufacture [`DescribeDimensionKeysOutput`](crate::operation::describe_dimension_keys::DescribeDimensionKeysOutput).
    pub fn builder() -> crate::operation::describe_dimension_keys::builders::DescribeDimensionKeysOutputBuilder {
        crate::operation::describe_dimension_keys::builders::DescribeDimensionKeysOutputBuilder::default()
    }
}

/// A builder for [`DescribeDimensionKeysOutput`](crate::operation::describe_dimension_keys::DescribeDimensionKeysOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeDimensionKeysOutputBuilder {
    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::types::ResponsePartitionKey>>,
    pub(crate) keys: ::std::option::Option<::std::vec::Vec<crate::types::DimensionKeyDescription>>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeDimensionKeysOutputBuilder {
    /// <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 = ::std::option::Option::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 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 get_aligned_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.aligned_start_time
    }
    /// <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 = ::std::option::Option::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
    }
    /// <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 get_aligned_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.aligned_end_time
    }
    /// 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: crate::types::ResponsePartitionKey) -> Self {
        let mut v = self.partition_keys.unwrap_or_default();
        v.push(input);
        self.partition_keys = ::std::option::Option::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::types::ResponsePartitionKey>>) -> Self {
        self.partition_keys = input;
        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 get_partition_keys(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResponsePartitionKey>> {
        &self.partition_keys
    }
    /// 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: crate::types::DimensionKeyDescription) -> Self {
        let mut v = self.keys.unwrap_or_default();
        v.push(input);
        self.keys = ::std::option::Option::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::types::DimensionKeyDescription>>) -> Self {
        self.keys = input;
        self
    }
    /// <p>The dimension keys that were requested.</p>
    pub fn get_keys(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DimensionKeyDescription>> {
        &self.keys
    }
    /// <p>A pagination token that indicates the response didn’t return all available records because <code>MaxRecords</code> was specified in the previous request. To get the remaining records, specify <code>NextToken</code> in a separate request with this value.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A pagination token that indicates the response didn’t return all available records because <code>MaxRecords</code> was specified in the previous request. To get the remaining records, specify <code>NextToken</code> in a separate request with this value.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>A pagination token that indicates the response didn’t return all available records because <code>MaxRecords</code> was specified in the previous request. To get the remaining records, specify <code>NextToken</code> in a separate request with this value.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    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 [`DescribeDimensionKeysOutput`](crate::operation::describe_dimension_keys::DescribeDimensionKeysOutput).
    pub fn build(self) -> crate::operation::describe_dimension_keys::DescribeDimensionKeysOutput {
        crate::operation::describe_dimension_keys::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,
            _request_id: self._request_id,
        }
    }
}