aws_sdk_glacier/operation/get_vault_lock/
_get_vault_lock_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The input values for <code>GetVaultLock</code>.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct GetVaultLockInput {
7    /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p>
8    pub account_id: ::std::option::Option<::std::string::String>,
9    /// <p>The name of the vault.</p>
10    pub vault_name: ::std::option::Option<::std::string::String>,
11}
12impl GetVaultLockInput {
13    /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p>
14    pub fn account_id(&self) -> ::std::option::Option<&str> {
15        self.account_id.as_deref()
16    }
17    /// <p>The name of the vault.</p>
18    pub fn vault_name(&self) -> ::std::option::Option<&str> {
19        self.vault_name.as_deref()
20    }
21}
22impl crate::glacier_interceptors::GlacierAccountId for GetVaultLockInput {
23    fn account_id_mut(&mut self) -> &mut Option<String> {
24        &mut self.account_id
25    }
26}
27impl GetVaultLockInput {
28    /// Creates a new builder-style object to manufacture [`GetVaultLockInput`](crate::operation::get_vault_lock::GetVaultLockInput).
29    pub fn builder() -> crate::operation::get_vault_lock::builders::GetVaultLockInputBuilder {
30        crate::operation::get_vault_lock::builders::GetVaultLockInputBuilder::default()
31    }
32}
33
34/// A builder for [`GetVaultLockInput`](crate::operation::get_vault_lock::GetVaultLockInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetVaultLockInputBuilder {
38    pub(crate) account_id: ::std::option::Option<::std::string::String>,
39    pub(crate) vault_name: ::std::option::Option<::std::string::String>,
40}
41impl GetVaultLockInputBuilder {
42    /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p>
43    /// This field is required.
44    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45        self.account_id = ::std::option::Option::Some(input.into());
46        self
47    }
48    /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p>
49    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
50        self.account_id = input;
51        self
52    }
53    /// <p>The <code>AccountId</code> value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single '<code>-</code>' (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens ('-') in the ID.</p>
54    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
55        &self.account_id
56    }
57    /// <p>The name of the vault.</p>
58    /// This field is required.
59    pub fn vault_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.vault_name = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The name of the vault.</p>
64    pub fn set_vault_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.vault_name = input;
66        self
67    }
68    /// <p>The name of the vault.</p>
69    pub fn get_vault_name(&self) -> &::std::option::Option<::std::string::String> {
70        &self.vault_name
71    }
72    /// Consumes the builder and constructs a [`GetVaultLockInput`](crate::operation::get_vault_lock::GetVaultLockInput).
73    pub fn build(
74        self,
75    ) -> ::std::result::Result<crate::operation::get_vault_lock::GetVaultLockInput, ::aws_smithy_types::error::operation::BuildError> {
76        ::std::result::Result::Ok(crate::operation::get_vault_lock::GetVaultLockInput {
77            account_id: self.account_id,
78            vault_name: self.vault_name,
79        })
80    }
81}