syntax = "proto3";

package yandex.cloud.vpc.v1;

import "google/protobuf/timestamp.proto";

option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/vpc/v1;vpc";
option java_package = "yandex.cloud.api.vpc.v1";

// A RouteTable resource. For more information, see [Static Routes](/docs/vpc/concepts/static-routes).
message RouteTable {
  // ID of the route table.
  string id = 1;

  // ID of the folder that the route table belongs to.
  string folder_id = 2;

  // Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
  google.protobuf.Timestamp created_at = 3;

  // Name of the route table. The name is unique within the project. 3-63 characters long.
  string name = 4;

  // Optional description of the route table. 0-256 characters long.
  string description = 5;

  // Resource labels as `` key:value `` pairs. Maximum of 64 per resource.
  map<string, string> labels = 6;

  // ID of the network the route table belongs to.
  string network_id = 7;

  // List of static routes.
  repeated StaticRoute static_routes = 8;
}

// A StaticRoute resource. For more information, see [Static Routes](/docs/vpc/concepts/static-routes).
message StaticRoute {

  oneof destination {
    // Destination subnet in CIDR notation
    string destination_prefix = 1;
  }

  oneof next_hop {
    // Next hop IP address
    string next_hop_address = 2;
  }

  // Resource labels as `` key:value `` pairs. Maximum of 64 per resource.
  map<string, string> labels = 3;
}
