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