aws_sdk_datazone/operation/get_rule/
_get_rule_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetRuleInput {
6    /// <p>The ID of the domain where the <code>GetRule</code> action is to be invoked.</p>
7    pub domain_identifier: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the rule.</p>
9    pub identifier: ::std::option::Option<::std::string::String>,
10    /// <p>The revision of the rule.</p>
11    pub revision: ::std::option::Option<::std::string::String>,
12}
13impl GetRuleInput {
14    /// <p>The ID of the domain where the <code>GetRule</code> action is to be invoked.</p>
15    pub fn domain_identifier(&self) -> ::std::option::Option<&str> {
16        self.domain_identifier.as_deref()
17    }
18    /// <p>The ID of the rule.</p>
19    pub fn identifier(&self) -> ::std::option::Option<&str> {
20        self.identifier.as_deref()
21    }
22    /// <p>The revision of the rule.</p>
23    pub fn revision(&self) -> ::std::option::Option<&str> {
24        self.revision.as_deref()
25    }
26}
27impl GetRuleInput {
28    /// Creates a new builder-style object to manufacture [`GetRuleInput`](crate::operation::get_rule::GetRuleInput).
29    pub fn builder() -> crate::operation::get_rule::builders::GetRuleInputBuilder {
30        crate::operation::get_rule::builders::GetRuleInputBuilder::default()
31    }
32}
33
34/// A builder for [`GetRuleInput`](crate::operation::get_rule::GetRuleInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetRuleInputBuilder {
38    pub(crate) domain_identifier: ::std::option::Option<::std::string::String>,
39    pub(crate) identifier: ::std::option::Option<::std::string::String>,
40    pub(crate) revision: ::std::option::Option<::std::string::String>,
41}
42impl GetRuleInputBuilder {
43    /// <p>The ID of the domain where the <code>GetRule</code> action is to be invoked.</p>
44    /// This field is required.
45    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.domain_identifier = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The ID of the domain where the <code>GetRule</code> action is to be invoked.</p>
50    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.domain_identifier = input;
52        self
53    }
54    /// <p>The ID of the domain where the <code>GetRule</code> action is to be invoked.</p>
55    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
56        &self.domain_identifier
57    }
58    /// <p>The ID of the rule.</p>
59    /// This field is required.
60    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.identifier = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The ID of the rule.</p>
65    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.identifier = input;
67        self
68    }
69    /// <p>The ID of the rule.</p>
70    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
71        &self.identifier
72    }
73    /// <p>The revision of the rule.</p>
74    pub fn revision(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.revision = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The revision of the rule.</p>
79    pub fn set_revision(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.revision = input;
81        self
82    }
83    /// <p>The revision of the rule.</p>
84    pub fn get_revision(&self) -> &::std::option::Option<::std::string::String> {
85        &self.revision
86    }
87    /// Consumes the builder and constructs a [`GetRuleInput`](crate::operation::get_rule::GetRuleInput).
88    pub fn build(self) -> ::std::result::Result<crate::operation::get_rule::GetRuleInput, ::aws_smithy_types::error::operation::BuildError> {
89        ::std::result::Result::Ok(crate::operation::get_rule::GetRuleInput {
90            domain_identifier: self.domain_identifier,
91            identifier: self.identifier,
92            revision: self.revision,
93        })
94    }
95}