aws-sdk-cloudformation 1.111.0

AWS SDK for AWS CloudFormation
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 DescribeEventsOutput {
    /// <p>A list of operation events that match the specified criteria.</p>
    pub operation_events: ::std::option::Option<::std::vec::Vec<crate::types::OperationEvent>>,
    /// <p>If the request doesn't return all the remaining results, <code>NextToken</code> is set to a token. To retrieve the next set of results, call <code>DescribeEvents</code> again and assign that token to the request object's <code>NextToken</code> parameter. If the request returns all results, <code>NextToken</code> is set to <code>null</code>.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeEventsOutput {
    /// <p>A list of operation events that match the specified criteria.</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 `.operation_events.is_none()`.
    pub fn operation_events(&self) -> &[crate::types::OperationEvent] {
        self.operation_events.as_deref().unwrap_or_default()
    }
    /// <p>If the request doesn't return all the remaining results, <code>NextToken</code> is set to a token. To retrieve the next set of results, call <code>DescribeEvents</code> again and assign that token to the request object's <code>NextToken</code> parameter. If the request returns all results, <code>NextToken</code> is set to <code>null</code>.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeEventsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeEventsOutput {
    /// Creates a new builder-style object to manufacture [`DescribeEventsOutput`](crate::operation::describe_events::DescribeEventsOutput).
    pub fn builder() -> crate::operation::describe_events::builders::DescribeEventsOutputBuilder {
        crate::operation::describe_events::builders::DescribeEventsOutputBuilder::default()
    }
}

/// A builder for [`DescribeEventsOutput`](crate::operation::describe_events::DescribeEventsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeEventsOutputBuilder {
    pub(crate) operation_events: ::std::option::Option<::std::vec::Vec<crate::types::OperationEvent>>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeEventsOutputBuilder {
    /// Appends an item to `operation_events`.
    ///
    /// To override the contents of this collection use [`set_operation_events`](Self::set_operation_events).
    ///
    /// <p>A list of operation events that match the specified criteria.</p>
    pub fn operation_events(mut self, input: crate::types::OperationEvent) -> Self {
        let mut v = self.operation_events.unwrap_or_default();
        v.push(input);
        self.operation_events = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of operation events that match the specified criteria.</p>
    pub fn set_operation_events(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OperationEvent>>) -> Self {
        self.operation_events = input;
        self
    }
    /// <p>A list of operation events that match the specified criteria.</p>
    pub fn get_operation_events(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OperationEvent>> {
        &self.operation_events
    }
    /// <p>If the request doesn't return all the remaining results, <code>NextToken</code> is set to a token. To retrieve the next set of results, call <code>DescribeEvents</code> again and assign that token to the request object's <code>NextToken</code> parameter. If the request returns all results, <code>NextToken</code> is set to <code>null</code>.</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>If the request doesn't return all the remaining results, <code>NextToken</code> is set to a token. To retrieve the next set of results, call <code>DescribeEvents</code> again and assign that token to the request object's <code>NextToken</code> parameter. If the request returns all results, <code>NextToken</code> is set to <code>null</code>.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>If the request doesn't return all the remaining results, <code>NextToken</code> is set to a token. To retrieve the next set of results, call <code>DescribeEvents</code> again and assign that token to the request object's <code>NextToken</code> parameter. If the request returns all results, <code>NextToken</code> is set to <code>null</code>.</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 [`DescribeEventsOutput`](crate::operation::describe_events::DescribeEventsOutput).
    pub fn build(self) -> crate::operation::describe_events::DescribeEventsOutput {
        crate::operation::describe_events::DescribeEventsOutput {
            operation_events: self.operation_events,
            next_token: self.next_token,
            _request_id: self._request_id,
        }
    }
}