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
// 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 CompleteLayerUploadInput {
/// <p>The Amazon Web Services account ID associated with the registry to which to upload layers. If you do not specify a registry, the default registry is assumed.</p>
pub registry_id: ::std::option::Option<::std::string::String>,
/// <p>The name of the repository to associate with the image layer.</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 image layer.</p>
pub upload_id: ::std::option::Option<::std::string::String>,
/// <p>The <code>sha256</code> digest of the image layer.</p>
pub layer_digests: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl CompleteLayerUploadInput {
/// <p>The Amazon Web Services account ID associated with the registry to which to upload layers. If you do not specify a registry, the default registry is assumed.</p>
pub fn registry_id(&self) -> ::std::option::Option<&str> {
self.registry_id.as_deref()
}
/// <p>The name of the repository to associate with the image layer.</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 image layer.</p>
pub fn upload_id(&self) -> ::std::option::Option<&str> {
self.upload_id.as_deref()
}
/// <p>The <code>sha256</code> digest of the image layer.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.layer_digests.is_none()`.
pub fn layer_digests(&self) -> &[::std::string::String] {
self.layer_digests.as_deref().unwrap_or_default()
}
}
impl CompleteLayerUploadInput {
/// Creates a new builder-style object to manufacture [`CompleteLayerUploadInput`](crate::operation::complete_layer_upload::CompleteLayerUploadInput).
pub fn builder() -> crate::operation::complete_layer_upload::builders::CompleteLayerUploadInputBuilder {
crate::operation::complete_layer_upload::builders::CompleteLayerUploadInputBuilder::default()
}
}
/// A builder for [`CompleteLayerUploadInput`](crate::operation::complete_layer_upload::CompleteLayerUploadInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CompleteLayerUploadInputBuilder {
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) layer_digests: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl CompleteLayerUploadInputBuilder {
/// <p>The Amazon Web Services account ID associated with the registry to which to upload layers. If you do not specify a registry, the default 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 associated with the registry to which to upload layers. If you do not specify a registry, the default 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 associated with the registry to which to upload layers. If you do not specify a registry, the default 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 to associate with the image layer.</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 to associate with the image layer.</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 to associate with the image layer.</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 image layer.</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 image layer.</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 image layer.</p>
pub fn get_upload_id(&self) -> &::std::option::Option<::std::string::String> {
&self.upload_id
}
/// Appends an item to `layer_digests`.
///
/// To override the contents of this collection use [`set_layer_digests`](Self::set_layer_digests).
///
/// <p>The <code>sha256</code> digest of the image layer.</p>
pub fn layer_digests(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.layer_digests.unwrap_or_default();
v.push(input.into());
self.layer_digests = ::std::option::Option::Some(v);
self
}
/// <p>The <code>sha256</code> digest of the image layer.</p>
pub fn set_layer_digests(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.layer_digests = input;
self
}
/// <p>The <code>sha256</code> digest of the image layer.</p>
pub fn get_layer_digests(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.layer_digests
}
/// Consumes the builder and constructs a [`CompleteLayerUploadInput`](crate::operation::complete_layer_upload::CompleteLayerUploadInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::complete_layer_upload::CompleteLayerUploadInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::complete_layer_upload::CompleteLayerUploadInput {
registry_id: self.registry_id,
repository_name: self.repository_name,
upload_id: self.upload_id,
layer_digests: self.layer_digests,
})
}
}