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