aws-sdk-devopsagent 1.4.0

AWS SDK for AWS DevOps Agent Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Response structure containing the updated goal
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateGoalOutput {
    /// The updated goal object
    pub goal: ::std::option::Option<crate::types::Goal>,
    _request_id: Option<String>,
}
impl UpdateGoalOutput {
    /// The updated goal object
    pub fn goal(&self) -> ::std::option::Option<&crate::types::Goal> {
        self.goal.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for UpdateGoalOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl UpdateGoalOutput {
    /// Creates a new builder-style object to manufacture [`UpdateGoalOutput`](crate::operation::update_goal::UpdateGoalOutput).
    pub fn builder() -> crate::operation::update_goal::builders::UpdateGoalOutputBuilder {
        crate::operation::update_goal::builders::UpdateGoalOutputBuilder::default()
    }
}

/// A builder for [`UpdateGoalOutput`](crate::operation::update_goal::UpdateGoalOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateGoalOutputBuilder {
    pub(crate) goal: ::std::option::Option<crate::types::Goal>,
    _request_id: Option<String>,
}
impl UpdateGoalOutputBuilder {
    /// The updated goal object
    /// This field is required.
    pub fn goal(mut self, input: crate::types::Goal) -> Self {
        self.goal = ::std::option::Option::Some(input);
        self
    }
    /// The updated goal object
    pub fn set_goal(mut self, input: ::std::option::Option<crate::types::Goal>) -> Self {
        self.goal = input;
        self
    }
    /// The updated goal object
    pub fn get_goal(&self) -> &::std::option::Option<crate::types::Goal> {
        &self.goal
    }
    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 [`UpdateGoalOutput`](crate::operation::update_goal::UpdateGoalOutput).
    pub fn build(self) -> crate::operation::update_goal::UpdateGoalOutput {
        crate::operation::update_goal::UpdateGoalOutput {
            goal: self.goal,
            _request_id: self._request_id,
        }
    }
}