// 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 CreateWirelessDeviceInput {
/// <p>The wireless device type.</p>
pub r#type: ::std::option::Option<crate::types::WirelessDeviceType>,
/// <p>The name of the new resource.</p><note>
/// <p>The following special characters aren't accepted: <code><>^#~$</code></p>
/// </note>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The description of the new resource.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>The name of the destination to assign to the new wireless device.</p>
pub destination_name: ::std::option::Option<::std::string::String>,
/// <p>Each resource must have a unique client request token. The client token is used to implement idempotency. It ensures that the request completes no more than one time. If you retry a request with the same token and the same parameters, the request will complete successfully. However, if you try to create a new resource using the same token but different parameters, an HTTP 409 conflict occurs. If you omit this value, AWS SDKs will automatically generate a unique client request. For more information about idempotency, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency in Amazon EC2 API requests</a>.</p>
pub client_request_token: ::std::option::Option<::std::string::String>,
/// <p>The device configuration information to use to create the wireless device.</p>
pub lo_ra_wan: ::std::option::Option<crate::types::LoRaWanDevice>,
/// <p>The tags to attach to the new wireless device. Tags are metadata that you can use to manage a resource.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>The integration status of the Device Location feature for LoRaWAN and Sidewalk devices.</p>
pub positioning: ::std::option::Option<crate::types::PositioningConfigStatus>,
/// <p>The device configuration information to use to create the Sidewalk device.</p>
pub sidewalk: ::std::option::Option<crate::types::SidewalkCreateWirelessDevice>,
}
impl CreateWirelessDeviceInput {
/// <p>The wireless device type.</p>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::WirelessDeviceType> {
self.r#type.as_ref()
}
/// <p>The name of the new resource.</p><note>
/// <p>The following special characters aren't accepted: <code><>^#~$</code></p>
/// </note>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The description of the new resource.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The name of the destination to assign to the new wireless device.</p>
pub fn destination_name(&self) -> ::std::option::Option<&str> {
self.destination_name.as_deref()
}
/// <p>Each resource must have a unique client request token. The client token is used to implement idempotency. It ensures that the request completes no more than one time. If you retry a request with the same token and the same parameters, the request will complete successfully. However, if you try to create a new resource using the same token but different parameters, an HTTP 409 conflict occurs. If you omit this value, AWS SDKs will automatically generate a unique client request. For more information about idempotency, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency in Amazon EC2 API requests</a>.</p>
pub fn client_request_token(&self) -> ::std::option::Option<&str> {
self.client_request_token.as_deref()
}
/// <p>The device configuration information to use to create the wireless device.</p>
pub fn lo_ra_wan(&self) -> ::std::option::Option<&crate::types::LoRaWanDevice> {
self.lo_ra_wan.as_ref()
}
/// <p>The tags to attach to the new wireless device. Tags are metadata that you can use to manage a resource.</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 `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
/// <p>The integration status of the Device Location feature for LoRaWAN and Sidewalk devices.</p>
pub fn positioning(&self) -> ::std::option::Option<&crate::types::PositioningConfigStatus> {
self.positioning.as_ref()
}
/// <p>The device configuration information to use to create the Sidewalk device.</p>
pub fn sidewalk(&self) -> ::std::option::Option<&crate::types::SidewalkCreateWirelessDevice> {
self.sidewalk.as_ref()
}
}
impl CreateWirelessDeviceInput {
/// Creates a new builder-style object to manufacture [`CreateWirelessDeviceInput`](crate::operation::create_wireless_device::CreateWirelessDeviceInput).
pub fn builder() -> crate::operation::create_wireless_device::builders::CreateWirelessDeviceInputBuilder {
crate::operation::create_wireless_device::builders::CreateWirelessDeviceInputBuilder::default()
}
}
/// A builder for [`CreateWirelessDeviceInput`](crate::operation::create_wireless_device::CreateWirelessDeviceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateWirelessDeviceInputBuilder {
pub(crate) r#type: ::std::option::Option<crate::types::WirelessDeviceType>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) destination_name: ::std::option::Option<::std::string::String>,
pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
pub(crate) lo_ra_wan: ::std::option::Option<crate::types::LoRaWanDevice>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) positioning: ::std::option::Option<crate::types::PositioningConfigStatus>,
pub(crate) sidewalk: ::std::option::Option<crate::types::SidewalkCreateWirelessDevice>,
}
impl CreateWirelessDeviceInputBuilder {
/// <p>The wireless device type.</p>
/// This field is required.
pub fn r#type(mut self, input: crate::types::WirelessDeviceType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The wireless device type.</p>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::WirelessDeviceType>) -> Self {
self.r#type = input;
self
}
/// <p>The wireless device type.</p>
pub fn get_type(&self) -> &::std::option::Option<crate::types::WirelessDeviceType> {
&self.r#type
}
/// <p>The name of the new resource.</p><note>
/// <p>The following special characters aren't accepted: <code><>^#~$</code></p>
/// </note>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the new resource.</p><note>
/// <p>The following special characters aren't accepted: <code><>^#~$</code></p>
/// </note>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The name of the new resource.</p><note>
/// <p>The following special characters aren't accepted: <code><>^#~$</code></p>
/// </note>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The description of the new resource.</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>The description of the new resource.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>The description of the new resource.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>The name of the destination to assign to the new wireless device.</p>
/// This field is required.
pub fn destination_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.destination_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the destination to assign to the new wireless device.</p>
pub fn set_destination_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.destination_name = input;
self
}
/// <p>The name of the destination to assign to the new wireless device.</p>
pub fn get_destination_name(&self) -> &::std::option::Option<::std::string::String> {
&self.destination_name
}
/// <p>Each resource must have a unique client request token. The client token is used to implement idempotency. It ensures that the request completes no more than one time. If you retry a request with the same token and the same parameters, the request will complete successfully. However, if you try to create a new resource using the same token but different parameters, an HTTP 409 conflict occurs. If you omit this value, AWS SDKs will automatically generate a unique client request. For more information about idempotency, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency in Amazon EC2 API requests</a>.</p>
pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_request_token = ::std::option::Option::Some(input.into());
self
}
/// <p>Each resource must have a unique client request token. The client token is used to implement idempotency. It ensures that the request completes no more than one time. If you retry a request with the same token and the same parameters, the request will complete successfully. However, if you try to create a new resource using the same token but different parameters, an HTTP 409 conflict occurs. If you omit this value, AWS SDKs will automatically generate a unique client request. For more information about idempotency, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency in Amazon EC2 API requests</a>.</p>
pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_request_token = input;
self
}
/// <p>Each resource must have a unique client request token. The client token is used to implement idempotency. It ensures that the request completes no more than one time. If you retry a request with the same token and the same parameters, the request will complete successfully. However, if you try to create a new resource using the same token but different parameters, an HTTP 409 conflict occurs. If you omit this value, AWS SDKs will automatically generate a unique client request. For more information about idempotency, see <a href="https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html">Ensuring idempotency in Amazon EC2 API requests</a>.</p>
pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_request_token
}
/// <p>The device configuration information to use to create the wireless device.</p>
pub fn lo_ra_wan(mut self, input: crate::types::LoRaWanDevice) -> Self {
self.lo_ra_wan = ::std::option::Option::Some(input);
self
}
/// <p>The device configuration information to use to create the wireless device.</p>
pub fn set_lo_ra_wan(mut self, input: ::std::option::Option<crate::types::LoRaWanDevice>) -> Self {
self.lo_ra_wan = input;
self
}
/// <p>The device configuration information to use to create the wireless device.</p>
pub fn get_lo_ra_wan(&self) -> &::std::option::Option<crate::types::LoRaWanDevice> {
&self.lo_ra_wan
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags to attach to the new wireless device. Tags are metadata that you can use to manage a resource.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>The tags to attach to the new wireless device. Tags are metadata that you can use to manage a resource.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>The tags to attach to the new wireless device. Tags are metadata that you can use to manage a resource.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>The integration status of the Device Location feature for LoRaWAN and Sidewalk devices.</p>
pub fn positioning(mut self, input: crate::types::PositioningConfigStatus) -> Self {
self.positioning = ::std::option::Option::Some(input);
self
}
/// <p>The integration status of the Device Location feature for LoRaWAN and Sidewalk devices.</p>
pub fn set_positioning(mut self, input: ::std::option::Option<crate::types::PositioningConfigStatus>) -> Self {
self.positioning = input;
self
}
/// <p>The integration status of the Device Location feature for LoRaWAN and Sidewalk devices.</p>
pub fn get_positioning(&self) -> &::std::option::Option<crate::types::PositioningConfigStatus> {
&self.positioning
}
/// <p>The device configuration information to use to create the Sidewalk device.</p>
pub fn sidewalk(mut self, input: crate::types::SidewalkCreateWirelessDevice) -> Self {
self.sidewalk = ::std::option::Option::Some(input);
self
}
/// <p>The device configuration information to use to create the Sidewalk device.</p>
pub fn set_sidewalk(mut self, input: ::std::option::Option<crate::types::SidewalkCreateWirelessDevice>) -> Self {
self.sidewalk = input;
self
}
/// <p>The device configuration information to use to create the Sidewalk device.</p>
pub fn get_sidewalk(&self) -> &::std::option::Option<crate::types::SidewalkCreateWirelessDevice> {
&self.sidewalk
}
/// Consumes the builder and constructs a [`CreateWirelessDeviceInput`](crate::operation::create_wireless_device::CreateWirelessDeviceInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_wireless_device::CreateWirelessDeviceInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_wireless_device::CreateWirelessDeviceInput {
r#type: self.r#type,
name: self.name,
description: self.description,
destination_name: self.destination_name,
client_request_token: self.client_request_token,
lo_ra_wan: self.lo_ra_wan,
tags: self.tags,
positioning: self.positioning,
sidewalk: self.sidewalk,
})
}
}