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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The destination for the asset.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AssetDestinationEntry {
    /// <p>The unique identifier for the asset.</p>
    pub asset_id: ::std::string::String,
    /// <p>The Amazon S3 bucket that is the destination for the asset.</p>
    pub bucket: ::std::string::String,
    /// <p>The name of the object in Amazon S3 for the asset.</p>
    pub key: ::std::option::Option<::std::string::String>,
}
impl AssetDestinationEntry {
    /// <p>The unique identifier for the asset.</p>
    pub fn asset_id(&self) -> &str {
        use std::ops::Deref;
        self.asset_id.deref()
    }
    /// <p>The Amazon S3 bucket that is the destination for the asset.</p>
    pub fn bucket(&self) -> &str {
        use std::ops::Deref;
        self.bucket.deref()
    }
    /// <p>The name of the object in Amazon S3 for the asset.</p>
    pub fn key(&self) -> ::std::option::Option<&str> {
        self.key.as_deref()
    }
}
impl AssetDestinationEntry {
    /// Creates a new builder-style object to manufacture [`AssetDestinationEntry`](crate::types::AssetDestinationEntry).
    pub fn builder() -> crate::types::builders::AssetDestinationEntryBuilder {
        crate::types::builders::AssetDestinationEntryBuilder::default()
    }
}

/// A builder for [`AssetDestinationEntry`](crate::types::AssetDestinationEntry).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AssetDestinationEntryBuilder {
    pub(crate) asset_id: ::std::option::Option<::std::string::String>,
    pub(crate) bucket: ::std::option::Option<::std::string::String>,
    pub(crate) key: ::std::option::Option<::std::string::String>,
}
impl AssetDestinationEntryBuilder {
    /// <p>The unique identifier for the asset.</p>
    /// This field is required.
    pub fn asset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.asset_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the asset.</p>
    pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.asset_id = input;
        self
    }
    /// <p>The unique identifier for the asset.</p>
    pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.asset_id
    }
    /// <p>The Amazon S3 bucket that is the destination for the asset.</p>
    /// This field is required.
    pub fn bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.bucket = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon S3 bucket that is the destination for the asset.</p>
    pub fn set_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.bucket = input;
        self
    }
    /// <p>The Amazon S3 bucket that is the destination for the asset.</p>
    pub fn get_bucket(&self) -> &::std::option::Option<::std::string::String> {
        &self.bucket
    }
    /// <p>The name of the object in Amazon S3 for the asset.</p>
    pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the object in Amazon S3 for the asset.</p>
    pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.key = input;
        self
    }
    /// <p>The name of the object in Amazon S3 for the asset.</p>
    pub fn get_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.key
    }
    /// Consumes the builder and constructs a [`AssetDestinationEntry`](crate::types::AssetDestinationEntry).
    /// This method will fail if any of the following fields are not set:
    /// - [`asset_id`](crate::types::builders::AssetDestinationEntryBuilder::asset_id)
    /// - [`bucket`](crate::types::builders::AssetDestinationEntryBuilder::bucket)
    pub fn build(self) -> ::std::result::Result<crate::types::AssetDestinationEntry, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::AssetDestinationEntry {
            asset_id: self.asset_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "asset_id",
                    "asset_id was not specified but it is required when building AssetDestinationEntry",
                )
            })?,
            bucket: self.bucket.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "bucket",
                    "bucket was not specified but it is required when building AssetDestinationEntry",
                )
            })?,
            key: self.key,
        })
    }
}