Skip to main content

aws_sdk_networkfirewall/types/
_rule_group_metadata.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>High-level information about a rule group, returned by <code>ListRuleGroups</code>. You can use the information provided in the metadata to retrieve and manage a rule group.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RuleGroupMetadata {
7    /// <p>The descriptive name of the rule group. You can't change the name of a rule group after you create it.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Resource Name (ARN) of the rule group.</p>
10    pub arn: ::std::option::Option<::std::string::String>,
11    /// <p>The name of the Amazon Web Services Marketplace seller that provides this rule group.</p>
12    pub vendor_name: ::std::option::Option<::std::string::String>,
13}
14impl RuleGroupMetadata {
15    /// <p>The descriptive name of the rule group. You can't change the name of a rule group after you create it.</p>
16    pub fn name(&self) -> ::std::option::Option<&str> {
17        self.name.as_deref()
18    }
19    /// <p>The Amazon Resource Name (ARN) of the rule group.</p>
20    pub fn arn(&self) -> ::std::option::Option<&str> {
21        self.arn.as_deref()
22    }
23    /// <p>The name of the Amazon Web Services Marketplace seller that provides this rule group.</p>
24    pub fn vendor_name(&self) -> ::std::option::Option<&str> {
25        self.vendor_name.as_deref()
26    }
27}
28impl RuleGroupMetadata {
29    /// Creates a new builder-style object to manufacture [`RuleGroupMetadata`](crate::types::RuleGroupMetadata).
30    pub fn builder() -> crate::types::builders::RuleGroupMetadataBuilder {
31        crate::types::builders::RuleGroupMetadataBuilder::default()
32    }
33}
34
35/// A builder for [`RuleGroupMetadata`](crate::types::RuleGroupMetadata).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct RuleGroupMetadataBuilder {
39    pub(crate) name: ::std::option::Option<::std::string::String>,
40    pub(crate) arn: ::std::option::Option<::std::string::String>,
41    pub(crate) vendor_name: ::std::option::Option<::std::string::String>,
42}
43impl RuleGroupMetadataBuilder {
44    /// <p>The descriptive name of the rule group. You can't change the name of a rule group after you create it.</p>
45    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.name = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The descriptive name of the rule group. You can't change the name of a rule group after you create it.</p>
50    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.name = input;
52        self
53    }
54    /// <p>The descriptive name of the rule group. You can't change the name of a rule group after you create it.</p>
55    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
56        &self.name
57    }
58    /// <p>The Amazon Resource Name (ARN) of the rule group.</p>
59    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.arn = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The Amazon Resource Name (ARN) of the rule group.</p>
64    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.arn = input;
66        self
67    }
68    /// <p>The Amazon Resource Name (ARN) of the rule group.</p>
69    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
70        &self.arn
71    }
72    /// <p>The name of the Amazon Web Services Marketplace seller that provides this rule group.</p>
73    pub fn vendor_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.vendor_name = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The name of the Amazon Web Services Marketplace seller that provides this rule group.</p>
78    pub fn set_vendor_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.vendor_name = input;
80        self
81    }
82    /// <p>The name of the Amazon Web Services Marketplace seller that provides this rule group.</p>
83    pub fn get_vendor_name(&self) -> &::std::option::Option<::std::string::String> {
84        &self.vendor_name
85    }
86    /// Consumes the builder and constructs a [`RuleGroupMetadata`](crate::types::RuleGroupMetadata).
87    pub fn build(self) -> crate::types::RuleGroupMetadata {
88        crate::types::RuleGroupMetadata {
89            name: self.name,
90            arn: self.arn,
91            vendor_name: self.vendor_name,
92        }
93    }
94}