Skip to main content

aws_sdk_cloudwatchevents/types/
_update_connection_api_key_auth_request_parameters.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains the API key authorization parameters to use to update the connection.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct UpdateConnectionApiKeyAuthRequestParameters {
7    /// <p>The name of the API key to use for authorization.</p>
8    pub api_key_name: ::std::option::Option<::std::string::String>,
9    /// <p>The value associated with teh API key to use for authorization.</p>
10    pub api_key_value: ::std::option::Option<::std::string::String>,
11}
12impl UpdateConnectionApiKeyAuthRequestParameters {
13    /// <p>The name of the API key to use for authorization.</p>
14    pub fn api_key_name(&self) -> ::std::option::Option<&str> {
15        self.api_key_name.as_deref()
16    }
17    /// <p>The value associated with teh API key to use for authorization.</p>
18    pub fn api_key_value(&self) -> ::std::option::Option<&str> {
19        self.api_key_value.as_deref()
20    }
21}
22impl ::std::fmt::Debug for UpdateConnectionApiKeyAuthRequestParameters {
23    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
24        let mut formatter = f.debug_struct("UpdateConnectionApiKeyAuthRequestParameters");
25        formatter.field("api_key_name", &self.api_key_name);
26        formatter.field("api_key_value", &"*** Sensitive Data Redacted ***");
27        formatter.finish()
28    }
29}
30impl UpdateConnectionApiKeyAuthRequestParameters {
31    /// Creates a new builder-style object to manufacture [`UpdateConnectionApiKeyAuthRequestParameters`](crate::types::UpdateConnectionApiKeyAuthRequestParameters).
32    pub fn builder() -> crate::types::builders::UpdateConnectionApiKeyAuthRequestParametersBuilder {
33        crate::types::builders::UpdateConnectionApiKeyAuthRequestParametersBuilder::default()
34    }
35}
36
37/// A builder for [`UpdateConnectionApiKeyAuthRequestParameters`](crate::types::UpdateConnectionApiKeyAuthRequestParameters).
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
39#[non_exhaustive]
40pub struct UpdateConnectionApiKeyAuthRequestParametersBuilder {
41    pub(crate) api_key_name: ::std::option::Option<::std::string::String>,
42    pub(crate) api_key_value: ::std::option::Option<::std::string::String>,
43}
44impl UpdateConnectionApiKeyAuthRequestParametersBuilder {
45    /// <p>The name of the API key to use for authorization.</p>
46    pub fn api_key_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.api_key_name = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The name of the API key to use for authorization.</p>
51    pub fn set_api_key_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.api_key_name = input;
53        self
54    }
55    /// <p>The name of the API key to use for authorization.</p>
56    pub fn get_api_key_name(&self) -> &::std::option::Option<::std::string::String> {
57        &self.api_key_name
58    }
59    /// <p>The value associated with teh API key to use for authorization.</p>
60    pub fn api_key_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.api_key_value = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The value associated with teh API key to use for authorization.</p>
65    pub fn set_api_key_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.api_key_value = input;
67        self
68    }
69    /// <p>The value associated with teh API key to use for authorization.</p>
70    pub fn get_api_key_value(&self) -> &::std::option::Option<::std::string::String> {
71        &self.api_key_value
72    }
73    /// Consumes the builder and constructs a [`UpdateConnectionApiKeyAuthRequestParameters`](crate::types::UpdateConnectionApiKeyAuthRequestParameters).
74    pub fn build(self) -> crate::types::UpdateConnectionApiKeyAuthRequestParameters {
75        crate::types::UpdateConnectionApiKeyAuthRequestParameters {
76            api_key_name: self.api_key_name,
77            api_key_value: self.api_key_value,
78        }
79    }
80}
81impl ::std::fmt::Debug for UpdateConnectionApiKeyAuthRequestParametersBuilder {
82    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
83        let mut formatter = f.debug_struct("UpdateConnectionApiKeyAuthRequestParametersBuilder");
84        formatter.field("api_key_name", &self.api_key_name);
85        formatter.field("api_key_value", &"*** Sensitive Data Redacted ***");
86        formatter.finish()
87    }
88}