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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A ZIP archive that contains the contents of an <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">Lambda layer</a>. You can specify either an Amazon S3 location, or upload a layer archive directly.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct LayerVersionContentInput {
    /// <p>The Amazon S3 bucket of the layer archive.</p>
    pub s3_bucket: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon S3 key of the layer archive.</p>
    pub s3_key: ::std::option::Option<::std::string::String>,
    /// <p>For versioned objects, the version of the layer archive object to use.</p>
    pub s3_object_version: ::std::option::Option<::std::string::String>,
    /// <p>The base64-encoded contents of the layer archive. Amazon Web Services SDK and Amazon Web Services CLI clients handle the encoding for you.</p>
    pub zip_file: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl LayerVersionContentInput {
    /// <p>The Amazon S3 bucket of the layer archive.</p>
    pub fn s3_bucket(&self) -> ::std::option::Option<&str> {
        self.s3_bucket.as_deref()
    }
    /// <p>The Amazon S3 key of the layer archive.</p>
    pub fn s3_key(&self) -> ::std::option::Option<&str> {
        self.s3_key.as_deref()
    }
    /// <p>For versioned objects, the version of the layer archive object to use.</p>
    pub fn s3_object_version(&self) -> ::std::option::Option<&str> {
        self.s3_object_version.as_deref()
    }
    /// <p>The base64-encoded contents of the layer archive. Amazon Web Services SDK and Amazon Web Services CLI clients handle the encoding for you.</p>
    pub fn zip_file(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
        self.zip_file.as_ref()
    }
}
impl ::std::fmt::Debug for LayerVersionContentInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("LayerVersionContentInput");
        formatter.field("s3_bucket", &self.s3_bucket);
        formatter.field("s3_key", &self.s3_key);
        formatter.field("s3_object_version", &self.s3_object_version);
        formatter.field("zip_file", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl LayerVersionContentInput {
    /// Creates a new builder-style object to manufacture [`LayerVersionContentInput`](crate::types::LayerVersionContentInput).
    pub fn builder() -> crate::types::builders::LayerVersionContentInputBuilder {
        crate::types::builders::LayerVersionContentInputBuilder::default()
    }
}

/// A builder for [`LayerVersionContentInput`](crate::types::LayerVersionContentInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct LayerVersionContentInputBuilder {
    pub(crate) s3_bucket: ::std::option::Option<::std::string::String>,
    pub(crate) s3_key: ::std::option::Option<::std::string::String>,
    pub(crate) s3_object_version: ::std::option::Option<::std::string::String>,
    pub(crate) zip_file: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl LayerVersionContentInputBuilder {
    /// <p>The Amazon S3 bucket of the layer archive.</p>
    pub fn s3_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.s3_bucket = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon S3 bucket of the layer archive.</p>
    pub fn set_s3_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.s3_bucket = input;
        self
    }
    /// <p>The Amazon S3 bucket of the layer archive.</p>
    pub fn get_s3_bucket(&self) -> &::std::option::Option<::std::string::String> {
        &self.s3_bucket
    }
    /// <p>The Amazon S3 key of the layer archive.</p>
    pub fn s3_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.s3_key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon S3 key of the layer archive.</p>
    pub fn set_s3_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.s3_key = input;
        self
    }
    /// <p>The Amazon S3 key of the layer archive.</p>
    pub fn get_s3_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.s3_key
    }
    /// <p>For versioned objects, the version of the layer archive object to use.</p>
    pub fn s3_object_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.s3_object_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>For versioned objects, the version of the layer archive object to use.</p>
    pub fn set_s3_object_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.s3_object_version = input;
        self
    }
    /// <p>For versioned objects, the version of the layer archive object to use.</p>
    pub fn get_s3_object_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.s3_object_version
    }
    /// <p>The base64-encoded contents of the layer archive. Amazon Web Services SDK and Amazon Web Services CLI clients handle the encoding for you.</p>
    pub fn zip_file(mut self, input: ::aws_smithy_types::Blob) -> Self {
        self.zip_file = ::std::option::Option::Some(input);
        self
    }
    /// <p>The base64-encoded contents of the layer archive. Amazon Web Services SDK and Amazon Web Services CLI clients handle the encoding for you.</p>
    pub fn set_zip_file(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        self.zip_file = input;
        self
    }
    /// <p>The base64-encoded contents of the layer archive. Amazon Web Services SDK and Amazon Web Services CLI clients handle the encoding for you.</p>
    pub fn get_zip_file(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
        &self.zip_file
    }
    /// Consumes the builder and constructs a [`LayerVersionContentInput`](crate::types::LayerVersionContentInput).
    pub fn build(self) -> crate::types::LayerVersionContentInput {
        crate::types::LayerVersionContentInput {
            s3_bucket: self.s3_bucket,
            s3_key: self.s3_key,
            s3_object_version: self.s3_object_version,
            zip_file: self.zip_file,
        }
    }
}
impl ::std::fmt::Debug for LayerVersionContentInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("LayerVersionContentInputBuilder");
        formatter.field("s3_bucket", &self.s3_bucket);
        formatter.field("s3_key", &self.s3_key);
        formatter.field("s3_object_version", &self.s3_object_version);
        formatter.field("zip_file", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}