aws_sdk_mobile/operation/create_project/
_create_project_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateProjectInput {
7 pub name: ::std::option::Option<::std::string::String>,
9 pub region: ::std::option::Option<::std::string::String>,
11 pub contents: ::std::option::Option<::aws_smithy_types::Blob>,
13 pub snapshot_id: ::std::option::Option<::std::string::String>,
15}
16impl CreateProjectInput {
17 pub fn name(&self) -> ::std::option::Option<&str> {
19 self.name.as_deref()
20 }
21 pub fn region(&self) -> ::std::option::Option<&str> {
23 self.region.as_deref()
24 }
25 pub fn contents(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
27 self.contents.as_ref()
28 }
29 pub fn snapshot_id(&self) -> ::std::option::Option<&str> {
31 self.snapshot_id.as_deref()
32 }
33}
34impl CreateProjectInput {
35 pub fn builder() -> crate::operation::create_project::builders::CreateProjectInputBuilder {
37 crate::operation::create_project::builders::CreateProjectInputBuilder::default()
38 }
39}
40
41#[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 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 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.name = input;
59 self
60 }
61 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
63 &self.name
64 }
65 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 pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.region = input;
73 self
74 }
75 pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
77 &self.region
78 }
79 pub fn contents(mut self, input: ::aws_smithy_types::Blob) -> Self {
81 self.contents = ::std::option::Option::Some(input);
82 self
83 }
84 pub fn set_contents(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
86 self.contents = input;
87 self
88 }
89 pub fn get_contents(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
91 &self.contents
92 }
93 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 pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.snapshot_id = input;
101 self
102 }
103 pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
105 &self.snapshot_id
106 }
107 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}