aws_sdk_devicefarm/operation/create_project/
_create_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 create project operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateProjectInput {
7    /// <p>The project's name.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run.</p>
10    pub default_job_timeout_minutes: ::std::option::Option<i32>,
11    /// <p>The VPC security groups and subnets that are attached to a project.</p>
12    pub vpc_config: ::std::option::Option<crate::types::VpcConfig>,
13}
14impl CreateProjectInput {
15    /// <p>The project's name.</p>
16    pub fn name(&self) -> ::std::option::Option<&str> {
17        self.name.as_deref()
18    }
19    /// <p>Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run.</p>
20    pub fn default_job_timeout_minutes(&self) -> ::std::option::Option<i32> {
21        self.default_job_timeout_minutes
22    }
23    /// <p>The VPC security groups and subnets that are attached to a project.</p>
24    pub fn vpc_config(&self) -> ::std::option::Option<&crate::types::VpcConfig> {
25        self.vpc_config.as_ref()
26    }
27}
28impl CreateProjectInput {
29    /// Creates a new builder-style object to manufacture [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
30    pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
31        crate::operation::create_project::builders::CreateProjectInputBuilder::default()
32    }
33}
34
35/// A builder for [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct CreateProjectInputBuilder {
39    pub(crate) name: ::std::option::Option<::std::string::String>,
40    pub(crate) default_job_timeout_minutes: ::std::option::Option<i32>,
41    pub(crate) vpc_config: ::std::option::Option<crate::types::VpcConfig>,
42}
43impl CreateProjectInputBuilder {
44    /// <p>The project's name.</p>
45    /// This field is required.
46    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.name = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The project's name.</p>
51    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.name = input;
53        self
54    }
55    /// <p>The project's name.</p>
56    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
57        &self.name
58    }
59    /// <p>Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run.</p>
60    pub fn default_job_timeout_minutes(mut self, input: i32) -> Self {
61        self.default_job_timeout_minutes = ::std::option::Option::Some(input);
62        self
63    }
64    /// <p>Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run.</p>
65    pub fn set_default_job_timeout_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
66        self.default_job_timeout_minutes = input;
67        self
68    }
69    /// <p>Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run.</p>
70    pub fn get_default_job_timeout_minutes(&self) -> &::std::option::Option<i32> {
71        &self.default_job_timeout_minutes
72    }
73    /// <p>The VPC security groups and subnets that are attached to a project.</p>
74    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
75        self.vpc_config = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>The VPC security groups and subnets that are attached to a project.</p>
79    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
80        self.vpc_config = input;
81        self
82    }
83    /// <p>The VPC security groups and subnets that are attached to a project.</p>
84    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
85        &self.vpc_config
86    }
87    /// Consumes the builder and constructs a [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
92            name: self.name,
93            default_job_timeout_minutes: self.default_job_timeout_minutes,
94            vpc_config: self.vpc_config,
95        })
96    }
97}