aws_sdk_mobile/operation/create_project/
_create_project_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request structure used to request a project be created.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateProjectInput {
7    /// <p>Name of the project.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>Default region where project resources should be created.</p>
10    pub region: ::std::option::Option<::std::string::String>,
11    /// <p>ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the contents of the file downloaded from the URL provided in an export project operation.</p>
12    pub contents: ::std::option::Option<::aws_smithy_types::Blob>,
13    /// <p>Unique identifier for an exported snapshot of project configuration. This snapshot identifier is included in the share URL when a project is exported.</p>
14    pub snapshot_id: ::std::option::Option<::std::string::String>,
15}
16impl CreateProjectInput {
17    /// <p>Name of the project.</p>
18    pub fn name(&self) -> ::std::option::Option<&str> {
19        self.name.as_deref()
20    }
21    /// <p>Default region where project resources should be created.</p>
22    pub fn region(&self) -> ::std::option::Option<&str> {
23        self.region.as_deref()
24    }
25    /// <p>ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the contents of the file downloaded from the URL provided in an export project operation.</p>
26    pub fn contents(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
27        self.contents.as_ref()
28    }
29    /// <p>Unique identifier for an exported snapshot of project configuration. This snapshot identifier is included in the share URL when a project is exported.</p>
30    pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
31        self.snapshot_id.as_deref()
32    }
33}
34impl CreateProjectInput {
35    /// Creates a new builder-style object to manufacture [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
36    pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
37        crate::operation::create_project::builders::CreateProjectInputBuilder::default()
38    }
39}
40
41/// A builder for [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct CreateProjectInputBuilder {
45    pub(crate) name: ::std::option::Option<::std::string::String>,
46    pub(crate) region: ::std::option::Option<::std::string::String>,
47    pub(crate) contents: ::std::option::Option<::aws_smithy_types::Blob>,
48    pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
49}
50impl CreateProjectInputBuilder {
51    /// <p>Name of the project.</p>
52    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>Name of the project.</p>
57    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.name = input;
59        self
60    }
61    /// <p>Name of the project.</p>
62    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.name
64    }
65    /// <p>Default region where project resources should be created.</p>
66    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.region = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>Default region where project resources should be created.</p>
71    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.region = input;
73        self
74    }
75    /// <p>Default region where project resources should be created.</p>
76    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
77        &self.region
78    }
79    /// <p>ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the contents of the file downloaded from the URL provided in an export project operation.</p>
80    pub fn contents(mut self, input: ::aws_smithy_types::Blob) -> Self {
81        self.contents = ::std::option::Option::Some(input);
82        self
83    }
84    /// <p>ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the contents of the file downloaded from the URL provided in an export project operation.</p>
85    pub fn set_contents(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
86        self.contents = input;
87        self
88    }
89    /// <p>ZIP or YAML file which contains configuration settings to be used when creating the project. This may be the contents of the file downloaded from the URL provided in an export project operation.</p>
90    pub fn get_contents(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
91        &self.contents
92    }
93    /// <p>Unique identifier for an exported snapshot of project configuration. This snapshot identifier is included in the share URL when a project is exported.</p>
94    pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95        self.snapshot_id = ::std::option::Option::Some(input.into());
96        self
97    }
98    /// <p>Unique identifier for an exported snapshot of project configuration. This snapshot identifier is included in the share URL when a project is exported.</p>
99    pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100        self.snapshot_id = input;
101        self
102    }
103    /// <p>Unique identifier for an exported snapshot of project configuration. This snapshot identifier is included in the share URL when a project is exported.</p>
104    pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
105        &self.snapshot_id
106    }
107    /// Consumes the builder and constructs a [`CreateProjectInput`](crate::operation::create_project::CreateProjectInput).
108    pub fn build(
109        self,
110    ) -> ::std::result::Result<crate::operation::create_project::CreateProjectInput, ::aws_smithy_types::error::operation::BuildError> {
111        ::std::result::Result::Ok(crate::operation::create_project::CreateProjectInput {
112            name: self.name,
113            region: self.region,
114            contents: self.contents,
115            snapshot_id: self.snapshot_id,
116        })
117    }
118}