pub struct Builder { /* private fields */ }
Expand description

A builder for CreateDeviceInput.

Implementations§

The ID of the global network.

Examples found in repository?
src/client.rs (line 2397)
2396
2397
2398
2399
        pub fn global_network_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.global_network_id(input.into());
            self
        }

The ID of the global network.

Examples found in repository?
src/client.rs (line 2405)
2401
2402
2403
2404
2405
2406
2407
        pub fn set_global_network_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_global_network_id(input);
            self
        }

The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.

Examples found in repository?
src/client.rs (line 2410)
2409
2410
2411
2412
        pub fn aws_location(mut self, input: crate::model::AwsLocation) -> Self {
            self.inner = self.inner.aws_location(input);
            self
        }

The Amazon Web Services location of the device, if applicable. For an on-premises device, you can omit this parameter.

Examples found in repository?
src/client.rs (line 2418)
2414
2415
2416
2417
2418
2419
2420
        pub fn set_aws_location(
            mut self,
            input: std::option::Option<crate::model::AwsLocation>,
        ) -> Self {
            self.inner = self.inner.set_aws_location(input);
            self
        }

A description of the device.

Constraints: Maximum length of 256 characters.

Examples found in repository?
src/client.rs (line 2424)
2423
2424
2425
2426
        pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.description(input.into());
            self
        }

A description of the device.

Constraints: Maximum length of 256 characters.

Examples found in repository?
src/client.rs (line 2430)
2429
2430
2431
2432
        pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_description(input);
            self
        }

The type of the device.

Examples found in repository?
src/client.rs (line 2435)
2434
2435
2436
2437
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.r#type(input.into());
            self
        }

The type of the device.

Examples found in repository?
src/client.rs (line 2440)
2439
2440
2441
2442
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_type(input);
            self
        }

The vendor of the device.

Constraints: Maximum length of 128 characters.

Examples found in repository?
src/client.rs (line 2446)
2445
2446
2447
2448
        pub fn vendor(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.vendor(input.into());
            self
        }

The vendor of the device.

Constraints: Maximum length of 128 characters.

Examples found in repository?
src/client.rs (line 2452)
2451
2452
2453
2454
        pub fn set_vendor(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_vendor(input);
            self
        }

The model of the device.

Constraints: Maximum length of 128 characters.

Examples found in repository?
src/client.rs (line 2458)
2457
2458
2459
2460
        pub fn model(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.model(input.into());
            self
        }

The model of the device.

Constraints: Maximum length of 128 characters.

Examples found in repository?
src/client.rs (line 2464)
2463
2464
2465
2466
        pub fn set_model(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_model(input);
            self
        }

The serial number of the device.

Constraints: Maximum length of 128 characters.

Examples found in repository?
src/client.rs (line 2470)
2469
2470
2471
2472
        pub fn serial_number(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.serial_number(input.into());
            self
        }

The serial number of the device.

Constraints: Maximum length of 128 characters.

Examples found in repository?
src/client.rs (line 2479)
2475
2476
2477
2478
2479
2480
2481
        pub fn set_serial_number(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_serial_number(input);
            self
        }

The location of the device.

Examples found in repository?
src/client.rs (line 2484)
2483
2484
2485
2486
        pub fn location(mut self, input: crate::model::Location) -> Self {
            self.inner = self.inner.location(input);
            self
        }

The location of the device.

Examples found in repository?
src/client.rs (line 2489)
2488
2489
2490
2491
        pub fn set_location(mut self, input: std::option::Option<crate::model::Location>) -> Self {
            self.inner = self.inner.set_location(input);
            self
        }

The ID of the site.

Examples found in repository?
src/client.rs (line 2494)
2493
2494
2495
2496
        pub fn site_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.site_id(input.into());
            self
        }

The ID of the site.

Examples found in repository?
src/client.rs (line 2499)
2498
2499
2500
2501
        pub fn set_site_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_site_id(input);
            self
        }

Appends an item to tags.

To override the contents of this collection use set_tags.

The tags to apply to the resource during creation.

Examples found in repository?
src/client.rs (line 2508)
2507
2508
2509
2510
        pub fn tags(mut self, input: crate::model::Tag) -> Self {
            self.inner = self.inner.tags(input);
            self
        }

The tags to apply to the resource during creation.

Examples found in repository?
src/client.rs (line 2516)
2512
2513
2514
2515
2516
2517
2518
        pub fn set_tags(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
        ) -> Self {
            self.inner = self.inner.set_tags(input);
            self
        }

Consumes the builder and constructs a CreateDeviceInput.

Examples found in repository?
src/client.rs (line 2364)
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateDevice,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateDeviceError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreateDeviceOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateDeviceError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more