syntax = "proto3";

package global.dedicated.v1;

import "google/api/field_behavior.proto";

// MigrationPrecheckService executes one database compatibility check per RPC.
service MigrationPrecheckService {
  rpc RunDedicatedToPremiumCompatibilityCheck(RunDedicatedToPremiumCompatibilityCheckRequest) returns (RunDedicatedToPremiumCompatibilityCheckResponse) {}
}

message RunDedicatedToPremiumCompatibilityCheckRequest {
  uint64 cluster_id = 1 [(google.api.field_behavior) = REQUIRED];
  string check_key = 2 [(google.api.field_behavior) = REQUIRED];
}

message RunDedicatedToPremiumCompatibilityCheckResponse {
  string check_key = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  MigrationCompatibilityCheckStatus status = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  string evidence = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  string action = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
}

enum MigrationCompatibilityCheckStatus {
  MIGRATION_COMPATIBILITY_CHECK_STATUS_UNSPECIFIED = 0;
  RISK_FOUND = 1;
  NO_RISK_FOUND = 2;
  NEEDS_INPUT = 3;
}
