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