1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The location of the OTA update.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct FileLocation {
    /// <p>The stream that contains the OTA update.</p>
    pub stream: ::std::option::Option<crate::types::Stream>,
    /// <p>The location of the updated firmware in S3.</p>
    pub s3_location: ::std::option::Option<crate::types::S3Location>,
}
impl FileLocation {
    /// <p>The stream that contains the OTA update.</p>
    pub fn stream(&self) -> ::std::option::Option<&crate::types::Stream> {
        self.stream.as_ref()
    }
    /// <p>The location of the updated firmware in S3.</p>
    pub fn s3_location(&self) -> ::std::option::Option<&crate::types::S3Location> {
        self.s3_location.as_ref()
    }
}
impl FileLocation {
    /// Creates a new builder-style object to manufacture [`FileLocation`](crate::types::FileLocation).
    pub fn builder() -> crate::types::builders::FileLocationBuilder {
        crate::types::builders::FileLocationBuilder::default()
    }
}

/// A builder for [`FileLocation`](crate::types::FileLocation).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct FileLocationBuilder {
    pub(crate) stream: ::std::option::Option<crate::types::Stream>,
    pub(crate) s3_location: ::std::option::Option<crate::types::S3Location>,
}
impl FileLocationBuilder {
    /// <p>The stream that contains the OTA update.</p>
    pub fn stream(mut self, input: crate::types::Stream) -> Self {
        self.stream = ::std::option::Option::Some(input);
        self
    }
    /// <p>The stream that contains the OTA update.</p>
    pub fn set_stream(mut self, input: ::std::option::Option<crate::types::Stream>) -> Self {
        self.stream = input;
        self
    }
    /// <p>The stream that contains the OTA update.</p>
    pub fn get_stream(&self) -> &::std::option::Option<crate::types::Stream> {
        &self.stream
    }
    /// <p>The location of the updated firmware in S3.</p>
    pub fn s3_location(mut self, input: crate::types::S3Location) -> Self {
        self.s3_location = ::std::option::Option::Some(input);
        self
    }
    /// <p>The location of the updated firmware in S3.</p>
    pub fn set_s3_location(mut self, input: ::std::option::Option<crate::types::S3Location>) -> Self {
        self.s3_location = input;
        self
    }
    /// <p>The location of the updated firmware in S3.</p>
    pub fn get_s3_location(&self) -> &::std::option::Option<crate::types::S3Location> {
        &self.s3_location
    }
    /// Consumes the builder and constructs a [`FileLocation`](crate::types::FileLocation).
    pub fn build(self) -> crate::types::FileLocation {
        crate::types::FileLocation {
            stream: self.stream,
            s3_location: self.s3_location,
        }
    }
}