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 GetOpsItemInput {
    /// <p>The ID of the OpsItem that you want to get.</p>
    pub ops_item_id: ::std::option::Option<::std::string::String>,
    /// <p>The OpsItem Amazon Resource Name (ARN).</p>
    pub ops_item_arn: ::std::option::Option<::std::string::String>,
}
impl GetOpsItemInput {
    /// <p>The ID of the OpsItem that you want to get.</p>
    pub fn ops_item_id(&self) -> ::std::option::Option<&str> {
        self.ops_item_id.as_deref()
    }
    /// <p>The OpsItem Amazon Resource Name (ARN).</p>
    pub fn ops_item_arn(&self) -> ::std::option::Option<&str> {
        self.ops_item_arn.as_deref()
    }
}
impl GetOpsItemInput {
    /// Creates a new builder-style object to manufacture [`GetOpsItemInput`](crate::operation::get_ops_item::GetOpsItemInput).
    pub fn builder() -> crate::operation::get_ops_item::builders::GetOpsItemInputBuilder {
        crate::operation::get_ops_item::builders::GetOpsItemInputBuilder::default()
    }
}

/// A builder for [`GetOpsItemInput`](crate::operation::get_ops_item::GetOpsItemInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetOpsItemInputBuilder {
    pub(crate) ops_item_id: ::std::option::Option<::std::string::String>,
    pub(crate) ops_item_arn: ::std::option::Option<::std::string::String>,
}
impl GetOpsItemInputBuilder {
    /// <p>The ID of the OpsItem that you want to get.</p>
    /// This field is required.
    pub fn ops_item_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ops_item_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the OpsItem that you want to get.</p>
    pub fn set_ops_item_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ops_item_id = input;
        self
    }
    /// <p>The ID of the OpsItem that you want to get.</p>
    pub fn get_ops_item_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.ops_item_id
    }
    /// <p>The OpsItem Amazon Resource Name (ARN).</p>
    pub fn ops_item_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ops_item_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The OpsItem Amazon Resource Name (ARN).</p>
    pub fn set_ops_item_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ops_item_arn = input;
        self
    }
    /// <p>The OpsItem Amazon Resource Name (ARN).</p>
    pub fn get_ops_item_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.ops_item_arn
    }
    /// Consumes the builder and constructs a [`GetOpsItemInput`](crate::operation::get_ops_item::GetOpsItemInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_ops_item::GetOpsItemInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_ops_item::GetOpsItemInput {
            ops_item_id: self.ops_item_id,
            ops_item_arn: self.ops_item_arn,
        })
    }
}