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 PublishDraft. This operation carries no scope selector: publishing is a lifecycle transition on the live app. The sandbox always runs the app's draft and is never published to directly, so publish always addresses the live app.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PublishDraftInput {
    /// The ID of the app.
    pub app_id: ::std::option::Option<::std::string::String>,
}
impl PublishDraftInput {
    /// The ID of the app.
    pub fn app_id(&self) -> ::std::option::Option<&str> {
        self.app_id.as_deref()
    }
}
impl PublishDraftInput {
    /// Creates a new builder-style object to manufacture [`PublishDraftInput`](crate::operation::publish_draft::PublishDraftInput).
    pub fn builder() -> crate::operation::publish_draft::builders::PublishDraftInputBuilder {
        crate::operation::publish_draft::builders::PublishDraftInputBuilder::default()
    }
}

/// A builder for [`PublishDraftInput`](crate::operation::publish_draft::PublishDraftInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PublishDraftInputBuilder {
    pub(crate) app_id: ::std::option::Option<::std::string::String>,
}
impl PublishDraftInputBuilder {
    /// 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
    }
    /// Consumes the builder and constructs a [`PublishDraftInput`](crate::operation::publish_draft::PublishDraftInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::publish_draft::PublishDraftInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::publish_draft::PublishDraftInput { app_id: self.app_id })
    }
}