syntax = "proto3";

package a;

import "buf/validate/validate.proto";
import "google/protobuf/wrappers.proto";

message BoolTest {
  // valid
  bool no_protovalidate_option = 1;
  // valid
  bool other_option = 2 [deprecated = true];
  // valid
  bool valid_const = 3 [(buf.validate.field).bool.const = true];
  // valid
  google.protobuf.BoolValue valid_wrapper = 7 [(buf.validate.field).bool.const = false];
  // int32 rules on a BoolValue field
  google.protobuf.BoolValue mismatch_wrapper = 8 [(buf.validate.field).int32.lt = 1];
  string string_mismatch = 9 [(buf.validate.field).bool.const = true];
  google.protobuf.Int32Value wrong_wrapper = 10 [(buf.validate.field).bool.const = true];
  bool valid_example = 4 [
    (buf.validate.field).bool.const = true,
    (buf.validate.field).bool.example = true
  ];
  bool invalid_example = 5 [
    (buf.validate.field).bool.const = true,
    (buf.validate.field).bool.example = false
  ];
  bool valid_no_constraint_example = 6 [
    (buf.validate.field).bool.example = true,
    (buf.validate.field).bool.example = false
  ];
  bool invalid_example_type_mistmatch = 12 [(buf.validate.field).string.example = "true"];
}
