syntax = "proto3";

package global.nextgen.v1;

import "google/api/field_behavior.proto";

service LogRedactionPolicyService {
  rpc GetLogRedactionPolicy(GetLogRedactionPolicyRequest) returns (LogRedactionPolicy) {}
  rpc UpdateLogRedactionPolicy(UpdateLogRedactionPolicyRequest) returns (LogRedactionPolicy) {}
}

message LogRedactionPolicy {
  uint64 cluster_id = 1 [(google.api.field_behavior) = REQUIRED];
  // Indicates whether to redact sensitive information in logs.
  // Default policy: true (enable log redaction)
  optional bool redact_log = 2 [(google.api.field_behavior) = OPTIONAL];
}

message GetLogRedactionPolicyRequest {
  uint64 cluster_id = 1 [(google.api.field_behavior) = REQUIRED];
}

message UpdateLogRedactionPolicyRequest {
  LogRedactionPolicy log_redaction_policy = 1 [(google.api.field_behavior) = REQUIRED];
  bool validate_only = 2;
}
