aws_sdk_vpclattice/operation/get_rule/
_get_rule_input.rs

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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetRuleInput {
    /// <p>The ID or Amazon Resource Name (ARN) of the service.</p>
    pub service_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The ID or Amazon Resource Name (ARN) of the listener.</p>
    pub listener_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The ID or Amazon Resource Name (ARN) of the listener rule.</p>
    pub rule_identifier: ::std::option::Option<::std::string::String>,
}
impl GetRuleInput {
    /// <p>The ID or Amazon Resource Name (ARN) of the service.</p>
    pub fn service_identifier(&self) -> ::std::option::Option<&str> {
        self.service_identifier.as_deref()
    }
    /// <p>The ID or Amazon Resource Name (ARN) of the listener.</p>
    pub fn listener_identifier(&self) -> ::std::option::Option<&str> {
        self.listener_identifier.as_deref()
    }
    /// <p>The ID or Amazon Resource Name (ARN) of the listener rule.</p>
    pub fn rule_identifier(&self) -> ::std::option::Option<&str> {
        self.rule_identifier.as_deref()
    }
}
impl GetRuleInput {
    /// Creates a new builder-style object to manufacture [`GetRuleInput`](crate::operation::get_rule::GetRuleInput).
    pub fn builder() -> crate::operation::get_rule::builders::GetRuleInputBuilder {
        crate::operation::get_rule::builders::GetRuleInputBuilder::default()
    }
}

/// A builder for [`GetRuleInput`](crate::operation::get_rule::GetRuleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetRuleInputBuilder {
    pub(crate) service_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) listener_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) rule_identifier: ::std::option::Option<::std::string::String>,
}
impl GetRuleInputBuilder {
    /// <p>The ID or Amazon Resource Name (ARN) of the service.</p>
    /// This field is required.
    pub fn service_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID or Amazon Resource Name (ARN) of the service.</p>
    pub fn set_service_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_identifier = input;
        self
    }
    /// <p>The ID or Amazon Resource Name (ARN) of the service.</p>
    pub fn get_service_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_identifier
    }
    /// <p>The ID or Amazon Resource Name (ARN) of the listener.</p>
    /// This field is required.
    pub fn listener_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.listener_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID or Amazon Resource Name (ARN) of the listener.</p>
    pub fn set_listener_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.listener_identifier = input;
        self
    }
    /// <p>The ID or Amazon Resource Name (ARN) of the listener.</p>
    pub fn get_listener_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.listener_identifier
    }
    /// <p>The ID or Amazon Resource Name (ARN) of the listener rule.</p>
    /// This field is required.
    pub fn rule_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID or Amazon Resource Name (ARN) of the listener rule.</p>
    pub fn set_rule_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_identifier = input;
        self
    }
    /// <p>The ID or Amazon Resource Name (ARN) of the listener rule.</p>
    pub fn get_rule_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_identifier
    }
    /// Consumes the builder and constructs a [`GetRuleInput`](crate::operation::get_rule::GetRuleInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_rule::GetRuleInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_rule::GetRuleInput {
            service_identifier: self.service_identifier,
            listener_identifier: self.listener_identifier,
            rule_identifier: self.rule_identifier,
        })
    }
}