Skip to main content

google_cloud_blockchainnodeengine_v1/
model.rs

1// Copyright 2026 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17#![allow(rustdoc::bare_urls)]
18#![allow(rustdoc::broken_intra_doc_links)]
19#![allow(rustdoc::invalid_html_tags)]
20#![allow(rustdoc::redundant_explicit_links)]
21#![no_implicit_prelude]
22extern crate async_trait;
23extern crate bytes;
24extern crate gaxi;
25extern crate google_cloud_gax;
26extern crate google_cloud_location;
27extern crate google_cloud_longrunning;
28extern crate google_cloud_lro;
29extern crate serde;
30extern crate serde_json;
31extern crate serde_with;
32extern crate std;
33extern crate tracing;
34extern crate wkt;
35
36mod debug;
37mod deserialize;
38mod serialize;
39
40/// A representation of a blockchain node.
41#[derive(Clone, Default, PartialEq)]
42#[non_exhaustive]
43pub struct BlockchainNode {
44    /// Output only. The fully qualified name of the blockchain node.
45    /// e.g. `projects/my-project/locations/us-central1/blockchainNodes/my-node`.
46    pub name: std::string::String,
47
48    /// Output only. The timestamp at which the blockchain node was first created.
49    pub create_time: std::option::Option<wkt::Timestamp>,
50
51    /// Output only. The timestamp at which the blockchain node was last updated.
52    pub update_time: std::option::Option<wkt::Timestamp>,
53
54    /// User-provided key-value pairs.
55    pub labels: std::collections::HashMap<std::string::String, std::string::String>,
56
57    /// Immutable. The blockchain type of the node.
58    pub blockchain_type: std::option::Option<crate::model::blockchain_node::BlockchainType>,
59
60    /// Output only. The connection information used to interact with a blockchain
61    /// node.
62    pub connection_info: std::option::Option<crate::model::blockchain_node::ConnectionInfo>,
63
64    /// Output only. A status representing the state of the node.
65    pub state: crate::model::blockchain_node::State,
66
67    /// Optional. When true, the node is only accessible via Private Service
68    /// Connect; no public endpoints are exposed. Otherwise, the node is only
69    /// accessible via public endpoints. Warning: These nodes are deprecated,
70    /// please use public endpoints instead.
71    #[deprecated]
72    pub private_service_connect_enabled: bool,
73
74    /// Information that is specific to a particular blockchain type.
75    pub blockchain_type_details:
76        std::option::Option<crate::model::blockchain_node::BlockchainTypeDetails>,
77
78    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
79}
80
81impl BlockchainNode {
82    /// Creates a new default instance.
83    pub fn new() -> Self {
84        std::default::Default::default()
85    }
86
87    /// Sets the value of [name][crate::model::BlockchainNode::name].
88    ///
89    /// # Example
90    /// ```ignore,no_run
91    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
92    /// # let project_id = "project_id";
93    /// # let location_id = "location_id";
94    /// # let blockchain_node_id = "blockchain_node_id";
95    /// let x = BlockchainNode::new().set_name(format!("projects/{project_id}/locations/{location_id}/blockchainNodes/{blockchain_node_id}"));
96    /// ```
97    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
98        self.name = v.into();
99        self
100    }
101
102    /// Sets the value of [create_time][crate::model::BlockchainNode::create_time].
103    ///
104    /// # Example
105    /// ```ignore,no_run
106    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
107    /// use wkt::Timestamp;
108    /// let x = BlockchainNode::new().set_create_time(Timestamp::default()/* use setters */);
109    /// ```
110    pub fn set_create_time<T>(mut self, v: T) -> Self
111    where
112        T: std::convert::Into<wkt::Timestamp>,
113    {
114        self.create_time = std::option::Option::Some(v.into());
115        self
116    }
117
118    /// Sets or clears the value of [create_time][crate::model::BlockchainNode::create_time].
119    ///
120    /// # Example
121    /// ```ignore,no_run
122    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
123    /// use wkt::Timestamp;
124    /// let x = BlockchainNode::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
125    /// let x = BlockchainNode::new().set_or_clear_create_time(None::<Timestamp>);
126    /// ```
127    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
128    where
129        T: std::convert::Into<wkt::Timestamp>,
130    {
131        self.create_time = v.map(|x| x.into());
132        self
133    }
134
135    /// Sets the value of [update_time][crate::model::BlockchainNode::update_time].
136    ///
137    /// # Example
138    /// ```ignore,no_run
139    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
140    /// use wkt::Timestamp;
141    /// let x = BlockchainNode::new().set_update_time(Timestamp::default()/* use setters */);
142    /// ```
143    pub fn set_update_time<T>(mut self, v: T) -> Self
144    where
145        T: std::convert::Into<wkt::Timestamp>,
146    {
147        self.update_time = std::option::Option::Some(v.into());
148        self
149    }
150
151    /// Sets or clears the value of [update_time][crate::model::BlockchainNode::update_time].
152    ///
153    /// # Example
154    /// ```ignore,no_run
155    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
156    /// use wkt::Timestamp;
157    /// let x = BlockchainNode::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
158    /// let x = BlockchainNode::new().set_or_clear_update_time(None::<Timestamp>);
159    /// ```
160    pub fn set_or_clear_update_time<T>(mut self, v: std::option::Option<T>) -> Self
161    where
162        T: std::convert::Into<wkt::Timestamp>,
163    {
164        self.update_time = v.map(|x| x.into());
165        self
166    }
167
168    /// Sets the value of [labels][crate::model::BlockchainNode::labels].
169    ///
170    /// # Example
171    /// ```ignore,no_run
172    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
173    /// let x = BlockchainNode::new().set_labels([
174    ///     ("key0", "abc"),
175    ///     ("key1", "xyz"),
176    /// ]);
177    /// ```
178    pub fn set_labels<T, K, V>(mut self, v: T) -> Self
179    where
180        T: std::iter::IntoIterator<Item = (K, V)>,
181        K: std::convert::Into<std::string::String>,
182        V: std::convert::Into<std::string::String>,
183    {
184        use std::iter::Iterator;
185        self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
186        self
187    }
188
189    /// Sets the value of [blockchain_type][crate::model::BlockchainNode::blockchain_type].
190    ///
191    /// # Example
192    /// ```ignore,no_run
193    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
194    /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::BlockchainType;
195    /// let x0 = BlockchainNode::new().set_blockchain_type(BlockchainType::Ethereum);
196    /// ```
197    pub fn set_blockchain_type<T>(mut self, v: T) -> Self
198    where
199        T: std::convert::Into<crate::model::blockchain_node::BlockchainType>,
200    {
201        self.blockchain_type = std::option::Option::Some(v.into());
202        self
203    }
204
205    /// Sets or clears the value of [blockchain_type][crate::model::BlockchainNode::blockchain_type].
206    ///
207    /// # Example
208    /// ```ignore,no_run
209    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
210    /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::BlockchainType;
211    /// let x0 = BlockchainNode::new().set_or_clear_blockchain_type(Some(BlockchainType::Ethereum));
212    /// let x_none = BlockchainNode::new().set_or_clear_blockchain_type(None::<BlockchainType>);
213    /// ```
214    pub fn set_or_clear_blockchain_type<T>(mut self, v: std::option::Option<T>) -> Self
215    where
216        T: std::convert::Into<crate::model::blockchain_node::BlockchainType>,
217    {
218        self.blockchain_type = v.map(|x| x.into());
219        self
220    }
221
222    /// Sets the value of [connection_info][crate::model::BlockchainNode::connection_info].
223    ///
224    /// # Example
225    /// ```ignore,no_run
226    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
227    /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ConnectionInfo;
228    /// let x = BlockchainNode::new().set_connection_info(ConnectionInfo::default()/* use setters */);
229    /// ```
230    pub fn set_connection_info<T>(mut self, v: T) -> Self
231    where
232        T: std::convert::Into<crate::model::blockchain_node::ConnectionInfo>,
233    {
234        self.connection_info = std::option::Option::Some(v.into());
235        self
236    }
237
238    /// Sets or clears the value of [connection_info][crate::model::BlockchainNode::connection_info].
239    ///
240    /// # Example
241    /// ```ignore,no_run
242    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
243    /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ConnectionInfo;
244    /// let x = BlockchainNode::new().set_or_clear_connection_info(Some(ConnectionInfo::default()/* use setters */));
245    /// let x = BlockchainNode::new().set_or_clear_connection_info(None::<ConnectionInfo>);
246    /// ```
247    pub fn set_or_clear_connection_info<T>(mut self, v: std::option::Option<T>) -> Self
248    where
249        T: std::convert::Into<crate::model::blockchain_node::ConnectionInfo>,
250    {
251        self.connection_info = v.map(|x| x.into());
252        self
253    }
254
255    /// Sets the value of [state][crate::model::BlockchainNode::state].
256    ///
257    /// # Example
258    /// ```ignore,no_run
259    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
260    /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::State;
261    /// let x0 = BlockchainNode::new().set_state(State::Creating);
262    /// let x1 = BlockchainNode::new().set_state(State::Deleting);
263    /// let x2 = BlockchainNode::new().set_state(State::Running);
264    /// ```
265    pub fn set_state<T: std::convert::Into<crate::model::blockchain_node::State>>(
266        mut self,
267        v: T,
268    ) -> Self {
269        self.state = v.into();
270        self
271    }
272
273    /// Sets the value of [private_service_connect_enabled][crate::model::BlockchainNode::private_service_connect_enabled].
274    ///
275    /// # Example
276    /// ```ignore,no_run
277    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
278    /// let x = BlockchainNode::new().set_private_service_connect_enabled(true);
279    /// ```
280    #[deprecated]
281    pub fn set_private_service_connect_enabled<T: std::convert::Into<bool>>(
282        mut self,
283        v: T,
284    ) -> Self {
285        self.private_service_connect_enabled = v.into();
286        self
287    }
288
289    /// Sets the value of [blockchain_type_details][crate::model::BlockchainNode::blockchain_type_details].
290    ///
291    /// Note that all the setters affecting `blockchain_type_details` are mutually
292    /// exclusive.
293    ///
294    /// # Example
295    /// ```ignore,no_run
296    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
297    /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
298    /// let x = BlockchainNode::new().set_blockchain_type_details(Some(
299    ///     google_cloud_blockchainnodeengine_v1::model::blockchain_node::BlockchainTypeDetails::EthereumDetails(EthereumDetails::default().into())));
300    /// ```
301    pub fn set_blockchain_type_details<
302        T: std::convert::Into<
303                std::option::Option<crate::model::blockchain_node::BlockchainTypeDetails>,
304            >,
305    >(
306        mut self,
307        v: T,
308    ) -> Self {
309        self.blockchain_type_details = v.into();
310        self
311    }
312
313    /// The value of [blockchain_type_details][crate::model::BlockchainNode::blockchain_type_details]
314    /// if it holds a `EthereumDetails`, `None` if the field is not set or
315    /// holds a different branch.
316    pub fn ethereum_details(
317        &self,
318    ) -> std::option::Option<&std::boxed::Box<crate::model::blockchain_node::EthereumDetails>> {
319        #[allow(unreachable_patterns)]
320        self.blockchain_type_details.as_ref().and_then(|v| match v {
321            crate::model::blockchain_node::BlockchainTypeDetails::EthereumDetails(v) => {
322                std::option::Option::Some(v)
323            }
324            _ => std::option::Option::None,
325        })
326    }
327
328    /// Sets the value of [blockchain_type_details][crate::model::BlockchainNode::blockchain_type_details]
329    /// to hold a `EthereumDetails`.
330    ///
331    /// Note that all the setters affecting `blockchain_type_details` are
332    /// mutually exclusive.
333    ///
334    /// # Example
335    /// ```ignore,no_run
336    /// # use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
337    /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
338    /// let x = BlockchainNode::new().set_ethereum_details(EthereumDetails::default()/* use setters */);
339    /// assert!(x.ethereum_details().is_some());
340    /// ```
341    pub fn set_ethereum_details<
342        T: std::convert::Into<std::boxed::Box<crate::model::blockchain_node::EthereumDetails>>,
343    >(
344        mut self,
345        v: T,
346    ) -> Self {
347        self.blockchain_type_details = std::option::Option::Some(
348            crate::model::blockchain_node::BlockchainTypeDetails::EthereumDetails(v.into()),
349        );
350        self
351    }
352}
353
354impl wkt::message::Message for BlockchainNode {
355    fn typename() -> &'static str {
356        "type.googleapis.com/google.cloud.blockchainnodeengine.v1.BlockchainNode"
357    }
358}
359
360/// Defines additional types related to [BlockchainNode].
361pub mod blockchain_node {
362    #[allow(unused_imports)]
363    use super::*;
364
365    /// The connection information through which to interact with a blockchain
366    /// node.
367    #[derive(Clone, Default, PartialEq)]
368    #[non_exhaustive]
369    pub struct ConnectionInfo {
370        /// Output only. The endpoint information through which to interact with a
371        /// blockchain node.
372        pub endpoint_info:
373            std::option::Option<crate::model::blockchain_node::connection_info::EndpointInfo>,
374
375        /// Output only. A service attachment that exposes a node, and has the
376        /// following format:
377        /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment_name}
378        pub service_attachment: std::string::String,
379
380        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
381    }
382
383    impl ConnectionInfo {
384        /// Creates a new default instance.
385        pub fn new() -> Self {
386            std::default::Default::default()
387        }
388
389        /// Sets the value of [endpoint_info][crate::model::blockchain_node::ConnectionInfo::endpoint_info].
390        ///
391        /// # Example
392        /// ```ignore,no_run
393        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ConnectionInfo;
394        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::connection_info::EndpointInfo;
395        /// let x = ConnectionInfo::new().set_endpoint_info(EndpointInfo::default()/* use setters */);
396        /// ```
397        pub fn set_endpoint_info<T>(mut self, v: T) -> Self
398        where
399            T: std::convert::Into<crate::model::blockchain_node::connection_info::EndpointInfo>,
400        {
401            self.endpoint_info = std::option::Option::Some(v.into());
402            self
403        }
404
405        /// Sets or clears the value of [endpoint_info][crate::model::blockchain_node::ConnectionInfo::endpoint_info].
406        ///
407        /// # Example
408        /// ```ignore,no_run
409        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ConnectionInfo;
410        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::connection_info::EndpointInfo;
411        /// let x = ConnectionInfo::new().set_or_clear_endpoint_info(Some(EndpointInfo::default()/* use setters */));
412        /// let x = ConnectionInfo::new().set_or_clear_endpoint_info(None::<EndpointInfo>);
413        /// ```
414        pub fn set_or_clear_endpoint_info<T>(mut self, v: std::option::Option<T>) -> Self
415        where
416            T: std::convert::Into<crate::model::blockchain_node::connection_info::EndpointInfo>,
417        {
418            self.endpoint_info = v.map(|x| x.into());
419            self
420        }
421
422        /// Sets the value of [service_attachment][crate::model::blockchain_node::ConnectionInfo::service_attachment].
423        ///
424        /// # Example
425        /// ```ignore,no_run
426        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ConnectionInfo;
427        /// let x = ConnectionInfo::new().set_service_attachment("example");
428        /// ```
429        pub fn set_service_attachment<T: std::convert::Into<std::string::String>>(
430            mut self,
431            v: T,
432        ) -> Self {
433            self.service_attachment = v.into();
434            self
435        }
436    }
437
438    impl wkt::message::Message for ConnectionInfo {
439        fn typename() -> &'static str {
440            "type.googleapis.com/google.cloud.blockchainnodeengine.v1.BlockchainNode.ConnectionInfo"
441        }
442    }
443
444    /// Defines additional types related to [ConnectionInfo].
445    pub mod connection_info {
446        #[allow(unused_imports)]
447        use super::*;
448
449        /// Contains endpoint information through which to interact with a blockchain
450        /// node.
451        #[derive(Clone, Default, PartialEq)]
452        #[non_exhaustive]
453        pub struct EndpointInfo {
454            /// Output only. The assigned URL for the node JSON-RPC API endpoint.
455            pub json_rpc_api_endpoint: std::string::String,
456
457            /// Output only. The assigned URL for the node WebSockets API endpoint.
458            pub websockets_api_endpoint: std::string::String,
459
460            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
461        }
462
463        impl EndpointInfo {
464            /// Creates a new default instance.
465            pub fn new() -> Self {
466                std::default::Default::default()
467            }
468
469            /// Sets the value of [json_rpc_api_endpoint][crate::model::blockchain_node::connection_info::EndpointInfo::json_rpc_api_endpoint].
470            ///
471            /// # Example
472            /// ```ignore,no_run
473            /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::connection_info::EndpointInfo;
474            /// let x = EndpointInfo::new().set_json_rpc_api_endpoint("example");
475            /// ```
476            pub fn set_json_rpc_api_endpoint<T: std::convert::Into<std::string::String>>(
477                mut self,
478                v: T,
479            ) -> Self {
480                self.json_rpc_api_endpoint = v.into();
481                self
482            }
483
484            /// Sets the value of [websockets_api_endpoint][crate::model::blockchain_node::connection_info::EndpointInfo::websockets_api_endpoint].
485            ///
486            /// # Example
487            /// ```ignore,no_run
488            /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::connection_info::EndpointInfo;
489            /// let x = EndpointInfo::new().set_websockets_api_endpoint("example");
490            /// ```
491            pub fn set_websockets_api_endpoint<T: std::convert::Into<std::string::String>>(
492                mut self,
493                v: T,
494            ) -> Self {
495                self.websockets_api_endpoint = v.into();
496                self
497            }
498        }
499
500        impl wkt::message::Message for EndpointInfo {
501            fn typename() -> &'static str {
502                "type.googleapis.com/google.cloud.blockchainnodeengine.v1.BlockchainNode.ConnectionInfo.EndpointInfo"
503            }
504        }
505    }
506
507    /// Ethereum-specific blockchain node details.
508    #[derive(Clone, Default, PartialEq)]
509    #[non_exhaustive]
510    pub struct EthereumDetails {
511        /// Immutable. The Ethereum environment being accessed.
512        pub network: std::option::Option<crate::model::blockchain_node::ethereum_details::Network>,
513
514        /// Immutable. The type of Ethereum node.
515        pub node_type:
516            std::option::Option<crate::model::blockchain_node::ethereum_details::NodeType>,
517
518        /// Immutable. The execution client
519        pub execution_client:
520            std::option::Option<crate::model::blockchain_node::ethereum_details::ExecutionClient>,
521
522        /// Immutable. The consensus client.
523        pub consensus_client:
524            std::option::Option<crate::model::blockchain_node::ethereum_details::ConsensusClient>,
525
526        /// Immutable. Enables JSON-RPC access to functions in the `admin` namespace.
527        /// Defaults to `false`.
528        pub api_enable_admin: std::option::Option<bool>,
529
530        /// Immutable. Enables JSON-RPC access to functions in the `debug` namespace.
531        /// Defaults to `false`.
532        pub api_enable_debug: std::option::Option<bool>,
533
534        /// Output only. Ethereum-specific endpoint information.
535        pub additional_endpoints:
536            std::option::Option<crate::model::blockchain_node::ethereum_details::EthereumEndpoints>,
537
538        /// Configuration for validator-related parameters on the beacon client,
539        /// and for any GCP-managed validator client.
540        pub validator_config:
541            std::option::Option<crate::model::blockchain_node::ethereum_details::ValidatorConfig>,
542
543        /// Options for the execution client.
544        pub execution_client_details: std::option::Option<
545            crate::model::blockchain_node::ethereum_details::ExecutionClientDetails,
546        >,
547
548        pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
549    }
550
551    impl EthereumDetails {
552        /// Creates a new default instance.
553        pub fn new() -> Self {
554            std::default::Default::default()
555        }
556
557        /// Sets the value of [network][crate::model::blockchain_node::EthereumDetails::network].
558        ///
559        /// # Example
560        /// ```ignore,no_run
561        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
562        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::Network;
563        /// let x0 = EthereumDetails::new().set_network(Network::Mainnet);
564        /// let x1 = EthereumDetails::new().set_network(Network::TestnetSepolia);
565        /// let x2 = EthereumDetails::new().set_network(Network::TestnetHolesky);
566        /// ```
567        pub fn set_network<T>(mut self, v: T) -> Self
568        where
569            T: std::convert::Into<crate::model::blockchain_node::ethereum_details::Network>,
570        {
571            self.network = std::option::Option::Some(v.into());
572            self
573        }
574
575        /// Sets or clears the value of [network][crate::model::blockchain_node::EthereumDetails::network].
576        ///
577        /// # Example
578        /// ```ignore,no_run
579        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
580        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::Network;
581        /// let x0 = EthereumDetails::new().set_or_clear_network(Some(Network::Mainnet));
582        /// let x1 = EthereumDetails::new().set_or_clear_network(Some(Network::TestnetSepolia));
583        /// let x2 = EthereumDetails::new().set_or_clear_network(Some(Network::TestnetHolesky));
584        /// let x_none = EthereumDetails::new().set_or_clear_network(None::<Network>);
585        /// ```
586        pub fn set_or_clear_network<T>(mut self, v: std::option::Option<T>) -> Self
587        where
588            T: std::convert::Into<crate::model::blockchain_node::ethereum_details::Network>,
589        {
590            self.network = v.map(|x| x.into());
591            self
592        }
593
594        /// Sets the value of [node_type][crate::model::blockchain_node::EthereumDetails::node_type].
595        ///
596        /// # Example
597        /// ```ignore,no_run
598        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
599        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::NodeType;
600        /// let x0 = EthereumDetails::new().set_node_type(NodeType::Light);
601        /// let x1 = EthereumDetails::new().set_node_type(NodeType::Full);
602        /// let x2 = EthereumDetails::new().set_node_type(NodeType::Archive);
603        /// ```
604        pub fn set_node_type<T>(mut self, v: T) -> Self
605        where
606            T: std::convert::Into<crate::model::blockchain_node::ethereum_details::NodeType>,
607        {
608            self.node_type = std::option::Option::Some(v.into());
609            self
610        }
611
612        /// Sets or clears the value of [node_type][crate::model::blockchain_node::EthereumDetails::node_type].
613        ///
614        /// # Example
615        /// ```ignore,no_run
616        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
617        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::NodeType;
618        /// let x0 = EthereumDetails::new().set_or_clear_node_type(Some(NodeType::Light));
619        /// let x1 = EthereumDetails::new().set_or_clear_node_type(Some(NodeType::Full));
620        /// let x2 = EthereumDetails::new().set_or_clear_node_type(Some(NodeType::Archive));
621        /// let x_none = EthereumDetails::new().set_or_clear_node_type(None::<NodeType>);
622        /// ```
623        pub fn set_or_clear_node_type<T>(mut self, v: std::option::Option<T>) -> Self
624        where
625            T: std::convert::Into<crate::model::blockchain_node::ethereum_details::NodeType>,
626        {
627            self.node_type = v.map(|x| x.into());
628            self
629        }
630
631        /// Sets the value of [execution_client][crate::model::blockchain_node::EthereumDetails::execution_client].
632        ///
633        /// # Example
634        /// ```ignore,no_run
635        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
636        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::ExecutionClient;
637        /// let x0 = EthereumDetails::new().set_execution_client(ExecutionClient::Geth);
638        /// let x1 = EthereumDetails::new().set_execution_client(ExecutionClient::Erigon);
639        /// ```
640        pub fn set_execution_client<T>(mut self, v: T) -> Self
641        where
642            T: std::convert::Into<crate::model::blockchain_node::ethereum_details::ExecutionClient>,
643        {
644            self.execution_client = std::option::Option::Some(v.into());
645            self
646        }
647
648        /// Sets or clears the value of [execution_client][crate::model::blockchain_node::EthereumDetails::execution_client].
649        ///
650        /// # Example
651        /// ```ignore,no_run
652        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
653        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::ExecutionClient;
654        /// let x0 = EthereumDetails::new().set_or_clear_execution_client(Some(ExecutionClient::Geth));
655        /// let x1 = EthereumDetails::new().set_or_clear_execution_client(Some(ExecutionClient::Erigon));
656        /// let x_none = EthereumDetails::new().set_or_clear_execution_client(None::<ExecutionClient>);
657        /// ```
658        pub fn set_or_clear_execution_client<T>(mut self, v: std::option::Option<T>) -> Self
659        where
660            T: std::convert::Into<crate::model::blockchain_node::ethereum_details::ExecutionClient>,
661        {
662            self.execution_client = v.map(|x| x.into());
663            self
664        }
665
666        /// Sets the value of [consensus_client][crate::model::blockchain_node::EthereumDetails::consensus_client].
667        ///
668        /// # Example
669        /// ```ignore,no_run
670        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
671        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::ConsensusClient;
672        /// let x0 = EthereumDetails::new().set_consensus_client(ConsensusClient::Lighthouse);
673        /// ```
674        pub fn set_consensus_client<T>(mut self, v: T) -> Self
675        where
676            T: std::convert::Into<crate::model::blockchain_node::ethereum_details::ConsensusClient>,
677        {
678            self.consensus_client = std::option::Option::Some(v.into());
679            self
680        }
681
682        /// Sets or clears the value of [consensus_client][crate::model::blockchain_node::EthereumDetails::consensus_client].
683        ///
684        /// # Example
685        /// ```ignore,no_run
686        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
687        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::ConsensusClient;
688        /// let x0 = EthereumDetails::new().set_or_clear_consensus_client(Some(ConsensusClient::Lighthouse));
689        /// let x_none = EthereumDetails::new().set_or_clear_consensus_client(None::<ConsensusClient>);
690        /// ```
691        pub fn set_or_clear_consensus_client<T>(mut self, v: std::option::Option<T>) -> Self
692        where
693            T: std::convert::Into<crate::model::blockchain_node::ethereum_details::ConsensusClient>,
694        {
695            self.consensus_client = v.map(|x| x.into());
696            self
697        }
698
699        /// Sets the value of [api_enable_admin][crate::model::blockchain_node::EthereumDetails::api_enable_admin].
700        ///
701        /// # Example
702        /// ```ignore,no_run
703        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
704        /// let x = EthereumDetails::new().set_api_enable_admin(true);
705        /// ```
706        pub fn set_api_enable_admin<T>(mut self, v: T) -> Self
707        where
708            T: std::convert::Into<bool>,
709        {
710            self.api_enable_admin = std::option::Option::Some(v.into());
711            self
712        }
713
714        /// Sets or clears the value of [api_enable_admin][crate::model::blockchain_node::EthereumDetails::api_enable_admin].
715        ///
716        /// # Example
717        /// ```ignore,no_run
718        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
719        /// let x = EthereumDetails::new().set_or_clear_api_enable_admin(Some(false));
720        /// let x = EthereumDetails::new().set_or_clear_api_enable_admin(None::<bool>);
721        /// ```
722        pub fn set_or_clear_api_enable_admin<T>(mut self, v: std::option::Option<T>) -> Self
723        where
724            T: std::convert::Into<bool>,
725        {
726            self.api_enable_admin = v.map(|x| x.into());
727            self
728        }
729
730        /// Sets the value of [api_enable_debug][crate::model::blockchain_node::EthereumDetails::api_enable_debug].
731        ///
732        /// # Example
733        /// ```ignore,no_run
734        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
735        /// let x = EthereumDetails::new().set_api_enable_debug(true);
736        /// ```
737        pub fn set_api_enable_debug<T>(mut self, v: T) -> Self
738        where
739            T: std::convert::Into<bool>,
740        {
741            self.api_enable_debug = std::option::Option::Some(v.into());
742            self
743        }
744
745        /// Sets or clears the value of [api_enable_debug][crate::model::blockchain_node::EthereumDetails::api_enable_debug].
746        ///
747        /// # Example
748        /// ```ignore,no_run
749        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
750        /// let x = EthereumDetails::new().set_or_clear_api_enable_debug(Some(false));
751        /// let x = EthereumDetails::new().set_or_clear_api_enable_debug(None::<bool>);
752        /// ```
753        pub fn set_or_clear_api_enable_debug<T>(mut self, v: std::option::Option<T>) -> Self
754        where
755            T: std::convert::Into<bool>,
756        {
757            self.api_enable_debug = v.map(|x| x.into());
758            self
759        }
760
761        /// Sets the value of [additional_endpoints][crate::model::blockchain_node::EthereumDetails::additional_endpoints].
762        ///
763        /// # Example
764        /// ```ignore,no_run
765        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
766        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::EthereumEndpoints;
767        /// let x = EthereumDetails::new().set_additional_endpoints(EthereumEndpoints::default()/* use setters */);
768        /// ```
769        pub fn set_additional_endpoints<T>(mut self, v: T) -> Self
770        where
771            T: std::convert::Into<
772                    crate::model::blockchain_node::ethereum_details::EthereumEndpoints,
773                >,
774        {
775            self.additional_endpoints = std::option::Option::Some(v.into());
776            self
777        }
778
779        /// Sets or clears the value of [additional_endpoints][crate::model::blockchain_node::EthereumDetails::additional_endpoints].
780        ///
781        /// # Example
782        /// ```ignore,no_run
783        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
784        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::EthereumEndpoints;
785        /// let x = EthereumDetails::new().set_or_clear_additional_endpoints(Some(EthereumEndpoints::default()/* use setters */));
786        /// let x = EthereumDetails::new().set_or_clear_additional_endpoints(None::<EthereumEndpoints>);
787        /// ```
788        pub fn set_or_clear_additional_endpoints<T>(mut self, v: std::option::Option<T>) -> Self
789        where
790            T: std::convert::Into<
791                    crate::model::blockchain_node::ethereum_details::EthereumEndpoints,
792                >,
793        {
794            self.additional_endpoints = v.map(|x| x.into());
795            self
796        }
797
798        /// Sets the value of [validator_config][crate::model::blockchain_node::EthereumDetails::validator_config].
799        ///
800        /// # Example
801        /// ```ignore,no_run
802        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
803        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::ValidatorConfig;
804        /// let x = EthereumDetails::new().set_validator_config(ValidatorConfig::default()/* use setters */);
805        /// ```
806        pub fn set_validator_config<T>(mut self, v: T) -> Self
807        where
808            T: std::convert::Into<crate::model::blockchain_node::ethereum_details::ValidatorConfig>,
809        {
810            self.validator_config = std::option::Option::Some(v.into());
811            self
812        }
813
814        /// Sets or clears the value of [validator_config][crate::model::blockchain_node::EthereumDetails::validator_config].
815        ///
816        /// # Example
817        /// ```ignore,no_run
818        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
819        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::ValidatorConfig;
820        /// let x = EthereumDetails::new().set_or_clear_validator_config(Some(ValidatorConfig::default()/* use setters */));
821        /// let x = EthereumDetails::new().set_or_clear_validator_config(None::<ValidatorConfig>);
822        /// ```
823        pub fn set_or_clear_validator_config<T>(mut self, v: std::option::Option<T>) -> Self
824        where
825            T: std::convert::Into<crate::model::blockchain_node::ethereum_details::ValidatorConfig>,
826        {
827            self.validator_config = v.map(|x| x.into());
828            self
829        }
830
831        /// Sets the value of [execution_client_details][crate::model::blockchain_node::EthereumDetails::execution_client_details].
832        ///
833        /// Note that all the setters affecting `execution_client_details` are mutually
834        /// exclusive.
835        ///
836        /// # Example
837        /// ```ignore,no_run
838        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
839        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::GethDetails;
840        /// let x = EthereumDetails::new().set_execution_client_details(Some(
841        ///     google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::ExecutionClientDetails::GethDetails(GethDetails::default().into())));
842        /// ```
843        pub fn set_execution_client_details<
844            T: std::convert::Into<
845                    std::option::Option<
846                        crate::model::blockchain_node::ethereum_details::ExecutionClientDetails,
847                    >,
848                >,
849        >(
850            mut self,
851            v: T,
852        ) -> Self {
853            self.execution_client_details = v.into();
854            self
855        }
856
857        /// The value of [execution_client_details][crate::model::blockchain_node::EthereumDetails::execution_client_details]
858        /// if it holds a `GethDetails`, `None` if the field is not set or
859        /// holds a different branch.
860        pub fn geth_details(
861            &self,
862        ) -> std::option::Option<
863            &std::boxed::Box<crate::model::blockchain_node::ethereum_details::GethDetails>,
864        > {
865            #[allow(unreachable_patterns)]
866            self.execution_client_details.as_ref().and_then(|v| match v {
867                crate::model::blockchain_node::ethereum_details::ExecutionClientDetails::GethDetails(v) => std::option::Option::Some(v),
868                _ => std::option::Option::None,
869            })
870        }
871
872        /// Sets the value of [execution_client_details][crate::model::blockchain_node::EthereumDetails::execution_client_details]
873        /// to hold a `GethDetails`.
874        ///
875        /// Note that all the setters affecting `execution_client_details` are
876        /// mutually exclusive.
877        ///
878        /// # Example
879        /// ```ignore,no_run
880        /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::EthereumDetails;
881        /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::GethDetails;
882        /// let x = EthereumDetails::new().set_geth_details(GethDetails::default()/* use setters */);
883        /// assert!(x.geth_details().is_some());
884        /// ```
885        pub fn set_geth_details<
886            T: std::convert::Into<
887                    std::boxed::Box<crate::model::blockchain_node::ethereum_details::GethDetails>,
888                >,
889        >(
890            mut self,
891            v: T,
892        ) -> Self {
893            self.execution_client_details = std::option::Option::Some(
894                crate::model::blockchain_node::ethereum_details::ExecutionClientDetails::GethDetails(
895                    v.into()
896                )
897            );
898            self
899        }
900    }
901
902    impl wkt::message::Message for EthereumDetails {
903        fn typename() -> &'static str {
904            "type.googleapis.com/google.cloud.blockchainnodeengine.v1.BlockchainNode.EthereumDetails"
905        }
906    }
907
908    /// Defines additional types related to [EthereumDetails].
909    pub mod ethereum_details {
910        #[allow(unused_imports)]
911        use super::*;
912
913        /// Options for the Geth execution client.
914        ///
915        /// See [Command-line
916        /// Options](https://geth.ethereum.org/docs/fundamentals/command-line-options)
917        /// for more details.
918        #[derive(Clone, Default, PartialEq)]
919        #[non_exhaustive]
920        pub struct GethDetails {
921
922            /// Immutable. Blockchain garbage collection mode.
923            pub garbage_collection_mode: std::option::Option<crate::model::blockchain_node::ethereum_details::geth_details::GarbageCollectionMode>,
924
925            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
926        }
927
928        impl GethDetails {
929            /// Creates a new default instance.
930            pub fn new() -> Self {
931                std::default::Default::default()
932            }
933
934            /// Sets the value of [garbage_collection_mode][crate::model::blockchain_node::ethereum_details::GethDetails::garbage_collection_mode].
935            ///
936            /// # Example
937            /// ```ignore,no_run
938            /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::GethDetails;
939            /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::geth_details::GarbageCollectionMode;
940            /// let x0 = GethDetails::new().set_garbage_collection_mode(GarbageCollectionMode::Full);
941            /// let x1 = GethDetails::new().set_garbage_collection_mode(GarbageCollectionMode::Archive);
942            /// ```
943            pub fn set_garbage_collection_mode<T>(mut self, v: T) -> Self
944            where T: std::convert::Into<crate::model::blockchain_node::ethereum_details::geth_details::GarbageCollectionMode>
945            {
946                self.garbage_collection_mode = std::option::Option::Some(v.into());
947                self
948            }
949
950            /// Sets or clears the value of [garbage_collection_mode][crate::model::blockchain_node::ethereum_details::GethDetails::garbage_collection_mode].
951            ///
952            /// # Example
953            /// ```ignore,no_run
954            /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::GethDetails;
955            /// use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::geth_details::GarbageCollectionMode;
956            /// let x0 = GethDetails::new().set_or_clear_garbage_collection_mode(Some(GarbageCollectionMode::Full));
957            /// let x1 = GethDetails::new().set_or_clear_garbage_collection_mode(Some(GarbageCollectionMode::Archive));
958            /// let x_none = GethDetails::new().set_or_clear_garbage_collection_mode(None::<GarbageCollectionMode>);
959            /// ```
960            pub fn set_or_clear_garbage_collection_mode<T>(mut self, v: std::option::Option<T>) -> Self
961            where T: std::convert::Into<crate::model::blockchain_node::ethereum_details::geth_details::GarbageCollectionMode>
962            {
963                self.garbage_collection_mode = v.map(|x| x.into());
964                self
965            }
966        }
967
968        impl wkt::message::Message for GethDetails {
969            fn typename() -> &'static str {
970                "type.googleapis.com/google.cloud.blockchainnodeengine.v1.BlockchainNode.EthereumDetails.GethDetails"
971            }
972        }
973
974        /// Defines additional types related to [GethDetails].
975        pub mod geth_details {
976            #[allow(unused_imports)]
977            use super::*;
978
979            /// Blockchain garbage collection modes. Only applicable when `NodeType` is
980            /// `FULL` or `ARCHIVE`.
981            ///
982            /// # Working with unknown values
983            ///
984            /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
985            /// additional enum variants at any time. Adding new variants is not considered
986            /// a breaking change. Applications should write their code in anticipation of:
987            ///
988            /// - New values appearing in future releases of the client library, **and**
989            /// - New values received dynamically, without application changes.
990            ///
991            /// Please consult the [Working with enums] section in the user guide for some
992            /// guidelines.
993            ///
994            /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
995            #[derive(Clone, Debug, PartialEq)]
996            #[non_exhaustive]
997            pub enum GarbageCollectionMode {
998                /// The garbage collection has not been specified.
999                Unspecified,
1000                /// Configures Geth's garbage collection so that older data not needed
1001                /// for a full node is deleted. This is the default mode when creating a
1002                /// full node.
1003                Full,
1004                /// Configures Geth's garbage collection so that old data is never
1005                /// deleted. This is the default mode when creating an archive node. This
1006                /// value can also be chosen when creating a full node in order to create
1007                /// a partial/recent archive node. See
1008                /// [Sync modes](https://geth.ethereum.org/docs/fundamentals/sync-modes)
1009                /// for more details.
1010                Archive,
1011                /// If set, the enum was initialized with an unknown value.
1012                ///
1013                /// Applications can examine the value using [GarbageCollectionMode::value] or
1014                /// [GarbageCollectionMode::name].
1015                UnknownValue(garbage_collection_mode::UnknownValue),
1016            }
1017
1018            #[doc(hidden)]
1019            pub mod garbage_collection_mode {
1020                #[allow(unused_imports)]
1021                use super::*;
1022                #[derive(Clone, Debug, PartialEq)]
1023                pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1024            }
1025
1026            impl GarbageCollectionMode {
1027                /// Gets the enum value.
1028                ///
1029                /// Returns `None` if the enum contains an unknown value deserialized from
1030                /// the string representation of enums.
1031                pub fn value(&self) -> std::option::Option<i32> {
1032                    match self {
1033                        Self::Unspecified => std::option::Option::Some(0),
1034                        Self::Full => std::option::Option::Some(1),
1035                        Self::Archive => std::option::Option::Some(2),
1036                        Self::UnknownValue(u) => u.0.value(),
1037                    }
1038                }
1039
1040                /// Gets the enum value as a string.
1041                ///
1042                /// Returns `None` if the enum contains an unknown value deserialized from
1043                /// the integer representation of enums.
1044                pub fn name(&self) -> std::option::Option<&str> {
1045                    match self {
1046                        Self::Unspecified => {
1047                            std::option::Option::Some("GARBAGE_COLLECTION_MODE_UNSPECIFIED")
1048                        }
1049                        Self::Full => std::option::Option::Some("FULL"),
1050                        Self::Archive => std::option::Option::Some("ARCHIVE"),
1051                        Self::UnknownValue(u) => u.0.name(),
1052                    }
1053                }
1054            }
1055
1056            impl std::default::Default for GarbageCollectionMode {
1057                fn default() -> Self {
1058                    use std::convert::From;
1059                    Self::from(0)
1060                }
1061            }
1062
1063            impl std::fmt::Display for GarbageCollectionMode {
1064                fn fmt(
1065                    &self,
1066                    f: &mut std::fmt::Formatter<'_>,
1067                ) -> std::result::Result<(), std::fmt::Error> {
1068                    wkt::internal::display_enum(f, self.name(), self.value())
1069                }
1070            }
1071
1072            impl std::convert::From<i32> for GarbageCollectionMode {
1073                fn from(value: i32) -> Self {
1074                    match value {
1075                        0 => Self::Unspecified,
1076                        1 => Self::Full,
1077                        2 => Self::Archive,
1078                        _ => Self::UnknownValue(garbage_collection_mode::UnknownValue(
1079                            wkt::internal::UnknownEnumValue::Integer(value),
1080                        )),
1081                    }
1082                }
1083            }
1084
1085            impl std::convert::From<&str> for GarbageCollectionMode {
1086                fn from(value: &str) -> Self {
1087                    use std::string::ToString;
1088                    match value {
1089                        "GARBAGE_COLLECTION_MODE_UNSPECIFIED" => Self::Unspecified,
1090                        "FULL" => Self::Full,
1091                        "ARCHIVE" => Self::Archive,
1092                        _ => Self::UnknownValue(garbage_collection_mode::UnknownValue(
1093                            wkt::internal::UnknownEnumValue::String(value.to_string()),
1094                        )),
1095                    }
1096                }
1097            }
1098
1099            impl serde::ser::Serialize for GarbageCollectionMode {
1100                fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1101                where
1102                    S: serde::Serializer,
1103                {
1104                    match self {
1105                        Self::Unspecified => serializer.serialize_i32(0),
1106                        Self::Full => serializer.serialize_i32(1),
1107                        Self::Archive => serializer.serialize_i32(2),
1108                        Self::UnknownValue(u) => u.0.serialize(serializer),
1109                    }
1110                }
1111            }
1112
1113            impl<'de> serde::de::Deserialize<'de> for GarbageCollectionMode {
1114                fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1115                where
1116                    D: serde::Deserializer<'de>,
1117                {
1118                    deserializer.deserialize_any(wkt::internal::EnumVisitor::<GarbageCollectionMode>::new(
1119                        ".google.cloud.blockchainnodeengine.v1.BlockchainNode.EthereumDetails.GethDetails.GarbageCollectionMode"))
1120                }
1121            }
1122        }
1123
1124        /// Contains endpoint information specific to Ethereum nodes.
1125        #[derive(Clone, Default, PartialEq)]
1126        #[non_exhaustive]
1127        pub struct EthereumEndpoints {
1128            /// Output only. The assigned URL for the node's Beacon API endpoint.
1129            pub beacon_api_endpoint: std::string::String,
1130
1131            /// Output only. The assigned URL for the node's Beacon Prometheus metrics
1132            /// endpoint. See [Prometheus
1133            /// Metrics](https://lighthouse-book.sigmaprime.io/advanced_metrics.html)
1134            /// for more details.
1135            pub beacon_prometheus_metrics_api_endpoint: std::string::String,
1136
1137            /// Output only. The assigned URL for the node's execution client's
1138            /// Prometheus metrics endpoint.
1139            pub execution_client_prometheus_metrics_api_endpoint: std::string::String,
1140
1141            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1142        }
1143
1144        impl EthereumEndpoints {
1145            /// Creates a new default instance.
1146            pub fn new() -> Self {
1147                std::default::Default::default()
1148            }
1149
1150            /// Sets the value of [beacon_api_endpoint][crate::model::blockchain_node::ethereum_details::EthereumEndpoints::beacon_api_endpoint].
1151            ///
1152            /// # Example
1153            /// ```ignore,no_run
1154            /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::EthereumEndpoints;
1155            /// let x = EthereumEndpoints::new().set_beacon_api_endpoint("example");
1156            /// ```
1157            pub fn set_beacon_api_endpoint<T: std::convert::Into<std::string::String>>(
1158                mut self,
1159                v: T,
1160            ) -> Self {
1161                self.beacon_api_endpoint = v.into();
1162                self
1163            }
1164
1165            /// Sets the value of [beacon_prometheus_metrics_api_endpoint][crate::model::blockchain_node::ethereum_details::EthereumEndpoints::beacon_prometheus_metrics_api_endpoint].
1166            ///
1167            /// # Example
1168            /// ```ignore,no_run
1169            /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::EthereumEndpoints;
1170            /// let x = EthereumEndpoints::new().set_beacon_prometheus_metrics_api_endpoint("example");
1171            /// ```
1172            pub fn set_beacon_prometheus_metrics_api_endpoint<
1173                T: std::convert::Into<std::string::String>,
1174            >(
1175                mut self,
1176                v: T,
1177            ) -> Self {
1178                self.beacon_prometheus_metrics_api_endpoint = v.into();
1179                self
1180            }
1181
1182            /// Sets the value of [execution_client_prometheus_metrics_api_endpoint][crate::model::blockchain_node::ethereum_details::EthereumEndpoints::execution_client_prometheus_metrics_api_endpoint].
1183            ///
1184            /// # Example
1185            /// ```ignore,no_run
1186            /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::EthereumEndpoints;
1187            /// let x = EthereumEndpoints::new().set_execution_client_prometheus_metrics_api_endpoint("example");
1188            /// ```
1189            pub fn set_execution_client_prometheus_metrics_api_endpoint<
1190                T: std::convert::Into<std::string::String>,
1191            >(
1192                mut self,
1193                v: T,
1194            ) -> Self {
1195                self.execution_client_prometheus_metrics_api_endpoint = v.into();
1196                self
1197            }
1198        }
1199
1200        impl wkt::message::Message for EthereumEndpoints {
1201            fn typename() -> &'static str {
1202                "type.googleapis.com/google.cloud.blockchainnodeengine.v1.BlockchainNode.EthereumDetails.EthereumEndpoints"
1203            }
1204        }
1205
1206        /// Configuration for validator-related parameters on the beacon client,
1207        /// and for any GCP-managed validator client.
1208        #[derive(Clone, Default, PartialEq)]
1209        #[non_exhaustive]
1210        pub struct ValidatorConfig {
1211            /// URLs for MEV-relay services to use for block building. When set, a
1212            /// GCP-managed MEV-boost service is configured on the beacon client.
1213            pub mev_relay_urls: std::vec::Vec<std::string::String>,
1214
1215            /// Immutable. When true, deploys a GCP-managed validator client alongside
1216            /// the beacon client.
1217            #[deprecated]
1218            pub managed_validator_client: bool,
1219
1220            /// An Ethereum address which the beacon client will send fee rewards to if
1221            /// no recipient is configured in the validator client.
1222            ///
1223            /// See <https://lighthouse-book.sigmaprime.io/suggested-fee-recipient.html>
1224            /// or <https://docs.prylabs.network/docs/execution-node/fee-recipient> for
1225            /// examples of how this is used.
1226            ///
1227            /// Note that while this is often described as "suggested", as we run the
1228            /// execution node we can trust the execution node, and therefore this is
1229            /// considered enforced.
1230            pub beacon_fee_recipient: std::option::Option<std::string::String>,
1231
1232            pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
1233        }
1234
1235        impl ValidatorConfig {
1236            /// Creates a new default instance.
1237            pub fn new() -> Self {
1238                std::default::Default::default()
1239            }
1240
1241            /// Sets the value of [mev_relay_urls][crate::model::blockchain_node::ethereum_details::ValidatorConfig::mev_relay_urls].
1242            ///
1243            /// # Example
1244            /// ```ignore,no_run
1245            /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::ValidatorConfig;
1246            /// let x = ValidatorConfig::new().set_mev_relay_urls(["a", "b", "c"]);
1247            /// ```
1248            pub fn set_mev_relay_urls<T, V>(mut self, v: T) -> Self
1249            where
1250                T: std::iter::IntoIterator<Item = V>,
1251                V: std::convert::Into<std::string::String>,
1252            {
1253                use std::iter::Iterator;
1254                self.mev_relay_urls = v.into_iter().map(|i| i.into()).collect();
1255                self
1256            }
1257
1258            /// Sets the value of [managed_validator_client][crate::model::blockchain_node::ethereum_details::ValidatorConfig::managed_validator_client].
1259            ///
1260            /// # Example
1261            /// ```ignore,no_run
1262            /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::ValidatorConfig;
1263            /// let x = ValidatorConfig::new().set_managed_validator_client(true);
1264            /// ```
1265            #[deprecated]
1266            pub fn set_managed_validator_client<T: std::convert::Into<bool>>(
1267                mut self,
1268                v: T,
1269            ) -> Self {
1270                self.managed_validator_client = v.into();
1271                self
1272            }
1273
1274            /// Sets the value of [beacon_fee_recipient][crate::model::blockchain_node::ethereum_details::ValidatorConfig::beacon_fee_recipient].
1275            ///
1276            /// # Example
1277            /// ```ignore,no_run
1278            /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::ValidatorConfig;
1279            /// let x = ValidatorConfig::new().set_beacon_fee_recipient("example");
1280            /// ```
1281            pub fn set_beacon_fee_recipient<T>(mut self, v: T) -> Self
1282            where
1283                T: std::convert::Into<std::string::String>,
1284            {
1285                self.beacon_fee_recipient = std::option::Option::Some(v.into());
1286                self
1287            }
1288
1289            /// Sets or clears the value of [beacon_fee_recipient][crate::model::blockchain_node::ethereum_details::ValidatorConfig::beacon_fee_recipient].
1290            ///
1291            /// # Example
1292            /// ```ignore,no_run
1293            /// # use google_cloud_blockchainnodeengine_v1::model::blockchain_node::ethereum_details::ValidatorConfig;
1294            /// let x = ValidatorConfig::new().set_or_clear_beacon_fee_recipient(Some("example"));
1295            /// let x = ValidatorConfig::new().set_or_clear_beacon_fee_recipient(None::<String>);
1296            /// ```
1297            pub fn set_or_clear_beacon_fee_recipient<T>(mut self, v: std::option::Option<T>) -> Self
1298            where
1299                T: std::convert::Into<std::string::String>,
1300            {
1301                self.beacon_fee_recipient = v.map(|x| x.into());
1302                self
1303            }
1304        }
1305
1306        impl wkt::message::Message for ValidatorConfig {
1307            fn typename() -> &'static str {
1308                "type.googleapis.com/google.cloud.blockchainnodeengine.v1.BlockchainNode.EthereumDetails.ValidatorConfig"
1309            }
1310        }
1311
1312        /// The Ethereum environment being accessed.
1313        ///
1314        /// See [Networks](https://ethereum.org/en/developers/docs/networks)
1315        /// for more details.
1316        ///
1317        /// # Working with unknown values
1318        ///
1319        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1320        /// additional enum variants at any time. Adding new variants is not considered
1321        /// a breaking change. Applications should write their code in anticipation of:
1322        ///
1323        /// - New values appearing in future releases of the client library, **and**
1324        /// - New values received dynamically, without application changes.
1325        ///
1326        /// Please consult the [Working with enums] section in the user guide for some
1327        /// guidelines.
1328        ///
1329        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1330        #[derive(Clone, Debug, PartialEq)]
1331        #[non_exhaustive]
1332        pub enum Network {
1333            /// The network has not been specified, but should be.
1334            Unspecified,
1335            /// The Ethereum Mainnet.
1336            Mainnet,
1337            /// Deprecated: The Ethereum Testnet based on Goerli protocol. Please
1338            /// use another test network.
1339            #[deprecated]
1340            TestnetGoerliPrater,
1341            /// The Ethereum Testnet based on Sepolia/Bepolia protocol.
1342            /// See <https://github.com/eth-clients/sepolia>.
1343            TestnetSepolia,
1344            /// The Ethereum Testnet based on Holesky specification.
1345            /// See <https://github.com/eth-clients/holesky>.
1346            TestnetHolesky,
1347            /// If set, the enum was initialized with an unknown value.
1348            ///
1349            /// Applications can examine the value using [Network::value] or
1350            /// [Network::name].
1351            UnknownValue(network::UnknownValue),
1352        }
1353
1354        #[doc(hidden)]
1355        pub mod network {
1356            #[allow(unused_imports)]
1357            use super::*;
1358            #[derive(Clone, Debug, PartialEq)]
1359            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1360        }
1361
1362        impl Network {
1363            /// Gets the enum value.
1364            ///
1365            /// Returns `None` if the enum contains an unknown value deserialized from
1366            /// the string representation of enums.
1367            pub fn value(&self) -> std::option::Option<i32> {
1368                match self {
1369                    Self::Unspecified => std::option::Option::Some(0),
1370                    Self::Mainnet => std::option::Option::Some(1),
1371                    Self::TestnetGoerliPrater => std::option::Option::Some(2),
1372                    Self::TestnetSepolia => std::option::Option::Some(3),
1373                    Self::TestnetHolesky => std::option::Option::Some(4),
1374                    Self::UnknownValue(u) => u.0.value(),
1375                }
1376            }
1377
1378            /// Gets the enum value as a string.
1379            ///
1380            /// Returns `None` if the enum contains an unknown value deserialized from
1381            /// the integer representation of enums.
1382            pub fn name(&self) -> std::option::Option<&str> {
1383                match self {
1384                    Self::Unspecified => std::option::Option::Some("NETWORK_UNSPECIFIED"),
1385                    Self::Mainnet => std::option::Option::Some("MAINNET"),
1386                    Self::TestnetGoerliPrater => std::option::Option::Some("TESTNET_GOERLI_PRATER"),
1387                    Self::TestnetSepolia => std::option::Option::Some("TESTNET_SEPOLIA"),
1388                    Self::TestnetHolesky => std::option::Option::Some("TESTNET_HOLESKY"),
1389                    Self::UnknownValue(u) => u.0.name(),
1390                }
1391            }
1392        }
1393
1394        impl std::default::Default for Network {
1395            fn default() -> Self {
1396                use std::convert::From;
1397                Self::from(0)
1398            }
1399        }
1400
1401        impl std::fmt::Display for Network {
1402            fn fmt(
1403                &self,
1404                f: &mut std::fmt::Formatter<'_>,
1405            ) -> std::result::Result<(), std::fmt::Error> {
1406                wkt::internal::display_enum(f, self.name(), self.value())
1407            }
1408        }
1409
1410        impl std::convert::From<i32> for Network {
1411            fn from(value: i32) -> Self {
1412                match value {
1413                    0 => Self::Unspecified,
1414                    1 => Self::Mainnet,
1415                    2 => Self::TestnetGoerliPrater,
1416                    3 => Self::TestnetSepolia,
1417                    4 => Self::TestnetHolesky,
1418                    _ => Self::UnknownValue(network::UnknownValue(
1419                        wkt::internal::UnknownEnumValue::Integer(value),
1420                    )),
1421                }
1422            }
1423        }
1424
1425        impl std::convert::From<&str> for Network {
1426            fn from(value: &str) -> Self {
1427                use std::string::ToString;
1428                match value {
1429                    "NETWORK_UNSPECIFIED" => Self::Unspecified,
1430                    "MAINNET" => Self::Mainnet,
1431                    "TESTNET_GOERLI_PRATER" => Self::TestnetGoerliPrater,
1432                    "TESTNET_SEPOLIA" => Self::TestnetSepolia,
1433                    "TESTNET_HOLESKY" => Self::TestnetHolesky,
1434                    _ => Self::UnknownValue(network::UnknownValue(
1435                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1436                    )),
1437                }
1438            }
1439        }
1440
1441        impl serde::ser::Serialize for Network {
1442            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1443            where
1444                S: serde::Serializer,
1445            {
1446                match self {
1447                    Self::Unspecified => serializer.serialize_i32(0),
1448                    Self::Mainnet => serializer.serialize_i32(1),
1449                    Self::TestnetGoerliPrater => serializer.serialize_i32(2),
1450                    Self::TestnetSepolia => serializer.serialize_i32(3),
1451                    Self::TestnetHolesky => serializer.serialize_i32(4),
1452                    Self::UnknownValue(u) => u.0.serialize(serializer),
1453                }
1454            }
1455        }
1456
1457        impl<'de> serde::de::Deserialize<'de> for Network {
1458            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1459            where
1460                D: serde::Deserializer<'de>,
1461            {
1462                deserializer.deserialize_any(wkt::internal::EnumVisitor::<Network>::new(
1463                    ".google.cloud.blockchainnodeengine.v1.BlockchainNode.EthereumDetails.Network",
1464                ))
1465            }
1466        }
1467
1468        /// The type of Ethereum node.
1469        ///
1470        /// See
1471        /// [Node
1472        /// Types](https://ethereum.org/en/developers/docs/nodes-and-clients/#node-types)
1473        /// for more details.
1474        ///
1475        /// # Working with unknown values
1476        ///
1477        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1478        /// additional enum variants at any time. Adding new variants is not considered
1479        /// a breaking change. Applications should write their code in anticipation of:
1480        ///
1481        /// - New values appearing in future releases of the client library, **and**
1482        /// - New values received dynamically, without application changes.
1483        ///
1484        /// Please consult the [Working with enums] section in the user guide for some
1485        /// guidelines.
1486        ///
1487        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1488        #[derive(Clone, Debug, PartialEq)]
1489        #[non_exhaustive]
1490        pub enum NodeType {
1491            /// Node type has not been specified, but should be.
1492            Unspecified,
1493            /// An Ethereum node that only downloads Ethereum block headers.
1494            Light,
1495            /// Keeps a complete copy of the blockchain data, and contributes to the
1496            /// network by receiving, validating, and forwarding transactions.
1497            Full,
1498            /// Holds the same data as full node as well as all of the blockchain's
1499            /// history state data dating back to the Genesis Block.
1500            Archive,
1501            /// If set, the enum was initialized with an unknown value.
1502            ///
1503            /// Applications can examine the value using [NodeType::value] or
1504            /// [NodeType::name].
1505            UnknownValue(node_type::UnknownValue),
1506        }
1507
1508        #[doc(hidden)]
1509        pub mod node_type {
1510            #[allow(unused_imports)]
1511            use super::*;
1512            #[derive(Clone, Debug, PartialEq)]
1513            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1514        }
1515
1516        impl NodeType {
1517            /// Gets the enum value.
1518            ///
1519            /// Returns `None` if the enum contains an unknown value deserialized from
1520            /// the string representation of enums.
1521            pub fn value(&self) -> std::option::Option<i32> {
1522                match self {
1523                    Self::Unspecified => std::option::Option::Some(0),
1524                    Self::Light => std::option::Option::Some(1),
1525                    Self::Full => std::option::Option::Some(2),
1526                    Self::Archive => std::option::Option::Some(3),
1527                    Self::UnknownValue(u) => u.0.value(),
1528                }
1529            }
1530
1531            /// Gets the enum value as a string.
1532            ///
1533            /// Returns `None` if the enum contains an unknown value deserialized from
1534            /// the integer representation of enums.
1535            pub fn name(&self) -> std::option::Option<&str> {
1536                match self {
1537                    Self::Unspecified => std::option::Option::Some("NODE_TYPE_UNSPECIFIED"),
1538                    Self::Light => std::option::Option::Some("LIGHT"),
1539                    Self::Full => std::option::Option::Some("FULL"),
1540                    Self::Archive => std::option::Option::Some("ARCHIVE"),
1541                    Self::UnknownValue(u) => u.0.name(),
1542                }
1543            }
1544        }
1545
1546        impl std::default::Default for NodeType {
1547            fn default() -> Self {
1548                use std::convert::From;
1549                Self::from(0)
1550            }
1551        }
1552
1553        impl std::fmt::Display for NodeType {
1554            fn fmt(
1555                &self,
1556                f: &mut std::fmt::Formatter<'_>,
1557            ) -> std::result::Result<(), std::fmt::Error> {
1558                wkt::internal::display_enum(f, self.name(), self.value())
1559            }
1560        }
1561
1562        impl std::convert::From<i32> for NodeType {
1563            fn from(value: i32) -> Self {
1564                match value {
1565                    0 => Self::Unspecified,
1566                    1 => Self::Light,
1567                    2 => Self::Full,
1568                    3 => Self::Archive,
1569                    _ => Self::UnknownValue(node_type::UnknownValue(
1570                        wkt::internal::UnknownEnumValue::Integer(value),
1571                    )),
1572                }
1573            }
1574        }
1575
1576        impl std::convert::From<&str> for NodeType {
1577            fn from(value: &str) -> Self {
1578                use std::string::ToString;
1579                match value {
1580                    "NODE_TYPE_UNSPECIFIED" => Self::Unspecified,
1581                    "LIGHT" => Self::Light,
1582                    "FULL" => Self::Full,
1583                    "ARCHIVE" => Self::Archive,
1584                    _ => Self::UnknownValue(node_type::UnknownValue(
1585                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1586                    )),
1587                }
1588            }
1589        }
1590
1591        impl serde::ser::Serialize for NodeType {
1592            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1593            where
1594                S: serde::Serializer,
1595            {
1596                match self {
1597                    Self::Unspecified => serializer.serialize_i32(0),
1598                    Self::Light => serializer.serialize_i32(1),
1599                    Self::Full => serializer.serialize_i32(2),
1600                    Self::Archive => serializer.serialize_i32(3),
1601                    Self::UnknownValue(u) => u.0.serialize(serializer),
1602                }
1603            }
1604        }
1605
1606        impl<'de> serde::de::Deserialize<'de> for NodeType {
1607            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1608            where
1609                D: serde::Deserializer<'de>,
1610            {
1611                deserializer.deserialize_any(wkt::internal::EnumVisitor::<NodeType>::new(
1612                    ".google.cloud.blockchainnodeengine.v1.BlockchainNode.EthereumDetails.NodeType",
1613                ))
1614            }
1615        }
1616
1617        /// The execution client (i.e., Execution Engine or EL client) listens to new
1618        /// transactions broadcast in the network, executes them in EVM, and holds
1619        /// the latest state and database of all current Ethereum data.
1620        ///
1621        /// See
1622        /// [What are nodes and
1623        /// clients?](https://ethereum.org/en/developers/docs/nodes-and-clients/#what-are-nodes-and-clients)
1624        /// for more details.
1625        ///
1626        /// # Working with unknown values
1627        ///
1628        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1629        /// additional enum variants at any time. Adding new variants is not considered
1630        /// a breaking change. Applications should write their code in anticipation of:
1631        ///
1632        /// - New values appearing in future releases of the client library, **and**
1633        /// - New values received dynamically, without application changes.
1634        ///
1635        /// Please consult the [Working with enums] section in the user guide for some
1636        /// guidelines.
1637        ///
1638        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1639        #[derive(Clone, Debug, PartialEq)]
1640        #[non_exhaustive]
1641        pub enum ExecutionClient {
1642            /// Execution client has not been specified, but should be.
1643            Unspecified,
1644            /// Official Go implementation of the Ethereum protocol.
1645            /// See [go-ethereum](https://geth.ethereum.org/) for details.
1646            Geth,
1647            /// An implementation of Ethereum (execution client), on the efficiency
1648            /// frontier, written in Go. See [Erigon on
1649            /// GitHub](https://github.com/ledgerwatch/erigon) for details.
1650            Erigon,
1651            /// If set, the enum was initialized with an unknown value.
1652            ///
1653            /// Applications can examine the value using [ExecutionClient::value] or
1654            /// [ExecutionClient::name].
1655            UnknownValue(execution_client::UnknownValue),
1656        }
1657
1658        #[doc(hidden)]
1659        pub mod execution_client {
1660            #[allow(unused_imports)]
1661            use super::*;
1662            #[derive(Clone, Debug, PartialEq)]
1663            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1664        }
1665
1666        impl ExecutionClient {
1667            /// Gets the enum value.
1668            ///
1669            /// Returns `None` if the enum contains an unknown value deserialized from
1670            /// the string representation of enums.
1671            pub fn value(&self) -> std::option::Option<i32> {
1672                match self {
1673                    Self::Unspecified => std::option::Option::Some(0),
1674                    Self::Geth => std::option::Option::Some(1),
1675                    Self::Erigon => std::option::Option::Some(2),
1676                    Self::UnknownValue(u) => u.0.value(),
1677                }
1678            }
1679
1680            /// Gets the enum value as a string.
1681            ///
1682            /// Returns `None` if the enum contains an unknown value deserialized from
1683            /// the integer representation of enums.
1684            pub fn name(&self) -> std::option::Option<&str> {
1685                match self {
1686                    Self::Unspecified => std::option::Option::Some("EXECUTION_CLIENT_UNSPECIFIED"),
1687                    Self::Geth => std::option::Option::Some("GETH"),
1688                    Self::Erigon => std::option::Option::Some("ERIGON"),
1689                    Self::UnknownValue(u) => u.0.name(),
1690                }
1691            }
1692        }
1693
1694        impl std::default::Default for ExecutionClient {
1695            fn default() -> Self {
1696                use std::convert::From;
1697                Self::from(0)
1698            }
1699        }
1700
1701        impl std::fmt::Display for ExecutionClient {
1702            fn fmt(
1703                &self,
1704                f: &mut std::fmt::Formatter<'_>,
1705            ) -> std::result::Result<(), std::fmt::Error> {
1706                wkt::internal::display_enum(f, self.name(), self.value())
1707            }
1708        }
1709
1710        impl std::convert::From<i32> for ExecutionClient {
1711            fn from(value: i32) -> Self {
1712                match value {
1713                    0 => Self::Unspecified,
1714                    1 => Self::Geth,
1715                    2 => Self::Erigon,
1716                    _ => Self::UnknownValue(execution_client::UnknownValue(
1717                        wkt::internal::UnknownEnumValue::Integer(value),
1718                    )),
1719                }
1720            }
1721        }
1722
1723        impl std::convert::From<&str> for ExecutionClient {
1724            fn from(value: &str) -> Self {
1725                use std::string::ToString;
1726                match value {
1727                    "EXECUTION_CLIENT_UNSPECIFIED" => Self::Unspecified,
1728                    "GETH" => Self::Geth,
1729                    "ERIGON" => Self::Erigon,
1730                    _ => Self::UnknownValue(execution_client::UnknownValue(
1731                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1732                    )),
1733                }
1734            }
1735        }
1736
1737        impl serde::ser::Serialize for ExecutionClient {
1738            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1739            where
1740                S: serde::Serializer,
1741            {
1742                match self {
1743                    Self::Unspecified => serializer.serialize_i32(0),
1744                    Self::Geth => serializer.serialize_i32(1),
1745                    Self::Erigon => serializer.serialize_i32(2),
1746                    Self::UnknownValue(u) => u.0.serialize(serializer),
1747                }
1748            }
1749        }
1750
1751        impl<'de> serde::de::Deserialize<'de> for ExecutionClient {
1752            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1753            where
1754                D: serde::Deserializer<'de>,
1755            {
1756                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ExecutionClient>::new(
1757                    ".google.cloud.blockchainnodeengine.v1.BlockchainNode.EthereumDetails.ExecutionClient"))
1758            }
1759        }
1760
1761        /// The consensus client (also referred to as beacon node or CL client)
1762        /// implements the proof-of-stake consensus algorithm, which enables the
1763        /// network to achieve agreement based on validated data from the
1764        /// execution client.
1765        ///
1766        /// See
1767        /// [What are nodes and
1768        /// clients?](https://ethereum.org/en/developers/docs/nodes-and-clients/#what-are-nodes-and-clients)
1769        /// for more details.
1770        ///
1771        /// # Working with unknown values
1772        ///
1773        /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1774        /// additional enum variants at any time. Adding new variants is not considered
1775        /// a breaking change. Applications should write their code in anticipation of:
1776        ///
1777        /// - New values appearing in future releases of the client library, **and**
1778        /// - New values received dynamically, without application changes.
1779        ///
1780        /// Please consult the [Working with enums] section in the user guide for some
1781        /// guidelines.
1782        ///
1783        /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1784        #[derive(Clone, Debug, PartialEq)]
1785        #[non_exhaustive]
1786        pub enum ConsensusClient {
1787            /// Consensus client has not been specified, but should be.
1788            Unspecified,
1789            /// Consensus client implementation written in Rust, maintained by Sigma
1790            /// Prime. See [Lighthouse - Sigma
1791            /// Prime](https://lighthouse.sigmaprime.io/) for details.
1792            Lighthouse,
1793            /// If set, the enum was initialized with an unknown value.
1794            ///
1795            /// Applications can examine the value using [ConsensusClient::value] or
1796            /// [ConsensusClient::name].
1797            UnknownValue(consensus_client::UnknownValue),
1798        }
1799
1800        #[doc(hidden)]
1801        pub mod consensus_client {
1802            #[allow(unused_imports)]
1803            use super::*;
1804            #[derive(Clone, Debug, PartialEq)]
1805            pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1806        }
1807
1808        impl ConsensusClient {
1809            /// Gets the enum value.
1810            ///
1811            /// Returns `None` if the enum contains an unknown value deserialized from
1812            /// the string representation of enums.
1813            pub fn value(&self) -> std::option::Option<i32> {
1814                match self {
1815                    Self::Unspecified => std::option::Option::Some(0),
1816                    Self::Lighthouse => std::option::Option::Some(1),
1817                    Self::UnknownValue(u) => u.0.value(),
1818                }
1819            }
1820
1821            /// Gets the enum value as a string.
1822            ///
1823            /// Returns `None` if the enum contains an unknown value deserialized from
1824            /// the integer representation of enums.
1825            pub fn name(&self) -> std::option::Option<&str> {
1826                match self {
1827                    Self::Unspecified => std::option::Option::Some("CONSENSUS_CLIENT_UNSPECIFIED"),
1828                    Self::Lighthouse => std::option::Option::Some("LIGHTHOUSE"),
1829                    Self::UnknownValue(u) => u.0.name(),
1830                }
1831            }
1832        }
1833
1834        impl std::default::Default for ConsensusClient {
1835            fn default() -> Self {
1836                use std::convert::From;
1837                Self::from(0)
1838            }
1839        }
1840
1841        impl std::fmt::Display for ConsensusClient {
1842            fn fmt(
1843                &self,
1844                f: &mut std::fmt::Formatter<'_>,
1845            ) -> std::result::Result<(), std::fmt::Error> {
1846                wkt::internal::display_enum(f, self.name(), self.value())
1847            }
1848        }
1849
1850        impl std::convert::From<i32> for ConsensusClient {
1851            fn from(value: i32) -> Self {
1852                match value {
1853                    0 => Self::Unspecified,
1854                    1 => Self::Lighthouse,
1855                    _ => Self::UnknownValue(consensus_client::UnknownValue(
1856                        wkt::internal::UnknownEnumValue::Integer(value),
1857                    )),
1858                }
1859            }
1860        }
1861
1862        impl std::convert::From<&str> for ConsensusClient {
1863            fn from(value: &str) -> Self {
1864                use std::string::ToString;
1865                match value {
1866                    "CONSENSUS_CLIENT_UNSPECIFIED" => Self::Unspecified,
1867                    "LIGHTHOUSE" => Self::Lighthouse,
1868                    _ => Self::UnknownValue(consensus_client::UnknownValue(
1869                        wkt::internal::UnknownEnumValue::String(value.to_string()),
1870                    )),
1871                }
1872            }
1873        }
1874
1875        impl serde::ser::Serialize for ConsensusClient {
1876            fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
1877            where
1878                S: serde::Serializer,
1879            {
1880                match self {
1881                    Self::Unspecified => serializer.serialize_i32(0),
1882                    Self::Lighthouse => serializer.serialize_i32(1),
1883                    Self::UnknownValue(u) => u.0.serialize(serializer),
1884                }
1885            }
1886        }
1887
1888        impl<'de> serde::de::Deserialize<'de> for ConsensusClient {
1889            fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
1890            where
1891                D: serde::Deserializer<'de>,
1892            {
1893                deserializer.deserialize_any(wkt::internal::EnumVisitor::<ConsensusClient>::new(
1894                    ".google.cloud.blockchainnodeengine.v1.BlockchainNode.EthereumDetails.ConsensusClient"))
1895            }
1896        }
1897
1898        /// Options for the execution client.
1899        #[derive(Clone, Debug, PartialEq)]
1900        #[non_exhaustive]
1901        pub enum ExecutionClientDetails {
1902            /// Details for the Geth execution client.
1903            GethDetails(
1904                std::boxed::Box<crate::model::blockchain_node::ethereum_details::GethDetails>,
1905            ),
1906        }
1907    }
1908
1909    /// The blockchain type of the node.
1910    ///
1911    /// # Working with unknown values
1912    ///
1913    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
1914    /// additional enum variants at any time. Adding new variants is not considered
1915    /// a breaking change. Applications should write their code in anticipation of:
1916    ///
1917    /// - New values appearing in future releases of the client library, **and**
1918    /// - New values received dynamically, without application changes.
1919    ///
1920    /// Please consult the [Working with enums] section in the user guide for some
1921    /// guidelines.
1922    ///
1923    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
1924    #[derive(Clone, Debug, PartialEq)]
1925    #[non_exhaustive]
1926    pub enum BlockchainType {
1927        /// Blockchain type has not been specified, but should be.
1928        Unspecified,
1929        /// The blockchain type is Ethereum.
1930        Ethereum,
1931        /// If set, the enum was initialized with an unknown value.
1932        ///
1933        /// Applications can examine the value using [BlockchainType::value] or
1934        /// [BlockchainType::name].
1935        UnknownValue(blockchain_type::UnknownValue),
1936    }
1937
1938    #[doc(hidden)]
1939    pub mod blockchain_type {
1940        #[allow(unused_imports)]
1941        use super::*;
1942        #[derive(Clone, Debug, PartialEq)]
1943        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
1944    }
1945
1946    impl BlockchainType {
1947        /// Gets the enum value.
1948        ///
1949        /// Returns `None` if the enum contains an unknown value deserialized from
1950        /// the string representation of enums.
1951        pub fn value(&self) -> std::option::Option<i32> {
1952            match self {
1953                Self::Unspecified => std::option::Option::Some(0),
1954                Self::Ethereum => std::option::Option::Some(1),
1955                Self::UnknownValue(u) => u.0.value(),
1956            }
1957        }
1958
1959        /// Gets the enum value as a string.
1960        ///
1961        /// Returns `None` if the enum contains an unknown value deserialized from
1962        /// the integer representation of enums.
1963        pub fn name(&self) -> std::option::Option<&str> {
1964            match self {
1965                Self::Unspecified => std::option::Option::Some("BLOCKCHAIN_TYPE_UNSPECIFIED"),
1966                Self::Ethereum => std::option::Option::Some("ETHEREUM"),
1967                Self::UnknownValue(u) => u.0.name(),
1968            }
1969        }
1970    }
1971
1972    impl std::default::Default for BlockchainType {
1973        fn default() -> Self {
1974            use std::convert::From;
1975            Self::from(0)
1976        }
1977    }
1978
1979    impl std::fmt::Display for BlockchainType {
1980        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
1981            wkt::internal::display_enum(f, self.name(), self.value())
1982        }
1983    }
1984
1985    impl std::convert::From<i32> for BlockchainType {
1986        fn from(value: i32) -> Self {
1987            match value {
1988                0 => Self::Unspecified,
1989                1 => Self::Ethereum,
1990                _ => Self::UnknownValue(blockchain_type::UnknownValue(
1991                    wkt::internal::UnknownEnumValue::Integer(value),
1992                )),
1993            }
1994        }
1995    }
1996
1997    impl std::convert::From<&str> for BlockchainType {
1998        fn from(value: &str) -> Self {
1999            use std::string::ToString;
2000            match value {
2001                "BLOCKCHAIN_TYPE_UNSPECIFIED" => Self::Unspecified,
2002                "ETHEREUM" => Self::Ethereum,
2003                _ => Self::UnknownValue(blockchain_type::UnknownValue(
2004                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2005                )),
2006            }
2007        }
2008    }
2009
2010    impl serde::ser::Serialize for BlockchainType {
2011        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2012        where
2013            S: serde::Serializer,
2014        {
2015            match self {
2016                Self::Unspecified => serializer.serialize_i32(0),
2017                Self::Ethereum => serializer.serialize_i32(1),
2018                Self::UnknownValue(u) => u.0.serialize(serializer),
2019            }
2020        }
2021    }
2022
2023    impl<'de> serde::de::Deserialize<'de> for BlockchainType {
2024        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2025        where
2026            D: serde::Deserializer<'de>,
2027        {
2028            deserializer.deserialize_any(wkt::internal::EnumVisitor::<BlockchainType>::new(
2029                ".google.cloud.blockchainnodeengine.v1.BlockchainNode.BlockchainType",
2030            ))
2031        }
2032    }
2033
2034    /// All possible states for a given blockchain node.
2035    ///
2036    /// # Working with unknown values
2037    ///
2038    /// This enum is defined as `#[non_exhaustive]` because Google Cloud may add
2039    /// additional enum variants at any time. Adding new variants is not considered
2040    /// a breaking change. Applications should write their code in anticipation of:
2041    ///
2042    /// - New values appearing in future releases of the client library, **and**
2043    /// - New values received dynamically, without application changes.
2044    ///
2045    /// Please consult the [Working with enums] section in the user guide for some
2046    /// guidelines.
2047    ///
2048    /// [Working with enums]: https://googleapis.github.io/google-cloud-rust/working_with_enums.html
2049    #[derive(Clone, Debug, PartialEq)]
2050    #[non_exhaustive]
2051    pub enum State {
2052        /// The state has not been specified.
2053        Unspecified,
2054        /// The node has been requested and is in the process of being created.
2055        Creating,
2056        /// The existing node is undergoing deletion, but is not yet finished.
2057        Deleting,
2058        /// The node is running and ready for use.
2059        Running,
2060        /// The node is in an unexpected or errored state.
2061        Error,
2062        /// The node is currently being updated.
2063        Updating,
2064        /// The node is currently being repaired.
2065        Repairing,
2066        /// The node is currently being reconciled.
2067        Reconciling,
2068        /// The node is syncing, which is the process by which it obtains the latest
2069        /// block and current global state.
2070        Syncing,
2071        /// If set, the enum was initialized with an unknown value.
2072        ///
2073        /// Applications can examine the value using [State::value] or
2074        /// [State::name].
2075        UnknownValue(state::UnknownValue),
2076    }
2077
2078    #[doc(hidden)]
2079    pub mod state {
2080        #[allow(unused_imports)]
2081        use super::*;
2082        #[derive(Clone, Debug, PartialEq)]
2083        pub struct UnknownValue(pub(crate) wkt::internal::UnknownEnumValue);
2084    }
2085
2086    impl State {
2087        /// Gets the enum value.
2088        ///
2089        /// Returns `None` if the enum contains an unknown value deserialized from
2090        /// the string representation of enums.
2091        pub fn value(&self) -> std::option::Option<i32> {
2092            match self {
2093                Self::Unspecified => std::option::Option::Some(0),
2094                Self::Creating => std::option::Option::Some(1),
2095                Self::Deleting => std::option::Option::Some(2),
2096                Self::Running => std::option::Option::Some(4),
2097                Self::Error => std::option::Option::Some(5),
2098                Self::Updating => std::option::Option::Some(6),
2099                Self::Repairing => std::option::Option::Some(7),
2100                Self::Reconciling => std::option::Option::Some(8),
2101                Self::Syncing => std::option::Option::Some(9),
2102                Self::UnknownValue(u) => u.0.value(),
2103            }
2104        }
2105
2106        /// Gets the enum value as a string.
2107        ///
2108        /// Returns `None` if the enum contains an unknown value deserialized from
2109        /// the integer representation of enums.
2110        pub fn name(&self) -> std::option::Option<&str> {
2111            match self {
2112                Self::Unspecified => std::option::Option::Some("STATE_UNSPECIFIED"),
2113                Self::Creating => std::option::Option::Some("CREATING"),
2114                Self::Deleting => std::option::Option::Some("DELETING"),
2115                Self::Running => std::option::Option::Some("RUNNING"),
2116                Self::Error => std::option::Option::Some("ERROR"),
2117                Self::Updating => std::option::Option::Some("UPDATING"),
2118                Self::Repairing => std::option::Option::Some("REPAIRING"),
2119                Self::Reconciling => std::option::Option::Some("RECONCILING"),
2120                Self::Syncing => std::option::Option::Some("SYNCING"),
2121                Self::UnknownValue(u) => u.0.name(),
2122            }
2123        }
2124    }
2125
2126    impl std::default::Default for State {
2127        fn default() -> Self {
2128            use std::convert::From;
2129            Self::from(0)
2130        }
2131    }
2132
2133    impl std::fmt::Display for State {
2134        fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
2135            wkt::internal::display_enum(f, self.name(), self.value())
2136        }
2137    }
2138
2139    impl std::convert::From<i32> for State {
2140        fn from(value: i32) -> Self {
2141            match value {
2142                0 => Self::Unspecified,
2143                1 => Self::Creating,
2144                2 => Self::Deleting,
2145                4 => Self::Running,
2146                5 => Self::Error,
2147                6 => Self::Updating,
2148                7 => Self::Repairing,
2149                8 => Self::Reconciling,
2150                9 => Self::Syncing,
2151                _ => Self::UnknownValue(state::UnknownValue(
2152                    wkt::internal::UnknownEnumValue::Integer(value),
2153                )),
2154            }
2155        }
2156    }
2157
2158    impl std::convert::From<&str> for State {
2159        fn from(value: &str) -> Self {
2160            use std::string::ToString;
2161            match value {
2162                "STATE_UNSPECIFIED" => Self::Unspecified,
2163                "CREATING" => Self::Creating,
2164                "DELETING" => Self::Deleting,
2165                "RUNNING" => Self::Running,
2166                "ERROR" => Self::Error,
2167                "UPDATING" => Self::Updating,
2168                "REPAIRING" => Self::Repairing,
2169                "RECONCILING" => Self::Reconciling,
2170                "SYNCING" => Self::Syncing,
2171                _ => Self::UnknownValue(state::UnknownValue(
2172                    wkt::internal::UnknownEnumValue::String(value.to_string()),
2173                )),
2174            }
2175        }
2176    }
2177
2178    impl serde::ser::Serialize for State {
2179        fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error>
2180        where
2181            S: serde::Serializer,
2182        {
2183            match self {
2184                Self::Unspecified => serializer.serialize_i32(0),
2185                Self::Creating => serializer.serialize_i32(1),
2186                Self::Deleting => serializer.serialize_i32(2),
2187                Self::Running => serializer.serialize_i32(4),
2188                Self::Error => serializer.serialize_i32(5),
2189                Self::Updating => serializer.serialize_i32(6),
2190                Self::Repairing => serializer.serialize_i32(7),
2191                Self::Reconciling => serializer.serialize_i32(8),
2192                Self::Syncing => serializer.serialize_i32(9),
2193                Self::UnknownValue(u) => u.0.serialize(serializer),
2194            }
2195        }
2196    }
2197
2198    impl<'de> serde::de::Deserialize<'de> for State {
2199        fn deserialize<D>(deserializer: D) -> std::result::Result<Self, D::Error>
2200        where
2201            D: serde::Deserializer<'de>,
2202        {
2203            deserializer.deserialize_any(wkt::internal::EnumVisitor::<State>::new(
2204                ".google.cloud.blockchainnodeengine.v1.BlockchainNode.State",
2205            ))
2206        }
2207    }
2208
2209    /// Information that is specific to a particular blockchain type.
2210    #[derive(Clone, Debug, PartialEq)]
2211    #[non_exhaustive]
2212    pub enum BlockchainTypeDetails {
2213        /// Ethereum-specific blockchain node details.
2214        EthereumDetails(std::boxed::Box<crate::model::blockchain_node::EthereumDetails>),
2215    }
2216}
2217
2218/// Message for requesting list of blockchain nodes.
2219#[derive(Clone, Default, PartialEq)]
2220#[non_exhaustive]
2221pub struct ListBlockchainNodesRequest {
2222    /// Required. Parent value for `ListNodesRequest`.
2223    pub parent: std::string::String,
2224
2225    /// Requested page size. Server may return fewer items than requested.
2226    /// If unspecified, server will pick an appropriate default.
2227    pub page_size: i32,
2228
2229    /// A token identifying a page of results the server should return.
2230    pub page_token: std::string::String,
2231
2232    /// Filtering results.
2233    pub filter: std::string::String,
2234
2235    /// Hint for how to order the results.
2236    pub order_by: std::string::String,
2237
2238    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2239}
2240
2241impl ListBlockchainNodesRequest {
2242    /// Creates a new default instance.
2243    pub fn new() -> Self {
2244        std::default::Default::default()
2245    }
2246
2247    /// Sets the value of [parent][crate::model::ListBlockchainNodesRequest::parent].
2248    ///
2249    /// # Example
2250    /// ```ignore,no_run
2251    /// # use google_cloud_blockchainnodeengine_v1::model::ListBlockchainNodesRequest;
2252    /// # let project_id = "project_id";
2253    /// # let location_id = "location_id";
2254    /// let x = ListBlockchainNodesRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
2255    /// ```
2256    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2257        self.parent = v.into();
2258        self
2259    }
2260
2261    /// Sets the value of [page_size][crate::model::ListBlockchainNodesRequest::page_size].
2262    ///
2263    /// # Example
2264    /// ```ignore,no_run
2265    /// # use google_cloud_blockchainnodeengine_v1::model::ListBlockchainNodesRequest;
2266    /// let x = ListBlockchainNodesRequest::new().set_page_size(42);
2267    /// ```
2268    pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
2269        self.page_size = v.into();
2270        self
2271    }
2272
2273    /// Sets the value of [page_token][crate::model::ListBlockchainNodesRequest::page_token].
2274    ///
2275    /// # Example
2276    /// ```ignore,no_run
2277    /// # use google_cloud_blockchainnodeengine_v1::model::ListBlockchainNodesRequest;
2278    /// let x = ListBlockchainNodesRequest::new().set_page_token("example");
2279    /// ```
2280    pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2281        self.page_token = v.into();
2282        self
2283    }
2284
2285    /// Sets the value of [filter][crate::model::ListBlockchainNodesRequest::filter].
2286    ///
2287    /// # Example
2288    /// ```ignore,no_run
2289    /// # use google_cloud_blockchainnodeengine_v1::model::ListBlockchainNodesRequest;
2290    /// let x = ListBlockchainNodesRequest::new().set_filter("example");
2291    /// ```
2292    pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2293        self.filter = v.into();
2294        self
2295    }
2296
2297    /// Sets the value of [order_by][crate::model::ListBlockchainNodesRequest::order_by].
2298    ///
2299    /// # Example
2300    /// ```ignore,no_run
2301    /// # use google_cloud_blockchainnodeengine_v1::model::ListBlockchainNodesRequest;
2302    /// let x = ListBlockchainNodesRequest::new().set_order_by("example");
2303    /// ```
2304    pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2305        self.order_by = v.into();
2306        self
2307    }
2308}
2309
2310impl wkt::message::Message for ListBlockchainNodesRequest {
2311    fn typename() -> &'static str {
2312        "type.googleapis.com/google.cloud.blockchainnodeengine.v1.ListBlockchainNodesRequest"
2313    }
2314}
2315
2316/// Message for response to listing blockchain nodes.
2317#[derive(Clone, Default, PartialEq)]
2318#[non_exhaustive]
2319pub struct ListBlockchainNodesResponse {
2320    /// The list of nodes
2321    pub blockchain_nodes: std::vec::Vec<crate::model::BlockchainNode>,
2322
2323    /// A token identifying a page of results the server should return.
2324    pub next_page_token: std::string::String,
2325
2326    /// Locations that could not be reached.
2327    pub unreachable: std::vec::Vec<std::string::String>,
2328
2329    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2330}
2331
2332impl ListBlockchainNodesResponse {
2333    /// Creates a new default instance.
2334    pub fn new() -> Self {
2335        std::default::Default::default()
2336    }
2337
2338    /// Sets the value of [blockchain_nodes][crate::model::ListBlockchainNodesResponse::blockchain_nodes].
2339    ///
2340    /// # Example
2341    /// ```ignore,no_run
2342    /// # use google_cloud_blockchainnodeengine_v1::model::ListBlockchainNodesResponse;
2343    /// use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
2344    /// let x = ListBlockchainNodesResponse::new()
2345    ///     .set_blockchain_nodes([
2346    ///         BlockchainNode::default()/* use setters */,
2347    ///         BlockchainNode::default()/* use (different) setters */,
2348    ///     ]);
2349    /// ```
2350    pub fn set_blockchain_nodes<T, V>(mut self, v: T) -> Self
2351    where
2352        T: std::iter::IntoIterator<Item = V>,
2353        V: std::convert::Into<crate::model::BlockchainNode>,
2354    {
2355        use std::iter::Iterator;
2356        self.blockchain_nodes = v.into_iter().map(|i| i.into()).collect();
2357        self
2358    }
2359
2360    /// Sets the value of [next_page_token][crate::model::ListBlockchainNodesResponse::next_page_token].
2361    ///
2362    /// # Example
2363    /// ```ignore,no_run
2364    /// # use google_cloud_blockchainnodeengine_v1::model::ListBlockchainNodesResponse;
2365    /// let x = ListBlockchainNodesResponse::new().set_next_page_token("example");
2366    /// ```
2367    pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2368        self.next_page_token = v.into();
2369        self
2370    }
2371
2372    /// Sets the value of [unreachable][crate::model::ListBlockchainNodesResponse::unreachable].
2373    ///
2374    /// # Example
2375    /// ```ignore,no_run
2376    /// # use google_cloud_blockchainnodeengine_v1::model::ListBlockchainNodesResponse;
2377    /// let x = ListBlockchainNodesResponse::new().set_unreachable(["a", "b", "c"]);
2378    /// ```
2379    pub fn set_unreachable<T, V>(mut self, v: T) -> Self
2380    where
2381        T: std::iter::IntoIterator<Item = V>,
2382        V: std::convert::Into<std::string::String>,
2383    {
2384        use std::iter::Iterator;
2385        self.unreachable = v.into_iter().map(|i| i.into()).collect();
2386        self
2387    }
2388}
2389
2390impl wkt::message::Message for ListBlockchainNodesResponse {
2391    fn typename() -> &'static str {
2392        "type.googleapis.com/google.cloud.blockchainnodeengine.v1.ListBlockchainNodesResponse"
2393    }
2394}
2395
2396#[doc(hidden)]
2397impl google_cloud_gax::paginator::internal::PageableResponse for ListBlockchainNodesResponse {
2398    type PageItem = crate::model::BlockchainNode;
2399
2400    fn items(self) -> std::vec::Vec<Self::PageItem> {
2401        self.blockchain_nodes
2402    }
2403
2404    fn next_page_token(&self) -> std::string::String {
2405        use std::clone::Clone;
2406        self.next_page_token.clone()
2407    }
2408}
2409
2410/// Message for getting a blockchain node.
2411#[derive(Clone, Default, PartialEq)]
2412#[non_exhaustive]
2413pub struct GetBlockchainNodeRequest {
2414    /// Required. The fully qualified name of the blockchain node to fetch.
2415    /// e.g. `projects/my-project/locations/us-central1/blockchainNodes/my-node`.
2416    pub name: std::string::String,
2417
2418    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2419}
2420
2421impl GetBlockchainNodeRequest {
2422    /// Creates a new default instance.
2423    pub fn new() -> Self {
2424        std::default::Default::default()
2425    }
2426
2427    /// Sets the value of [name][crate::model::GetBlockchainNodeRequest::name].
2428    ///
2429    /// # Example
2430    /// ```ignore,no_run
2431    /// # use google_cloud_blockchainnodeengine_v1::model::GetBlockchainNodeRequest;
2432    /// # let project_id = "project_id";
2433    /// # let location_id = "location_id";
2434    /// # let blockchain_node_id = "blockchain_node_id";
2435    /// let x = GetBlockchainNodeRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/blockchainNodes/{blockchain_node_id}"));
2436    /// ```
2437    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2438        self.name = v.into();
2439        self
2440    }
2441}
2442
2443impl wkt::message::Message for GetBlockchainNodeRequest {
2444    fn typename() -> &'static str {
2445        "type.googleapis.com/google.cloud.blockchainnodeengine.v1.GetBlockchainNodeRequest"
2446    }
2447}
2448
2449/// Message for creating a blockchain node.
2450#[derive(Clone, Default, PartialEq)]
2451#[non_exhaustive]
2452pub struct CreateBlockchainNodeRequest {
2453    /// Required. Value for parent.
2454    pub parent: std::string::String,
2455
2456    /// Required. ID of the requesting object.
2457    pub blockchain_node_id: std::string::String,
2458
2459    /// Required. The resource being created.
2460    pub blockchain_node: std::option::Option<crate::model::BlockchainNode>,
2461
2462    /// Optional. An optional request ID to identify requests. Specify a unique
2463    /// request ID so that if you must retry your request, the server will know to
2464    /// ignore the request if it has already been completed. The server will
2465    /// guarantee that for at least 60 minutes since the first request.
2466    ///
2467    /// For example, consider a situation where you make an initial request and
2468    /// the request times out. If you make the request again with the same request
2469    /// ID, the server can check if original operation with the same request ID
2470    /// was received, and if so, will ignore the second request. This prevents
2471    /// clients from accidentally creating duplicate commitments.
2472    ///
2473    /// The request ID must be a valid UUID with the exception that zero UUID is
2474    /// not supported (00000000-0000-0000-0000-000000000000).
2475    pub request_id: std::string::String,
2476
2477    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2478}
2479
2480impl CreateBlockchainNodeRequest {
2481    /// Creates a new default instance.
2482    pub fn new() -> Self {
2483        std::default::Default::default()
2484    }
2485
2486    /// Sets the value of [parent][crate::model::CreateBlockchainNodeRequest::parent].
2487    ///
2488    /// # Example
2489    /// ```ignore,no_run
2490    /// # use google_cloud_blockchainnodeengine_v1::model::CreateBlockchainNodeRequest;
2491    /// # let project_id = "project_id";
2492    /// # let location_id = "location_id";
2493    /// let x = CreateBlockchainNodeRequest::new().set_parent(format!("projects/{project_id}/locations/{location_id}"));
2494    /// ```
2495    pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2496        self.parent = v.into();
2497        self
2498    }
2499
2500    /// Sets the value of [blockchain_node_id][crate::model::CreateBlockchainNodeRequest::blockchain_node_id].
2501    ///
2502    /// # Example
2503    /// ```ignore,no_run
2504    /// # use google_cloud_blockchainnodeengine_v1::model::CreateBlockchainNodeRequest;
2505    /// let x = CreateBlockchainNodeRequest::new().set_blockchain_node_id("example");
2506    /// ```
2507    pub fn set_blockchain_node_id<T: std::convert::Into<std::string::String>>(
2508        mut self,
2509        v: T,
2510    ) -> Self {
2511        self.blockchain_node_id = v.into();
2512        self
2513    }
2514
2515    /// Sets the value of [blockchain_node][crate::model::CreateBlockchainNodeRequest::blockchain_node].
2516    ///
2517    /// # Example
2518    /// ```ignore,no_run
2519    /// # use google_cloud_blockchainnodeengine_v1::model::CreateBlockchainNodeRequest;
2520    /// use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
2521    /// let x = CreateBlockchainNodeRequest::new().set_blockchain_node(BlockchainNode::default()/* use setters */);
2522    /// ```
2523    pub fn set_blockchain_node<T>(mut self, v: T) -> Self
2524    where
2525        T: std::convert::Into<crate::model::BlockchainNode>,
2526    {
2527        self.blockchain_node = std::option::Option::Some(v.into());
2528        self
2529    }
2530
2531    /// Sets or clears the value of [blockchain_node][crate::model::CreateBlockchainNodeRequest::blockchain_node].
2532    ///
2533    /// # Example
2534    /// ```ignore,no_run
2535    /// # use google_cloud_blockchainnodeengine_v1::model::CreateBlockchainNodeRequest;
2536    /// use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
2537    /// let x = CreateBlockchainNodeRequest::new().set_or_clear_blockchain_node(Some(BlockchainNode::default()/* use setters */));
2538    /// let x = CreateBlockchainNodeRequest::new().set_or_clear_blockchain_node(None::<BlockchainNode>);
2539    /// ```
2540    pub fn set_or_clear_blockchain_node<T>(mut self, v: std::option::Option<T>) -> Self
2541    where
2542        T: std::convert::Into<crate::model::BlockchainNode>,
2543    {
2544        self.blockchain_node = v.map(|x| x.into());
2545        self
2546    }
2547
2548    /// Sets the value of [request_id][crate::model::CreateBlockchainNodeRequest::request_id].
2549    ///
2550    /// # Example
2551    /// ```ignore,no_run
2552    /// # use google_cloud_blockchainnodeengine_v1::model::CreateBlockchainNodeRequest;
2553    /// let x = CreateBlockchainNodeRequest::new().set_request_id("example");
2554    /// ```
2555    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2556        self.request_id = v.into();
2557        self
2558    }
2559}
2560
2561impl wkt::message::Message for CreateBlockchainNodeRequest {
2562    fn typename() -> &'static str {
2563        "type.googleapis.com/google.cloud.blockchainnodeengine.v1.CreateBlockchainNodeRequest"
2564    }
2565}
2566
2567/// Message for updating a blockchain node.
2568#[derive(Clone, Default, PartialEq)]
2569#[non_exhaustive]
2570pub struct UpdateBlockchainNodeRequest {
2571    /// Required. Field mask is used to specify the fields to be overwritten in the
2572    /// Blockchain node resource by the update.
2573    /// The fields specified in the `update_mask` are relative to the resource, not
2574    /// the full request. A field will be overwritten if it is in the mask. If the
2575    /// user does not provide a mask then all fields will be overwritten.
2576    pub update_mask: std::option::Option<wkt::FieldMask>,
2577
2578    /// Required. The resource being updated.
2579    pub blockchain_node: std::option::Option<crate::model::BlockchainNode>,
2580
2581    /// Optional. An optional request ID to identify requests. Specify a unique
2582    /// request ID so that if you must retry your request, the server will know to
2583    /// ignore the request if it has already been completed. The server will
2584    /// guarantee that for at least 60 minutes since the first request.
2585    ///
2586    /// For example, consider a situation where you make an initial request and
2587    /// the request times out. If you make the request again with the same request
2588    /// ID, the server can check if original operation with the same request ID
2589    /// was received, and if so, will ignore the second request. This prevents
2590    /// clients from accidentally creating duplicate commitments.
2591    ///
2592    /// The request ID must be a valid UUID with the exception that zero UUID is
2593    /// not supported (00000000-0000-0000-0000-000000000000).
2594    pub request_id: std::string::String,
2595
2596    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2597}
2598
2599impl UpdateBlockchainNodeRequest {
2600    /// Creates a new default instance.
2601    pub fn new() -> Self {
2602        std::default::Default::default()
2603    }
2604
2605    /// Sets the value of [update_mask][crate::model::UpdateBlockchainNodeRequest::update_mask].
2606    ///
2607    /// # Example
2608    /// ```ignore,no_run
2609    /// # use google_cloud_blockchainnodeengine_v1::model::UpdateBlockchainNodeRequest;
2610    /// use wkt::FieldMask;
2611    /// let x = UpdateBlockchainNodeRequest::new().set_update_mask(FieldMask::default()/* use setters */);
2612    /// ```
2613    pub fn set_update_mask<T>(mut self, v: T) -> Self
2614    where
2615        T: std::convert::Into<wkt::FieldMask>,
2616    {
2617        self.update_mask = std::option::Option::Some(v.into());
2618        self
2619    }
2620
2621    /// Sets or clears the value of [update_mask][crate::model::UpdateBlockchainNodeRequest::update_mask].
2622    ///
2623    /// # Example
2624    /// ```ignore,no_run
2625    /// # use google_cloud_blockchainnodeengine_v1::model::UpdateBlockchainNodeRequest;
2626    /// use wkt::FieldMask;
2627    /// let x = UpdateBlockchainNodeRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
2628    /// let x = UpdateBlockchainNodeRequest::new().set_or_clear_update_mask(None::<FieldMask>);
2629    /// ```
2630    pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2631    where
2632        T: std::convert::Into<wkt::FieldMask>,
2633    {
2634        self.update_mask = v.map(|x| x.into());
2635        self
2636    }
2637
2638    /// Sets the value of [blockchain_node][crate::model::UpdateBlockchainNodeRequest::blockchain_node].
2639    ///
2640    /// # Example
2641    /// ```ignore,no_run
2642    /// # use google_cloud_blockchainnodeengine_v1::model::UpdateBlockchainNodeRequest;
2643    /// use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
2644    /// let x = UpdateBlockchainNodeRequest::new().set_blockchain_node(BlockchainNode::default()/* use setters */);
2645    /// ```
2646    pub fn set_blockchain_node<T>(mut self, v: T) -> Self
2647    where
2648        T: std::convert::Into<crate::model::BlockchainNode>,
2649    {
2650        self.blockchain_node = std::option::Option::Some(v.into());
2651        self
2652    }
2653
2654    /// Sets or clears the value of [blockchain_node][crate::model::UpdateBlockchainNodeRequest::blockchain_node].
2655    ///
2656    /// # Example
2657    /// ```ignore,no_run
2658    /// # use google_cloud_blockchainnodeengine_v1::model::UpdateBlockchainNodeRequest;
2659    /// use google_cloud_blockchainnodeengine_v1::model::BlockchainNode;
2660    /// let x = UpdateBlockchainNodeRequest::new().set_or_clear_blockchain_node(Some(BlockchainNode::default()/* use setters */));
2661    /// let x = UpdateBlockchainNodeRequest::new().set_or_clear_blockchain_node(None::<BlockchainNode>);
2662    /// ```
2663    pub fn set_or_clear_blockchain_node<T>(mut self, v: std::option::Option<T>) -> Self
2664    where
2665        T: std::convert::Into<crate::model::BlockchainNode>,
2666    {
2667        self.blockchain_node = v.map(|x| x.into());
2668        self
2669    }
2670
2671    /// Sets the value of [request_id][crate::model::UpdateBlockchainNodeRequest::request_id].
2672    ///
2673    /// # Example
2674    /// ```ignore,no_run
2675    /// # use google_cloud_blockchainnodeengine_v1::model::UpdateBlockchainNodeRequest;
2676    /// let x = UpdateBlockchainNodeRequest::new().set_request_id("example");
2677    /// ```
2678    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2679        self.request_id = v.into();
2680        self
2681    }
2682}
2683
2684impl wkt::message::Message for UpdateBlockchainNodeRequest {
2685    fn typename() -> &'static str {
2686        "type.googleapis.com/google.cloud.blockchainnodeengine.v1.UpdateBlockchainNodeRequest"
2687    }
2688}
2689
2690/// Message for deleting a blockchain node.
2691#[derive(Clone, Default, PartialEq)]
2692#[non_exhaustive]
2693pub struct DeleteBlockchainNodeRequest {
2694    /// Required. The fully qualified name of the blockchain node to delete.
2695    /// e.g. `projects/my-project/locations/us-central1/blockchainNodes/my-node`.
2696    pub name: std::string::String,
2697
2698    /// Optional. An optional request ID to identify requests. Specify a unique
2699    /// request ID so that if you must retry your request, the server will know to
2700    /// ignore the request if it has already been completed. The server will
2701    /// guarantee that for at least 60 minutes after the first request.
2702    ///
2703    /// For example, consider a situation where you make an initial request and
2704    /// the request times out. If you make the request again with the same request
2705    /// ID, the server can check if original operation with the same request ID
2706    /// was received, and if so, will ignore the second request. This prevents
2707    /// clients from accidentally creating duplicate commitments.
2708    ///
2709    /// The request ID must be a valid UUID with the exception that zero UUID is
2710    /// not supported (00000000-0000-0000-0000-000000000000).
2711    pub request_id: std::string::String,
2712
2713    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2714}
2715
2716impl DeleteBlockchainNodeRequest {
2717    /// Creates a new default instance.
2718    pub fn new() -> Self {
2719        std::default::Default::default()
2720    }
2721
2722    /// Sets the value of [name][crate::model::DeleteBlockchainNodeRequest::name].
2723    ///
2724    /// # Example
2725    /// ```ignore,no_run
2726    /// # use google_cloud_blockchainnodeengine_v1::model::DeleteBlockchainNodeRequest;
2727    /// # let project_id = "project_id";
2728    /// # let location_id = "location_id";
2729    /// # let blockchain_node_id = "blockchain_node_id";
2730    /// let x = DeleteBlockchainNodeRequest::new().set_name(format!("projects/{project_id}/locations/{location_id}/blockchainNodes/{blockchain_node_id}"));
2731    /// ```
2732    pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2733        self.name = v.into();
2734        self
2735    }
2736
2737    /// Sets the value of [request_id][crate::model::DeleteBlockchainNodeRequest::request_id].
2738    ///
2739    /// # Example
2740    /// ```ignore,no_run
2741    /// # use google_cloud_blockchainnodeengine_v1::model::DeleteBlockchainNodeRequest;
2742    /// let x = DeleteBlockchainNodeRequest::new().set_request_id("example");
2743    /// ```
2744    pub fn set_request_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2745        self.request_id = v.into();
2746        self
2747    }
2748}
2749
2750impl wkt::message::Message for DeleteBlockchainNodeRequest {
2751    fn typename() -> &'static str {
2752        "type.googleapis.com/google.cloud.blockchainnodeengine.v1.DeleteBlockchainNodeRequest"
2753    }
2754}
2755
2756/// Represents the metadata of the long-running operation.
2757#[derive(Clone, Default, PartialEq)]
2758#[non_exhaustive]
2759pub struct OperationMetadata {
2760    /// Output only. The time the operation was created.
2761    pub create_time: std::option::Option<wkt::Timestamp>,
2762
2763    /// Output only. The time the operation finished running.
2764    pub end_time: std::option::Option<wkt::Timestamp>,
2765
2766    /// Output only. Server-defined resource path for the target of the operation.
2767    pub target: std::string::String,
2768
2769    /// Output only. Name of the verb executed by the operation.
2770    pub verb: std::string::String,
2771
2772    /// Output only. Human-readable status of the operation, if any.
2773    pub status_message: std::string::String,
2774
2775    /// Output only. Identifies whether the user has requested cancellation
2776    /// of the operation. Operations that have been cancelled successfully
2777    /// have `[Operation.error][]` value with a
2778    /// `[google.rpc.Status.code][google.rpc.Status.code]` of `1`, corresponding to
2779    /// `Code.CANCELLED`.
2780    pub requested_cancellation: bool,
2781
2782    /// Output only. API version used to start the operation.
2783    pub api_version: std::string::String,
2784
2785    pub(crate) _unknown_fields: serde_json::Map<std::string::String, serde_json::Value>,
2786}
2787
2788impl OperationMetadata {
2789    /// Creates a new default instance.
2790    pub fn new() -> Self {
2791        std::default::Default::default()
2792    }
2793
2794    /// Sets the value of [create_time][crate::model::OperationMetadata::create_time].
2795    ///
2796    /// # Example
2797    /// ```ignore,no_run
2798    /// # use google_cloud_blockchainnodeengine_v1::model::OperationMetadata;
2799    /// use wkt::Timestamp;
2800    /// let x = OperationMetadata::new().set_create_time(Timestamp::default()/* use setters */);
2801    /// ```
2802    pub fn set_create_time<T>(mut self, v: T) -> Self
2803    where
2804        T: std::convert::Into<wkt::Timestamp>,
2805    {
2806        self.create_time = std::option::Option::Some(v.into());
2807        self
2808    }
2809
2810    /// Sets or clears the value of [create_time][crate::model::OperationMetadata::create_time].
2811    ///
2812    /// # Example
2813    /// ```ignore,no_run
2814    /// # use google_cloud_blockchainnodeengine_v1::model::OperationMetadata;
2815    /// use wkt::Timestamp;
2816    /// let x = OperationMetadata::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
2817    /// let x = OperationMetadata::new().set_or_clear_create_time(None::<Timestamp>);
2818    /// ```
2819    pub fn set_or_clear_create_time<T>(mut self, v: std::option::Option<T>) -> Self
2820    where
2821        T: std::convert::Into<wkt::Timestamp>,
2822    {
2823        self.create_time = v.map(|x| x.into());
2824        self
2825    }
2826
2827    /// Sets the value of [end_time][crate::model::OperationMetadata::end_time].
2828    ///
2829    /// # Example
2830    /// ```ignore,no_run
2831    /// # use google_cloud_blockchainnodeengine_v1::model::OperationMetadata;
2832    /// use wkt::Timestamp;
2833    /// let x = OperationMetadata::new().set_end_time(Timestamp::default()/* use setters */);
2834    /// ```
2835    pub fn set_end_time<T>(mut self, v: T) -> Self
2836    where
2837        T: std::convert::Into<wkt::Timestamp>,
2838    {
2839        self.end_time = std::option::Option::Some(v.into());
2840        self
2841    }
2842
2843    /// Sets or clears the value of [end_time][crate::model::OperationMetadata::end_time].
2844    ///
2845    /// # Example
2846    /// ```ignore,no_run
2847    /// # use google_cloud_blockchainnodeengine_v1::model::OperationMetadata;
2848    /// use wkt::Timestamp;
2849    /// let x = OperationMetadata::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
2850    /// let x = OperationMetadata::new().set_or_clear_end_time(None::<Timestamp>);
2851    /// ```
2852    pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
2853    where
2854        T: std::convert::Into<wkt::Timestamp>,
2855    {
2856        self.end_time = v.map(|x| x.into());
2857        self
2858    }
2859
2860    /// Sets the value of [target][crate::model::OperationMetadata::target].
2861    ///
2862    /// # Example
2863    /// ```ignore,no_run
2864    /// # use google_cloud_blockchainnodeengine_v1::model::OperationMetadata;
2865    /// let x = OperationMetadata::new().set_target("example");
2866    /// ```
2867    pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2868        self.target = v.into();
2869        self
2870    }
2871
2872    /// Sets the value of [verb][crate::model::OperationMetadata::verb].
2873    ///
2874    /// # Example
2875    /// ```ignore,no_run
2876    /// # use google_cloud_blockchainnodeengine_v1::model::OperationMetadata;
2877    /// let x = OperationMetadata::new().set_verb("example");
2878    /// ```
2879    pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2880        self.verb = v.into();
2881        self
2882    }
2883
2884    /// Sets the value of [status_message][crate::model::OperationMetadata::status_message].
2885    ///
2886    /// # Example
2887    /// ```ignore,no_run
2888    /// # use google_cloud_blockchainnodeengine_v1::model::OperationMetadata;
2889    /// let x = OperationMetadata::new().set_status_message("example");
2890    /// ```
2891    pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2892        self.status_message = v.into();
2893        self
2894    }
2895
2896    /// Sets the value of [requested_cancellation][crate::model::OperationMetadata::requested_cancellation].
2897    ///
2898    /// # Example
2899    /// ```ignore,no_run
2900    /// # use google_cloud_blockchainnodeengine_v1::model::OperationMetadata;
2901    /// let x = OperationMetadata::new().set_requested_cancellation(true);
2902    /// ```
2903    pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
2904        self.requested_cancellation = v.into();
2905        self
2906    }
2907
2908    /// Sets the value of [api_version][crate::model::OperationMetadata::api_version].
2909    ///
2910    /// # Example
2911    /// ```ignore,no_run
2912    /// # use google_cloud_blockchainnodeengine_v1::model::OperationMetadata;
2913    /// let x = OperationMetadata::new().set_api_version("example");
2914    /// ```
2915    pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
2916        self.api_version = v.into();
2917        self
2918    }
2919}
2920
2921impl wkt::message::Message for OperationMetadata {
2922    fn typename() -> &'static str {
2923        "type.googleapis.com/google.cloud.blockchainnodeengine.v1.OperationMetadata"
2924    }
2925}