aws-sdk-greengrass 0.26.0

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

/// Information needed to reset deployments.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResetDeploymentsInput {
    /// A client token used to correlate requests and responses.
    #[doc(hidden)]
    pub amzn_client_token: std::option::Option<std::string::String>,
    /// If true, performs a best-effort only core reset.
    #[doc(hidden)]
    pub force: std::option::Option<bool>,
    /// The ID of the Greengrass group.
    #[doc(hidden)]
    pub group_id: std::option::Option<std::string::String>,
}
impl ResetDeploymentsInput {
    /// A client token used to correlate requests and responses.
    pub fn amzn_client_token(&self) -> std::option::Option<&str> {
        self.amzn_client_token.as_deref()
    }
    /// If true, performs a best-effort only core reset.
    pub fn force(&self) -> std::option::Option<bool> {
        self.force
    }
    /// The ID of the Greengrass group.
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
}
impl ResetDeploymentsInput {
    /// Creates a new builder-style object to manufacture [`ResetDeploymentsInput`](crate::operation::reset_deployments::ResetDeploymentsInput).
    pub fn builder() -> crate::operation::reset_deployments::builders::ResetDeploymentsInputBuilder
    {
        crate::operation::reset_deployments::builders::ResetDeploymentsInputBuilder::default()
    }
}

/// A builder for [`ResetDeploymentsInput`](crate::operation::reset_deployments::ResetDeploymentsInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ResetDeploymentsInputBuilder {
    pub(crate) amzn_client_token: std::option::Option<std::string::String>,
    pub(crate) force: std::option::Option<bool>,
    pub(crate) group_id: std::option::Option<std::string::String>,
}
impl ResetDeploymentsInputBuilder {
    /// A client token used to correlate requests and responses.
    pub fn amzn_client_token(mut self, input: impl Into<std::string::String>) -> Self {
        self.amzn_client_token = Some(input.into());
        self
    }
    /// A client token used to correlate requests and responses.
    pub fn set_amzn_client_token(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.amzn_client_token = input;
        self
    }
    /// If true, performs a best-effort only core reset.
    pub fn force(mut self, input: bool) -> Self {
        self.force = Some(input);
        self
    }
    /// If true, performs a best-effort only core reset.
    pub fn set_force(mut self, input: std::option::Option<bool>) -> Self {
        self.force = input;
        self
    }
    /// The ID of the Greengrass group.
    pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.group_id = Some(input.into());
        self
    }
    /// The ID of the Greengrass group.
    pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.group_id = input;
        self
    }
    /// Consumes the builder and constructs a [`ResetDeploymentsInput`](crate::operation::reset_deployments::ResetDeploymentsInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::reset_deployments::ResetDeploymentsInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::reset_deployments::ResetDeploymentsInput {
            amzn_client_token: self.amzn_client_token,
            force: self.force,
            group_id: self.group_id,
        })
    }
}