aws-sdk-appmonetization 1.0.0

AWS SDK for AWS App Monetization
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Output for CreatePlan.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreatePlanOutput {
    /// The newly created plan, carrying its server-generated planId. It exists on the draft (DRAFT) offering until it is published.
    pub plan: ::std::option::Option<crate::types::Plan>,
    _request_id: Option<String>,
}
impl CreatePlanOutput {
    /// The newly created plan, carrying its server-generated planId. It exists on the draft (DRAFT) offering until it is published.
    pub fn plan(&self) -> ::std::option::Option<&crate::types::Plan> {
        self.plan.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for CreatePlanOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreatePlanOutput {
    /// Creates a new builder-style object to manufacture [`CreatePlanOutput`](crate::operation::create_plan::CreatePlanOutput).
    pub fn builder() -> crate::operation::create_plan::builders::CreatePlanOutputBuilder {
        crate::operation::create_plan::builders::CreatePlanOutputBuilder::default()
    }
}

/// A builder for [`CreatePlanOutput`](crate::operation::create_plan::CreatePlanOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreatePlanOutputBuilder {
    pub(crate) plan: ::std::option::Option<crate::types::Plan>,
    _request_id: Option<String>,
}
impl CreatePlanOutputBuilder {
    /// The newly created plan, carrying its server-generated planId. It exists on the draft (DRAFT) offering until it is published.
    /// This field is required.
    pub fn plan(mut self, input: crate::types::Plan) -> Self {
        self.plan = ::std::option::Option::Some(input);
        self
    }
    /// The newly created plan, carrying its server-generated planId. It exists on the draft (DRAFT) offering until it is published.
    pub fn set_plan(mut self, input: ::std::option::Option<crate::types::Plan>) -> Self {
        self.plan = input;
        self
    }
    /// The newly created plan, carrying its server-generated planId. It exists on the draft (DRAFT) offering until it is published.
    pub fn get_plan(&self) -> &::std::option::Option<crate::types::Plan> {
        &self.plan
    }
    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 [`CreatePlanOutput`](crate::operation::create_plan::CreatePlanOutput).
    pub fn build(self) -> crate::operation::create_plan::CreatePlanOutput {
        crate::operation::create_plan::CreatePlanOutput {
            plan: self.plan,
            _request_id: self._request_id,
        }
    }
}