aws_sdk_codeartifact/types/
_repository_summary.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Details about a repository, including its Amazon Resource Name (ARN), description, and domain information. The <a href="https://docs.aws.amazon.com/codeartifact/latest/APIReference/API_ListRepositories.html">ListRepositories</a> operation returns a list of <code>RepositorySummary</code> objects.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RepositorySummary {
7    /// <p>The name of the repository.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Web Services account ID that manages the repository.</p>
10    pub administrator_account: ::std::option::Option<::std::string::String>,
11    /// <p>The name of the domain that contains the repository.</p>
12    pub domain_name: ::std::option::Option<::std::string::String>,
13    /// <p>The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.</p>
14    pub domain_owner: ::std::option::Option<::std::string::String>,
15    /// <p>The ARN of the repository.</p>
16    pub arn: ::std::option::Option<::std::string::String>,
17    /// <p>The description of the repository.</p>
18    pub description: ::std::option::Option<::std::string::String>,
19    /// <p>A timestamp that represents the date and time the repository was created.</p>
20    pub created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
21}
22impl RepositorySummary {
23    /// <p>The name of the repository.</p>
24    pub fn name(&self) -> ::std::option::Option<&str> {
25        self.name.as_deref()
26    }
27    /// <p>The Amazon Web Services account ID that manages the repository.</p>
28    pub fn administrator_account(&self) -> ::std::option::Option<&str> {
29        self.administrator_account.as_deref()
30    }
31    /// <p>The name of the domain that contains the repository.</p>
32    pub fn domain_name(&self) -> ::std::option::Option<&str> {
33        self.domain_name.as_deref()
34    }
35    /// <p>The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.</p>
36    pub fn domain_owner(&self) -> ::std::option::Option<&str> {
37        self.domain_owner.as_deref()
38    }
39    /// <p>The ARN of the repository.</p>
40    pub fn arn(&self) -> ::std::option::Option<&str> {
41        self.arn.as_deref()
42    }
43    /// <p>The description of the repository.</p>
44    pub fn description(&self) -> ::std::option::Option<&str> {
45        self.description.as_deref()
46    }
47    /// <p>A timestamp that represents the date and time the repository was created.</p>
48    pub fn created_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
49        self.created_time.as_ref()
50    }
51}
52impl RepositorySummary {
53    /// Creates a new builder-style object to manufacture [`RepositorySummary`](crate::types::RepositorySummary).
54    pub fn builder() -> crate::types::builders::RepositorySummaryBuilder {
55        crate::types::builders::RepositorySummaryBuilder::default()
56    }
57}
58
59/// A builder for [`RepositorySummary`](crate::types::RepositorySummary).
60#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
61#[non_exhaustive]
62pub struct RepositorySummaryBuilder {
63    pub(crate) name: ::std::option::Option<::std::string::String>,
64    pub(crate) administrator_account: ::std::option::Option<::std::string::String>,
65    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
66    pub(crate) domain_owner: ::std::option::Option<::std::string::String>,
67    pub(crate) arn: ::std::option::Option<::std::string::String>,
68    pub(crate) description: ::std::option::Option<::std::string::String>,
69    pub(crate) created_time: ::std::option::Option<::aws_smithy_types::DateTime>,
70}
71impl RepositorySummaryBuilder {
72    /// <p>The name of the repository.</p>
73    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.name = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The name of the repository.</p>
78    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.name = input;
80        self
81    }
82    /// <p>The name of the repository.</p>
83    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.name
85    }
86    /// <p>The Amazon Web Services account ID that manages the repository.</p>
87    pub fn administrator_account(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        self.administrator_account = ::std::option::Option::Some(input.into());
89        self
90    }
91    /// <p>The Amazon Web Services account ID that manages the repository.</p>
92    pub fn set_administrator_account(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.administrator_account = input;
94        self
95    }
96    /// <p>The Amazon Web Services account ID that manages the repository.</p>
97    pub fn get_administrator_account(&self) -> &::std::option::Option<::std::string::String> {
98        &self.administrator_account
99    }
100    /// <p>The name of the domain that contains the repository.</p>
101    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.domain_name = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The name of the domain that contains the repository.</p>
106    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.domain_name = input;
108        self
109    }
110    /// <p>The name of the domain that contains the repository.</p>
111    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
112        &self.domain_name
113    }
114    /// <p>The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.</p>
115    pub fn domain_owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.domain_owner = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.</p>
120    pub fn set_domain_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.domain_owner = input;
122        self
123    }
124    /// <p>The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.</p>
125    pub fn get_domain_owner(&self) -> &::std::option::Option<::std::string::String> {
126        &self.domain_owner
127    }
128    /// <p>The ARN of the repository.</p>
129    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        self.arn = ::std::option::Option::Some(input.into());
131        self
132    }
133    /// <p>The ARN of the repository.</p>
134    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135        self.arn = input;
136        self
137    }
138    /// <p>The ARN of the repository.</p>
139    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
140        &self.arn
141    }
142    /// <p>The description of the repository.</p>
143    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144        self.description = ::std::option::Option::Some(input.into());
145        self
146    }
147    /// <p>The description of the repository.</p>
148    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149        self.description = input;
150        self
151    }
152    /// <p>The description of the repository.</p>
153    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
154        &self.description
155    }
156    /// <p>A timestamp that represents the date and time the repository was created.</p>
157    pub fn created_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
158        self.created_time = ::std::option::Option::Some(input);
159        self
160    }
161    /// <p>A timestamp that represents the date and time the repository was created.</p>
162    pub fn set_created_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
163        self.created_time = input;
164        self
165    }
166    /// <p>A timestamp that represents the date and time the repository was created.</p>
167    pub fn get_created_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
168        &self.created_time
169    }
170    /// Consumes the builder and constructs a [`RepositorySummary`](crate::types::RepositorySummary).
171    pub fn build(self) -> crate::types::RepositorySummary {
172        crate::types::RepositorySummary {
173            name: self.name,
174            administrator_account: self.administrator_account,
175            domain_name: self.domain_name,
176            domain_owner: self.domain_owner,
177            arn: self.arn,
178            description: self.description,
179            created_time: self.created_time,
180        }
181    }
182}