aws_sdk_ecr/operation/put_image/
_put_image_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct PutImageInput {
6 pub registry_id: ::std::option::Option<::std::string::String>,
8 pub repository_name: ::std::option::Option<::std::string::String>,
10 pub image_manifest: ::std::option::Option<::std::string::String>,
12 pub image_manifest_media_type: ::std::option::Option<::std::string::String>,
14 pub image_tag: ::std::option::Option<::std::string::String>,
16 pub image_digest: ::std::option::Option<::std::string::String>,
18}
19impl PutImageInput {
20 pub fn registry_id(&self) -> ::std::option::Option<&str> {
22 self.registry_id.as_deref()
23 }
24 pub fn repository_name(&self) -> ::std::option::Option<&str> {
26 self.repository_name.as_deref()
27 }
28 pub fn image_manifest(&self) -> ::std::option::Option<&str> {
30 self.image_manifest.as_deref()
31 }
32 pub fn image_manifest_media_type(&self) -> ::std::option::Option<&str> {
34 self.image_manifest_media_type.as_deref()
35 }
36 pub fn image_tag(&self) -> ::std::option::Option<&str> {
38 self.image_tag.as_deref()
39 }
40 pub fn image_digest(&self) -> ::std::option::Option<&str> {
42 self.image_digest.as_deref()
43 }
44}
45impl PutImageInput {
46 pub fn builder() -> crate::operation::put_image::builders::PutImageInputBuilder {
48 crate::operation::put_image::builders::PutImageInputBuilder::default()
49 }
50}
51
52#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct PutImageInputBuilder {
56 pub(crate) registry_id: ::std::option::Option<::std::string::String>,
57 pub(crate) repository_name: ::std::option::Option<::std::string::String>,
58 pub(crate) image_manifest: ::std::option::Option<::std::string::String>,
59 pub(crate) image_manifest_media_type: ::std::option::Option<::std::string::String>,
60 pub(crate) image_tag: ::std::option::Option<::std::string::String>,
61 pub(crate) image_digest: ::std::option::Option<::std::string::String>,
62}
63impl PutImageInputBuilder {
64 pub fn registry_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66 self.registry_id = ::std::option::Option::Some(input.into());
67 self
68 }
69 pub fn set_registry_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71 self.registry_id = input;
72 self
73 }
74 pub fn get_registry_id(&self) -> &::std::option::Option<::std::string::String> {
76 &self.registry_id
77 }
78 pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.repository_name = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.repository_name = input;
87 self
88 }
89 pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
91 &self.repository_name
92 }
93 pub fn image_manifest(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.image_manifest = ::std::option::Option::Some(input.into());
97 self
98 }
99 pub fn set_image_manifest(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.image_manifest = input;
102 self
103 }
104 pub fn get_image_manifest(&self) -> &::std::option::Option<::std::string::String> {
106 &self.image_manifest
107 }
108 pub fn image_manifest_media_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110 self.image_manifest_media_type = ::std::option::Option::Some(input.into());
111 self
112 }
113 pub fn set_image_manifest_media_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115 self.image_manifest_media_type = input;
116 self
117 }
118 pub fn get_image_manifest_media_type(&self) -> &::std::option::Option<::std::string::String> {
120 &self.image_manifest_media_type
121 }
122 pub fn image_tag(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124 self.image_tag = ::std::option::Option::Some(input.into());
125 self
126 }
127 pub fn set_image_tag(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.image_tag = input;
130 self
131 }
132 pub fn get_image_tag(&self) -> &::std::option::Option<::std::string::String> {
134 &self.image_tag
135 }
136 pub fn image_digest(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 self.image_digest = ::std::option::Option::Some(input.into());
139 self
140 }
141 pub fn set_image_digest(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.image_digest = input;
144 self
145 }
146 pub fn get_image_digest(&self) -> &::std::option::Option<::std::string::String> {
148 &self.image_digest
149 }
150 pub fn build(self) -> ::std::result::Result<crate::operation::put_image::PutImageInput, ::aws_smithy_types::error::operation::BuildError> {
152 ::std::result::Result::Ok(crate::operation::put_image::PutImageInput {
153 registry_id: self.registry_id,
154 repository_name: self.repository_name,
155 image_manifest: self.image_manifest,
156 image_manifest_media_type: self.image_manifest_media_type,
157 image_tag: self.image_tag,
158 image_digest: self.image_digest,
159 })
160 }
161}