aws-sdk-sagemaker 1.196.0

AWS SDK for Amazon SageMaker Service
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 DeregisterDevicesInput {
    /// <p>The name of the fleet the devices belong to.</p>
    pub device_fleet_name: ::std::option::Option<::std::string::String>,
    /// <p>The unique IDs of the devices.</p>
    pub device_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DeregisterDevicesInput {
    /// <p>The name of the fleet the devices belong to.</p>
    pub fn device_fleet_name(&self) -> ::std::option::Option<&str> {
        self.device_fleet_name.as_deref()
    }
    /// <p>The unique IDs of the devices.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.device_names.is_none()`.
    pub fn device_names(&self) -> &[::std::string::String] {
        self.device_names.as_deref().unwrap_or_default()
    }
}
impl DeregisterDevicesInput {
    /// Creates a new builder-style object to manufacture [`DeregisterDevicesInput`](crate::operation::deregister_devices::DeregisterDevicesInput).
    pub fn builder() -> crate::operation::deregister_devices::builders::DeregisterDevicesInputBuilder {
        crate::operation::deregister_devices::builders::DeregisterDevicesInputBuilder::default()
    }
}

/// A builder for [`DeregisterDevicesInput`](crate::operation::deregister_devices::DeregisterDevicesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeregisterDevicesInputBuilder {
    pub(crate) device_fleet_name: ::std::option::Option<::std::string::String>,
    pub(crate) device_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DeregisterDevicesInputBuilder {
    /// <p>The name of the fleet the devices belong to.</p>
    /// This field is required.
    pub fn device_fleet_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_fleet_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the fleet the devices belong to.</p>
    pub fn set_device_fleet_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_fleet_name = input;
        self
    }
    /// <p>The name of the fleet the devices belong to.</p>
    pub fn get_device_fleet_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_fleet_name
    }
    /// Appends an item to `device_names`.
    ///
    /// To override the contents of this collection use [`set_device_names`](Self::set_device_names).
    ///
    /// <p>The unique IDs of the devices.</p>
    pub fn device_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.device_names.unwrap_or_default();
        v.push(input.into());
        self.device_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>The unique IDs of the devices.</p>
    pub fn set_device_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.device_names = input;
        self
    }
    /// <p>The unique IDs of the devices.</p>
    pub fn get_device_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.device_names
    }
    /// Consumes the builder and constructs a [`DeregisterDevicesInput`](crate::operation::deregister_devices::DeregisterDevicesInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::deregister_devices::DeregisterDevicesInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::deregister_devices::DeregisterDevicesInput {
            device_fleet_name: self.device_fleet_name,
            device_names: self.device_names,
        })
    }
}