aws_sdk_ecr/operation/delete_repository/_delete_repository_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteRepositoryInput {
6 /// <p>The Amazon Web Services account ID associated with the registry that contains the repository to delete. If you do not specify a registry, the default registry is assumed.</p>
7 pub registry_id: ::std::option::Option<::std::string::String>,
8 /// <p>The name of the repository to delete.</p>
9 pub repository_name: ::std::option::Option<::std::string::String>,
10 /// <p>If true, deleting the repository force deletes the contents of the repository. If false, the repository must be empty before attempting to delete it.</p>
11 pub force: ::std::option::Option<bool>,
12}
13impl DeleteRepositoryInput {
14 /// <p>The Amazon Web Services account ID associated with the registry that contains the repository to delete. If you do not specify a registry, the default registry is assumed.</p>
15 pub fn registry_id(&self) -> ::std::option::Option<&str> {
16 self.registry_id.as_deref()
17 }
18 /// <p>The name of the repository to delete.</p>
19 pub fn repository_name(&self) -> ::std::option::Option<&str> {
20 self.repository_name.as_deref()
21 }
22 /// <p>If true, deleting the repository force deletes the contents of the repository. If false, the repository must be empty before attempting to delete it.</p>
23 pub fn force(&self) -> ::std::option::Option<bool> {
24 self.force
25 }
26}
27impl DeleteRepositoryInput {
28 /// Creates a new builder-style object to manufacture [`DeleteRepositoryInput`](crate::operation::delete_repository::DeleteRepositoryInput).
29 pub fn builder() -> crate::operation::delete_repository::builders::DeleteRepositoryInputBuilder {
30 crate::operation::delete_repository::builders::DeleteRepositoryInputBuilder::default()
31 }
32}
33
34/// A builder for [`DeleteRepositoryInput`](crate::operation::delete_repository::DeleteRepositoryInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DeleteRepositoryInputBuilder {
38 pub(crate) registry_id: ::std::option::Option<::std::string::String>,
39 pub(crate) repository_name: ::std::option::Option<::std::string::String>,
40 pub(crate) force: ::std::option::Option<bool>,
41}
42impl DeleteRepositoryInputBuilder {
43 /// <p>The Amazon Web Services account ID associated with the registry that contains the repository to delete. If you do not specify a registry, the default registry is assumed.</p>
44 pub fn registry_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45 self.registry_id = ::std::option::Option::Some(input.into());
46 self
47 }
48 /// <p>The Amazon Web Services account ID associated with the registry that contains the repository to delete. If you do not specify a registry, the default registry is assumed.</p>
49 pub fn set_registry_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50 self.registry_id = input;
51 self
52 }
53 /// <p>The Amazon Web Services account ID associated with the registry that contains the repository to delete. If you do not specify a registry, the default registry is assumed.</p>
54 pub fn get_registry_id(&self) -> &::std::option::Option<::std::string::String> {
55 &self.registry_id
56 }
57 /// <p>The name of the repository to delete.</p>
58 /// This field is required.
59 pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.repository_name = ::std::option::Option::Some(input.into());
61 self
62 }
63 /// <p>The name of the repository to delete.</p>
64 pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.repository_name = input;
66 self
67 }
68 /// <p>The name of the repository to delete.</p>
69 pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
70 &self.repository_name
71 }
72 /// <p>If true, deleting the repository force deletes the contents of the repository. If false, the repository must be empty before attempting to delete it.</p>
73 pub fn force(mut self, input: bool) -> Self {
74 self.force = ::std::option::Option::Some(input);
75 self
76 }
77 /// <p>If true, deleting the repository force deletes the contents of the repository. If false, the repository must be empty before attempting to delete it.</p>
78 pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
79 self.force = input;
80 self
81 }
82 /// <p>If true, deleting the repository force deletes the contents of the repository. If false, the repository must be empty before attempting to delete it.</p>
83 pub fn get_force(&self) -> &::std::option::Option<bool> {
84 &self.force
85 }
86 /// Consumes the builder and constructs a [`DeleteRepositoryInput`](crate::operation::delete_repository::DeleteRepositoryInput).
87 pub fn build(
88 self,
89 ) -> ::std::result::Result<crate::operation::delete_repository::DeleteRepositoryInput, ::aws_smithy_types::error::operation::BuildError> {
90 ::std::result::Result::Ok(crate::operation::delete_repository::DeleteRepositoryInput {
91 registry_id: self.registry_id,
92 repository_name: self.repository_name,
93 force: self.force,
94 })
95 }
96}