1// Copyright 2023 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// http://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 15syntax = "proto3"; 16 17package google.cloud.edgenetwork.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/timestamp.proto"; 22 23option csharp_namespace = "Google.Cloud.EdgeNetwork.V1"; 24option go_package = "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb;edgenetworkpb"; 25option java_multiple_files = true; 26option java_outer_classname = "ResourcesProto"; 27option java_package = "com.google.cloud.edgenetwork.v1"; 28option php_namespace = "Google\\Cloud\\EdgeNetwork\\V1"; 29option ruby_package = "Google::Cloud::EdgeNetwork::V1"; 30 31// ResourceState describes the state the resource. 32// A normal lifecycle of a new resource being created would be: PENDING -> 33// PROVISIONING -> RUNNING. A normal lifecycle of an existing resource being 34// deleted would be: RUNNING -> DELETING. Any failures during processing will 35// result the resource to be in a SUSPENDED state. 36enum ResourceState { 37 // Unspecified state. 38 STATE_UNKNOWN = 0; 39 40 // The resource is being prepared to be applied to the rack. 41 STATE_PENDING = 1; 42 43 // The resource has started being applied to the rack. 44 STATE_PROVISIONING = 2; 45 46 // The resource has been pushed to the rack. 47 STATE_RUNNING = 3; 48 49 // The resource failed to push to the rack. 50 STATE_SUSPENDED = 4; 51 52 // The resource is under deletion. 53 STATE_DELETING = 5; 54} 55 56// A Google Edge Cloud zone. 57message Zone { 58 option (google.api.resource) = { 59 type: "edgenetwork.googleapis.com/Zone" 60 pattern: "projects/{project}/locations/{location}/zones/{zone}" 61 }; 62 63 // Required. The resource name of the zone. 64 string name = 1 [(google.api.field_behavior) = REQUIRED]; 65 66 // Output only. The time when the zone was created. 67 google.protobuf.Timestamp create_time = 2 68 [(google.api.field_behavior) = OUTPUT_ONLY]; 69 70 // Output only. The time when the zone was last updated. 71 google.protobuf.Timestamp update_time = 3 72 [(google.api.field_behavior) = OUTPUT_ONLY]; 73 74 // Deprecated: not implemented. 75 // Labels as key value pairs. 76 map<string, string> labels = 4 [deprecated = true]; 77 78 // Deprecated: not implemented. 79 // The deployment layout type. 80 string layout_name = 5 [deprecated = true]; 81} 82 83// Message describing Network object 84message Network { 85 option (google.api.resource) = { 86 type: "edgenetwork.googleapis.com/Network" 87 pattern: "projects/{project}/locations/{location}/zones/{zone}/networks/{network}" 88 }; 89 90 // Required. The canonical resource name of the network. 91 string name = 1 [(google.api.field_behavior) = REQUIRED]; 92 93 // Output only. The time when the network was created. 94 google.protobuf.Timestamp create_time = 2 95 [(google.api.field_behavior) = OUTPUT_ONLY]; 96 97 // Output only. The time when the network was last updated. 98 google.protobuf.Timestamp update_time = 3 99 [(google.api.field_behavior) = OUTPUT_ONLY]; 100 101 // Labels associated with this resource. 102 map<string, string> labels = 4; 103 104 // Optional. A free-text description of the resource. Max length 1024 105 // characters. 106 string description = 5 [(google.api.field_behavior) = OPTIONAL]; 107 108 // IP (L3) MTU value of the network. 109 // Valid values are: 1500 and 9000. 110 // Default to 1500 if not set. 111 int32 mtu = 6; 112} 113 114// Message describing Subnet object 115message Subnet { 116 option (google.api.resource) = { 117 type: "edgenetwork.googleapis.com/Subnet" 118 pattern: "projects/{project}/locations/{location}/zones/{zone}/subnets/{subnet}" 119 }; 120 121 // Required. The canonical resource name of the subnet. 122 string name = 1 [(google.api.field_behavior) = REQUIRED]; 123 124 // Output only. The time when the subnet was created. 125 google.protobuf.Timestamp create_time = 2 126 [(google.api.field_behavior) = OUTPUT_ONLY]; 127 128 // Output only. The time when the subnet was last updated. 129 google.protobuf.Timestamp update_time = 3 130 [(google.api.field_behavior) = OUTPUT_ONLY]; 131 132 // Labels associated with this resource. 133 map<string, string> labels = 4; 134 135 // Optional. A free-text description of the resource. Max length 1024 136 // characters. 137 string description = 5 [(google.api.field_behavior) = OPTIONAL]; 138 139 // Required. The network that this subnetwork belongs to. 140 string network = 6 [ 141 (google.api.field_behavior) = REQUIRED, 142 (google.api.resource_reference) = { 143 type: "edgenetwork.googleapis.com/Network" 144 } 145 ]; 146 147 // The ranges of ipv4 addresses that are owned by this subnetwork. 148 repeated string ipv4_cidr = 7; 149 150 // The ranges of ipv6 addresses that are owned by this subnetwork. 151 repeated string ipv6_cidr = 8; 152 153 // Optional. VLAN id provided by user. If not specified we assign one 154 // automatically. 155 int32 vlan_id = 9 [(google.api.field_behavior) = OPTIONAL]; 156 157 // Output only. Current stage of the resource to the device by config push. 158 ResourceState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 159} 160 161// Message describing Interconnect object 162message Interconnect { 163 option (google.api.resource) = { 164 type: "edgenetwork.googleapis.com/Interconnect" 165 pattern: "projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}" 166 }; 167 168 // Type of interconnect. 169 enum InterconnectType { 170 // Unspecified. 171 INTERCONNECT_TYPE_UNSPECIFIED = 0; 172 173 // Dedicated Interconnect. 174 DEDICATED = 1; 175 } 176 177 // Required. The canonical resource name of the interconnect. 178 string name = 1 [(google.api.field_behavior) = REQUIRED]; 179 180 // Output only. The time when the subnet was created. 181 google.protobuf.Timestamp create_time = 2 182 [(google.api.field_behavior) = OUTPUT_ONLY]; 183 184 // Output only. The time when the subnet was last updated. 185 google.protobuf.Timestamp update_time = 3 186 [(google.api.field_behavior) = OUTPUT_ONLY]; 187 188 // Labels associated with this resource. 189 map<string, string> labels = 4; 190 191 // Optional. A free-text description of the resource. Max length 1024 192 // characters. 193 string description = 5 [(google.api.field_behavior) = OPTIONAL]; 194 195 // Optional. Type of interconnect, which takes only the value 'DEDICATED' for 196 // now. 197 InterconnectType interconnect_type = 6 198 [(google.api.field_behavior) = OPTIONAL]; 199 200 // Output only. Unique identifier for the link. 201 string uuid = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 202 203 // Output only. Cloud resource name of the switch device. 204 string device_cloud_resource_name = 8 205 [(google.api.field_behavior) = OUTPUT_ONLY]; 206 207 // Output only. Physical ports (e.g., TenGigE0/0/0/1) that form the 208 // interconnect. 209 repeated string physical_ports = 9 210 [(google.api.field_behavior) = OUTPUT_ONLY]; 211} 212 213// Message describing InterconnectAttachment object 214message InterconnectAttachment { 215 option (google.api.resource) = { 216 type: "edgenetwork.googleapis.com/InterconnectAttachment" 217 pattern: "projects/{project}/locations/{location}/zones/{zone}/interconnectAttachments/{interconnect_attachment}" 218 }; 219 220 // Required. The canonical resource name of the interconnect attachment. 221 string name = 1 [(google.api.field_behavior) = REQUIRED]; 222 223 // Output only. The time when the interconnect attachment was created. 224 google.protobuf.Timestamp create_time = 2 225 [(google.api.field_behavior) = OUTPUT_ONLY]; 226 227 // Output only. The time when the interconnect attachment was last updated. 228 google.protobuf.Timestamp update_time = 3 229 [(google.api.field_behavior) = OUTPUT_ONLY]; 230 231 // Labels associated with this resource. 232 map<string, string> labels = 4; 233 234 // Optional. A free-text description of the resource. Max length 1024 235 // characters. 236 string description = 5 [(google.api.field_behavior) = OPTIONAL]; 237 238 // Required. The canonical name of underlying Interconnect object that this 239 // attachment's traffic will traverse through. The name is in the form of 240 // `projects/{project}/locations/{location}/zones/{zone}/interconnects/{interconnect}`. 241 string interconnect = 6 [ 242 (google.api.field_behavior) = REQUIRED, 243 (google.api.resource_reference) = { 244 type: "edgenetwork.googleapis.com/Interconnect" 245 } 246 ]; 247 248 // Optional. The canonical Network name in the form of 249 // `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`. 250 string network = 11 [ 251 (google.api.field_behavior) = OPTIONAL, 252 (google.api.resource_reference) = { 253 type: "edgenetwork.googleapis.com/Network" 254 } 255 ]; 256 257 // Required. VLAN id provided by user. Must be site-wise unique. 258 int32 vlan_id = 8 [(google.api.field_behavior) = REQUIRED]; 259 260 // IP (L3) MTU value of the virtual edge cloud. 261 // Valid values are: 1500 and 9000. 262 // Default to 1500 if not set. 263 int32 mtu = 9; 264 265 // Output only. Current stage of the resource to the device by config push. 266 ResourceState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 267} 268 269// Message describing Router object 270message Router { 271 option (google.api.resource) = { 272 type: "edgenetwork.googleapis.com/Router" 273 pattern: "projects/{project}/locations/{location}/zones/{zone}/routers/{router}" 274 }; 275 276 // Router Interface defines the GDCE zone side layer-3 information for 277 // building the BGP session. 278 message Interface { 279 // Name of this interface entry. Unique within the Zones resource. 280 string name = 1; 281 282 // IP address and range of the interface. 283 string ipv4_cidr = 3; 284 285 // IPv6 address and range of the interface. 286 string ipv6_cidr = 6; 287 288 // The canonical name of the linked Interconnect attachment. 289 string linked_interconnect_attachment = 2; 290 291 // The canonical name of the subnetwork resource that this interface 292 // belongs to. 293 string subnetwork = 4; 294 295 // Create loopback interface in the router when specified. 296 // The number of IP addresses must match the number of TOR devices. 297 repeated string loopback_ip_addresses = 5; 298 } 299 300 // BGPPeer defines the peer side layer-3 information for building the BGP 301 // session. 302 message BgpPeer { 303 // Name of this BGP peer. Unique within the Zones resource. 304 string name = 1; 305 306 // Name of the RouterInterface the BGP peer is associated with. 307 string interface = 2; 308 309 // IP range of the interface within Google. 310 string interface_ipv4_cidr = 3; 311 312 // IPv6 range of the interface within Google. 313 string interface_ipv6_cidr = 7; 314 315 // IP range of the BGP interface outside Google. 316 string peer_ipv4_cidr = 4; 317 318 // IPv6 range of the BGP interface outside Google. 319 string peer_ipv6_cidr = 6; 320 321 // Peer BGP Autonomous System Number (ASN). Each BGP interface may use 322 // a different value. 323 uint32 peer_asn = 5; 324 325 // Output only. Local BGP Autonomous System Number (ASN). 326 // This field is ST_NOT_REQUIRED because it stores private ASNs, which are 327 // meaningless outside the zone in which they are being used. 328 uint32 local_asn = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 329 } 330 331 // BGP information specific to this router. 332 message Bgp { 333 // Locally assigned BGP ASN. 334 uint32 asn = 1; 335 336 // The interval in seconds between BGP keepalive messages that are 337 // sent to the peer. Default is 20 with value between 20 and 60. 338 uint32 keepalive_interval_in_seconds = 2; 339 } 340 341 // Required. The canonical resource name of the router. 342 string name = 1 [(google.api.field_behavior) = REQUIRED]; 343 344 // Output only. The time when the router was created. 345 google.protobuf.Timestamp create_time = 2 346 [(google.api.field_behavior) = OUTPUT_ONLY]; 347 348 // Output only. The time when the router was last updated. 349 google.protobuf.Timestamp update_time = 3 350 [(google.api.field_behavior) = OUTPUT_ONLY]; 351 352 // Labels associated with this resource. 353 map<string, string> labels = 4; 354 355 // Optional. A free-text description of the resource. Max length 1024 356 // characters. 357 string description = 5 [(google.api.field_behavior) = OPTIONAL]; 358 359 // Required. The canonical name of the network to which this router belongs. 360 // The name is in the form of 361 // `projects/{project}/locations/{location}/zones/{zone}/networks/{network}`. 362 string network = 6 [ 363 (google.api.field_behavior) = REQUIRED, 364 (google.api.resource_reference) = { 365 type: "edgenetwork.googleapis.com/Network" 366 } 367 ]; 368 369 // Router interfaces. 370 repeated Interface interface = 7; 371 372 // BGP peers. 373 repeated BgpPeer bgp_peer = 8; 374 375 // BGP information specific to this router. 376 Bgp bgp = 9; 377 378 // Output only. Current stage of the resource to the device by config push. 379 ResourceState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 380 381 // Optional. A list of CIDRs in IP/Length format to advertise northbound as 382 // static routes from this router. 383 repeated string route_advertisements = 11 384 [(google.api.field_behavior) = OPTIONAL]; 385} 386 387// LinkLayerAddress contains an IP address and corresponding link-layer address. 388message LinkLayerAddress { 389 // The MAC address of this neighbor. 390 string mac_address = 1; 391 392 // The IP address of this neighbor. 393 string ip_address = 2; 394} 395 396// SubnetStatus contains detailed and current technical information about this 397// subnet resource. 398message SubnetStatus { 399 // The name of CCFE subnet resource. 400 string name = 1; 401 402 // BVI MAC address. 403 string mac_address = 2; 404 405 // A list of LinkLayerAddress, describing the ip address and corresponding 406 // link-layer address of the neighbors for this subnet. 407 repeated LinkLayerAddress link_layer_addresses = 3; 408} 409 410// Diagnostics information about interconnect, contains detailed and current 411// technical information about Google's side of the connection. 412message InterconnectDiagnostics { 413 // Describing the status for each link on the Interconnect. 414 message LinkStatus { 415 // The unique ID for this link assigned during turn up by Google. 416 string circuit_id = 1; 417 418 // Describing the state of a LACP link. 419 LinkLACPStatus lacp_status = 2; 420 421 // A list of LinkLLDPStatus objects, used to describe LLDP status of each 422 // peer for each link on the Interconnect. 423 repeated LinkLLDPStatus lldp_statuses = 3; 424 425 // Packet counts specific statistics for this link. 426 PacketCounts packet_counts = 4; 427 } 428 429 // Containing a collection of interface-related statistics objects. 430 message PacketCounts { 431 // The number of packets that are delivered. 432 int64 inbound_unicast = 1; 433 434 // The number of inbound packets that contained errors. 435 int64 inbound_errors = 2; 436 437 // The number of inbound packets that were chosen to be discarded even 438 // though no errors had been detected to prevent their being deliverable. 439 int64 inbound_discards = 3; 440 441 // The total number of packets that are requested be transmitted. 442 int64 outbound_unicast = 4; 443 444 // The number of outbound packets that could not be transmitted because of 445 // errors. 446 int64 outbound_errors = 5; 447 448 // The number of outbound packets that were chosen to be discarded even 449 // though no errors had been detected to prevent their being transmitted. 450 int64 outbound_discards = 6; 451 } 452 453 // Describing the status of a LACP link. 454 message LinkLACPStatus { 455 // State enum for LACP link. 456 enum State { 457 // The default state indicating state is in unknown state. 458 UNKNOWN = 0; 459 460 // The link is configured and active within the bundle. 461 ACTIVE = 1; 462 463 // The link is not configured within the bundle, this means the rest of 464 // the object should be empty. 465 DETACHED = 2; 466 } 467 468 // The state of a LACP link. 469 State state = 1; 470 471 // System ID of the port on Google's side of the LACP exchange. 472 string google_system_id = 2; 473 474 // System ID of the port on the neighbor's side of the LACP exchange. 475 string neighbor_system_id = 3; 476 477 // A true value indicates that the participant will allow the link to be 478 // used as part of the aggregate. 479 // A false value indicates the link should be used as an individual link. 480 bool aggregatable = 4; 481 482 // If true, the participant is collecting incoming frames on the link, 483 // otherwise false 484 bool collecting = 5; 485 486 // When true, the participant is distributing outgoing frames; when false, 487 // distribution is disabled 488 bool distributing = 6; 489 } 490 491 // Describing a LLDP link. 492 message LinkLLDPStatus { 493 // The peer system's administratively assigned name. 494 string peer_system_name = 1; 495 496 // The textual description of the network entity of LLDP peer. 497 string peer_system_description = 2; 498 499 // The peer chassis component of the endpoint identifier associated with the 500 // transmitting LLDP agent. 501 string peer_chassis_id = 3; 502 503 // The format and source of the peer chassis identifier string. 504 string peer_chassis_id_type = 4; 505 506 // The port component of the endpoint identifier associated with the 507 // transmitting LLDP agent. If the specified port is an IEEE 802.3 Repeater 508 // port, then this TLV is optional. 509 string peer_port_id = 5; 510 511 // The format and source of the peer port identifier string. 512 string peer_port_id_type = 6; 513 } 514 515 // The MAC address of the Interconnect's bundle interface. 516 string mac_address = 1; 517 518 // A list of LinkLayerAddress, describing the ip address and corresponding 519 // link-layer address of the neighbors for this interconnect. 520 repeated LinkLayerAddress link_layer_addresses = 2; 521 522 // A list of LinkStatus objects, used to describe the status for each link on 523 // the Interconnect. 524 repeated LinkStatus links = 3; 525} 526 527// Describing the current status of a router. 528message RouterStatus { 529 // Status of a BGP peer. 530 message BgpPeerStatus { 531 // Status of the BGP peer: {UP, DOWN} 532 enum BgpStatus { 533 // The default status indicating BGP session is in unknown state. 534 UNKNOWN = 0; 535 536 // The UP status indicating BGP session is established. 537 UP = 1; 538 539 // The DOWN state indicating BGP session is not established yet. 540 DOWN = 2; 541 } 542 543 // Name of this BGP peer. Unique within the Routers resource. 544 string name = 1; 545 546 // IP address of the local BGP interface. 547 string ip_address = 2; 548 549 // IP address of the remote BGP interface. 550 string peer_ip_address = 3; 551 552 // The current status of BGP. 553 BgpStatus status = 4; 554 555 // BGP state as specified in RFC1771. 556 string state = 5; 557 558 // Time this session has been up. 559 // Format: 560 // 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds 561 string uptime = 6; 562 563 // Time this session has been up, in seconds. 564 int64 uptime_seconds = 7; 565 566 // A collection of counts for prefixes. 567 PrefixCounter prefix_counter = 8; 568 } 569 570 // PrefixCounter contains a collection of prefixes related counts. 571 message PrefixCounter { 572 // Number of prefixes advertised. 573 int64 advertised = 1; 574 575 // Number of prefixes denied. 576 int64 denied = 2; 577 578 // Number of prefixes received. 579 int64 received = 3; 580 581 // Number of prefixes sent. 582 int64 sent = 4; 583 584 // Number of prefixes suppressed. 585 int64 suppressed = 5; 586 587 // Number of prefixes withdrawn. 588 int64 withdrawn = 6; 589 } 590 591 // The canonical name of the network to which this router belongs. 592 string network = 1 [(google.api.resource_reference) = { 593 type: "edgenetwork.googleapis.com/Network" 594 }]; 595 596 // A list of BgpPeerStatus objects, describing all BGP peers related to this 597 // router. 598 repeated BgpPeerStatus bgp_peer_status = 2; 599} 600