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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteProjectInput {
/// <p>The ID of the project to be deleted in AWS CodeStar.</p>
pub id: ::std::option::Option<::std::string::String>,
/// <p>A user- or system-generated token that identifies the entity that requested project deletion. This token can be used to repeat the request. </p>
pub client_request_token: ::std::option::Option<::std::string::String>,
/// <p>Whether to send a delete request for the primary stack in AWS CloudFormation originally used to generate the project and its resources. This option will delete all AWS resources for the project (except for any buckets in Amazon S3) as well as deleting the project itself. Recommended for most use cases.</p>
pub delete_stack: bool,
}
impl DeleteProjectInput {
/// <p>The ID of the project to be deleted in AWS CodeStar.</p>
pub fn id(&self) -> ::std::option::Option<&str> {
self.id.as_deref()
}
/// <p>A user- or system-generated token that identifies the entity that requested project deletion. This token can be used to repeat the request. </p>
pub fn client_request_token(&self) -> ::std::option::Option<&str> {
self.client_request_token.as_deref()
}
/// <p>Whether to send a delete request for the primary stack in AWS CloudFormation originally used to generate the project and its resources. This option will delete all AWS resources for the project (except for any buckets in Amazon S3) as well as deleting the project itself. Recommended for most use cases.</p>
pub fn delete_stack(&self) -> bool {
self.delete_stack
}
}
impl DeleteProjectInput {
/// Creates a new builder-style object to manufacture [`DeleteProjectInput`](crate::operation::delete_project::DeleteProjectInput).
pub fn builder() -> crate::operation::delete_project::builders::DeleteProjectInputBuilder {
crate::operation::delete_project::builders::DeleteProjectInputBuilder::default()
}
}
/// A builder for [`DeleteProjectInput`](crate::operation::delete_project::DeleteProjectInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DeleteProjectInputBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
pub(crate) delete_stack: ::std::option::Option<bool>,
}
impl DeleteProjectInputBuilder {
/// <p>The ID of the project to be deleted in AWS CodeStar.</p>
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the project to be deleted in AWS CodeStar.</p>
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
/// <p>The ID of the project to be deleted in AWS CodeStar.</p>
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
/// <p>A user- or system-generated token that identifies the entity that requested project deletion. This token can be used to repeat the request. </p>
pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.client_request_token = ::std::option::Option::Some(input.into());
self
}
/// <p>A user- or system-generated token that identifies the entity that requested project deletion. This token can be used to repeat the request. </p>
pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_request_token = input;
self
}
/// <p>A user- or system-generated token that identifies the entity that requested project deletion. This token can be used to repeat the request. </p>
pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_request_token
}
/// <p>Whether to send a delete request for the primary stack in AWS CloudFormation originally used to generate the project and its resources. This option will delete all AWS resources for the project (except for any buckets in Amazon S3) as well as deleting the project itself. Recommended for most use cases.</p>
pub fn delete_stack(mut self, input: bool) -> Self {
self.delete_stack = ::std::option::Option::Some(input);
self
}
/// <p>Whether to send a delete request for the primary stack in AWS CloudFormation originally used to generate the project and its resources. This option will delete all AWS resources for the project (except for any buckets in Amazon S3) as well as deleting the project itself. Recommended for most use cases.</p>
pub fn set_delete_stack(mut self, input: ::std::option::Option<bool>) -> Self {
self.delete_stack = input;
self
}
/// <p>Whether to send a delete request for the primary stack in AWS CloudFormation originally used to generate the project and its resources. This option will delete all AWS resources for the project (except for any buckets in Amazon S3) as well as deleting the project itself. Recommended for most use cases.</p>
pub fn get_delete_stack(&self) -> &::std::option::Option<bool> {
&self.delete_stack
}
/// Consumes the builder and constructs a [`DeleteProjectInput`](crate::operation::delete_project::DeleteProjectInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::delete_project::DeleteProjectInput, ::aws_smithy_http::operation::error::BuildError> {
::std::result::Result::Ok(crate::operation::delete_project::DeleteProjectInput {
id: self.id,
client_request_token: self.client_request_token,
delete_stack: self.delete_stack.unwrap_or_default(),
})
}
}