authzed 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 471300e0b15428b18cc989e999dc0bfe4160a8d53bb1202b67297d9ec5e3372c
4
- data.tar.gz: d907cf8be69946cc6c9e203fc25b8d0f093d55a8a591db2eaaba8c21e457be46
3
+ metadata.gz: a16ca0f8780c08104bb5fe7b46fb8398ba774014abcf3e4578ca13316df7a49b
4
+ data.tar.gz: 514414ad90dd2aa1ef2331a411cfbe95a906e873231adbef887f0f7f109d4580
5
5
  SHA512:
6
- metadata.gz: 02e864c03b388947db98cf344c6c4a7d4279332f8947069b7275641a159b63e08d47e888b542350ac7b74be4604b85295b6139d3bfe1757532306a14394de224
7
- data.tar.gz: 3ba557b7abf4ffb568971821f18a36ccc05699cde69961ce82696a2a2b47a26aa73023df3c3e9c673dab7ca15186c3be9c440bd946ec173a328c21e7e2280d97
6
+ metadata.gz: 12ae307386d9c14150469196b23349af0292d593990d0955a32924772e1b4eb76f98b69787b04cc329693cb1ef7e08daf0a127aace03fdfdc5c602057d357549
7
+ data.tar.gz: ef219e87e155a44672e7d6303d61ac375507602fb50983279f347968076e5227428f19dd09e0914db0f605df42ef6a209500391d2a9d2ff2e75ae526acbdcdd9
@@ -14,7 +14,7 @@ pool = Google::Protobuf::DescriptorPool.generated_pool
14
14
 
15
15
  begin
16
16
  pool.add_serialized_file(descriptor_data)
17
- rescue TypeError => e
17
+ rescue TypeError
18
18
  # Compatibility code: will be removed in the next major version.
19
19
  require 'google/protobuf/descriptor_pb'
20
20
  parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
@@ -16,7 +16,7 @@ pool = Google::Protobuf::DescriptorPool.generated_pool
16
16
 
17
17
  begin
18
18
  pool.add_serialized_file(descriptor_data)
19
- rescue TypeError => e
19
+ rescue TypeError
20
20
  # Compatibility code: will be removed in the next major version.
21
21
  require 'google/protobuf/descriptor_pb'
22
22
  parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
@@ -11,7 +11,7 @@ pool = Google::Protobuf::DescriptorPool.generated_pool
11
11
 
12
12
  begin
13
13
  pool.add_serialized_file(descriptor_data)
14
- rescue TypeError => e
14
+ rescue TypeError
15
15
  # Compatibility code: will be removed in the next major version.
16
16
  require 'google/protobuf/descriptor_pb'
17
17
  parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
@@ -12,13 +12,13 @@ require 'authzed/api/v1/core_pb'
12
12
  require 'authzed/api/v1/permission_service_pb'
13
13
 
14
14
 
15
- descriptor_data = "\n)authzed/api/v1/experimental_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x19\x61uthzed/api/v1/core.proto\x1a\'authzed/api/v1/permission_service.proto\"\xb9\x01\n#StreamingBulkCheckPermissionRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12S\n\x05items\x18\x02 \x03(\x0b\x32..authzed.api.v1.BulkCheckPermissionRequestItemB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x05items\"\xb0\x01\n\x1a\x42ulkCheckPermissionRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12S\n\x05items\x18\x02 \x03(\x0b\x32..authzed.api.v1.BulkCheckPermissionRequestItemB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x05items\"\xb6\x02\n\x1e\x42ulkCheckPermissionRequestItem\x12\x45\n\x08resource\x18\x01 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x02 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12\x44\n\x07subject\x18\x03 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\"\xae\x01\n\x1b\x42ulkCheckPermissionResponse\x12\x41\n\nchecked_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\tcheckedAt\x12L\n\x05pairs\x18\x02 \x03(\x0b\x32\'.authzed.api.v1.BulkCheckPermissionPairB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x05pairs\"\xb7\x01\n$StreamingBulkCheckPermissionResponse\x12\x41\n\nchecked_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\tcheckedAt\x12L\n\x05pairs\x18\x02 \x03(\x0b\x32\'.authzed.api.v1.BulkCheckPermissionPairB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x05pairs\"\xe2\x01\n\x17\x42ulkCheckPermissionPair\x12H\n\x07request\x18\x01 \x01(\x0b\x32..authzed.api.v1.BulkCheckPermissionRequestItemR\x07request\x12\x45\n\x04item\x18\x02 \x01(\x0b\x32/.authzed.api.v1.BulkCheckPermissionResponseItemH\x00R\x04item\x12*\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00R\x05\x65rrorB\n\n\x08response\"\xea\x01\n\x1f\x42ulkCheckPermissionResponseItem\x12j\n\x0epermissionship\x18\x01 \x01(\x0e\x32\x36.authzed.api.v1.CheckPermissionResponse.PermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x02 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\"s\n\x1e\x42ulkImportRelationshipsRequest\x12Q\n\rrelationships\x18\x01 \x03(\x0b\x32\x1c.authzed.api.v1.RelationshipB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\rrelationships\"@\n\x1f\x42ulkImportRelationshipsResponse\x12\x1d\n\nnum_loaded\x18\x01 \x01(\x04R\tnumLoaded\"\xd3\x01\n\x1e\x42ulkExportRelationshipsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x31\n\x0eoptional_limit\x18\x02 \x01(\rB\n\xfa\x42\x07*\x05\x18\x90N(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x03 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\xad\x01\n\x1f\x42ulkExportRelationshipsResponse\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x01 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\x12\x42\n\rrelationships\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.RelationshipR\rrelationships2\x81\x06\n\x13\x45xperimentalService\x12\xb2\x01\n\x17\x42ulkImportRelationships\x12..authzed.api.v1.BulkImportRelationshipsRequest\x1a/.authzed.api.v1.BulkImportRelationshipsResponse\"4\x82\xd3\xe4\x93\x02.:\x01*\")/v1/experimental/relationships/bulkimport(\x01\x12\xb2\x01\n\x17\x42ulkExportRelationships\x12..authzed.api.v1.BulkExportRelationshipsRequest\x1a/.authzed.api.v1.BulkExportRelationshipsResponse\"4\x82\xd3\xe4\x93\x02.:\x01*\")/v1/experimental/relationships/bulkexport0\x01\x12\xd1\x01\n\x1cStreamingBulkCheckPermission\x12\x33.authzed.api.v1.StreamingBulkCheckPermissionRequest\x1a\x34.authzed.api.v1.StreamingBulkCheckPermissionResponse\"D\x82\xd3\xe4\x93\x02>:\x01*\"9/v1/experimental/permissions/streamingbulkcheckpermission0\x01\x12\xab\x01\n\x13\x42ulkCheckPermission\x12*.authzed.api.v1.BulkCheckPermissionRequest\x1a+.authzed.api.v1.BulkCheckPermissionResponse\";\x82\xd3\xe4\x93\x02\x35:\x01*\"0/v1/experimental/permissions/bulkcheckpermissionBH\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
15
+ descriptor_data = "\n)authzed/api/v1/experimental_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17google/rpc/status.proto\x1a\x19\x61uthzed/api/v1/core.proto\x1a\'authzed/api/v1/permission_service.proto\"\xb9\x01\n#StreamingBulkCheckPermissionRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12S\n\x05items\x18\x02 \x03(\x0b\x32..authzed.api.v1.BulkCheckPermissionRequestItemB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x05items\"\xb0\x01\n\x1a\x42ulkCheckPermissionRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12S\n\x05items\x18\x02 \x03(\x0b\x32..authzed.api.v1.BulkCheckPermissionRequestItemB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x05items\"\xb6\x02\n\x1e\x42ulkCheckPermissionRequestItem\x12\x45\n\x08resource\x18\x01 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x02 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12\x44\n\x07subject\x18\x03 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\"\xae\x01\n\x1b\x42ulkCheckPermissionResponse\x12\x41\n\nchecked_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\tcheckedAt\x12L\n\x05pairs\x18\x02 \x03(\x0b\x32\'.authzed.api.v1.BulkCheckPermissionPairB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x05pairs\"\xb7\x01\n$StreamingBulkCheckPermissionResponse\x12\x41\n\nchecked_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\tcheckedAt\x12L\n\x05pairs\x18\x02 \x03(\x0b\x32\'.authzed.api.v1.BulkCheckPermissionPairB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x05pairs\"\xe2\x01\n\x17\x42ulkCheckPermissionPair\x12H\n\x07request\x18\x01 \x01(\x0b\x32..authzed.api.v1.BulkCheckPermissionRequestItemR\x07request\x12\x45\n\x04item\x18\x02 \x01(\x0b\x32/.authzed.api.v1.BulkCheckPermissionResponseItemH\x00R\x04item\x12*\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00R\x05\x65rrorB\n\n\x08response\"\xea\x01\n\x1f\x42ulkCheckPermissionResponseItem\x12j\n\x0epermissionship\x18\x01 \x01(\x0e\x32\x36.authzed.api.v1.CheckPermissionResponse.PermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x02 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\"s\n\x1e\x42ulkImportRelationshipsRequest\x12Q\n\rrelationships\x18\x01 \x03(\x0b\x32\x1c.authzed.api.v1.RelationshipB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\rrelationships\"@\n\x1f\x42ulkImportRelationshipsResponse\x12\x1d\n\nnum_loaded\x18\x01 \x01(\x04R\tnumLoaded\"\xd3\x01\n\x1e\x42ulkExportRelationshipsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x31\n\x0eoptional_limit\x18\x02 \x01(\rB\n\xfa\x42\x07*\x05\x18\x90N(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x03 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\xad\x01\n\x1f\x42ulkExportRelationshipsResponse\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x01 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\x12\x42\n\rrelationships\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.RelationshipR\rrelationships2\x81\x06\n\x13\x45xperimentalService\x12\xb2\x01\n\x17\x42ulkImportRelationships\x12..authzed.api.v1.BulkImportRelationshipsRequest\x1a/.authzed.api.v1.BulkImportRelationshipsResponse\"4\x82\xd3\xe4\x93\x02.\")/v1/experimental/relationships/bulkimport:\x01*(\x01\x12\xb2\x01\n\x17\x42ulkExportRelationships\x12..authzed.api.v1.BulkExportRelationshipsRequest\x1a/.authzed.api.v1.BulkExportRelationshipsResponse\"4\x82\xd3\xe4\x93\x02.\")/v1/experimental/relationships/bulkexport:\x01*0\x01\x12\xd1\x01\n\x1cStreamingBulkCheckPermission\x12\x33.authzed.api.v1.StreamingBulkCheckPermissionRequest\x1a\x34.authzed.api.v1.StreamingBulkCheckPermissionResponse\"D\x82\xd3\xe4\x93\x02>\"9/v1/experimental/permissions/streamingbulkcheckpermission:\x01*0\x01\x12\xab\x01\n\x13\x42ulkCheckPermission\x12*.authzed.api.v1.BulkCheckPermissionRequest\x1a+.authzed.api.v1.BulkCheckPermissionResponse\";\x82\xd3\xe4\x93\x02\x35\"0/v1/experimental/permissions/bulkcheckpermission:\x01*BH\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
16
16
 
17
17
  pool = Google::Protobuf::DescriptorPool.generated_pool
18
18
 
19
19
  begin
20
20
  pool.add_serialized_file(descriptor_data)
21
- rescue TypeError => e
21
+ rescue TypeError
22
22
  # Compatibility code: will be removed in the next major version.
23
23
  require 'google/protobuf/descriptor_pb'
24
24
  parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
@@ -13,7 +13,7 @@ pool = Google::Protobuf::DescriptorPool.generated_pool
13
13
 
14
14
  begin
15
15
  pool.add_serialized_file(descriptor_data)
16
- rescue TypeError => e
16
+ rescue TypeError
17
17
  # Compatibility code: will be removed in the next major version.
18
18
  require 'google/protobuf/descriptor_pb'
19
19
  parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
@@ -10,13 +10,13 @@ require 'validate/validate_pb'
10
10
  require 'authzed/api/v1/core_pb'
11
11
 
12
12
 
13
- descriptor_data = "\n\'authzed/api/v1/permission_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\x9c\x02\n\x0b\x43onsistency\x12\x34\n\x10minimize_latency\x18\x01 \x01(\x08\x42\x07\xfa\x42\x04j\x02\x08\x01H\x00R\x0fminimizeLatency\x12\x45\n\x11\x61t_least_as_fresh\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenH\x00R\x0e\x61tLeastAsFresh\x12\x46\n\x11\x61t_exact_snapshot\x18\x03 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenH\x00R\x0f\x61tExactSnapshot\x12\x34\n\x10\x66ully_consistent\x18\x04 \x01(\x08\x42\x07\xfa\x42\x04j\x02\x08\x01H\x00R\x0f\x66ullyConsistentB\x12\n\x0brequirement\x12\x03\xf8\x42\x01\"\x8c\x03\n\x12RelationshipFilter\x12m\n\rresource_type\x18\x01 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x0cresourceType\x12W\n\x14optional_resource_id\x18\x02 \x01(\tB%\xfa\x42\"r (\x80\x08\x32\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$R\x12optionalResourceId\x12W\n\x11optional_relation\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x10optionalRelation\x12U\n\x17optional_subject_filter\x18\x04 \x01(\x0b\x32\x1d.authzed.api.v1.SubjectFilterR\x15optionalSubjectFilter\"\x8d\x03\n\rSubjectFilter\x12k\n\x0csubject_type\x18\x01 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x0bsubjectType\x12Z\n\x13optional_subject_id\x18\x02 \x01(\tB*\xfa\x42\'r%(\x80\x08\x32 ^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$R\x11optionalSubjectId\x12Y\n\x11optional_relation\x18\x03 \x01(\x0b\x32,.authzed.api.v1.SubjectFilter.RelationFilterR\x10optionalRelation\x1aX\n\x0eRelationFilter\x12\x46\n\x08relation\x18\x01 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x08relation\"\xac\x02\n\x18ReadRelationshipsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12]\n\x13relationship_filter\x18\x02 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x12relationshipFilter\x12\x31\n\x0eoptional_limit\x18\x03 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x04 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\xec\x01\n\x19ReadRelationshipsResponse\x12;\n\x07read_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06readAt\x12J\n\x0crelationship\x18\x02 \x01(\x0b\x32\x1c.authzed.api.v1.RelationshipB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x0crelationship\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x03 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\x86\x02\n\x0cPrecondition\x12P\n\toperation\x18\x01 \x01(\x0e\x32&.authzed.api.v1.Precondition.OperationB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\toperation\x12\x44\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06\x66ilter\"^\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18OPERATION_MUST_NOT_MATCH\x10\x01\x12\x18\n\x14OPERATION_MUST_MATCH\x10\x02\"\xcc\x01\n\x19WriteRelationshipsRequest\x12K\n\x07updates\x18\x01 \x03(\x0b\x32\".authzed.api.v1.RelationshipUpdateB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x07updates\x12\x62\n\x16optional_preconditions\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.PreconditionB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x15optionalPreconditions\"U\n\x1aWriteRelationshipsResponse\x12\x37\n\nwritten_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\twrittenAt\"\xdb\x02\n\x1a\x44\x65leteRelationshipsRequest\x12]\n\x13relationship_filter\x18\x01 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x12relationshipFilter\x12\x62\n\x16optional_preconditions\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.PreconditionB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x15optionalPreconditions\x12\x31\n\x0eoptional_limit\x18\x03 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\roptionalLimit\x12G\n optional_allow_partial_deletions\x18\x04 \x01(\x08R\x1doptionalAllowPartialDeletions\"\xb7\x02\n\x1b\x44\x65leteRelationshipsResponse\x12\x37\n\ndeleted_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\tdeletedAt\x12i\n\x11\x64\x65letion_progress\x18\x02 \x01(\x0e\x32<.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgressR\x10\x64\x65letionProgress\"t\n\x10\x44\x65letionProgress\x12!\n\x1d\x44\x45LETION_PROGRESS_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x44\x45LETION_PROGRESS_COMPLETE\x10\x01\x12\x1d\n\x19\x44\x45LETION_PROGRESS_PARTIAL\x10\x02\"\xed\x02\n\x16\x43heckPermissionRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12\x44\n\x07subject\x18\x04 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\"\xc8\x03\n\x17\x43heckPermissionResponse\x12\x41\n\nchecked_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\tcheckedAt\x12j\n\x0epermissionship\x18\x02 \x01(\x0e\x32\x36.authzed.api.v1.CheckPermissionResponse.PermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x03 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\"\xa0\x01\n\x0ePermissionship\x12\x1e\n\x1aPERMISSIONSHIP_UNSPECIFIED\x10\x00\x12 \n\x1cPERMISSIONSHIP_NO_PERMISSION\x10\x01\x12!\n\x1dPERMISSIONSHIP_HAS_PERMISSION\x10\x02\x12)\n%PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x03\"\xef\x01\n\x1b\x45xpandPermissionTreeRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\"\xa2\x01\n\x1c\x45xpandPermissionTreeResponse\x12\x39\n\x0b\x65xpanded_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nexpandedAt\x12G\n\ttree_root\x18\x02 \x01(\x0b\x32*.authzed.api.v1.PermissionRelationshipTreeR\x08treeRoot\"\x93\x04\n\x16LookupResourcesRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12z\n\x14resource_object_type\x18\x02 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x12resourceObjectType\x12G\n\npermission\x18\x03 \x01(\tB\'\xfa\x42$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\npermission\x12\x44\n\x07subject\x18\x04 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\x12\x31\n\x0eoptional_limit\x18\x06 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x07 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\x82\x03\n\x17LookupResourcesResponse\x12:\n\x0clooked_up_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nlookedUpAt\x12,\n\x12resource_object_id\x18\x02 \x01(\tR\x10resourceObjectId\x12X\n\x0epermissionship\x18\x03 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x04 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x05 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\xed\x06\n\x15LookupSubjectsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12x\n\x13subject_object_type\x18\x04 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x11subjectObjectType\x12\x66\n\x19optional_subject_relation\x18\x05 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x17optionalSubjectRelation\x12;\n\x07\x63ontext\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\x12\x42\n\x17optional_concrete_limit\x18\x07 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\x15optionalConcreteLimit\x12?\n\x0foptional_cursor\x18\x08 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\x12]\n\x0fwildcard_option\x18\t \x01(\x0e\x32\x34.authzed.api.v1.LookupSubjectsRequest.WildcardOptionR\x0ewildcardOption\"\x7f\n\x0eWildcardOption\x12\x1f\n\x1bWILDCARD_OPTION_UNSPECIFIED\x10\x00\x12%\n!WILDCARD_OPTION_INCLUDE_WILDCARDS\x10\x01\x12%\n!WILDCARD_OPTION_EXCLUDE_WILDCARDS\x10\x02\"\xc6\x04\n\x16LookupSubjectsResponse\x12:\n\x0clooked_up_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nlookedUpAt\x12.\n\x11subject_object_id\x18\x02 \x01(\tB\x02\x18\x01R\x0fsubjectObjectId\x12\x34\n\x14\x65xcluded_subject_ids\x18\x03 \x03(\tB\x02\x18\x01R\x12\x65xcludedSubjectIds\x12Z\n\x0epermissionship\x18\x04 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\x0c\x18\x01\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12]\n\x13partial_caveat_info\x18\x05 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\n\x18\x01\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\x12\x39\n\x07subject\x18\x06 \x01(\x0b\x32\x1f.authzed.api.v1.ResolvedSubjectR\x07subject\x12L\n\x11\x65xcluded_subjects\x18\x07 \x03(\x0b\x32\x1f.authzed.api.v1.ResolvedSubjectR\x10\x65xcludedSubjects\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x08 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\xf4\x01\n\x0fResolvedSubject\x12*\n\x11subject_object_id\x18\x01 \x01(\tR\x0fsubjectObjectId\x12X\n\x0epermissionship\x18\x02 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x03 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo*\x99\x01\n\x14LookupPermissionship\x12%\n!LOOKUP_PERMISSIONSHIP_UNSPECIFIED\x10\x00\x12(\n$LOOKUP_PERMISSIONSHIP_HAS_PERMISSION\x10\x01\x12\x30\n,LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x02\x32\x80\x08\n\x12PermissionsService\x12\x8d\x01\n\x11ReadRelationships\x12(.authzed.api.v1.ReadRelationshipsRequest\x1a).authzed.api.v1.ReadRelationshipsResponse\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/v1/relationships/read0\x01\x12\x8f\x01\n\x12WriteRelationships\x12).authzed.api.v1.WriteRelationshipsRequest\x1a*.authzed.api.v1.WriteRelationshipsResponse\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/v1/relationships/write\x12\x93\x01\n\x13\x44\x65leteRelationships\x12*.authzed.api.v1.DeleteRelationshipsRequest\x1a+.authzed.api.v1.DeleteRelationshipsResponse\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/v1/relationships/delete\x12\x84\x01\n\x0f\x43heckPermission\x12&.authzed.api.v1.CheckPermissionRequest\x1a\'.authzed.api.v1.CheckPermissionResponse\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/v1/permissions/check\x12\x94\x01\n\x14\x45xpandPermissionTree\x12+.authzed.api.v1.ExpandPermissionTreeRequest\x1a,.authzed.api.v1.ExpandPermissionTreeResponse\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/v1/permissions/expand\x12\x8a\x01\n\x0fLookupResources\x12&.authzed.api.v1.LookupResourcesRequest\x1a\'.authzed.api.v1.LookupResourcesResponse\"$\x82\xd3\xe4\x93\x02\x1e:\x01*\"\x19/v1/permissions/resources0\x01\x12\x86\x01\n\x0eLookupSubjects\x12%.authzed.api.v1.LookupSubjectsRequest\x1a&.authzed.api.v1.LookupSubjectsResponse\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/v1/permissions/subjects0\x01\x42H\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
13
+ descriptor_data = "\n\'authzed/api/v1/permission_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\x9c\x02\n\x0b\x43onsistency\x12\x34\n\x10minimize_latency\x18\x01 \x01(\x08\x42\x07\xfa\x42\x04j\x02\x08\x01H\x00R\x0fminimizeLatency\x12\x45\n\x11\x61t_least_as_fresh\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenH\x00R\x0e\x61tLeastAsFresh\x12\x46\n\x11\x61t_exact_snapshot\x18\x03 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenH\x00R\x0f\x61tExactSnapshot\x12\x34\n\x10\x66ully_consistent\x18\x04 \x01(\x08\x42\x07\xfa\x42\x04j\x02\x08\x01H\x00R\x0f\x66ullyConsistentB\x12\n\x0brequirement\x12\x03\xf8\x42\x01\"\x8c\x03\n\x12RelationshipFilter\x12m\n\rresource_type\x18\x01 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x0cresourceType\x12W\n\x14optional_resource_id\x18\x02 \x01(\tB%\xfa\x42\"r (\x80\x08\x32\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$R\x12optionalResourceId\x12W\n\x11optional_relation\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x10optionalRelation\x12U\n\x17optional_subject_filter\x18\x04 \x01(\x0b\x32\x1d.authzed.api.v1.SubjectFilterR\x15optionalSubjectFilter\"\x8d\x03\n\rSubjectFilter\x12k\n\x0csubject_type\x18\x01 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x0bsubjectType\x12Z\n\x13optional_subject_id\x18\x02 \x01(\tB*\xfa\x42\'r%(\x80\x08\x32 ^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$R\x11optionalSubjectId\x12Y\n\x11optional_relation\x18\x03 \x01(\x0b\x32,.authzed.api.v1.SubjectFilter.RelationFilterR\x10optionalRelation\x1aX\n\x0eRelationFilter\x12\x46\n\x08relation\x18\x01 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x08relation\"\xac\x02\n\x18ReadRelationshipsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12]\n\x13relationship_filter\x18\x02 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x12relationshipFilter\x12\x31\n\x0eoptional_limit\x18\x03 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x04 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\xec\x01\n\x19ReadRelationshipsResponse\x12;\n\x07read_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06readAt\x12J\n\x0crelationship\x18\x02 \x01(\x0b\x32\x1c.authzed.api.v1.RelationshipB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x0crelationship\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x03 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\x86\x02\n\x0cPrecondition\x12P\n\toperation\x18\x01 \x01(\x0e\x32&.authzed.api.v1.Precondition.OperationB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\toperation\x12\x44\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06\x66ilter\"^\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18OPERATION_MUST_NOT_MATCH\x10\x01\x12\x18\n\x14OPERATION_MUST_MATCH\x10\x02\"\xcc\x01\n\x19WriteRelationshipsRequest\x12K\n\x07updates\x18\x01 \x03(\x0b\x32\".authzed.api.v1.RelationshipUpdateB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x07updates\x12\x62\n\x16optional_preconditions\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.PreconditionB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x15optionalPreconditions\"U\n\x1aWriteRelationshipsResponse\x12\x37\n\nwritten_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\twrittenAt\"\xdb\x02\n\x1a\x44\x65leteRelationshipsRequest\x12]\n\x13relationship_filter\x18\x01 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x12relationshipFilter\x12\x62\n\x16optional_preconditions\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.PreconditionB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x15optionalPreconditions\x12\x31\n\x0eoptional_limit\x18\x03 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\roptionalLimit\x12G\n optional_allow_partial_deletions\x18\x04 \x01(\x08R\x1doptionalAllowPartialDeletions\"\xb7\x02\n\x1b\x44\x65leteRelationshipsResponse\x12\x37\n\ndeleted_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\tdeletedAt\x12i\n\x11\x64\x65letion_progress\x18\x02 \x01(\x0e\x32<.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgressR\x10\x64\x65letionProgress\"t\n\x10\x44\x65letionProgress\x12!\n\x1d\x44\x45LETION_PROGRESS_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x44\x45LETION_PROGRESS_COMPLETE\x10\x01\x12\x1d\n\x19\x44\x45LETION_PROGRESS_PARTIAL\x10\x02\"\xed\x02\n\x16\x43heckPermissionRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12\x44\n\x07subject\x18\x04 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\"\xc8\x03\n\x17\x43heckPermissionResponse\x12\x41\n\nchecked_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\tcheckedAt\x12j\n\x0epermissionship\x18\x02 \x01(\x0e\x32\x36.authzed.api.v1.CheckPermissionResponse.PermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x03 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\"\xa0\x01\n\x0ePermissionship\x12\x1e\n\x1aPERMISSIONSHIP_UNSPECIFIED\x10\x00\x12 \n\x1cPERMISSIONSHIP_NO_PERMISSION\x10\x01\x12!\n\x1dPERMISSIONSHIP_HAS_PERMISSION\x10\x02\x12)\n%PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x03\"\xef\x01\n\x1b\x45xpandPermissionTreeRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\"\xa2\x01\n\x1c\x45xpandPermissionTreeResponse\x12\x39\n\x0b\x65xpanded_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nexpandedAt\x12G\n\ttree_root\x18\x02 \x01(\x0b\x32*.authzed.api.v1.PermissionRelationshipTreeR\x08treeRoot\"\x93\x04\n\x16LookupResourcesRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12z\n\x14resource_object_type\x18\x02 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x12resourceObjectType\x12G\n\npermission\x18\x03 \x01(\tB\'\xfa\x42$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\npermission\x12\x44\n\x07subject\x18\x04 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\x12\x31\n\x0eoptional_limit\x18\x06 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x07 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\x82\x03\n\x17LookupResourcesResponse\x12:\n\x0clooked_up_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nlookedUpAt\x12,\n\x12resource_object_id\x18\x02 \x01(\tR\x10resourceObjectId\x12X\n\x0epermissionship\x18\x03 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x04 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x05 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\xed\x06\n\x15LookupSubjectsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12x\n\x13subject_object_type\x18\x04 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x11subjectObjectType\x12\x66\n\x19optional_subject_relation\x18\x05 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x17optionalSubjectRelation\x12;\n\x07\x63ontext\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\x12\x42\n\x17optional_concrete_limit\x18\x07 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\x15optionalConcreteLimit\x12?\n\x0foptional_cursor\x18\x08 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\x12]\n\x0fwildcard_option\x18\t \x01(\x0e\x32\x34.authzed.api.v1.LookupSubjectsRequest.WildcardOptionR\x0ewildcardOption\"\x7f\n\x0eWildcardOption\x12\x1f\n\x1bWILDCARD_OPTION_UNSPECIFIED\x10\x00\x12%\n!WILDCARD_OPTION_INCLUDE_WILDCARDS\x10\x01\x12%\n!WILDCARD_OPTION_EXCLUDE_WILDCARDS\x10\x02\"\xc6\x04\n\x16LookupSubjectsResponse\x12:\n\x0clooked_up_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nlookedUpAt\x12.\n\x11subject_object_id\x18\x02 \x01(\tB\x02\x18\x01R\x0fsubjectObjectId\x12\x34\n\x14\x65xcluded_subject_ids\x18\x03 \x03(\tB\x02\x18\x01R\x12\x65xcludedSubjectIds\x12Z\n\x0epermissionship\x18\x04 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\x0c\x18\x01\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12]\n\x13partial_caveat_info\x18\x05 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\n\x18\x01\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\x12\x39\n\x07subject\x18\x06 \x01(\x0b\x32\x1f.authzed.api.v1.ResolvedSubjectR\x07subject\x12L\n\x11\x65xcluded_subjects\x18\x07 \x03(\x0b\x32\x1f.authzed.api.v1.ResolvedSubjectR\x10\x65xcludedSubjects\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x08 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\xf4\x01\n\x0fResolvedSubject\x12*\n\x11subject_object_id\x18\x01 \x01(\tR\x0fsubjectObjectId\x12X\n\x0epermissionship\x18\x02 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x03 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo*\x99\x01\n\x14LookupPermissionship\x12%\n!LOOKUP_PERMISSIONSHIP_UNSPECIFIED\x10\x00\x12(\n$LOOKUP_PERMISSIONSHIP_HAS_PERMISSION\x10\x01\x12\x30\n,LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x02\x32\x80\x08\n\x12PermissionsService\x12\x8d\x01\n\x11ReadRelationships\x12(.authzed.api.v1.ReadRelationshipsRequest\x1a).authzed.api.v1.ReadRelationshipsResponse\"!\x82\xd3\xe4\x93\x02\x1b\"\x16/v1/relationships/read:\x01*0\x01\x12\x8f\x01\n\x12WriteRelationships\x12).authzed.api.v1.WriteRelationshipsRequest\x1a*.authzed.api.v1.WriteRelationshipsResponse\"\"\x82\xd3\xe4\x93\x02\x1c\"\x17/v1/relationships/write:\x01*\x12\x93\x01\n\x13\x44\x65leteRelationships\x12*.authzed.api.v1.DeleteRelationshipsRequest\x1a+.authzed.api.v1.DeleteRelationshipsResponse\"#\x82\xd3\xe4\x93\x02\x1d\"\x18/v1/relationships/delete:\x01*\x12\x84\x01\n\x0f\x43heckPermission\x12&.authzed.api.v1.CheckPermissionRequest\x1a\'.authzed.api.v1.CheckPermissionResponse\" \x82\xd3\xe4\x93\x02\x1a\"\x15/v1/permissions/check:\x01*\x12\x94\x01\n\x14\x45xpandPermissionTree\x12+.authzed.api.v1.ExpandPermissionTreeRequest\x1a,.authzed.api.v1.ExpandPermissionTreeResponse\"!\x82\xd3\xe4\x93\x02\x1b\"\x16/v1/permissions/expand:\x01*\x12\x8a\x01\n\x0fLookupResources\x12&.authzed.api.v1.LookupResourcesRequest\x1a\'.authzed.api.v1.LookupResourcesResponse\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/v1/permissions/resources:\x01*0\x01\x12\x86\x01\n\x0eLookupSubjects\x12%.authzed.api.v1.LookupSubjectsRequest\x1a&.authzed.api.v1.LookupSubjectsResponse\"#\x82\xd3\xe4\x93\x02\x1d\"\x18/v1/permissions/subjects:\x01*0\x01\x42H\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
14
14
 
15
15
  pool = Google::Protobuf::DescriptorPool.generated_pool
16
16
 
17
17
  begin
18
18
  pool.add_serialized_file(descriptor_data)
19
- rescue TypeError => e
19
+ rescue TypeError
20
20
  # Compatibility code: will be removed in the next major version.
21
21
  require 'google/protobuf/descriptor_pb'
22
22
  parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
@@ -9,13 +9,13 @@ require 'validate/validate_pb'
9
9
  require 'authzed/api/v1/core_pb'
10
10
 
11
11
 
12
- descriptor_data = "\n#authzed/api/v1/schema_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\x13\n\x11ReadSchemaRequest\"r\n\x12ReadSchemaResponse\x12\x1f\n\x0bschema_text\x18\x01 \x01(\tR\nschemaText\x12;\n\x07read_at\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06readAt\"7\n\x12WriteSchemaRequest\x12!\n\x06schema\x18\x01 \x01(\tB\t\xfa\x42\x06r\x04(\x80\x80\x10R\x06schema\"X\n\x13WriteSchemaResponse\x12\x41\n\nwritten_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\twrittenAt2\xf5\x01\n\rSchemaService\x12o\n\nReadSchema\x12!.authzed.api.v1.ReadSchemaRequest\x1a\".authzed.api.v1.ReadSchemaResponse\"\x1a\x82\xd3\xe4\x93\x02\x14:\x01*\"\x0f/v1/schema/read\x12s\n\x0bWriteSchema\x12\".authzed.api.v1.WriteSchemaRequest\x1a#.authzed.api.v1.WriteSchemaResponse\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/v1/schema/writeBH\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
12
+ descriptor_data = "\n#authzed/api/v1/schema_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\x13\n\x11ReadSchemaRequest\"r\n\x12ReadSchemaResponse\x12\x1f\n\x0bschema_text\x18\x01 \x01(\tR\nschemaText\x12;\n\x07read_at\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06readAt\"7\n\x12WriteSchemaRequest\x12!\n\x06schema\x18\x01 \x01(\tB\t\xfa\x42\x06r\x04(\x80\x80\x10R\x06schema\"X\n\x13WriteSchemaResponse\x12\x41\n\nwritten_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\twrittenAt2\xf5\x01\n\rSchemaService\x12o\n\nReadSchema\x12!.authzed.api.v1.ReadSchemaRequest\x1a\".authzed.api.v1.ReadSchemaResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\"\x0f/v1/schema/read:\x01*\x12s\n\x0bWriteSchema\x12\".authzed.api.v1.WriteSchemaRequest\x1a#.authzed.api.v1.WriteSchemaResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/schema/write:\x01*BH\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
13
13
 
14
14
  pool = Google::Protobuf::DescriptorPool.generated_pool
15
15
 
16
16
  begin
17
17
  pool.add_serialized_file(descriptor_data)
18
- rescue TypeError => e
18
+ rescue TypeError
19
19
  # Compatibility code: will be removed in the next major version.
20
20
  require 'google/protobuf/descriptor_pb'
21
21
  parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
@@ -9,13 +9,13 @@ require 'validate/validate_pb'
9
9
  require 'authzed/api/v1/core_pb'
10
10
 
11
11
 
12
- descriptor_data = "\n\"authzed/api/v1/watch_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\xe2\x01\n\x0cWatchRequest\x12\x83\x01\n\x15optional_object_types\x18\x01 \x03(\tBO\xfa\x42L\x92\x01I\x08\x00\"ErC(\x80\x01\x32>^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x13optionalObjectTypes\x12L\n\x15optional_start_cursor\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x13optionalStartCursor\"\x90\x01\n\rWatchResponse\x12<\n\x07updates\x18\x01 \x03(\x0b\x32\".authzed.api.v1.RelationshipUpdateR\x07updates\x12\x41\n\x0f\x63hanges_through\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x0e\x63hangesThrough2l\n\x0cWatchService\x12\\\n\x05Watch\x12\x1c.authzed.api.v1.WatchRequest\x1a\x1d.authzed.api.v1.WatchResponse\"\x14\x82\xd3\xe4\x93\x02\x0e:\x01*\"\t/v1/watch0\x01\x42H\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
12
+ descriptor_data = "\n\"authzed/api/v1/watch_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\xe2\x01\n\x0cWatchRequest\x12\x83\x01\n\x15optional_object_types\x18\x01 \x03(\tBO\xfa\x42L\x92\x01I\x08\x00\"ErC(\x80\x01\x32>^([a-z][a-z0-9_]{1,62}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x13optionalObjectTypes\x12L\n\x15optional_start_cursor\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x13optionalStartCursor\"\x90\x01\n\rWatchResponse\x12<\n\x07updates\x18\x01 \x03(\x0b\x32\".authzed.api.v1.RelationshipUpdateR\x07updates\x12\x41\n\x0f\x63hanges_through\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x0e\x63hangesThrough2l\n\x0cWatchService\x12\\\n\x05Watch\x12\x1c.authzed.api.v1.WatchRequest\x1a\x1d.authzed.api.v1.WatchResponse\"\x14\x82\xd3\xe4\x93\x02\x0e\"\t/v1/watch:\x01*0\x01\x42H\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3"
13
13
 
14
14
  pool = Google::Protobuf::DescriptorPool.generated_pool
15
15
 
16
16
  begin
17
17
  pool.add_serialized_file(descriptor_data)
18
- rescue TypeError => e
18
+ rescue TypeError
19
19
  # Compatibility code: will be removed in the next major version.
20
20
  require 'google/protobuf/descriptor_pb'
21
21
  parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
@@ -0,0 +1,31 @@
1
+ # Generated protoc-gen-validate descriptors
2
+
3
+ Changes introduced after Ruby protoc changes described in https://protobuf.dev/news/2023-04-20/
4
+
5
+ The blog post reads
6
+
7
+ > add_serialized_file verifies that all dependencies listed in the descriptor were previously added with add_serialized_file. Generally that should be fine, because the generated code will contain Ruby require statements for all dependencies, and the descriptor will fail to load anyway if the types depended on were not previously defined in the DescriptorPool.
8
+
9
+ `protoc-gen-validate` does not offer ruby templates for protoc, so for `authzed-rb` the workaround has been to
10
+ generate an empty stub to satisfy the import.
11
+
12
+ The new Ruby code expects all type descriptors to be loaded, so a warning emerges when a dependency hasn't been loaded:
13
+
14
+ ```
15
+ #<Google::Protobuf::TypeError: Unable to build file to DescriptorPool: Depends on file 'validate/validate.proto', but it has not been loaded>
16
+
17
+ Warning: Protobuf detected an import path issue while loading generated file /usr/local/rvm/gems/ruby-3.1.4/gems/authzed-0.7.0/lib/authzed/api/v1/core_pb.rb
18
+ Each proto file must use a consistent fully-qualified name.
19
+ This will become an error in the next major version.
20
+ ```
21
+
22
+ This folder vendors the `validate.proto` file and generates Ruby code out of it using buf.
23
+
24
+ ## How to generate
25
+
26
+ ```bash
27
+ # run from /lib folder
28
+ ./validate/buf.gen.yaml
29
+ ```
30
+
31
+ Note: It's important to run this from /lib, to make sure the generated descriptor name matches `validate/validate.proto`
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env -S buf generate --template
2
+ version: "v1"
3
+ plugins:
4
+ - name: "ruby"
5
+ out: "."
@@ -0,0 +1,2 @@
1
+ # Generated by buf. DO NOT EDIT.
2
+ version: v1
@@ -0,0 +1,3 @@
1
+ ---
2
+ version: "v1"
3
+ name: "buf.build/envoyproxy/protoc-gen-validate"
@@ -0,0 +1,862 @@
1
+ syntax = "proto2";
2
+ package validate;
3
+
4
+ option go_package = "github.com/envoyproxy/protoc-gen-validate/validate";
5
+ option java_package = "io.envoyproxy.pgv.validate";
6
+
7
+ import "google/protobuf/descriptor.proto";
8
+ import "google/protobuf/duration.proto";
9
+ import "google/protobuf/timestamp.proto";
10
+
11
+ // Validation rules applied at the message level
12
+ extend google.protobuf.MessageOptions {
13
+ // Disabled nullifies any validation rules for this message, including any
14
+ // message fields associated with it that do support validation.
15
+ optional bool disabled = 1071;
16
+ // Ignore skips generation of validation methods for this message.
17
+ optional bool ignored = 1072;
18
+ }
19
+
20
+ // Validation rules applied at the oneof level
21
+ extend google.protobuf.OneofOptions {
22
+ // Required ensures that exactly one the field options in a oneof is set;
23
+ // validation fails if no fields in the oneof are set.
24
+ optional bool required = 1071;
25
+ }
26
+
27
+ // Validation rules applied at the field level
28
+ extend google.protobuf.FieldOptions {
29
+ // Rules specify the validations to be performed on this field. By default,
30
+ // no validation is performed against a field.
31
+ optional FieldRules rules = 1071;
32
+ }
33
+
34
+ // FieldRules encapsulates the rules for each type of field. Depending on the
35
+ // field, the correct set should be used to ensure proper validations.
36
+ message FieldRules {
37
+ optional MessageRules message = 17;
38
+ oneof type {
39
+ // Scalar Field Types
40
+ FloatRules float = 1;
41
+ DoubleRules double = 2;
42
+ Int32Rules int32 = 3;
43
+ Int64Rules int64 = 4;
44
+ UInt32Rules uint32 = 5;
45
+ UInt64Rules uint64 = 6;
46
+ SInt32Rules sint32 = 7;
47
+ SInt64Rules sint64 = 8;
48
+ Fixed32Rules fixed32 = 9;
49
+ Fixed64Rules fixed64 = 10;
50
+ SFixed32Rules sfixed32 = 11;
51
+ SFixed64Rules sfixed64 = 12;
52
+ BoolRules bool = 13;
53
+ StringRules string = 14;
54
+ BytesRules bytes = 15;
55
+
56
+ // Complex Field Types
57
+ EnumRules enum = 16;
58
+ RepeatedRules repeated = 18;
59
+ MapRules map = 19;
60
+
61
+ // Well-Known Field Types
62
+ AnyRules any = 20;
63
+ DurationRules duration = 21;
64
+ TimestampRules timestamp = 22;
65
+ }
66
+ }
67
+
68
+ // FloatRules describes the constraints applied to `float` values
69
+ message FloatRules {
70
+ // Const specifies that this field must be exactly the specified value
71
+ optional float const = 1;
72
+
73
+ // Lt specifies that this field must be less than the specified value,
74
+ // exclusive
75
+ optional float lt = 2;
76
+
77
+ // Lte specifies that this field must be less than or equal to the
78
+ // specified value, inclusive
79
+ optional float lte = 3;
80
+
81
+ // Gt specifies that this field must be greater than the specified value,
82
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
83
+ // range is reversed.
84
+ optional float gt = 4;
85
+
86
+ // Gte specifies that this field must be greater than or equal to the
87
+ // specified value, inclusive. If the value of Gte is larger than a
88
+ // specified Lt or Lte, the range is reversed.
89
+ optional float gte = 5;
90
+
91
+ // In specifies that this field must be equal to one of the specified
92
+ // values
93
+ repeated float in = 6;
94
+
95
+ // NotIn specifies that this field cannot be equal to one of the specified
96
+ // values
97
+ repeated float not_in = 7;
98
+
99
+ // IgnoreEmpty specifies that the validation rules of this field should be
100
+ // evaluated only if the field is not empty
101
+ optional bool ignore_empty = 8;
102
+ }
103
+
104
+ // DoubleRules describes the constraints applied to `double` values
105
+ message DoubleRules {
106
+ // Const specifies that this field must be exactly the specified value
107
+ optional double const = 1;
108
+
109
+ // Lt specifies that this field must be less than the specified value,
110
+ // exclusive
111
+ optional double lt = 2;
112
+
113
+ // Lte specifies that this field must be less than or equal to the
114
+ // specified value, inclusive
115
+ optional double lte = 3;
116
+
117
+ // Gt specifies that this field must be greater than the specified value,
118
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
119
+ // range is reversed.
120
+ optional double gt = 4;
121
+
122
+ // Gte specifies that this field must be greater than or equal to the
123
+ // specified value, inclusive. If the value of Gte is larger than a
124
+ // specified Lt or Lte, the range is reversed.
125
+ optional double gte = 5;
126
+
127
+ // In specifies that this field must be equal to one of the specified
128
+ // values
129
+ repeated double in = 6;
130
+
131
+ // NotIn specifies that this field cannot be equal to one of the specified
132
+ // values
133
+ repeated double not_in = 7;
134
+
135
+ // IgnoreEmpty specifies that the validation rules of this field should be
136
+ // evaluated only if the field is not empty
137
+ optional bool ignore_empty = 8;
138
+ }
139
+
140
+ // Int32Rules describes the constraints applied to `int32` values
141
+ message Int32Rules {
142
+ // Const specifies that this field must be exactly the specified value
143
+ optional int32 const = 1;
144
+
145
+ // Lt specifies that this field must be less than the specified value,
146
+ // exclusive
147
+ optional int32 lt = 2;
148
+
149
+ // Lte specifies that this field must be less than or equal to the
150
+ // specified value, inclusive
151
+ optional int32 lte = 3;
152
+
153
+ // Gt specifies that this field must be greater than the specified value,
154
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
155
+ // range is reversed.
156
+ optional int32 gt = 4;
157
+
158
+ // Gte specifies that this field must be greater than or equal to the
159
+ // specified value, inclusive. If the value of Gte is larger than a
160
+ // specified Lt or Lte, the range is reversed.
161
+ optional int32 gte = 5;
162
+
163
+ // In specifies that this field must be equal to one of the specified
164
+ // values
165
+ repeated int32 in = 6;
166
+
167
+ // NotIn specifies that this field cannot be equal to one of the specified
168
+ // values
169
+ repeated int32 not_in = 7;
170
+
171
+ // IgnoreEmpty specifies that the validation rules of this field should be
172
+ // evaluated only if the field is not empty
173
+ optional bool ignore_empty = 8;
174
+ }
175
+
176
+ // Int64Rules describes the constraints applied to `int64` values
177
+ message Int64Rules {
178
+ // Const specifies that this field must be exactly the specified value
179
+ optional int64 const = 1;
180
+
181
+ // Lt specifies that this field must be less than the specified value,
182
+ // exclusive
183
+ optional int64 lt = 2;
184
+
185
+ // Lte specifies that this field must be less than or equal to the
186
+ // specified value, inclusive
187
+ optional int64 lte = 3;
188
+
189
+ // Gt specifies that this field must be greater than the specified value,
190
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
191
+ // range is reversed.
192
+ optional int64 gt = 4;
193
+
194
+ // Gte specifies that this field must be greater than or equal to the
195
+ // specified value, inclusive. If the value of Gte is larger than a
196
+ // specified Lt or Lte, the range is reversed.
197
+ optional int64 gte = 5;
198
+
199
+ // In specifies that this field must be equal to one of the specified
200
+ // values
201
+ repeated int64 in = 6;
202
+
203
+ // NotIn specifies that this field cannot be equal to one of the specified
204
+ // values
205
+ repeated int64 not_in = 7;
206
+
207
+ // IgnoreEmpty specifies that the validation rules of this field should be
208
+ // evaluated only if the field is not empty
209
+ optional bool ignore_empty = 8;
210
+ }
211
+
212
+ // UInt32Rules describes the constraints applied to `uint32` values
213
+ message UInt32Rules {
214
+ // Const specifies that this field must be exactly the specified value
215
+ optional uint32 const = 1;
216
+
217
+ // Lt specifies that this field must be less than the specified value,
218
+ // exclusive
219
+ optional uint32 lt = 2;
220
+
221
+ // Lte specifies that this field must be less than or equal to the
222
+ // specified value, inclusive
223
+ optional uint32 lte = 3;
224
+
225
+ // Gt specifies that this field must be greater than the specified value,
226
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
227
+ // range is reversed.
228
+ optional uint32 gt = 4;
229
+
230
+ // Gte specifies that this field must be greater than or equal to the
231
+ // specified value, inclusive. If the value of Gte is larger than a
232
+ // specified Lt or Lte, the range is reversed.
233
+ optional uint32 gte = 5;
234
+
235
+ // In specifies that this field must be equal to one of the specified
236
+ // values
237
+ repeated uint32 in = 6;
238
+
239
+ // NotIn specifies that this field cannot be equal to one of the specified
240
+ // values
241
+ repeated uint32 not_in = 7;
242
+
243
+ // IgnoreEmpty specifies that the validation rules of this field should be
244
+ // evaluated only if the field is not empty
245
+ optional bool ignore_empty = 8;
246
+ }
247
+
248
+ // UInt64Rules describes the constraints applied to `uint64` values
249
+ message UInt64Rules {
250
+ // Const specifies that this field must be exactly the specified value
251
+ optional uint64 const = 1;
252
+
253
+ // Lt specifies that this field must be less than the specified value,
254
+ // exclusive
255
+ optional uint64 lt = 2;
256
+
257
+ // Lte specifies that this field must be less than or equal to the
258
+ // specified value, inclusive
259
+ optional uint64 lte = 3;
260
+
261
+ // Gt specifies that this field must be greater than the specified value,
262
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
263
+ // range is reversed.
264
+ optional uint64 gt = 4;
265
+
266
+ // Gte specifies that this field must be greater than or equal to the
267
+ // specified value, inclusive. If the value of Gte is larger than a
268
+ // specified Lt or Lte, the range is reversed.
269
+ optional uint64 gte = 5;
270
+
271
+ // In specifies that this field must be equal to one of the specified
272
+ // values
273
+ repeated uint64 in = 6;
274
+
275
+ // NotIn specifies that this field cannot be equal to one of the specified
276
+ // values
277
+ repeated uint64 not_in = 7;
278
+
279
+ // IgnoreEmpty specifies that the validation rules of this field should be
280
+ // evaluated only if the field is not empty
281
+ optional bool ignore_empty = 8;
282
+ }
283
+
284
+ // SInt32Rules describes the constraints applied to `sint32` values
285
+ message SInt32Rules {
286
+ // Const specifies that this field must be exactly the specified value
287
+ optional sint32 const = 1;
288
+
289
+ // Lt specifies that this field must be less than the specified value,
290
+ // exclusive
291
+ optional sint32 lt = 2;
292
+
293
+ // Lte specifies that this field must be less than or equal to the
294
+ // specified value, inclusive
295
+ optional sint32 lte = 3;
296
+
297
+ // Gt specifies that this field must be greater than the specified value,
298
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
299
+ // range is reversed.
300
+ optional sint32 gt = 4;
301
+
302
+ // Gte specifies that this field must be greater than or equal to the
303
+ // specified value, inclusive. If the value of Gte is larger than a
304
+ // specified Lt or Lte, the range is reversed.
305
+ optional sint32 gte = 5;
306
+
307
+ // In specifies that this field must be equal to one of the specified
308
+ // values
309
+ repeated sint32 in = 6;
310
+
311
+ // NotIn specifies that this field cannot be equal to one of the specified
312
+ // values
313
+ repeated sint32 not_in = 7;
314
+
315
+ // IgnoreEmpty specifies that the validation rules of this field should be
316
+ // evaluated only if the field is not empty
317
+ optional bool ignore_empty = 8;
318
+ }
319
+
320
+ // SInt64Rules describes the constraints applied to `sint64` values
321
+ message SInt64Rules {
322
+ // Const specifies that this field must be exactly the specified value
323
+ optional sint64 const = 1;
324
+
325
+ // Lt specifies that this field must be less than the specified value,
326
+ // exclusive
327
+ optional sint64 lt = 2;
328
+
329
+ // Lte specifies that this field must be less than or equal to the
330
+ // specified value, inclusive
331
+ optional sint64 lte = 3;
332
+
333
+ // Gt specifies that this field must be greater than the specified value,
334
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
335
+ // range is reversed.
336
+ optional sint64 gt = 4;
337
+
338
+ // Gte specifies that this field must be greater than or equal to the
339
+ // specified value, inclusive. If the value of Gte is larger than a
340
+ // specified Lt or Lte, the range is reversed.
341
+ optional sint64 gte = 5;
342
+
343
+ // In specifies that this field must be equal to one of the specified
344
+ // values
345
+ repeated sint64 in = 6;
346
+
347
+ // NotIn specifies that this field cannot be equal to one of the specified
348
+ // values
349
+ repeated sint64 not_in = 7;
350
+
351
+ // IgnoreEmpty specifies that the validation rules of this field should be
352
+ // evaluated only if the field is not empty
353
+ optional bool ignore_empty = 8;
354
+ }
355
+
356
+ // Fixed32Rules describes the constraints applied to `fixed32` values
357
+ message Fixed32Rules {
358
+ // Const specifies that this field must be exactly the specified value
359
+ optional fixed32 const = 1;
360
+
361
+ // Lt specifies that this field must be less than the specified value,
362
+ // exclusive
363
+ optional fixed32 lt = 2;
364
+
365
+ // Lte specifies that this field must be less than or equal to the
366
+ // specified value, inclusive
367
+ optional fixed32 lte = 3;
368
+
369
+ // Gt specifies that this field must be greater than the specified value,
370
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
371
+ // range is reversed.
372
+ optional fixed32 gt = 4;
373
+
374
+ // Gte specifies that this field must be greater than or equal to the
375
+ // specified value, inclusive. If the value of Gte is larger than a
376
+ // specified Lt or Lte, the range is reversed.
377
+ optional fixed32 gte = 5;
378
+
379
+ // In specifies that this field must be equal to one of the specified
380
+ // values
381
+ repeated fixed32 in = 6;
382
+
383
+ // NotIn specifies that this field cannot be equal to one of the specified
384
+ // values
385
+ repeated fixed32 not_in = 7;
386
+
387
+ // IgnoreEmpty specifies that the validation rules of this field should be
388
+ // evaluated only if the field is not empty
389
+ optional bool ignore_empty = 8;
390
+ }
391
+
392
+ // Fixed64Rules describes the constraints applied to `fixed64` values
393
+ message Fixed64Rules {
394
+ // Const specifies that this field must be exactly the specified value
395
+ optional fixed64 const = 1;
396
+
397
+ // Lt specifies that this field must be less than the specified value,
398
+ // exclusive
399
+ optional fixed64 lt = 2;
400
+
401
+ // Lte specifies that this field must be less than or equal to the
402
+ // specified value, inclusive
403
+ optional fixed64 lte = 3;
404
+
405
+ // Gt specifies that this field must be greater than the specified value,
406
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
407
+ // range is reversed.
408
+ optional fixed64 gt = 4;
409
+
410
+ // Gte specifies that this field must be greater than or equal to the
411
+ // specified value, inclusive. If the value of Gte is larger than a
412
+ // specified Lt or Lte, the range is reversed.
413
+ optional fixed64 gte = 5;
414
+
415
+ // In specifies that this field must be equal to one of the specified
416
+ // values
417
+ repeated fixed64 in = 6;
418
+
419
+ // NotIn specifies that this field cannot be equal to one of the specified
420
+ // values
421
+ repeated fixed64 not_in = 7;
422
+
423
+ // IgnoreEmpty specifies that the validation rules of this field should be
424
+ // evaluated only if the field is not empty
425
+ optional bool ignore_empty = 8;
426
+ }
427
+
428
+ // SFixed32Rules describes the constraints applied to `sfixed32` values
429
+ message SFixed32Rules {
430
+ // Const specifies that this field must be exactly the specified value
431
+ optional sfixed32 const = 1;
432
+
433
+ // Lt specifies that this field must be less than the specified value,
434
+ // exclusive
435
+ optional sfixed32 lt = 2;
436
+
437
+ // Lte specifies that this field must be less than or equal to the
438
+ // specified value, inclusive
439
+ optional sfixed32 lte = 3;
440
+
441
+ // Gt specifies that this field must be greater than the specified value,
442
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
443
+ // range is reversed.
444
+ optional sfixed32 gt = 4;
445
+
446
+ // Gte specifies that this field must be greater than or equal to the
447
+ // specified value, inclusive. If the value of Gte is larger than a
448
+ // specified Lt or Lte, the range is reversed.
449
+ optional sfixed32 gte = 5;
450
+
451
+ // In specifies that this field must be equal to one of the specified
452
+ // values
453
+ repeated sfixed32 in = 6;
454
+
455
+ // NotIn specifies that this field cannot be equal to one of the specified
456
+ // values
457
+ repeated sfixed32 not_in = 7;
458
+
459
+ // IgnoreEmpty specifies that the validation rules of this field should be
460
+ // evaluated only if the field is not empty
461
+ optional bool ignore_empty = 8;
462
+ }
463
+
464
+ // SFixed64Rules describes the constraints applied to `sfixed64` values
465
+ message SFixed64Rules {
466
+ // Const specifies that this field must be exactly the specified value
467
+ optional sfixed64 const = 1;
468
+
469
+ // Lt specifies that this field must be less than the specified value,
470
+ // exclusive
471
+ optional sfixed64 lt = 2;
472
+
473
+ // Lte specifies that this field must be less than or equal to the
474
+ // specified value, inclusive
475
+ optional sfixed64 lte = 3;
476
+
477
+ // Gt specifies that this field must be greater than the specified value,
478
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
479
+ // range is reversed.
480
+ optional sfixed64 gt = 4;
481
+
482
+ // Gte specifies that this field must be greater than or equal to the
483
+ // specified value, inclusive. If the value of Gte is larger than a
484
+ // specified Lt or Lte, the range is reversed.
485
+ optional sfixed64 gte = 5;
486
+
487
+ // In specifies that this field must be equal to one of the specified
488
+ // values
489
+ repeated sfixed64 in = 6;
490
+
491
+ // NotIn specifies that this field cannot be equal to one of the specified
492
+ // values
493
+ repeated sfixed64 not_in = 7;
494
+
495
+ // IgnoreEmpty specifies that the validation rules of this field should be
496
+ // evaluated only if the field is not empty
497
+ optional bool ignore_empty = 8;
498
+ }
499
+
500
+ // BoolRules describes the constraints applied to `bool` values
501
+ message BoolRules {
502
+ // Const specifies that this field must be exactly the specified value
503
+ optional bool const = 1;
504
+ }
505
+
506
+ // StringRules describe the constraints applied to `string` values
507
+ message StringRules {
508
+ // Const specifies that this field must be exactly the specified value
509
+ optional string const = 1;
510
+
511
+ // Len specifies that this field must be the specified number of
512
+ // characters (Unicode code points). Note that the number of
513
+ // characters may differ from the number of bytes in the string.
514
+ optional uint64 len = 19;
515
+
516
+ // MinLen specifies that this field must be the specified number of
517
+ // characters (Unicode code points) at a minimum. Note that the number of
518
+ // characters may differ from the number of bytes in the string.
519
+ optional uint64 min_len = 2;
520
+
521
+ // MaxLen specifies that this field must be the specified number of
522
+ // characters (Unicode code points) at a maximum. Note that the number of
523
+ // characters may differ from the number of bytes in the string.
524
+ optional uint64 max_len = 3;
525
+
526
+ // LenBytes specifies that this field must be the specified number of bytes
527
+ optional uint64 len_bytes = 20;
528
+
529
+ // MinBytes specifies that this field must be the specified number of bytes
530
+ // at a minimum
531
+ optional uint64 min_bytes = 4;
532
+
533
+ // MaxBytes specifies that this field must be the specified number of bytes
534
+ // at a maximum
535
+ optional uint64 max_bytes = 5;
536
+
537
+ // Pattern specifes that this field must match against the specified
538
+ // regular expression (RE2 syntax). The included expression should elide
539
+ // any delimiters.
540
+ optional string pattern = 6;
541
+
542
+ // Prefix specifies that this field must have the specified substring at
543
+ // the beginning of the string.
544
+ optional string prefix = 7;
545
+
546
+ // Suffix specifies that this field must have the specified substring at
547
+ // the end of the string.
548
+ optional string suffix = 8;
549
+
550
+ // Contains specifies that this field must have the specified substring
551
+ // anywhere in the string.
552
+ optional string contains = 9;
553
+
554
+ // NotContains specifies that this field cannot have the specified substring
555
+ // anywhere in the string.
556
+ optional string not_contains = 23;
557
+
558
+ // In specifies that this field must be equal to one of the specified
559
+ // values
560
+ repeated string in = 10;
561
+
562
+ // NotIn specifies that this field cannot be equal to one of the specified
563
+ // values
564
+ repeated string not_in = 11;
565
+
566
+ // WellKnown rules provide advanced constraints against common string
567
+ // patterns
568
+ oneof well_known {
569
+ // Email specifies that the field must be a valid email address as
570
+ // defined by RFC 5322
571
+ bool email = 12;
572
+
573
+ // Hostname specifies that the field must be a valid hostname as
574
+ // defined by RFC 1034. This constraint does not support
575
+ // internationalized domain names (IDNs).
576
+ bool hostname = 13;
577
+
578
+ // Ip specifies that the field must be a valid IP (v4 or v6) address.
579
+ // Valid IPv6 addresses should not include surrounding square brackets.
580
+ bool ip = 14;
581
+
582
+ // Ipv4 specifies that the field must be a valid IPv4 address.
583
+ bool ipv4 = 15;
584
+
585
+ // Ipv6 specifies that the field must be a valid IPv6 address. Valid
586
+ // IPv6 addresses should not include surrounding square brackets.
587
+ bool ipv6 = 16;
588
+
589
+ // Uri specifies that the field must be a valid, absolute URI as defined
590
+ // by RFC 3986
591
+ bool uri = 17;
592
+
593
+ // UriRef specifies that the field must be a valid URI as defined by RFC
594
+ // 3986 and may be relative or absolute.
595
+ bool uri_ref = 18;
596
+
597
+ // Address specifies that the field must be either a valid hostname as
598
+ // defined by RFC 1034 (which does not support internationalized domain
599
+ // names or IDNs), or it can be a valid IP (v4 or v6).
600
+ bool address = 21;
601
+
602
+ // Uuid specifies that the field must be a valid UUID as defined by
603
+ // RFC 4122
604
+ bool uuid = 22;
605
+
606
+ // WellKnownRegex specifies a common well known pattern defined as a regex.
607
+ KnownRegex well_known_regex = 24;
608
+ }
609
+
610
+ // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable
611
+ // strict header validation.
612
+ // By default, this is true, and HTTP header validations are RFC-compliant.
613
+ // Setting to false will enable a looser validations that only disallows
614
+ // \r\n\0 characters, which can be used to bypass header matching rules.
615
+ optional bool strict = 25 [default = true];
616
+
617
+ // IgnoreEmpty specifies that the validation rules of this field should be
618
+ // evaluated only if the field is not empty
619
+ optional bool ignore_empty = 26;
620
+ }
621
+
622
+ // WellKnownRegex contain some well-known patterns.
623
+ enum KnownRegex {
624
+ UNKNOWN = 0;
625
+
626
+ // HTTP header name as defined by RFC 7230.
627
+ HTTP_HEADER_NAME = 1;
628
+
629
+ // HTTP header value as defined by RFC 7230.
630
+ HTTP_HEADER_VALUE = 2;
631
+ }
632
+
633
+ // BytesRules describe the constraints applied to `bytes` values
634
+ message BytesRules {
635
+ // Const specifies that this field must be exactly the specified value
636
+ optional bytes const = 1;
637
+
638
+ // Len specifies that this field must be the specified number of bytes
639
+ optional uint64 len = 13;
640
+
641
+ // MinLen specifies that this field must be the specified number of bytes
642
+ // at a minimum
643
+ optional uint64 min_len = 2;
644
+
645
+ // MaxLen specifies that this field must be the specified number of bytes
646
+ // at a maximum
647
+ optional uint64 max_len = 3;
648
+
649
+ // Pattern specifes that this field must match against the specified
650
+ // regular expression (RE2 syntax). The included expression should elide
651
+ // any delimiters.
652
+ optional string pattern = 4;
653
+
654
+ // Prefix specifies that this field must have the specified bytes at the
655
+ // beginning of the string.
656
+ optional bytes prefix = 5;
657
+
658
+ // Suffix specifies that this field must have the specified bytes at the
659
+ // end of the string.
660
+ optional bytes suffix = 6;
661
+
662
+ // Contains specifies that this field must have the specified bytes
663
+ // anywhere in the string.
664
+ optional bytes contains = 7;
665
+
666
+ // In specifies that this field must be equal to one of the specified
667
+ // values
668
+ repeated bytes in = 8;
669
+
670
+ // NotIn specifies that this field cannot be equal to one of the specified
671
+ // values
672
+ repeated bytes not_in = 9;
673
+
674
+ // WellKnown rules provide advanced constraints against common byte
675
+ // patterns
676
+ oneof well_known {
677
+ // Ip specifies that the field must be a valid IP (v4 or v6) address in
678
+ // byte format
679
+ bool ip = 10;
680
+
681
+ // Ipv4 specifies that the field must be a valid IPv4 address in byte
682
+ // format
683
+ bool ipv4 = 11;
684
+
685
+ // Ipv6 specifies that the field must be a valid IPv6 address in byte
686
+ // format
687
+ bool ipv6 = 12;
688
+ }
689
+
690
+ // IgnoreEmpty specifies that the validation rules of this field should be
691
+ // evaluated only if the field is not empty
692
+ optional bool ignore_empty = 14;
693
+ }
694
+
695
+ // EnumRules describe the constraints applied to enum values
696
+ message EnumRules {
697
+ // Const specifies that this field must be exactly the specified value
698
+ optional int32 const = 1;
699
+
700
+ // DefinedOnly specifies that this field must be only one of the defined
701
+ // values for this enum, failing on any undefined value.
702
+ optional bool defined_only = 2;
703
+
704
+ // In specifies that this field must be equal to one of the specified
705
+ // values
706
+ repeated int32 in = 3;
707
+
708
+ // NotIn specifies that this field cannot be equal to one of the specified
709
+ // values
710
+ repeated int32 not_in = 4;
711
+ }
712
+
713
+ // MessageRules describe the constraints applied to embedded message values.
714
+ // For message-type fields, validation is performed recursively.
715
+ message MessageRules {
716
+ // Skip specifies that the validation rules of this field should not be
717
+ // evaluated
718
+ optional bool skip = 1;
719
+
720
+ // Required specifies that this field must be set
721
+ optional bool required = 2;
722
+ }
723
+
724
+ // RepeatedRules describe the constraints applied to `repeated` values
725
+ message RepeatedRules {
726
+ // MinItems specifies that this field must have the specified number of
727
+ // items at a minimum
728
+ optional uint64 min_items = 1;
729
+
730
+ // MaxItems specifies that this field must have the specified number of
731
+ // items at a maximum
732
+ optional uint64 max_items = 2;
733
+
734
+ // Unique specifies that all elements in this field must be unique. This
735
+ // contraint is only applicable to scalar and enum types (messages are not
736
+ // supported).
737
+ optional bool unique = 3;
738
+
739
+ // Items specifies the contraints to be applied to each item in the field.
740
+ // Repeated message fields will still execute validation against each item
741
+ // unless skip is specified here.
742
+ optional FieldRules items = 4;
743
+
744
+ // IgnoreEmpty specifies that the validation rules of this field should be
745
+ // evaluated only if the field is not empty
746
+ optional bool ignore_empty = 5;
747
+ }
748
+
749
+ // MapRules describe the constraints applied to `map` values
750
+ message MapRules {
751
+ // MinPairs specifies that this field must have the specified number of
752
+ // KVs at a minimum
753
+ optional uint64 min_pairs = 1;
754
+
755
+ // MaxPairs specifies that this field must have the specified number of
756
+ // KVs at a maximum
757
+ optional uint64 max_pairs = 2;
758
+
759
+ // NoSparse specifies values in this field cannot be unset. This only
760
+ // applies to map's with message value types.
761
+ optional bool no_sparse = 3;
762
+
763
+ // Keys specifies the constraints to be applied to each key in the field.
764
+ optional FieldRules keys = 4;
765
+
766
+ // Values specifies the constraints to be applied to the value of each key
767
+ // in the field. Message values will still have their validations evaluated
768
+ // unless skip is specified here.
769
+ optional FieldRules values = 5;
770
+
771
+ // IgnoreEmpty specifies that the validation rules of this field should be
772
+ // evaluated only if the field is not empty
773
+ optional bool ignore_empty = 6;
774
+ }
775
+
776
+ // AnyRules describe constraints applied exclusively to the
777
+ // `google.protobuf.Any` well-known type
778
+ message AnyRules {
779
+ // Required specifies that this field must be set
780
+ optional bool required = 1;
781
+
782
+ // In specifies that this field's `type_url` must be equal to one of the
783
+ // specified values.
784
+ repeated string in = 2;
785
+
786
+ // NotIn specifies that this field's `type_url` must not be equal to any of
787
+ // the specified values.
788
+ repeated string not_in = 3;
789
+ }
790
+
791
+ // DurationRules describe the constraints applied exclusively to the
792
+ // `google.protobuf.Duration` well-known type
793
+ message DurationRules {
794
+ // Required specifies that this field must be set
795
+ optional bool required = 1;
796
+
797
+ // Const specifies that this field must be exactly the specified value
798
+ optional google.protobuf.Duration const = 2;
799
+
800
+ // Lt specifies that this field must be less than the specified value,
801
+ // exclusive
802
+ optional google.protobuf.Duration lt = 3;
803
+
804
+ // Lt specifies that this field must be less than the specified value,
805
+ // inclusive
806
+ optional google.protobuf.Duration lte = 4;
807
+
808
+ // Gt specifies that this field must be greater than the specified value,
809
+ // exclusive
810
+ optional google.protobuf.Duration gt = 5;
811
+
812
+ // Gte specifies that this field must be greater than the specified value,
813
+ // inclusive
814
+ optional google.protobuf.Duration gte = 6;
815
+
816
+ // In specifies that this field must be equal to one of the specified
817
+ // values
818
+ repeated google.protobuf.Duration in = 7;
819
+
820
+ // NotIn specifies that this field cannot be equal to one of the specified
821
+ // values
822
+ repeated google.protobuf.Duration not_in = 8;
823
+ }
824
+
825
+ // TimestampRules describe the constraints applied exclusively to the
826
+ // `google.protobuf.Timestamp` well-known type
827
+ message TimestampRules {
828
+ // Required specifies that this field must be set
829
+ optional bool required = 1;
830
+
831
+ // Const specifies that this field must be exactly the specified value
832
+ optional google.protobuf.Timestamp const = 2;
833
+
834
+ // Lt specifies that this field must be less than the specified value,
835
+ // exclusive
836
+ optional google.protobuf.Timestamp lt = 3;
837
+
838
+ // Lte specifies that this field must be less than the specified value,
839
+ // inclusive
840
+ optional google.protobuf.Timestamp lte = 4;
841
+
842
+ // Gt specifies that this field must be greater than the specified value,
843
+ // exclusive
844
+ optional google.protobuf.Timestamp gt = 5;
845
+
846
+ // Gte specifies that this field must be greater than the specified value,
847
+ // inclusive
848
+ optional google.protobuf.Timestamp gte = 6;
849
+
850
+ // LtNow specifies that this must be less than the current time. LtNow
851
+ // can only be used with the Within rule.
852
+ optional bool lt_now = 7;
853
+
854
+ // GtNow specifies that this must be greater than the current time. GtNow
855
+ // can only be used with the Within rule.
856
+ optional bool gt_now = 8;
857
+
858
+ // Within specifies that this field must be within this duration of the
859
+ // current time. This constraint can be used alone or with the LtNow and
860
+ // GtNow rules.
861
+ optional google.protobuf.Duration within = 9;
862
+ }
@@ -1,4 +1,65 @@
1
- module Validate
2
- module ValidatePb
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: validate/validate.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/protobuf/descriptor_pb'
8
+ require 'google/protobuf/duration_pb'
9
+ require 'google/protobuf/timestamp_pb'
10
+
11
+
12
+ descriptor_data = "\n\x17validate/validate.proto\x12\x08validate\x1a google/protobuf/descriptor.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc8\x08\n\nFieldRules\x12\x30\n\x07message\x18\x11 \x01(\x0b\x32\x16.validate.MessageRulesR\x07message\x12,\n\x05\x66loat\x18\x01 \x01(\x0b\x32\x14.validate.FloatRulesH\x00R\x05\x66loat\x12/\n\x06\x64ouble\x18\x02 \x01(\x0b\x32\x15.validate.DoubleRulesH\x00R\x06\x64ouble\x12,\n\x05int32\x18\x03 \x01(\x0b\x32\x14.validate.Int32RulesH\x00R\x05int32\x12,\n\x05int64\x18\x04 \x01(\x0b\x32\x14.validate.Int64RulesH\x00R\x05int64\x12/\n\x06uint32\x18\x05 \x01(\x0b\x32\x15.validate.UInt32RulesH\x00R\x06uint32\x12/\n\x06uint64\x18\x06 \x01(\x0b\x32\x15.validate.UInt64RulesH\x00R\x06uint64\x12/\n\x06sint32\x18\x07 \x01(\x0b\x32\x15.validate.SInt32RulesH\x00R\x06sint32\x12/\n\x06sint64\x18\x08 \x01(\x0b\x32\x15.validate.SInt64RulesH\x00R\x06sint64\x12\x32\n\x07\x66ixed32\x18\t \x01(\x0b\x32\x16.validate.Fixed32RulesH\x00R\x07\x66ixed32\x12\x32\n\x07\x66ixed64\x18\n \x01(\x0b\x32\x16.validate.Fixed64RulesH\x00R\x07\x66ixed64\x12\x35\n\x08sfixed32\x18\x0b \x01(\x0b\x32\x17.validate.SFixed32RulesH\x00R\x08sfixed32\x12\x35\n\x08sfixed64\x18\x0c \x01(\x0b\x32\x17.validate.SFixed64RulesH\x00R\x08sfixed64\x12)\n\x04\x62ool\x18\r \x01(\x0b\x32\x13.validate.BoolRulesH\x00R\x04\x62ool\x12/\n\x06string\x18\x0e \x01(\x0b\x32\x15.validate.StringRulesH\x00R\x06string\x12,\n\x05\x62ytes\x18\x0f \x01(\x0b\x32\x14.validate.BytesRulesH\x00R\x05\x62ytes\x12)\n\x04\x65num\x18\x10 \x01(\x0b\x32\x13.validate.EnumRulesH\x00R\x04\x65num\x12\x35\n\x08repeated\x18\x12 \x01(\x0b\x32\x17.validate.RepeatedRulesH\x00R\x08repeated\x12&\n\x03map\x18\x13 \x01(\x0b\x32\x12.validate.MapRulesH\x00R\x03map\x12&\n\x03\x61ny\x18\x14 \x01(\x0b\x32\x12.validate.AnyRulesH\x00R\x03\x61ny\x12\x35\n\x08\x64uration\x18\x15 \x01(\x0b\x32\x17.validate.DurationRulesH\x00R\x08\x64uration\x12\x38\n\ttimestamp\x18\x16 \x01(\x0b\x32\x18.validate.TimestampRulesH\x00R\ttimestampB\x06\n\x04type\"\xb0\x01\n\nFloatRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x02R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x02R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x02R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x02R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x02R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x02R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x02R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0b\x44oubleRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x01R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x01R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x01R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x01R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x01R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x01R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x01R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb0\x01\n\nInt32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x05R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x05R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x05R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x05R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x05R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x05R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x05R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb0\x01\n\nInt64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x03R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x03R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x03R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x03R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x03R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x03R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x03R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0bUInt32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\rR\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\rR\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\rR\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\rR\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\rR\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\rR\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\rR\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0bUInt64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x04R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x04R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x04R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x04R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x04R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x04R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x04R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0bSInt32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x11R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x11R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x11R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x11R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x11R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x11R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x11R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb1\x01\n\x0bSInt64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x12R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x12R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x12R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x12R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x12R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x12R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x12R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb2\x01\n\x0c\x46ixed32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x07R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x07R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x07R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x07R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x07R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x07R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x07R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb2\x01\n\x0c\x46ixed64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x06R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x06R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x06R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x06R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x06R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x06R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x06R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb3\x01\n\rSFixed32Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x0fR\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x0fR\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x0fR\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x0fR\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x0fR\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x0fR\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x0fR\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"\xb3\x01\n\rSFixed64Rules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x10R\x05\x63onst\x12\x0e\n\x02lt\x18\x02 \x01(\x10R\x02lt\x12\x10\n\x03lte\x18\x03 \x01(\x10R\x03lte\x12\x0e\n\x02gt\x18\x04 \x01(\x10R\x02gt\x12\x10\n\x03gte\x18\x05 \x01(\x10R\x03gte\x12\x0e\n\x02in\x18\x06 \x03(\x10R\x02in\x12\x15\n\x06not_in\x18\x07 \x03(\x10R\x05notIn\x12!\n\x0cignore_empty\x18\x08 \x01(\x08R\x0bignoreEmpty\"!\n\tBoolRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x08R\x05\x63onst\"\xd4\x05\n\x0bStringRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\tR\x05\x63onst\x12\x10\n\x03len\x18\x13 \x01(\x04R\x03len\x12\x17\n\x07min_len\x18\x02 \x01(\x04R\x06minLen\x12\x17\n\x07max_len\x18\x03 \x01(\x04R\x06maxLen\x12\x1b\n\tlen_bytes\x18\x14 \x01(\x04R\x08lenBytes\x12\x1b\n\tmin_bytes\x18\x04 \x01(\x04R\x08minBytes\x12\x1b\n\tmax_bytes\x18\x05 \x01(\x04R\x08maxBytes\x12\x18\n\x07pattern\x18\x06 \x01(\tR\x07pattern\x12\x16\n\x06prefix\x18\x07 \x01(\tR\x06prefix\x12\x16\n\x06suffix\x18\x08 \x01(\tR\x06suffix\x12\x1a\n\x08\x63ontains\x18\t \x01(\tR\x08\x63ontains\x12!\n\x0cnot_contains\x18\x17 \x01(\tR\x0bnotContains\x12\x0e\n\x02in\x18\n \x03(\tR\x02in\x12\x15\n\x06not_in\x18\x0b \x03(\tR\x05notIn\x12\x16\n\x05\x65mail\x18\x0c \x01(\x08H\x00R\x05\x65mail\x12\x1c\n\x08hostname\x18\r \x01(\x08H\x00R\x08hostname\x12\x10\n\x02ip\x18\x0e \x01(\x08H\x00R\x02ip\x12\x14\n\x04ipv4\x18\x0f \x01(\x08H\x00R\x04ipv4\x12\x14\n\x04ipv6\x18\x10 \x01(\x08H\x00R\x04ipv6\x12\x12\n\x03uri\x18\x11 \x01(\x08H\x00R\x03uri\x12\x19\n\x07uri_ref\x18\x12 \x01(\x08H\x00R\x06uriRef\x12\x1a\n\x07\x61\x64\x64ress\x18\x15 \x01(\x08H\x00R\x07\x61\x64\x64ress\x12\x14\n\x04uuid\x18\x16 \x01(\x08H\x00R\x04uuid\x12@\n\x10well_known_regex\x18\x18 \x01(\x0e\x32\x14.validate.KnownRegexH\x00R\x0ewellKnownRegex\x12\x1c\n\x06strict\x18\x19 \x01(\x08:\x04trueR\x06strict\x12!\n\x0cignore_empty\x18\x1a \x01(\x08R\x0bignoreEmptyB\x0c\n\nwell_known\"\xe2\x02\n\nBytesRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x0cR\x05\x63onst\x12\x10\n\x03len\x18\r \x01(\x04R\x03len\x12\x17\n\x07min_len\x18\x02 \x01(\x04R\x06minLen\x12\x17\n\x07max_len\x18\x03 \x01(\x04R\x06maxLen\x12\x18\n\x07pattern\x18\x04 \x01(\tR\x07pattern\x12\x16\n\x06prefix\x18\x05 \x01(\x0cR\x06prefix\x12\x16\n\x06suffix\x18\x06 \x01(\x0cR\x06suffix\x12\x1a\n\x08\x63ontains\x18\x07 \x01(\x0cR\x08\x63ontains\x12\x0e\n\x02in\x18\x08 \x03(\x0cR\x02in\x12\x15\n\x06not_in\x18\t \x03(\x0cR\x05notIn\x12\x10\n\x02ip\x18\n \x01(\x08H\x00R\x02ip\x12\x14\n\x04ipv4\x18\x0b \x01(\x08H\x00R\x04ipv4\x12\x14\n\x04ipv6\x18\x0c \x01(\x08H\x00R\x04ipv6\x12!\n\x0cignore_empty\x18\x0e \x01(\x08R\x0bignoreEmptyB\x0c\n\nwell_known\"k\n\tEnumRules\x12\x14\n\x05\x63onst\x18\x01 \x01(\x05R\x05\x63onst\x12!\n\x0c\x64\x65\x66ined_only\x18\x02 \x01(\x08R\x0b\x64\x65\x66inedOnly\x12\x0e\n\x02in\x18\x03 \x03(\x05R\x02in\x12\x15\n\x06not_in\x18\x04 \x03(\x05R\x05notIn\">\n\x0cMessageRules\x12\x12\n\x04skip\x18\x01 \x01(\x08R\x04skip\x12\x1a\n\x08required\x18\x02 \x01(\x08R\x08required\"\xb0\x01\n\rRepeatedRules\x12\x1b\n\tmin_items\x18\x01 \x01(\x04R\x08minItems\x12\x1b\n\tmax_items\x18\x02 \x01(\x04R\x08maxItems\x12\x16\n\x06unique\x18\x03 \x01(\x08R\x06unique\x12*\n\x05items\x18\x04 \x01(\x0b\x32\x14.validate.FieldRulesR\x05items\x12!\n\x0cignore_empty\x18\x05 \x01(\x08R\x0bignoreEmpty\"\xdc\x01\n\x08MapRules\x12\x1b\n\tmin_pairs\x18\x01 \x01(\x04R\x08minPairs\x12\x1b\n\tmax_pairs\x18\x02 \x01(\x04R\x08maxPairs\x12\x1b\n\tno_sparse\x18\x03 \x01(\x08R\x08noSparse\x12(\n\x04keys\x18\x04 \x01(\x0b\x32\x14.validate.FieldRulesR\x04keys\x12,\n\x06values\x18\x05 \x01(\x0b\x32\x14.validate.FieldRulesR\x06values\x12!\n\x0cignore_empty\x18\x06 \x01(\x08R\x0bignoreEmpty\"M\n\x08\x41nyRules\x12\x1a\n\x08required\x18\x01 \x01(\x08R\x08required\x12\x0e\n\x02in\x18\x02 \x03(\tR\x02in\x12\x15\n\x06not_in\x18\x03 \x03(\tR\x05notIn\"\xe9\x02\n\rDurationRules\x12\x1a\n\x08required\x18\x01 \x01(\x08R\x08required\x12/\n\x05\x63onst\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationR\x05\x63onst\x12)\n\x02lt\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationR\x02lt\x12+\n\x03lte\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationR\x03lte\x12)\n\x02gt\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationR\x02gt\x12+\n\x03gte\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationR\x03gte\x12)\n\x02in\x18\x07 \x03(\x0b\x32\x19.google.protobuf.DurationR\x02in\x12\x30\n\x06not_in\x18\x08 \x03(\x0b\x32\x19.google.protobuf.DurationR\x05notIn\"\xf3\x02\n\x0eTimestampRules\x12\x1a\n\x08required\x18\x01 \x01(\x08R\x08required\x12\x30\n\x05\x63onst\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x63onst\x12*\n\x02lt\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x02lt\x12,\n\x03lte\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x03lte\x12*\n\x02gt\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x02gt\x12,\n\x03gte\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x03gte\x12\x15\n\x06lt_now\x18\x07 \x01(\x08R\x05ltNow\x12\x15\n\x06gt_now\x18\x08 \x01(\x08R\x05gtNow\x12\x31\n\x06within\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationR\x06within*F\n\nKnownRegex\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x14\n\x10HTTP_HEADER_NAME\x10\x01\x12\x15\n\x11HTTP_HEADER_VALUE\x10\x02:<\n\x08\x64isabled\x12\x1f.google.protobuf.MessageOptions\x18\xaf\x08 \x01(\x08R\x08\x64isabled::\n\x07ignored\x12\x1f.google.protobuf.MessageOptions\x18\xb0\x08 \x01(\x08R\x07ignored::\n\x08required\x12\x1d.google.protobuf.OneofOptions\x18\xaf\x08 \x01(\x08R\x08required:J\n\x05rules\x12\x1d.google.protobuf.FieldOptions\x18\xaf\x08 \x01(\x0b\x32\x14.validate.FieldRulesR\x05rulesBP\n\x1aio.envoyproxy.pgv.validateZ2github.com/envoyproxy/protoc-gen-validate/validate"
13
+
14
+ pool = Google::Protobuf::DescriptorPool.generated_pool
15
+
16
+ begin
17
+ pool.add_serialized_file(descriptor_data)
18
+ rescue TypeError
19
+ # Compatibility code: will be removed in the next major version.
20
+ require 'google/protobuf/descriptor_pb'
21
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
22
+ parsed.clear_dependency
23
+ serialized = parsed.class.encode(parsed)
24
+ file = pool.add_serialized_file(serialized)
25
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
+ imports = [
27
+ ["google.protobuf.Duration", "google/protobuf/duration.proto"],
28
+ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
29
+ ]
30
+ imports.each do |type_name, expected_filename|
31
+ import_file = pool.lookup(type_name).file_descriptor
32
+ if import_file.name != expected_filename
33
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
34
+ end
3
35
  end
36
+ warn "Each proto file must use a consistent fully-qualified name."
37
+ warn "This will become an error in the next major version."
38
+ end
39
+
40
+ module Validate
41
+ FieldRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.FieldRules").msgclass
42
+ FloatRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.FloatRules").msgclass
43
+ DoubleRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.DoubleRules").msgclass
44
+ Int32Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.Int32Rules").msgclass
45
+ Int64Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.Int64Rules").msgclass
46
+ UInt32Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.UInt32Rules").msgclass
47
+ UInt64Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.UInt64Rules").msgclass
48
+ SInt32Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.SInt32Rules").msgclass
49
+ SInt64Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.SInt64Rules").msgclass
50
+ Fixed32Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.Fixed32Rules").msgclass
51
+ Fixed64Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.Fixed64Rules").msgclass
52
+ SFixed32Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.SFixed32Rules").msgclass
53
+ SFixed64Rules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.SFixed64Rules").msgclass
54
+ BoolRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.BoolRules").msgclass
55
+ StringRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.StringRules").msgclass
56
+ BytesRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.BytesRules").msgclass
57
+ EnumRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.EnumRules").msgclass
58
+ MessageRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.MessageRules").msgclass
59
+ RepeatedRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.RepeatedRules").msgclass
60
+ MapRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.MapRules").msgclass
61
+ AnyRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.AnyRules").msgclass
62
+ DurationRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.DurationRules").msgclass
63
+ TimestampRules = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.TimestampRules").msgclass
64
+ KnownRegex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("validate.KnownRegex").enummodule
4
65
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authzed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Authzed
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-06 00:00:00.000000000 Z
11
+ date: 2023-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grpc
@@ -76,6 +76,11 @@ files:
76
76
  - lib/authzed/api/v1/watch_service_pb.rb
77
77
  - lib/authzed/api/v1/watch_service_services_pb.rb
78
78
  - lib/grpcutil/bearer_token.rb
79
+ - lib/validate/README.md
80
+ - lib/validate/buf.gen.yaml
81
+ - lib/validate/buf.lock
82
+ - lib/validate/buf.yaml
83
+ - lib/validate/validate.proto
79
84
  - lib/validate/validate_pb.rb
80
85
  homepage: https://authzed.com
81
86
  licenses: