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.

/// Input for ArchivePlan. This operation carries no scope selector: plan authoring always addresses the live app. Plans in the sandbox are read-only through this API. Read them with GetPlan or ListPlans using scope=sandbox or stage=DRAFT.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ArchivePlanInput {
    /// The ID of the app.
    pub app_id: ::std::option::Option<::std::string::String>,
    /// The identifier of the plan. We generate this value when you create the plan. It is unique within the app and is never reused. Treat it as opaque.
    pub plan_id: ::std::option::Option<::std::string::String>,
}
impl ArchivePlanInput {
    /// The ID of the app.
    pub fn app_id(&self) -> ::std::option::Option<&str> {
        self.app_id.as_deref()
    }
    /// The identifier of the plan. We generate this value when you create the plan. It is unique within the app and is never reused. Treat it as opaque.
    pub fn plan_id(&self) -> ::std::option::Option<&str> {
        self.plan_id.as_deref()
    }
}
impl ArchivePlanInput {
    /// Creates a new builder-style object to manufacture [`ArchivePlanInput`](crate::operation::archive_plan::ArchivePlanInput).
    pub fn builder() -> crate::operation::archive_plan::builders::ArchivePlanInputBuilder {
        crate::operation::archive_plan::builders::ArchivePlanInputBuilder::default()
    }
}

/// A builder for [`ArchivePlanInput`](crate::operation::archive_plan::ArchivePlanInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ArchivePlanInputBuilder {
    pub(crate) app_id: ::std::option::Option<::std::string::String>,
    pub(crate) plan_id: ::std::option::Option<::std::string::String>,
}
impl ArchivePlanInputBuilder {
    /// The ID of the app.
    /// This field is required.
    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.app_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The ID of the app.
    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.app_id = input;
        self
    }
    /// The ID of the app.
    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.app_id
    }
    /// The identifier of the plan. We generate this value when you create the plan. It is unique within the app and is never reused. Treat it as opaque.
    /// This field is required.
    pub fn plan_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.plan_id = ::std::option::Option::Some(input.into());
        self
    }
    /// The identifier of the plan. We generate this value when you create the plan. It is unique within the app and is never reused. Treat it as opaque.
    pub fn set_plan_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.plan_id = input;
        self
    }
    /// The identifier of the plan. We generate this value when you create the plan. It is unique within the app and is never reused. Treat it as opaque.
    pub fn get_plan_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.plan_id
    }
    /// Consumes the builder and constructs a [`ArchivePlanInput`](crate::operation::archive_plan::ArchivePlanInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::archive_plan::ArchivePlanInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::archive_plan::ArchivePlanInput {
            app_id: self.app_id,
            plan_id: self.plan_id,
        })
    }
}