Skip to main content

aws_sdk_codebuild/operation/update_project_visibility/
_update_project_visibility_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 UpdateProjectVisibilityInput {
6    /// <p>The Amazon Resource Name (ARN) of the build project.</p>
7    pub project_arn: ::std::option::Option<::std::string::String>,
8    /// <p>Specifies the visibility of the project's builds. Possible values are:</p>
9    /// <dl>
10    /// <dt>
11    /// PUBLIC_READ
12    /// </dt>
13    /// <dd>
14    /// <p>The project builds are visible to the public.</p>
15    /// </dd>
16    /// <dt>
17    /// PRIVATE
18    /// </dt>
19    /// <dd>
20    /// <p>The project builds are not visible to the public.</p>
21    /// </dd>
22    /// </dl>
23    pub project_visibility: ::std::option::Option<crate::types::ProjectVisibilityType>,
24    /// <p>The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.</p>
25    pub resource_access_role: ::std::option::Option<::std::string::String>,
26}
27impl UpdateProjectVisibilityInput {
28    /// <p>The Amazon Resource Name (ARN) of the build project.</p>
29    pub fn project_arn(&self) -> ::std::option::Option<&str> {
30        self.project_arn.as_deref()
31    }
32    /// <p>Specifies the visibility of the project's builds. Possible values are:</p>
33    /// <dl>
34    /// <dt>
35    /// PUBLIC_READ
36    /// </dt>
37    /// <dd>
38    /// <p>The project builds are visible to the public.</p>
39    /// </dd>
40    /// <dt>
41    /// PRIVATE
42    /// </dt>
43    /// <dd>
44    /// <p>The project builds are not visible to the public.</p>
45    /// </dd>
46    /// </dl>
47    pub fn project_visibility(&self) -> ::std::option::Option<&crate::types::ProjectVisibilityType> {
48        self.project_visibility.as_ref()
49    }
50    /// <p>The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.</p>
51    pub fn resource_access_role(&self) -> ::std::option::Option<&str> {
52        self.resource_access_role.as_deref()
53    }
54}
55impl UpdateProjectVisibilityInput {
56    /// Creates a new builder-style object to manufacture [`UpdateProjectVisibilityInput`](crate::operation::update_project_visibility::UpdateProjectVisibilityInput).
57    pub fn builder() -> crate::operation::update_project_visibility::builders::UpdateProjectVisibilityInputBuilder {
58        crate::operation::update_project_visibility::builders::UpdateProjectVisibilityInputBuilder::default()
59    }
60}
61
62/// A builder for [`UpdateProjectVisibilityInput`](crate::operation::update_project_visibility::UpdateProjectVisibilityInput).
63#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
64#[non_exhaustive]
65pub struct UpdateProjectVisibilityInputBuilder {
66    pub(crate) project_arn: ::std::option::Option<::std::string::String>,
67    pub(crate) project_visibility: ::std::option::Option<crate::types::ProjectVisibilityType>,
68    pub(crate) resource_access_role: ::std::option::Option<::std::string::String>,
69}
70impl UpdateProjectVisibilityInputBuilder {
71    /// <p>The Amazon Resource Name (ARN) of the build project.</p>
72    /// This field is required.
73    pub fn project_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.project_arn = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The Amazon Resource Name (ARN) of the build project.</p>
78    pub fn set_project_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.project_arn = input;
80        self
81    }
82    /// <p>The Amazon Resource Name (ARN) of the build project.</p>
83    pub fn get_project_arn(&self) -> &::std::option::Option<::std::string::String> {
84        &self.project_arn
85    }
86    /// <p>Specifies the visibility of the project's builds. Possible values are:</p>
87    /// <dl>
88    /// <dt>
89    /// PUBLIC_READ
90    /// </dt>
91    /// <dd>
92    /// <p>The project builds are visible to the public.</p>
93    /// </dd>
94    /// <dt>
95    /// PRIVATE
96    /// </dt>
97    /// <dd>
98    /// <p>The project builds are not visible to the public.</p>
99    /// </dd>
100    /// </dl>
101    /// This field is required.
102    pub fn project_visibility(mut self, input: crate::types::ProjectVisibilityType) -> Self {
103        self.project_visibility = ::std::option::Option::Some(input);
104        self
105    }
106    /// <p>Specifies the visibility of the project's builds. Possible values are:</p>
107    /// <dl>
108    /// <dt>
109    /// PUBLIC_READ
110    /// </dt>
111    /// <dd>
112    /// <p>The project builds are visible to the public.</p>
113    /// </dd>
114    /// <dt>
115    /// PRIVATE
116    /// </dt>
117    /// <dd>
118    /// <p>The project builds are not visible to the public.</p>
119    /// </dd>
120    /// </dl>
121    pub fn set_project_visibility(mut self, input: ::std::option::Option<crate::types::ProjectVisibilityType>) -> Self {
122        self.project_visibility = input;
123        self
124    }
125    /// <p>Specifies the visibility of the project's builds. Possible values are:</p>
126    /// <dl>
127    /// <dt>
128    /// PUBLIC_READ
129    /// </dt>
130    /// <dd>
131    /// <p>The project builds are visible to the public.</p>
132    /// </dd>
133    /// <dt>
134    /// PRIVATE
135    /// </dt>
136    /// <dd>
137    /// <p>The project builds are not visible to the public.</p>
138    /// </dd>
139    /// </dl>
140    pub fn get_project_visibility(&self) -> &::std::option::Option<crate::types::ProjectVisibilityType> {
141        &self.project_visibility
142    }
143    /// <p>The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.</p>
144    pub fn resource_access_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145        self.resource_access_role = ::std::option::Option::Some(input.into());
146        self
147    }
148    /// <p>The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.</p>
149    pub fn set_resource_access_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
150        self.resource_access_role = input;
151        self
152    }
153    /// <p>The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds.</p>
154    pub fn get_resource_access_role(&self) -> &::std::option::Option<::std::string::String> {
155        &self.resource_access_role
156    }
157    /// Consumes the builder and constructs a [`UpdateProjectVisibilityInput`](crate::operation::update_project_visibility::UpdateProjectVisibilityInput).
158    pub fn build(
159        self,
160    ) -> ::std::result::Result<
161        crate::operation::update_project_visibility::UpdateProjectVisibilityInput,
162        ::aws_smithy_types::error::operation::BuildError,
163    > {
164        ::std::result::Result::Ok(crate::operation::update_project_visibility::UpdateProjectVisibilityInput {
165            project_arn: self.project_arn,
166            project_visibility: self.project_visibility,
167            resource_access_role: self.resource_access_role,
168        })
169    }
170}