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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UploadLayerPartInput {
    /// <p>The Amazon Web Services account ID, or registry alias, that's associated with the registry that you're uploading layer parts to. If you do not specify a registry, the default public registry is assumed.</p>
    pub registry_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the repository that you're uploading layer parts to.</p>
    pub repository_name: ::std::option::Option<::std::string::String>,
    /// <p>The upload ID from a previous <code>InitiateLayerUpload</code> operation to associate with the layer part upload.</p>
    pub upload_id: ::std::option::Option<::std::string::String>,
    /// <p>The position of the first byte of the layer part witin the overall image layer.</p>
    pub part_first_byte: ::std::option::Option<i64>,
    /// <p>The position of the last byte of the layer part within the overall image layer.</p>
    pub part_last_byte: ::std::option::Option<i64>,
    /// <p>The base64-encoded layer part payload.</p>
    pub layer_part_blob: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl UploadLayerPartInput {
    /// <p>The Amazon Web Services account ID, or registry alias, that's associated with the registry that you're uploading layer parts to. If you do not specify a registry, the default public registry is assumed.</p>
    pub fn registry_id(&self) -> ::std::option::Option<&str> {
        self.registry_id.as_deref()
    }
    /// <p>The name of the repository that you're uploading layer parts to.</p>
    pub fn repository_name(&self) -> ::std::option::Option<&str> {
        self.repository_name.as_deref()
    }
    /// <p>The upload ID from a previous <code>InitiateLayerUpload</code> operation to associate with the layer part upload.</p>
    pub fn upload_id(&self) -> ::std::option::Option<&str> {
        self.upload_id.as_deref()
    }
    /// <p>The position of the first byte of the layer part witin the overall image layer.</p>
    pub fn part_first_byte(&self) -> ::std::option::Option<i64> {
        self.part_first_byte
    }
    /// <p>The position of the last byte of the layer part within the overall image layer.</p>
    pub fn part_last_byte(&self) -> ::std::option::Option<i64> {
        self.part_last_byte
    }
    /// <p>The base64-encoded layer part payload.</p>
    pub fn layer_part_blob(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
        self.layer_part_blob.as_ref()
    }
}
impl UploadLayerPartInput {
    /// Creates a new builder-style object to manufacture [`UploadLayerPartInput`](crate::operation::upload_layer_part::UploadLayerPartInput).
    pub fn builder() -> crate::operation::upload_layer_part::builders::UploadLayerPartInputBuilder {
        crate::operation::upload_layer_part::builders::UploadLayerPartInputBuilder::default()
    }
}

/// A builder for [`UploadLayerPartInput`](crate::operation::upload_layer_part::UploadLayerPartInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct UploadLayerPartInputBuilder {
    pub(crate) registry_id: ::std::option::Option<::std::string::String>,
    pub(crate) repository_name: ::std::option::Option<::std::string::String>,
    pub(crate) upload_id: ::std::option::Option<::std::string::String>,
    pub(crate) part_first_byte: ::std::option::Option<i64>,
    pub(crate) part_last_byte: ::std::option::Option<i64>,
    pub(crate) layer_part_blob: ::std::option::Option<::aws_smithy_types::Blob>,
}
impl UploadLayerPartInputBuilder {
    /// <p>The Amazon Web Services account ID, or registry alias, that's associated with the registry that you're uploading layer parts to. If you do not specify a registry, the default public registry is assumed.</p>
    pub fn registry_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.registry_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID, or registry alias, that's associated with the registry that you're uploading layer parts to. If you do not specify a registry, the default public registry is assumed.</p>
    pub fn set_registry_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.registry_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID, or registry alias, that's associated with the registry that you're uploading layer parts to. If you do not specify a registry, the default public registry is assumed.</p>
    pub fn get_registry_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.registry_id
    }
    /// <p>The name of the repository that you're uploading layer parts to.</p>
    /// This field is required.
    pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.repository_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the repository that you're uploading layer parts to.</p>
    pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.repository_name = input;
        self
    }
    /// <p>The name of the repository that you're uploading layer parts to.</p>
    pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.repository_name
    }
    /// <p>The upload ID from a previous <code>InitiateLayerUpload</code> operation to associate with the layer part upload.</p>
    /// This field is required.
    pub fn upload_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.upload_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The upload ID from a previous <code>InitiateLayerUpload</code> operation to associate with the layer part upload.</p>
    pub fn set_upload_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.upload_id = input;
        self
    }
    /// <p>The upload ID from a previous <code>InitiateLayerUpload</code> operation to associate with the layer part upload.</p>
    pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.upload_id
    }
    /// <p>The position of the first byte of the layer part witin the overall image layer.</p>
    /// This field is required.
    pub fn part_first_byte(mut self, input: i64) -> Self {
        self.part_first_byte = ::std::option::Option::Some(input);
        self
    }
    /// <p>The position of the first byte of the layer part witin the overall image layer.</p>
    pub fn set_part_first_byte(mut self, input: ::std::option::Option<i64>) -> Self {
        self.part_first_byte = input;
        self
    }
    /// <p>The position of the first byte of the layer part witin the overall image layer.</p>
    pub fn get_part_first_byte(&self) -> &::std::option::Option<i64> {
        &self.part_first_byte
    }
    /// <p>The position of the last byte of the layer part within the overall image layer.</p>
    /// This field is required.
    pub fn part_last_byte(mut self, input: i64) -> Self {
        self.part_last_byte = ::std::option::Option::Some(input);
        self
    }
    /// <p>The position of the last byte of the layer part within the overall image layer.</p>
    pub fn set_part_last_byte(mut self, input: ::std::option::Option<i64>) -> Self {
        self.part_last_byte = input;
        self
    }
    /// <p>The position of the last byte of the layer part within the overall image layer.</p>
    pub fn get_part_last_byte(&self) -> &::std::option::Option<i64> {
        &self.part_last_byte
    }
    /// <p>The base64-encoded layer part payload.</p>
    /// This field is required.
    pub fn layer_part_blob(mut self, input: ::aws_smithy_types::Blob) -> Self {
        self.layer_part_blob = ::std::option::Option::Some(input);
        self
    }
    /// <p>The base64-encoded layer part payload.</p>
    pub fn set_layer_part_blob(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
        self.layer_part_blob = input;
        self
    }
    /// <p>The base64-encoded layer part payload.</p>
    pub fn get_layer_part_blob(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
        &self.layer_part_blob
    }
    /// Consumes the builder and constructs a [`UploadLayerPartInput`](crate::operation::upload_layer_part::UploadLayerPartInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::upload_layer_part::UploadLayerPartInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::upload_layer_part::UploadLayerPartInput {
            registry_id: self.registry_id,
            repository_name: self.repository_name,
            upload_id: self.upload_id,
            part_first_byte: self.part_first_byte,
            part_last_byte: self.part_last_byte,
            layer_part_blob: self.layer_part_blob,
        })
    }
}