aws_sdk_codestar/operation/delete_project/
_delete_project_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteProjectInput {
6    /// <p>The ID of the project to be deleted in AWS CodeStar.</p>
7    pub id: ::std::option::Option<::std::string::String>,
8    /// <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>
9    pub client_request_token: ::std::option::Option<::std::string::String>,
10    /// <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>
11    pub delete_stack: ::std::option::Option<bool>,
12}
13impl DeleteProjectInput {
14    /// <p>The ID of the project to be deleted in AWS CodeStar.</p>
15    pub fn id(&self) -> ::std::option::Option<&str> {
16        self.id.as_deref()
17    }
18    /// <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>
19    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
20        self.client_request_token.as_deref()
21    }
22    /// <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>
23    pub fn delete_stack(&self) -> ::std::option::Option<bool> {
24        self.delete_stack
25    }
26}
27impl DeleteProjectInput {
28    /// Creates a new builder-style object to manufacture [`DeleteProjectInput`](crate::operation::delete_project::DeleteProjectInput).
29    pub fn builder() -> crate::operation::delete_project::builders::DeleteProjectInputBuilder {
30        crate::operation::delete_project::builders::DeleteProjectInputBuilder::default()
31    }
32}
33
34/// A builder for [`DeleteProjectInput`](crate::operation::delete_project::DeleteProjectInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DeleteProjectInputBuilder {
38    pub(crate) id: ::std::option::Option<::std::string::String>,
39    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
40    pub(crate) delete_stack: ::std::option::Option<bool>,
41}
42impl DeleteProjectInputBuilder {
43    /// <p>The ID of the project to be deleted in AWS CodeStar.</p>
44    /// This field is required.
45    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The ID of the project to be deleted in AWS CodeStar.</p>
50    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.id = input;
52        self
53    }
54    /// <p>The ID of the project to be deleted in AWS CodeStar.</p>
55    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.id
57    }
58    /// <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>
59    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.client_request_token = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <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>
64    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.client_request_token = input;
66        self
67    }
68    /// <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>
69    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
70        &self.client_request_token
71    }
72    /// <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>
73    pub fn delete_stack(mut self, input: bool) -> Self {
74        self.delete_stack = ::std::option::Option::Some(input);
75        self
76    }
77    /// <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>
78    pub fn set_delete_stack(mut self, input: ::std::option::Option<bool>) -> Self {
79        self.delete_stack = input;
80        self
81    }
82    /// <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>
83    pub fn get_delete_stack(&self) -> &::std::option::Option<bool> {
84        &self.delete_stack
85    }
86    /// Consumes the builder and constructs a [`DeleteProjectInput`](crate::operation::delete_project::DeleteProjectInput).
87    pub fn build(
88        self,
89    ) -> ::std::result::Result<crate::operation::delete_project::DeleteProjectInput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::delete_project::DeleteProjectInput {
91            id: self.id,
92            client_request_token: self.client_request_token,
93            delete_stack: self.delete_stack,
94        })
95    }
96}