aws-sdk-networkmanager 1.102.0

AWS SDK for AWS Network Manager
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)]
pub struct UpdateDeviceInput {
    /// <p>The ID of the global network.</p>
    pub global_network_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the device.</p>
    pub device_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.</p>
    pub aws_location: ::std::option::Option<crate::types::AwsLocation>,
    /// <p>A description of the device.</p>
    /// <p>Constraints: Maximum length of 256 characters.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The type of the device.</p>
    pub r#type: ::std::option::Option<::std::string::String>,
    /// <p>The vendor of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub vendor: ::std::option::Option<::std::string::String>,
    /// <p>The model of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub model: ::std::option::Option<::std::string::String>,
    /// <p>The serial number of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub serial_number: ::std::option::Option<::std::string::String>,
    /// <p>Describes a location.</p>
    pub location: ::std::option::Option<crate::types::Location>,
    /// <p>The ID of the site.</p>
    pub site_id: ::std::option::Option<::std::string::String>,
}
impl UpdateDeviceInput {
    /// <p>The ID of the global network.</p>
    pub fn global_network_id(&self) -> ::std::option::Option<&str> {
        self.global_network_id.as_deref()
    }
    /// <p>The ID of the device.</p>
    pub fn device_id(&self) -> ::std::option::Option<&str> {
        self.device_id.as_deref()
    }
    /// <p>The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.</p>
    pub fn aws_location(&self) -> ::std::option::Option<&crate::types::AwsLocation> {
        self.aws_location.as_ref()
    }
    /// <p>A description of the device.</p>
    /// <p>Constraints: Maximum length of 256 characters.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The type of the device.</p>
    pub fn r#type(&self) -> ::std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p>The vendor of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub fn vendor(&self) -> ::std::option::Option<&str> {
        self.vendor.as_deref()
    }
    /// <p>The model of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub fn model(&self) -> ::std::option::Option<&str> {
        self.model.as_deref()
    }
    /// <p>The serial number of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub fn serial_number(&self) -> ::std::option::Option<&str> {
        self.serial_number.as_deref()
    }
    /// <p>Describes a location.</p>
    pub fn location(&self) -> ::std::option::Option<&crate::types::Location> {
        self.location.as_ref()
    }
    /// <p>The ID of the site.</p>
    pub fn site_id(&self) -> ::std::option::Option<&str> {
        self.site_id.as_deref()
    }
}
impl ::std::fmt::Debug for UpdateDeviceInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateDeviceInput");
        formatter.field("global_network_id", &self.global_network_id);
        formatter.field("device_id", &self.device_id);
        formatter.field("aws_location", &self.aws_location);
        formatter.field("description", &self.description);
        formatter.field("r#type", &self.r#type);
        formatter.field("vendor", &self.vendor);
        formatter.field("model", &self.model);
        formatter.field("serial_number", &self.serial_number);
        formatter.field("location", &"*** Sensitive Data Redacted ***");
        formatter.field("site_id", &self.site_id);
        formatter.finish()
    }
}
impl UpdateDeviceInput {
    /// Creates a new builder-style object to manufacture [`UpdateDeviceInput`](crate::operation::update_device::UpdateDeviceInput).
    pub fn builder() -> crate::operation::update_device::builders::UpdateDeviceInputBuilder {
        crate::operation::update_device::builders::UpdateDeviceInputBuilder::default()
    }
}

/// A builder for [`UpdateDeviceInput`](crate::operation::update_device::UpdateDeviceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateDeviceInputBuilder {
    pub(crate) global_network_id: ::std::option::Option<::std::string::String>,
    pub(crate) device_id: ::std::option::Option<::std::string::String>,
    pub(crate) aws_location: ::std::option::Option<crate::types::AwsLocation>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<::std::string::String>,
    pub(crate) vendor: ::std::option::Option<::std::string::String>,
    pub(crate) model: ::std::option::Option<::std::string::String>,
    pub(crate) serial_number: ::std::option::Option<::std::string::String>,
    pub(crate) location: ::std::option::Option<crate::types::Location>,
    pub(crate) site_id: ::std::option::Option<::std::string::String>,
}
impl UpdateDeviceInputBuilder {
    /// <p>The ID of the global network.</p>
    /// This field is required.
    pub fn global_network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.global_network_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the global network.</p>
    pub fn set_global_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.global_network_id = input;
        self
    }
    /// <p>The ID of the global network.</p>
    pub fn get_global_network_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.global_network_id
    }
    /// <p>The ID of the device.</p>
    /// This field is required.
    pub fn device_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the device.</p>
    pub fn set_device_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_id = input;
        self
    }
    /// <p>The ID of the device.</p>
    pub fn get_device_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_id
    }
    /// <p>The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.</p>
    pub fn aws_location(mut self, input: crate::types::AwsLocation) -> Self {
        self.aws_location = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.</p>
    pub fn set_aws_location(mut self, input: ::std::option::Option<crate::types::AwsLocation>) -> Self {
        self.aws_location = input;
        self
    }
    /// <p>The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.</p>
    pub fn get_aws_location(&self) -> &::std::option::Option<crate::types::AwsLocation> {
        &self.aws_location
    }
    /// <p>A description of the device.</p>
    /// <p>Constraints: Maximum length of 256 characters.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the device.</p>
    /// <p>Constraints: Maximum length of 256 characters.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the device.</p>
    /// <p>Constraints: Maximum length of 256 characters.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The type of the device.</p>
    pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.r#type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of the device.</p>
    pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of the device.</p>
    pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.r#type
    }
    /// <p>The vendor of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub fn vendor(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vendor = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The vendor of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub fn set_vendor(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vendor = input;
        self
    }
    /// <p>The vendor of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub fn get_vendor(&self) -> &::std::option::Option<::std::string::String> {
        &self.vendor
    }
    /// <p>The model of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</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>
    /// <p>Constraints: Maximum length of 128 characters.</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>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub fn get_model(&self) -> &::std::option::Option<::std::string::String> {
        &self.model
    }
    /// <p>The serial number of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub fn serial_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.serial_number = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The serial number of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub fn set_serial_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.serial_number = input;
        self
    }
    /// <p>The serial number of the device.</p>
    /// <p>Constraints: Maximum length of 128 characters.</p>
    pub fn get_serial_number(&self) -> &::std::option::Option<::std::string::String> {
        &self.serial_number
    }
    /// <p>Describes a location.</p>
    pub fn location(mut self, input: crate::types::Location) -> Self {
        self.location = ::std::option::Option::Some(input);
        self
    }
    /// <p>Describes a location.</p>
    pub fn set_location(mut self, input: ::std::option::Option<crate::types::Location>) -> Self {
        self.location = input;
        self
    }
    /// <p>Describes a location.</p>
    pub fn get_location(&self) -> &::std::option::Option<crate::types::Location> {
        &self.location
    }
    /// <p>The ID of the site.</p>
    pub fn site_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.site_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the site.</p>
    pub fn set_site_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.site_id = input;
        self
    }
    /// <p>The ID of the site.</p>
    pub fn get_site_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.site_id
    }
    /// Consumes the builder and constructs a [`UpdateDeviceInput`](crate::operation::update_device::UpdateDeviceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_device::UpdateDeviceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_device::UpdateDeviceInput {
            global_network_id: self.global_network_id,
            device_id: self.device_id,
            aws_location: self.aws_location,
            description: self.description,
            r#type: self.r#type,
            vendor: self.vendor,
            model: self.model,
            serial_number: self.serial_number,
            location: self.location,
            site_id: self.site_id,
        })
    }
}
impl ::std::fmt::Debug for UpdateDeviceInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("UpdateDeviceInputBuilder");
        formatter.field("global_network_id", &self.global_network_id);
        formatter.field("device_id", &self.device_id);
        formatter.field("aws_location", &self.aws_location);
        formatter.field("description", &self.description);
        formatter.field("r#type", &self.r#type);
        formatter.field("vendor", &self.vendor);
        formatter.field("model", &self.model);
        formatter.field("serial_number", &self.serial_number);
        formatter.field("location", &"*** Sensitive Data Redacted ***");
        formatter.field("site_id", &self.site_id);
        formatter.finish()
    }
}