aws_sdk_wellarchitected/operation/delete_profile/_delete_profile_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 DeleteProfileInput {
6 /// <p>The profile ARN.</p>
7 pub profile_arn: ::std::option::Option<::std::string::String>,
8 /// <p>A unique case-sensitive string used to ensure that this request is idempotent (executes only once).</p>
9 /// <p>You should not reuse the same token for other requests. If you retry a request with the same client request token and the same parameters after the original request has completed successfully, the result of the original request is returned.</p><important>
10 /// <p>This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, you must provide this token or the request will fail.</p>
11 /// </important>
12 pub client_request_token: ::std::option::Option<::std::string::String>,
13}
14impl DeleteProfileInput {
15 /// <p>The profile ARN.</p>
16 pub fn profile_arn(&self) -> ::std::option::Option<&str> {
17 self.profile_arn.as_deref()
18 }
19 /// <p>A unique case-sensitive string used to ensure that this request is idempotent (executes only once).</p>
20 /// <p>You should not reuse the same token for other requests. If you retry a request with the same client request token and the same parameters after the original request has completed successfully, the result of the original request is returned.</p><important>
21 /// <p>This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, you must provide this token or the request will fail.</p>
22 /// </important>
23 pub fn client_request_token(&self) -> ::std::option::Option<&str> {
24 self.client_request_token.as_deref()
25 }
26}
27impl DeleteProfileInput {
28 /// Creates a new builder-style object to manufacture [`DeleteProfileInput`](crate::operation::delete_profile::DeleteProfileInput).
29 pub fn builder() -> crate::operation::delete_profile::builders::DeleteProfileInputBuilder {
30 crate::operation::delete_profile::builders::DeleteProfileInputBuilder::default()
31 }
32}
33
34/// A builder for [`DeleteProfileInput`](crate::operation::delete_profile::DeleteProfileInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DeleteProfileInputBuilder {
38 pub(crate) profile_arn: ::std::option::Option<::std::string::String>,
39 pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
40}
41impl DeleteProfileInputBuilder {
42 /// <p>The profile ARN.</p>
43 /// This field is required.
44 pub fn profile_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45 self.profile_arn = ::std::option::Option::Some(input.into());
46 self
47 }
48 /// <p>The profile ARN.</p>
49 pub fn set_profile_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50 self.profile_arn = input;
51 self
52 }
53 /// <p>The profile ARN.</p>
54 pub fn get_profile_arn(&self) -> &::std::option::Option<::std::string::String> {
55 &self.profile_arn
56 }
57 /// <p>A unique case-sensitive string used to ensure that this request is idempotent (executes only once).</p>
58 /// <p>You should not reuse the same token for other requests. If you retry a request with the same client request token and the same parameters after the original request has completed successfully, the result of the original request is returned.</p><important>
59 /// <p>This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, you must provide this token or the request will fail.</p>
60 /// </important>
61 /// This field is required.
62 pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63 self.client_request_token = ::std::option::Option::Some(input.into());
64 self
65 }
66 /// <p>A unique case-sensitive string used to ensure that this request is idempotent (executes only once).</p>
67 /// <p>You should not reuse the same token for other requests. If you retry a request with the same client request token and the same parameters after the original request has completed successfully, the result of the original request is returned.</p><important>
68 /// <p>This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, you must provide this token or the request will fail.</p>
69 /// </important>
70 pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71 self.client_request_token = input;
72 self
73 }
74 /// <p>A unique case-sensitive string used to ensure that this request is idempotent (executes only once).</p>
75 /// <p>You should not reuse the same token for other requests. If you retry a request with the same client request token and the same parameters after the original request has completed successfully, the result of the original request is returned.</p><important>
76 /// <p>This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, you must provide this token or the request will fail.</p>
77 /// </important>
78 pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
79 &self.client_request_token
80 }
81 /// Consumes the builder and constructs a [`DeleteProfileInput`](crate::operation::delete_profile::DeleteProfileInput).
82 pub fn build(
83 self,
84 ) -> ::std::result::Result<crate::operation::delete_profile::DeleteProfileInput, ::aws_smithy_types::error::operation::BuildError> {
85 ::std::result::Result::Ok(crate::operation::delete_profile::DeleteProfileInput {
86 profile_arn: self.profile_arn,
87 client_request_token: self.client_request_token,
88 })
89 }
90}