aws-sdk-greengrass 1.98.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.
    pub amzn_client_token: ::std::option::Option<::std::string::String>,
    /// If true, performs a best-effort only core reset.
    pub force: ::std::option::Option<bool>,
    /// The ID of the Greengrass group.
    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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 ::std::convert::Into<::std::string::String>) -> Self {
        self.amzn_client_token = ::std::option::Option::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
    }
    /// A client token used to correlate requests and responses.
    pub fn get_amzn_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.amzn_client_token
    }
    /// If true, performs a best-effort only core reset.
    pub fn force(mut self, input: bool) -> Self {
        self.force = ::std::option::Option::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
    }
    /// If true, performs a best-effort only core reset.
    pub fn get_force(&self) -> &::std::option::Option<bool> {
        &self.force
    }
    /// The ID of the Greengrass group.
    /// This field is required.
    pub fn group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.group_id = ::std::option::Option::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
    }
    /// The ID of the Greengrass group.
    pub fn get_group_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.group_id
    }
    /// Consumes the builder and constructs a [`ResetDeploymentsInput`](crate::operation::reset_deployments::ResetDeploymentsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::reset_deployments::ResetDeploymentsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::reset_deployments::ResetDeploymentsInput {
            amzn_client_token: self.amzn_client_token,
            force: self.force,
            group_id: self.group_id,
        })
    }
}