aws_sdk_devicefarm/operation/update_project/
_update_project_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents a request to the update project operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateProjectInput {
7    /// <p>The Amazon Resource Name (ARN) of the project whose name to update.</p>
8    pub arn: ::std::option::Option<::std::string::String>,
9    /// <p>A string that represents the new name of the project that you are updating.</p>
10    pub name: ::std::option::Option<::std::string::String>,
11    /// <p>The number of minutes a test run in the project executes before it times out.</p>
12    pub default_job_timeout_minutes: ::std::option::Option<i32>,
13    /// <p>The VPC security groups and subnets that are attached to a project.</p>
14    pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
15}
16impl UpdateProjectInput {
17    /// <p>The Amazon Resource Name (ARN) of the project whose name to update.</p>
18    pub fn arn(&self) -> ::std::option::Option<&str> {
19        self.arn.as_deref()
20    }
21    /// <p>A string that represents the new name of the project that you are updating.</p>
22    pub fn name(&self) -> ::std::option::Option<&str> {
23        self.name.as_deref()
24    }
25    /// <p>The number of minutes a test run in the project executes before it times out.</p>
26    pub fn default_job_timeout_minutes(&self) -> ::std::option::Option<i32> {
27        self.default_job_timeout_minutes
28    }
29    /// <p>The VPC security groups and subnets that are attached to a project.</p>
30    pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
31        self.vpc_config.as_ref()
32    }
33}
34impl UpdateProjectInput {
35    /// Creates a new builder-style object to manufacture [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
36    pub fn builder() -> crate::operation::update_project::builders::UpdateProjectInputBuilder {
37        crate::operation::update_project::builders::UpdateProjectInputBuilder::default()
38    }
39}
40
41/// A builder for [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct UpdateProjectInputBuilder {
45    pub(crate) arn: ::std::option::Option<::std::string::String>,
46    pub(crate) name: ::std::option::Option<::std::string::String>,
47    pub(crate) default_job_timeout_minutes: ::std::option::Option<i32>,
48    pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
49}
50impl UpdateProjectInputBuilder {
51    /// <p>The Amazon Resource Name (ARN) of the project whose name to update.</p>
52    /// This field is required.
53    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.arn = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The Amazon Resource Name (ARN) of the project whose name to update.</p>
58    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.arn = input;
60        self
61    }
62    /// <p>The Amazon Resource Name (ARN) of the project whose name to update.</p>
63    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
64        &self.arn
65    }
66    /// <p>A string that represents the new name of the project that you are updating.</p>
67    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.name = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>A string that represents the new name of the project that you are updating.</p>
72    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.name = input;
74        self
75    }
76    /// <p>A string that represents the new name of the project that you are updating.</p>
77    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
78        &self.name
79    }
80    /// <p>The number of minutes a test run in the project executes before it times out.</p>
81    pub fn default_job_timeout_minutes(mut self, input: i32) -> Self {
82        self.default_job_timeout_minutes = ::std::option::Option::Some(input);
83        self
84    }
85    /// <p>The number of minutes a test run in the project executes before it times out.</p>
86    pub fn set_default_job_timeout_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
87        self.default_job_timeout_minutes = input;
88        self
89    }
90    /// <p>The number of minutes a test run in the project executes before it times out.</p>
91    pub fn get_default_job_timeout_minutes(&self) -> &::std::option::Option<i32> {
92        &self.default_job_timeout_minutes
93    }
94    /// <p>The VPC security groups and subnets that are attached to a project.</p>
95    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
96        self.vpc_config = ::std::option::Option::Some(input);
97        self
98    }
99    /// <p>The VPC security groups and subnets that are attached to a project.</p>
100    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
101        self.vpc_config = input;
102        self
103    }
104    /// <p>The VPC security groups and subnets that are attached to a project.</p>
105    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
106        &self.vpc_config
107    }
108    /// Consumes the builder and constructs a [`UpdateProjectInput`](crate::operation::update_project::UpdateProjectInput).
109    pub fn build(
110        self,
111    ) -> ::std::result::Result<crate::operation::update_project::UpdateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::update_project::UpdateProjectInput {
113            arn: self.arn,
114            name: self.name,
115            default_job_timeout_minutes: self.default_job_timeout_minutes,
116            vpc_config: self.vpc_config,
117        })
118    }
119}