// SPDX-FileCopyrightText: 2026 OpenBasil Contributors
//
// SPDX-License-Identifier: Apache-2.0

syntax = "proto3";

package envoy.service.discovery.v3;

import "google/protobuf/any.proto";
import "google/rpc/status.proto";
import "envoy/config/core/v3/base.proto";
import "xds/core/v3/resource.proto";

message DiscoveryRequest {
  string version_info = 1;
  envoy.config.core.v3.Node node = 2;
  repeated string resource_names = 3;
  string type_url = 4;
  string response_nonce = 5;
  google.rpc.Status error_detail = 6;
}

message DiscoveryResponse {
  string version_info = 1;
  repeated google.protobuf.Any resources = 2;
  bool canary = 3;
  string type_url = 4;
  string nonce = 5;
  envoy.config.core.v3.ControlPlane control_plane = 6;
}

message DeltaDiscoveryRequest {
  envoy.config.core.v3.Node node = 1;
  string type_url = 2;
  repeated string resource_names_subscribe = 3;
  repeated string resource_names_unsubscribe = 4;
  map<string, string> initial_resource_versions = 5;
  string response_nonce = 6;
  google.rpc.Status error_detail = 7;
}

message DeltaDiscoveryResponse {
  string system_version_info = 1;
  repeated xds.core.v3.Resource resources = 2;
  string type_url = 4;
  string nonce = 5;
  repeated string removed_resources = 6;
}
