aws-sdk-ssm 1.112.0

AWS SDK for Amazon Simple Systems Manager (SSM)
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 DescribeOpsItemsOutput {
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>A list of OpsItems.</p>
    pub ops_item_summaries: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemSummary>>,
    _request_id: Option<String>,
}
impl DescribeOpsItemsOutput {
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>A list of OpsItems.</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 `.ops_item_summaries.is_none()`.
    pub fn ops_item_summaries(&self) -> &[crate::types::OpsItemSummary] {
        self.ops_item_summaries.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for DescribeOpsItemsOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeOpsItemsOutput {
    /// Creates a new builder-style object to manufacture [`DescribeOpsItemsOutput`](crate::operation::describe_ops_items::DescribeOpsItemsOutput).
    pub fn builder() -> crate::operation::describe_ops_items::builders::DescribeOpsItemsOutputBuilder {
        crate::operation::describe_ops_items::builders::DescribeOpsItemsOutputBuilder::default()
    }
}

/// A builder for [`DescribeOpsItemsOutput`](crate::operation::describe_ops_items::DescribeOpsItemsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeOpsItemsOutputBuilder {
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) ops_item_summaries: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemSummary>>,
    _request_id: Option<String>,
}
impl DescribeOpsItemsOutputBuilder {
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</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>The token for the next set of items to return. Use this token to get the next set of results.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The token for the next set of items to return. Use this token to get the next set of results.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Appends an item to `ops_item_summaries`.
    ///
    /// To override the contents of this collection use [`set_ops_item_summaries`](Self::set_ops_item_summaries).
    ///
    /// <p>A list of OpsItems.</p>
    pub fn ops_item_summaries(mut self, input: crate::types::OpsItemSummary) -> Self {
        let mut v = self.ops_item_summaries.unwrap_or_default();
        v.push(input);
        self.ops_item_summaries = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of OpsItems.</p>
    pub fn set_ops_item_summaries(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OpsItemSummary>>) -> Self {
        self.ops_item_summaries = input;
        self
    }
    /// <p>A list of OpsItems.</p>
    pub fn get_ops_item_summaries(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OpsItemSummary>> {
        &self.ops_item_summaries
    }
    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 [`DescribeOpsItemsOutput`](crate::operation::describe_ops_items::DescribeOpsItemsOutput).
    pub fn build(self) -> crate::operation::describe_ops_items::DescribeOpsItemsOutput {
        crate::operation::describe_ops_items::DescribeOpsItemsOutput {
            next_token: self.next_token,
            ops_item_summaries: self.ops_item_summaries,
            _request_id: self._request_id,
        }
    }
}