googleapis_tonic_google_cloud_blockchainnodeengine_v1/vec_u8_hash_map/google.cloud.blockchainnodeengine.v1.rs
1// This file is @generated by prost-build.
2/// A representation of a blockchain node.
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct BlockchainNode {
5 /// Output only. The fully qualified name of the blockchain node.
6 /// e.g. `projects/my-project/locations/us-central1/blockchainNodes/my-node`.
7 #[prost(string, tag = "1")]
8 pub name: ::prost::alloc::string::String,
9 /// Output only. The timestamp at which the blockchain node was first created.
10 #[prost(message, optional, tag = "2")]
11 pub create_time: ::core::option::Option<::prost_types::Timestamp>,
12 /// Output only. The timestamp at which the blockchain node was last updated.
13 #[prost(message, optional, tag = "3")]
14 pub update_time: ::core::option::Option<::prost_types::Timestamp>,
15 /// User-provided key-value pairs.
16 #[prost(map = "string, string", tag = "4")]
17 pub labels: ::std::collections::HashMap<
18 ::prost::alloc::string::String,
19 ::prost::alloc::string::String,
20 >,
21 /// Immutable. The blockchain type of the node.
22 #[prost(enumeration = "blockchain_node::BlockchainType", optional, tag = "5")]
23 pub blockchain_type: ::core::option::Option<i32>,
24 /// Output only. The connection information used to interact with a blockchain
25 /// node.
26 #[prost(message, optional, tag = "6")]
27 pub connection_info: ::core::option::Option<blockchain_node::ConnectionInfo>,
28 /// Output only. A status representing the state of the node.
29 #[prost(enumeration = "blockchain_node::State", tag = "8")]
30 pub state: i32,
31 /// Optional. When true, the node is only accessible via Private Service
32 /// Connect; no public endpoints are exposed. Otherwise, the node is only
33 /// accessible via public endpoints. Warning: These nodes are deprecated,
34 /// please use public endpoints instead.
35 #[deprecated]
36 #[prost(bool, tag = "12")]
37 pub private_service_connect_enabled: bool,
38 /// Information that is specific to a particular blockchain type.
39 #[prost(oneof = "blockchain_node::BlockchainTypeDetails", tags = "7")]
40 pub blockchain_type_details: ::core::option::Option<
41 blockchain_node::BlockchainTypeDetails,
42 >,
43}
44/// Nested message and enum types in `BlockchainNode`.
45pub mod blockchain_node {
46 /// The connection information through which to interact with a blockchain
47 /// node.
48 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
49 pub struct ConnectionInfo {
50 /// Output only. The endpoint information through which to interact with a
51 /// blockchain node.
52 #[prost(message, optional, tag = "2")]
53 pub endpoint_info: ::core::option::Option<connection_info::EndpointInfo>,
54 /// Output only. A service attachment that exposes a node, and has the
55 /// following format:
56 /// projects/{project}/regions/{region}/serviceAttachments/{service_attachment_name}
57 #[prost(string, tag = "3")]
58 pub service_attachment: ::prost::alloc::string::String,
59 }
60 /// Nested message and enum types in `ConnectionInfo`.
61 pub mod connection_info {
62 /// Contains endpoint information through which to interact with a blockchain
63 /// node.
64 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
65 pub struct EndpointInfo {
66 /// Output only. The assigned URL for the node JSON-RPC API endpoint.
67 #[prost(string, tag = "1")]
68 pub json_rpc_api_endpoint: ::prost::alloc::string::String,
69 /// Output only. The assigned URL for the node WebSockets API endpoint.
70 #[prost(string, tag = "2")]
71 pub websockets_api_endpoint: ::prost::alloc::string::String,
72 }
73 }
74 /// Ethereum-specific blockchain node details.
75 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
76 pub struct EthereumDetails {
77 /// Immutable. The Ethereum environment being accessed.
78 #[prost(enumeration = "ethereum_details::Network", optional, tag = "1")]
79 pub network: ::core::option::Option<i32>,
80 /// Immutable. The type of Ethereum node.
81 #[prost(enumeration = "ethereum_details::NodeType", optional, tag = "2")]
82 pub node_type: ::core::option::Option<i32>,
83 /// Immutable. The execution client
84 #[prost(enumeration = "ethereum_details::ExecutionClient", optional, tag = "3")]
85 pub execution_client: ::core::option::Option<i32>,
86 /// Immutable. The consensus client.
87 #[prost(enumeration = "ethereum_details::ConsensusClient", optional, tag = "4")]
88 pub consensus_client: ::core::option::Option<i32>,
89 /// Immutable. Enables JSON-RPC access to functions in the `admin` namespace.
90 /// Defaults to `false`.
91 #[prost(bool, optional, tag = "5")]
92 pub api_enable_admin: ::core::option::Option<bool>,
93 /// Immutable. Enables JSON-RPC access to functions in the `debug` namespace.
94 /// Defaults to `false`.
95 #[prost(bool, optional, tag = "6")]
96 pub api_enable_debug: ::core::option::Option<bool>,
97 /// Output only. Ethereum-specific endpoint information.
98 #[prost(message, optional, tag = "7")]
99 pub additional_endpoints: ::core::option::Option<
100 ethereum_details::EthereumEndpoints,
101 >,
102 /// Configuration for validator-related parameters on the beacon client,
103 /// and for any GCP-managed validator client.
104 #[prost(message, optional, tag = "10")]
105 pub validator_config: ::core::option::Option<ethereum_details::ValidatorConfig>,
106 /// Options for the execution client.
107 #[prost(oneof = "ethereum_details::ExecutionClientDetails", tags = "8")]
108 pub execution_client_details: ::core::option::Option<
109 ethereum_details::ExecutionClientDetails,
110 >,
111 }
112 /// Nested message and enum types in `EthereumDetails`.
113 pub mod ethereum_details {
114 /// Options for the Geth execution client.
115 ///
116 /// See [Command-line
117 /// Options](<https://geth.ethereum.org/docs/fundamentals/command-line-options>)
118 /// for more details.
119 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
120 pub struct GethDetails {
121 /// Immutable. Blockchain garbage collection mode.
122 #[prost(
123 enumeration = "geth_details::GarbageCollectionMode",
124 optional,
125 tag = "1"
126 )]
127 pub garbage_collection_mode: ::core::option::Option<i32>,
128 }
129 /// Nested message and enum types in `GethDetails`.
130 pub mod geth_details {
131 /// Blockchain garbage collection modes. Only applicable when `NodeType` is
132 /// `FULL` or `ARCHIVE`.
133 #[derive(
134 Clone,
135 Copy,
136 Debug,
137 PartialEq,
138 Eq,
139 Hash,
140 PartialOrd,
141 Ord,
142 ::prost::Enumeration
143 )]
144 #[repr(i32)]
145 pub enum GarbageCollectionMode {
146 /// The garbage collection has not been specified.
147 Unspecified = 0,
148 /// Configures Geth's garbage collection so that older data not needed
149 /// for a full node is deleted. This is the default mode when creating a
150 /// full node.
151 Full = 1,
152 /// Configures Geth's garbage collection so that old data is never
153 /// deleted. This is the default mode when creating an archive node. This
154 /// value can also be chosen when creating a full node in order to create
155 /// a partial/recent archive node. See
156 /// [Sync modes](<https://geth.ethereum.org/docs/fundamentals/sync-modes>)
157 /// for more details.
158 Archive = 2,
159 }
160 impl GarbageCollectionMode {
161 /// String value of the enum field names used in the ProtoBuf definition.
162 ///
163 /// The values are not transformed in any way and thus are considered stable
164 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
165 pub fn as_str_name(&self) -> &'static str {
166 match self {
167 Self::Unspecified => "GARBAGE_COLLECTION_MODE_UNSPECIFIED",
168 Self::Full => "FULL",
169 Self::Archive => "ARCHIVE",
170 }
171 }
172 /// Creates an enum from field names used in the ProtoBuf definition.
173 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
174 match value {
175 "GARBAGE_COLLECTION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
176 "FULL" => Some(Self::Full),
177 "ARCHIVE" => Some(Self::Archive),
178 _ => None,
179 }
180 }
181 }
182 }
183 /// Contains endpoint information specific to Ethereum nodes.
184 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
185 pub struct EthereumEndpoints {
186 /// Output only. The assigned URL for the node's Beacon API endpoint.
187 #[prost(string, tag = "1")]
188 pub beacon_api_endpoint: ::prost::alloc::string::String,
189 /// Output only. The assigned URL for the node's Beacon Prometheus metrics
190 /// endpoint. See [Prometheus
191 /// Metrics](<https://lighthouse-book.sigmaprime.io/advanced_metrics.html>)
192 /// for more details.
193 #[prost(string, tag = "2")]
194 pub beacon_prometheus_metrics_api_endpoint: ::prost::alloc::string::String,
195 /// Output only. The assigned URL for the node's execution client's
196 /// Prometheus metrics endpoint.
197 #[prost(string, tag = "3")]
198 pub execution_client_prometheus_metrics_api_endpoint: ::prost::alloc::string::String,
199 }
200 /// Configuration for validator-related parameters on the beacon client,
201 /// and for any GCP-managed validator client.
202 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
203 pub struct ValidatorConfig {
204 /// URLs for MEV-relay services to use for block building. When set, a
205 /// GCP-managed MEV-boost service is configured on the beacon client.
206 #[prost(string, repeated, tag = "1")]
207 pub mev_relay_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
208 /// Immutable. When true, deploys a GCP-managed validator client alongside
209 /// the beacon client.
210 #[deprecated]
211 #[prost(bool, tag = "2")]
212 pub managed_validator_client: bool,
213 /// An Ethereum address which the beacon client will send fee rewards to if
214 /// no recipient is configured in the validator client.
215 ///
216 /// See <https://lighthouse-book.sigmaprime.io/suggested-fee-recipient.html>
217 /// or <https://docs.prylabs.network/docs/execution-node/fee-recipient> for
218 /// examples of how this is used.
219 ///
220 /// Note that while this is often described as "suggested", as we run the
221 /// execution node we can trust the execution node, and therefore this is
222 /// considered enforced.
223 #[prost(string, optional, tag = "3")]
224 pub beacon_fee_recipient: ::core::option::Option<
225 ::prost::alloc::string::String,
226 >,
227 }
228 /// The Ethereum environment being accessed.
229 ///
230 /// See [Networks](<https://ethereum.org/en/developers/docs/networks>)
231 /// for more details.
232 #[derive(
233 Clone,
234 Copy,
235 Debug,
236 PartialEq,
237 Eq,
238 Hash,
239 PartialOrd,
240 Ord,
241 ::prost::Enumeration
242 )]
243 #[repr(i32)]
244 pub enum Network {
245 /// The network has not been specified, but should be.
246 Unspecified = 0,
247 /// The Ethereum Mainnet.
248 Mainnet = 1,
249 /// Deprecated: The Ethereum Testnet based on Goerli protocol. Please
250 /// use another test network.
251 #[deprecated]
252 TestnetGoerliPrater = 2,
253 /// The Ethereum Testnet based on Sepolia/Bepolia protocol.
254 /// See <https://github.com/eth-clients/sepolia.>
255 TestnetSepolia = 3,
256 /// The Ethereum Testnet based on Holesky specification.
257 /// See <https://github.com/eth-clients/holesky.>
258 TestnetHolesky = 4,
259 }
260 impl Network {
261 /// String value of the enum field names used in the ProtoBuf definition.
262 ///
263 /// The values are not transformed in any way and thus are considered stable
264 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
265 pub fn as_str_name(&self) -> &'static str {
266 match self {
267 Self::Unspecified => "NETWORK_UNSPECIFIED",
268 Self::Mainnet => "MAINNET",
269 #[allow(deprecated)]
270 Self::TestnetGoerliPrater => "TESTNET_GOERLI_PRATER",
271 Self::TestnetSepolia => "TESTNET_SEPOLIA",
272 Self::TestnetHolesky => "TESTNET_HOLESKY",
273 }
274 }
275 /// Creates an enum from field names used in the ProtoBuf definition.
276 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
277 match value {
278 "NETWORK_UNSPECIFIED" => Some(Self::Unspecified),
279 "MAINNET" => Some(Self::Mainnet),
280 "TESTNET_GOERLI_PRATER" => {
281 Some(#[allow(deprecated)] Self::TestnetGoerliPrater)
282 }
283 "TESTNET_SEPOLIA" => Some(Self::TestnetSepolia),
284 "TESTNET_HOLESKY" => Some(Self::TestnetHolesky),
285 _ => None,
286 }
287 }
288 }
289 /// The type of Ethereum node.
290 ///
291 /// See
292 /// [Node
293 /// Types](<https://ethereum.org/en/developers/docs/nodes-and-clients/#node-types>)
294 /// for more details.
295 #[derive(
296 Clone,
297 Copy,
298 Debug,
299 PartialEq,
300 Eq,
301 Hash,
302 PartialOrd,
303 Ord,
304 ::prost::Enumeration
305 )]
306 #[repr(i32)]
307 pub enum NodeType {
308 /// Node type has not been specified, but should be.
309 Unspecified = 0,
310 /// An Ethereum node that only downloads Ethereum block headers.
311 Light = 1,
312 /// Keeps a complete copy of the blockchain data, and contributes to the
313 /// network by receiving, validating, and forwarding transactions.
314 Full = 2,
315 /// Holds the same data as full node as well as all of the blockchain's
316 /// history state data dating back to the Genesis Block.
317 Archive = 3,
318 }
319 impl NodeType {
320 /// String value of the enum field names used in the ProtoBuf definition.
321 ///
322 /// The values are not transformed in any way and thus are considered stable
323 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
324 pub fn as_str_name(&self) -> &'static str {
325 match self {
326 Self::Unspecified => "NODE_TYPE_UNSPECIFIED",
327 Self::Light => "LIGHT",
328 Self::Full => "FULL",
329 Self::Archive => "ARCHIVE",
330 }
331 }
332 /// Creates an enum from field names used in the ProtoBuf definition.
333 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
334 match value {
335 "NODE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
336 "LIGHT" => Some(Self::Light),
337 "FULL" => Some(Self::Full),
338 "ARCHIVE" => Some(Self::Archive),
339 _ => None,
340 }
341 }
342 }
343 /// The execution client (i.e., Execution Engine or EL client) listens to new
344 /// transactions broadcast in the network, executes them in EVM, and holds
345 /// the latest state and database of all current Ethereum data.
346 ///
347 /// See
348 /// [What are nodes and
349 /// clients?](<https://ethereum.org/en/developers/docs/nodes-and-clients/#what-are-nodes-and-clients>)
350 /// for more details.
351 #[derive(
352 Clone,
353 Copy,
354 Debug,
355 PartialEq,
356 Eq,
357 Hash,
358 PartialOrd,
359 Ord,
360 ::prost::Enumeration
361 )]
362 #[repr(i32)]
363 pub enum ExecutionClient {
364 /// Execution client has not been specified, but should be.
365 Unspecified = 0,
366 /// Official Go implementation of the Ethereum protocol.
367 /// See [go-ethereum](<https://geth.ethereum.org/>) for details.
368 Geth = 1,
369 /// An implementation of Ethereum (execution client), on the efficiency
370 /// frontier, written in Go. See [Erigon on
371 /// GitHub](<https://github.com/ledgerwatch/erigon>) for details.
372 Erigon = 2,
373 }
374 impl ExecutionClient {
375 /// String value of the enum field names used in the ProtoBuf definition.
376 ///
377 /// The values are not transformed in any way and thus are considered stable
378 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
379 pub fn as_str_name(&self) -> &'static str {
380 match self {
381 Self::Unspecified => "EXECUTION_CLIENT_UNSPECIFIED",
382 Self::Geth => "GETH",
383 Self::Erigon => "ERIGON",
384 }
385 }
386 /// Creates an enum from field names used in the ProtoBuf definition.
387 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
388 match value {
389 "EXECUTION_CLIENT_UNSPECIFIED" => Some(Self::Unspecified),
390 "GETH" => Some(Self::Geth),
391 "ERIGON" => Some(Self::Erigon),
392 _ => None,
393 }
394 }
395 }
396 /// The consensus client (also referred to as beacon node or CL client)
397 /// implements the proof-of-stake consensus algorithm, which enables the
398 /// network to achieve agreement based on validated data from the
399 /// execution client.
400 ///
401 /// See
402 /// [What are nodes and
403 /// clients?](<https://ethereum.org/en/developers/docs/nodes-and-clients/#what-are-nodes-and-clients>)
404 /// for more details.
405 #[derive(
406 Clone,
407 Copy,
408 Debug,
409 PartialEq,
410 Eq,
411 Hash,
412 PartialOrd,
413 Ord,
414 ::prost::Enumeration
415 )]
416 #[repr(i32)]
417 pub enum ConsensusClient {
418 /// Consensus client has not been specified, but should be.
419 Unspecified = 0,
420 /// Consensus client implementation written in Rust, maintained by Sigma
421 /// Prime. See [Lighthouse - Sigma
422 /// Prime](<https://lighthouse.sigmaprime.io/>) for details.
423 Lighthouse = 1,
424 }
425 impl ConsensusClient {
426 /// String value of the enum field names used in the ProtoBuf definition.
427 ///
428 /// The values are not transformed in any way and thus are considered stable
429 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
430 pub fn as_str_name(&self) -> &'static str {
431 match self {
432 Self::Unspecified => "CONSENSUS_CLIENT_UNSPECIFIED",
433 Self::Lighthouse => "LIGHTHOUSE",
434 }
435 }
436 /// Creates an enum from field names used in the ProtoBuf definition.
437 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
438 match value {
439 "CONSENSUS_CLIENT_UNSPECIFIED" => Some(Self::Unspecified),
440 "LIGHTHOUSE" => Some(Self::Lighthouse),
441 _ => None,
442 }
443 }
444 }
445 /// Options for the execution client.
446 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
447 pub enum ExecutionClientDetails {
448 /// Details for the Geth execution client.
449 #[prost(message, tag = "8")]
450 GethDetails(GethDetails),
451 }
452 }
453 /// The blockchain type of the node.
454 #[derive(
455 Clone,
456 Copy,
457 Debug,
458 PartialEq,
459 Eq,
460 Hash,
461 PartialOrd,
462 Ord,
463 ::prost::Enumeration
464 )]
465 #[repr(i32)]
466 pub enum BlockchainType {
467 /// Blockchain type has not been specified, but should be.
468 Unspecified = 0,
469 /// The blockchain type is Ethereum.
470 Ethereum = 1,
471 }
472 impl BlockchainType {
473 /// String value of the enum field names used in the ProtoBuf definition.
474 ///
475 /// The values are not transformed in any way and thus are considered stable
476 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
477 pub fn as_str_name(&self) -> &'static str {
478 match self {
479 Self::Unspecified => "BLOCKCHAIN_TYPE_UNSPECIFIED",
480 Self::Ethereum => "ETHEREUM",
481 }
482 }
483 /// Creates an enum from field names used in the ProtoBuf definition.
484 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
485 match value {
486 "BLOCKCHAIN_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
487 "ETHEREUM" => Some(Self::Ethereum),
488 _ => None,
489 }
490 }
491 }
492 /// All possible states for a given blockchain node.
493 #[derive(
494 Clone,
495 Copy,
496 Debug,
497 PartialEq,
498 Eq,
499 Hash,
500 PartialOrd,
501 Ord,
502 ::prost::Enumeration
503 )]
504 #[repr(i32)]
505 pub enum State {
506 /// The state has not been specified.
507 Unspecified = 0,
508 /// The node has been requested and is in the process of being created.
509 Creating = 1,
510 /// The existing node is undergoing deletion, but is not yet finished.
511 Deleting = 2,
512 /// The node is running and ready for use.
513 Running = 4,
514 /// The node is in an unexpected or errored state.
515 Error = 5,
516 /// The node is currently being updated.
517 Updating = 6,
518 /// The node is currently being repaired.
519 Repairing = 7,
520 /// The node is currently being reconciled.
521 Reconciling = 8,
522 /// The node is syncing, which is the process by which it obtains the latest
523 /// block and current global state.
524 Syncing = 9,
525 }
526 impl State {
527 /// String value of the enum field names used in the ProtoBuf definition.
528 ///
529 /// The values are not transformed in any way and thus are considered stable
530 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
531 pub fn as_str_name(&self) -> &'static str {
532 match self {
533 Self::Unspecified => "STATE_UNSPECIFIED",
534 Self::Creating => "CREATING",
535 Self::Deleting => "DELETING",
536 Self::Running => "RUNNING",
537 Self::Error => "ERROR",
538 Self::Updating => "UPDATING",
539 Self::Repairing => "REPAIRING",
540 Self::Reconciling => "RECONCILING",
541 Self::Syncing => "SYNCING",
542 }
543 }
544 /// Creates an enum from field names used in the ProtoBuf definition.
545 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
546 match value {
547 "STATE_UNSPECIFIED" => Some(Self::Unspecified),
548 "CREATING" => Some(Self::Creating),
549 "DELETING" => Some(Self::Deleting),
550 "RUNNING" => Some(Self::Running),
551 "ERROR" => Some(Self::Error),
552 "UPDATING" => Some(Self::Updating),
553 "REPAIRING" => Some(Self::Repairing),
554 "RECONCILING" => Some(Self::Reconciling),
555 "SYNCING" => Some(Self::Syncing),
556 _ => None,
557 }
558 }
559 }
560 /// Information that is specific to a particular blockchain type.
561 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
562 pub enum BlockchainTypeDetails {
563 /// Ethereum-specific blockchain node details.
564 #[prost(message, tag = "7")]
565 EthereumDetails(EthereumDetails),
566 }
567}
568/// Message for requesting list of blockchain nodes.
569#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
570pub struct ListBlockchainNodesRequest {
571 /// Required. Parent value for `ListNodesRequest`.
572 #[prost(string, tag = "1")]
573 pub parent: ::prost::alloc::string::String,
574 /// Requested page size. Server may return fewer items than requested.
575 /// If unspecified, server will pick an appropriate default.
576 #[prost(int32, tag = "2")]
577 pub page_size: i32,
578 /// A token identifying a page of results the server should return.
579 #[prost(string, tag = "3")]
580 pub page_token: ::prost::alloc::string::String,
581 /// Filtering results.
582 #[prost(string, tag = "4")]
583 pub filter: ::prost::alloc::string::String,
584 /// Hint for how to order the results.
585 #[prost(string, tag = "5")]
586 pub order_by: ::prost::alloc::string::String,
587}
588/// Message for response to listing blockchain nodes.
589#[derive(Clone, PartialEq, ::prost::Message)]
590pub struct ListBlockchainNodesResponse {
591 /// The list of nodes
592 #[prost(message, repeated, tag = "1")]
593 pub blockchain_nodes: ::prost::alloc::vec::Vec<BlockchainNode>,
594 /// A token identifying a page of results the server should return.
595 #[prost(string, tag = "2")]
596 pub next_page_token: ::prost::alloc::string::String,
597 /// Locations that could not be reached.
598 #[prost(string, repeated, tag = "3")]
599 pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
600}
601/// Message for getting a blockchain node.
602#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
603pub struct GetBlockchainNodeRequest {
604 /// Required. The fully qualified name of the blockchain node to fetch.
605 /// e.g. `projects/my-project/locations/us-central1/blockchainNodes/my-node`.
606 #[prost(string, tag = "1")]
607 pub name: ::prost::alloc::string::String,
608}
609/// Message for creating a blockchain node.
610#[derive(Clone, PartialEq, ::prost::Message)]
611pub struct CreateBlockchainNodeRequest {
612 /// Required. Value for parent.
613 #[prost(string, tag = "1")]
614 pub parent: ::prost::alloc::string::String,
615 /// Required. ID of the requesting object.
616 #[prost(string, tag = "2")]
617 pub blockchain_node_id: ::prost::alloc::string::String,
618 /// Required. The resource being created.
619 #[prost(message, optional, tag = "3")]
620 pub blockchain_node: ::core::option::Option<BlockchainNode>,
621 /// Optional. An optional request ID to identify requests. Specify a unique
622 /// request ID so that if you must retry your request, the server will know to
623 /// ignore the request if it has already been completed. The server will
624 /// guarantee that for at least 60 minutes since the first request.
625 ///
626 /// For example, consider a situation where you make an initial request and
627 /// the request times out. If you make the request again with the same request
628 /// ID, the server can check if original operation with the same request ID
629 /// was received, and if so, will ignore the second request. This prevents
630 /// clients from accidentally creating duplicate commitments.
631 ///
632 /// The request ID must be a valid UUID with the exception that zero UUID is
633 /// not supported (00000000-0000-0000-0000-000000000000).
634 #[prost(string, tag = "4")]
635 pub request_id: ::prost::alloc::string::String,
636}
637/// Message for updating a blockchain node.
638#[derive(Clone, PartialEq, ::prost::Message)]
639pub struct UpdateBlockchainNodeRequest {
640 /// Required. Field mask is used to specify the fields to be overwritten in the
641 /// Blockchain node resource by the update.
642 /// The fields specified in the `update_mask` are relative to the resource, not
643 /// the full request. A field will be overwritten if it is in the mask. If the
644 /// user does not provide a mask then all fields will be overwritten.
645 #[prost(message, optional, tag = "1")]
646 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
647 /// Required. The resource being updated.
648 #[prost(message, optional, tag = "2")]
649 pub blockchain_node: ::core::option::Option<BlockchainNode>,
650 /// Optional. An optional request ID to identify requests. Specify a unique
651 /// request ID so that if you must retry your request, the server will know to
652 /// ignore the request if it has already been completed. The server will
653 /// guarantee that for at least 60 minutes since the first request.
654 ///
655 /// For example, consider a situation where you make an initial request and
656 /// the request times out. If you make the request again with the same request
657 /// ID, the server can check if original operation with the same request ID
658 /// was received, and if so, will ignore the second request. This prevents
659 /// clients from accidentally creating duplicate commitments.
660 ///
661 /// The request ID must be a valid UUID with the exception that zero UUID is
662 /// not supported (00000000-0000-0000-0000-000000000000).
663 #[prost(string, tag = "3")]
664 pub request_id: ::prost::alloc::string::String,
665}
666/// Message for deleting a blockchain node.
667#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
668pub struct DeleteBlockchainNodeRequest {
669 /// Required. The fully qualified name of the blockchain node to delete.
670 /// e.g. `projects/my-project/locations/us-central1/blockchainNodes/my-node`.
671 #[prost(string, tag = "1")]
672 pub name: ::prost::alloc::string::String,
673 /// Optional. An optional request ID to identify requests. Specify a unique
674 /// request ID so that if you must retry your request, the server will know to
675 /// ignore the request if it has already been completed. The server will
676 /// guarantee that for at least 60 minutes after the first request.
677 ///
678 /// For example, consider a situation where you make an initial request and
679 /// the request times out. If you make the request again with the same request
680 /// ID, the server can check if original operation with the same request ID
681 /// was received, and if so, will ignore the second request. This prevents
682 /// clients from accidentally creating duplicate commitments.
683 ///
684 /// The request ID must be a valid UUID with the exception that zero UUID is
685 /// not supported (00000000-0000-0000-0000-000000000000).
686 #[prost(string, tag = "2")]
687 pub request_id: ::prost::alloc::string::String,
688}
689/// Represents the metadata of the long-running operation.
690#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
691pub struct OperationMetadata {
692 /// Output only. The time the operation was created.
693 #[prost(message, optional, tag = "1")]
694 pub create_time: ::core::option::Option<::prost_types::Timestamp>,
695 /// Output only. The time the operation finished running.
696 #[prost(message, optional, tag = "2")]
697 pub end_time: ::core::option::Option<::prost_types::Timestamp>,
698 /// Output only. Server-defined resource path for the target of the operation.
699 #[prost(string, tag = "3")]
700 pub target: ::prost::alloc::string::String,
701 /// Output only. Name of the verb executed by the operation.
702 #[prost(string, tag = "4")]
703 pub verb: ::prost::alloc::string::String,
704 /// Output only. Human-readable status of the operation, if any.
705 #[prost(string, tag = "5")]
706 pub status_message: ::prost::alloc::string::String,
707 /// Output only. Identifies whether the user has requested cancellation
708 /// of the operation. Operations that have been cancelled successfully
709 /// have `[Operation.error][]` value with a
710 /// `[google.rpc.Status.code][google.rpc.Status.code]` of `1`, corresponding to
711 /// `Code.CANCELLED`.
712 #[prost(bool, tag = "6")]
713 pub requested_cancellation: bool,
714 /// Output only. API version used to start the operation.
715 #[prost(string, tag = "7")]
716 pub api_version: ::prost::alloc::string::String,
717}
718/// Generated client implementations.
719pub mod blockchain_node_engine_client {
720 #![allow(
721 unused_variables,
722 dead_code,
723 missing_docs,
724 clippy::wildcard_imports,
725 clippy::let_unit_value,
726 )]
727 use tonic::codegen::*;
728 use tonic::codegen::http::Uri;
729 /// This service is the control plane API for Blockchain Node Engine,
730 /// and can be used to create, read, and delete blockchain nodes.
731 #[derive(Debug, Clone)]
732 pub struct BlockchainNodeEngineClient<T> {
733 inner: tonic::client::Grpc<T>,
734 }
735 impl<T> BlockchainNodeEngineClient<T>
736 where
737 T: tonic::client::GrpcService<tonic::body::Body>,
738 T::Error: Into<StdError>,
739 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
740 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
741 {
742 pub fn new(inner: T) -> Self {
743 let inner = tonic::client::Grpc::new(inner);
744 Self { inner }
745 }
746 pub fn with_origin(inner: T, origin: Uri) -> Self {
747 let inner = tonic::client::Grpc::with_origin(inner, origin);
748 Self { inner }
749 }
750 pub fn with_interceptor<F>(
751 inner: T,
752 interceptor: F,
753 ) -> BlockchainNodeEngineClient<InterceptedService<T, F>>
754 where
755 F: tonic::service::Interceptor,
756 T::ResponseBody: Default,
757 T: tonic::codegen::Service<
758 http::Request<tonic::body::Body>,
759 Response = http::Response<
760 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
761 >,
762 >,
763 <T as tonic::codegen::Service<
764 http::Request<tonic::body::Body>,
765 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
766 {
767 BlockchainNodeEngineClient::new(InterceptedService::new(inner, interceptor))
768 }
769 /// Compress requests with the given encoding.
770 ///
771 /// This requires the server to support it otherwise it might respond with an
772 /// error.
773 #[must_use]
774 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
775 self.inner = self.inner.send_compressed(encoding);
776 self
777 }
778 /// Enable decompressing responses.
779 #[must_use]
780 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
781 self.inner = self.inner.accept_compressed(encoding);
782 self
783 }
784 /// Limits the maximum size of a decoded message.
785 ///
786 /// Default: `4MB`
787 #[must_use]
788 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
789 self.inner = self.inner.max_decoding_message_size(limit);
790 self
791 }
792 /// Limits the maximum size of an encoded message.
793 ///
794 /// Default: `usize::MAX`
795 #[must_use]
796 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
797 self.inner = self.inner.max_encoding_message_size(limit);
798 self
799 }
800 /// Lists blockchain nodes in a given project and location.
801 pub async fn list_blockchain_nodes(
802 &mut self,
803 request: impl tonic::IntoRequest<super::ListBlockchainNodesRequest>,
804 ) -> std::result::Result<
805 tonic::Response<super::ListBlockchainNodesResponse>,
806 tonic::Status,
807 > {
808 self.inner
809 .ready()
810 .await
811 .map_err(|e| {
812 tonic::Status::unknown(
813 format!("Service was not ready: {}", e.into()),
814 )
815 })?;
816 let codec = tonic_prost::ProstCodec::default();
817 let path = http::uri::PathAndQuery::from_static(
818 "/google.cloud.blockchainnodeengine.v1.BlockchainNodeEngine/ListBlockchainNodes",
819 );
820 let mut req = request.into_request();
821 req.extensions_mut()
822 .insert(
823 GrpcMethod::new(
824 "google.cloud.blockchainnodeengine.v1.BlockchainNodeEngine",
825 "ListBlockchainNodes",
826 ),
827 );
828 self.inner.unary(req, path, codec).await
829 }
830 /// Gets details of a single blockchain node.
831 pub async fn get_blockchain_node(
832 &mut self,
833 request: impl tonic::IntoRequest<super::GetBlockchainNodeRequest>,
834 ) -> std::result::Result<tonic::Response<super::BlockchainNode>, tonic::Status> {
835 self.inner
836 .ready()
837 .await
838 .map_err(|e| {
839 tonic::Status::unknown(
840 format!("Service was not ready: {}", e.into()),
841 )
842 })?;
843 let codec = tonic_prost::ProstCodec::default();
844 let path = http::uri::PathAndQuery::from_static(
845 "/google.cloud.blockchainnodeengine.v1.BlockchainNodeEngine/GetBlockchainNode",
846 );
847 let mut req = request.into_request();
848 req.extensions_mut()
849 .insert(
850 GrpcMethod::new(
851 "google.cloud.blockchainnodeengine.v1.BlockchainNodeEngine",
852 "GetBlockchainNode",
853 ),
854 );
855 self.inner.unary(req, path, codec).await
856 }
857 /// Creates a new blockchain node in a given project and location.
858 pub async fn create_blockchain_node(
859 &mut self,
860 request: impl tonic::IntoRequest<super::CreateBlockchainNodeRequest>,
861 ) -> std::result::Result<
862 tonic::Response<super::super::super::super::longrunning::Operation>,
863 tonic::Status,
864 > {
865 self.inner
866 .ready()
867 .await
868 .map_err(|e| {
869 tonic::Status::unknown(
870 format!("Service was not ready: {}", e.into()),
871 )
872 })?;
873 let codec = tonic_prost::ProstCodec::default();
874 let path = http::uri::PathAndQuery::from_static(
875 "/google.cloud.blockchainnodeengine.v1.BlockchainNodeEngine/CreateBlockchainNode",
876 );
877 let mut req = request.into_request();
878 req.extensions_mut()
879 .insert(
880 GrpcMethod::new(
881 "google.cloud.blockchainnodeengine.v1.BlockchainNodeEngine",
882 "CreateBlockchainNode",
883 ),
884 );
885 self.inner.unary(req, path, codec).await
886 }
887 /// Updates the parameters of a single blockchain node.
888 pub async fn update_blockchain_node(
889 &mut self,
890 request: impl tonic::IntoRequest<super::UpdateBlockchainNodeRequest>,
891 ) -> std::result::Result<
892 tonic::Response<super::super::super::super::longrunning::Operation>,
893 tonic::Status,
894 > {
895 self.inner
896 .ready()
897 .await
898 .map_err(|e| {
899 tonic::Status::unknown(
900 format!("Service was not ready: {}", e.into()),
901 )
902 })?;
903 let codec = tonic_prost::ProstCodec::default();
904 let path = http::uri::PathAndQuery::from_static(
905 "/google.cloud.blockchainnodeengine.v1.BlockchainNodeEngine/UpdateBlockchainNode",
906 );
907 let mut req = request.into_request();
908 req.extensions_mut()
909 .insert(
910 GrpcMethod::new(
911 "google.cloud.blockchainnodeengine.v1.BlockchainNodeEngine",
912 "UpdateBlockchainNode",
913 ),
914 );
915 self.inner.unary(req, path, codec).await
916 }
917 /// Deletes a single blockchain node.
918 pub async fn delete_blockchain_node(
919 &mut self,
920 request: impl tonic::IntoRequest<super::DeleteBlockchainNodeRequest>,
921 ) -> std::result::Result<
922 tonic::Response<super::super::super::super::longrunning::Operation>,
923 tonic::Status,
924 > {
925 self.inner
926 .ready()
927 .await
928 .map_err(|e| {
929 tonic::Status::unknown(
930 format!("Service was not ready: {}", e.into()),
931 )
932 })?;
933 let codec = tonic_prost::ProstCodec::default();
934 let path = http::uri::PathAndQuery::from_static(
935 "/google.cloud.blockchainnodeengine.v1.BlockchainNodeEngine/DeleteBlockchainNode",
936 );
937 let mut req = request.into_request();
938 req.extensions_mut()
939 .insert(
940 GrpcMethod::new(
941 "google.cloud.blockchainnodeengine.v1.BlockchainNodeEngine",
942 "DeleteBlockchainNode",
943 ),
944 );
945 self.inner.unary(req, path, codec).await
946 }
947 }
948}