aws-sdk-worklink 1.43.0

AWS SDK for Amazon WorkLink
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 DescribeDeviceOutput {
    /// <p>The current state of the device.</p>
    pub status: ::std::option::Option<crate::types::DeviceStatus>,
    /// <p>The model of the device.</p>
    pub model: ::std::option::Option<::std::string::String>,
    /// <p>The manufacturer of the device.</p>
    pub manufacturer: ::std::option::Option<::std::string::String>,
    /// <p>The operating system of the device.</p>
    pub operating_system: ::std::option::Option<::std::string::String>,
    /// <p>The operating system version of the device.</p>
    pub operating_system_version: ::std::option::Option<::std::string::String>,
    /// <p>The operating system patch level of the device.</p>
    pub patch_level: ::std::option::Option<::std::string::String>,
    /// <p>The date that the device first signed in to Amazon WorkLink.</p>
    pub first_accessed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date that the device last accessed Amazon WorkLink.</p>
    pub last_accessed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The user name associated with the device.</p>
    pub username: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeDeviceOutput {
    /// <p>The current state of the device.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::DeviceStatus> {
        self.status.as_ref()
    }
    /// <p>The model of the device.</p>
    pub fn model(&self) -> ::std::option::Option<&str> {
        self.model.as_deref()
    }
    /// <p>The manufacturer of the device.</p>
    pub fn manufacturer(&self) -> ::std::option::Option<&str> {
        self.manufacturer.as_deref()
    }
    /// <p>The operating system of the device.</p>
    pub fn operating_system(&self) -> ::std::option::Option<&str> {
        self.operating_system.as_deref()
    }
    /// <p>The operating system version of the device.</p>
    pub fn operating_system_version(&self) -> ::std::option::Option<&str> {
        self.operating_system_version.as_deref()
    }
    /// <p>The operating system patch level of the device.</p>
    pub fn patch_level(&self) -> ::std::option::Option<&str> {
        self.patch_level.as_deref()
    }
    /// <p>The date that the device first signed in to Amazon WorkLink.</p>
    pub fn first_accessed_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.first_accessed_time.as_ref()
    }
    /// <p>The date that the device last accessed Amazon WorkLink.</p>
    pub fn last_accessed_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_accessed_time.as_ref()
    }
    /// <p>The user name associated with the device.</p>
    pub fn username(&self) -> ::std::option::Option<&str> {
        self.username.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeDeviceOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeDeviceOutput {
    /// Creates a new builder-style object to manufacture [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
    pub fn builder() -> crate::operation::describe_device::builders::DescribeDeviceOutputBuilder {
        crate::operation::describe_device::builders::DescribeDeviceOutputBuilder::default()
    }
}

/// A builder for [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeDeviceOutputBuilder {
    pub(crate) status: ::std::option::Option<crate::types::DeviceStatus>,
    pub(crate) model: ::std::option::Option<::std::string::String>,
    pub(crate) manufacturer: ::std::option::Option<::std::string::String>,
    pub(crate) operating_system: ::std::option::Option<::std::string::String>,
    pub(crate) operating_system_version: ::std::option::Option<::std::string::String>,
    pub(crate) patch_level: ::std::option::Option<::std::string::String>,
    pub(crate) first_accessed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_accessed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) username: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeDeviceOutputBuilder {
    /// <p>The current state of the device.</p>
    pub fn status(mut self, input: crate::types::DeviceStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current state of the device.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::DeviceStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current state of the device.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::DeviceStatus> {
        &self.status
    }
    /// <p>The model of the device.</p>
    pub fn model(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.model = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The model of the device.</p>
    pub fn set_model(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.model = input;
        self
    }
    /// <p>The model of the device.</p>
    pub fn get_model(&self) -> &::std::option::Option<::std::string::String> {
        &self.model
    }
    /// <p>The manufacturer of the device.</p>
    pub fn manufacturer(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.manufacturer = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The manufacturer of the device.</p>
    pub fn set_manufacturer(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.manufacturer = input;
        self
    }
    /// <p>The manufacturer of the device.</p>
    pub fn get_manufacturer(&self) -> &::std::option::Option<::std::string::String> {
        &self.manufacturer
    }
    /// <p>The operating system of the device.</p>
    pub fn operating_system(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.operating_system = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The operating system of the device.</p>
    pub fn set_operating_system(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.operating_system = input;
        self
    }
    /// <p>The operating system of the device.</p>
    pub fn get_operating_system(&self) -> &::std::option::Option<::std::string::String> {
        &self.operating_system
    }
    /// <p>The operating system version of the device.</p>
    pub fn operating_system_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.operating_system_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The operating system version of the device.</p>
    pub fn set_operating_system_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.operating_system_version = input;
        self
    }
    /// <p>The operating system version of the device.</p>
    pub fn get_operating_system_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.operating_system_version
    }
    /// <p>The operating system patch level of the device.</p>
    pub fn patch_level(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.patch_level = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The operating system patch level of the device.</p>
    pub fn set_patch_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.patch_level = input;
        self
    }
    /// <p>The operating system patch level of the device.</p>
    pub fn get_patch_level(&self) -> &::std::option::Option<::std::string::String> {
        &self.patch_level
    }
    /// <p>The date that the device first signed in to Amazon WorkLink.</p>
    pub fn first_accessed_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.first_accessed_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date that the device first signed in to Amazon WorkLink.</p>
    pub fn set_first_accessed_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.first_accessed_time = input;
        self
    }
    /// <p>The date that the device first signed in to Amazon WorkLink.</p>
    pub fn get_first_accessed_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.first_accessed_time
    }
    /// <p>The date that the device last accessed Amazon WorkLink.</p>
    pub fn last_accessed_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_accessed_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date that the device last accessed Amazon WorkLink.</p>
    pub fn set_last_accessed_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_accessed_time = input;
        self
    }
    /// <p>The date that the device last accessed Amazon WorkLink.</p>
    pub fn get_last_accessed_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_accessed_time
    }
    /// <p>The user name associated with the device.</p>
    pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.username = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The user name associated with the device.</p>
    pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.username = input;
        self
    }
    /// <p>The user name associated with the device.</p>
    pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
        &self.username
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DescribeDeviceOutput`](crate::operation::describe_device::DescribeDeviceOutput).
    pub fn build(self) -> crate::operation::describe_device::DescribeDeviceOutput {
        crate::operation::describe_device::DescribeDeviceOutput {
            status: self.status,
            model: self.model,
            manufacturer: self.manufacturer,
            operating_system: self.operating_system,
            operating_system_version: self.operating_system_version,
            patch_level: self.patch_level,
            first_accessed_time: self.first_accessed_time,
            last_accessed_time: self.last_accessed_time,
            username: self.username,
            _request_id: self._request_id,
        }
    }
}