syntax = "proto3";

package nominal.mesh.v1.internal;

import "buf/validate/validate.proto";
import "nominal/protos/gen/v1/alias.proto";
import "nominal/protos/mesh/v1/remote_connections.proto";

option java_multiple_files = true;
option java_package = "io.nominal.mesh.v1.internal";

message UpdateRemoteConnectionStatusRequest {
  string remote_connection_rid = 1 [
    (buf.validate.field).required = true,
    (nominal.gen.v1.alias) = {java_name: "io.nominal.api.rids.RemoteConnectionRid"}
  ];
  nominal.mesh.v1.RemoteConnectionStatus status = 2;
}

message UpdateRemoteConnectionStatusResponse {}

// Internal service for inter-service RPCs. Uses a separate package so that
// the gRPC path (nominal.mesh.v1.internal.*) is excluded from public ingress.
service InternalMeshService {
  // Updates the health status of a remote connection. Internal-only (service-token auth).
  rpc UpdateRemoteConnectionStatus(UpdateRemoteConnectionStatusRequest) returns (UpdateRemoteConnectionStatusResponse);
}
