1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Provides authorization for Amazon to bring a specific IP address range to a specific Amazon Web Services account using bring your own IP addresses (BYOIP). For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#prepare-for-byoip">Configuring your BYOIP address range</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CidrAuthorizationContext {
    /// <p>The plain-text authorization message for the prefix and account.</p>
    pub message: ::std::option::Option<::std::string::String>,
    /// <p>The signed authorization message for the prefix and account.</p>
    pub signature: ::std::option::Option<::std::string::String>,
}
impl CidrAuthorizationContext {
    /// <p>The plain-text authorization message for the prefix and account.</p>
    pub fn message(&self) -> ::std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The signed authorization message for the prefix and account.</p>
    pub fn signature(&self) -> ::std::option::Option<&str> {
        self.signature.as_deref()
    }
}
impl CidrAuthorizationContext {
    /// Creates a new builder-style object to manufacture [`CidrAuthorizationContext`](crate::types::CidrAuthorizationContext).
    pub fn builder() -> crate::types::builders::CidrAuthorizationContextBuilder {
        crate::types::builders::CidrAuthorizationContextBuilder::default()
    }
}

/// A builder for [`CidrAuthorizationContext`](crate::types::CidrAuthorizationContext).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CidrAuthorizationContextBuilder {
    pub(crate) message: ::std::option::Option<::std::string::String>,
    pub(crate) signature: ::std::option::Option<::std::string::String>,
}
impl CidrAuthorizationContextBuilder {
    /// <p>The plain-text authorization message for the prefix and account.</p>
    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The plain-text authorization message for the prefix and account.</p>
    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.message = input;
        self
    }
    /// <p>The plain-text authorization message for the prefix and account.</p>
    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.message
    }
    /// <p>The signed authorization message for the prefix and account.</p>
    pub fn signature(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.signature = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The signed authorization message for the prefix and account.</p>
    pub fn set_signature(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.signature = input;
        self
    }
    /// <p>The signed authorization message for the prefix and account.</p>
    pub fn get_signature(&self) -> &::std::option::Option<::std::string::String> {
        &self.signature
    }
    /// Consumes the builder and constructs a [`CidrAuthorizationContext`](crate::types::CidrAuthorizationContext).
    pub fn build(self) -> crate::types::CidrAuthorizationContext {
        crate::types::CidrAuthorizationContext {
            message: self.message,
            signature: self.signature,
        }
    }
}