aws-sdk-panorama 0.26.0

AWS SDK for AWS Panorama
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 ProvisionDeviceOutput {
    /// <p>The device's ID.</p>
    #[doc(hidden)]
    pub device_id: std::option::Option<std::string::String>,
    /// <p>The device's ARN.</p>
    #[doc(hidden)]
    pub arn: std::option::Option<std::string::String>,
    /// <p>The device's status.</p>
    #[doc(hidden)]
    pub status: std::option::Option<crate::types::DeviceStatus>,
    /// <p>The device's configuration bundle.</p>
    #[doc(hidden)]
    pub certificates: std::option::Option<aws_smithy_types::Blob>,
    /// <p>The device's IoT thing name.</p>
    #[doc(hidden)]
    pub iot_thing_name: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ProvisionDeviceOutput {
    /// <p>The device's ID.</p>
    pub fn device_id(&self) -> std::option::Option<&str> {
        self.device_id.as_deref()
    }
    /// <p>The device's ARN.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The device's status.</p>
    pub fn status(&self) -> std::option::Option<&crate::types::DeviceStatus> {
        self.status.as_ref()
    }
    /// <p>The device's configuration bundle.</p>
    pub fn certificates(&self) -> std::option::Option<&aws_smithy_types::Blob> {
        self.certificates.as_ref()
    }
    /// <p>The device's IoT thing name.</p>
    pub fn iot_thing_name(&self) -> std::option::Option<&str> {
        self.iot_thing_name.as_deref()
    }
}
impl aws_http::request_id::RequestId for ProvisionDeviceOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl ProvisionDeviceOutput {
    /// Creates a new builder-style object to manufacture [`ProvisionDeviceOutput`](crate::operation::provision_device::ProvisionDeviceOutput).
    pub fn builder() -> crate::operation::provision_device::builders::ProvisionDeviceOutputBuilder {
        crate::operation::provision_device::builders::ProvisionDeviceOutputBuilder::default()
    }
}

/// A builder for [`ProvisionDeviceOutput`](crate::operation::provision_device::ProvisionDeviceOutput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct ProvisionDeviceOutputBuilder {
    pub(crate) device_id: std::option::Option<std::string::String>,
    pub(crate) arn: std::option::Option<std::string::String>,
    pub(crate) status: std::option::Option<crate::types::DeviceStatus>,
    pub(crate) certificates: std::option::Option<aws_smithy_types::Blob>,
    pub(crate) iot_thing_name: std::option::Option<std::string::String>,
    _request_id: Option<String>,
}
impl ProvisionDeviceOutputBuilder {
    /// <p>The device's ID.</p>
    pub fn device_id(mut self, input: impl Into<std::string::String>) -> Self {
        self.device_id = Some(input.into());
        self
    }
    /// <p>The device's ID.</p>
    pub fn set_device_id(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.device_id = input;
        self
    }
    /// <p>The device's ARN.</p>
    pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
        self.arn = Some(input.into());
        self
    }
    /// <p>The device's ARN.</p>
    pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The device's status.</p>
    pub fn status(mut self, input: crate::types::DeviceStatus) -> Self {
        self.status = Some(input);
        self
    }
    /// <p>The device's status.</p>
    pub fn set_status(mut self, input: std::option::Option<crate::types::DeviceStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The device's configuration bundle.</p>
    pub fn certificates(mut self, input: aws_smithy_types::Blob) -> Self {
        self.certificates = Some(input);
        self
    }
    /// <p>The device's configuration bundle.</p>
    pub fn set_certificates(mut self, input: std::option::Option<aws_smithy_types::Blob>) -> Self {
        self.certificates = input;
        self
    }
    /// <p>The device's IoT thing name.</p>
    pub fn iot_thing_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.iot_thing_name = Some(input.into());
        self
    }
    /// <p>The device's IoT thing name.</p>
    pub fn set_iot_thing_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.iot_thing_name = input;
        self
    }
    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 [`ProvisionDeviceOutput`](crate::operation::provision_device::ProvisionDeviceOutput).
    pub fn build(self) -> crate::operation::provision_device::ProvisionDeviceOutput {
        crate::operation::provision_device::ProvisionDeviceOutput {
            device_id: self.device_id,
            arn: self.arn,
            status: self.status,
            certificates: self.certificates,
            iot_thing_name: self.iot_thing_name,
            _request_id: self._request_id,
        }
    }
}