aws_sdk_secretsmanager/operation/describe_secret/_describe_secret_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 DescribeSecretInput {
6 /// <p>The ARN or name of the secret.</p>
7 /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
8 pub secret_id: ::std::option::Option<::std::string::String>,
9}
10impl DescribeSecretInput {
11 /// <p>The ARN or name of the secret.</p>
12 /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
13 pub fn secret_id(&self) -> ::std::option::Option<&str> {
14 self.secret_id.as_deref()
15 }
16}
17impl DescribeSecretInput {
18 /// Creates a new builder-style object to manufacture [`DescribeSecretInput`](crate::operation::describe_secret::DescribeSecretInput).
19 pub fn builder() -> crate::operation::describe_secret::builders::DescribeSecretInputBuilder {
20 crate::operation::describe_secret::builders::DescribeSecretInputBuilder::default()
21 }
22}
23
24/// A builder for [`DescribeSecretInput`](crate::operation::describe_secret::DescribeSecretInput).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct DescribeSecretInputBuilder {
28 pub(crate) secret_id: ::std::option::Option<::std::string::String>,
29}
30impl DescribeSecretInputBuilder {
31 /// <p>The ARN or name of the secret.</p>
32 /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
33 /// This field is required.
34 pub fn secret_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
35 self.secret_id = ::std::option::Option::Some(input.into());
36 self
37 }
38 /// <p>The ARN or name of the secret.</p>
39 /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
40 pub fn set_secret_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
41 self.secret_id = input;
42 self
43 }
44 /// <p>The ARN or name of the secret.</p>
45 /// <p>For an ARN, we recommend that you specify a complete ARN rather than a partial ARN. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding a secret from a partial ARN</a>.</p>
46 pub fn get_secret_id(&self) -> &::std::option::Option<::std::string::String> {
47 &self.secret_id
48 }
49 /// Consumes the builder and constructs a [`DescribeSecretInput`](crate::operation::describe_secret::DescribeSecretInput).
50 pub fn build(
51 self,
52 ) -> ::std::result::Result<crate::operation::describe_secret::DescribeSecretInput, ::aws_smithy_types::error::operation::BuildError> {
53 ::std::result::Result::Ok(crate::operation::describe_secret::DescribeSecretInput { secret_id: self.secret_id })
54 }
55}