aws_sdk_iot/types/
_file_location.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The location of the OTA update.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct FileLocation {
7    /// <p>The stream that contains the OTA update.</p>
8    pub stream: ::std::option::Option<crate::types::Stream>,
9    /// <p>The location of the updated firmware in S3.</p>
10    pub s3_location: ::std::option::Option<crate::types::S3Location>,
11}
12impl FileLocation {
13    /// <p>The stream that contains the OTA update.</p>
14    pub fn stream(&self) -> ::std::option::Option<&crate::types::Stream> {
15        self.stream.as_ref()
16    }
17    /// <p>The location of the updated firmware in S3.</p>
18    pub fn s3_location(&self) -> ::std::option::Option<&crate::types::S3Location> {
19        self.s3_location.as_ref()
20    }
21}
22impl FileLocation {
23    /// Creates a new builder-style object to manufacture [`FileLocation`](crate::types::FileLocation).
24    pub fn builder() -> crate::types::builders::FileLocationBuilder {
25        crate::types::builders::FileLocationBuilder::default()
26    }
27}
28
29/// A builder for [`FileLocation`](crate::types::FileLocation).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct FileLocationBuilder {
33    pub(crate) stream: ::std::option::Option<crate::types::Stream>,
34    pub(crate) s3_location: ::std::option::Option<crate::types::S3Location>,
35}
36impl FileLocationBuilder {
37    /// <p>The stream that contains the OTA update.</p>
38    pub fn stream(mut self, input: crate::types::Stream) -> Self {
39        self.stream = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>The stream that contains the OTA update.</p>
43    pub fn set_stream(mut self, input: ::std::option::Option<crate::types::Stream>) -> Self {
44        self.stream = input;
45        self
46    }
47    /// <p>The stream that contains the OTA update.</p>
48    pub fn get_stream(&self) -> &::std::option::Option<crate::types::Stream> {
49        &self.stream
50    }
51    /// <p>The location of the updated firmware in S3.</p>
52    pub fn s3_location(mut self, input: crate::types::S3Location) -> Self {
53        self.s3_location = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>The location of the updated firmware in S3.</p>
57    pub fn set_s3_location(mut self, input: ::std::option::Option<crate::types::S3Location>) -> Self {
58        self.s3_location = input;
59        self
60    }
61    /// <p>The location of the updated firmware in S3.</p>
62    pub fn get_s3_location(&self) -> &::std::option::Option<crate::types::S3Location> {
63        &self.s3_location
64    }
65    /// Consumes the builder and constructs a [`FileLocation`](crate::types::FileLocation).
66    pub fn build(self) -> crate::types::FileLocation {
67        crate::types::FileLocation {
68            stream: self.stream,
69            s3_location: self.s3_location,
70        }
71    }
72}