aws-sdk-opensearch 1.121.0

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

/// <p>Container for the parameters to the <code>StartDomainMaintenance</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StartDomainMaintenanceInput {
    /// <p>The name of the domain.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the action.</p>
    pub action: ::std::option::Option<crate::types::MaintenanceType>,
    /// <p>The ID of the data node.</p>
    pub node_id: ::std::option::Option<::std::string::String>,
}
impl StartDomainMaintenanceInput {
    /// <p>The name of the domain.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The name of the action.</p>
    pub fn action(&self) -> ::std::option::Option<&crate::types::MaintenanceType> {
        self.action.as_ref()
    }
    /// <p>The ID of the data node.</p>
    pub fn node_id(&self) -> ::std::option::Option<&str> {
        self.node_id.as_deref()
    }
}
impl StartDomainMaintenanceInput {
    /// Creates a new builder-style object to manufacture [`StartDomainMaintenanceInput`](crate::operation::start_domain_maintenance::StartDomainMaintenanceInput).
    pub fn builder() -> crate::operation::start_domain_maintenance::builders::StartDomainMaintenanceInputBuilder {
        crate::operation::start_domain_maintenance::builders::StartDomainMaintenanceInputBuilder::default()
    }
}

/// A builder for [`StartDomainMaintenanceInput`](crate::operation::start_domain_maintenance::StartDomainMaintenanceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartDomainMaintenanceInputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) action: ::std::option::Option<crate::types::MaintenanceType>,
    pub(crate) node_id: ::std::option::Option<::std::string::String>,
}
impl StartDomainMaintenanceInputBuilder {
    /// <p>The name of the domain.</p>
    /// This field is required.
    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the domain.</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>The name of the domain.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The name of the action.</p>
    /// This field is required.
    pub fn action(mut self, input: crate::types::MaintenanceType) -> Self {
        self.action = ::std::option::Option::Some(input);
        self
    }
    /// <p>The name of the action.</p>
    pub fn set_action(mut self, input: ::std::option::Option<crate::types::MaintenanceType>) -> Self {
        self.action = input;
        self
    }
    /// <p>The name of the action.</p>
    pub fn get_action(&self) -> &::std::option::Option<crate::types::MaintenanceType> {
        &self.action
    }
    /// <p>The ID of the data node.</p>
    pub fn node_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.node_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the data node.</p>
    pub fn set_node_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.node_id = input;
        self
    }
    /// <p>The ID of the data node.</p>
    pub fn get_node_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.node_id
    }
    /// Consumes the builder and constructs a [`StartDomainMaintenanceInput`](crate::operation::start_domain_maintenance::StartDomainMaintenanceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::start_domain_maintenance::StartDomainMaintenanceInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::start_domain_maintenance::StartDomainMaintenanceInput {
            domain_name: self.domain_name,
            action: self.action,
            node_id: self.node_id,
        })
    }
}