aws_sdk_managedblockchain/operation/get_node/
_get_node_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 GetNodeInput {
6    /// <p>The unique identifier of the network that the node is on.</p>
7    pub network_id: ::std::option::Option<::std::string::String>,
8    /// <p>The unique identifier of the member that owns the node.</p>
9    /// <p>Applies only to Hyperledger Fabric and is required for Hyperledger Fabric.</p>
10    pub member_id: ::std::option::Option<::std::string::String>,
11    /// <p>The unique identifier of the node.</p>
12    pub node_id: ::std::option::Option<::std::string::String>,
13}
14impl GetNodeInput {
15    /// <p>The unique identifier of the network that the node is on.</p>
16    pub fn network_id(&self) -> ::std::option::Option<&str> {
17        self.network_id.as_deref()
18    }
19    /// <p>The unique identifier of the member that owns the node.</p>
20    /// <p>Applies only to Hyperledger Fabric and is required for Hyperledger Fabric.</p>
21    pub fn member_id(&self) -> ::std::option::Option<&str> {
22        self.member_id.as_deref()
23    }
24    /// <p>The unique identifier of the node.</p>
25    pub fn node_id(&self) -> ::std::option::Option<&str> {
26        self.node_id.as_deref()
27    }
28}
29impl GetNodeInput {
30    /// Creates a new builder-style object to manufacture [`GetNodeInput`](crate::operation::get_node::GetNodeInput).
31    pub fn builder() -> crate::operation::get_node::builders::GetNodeInputBuilder {
32        crate::operation::get_node::builders::GetNodeInputBuilder::default()
33    }
34}
35
36/// A builder for [`GetNodeInput`](crate::operation::get_node::GetNodeInput).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct GetNodeInputBuilder {
40    pub(crate) network_id: ::std::option::Option<::std::string::String>,
41    pub(crate) member_id: ::std::option::Option<::std::string::String>,
42    pub(crate) node_id: ::std::option::Option<::std::string::String>,
43}
44impl GetNodeInputBuilder {
45    /// <p>The unique identifier of the network that the node is on.</p>
46    /// This field is required.
47    pub fn network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.network_id = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <p>The unique identifier of the network that the node is on.</p>
52    pub fn set_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.network_id = input;
54        self
55    }
56    /// <p>The unique identifier of the network that the node is on.</p>
57    pub fn get_network_id(&self) -> &::std::option::Option<::std::string::String> {
58        &self.network_id
59    }
60    /// <p>The unique identifier of the member that owns the node.</p>
61    /// <p>Applies only to Hyperledger Fabric and is required for Hyperledger Fabric.</p>
62    pub fn member_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63        self.member_id = ::std::option::Option::Some(input.into());
64        self
65    }
66    /// <p>The unique identifier of the member that owns the node.</p>
67    /// <p>Applies only to Hyperledger Fabric and is required for Hyperledger Fabric.</p>
68    pub fn set_member_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69        self.member_id = input;
70        self
71    }
72    /// <p>The unique identifier of the member that owns the node.</p>
73    /// <p>Applies only to Hyperledger Fabric and is required for Hyperledger Fabric.</p>
74    pub fn get_member_id(&self) -> &::std::option::Option<::std::string::String> {
75        &self.member_id
76    }
77    /// <p>The unique identifier of the node.</p>
78    /// This field is required.
79    pub fn node_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
80        self.node_id = ::std::option::Option::Some(input.into());
81        self
82    }
83    /// <p>The unique identifier of the node.</p>
84    pub fn set_node_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
85        self.node_id = input;
86        self
87    }
88    /// <p>The unique identifier of the node.</p>
89    pub fn get_node_id(&self) -> &::std::option::Option<::std::string::String> {
90        &self.node_id
91    }
92    /// Consumes the builder and constructs a [`GetNodeInput`](crate::operation::get_node::GetNodeInput).
93    pub fn build(self) -> ::std::result::Result<crate::operation::get_node::GetNodeInput, ::aws_smithy_types::error::operation::BuildError> {
94        ::std::result::Result::Ok(crate::operation::get_node::GetNodeInput {
95            network_id: self.network_id,
96            member_id: self.member_id,
97            node_id: self.node_id,
98        })
99    }
100}