aws-sdk-deadline 1.42.0

AWS SDK for AWSDeadlineCloud
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateWorkerInput {
    /// <p>The farm ID to update.</p>
    pub farm_id: ::std::option::Option<::std::string::String>,
    /// <p>The fleet ID to update.</p>
    pub fleet_id: ::std::option::Option<::std::string::String>,
    /// <p>The worker ID to update.</p>
    pub worker_id: ::std::option::Option<::std::string::String>,
    /// <p>The worker status to update.</p>
    pub status: ::std::option::Option<crate::types::UpdatedWorkerStatus>,
    /// <p>The worker capabilities to update.</p>
    pub capabilities: ::std::option::Option<crate::types::WorkerCapabilities>,
    /// <p>The host properties to update.</p>
    pub host_properties: ::std::option::Option<crate::types::HostPropertiesRequest>,
}
impl UpdateWorkerInput {
    /// <p>The farm ID to update.</p>
    pub fn farm_id(&self) -> ::std::option::Option<&str> {
        self.farm_id.as_deref()
    }
    /// <p>The fleet ID to update.</p>
    pub fn fleet_id(&self) -> ::std::option::Option<&str> {
        self.fleet_id.as_deref()
    }
    /// <p>The worker ID to update.</p>
    pub fn worker_id(&self) -> ::std::option::Option<&str> {
        self.worker_id.as_deref()
    }
    /// <p>The worker status to update.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::UpdatedWorkerStatus> {
        self.status.as_ref()
    }
    /// <p>The worker capabilities to update.</p>
    pub fn capabilities(&self) -> ::std::option::Option<&crate::types::WorkerCapabilities> {
        self.capabilities.as_ref()
    }
    /// <p>The host properties to update.</p>
    pub fn host_properties(&self) -> ::std::option::Option<&crate::types::HostPropertiesRequest> {
        self.host_properties.as_ref()
    }
}
impl UpdateWorkerInput {
    /// Creates a new builder-style object to manufacture [`UpdateWorkerInput`](crate::operation::update_worker::UpdateWorkerInput).
    pub fn builder() -> crate::operation::update_worker::builders::UpdateWorkerInputBuilder {
        crate::operation::update_worker::builders::UpdateWorkerInputBuilder::default()
    }
}

/// A builder for [`UpdateWorkerInput`](crate::operation::update_worker::UpdateWorkerInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateWorkerInputBuilder {
    pub(crate) farm_id: ::std::option::Option<::std::string::String>,
    pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
    pub(crate) worker_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::UpdatedWorkerStatus>,
    pub(crate) capabilities: ::std::option::Option<crate::types::WorkerCapabilities>,
    pub(crate) host_properties: ::std::option::Option<crate::types::HostPropertiesRequest>,
}
impl UpdateWorkerInputBuilder {
    /// <p>The farm ID to update.</p>
    /// This field is required.
    pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.farm_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The farm ID to update.</p>
    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.farm_id = input;
        self
    }
    /// <p>The farm ID to update.</p>
    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.farm_id
    }
    /// <p>The fleet ID to update.</p>
    /// This field is required.
    pub fn fleet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.fleet_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The fleet ID to update.</p>
    pub fn set_fleet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.fleet_id = input;
        self
    }
    /// <p>The fleet ID to update.</p>
    pub fn get_fleet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.fleet_id
    }
    /// <p>The worker ID to update.</p>
    /// This field is required.
    pub fn worker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.worker_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The worker ID to update.</p>
    pub fn set_worker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.worker_id = input;
        self
    }
    /// <p>The worker ID to update.</p>
    pub fn get_worker_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.worker_id
    }
    /// <p>The worker status to update.</p>
    pub fn status(mut self, input: crate::types::UpdatedWorkerStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The worker status to update.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::UpdatedWorkerStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The worker status to update.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::UpdatedWorkerStatus> {
        &self.status
    }
    /// <p>The worker capabilities to update.</p>
    pub fn capabilities(mut self, input: crate::types::WorkerCapabilities) -> Self {
        self.capabilities = ::std::option::Option::Some(input);
        self
    }
    /// <p>The worker capabilities to update.</p>
    pub fn set_capabilities(mut self, input: ::std::option::Option<crate::types::WorkerCapabilities>) -> Self {
        self.capabilities = input;
        self
    }
    /// <p>The worker capabilities to update.</p>
    pub fn get_capabilities(&self) -> &::std::option::Option<crate::types::WorkerCapabilities> {
        &self.capabilities
    }
    /// <p>The host properties to update.</p>
    pub fn host_properties(mut self, input: crate::types::HostPropertiesRequest) -> Self {
        self.host_properties = ::std::option::Option::Some(input);
        self
    }
    /// <p>The host properties to update.</p>
    pub fn set_host_properties(mut self, input: ::std::option::Option<crate::types::HostPropertiesRequest>) -> Self {
        self.host_properties = input;
        self
    }
    /// <p>The host properties to update.</p>
    pub fn get_host_properties(&self) -> &::std::option::Option<crate::types::HostPropertiesRequest> {
        &self.host_properties
    }
    /// Consumes the builder and constructs a [`UpdateWorkerInput`](crate::operation::update_worker::UpdateWorkerInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_worker::UpdateWorkerInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_worker::UpdateWorkerInput {
            farm_id: self.farm_id,
            fleet_id: self.fleet_id,
            worker_id: self.worker_id,
            status: self.status,
            capabilities: self.capabilities,
            host_properties: self.host_properties,
        })
    }
}