diff --git a/docs/openapiv2/apidocs.swagger.json b/docs/openapiv2/apidocs.swagger.json index a964dac..91e4764 100644 --- a/docs/openapiv2/apidocs.swagger.json +++ b/docs/openapiv2/apidocs.swagger.json @@ -1086,6 +1086,12 @@ "items": { "$ref": "#/definitions/TypeDefinition" } + }, + "conditions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Condition" + } } }, "required": [ @@ -1113,6 +1119,47 @@ } } }, + "Condition": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "A unique name for the condition" + }, + "expression": { + "type": "string", + "description": "A Google CEL expression, expressed as a string." + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ConditionParamTypeRef" + }, + "description": "A map of parameter names to the parameter's defined type reference." + } + }, + "required": [ + "name", + "expression" + ] + }, + "ConditionParamTypeRef": { + "type": "object", + "properties": { + "typeName": { + "$ref": "#/definitions/TypeName" + }, + "genericTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/ConditionParamTypeRef" + } + } + }, + "required": [ + "typeName" + ] + }, "ContextualTupleKeys": { "type": "object", "properties": { @@ -1508,6 +1555,10 @@ }, "wildcard": { "$ref": "#/definitions/Wildcard" + }, + "condition": { + "type": "string", + "description": "The name of a condition that is enforced over the allowed relation." } }, "description": "RelationReference represents a relation of a particular object type (e.g. 'document#viewer').", @@ -1682,6 +1733,24 @@ "type" ] }, + "TypeName": { + "type": "string", + "enum": [ + "TYPE_NAME_UNSPECIFIED", + "TYPE_NAME_ANY", + "TYPE_NAME_BOOL", + "TYPE_NAME_STRING", + "TYPE_NAME_INT", + "TYPE_NAME_UINT", + "TYPE_NAME_DOUBLE", + "TYPE_NAME_DURATION", + "TYPE_NAME_TIMESTAMP", + "TYPE_NAME_MAP", + "TYPE_NAME_LIST", + "TYPE_NAME_IPADDRESS" + ], + "default": "TYPE_NAME_UNSPECIFIED" + }, "Users": { "type": "object", "properties": { diff --git a/openfga/v1/authzmodel.proto b/openfga/v1/authzmodel.proto index da99b0b..34850be 100644 --- a/openfga/v1/authzmodel.proto +++ b/openfga/v1/authzmodel.proto @@ -21,6 +21,16 @@ message AuthorizationModel { json_name = "type_definitions", (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "[{\"type\": \"user\"}, {\"type\":\"document\",\"relations\":{\"reader\":{\"union\":{\"child\":[{\"this\":{}},{\"computedUserset\":{\"object\":\"\",\"relation\":\"writer\"}}]}},\"writer\":{\"this\":{}}},\"metadata\":{\"relations\":{\"reader\":{\"directly_related_user_types\":[{\"type\":\"user\"}]},\"writer\":{\"directly_related_user_types\":[{\"type\":\"user\"}]}}}}]"} ]; + + map conditions = 4 [ + json_name = "conditions", + (validate.rules).map.max_pairs = 25, + (validate.rules).map.keys.string = { + pattern: "^[^:#@\\s]{1,50}$", + min_len: 1, + max_len: 50, + } + ]; } message TypeDefinition { @@ -81,6 +91,9 @@ message RelationReference { Wildcard wildcard = 3; } + + // The name of a condition that is enforced over the allowed relation. + string condition = 4; } message Wildcard {} @@ -126,3 +139,55 @@ message TupleToUserset { ObjectRelation tupleset = 1; ObjectRelation computed_userset = 2; } + +message Condition { + // A unique name for the condition + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (validate.rules).string = { + pattern: "^[^:#@\\s]{1,50}$", + min_len: 1, + max_len: 50, + } + ]; + + // A Google CEL expression, expressed as a string. + string expression = 2 [ + (google.api.field_behavior) = REQUIRED, + (validate.rules).string = {max_bytes: 512} + ]; + + // A map of parameter names to the parameter's defined type reference. + map parameters = 3 [ + (validate.rules).map.max_pairs = 25, + (validate.rules).map.keys.string = { + pattern: "^[^:#@\\s]{1,50}$", + min_len: 1, + max_len: 50, + } + ]; +} + +message ConditionParamTypeRef { + enum TypeName { + TYPE_NAME_UNSPECIFIED = 0; + TYPE_NAME_ANY = 1; + TYPE_NAME_BOOL = 2; + TYPE_NAME_STRING = 3; + TYPE_NAME_INT = 4; + TYPE_NAME_UINT = 5; + TYPE_NAME_DOUBLE = 6; + TYPE_NAME_DURATION = 7; + TYPE_NAME_TIMESTAMP = 8; + TYPE_NAME_MAP = 9; + TYPE_NAME_LIST = 10; + TYPE_NAME_IPADDRESS = 11; + } + + TypeName type_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (validate.rules).enum.defined_only = true + ]; + + repeated ConditionParamTypeRef generic_types = 2 [(validate.rules).repeated.max_items = 5]; +} \ No newline at end of file diff --git a/proto/openfga/v1/authzmodel.pb.go b/proto/openfga/v1/authzmodel.pb.go index 776a86f..07e995f 100644 --- a/proto/openfga/v1/authzmodel.pb.go +++ b/proto/openfga/v1/authzmodel.pb.go @@ -23,14 +23,91 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type ConditionParamTypeRef_TypeName int32 + +const ( + ConditionParamTypeRef_TYPE_NAME_UNSPECIFIED ConditionParamTypeRef_TypeName = 0 + ConditionParamTypeRef_TYPE_NAME_ANY ConditionParamTypeRef_TypeName = 1 + ConditionParamTypeRef_TYPE_NAME_BOOL ConditionParamTypeRef_TypeName = 2 + ConditionParamTypeRef_TYPE_NAME_STRING ConditionParamTypeRef_TypeName = 3 + ConditionParamTypeRef_TYPE_NAME_INT ConditionParamTypeRef_TypeName = 4 + ConditionParamTypeRef_TYPE_NAME_UINT ConditionParamTypeRef_TypeName = 5 + ConditionParamTypeRef_TYPE_NAME_DOUBLE ConditionParamTypeRef_TypeName = 6 + ConditionParamTypeRef_TYPE_NAME_DURATION ConditionParamTypeRef_TypeName = 7 + ConditionParamTypeRef_TYPE_NAME_TIMESTAMP ConditionParamTypeRef_TypeName = 8 + ConditionParamTypeRef_TYPE_NAME_MAP ConditionParamTypeRef_TypeName = 9 + ConditionParamTypeRef_TYPE_NAME_LIST ConditionParamTypeRef_TypeName = 10 + ConditionParamTypeRef_TYPE_NAME_IPADDRESS ConditionParamTypeRef_TypeName = 11 +) + +// Enum value maps for ConditionParamTypeRef_TypeName. +var ( + ConditionParamTypeRef_TypeName_name = map[int32]string{ + 0: "TYPE_NAME_UNSPECIFIED", + 1: "TYPE_NAME_ANY", + 2: "TYPE_NAME_BOOL", + 3: "TYPE_NAME_STRING", + 4: "TYPE_NAME_INT", + 5: "TYPE_NAME_UINT", + 6: "TYPE_NAME_DOUBLE", + 7: "TYPE_NAME_DURATION", + 8: "TYPE_NAME_TIMESTAMP", + 9: "TYPE_NAME_MAP", + 10: "TYPE_NAME_LIST", + 11: "TYPE_NAME_IPADDRESS", + } + ConditionParamTypeRef_TypeName_value = map[string]int32{ + "TYPE_NAME_UNSPECIFIED": 0, + "TYPE_NAME_ANY": 1, + "TYPE_NAME_BOOL": 2, + "TYPE_NAME_STRING": 3, + "TYPE_NAME_INT": 4, + "TYPE_NAME_UINT": 5, + "TYPE_NAME_DOUBLE": 6, + "TYPE_NAME_DURATION": 7, + "TYPE_NAME_TIMESTAMP": 8, + "TYPE_NAME_MAP": 9, + "TYPE_NAME_LIST": 10, + "TYPE_NAME_IPADDRESS": 11, + } +) + +func (x ConditionParamTypeRef_TypeName) Enum() *ConditionParamTypeRef_TypeName { + p := new(ConditionParamTypeRef_TypeName) + *p = x + return p +} + +func (x ConditionParamTypeRef_TypeName) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConditionParamTypeRef_TypeName) Descriptor() protoreflect.EnumDescriptor { + return file_openfga_v1_authzmodel_proto_enumTypes[0].Descriptor() +} + +func (ConditionParamTypeRef_TypeName) Type() protoreflect.EnumType { + return &file_openfga_v1_authzmodel_proto_enumTypes[0] +} + +func (x ConditionParamTypeRef_TypeName) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConditionParamTypeRef_TypeName.Descriptor instead. +func (ConditionParamTypeRef_TypeName) EnumDescriptor() ([]byte, []int) { + return file_openfga_v1_authzmodel_proto_rawDescGZIP(), []int{15, 0} +} + type AuthorizationModel struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - SchemaVersion string `protobuf:"bytes,2,opt,name=schema_version,proto3" json:"schema_version,omitempty"` - TypeDefinitions []*TypeDefinition `protobuf:"bytes,3,rep,name=type_definitions,proto3" json:"type_definitions,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SchemaVersion string `protobuf:"bytes,2,opt,name=schema_version,proto3" json:"schema_version,omitempty"` + TypeDefinitions []*TypeDefinition `protobuf:"bytes,3,rep,name=type_definitions,proto3" json:"type_definitions,omitempty"` + Conditions map[string]*Condition `protobuf:"bytes,4,rep,name=conditions,proto3" json:"conditions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *AuthorizationModel) Reset() { @@ -86,6 +163,13 @@ func (x *AuthorizationModel) GetTypeDefinitions() []*TypeDefinition { return nil } +func (x *AuthorizationModel) GetConditions() map[string]*Condition { + if x != nil { + return x.Conditions + } + return nil +} + type TypeDefinition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -366,6 +450,8 @@ type RelationReference struct { // *RelationReference_Relation // *RelationReference_Wildcard RelationOrWildcard isRelationReference_RelationOrWildcard `protobuf_oneof:"relation_or_wildcard"` + // The name of a condition that is enforced over the allowed relation. + Condition string `protobuf:"bytes,4,opt,name=condition,proto3" json:"condition,omitempty"` } func (x *RelationReference) Reset() { @@ -428,6 +514,13 @@ func (x *RelationReference) GetWildcard() *Wildcard { return nil } +func (x *RelationReference) GetCondition() string { + if x != nil { + return x.Condition + } + return "" +} + type isRelationReference_RelationOrWildcard interface { isRelationReference_RelationOrWildcard() } @@ -872,6 +965,127 @@ func (x *TupleToUserset) GetComputedUserset() *ObjectRelation { return nil } +type Condition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A unique name for the condition + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A Google CEL expression, expressed as a string. + Expression string `protobuf:"bytes,2,opt,name=expression,proto3" json:"expression,omitempty"` + // A map of parameter names to the parameter's defined type reference. + Parameters map[string]*ConditionParamTypeRef `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Condition) Reset() { + *x = Condition{} + if protoimpl.UnsafeEnabled { + mi := &file_openfga_v1_authzmodel_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Condition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Condition) ProtoMessage() {} + +func (x *Condition) ProtoReflect() protoreflect.Message { + mi := &file_openfga_v1_authzmodel_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Condition.ProtoReflect.Descriptor instead. +func (*Condition) Descriptor() ([]byte, []int) { + return file_openfga_v1_authzmodel_proto_rawDescGZIP(), []int{14} +} + +func (x *Condition) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Condition) GetExpression() string { + if x != nil { + return x.Expression + } + return "" +} + +func (x *Condition) GetParameters() map[string]*ConditionParamTypeRef { + if x != nil { + return x.Parameters + } + return nil +} + +type ConditionParamTypeRef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TypeName ConditionParamTypeRef_TypeName `protobuf:"varint,1,opt,name=type_name,json=typeName,proto3,enum=openfga.v1.ConditionParamTypeRef_TypeName" json:"type_name,omitempty"` + GenericTypes []*ConditionParamTypeRef `protobuf:"bytes,2,rep,name=generic_types,json=genericTypes,proto3" json:"generic_types,omitempty"` +} + +func (x *ConditionParamTypeRef) Reset() { + *x = ConditionParamTypeRef{} + if protoimpl.UnsafeEnabled { + mi := &file_openfga_v1_authzmodel_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ConditionParamTypeRef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConditionParamTypeRef) ProtoMessage() {} + +func (x *ConditionParamTypeRef) ProtoReflect() protoreflect.Message { + mi := &file_openfga_v1_authzmodel_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConditionParamTypeRef.ProtoReflect.Descriptor instead. +func (*ConditionParamTypeRef) Descriptor() ([]byte, []int) { + return file_openfga_v1_authzmodel_proto_rawDescGZIP(), []int{15} +} + +func (x *ConditionParamTypeRef) GetTypeName() ConditionParamTypeRef_TypeName { + if x != nil { + return x.TypeName + } + return ConditionParamTypeRef_TYPE_NAME_UNSPECIFIED +} + +func (x *ConditionParamTypeRef) GetGenericTypes() []*ConditionParamTypeRef { + if x != nil { + return x.GenericTypes + } + return nil +} + var File_openfga_v1_authzmodel_proto protoreflect.FileDescriptor var file_openfga_v1_authzmodel_proto_rawDesc = []byte{ @@ -884,7 +1098,7 @@ var file_openfga_v1_authzmodel_proto_rawDesc = []byte{ 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x04, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x6f, 0x74, 0x6f, 0x22, 0xf5, 0x05, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x59, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x49, 0x92, 0x41, 0x1e, 0x4a, 0x1c, 0x22, 0x30, 0x31, 0x47, 0x35, 0x4a, 0x41, 0x56, 0x4a, 0x34, 0x31, 0x54, 0x34, 0x39, 0x45, 0x39, 0x54, 0x54, 0x33, @@ -919,148 +1133,211 @@ var file_openfga_v1_authzmodel_proto_rawDesc = []byte{ 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x75, 0x73, 0x65, 0x72, 0x22, 0x7d, 0x5d, 0x7d, 0x7d, 0x7d, 0x7d, 0x5d, 0x52, 0x10, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0xba, 0x03, 0x0a, 0x0e, 0x54, 0x79, 0x70, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x2a, 0x92, 0x41, 0x0c, 0x4a, 0x0a, 0x22, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, - 0x6e, 0x74, 0x22, 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x5e, - 0x3a, 0x23, 0x40, 0x5c, 0x73, 0x5d, 0x7b, 0x31, 0x2c, 0x32, 0x35, 0x34, 0x7d, 0x24, 0x52, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x12, 0xe2, 0x01, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, - 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x42, 0x98, 0x01, 0x92, 0x41, 0x79, 0x4a, 0x77, 0x7b, 0x22, 0x72, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x22, 0x3a, 0x7b, 0x22, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, - 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x74, 0x68, 0x69, 0x73, 0x22, 0x3a, - 0x7b, 0x7d, 0x7d, 0x2c, 0x7b, 0x22, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, - 0x65, 0x72, 0x73, 0x65, 0x74, 0x22, 0x3a, 0x7b, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, - 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, - 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x22, 0x7d, 0x7d, 0x5d, 0x7d, 0x7d, 0x2c, 0x22, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x72, 0x22, 0x3a, 0x7b, 0x22, 0x74, 0x68, 0x69, 0x73, 0x22, 0x3a, 0x7b, 0x7d, - 0x7d, 0x7d, 0xfa, 0x42, 0x19, 0x9a, 0x01, 0x16, 0x22, 0x14, 0x72, 0x12, 0x32, 0x10, 0x5e, 0x5b, - 0x5e, 0x3a, 0x23, 0x40, 0x5c, 0x73, 0x5d, 0x7b, 0x31, 0x2c, 0x35, 0x30, 0x7d, 0x24, 0x52, 0x09, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, - 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x51, 0x0a, 0x0e, 0x52, - 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x73, 0x65, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xae, - 0x01, 0x0a, 0x08, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x72, 0x12, - 0x32, 0x10, 0x5e, 0x5b, 0x5e, 0x3a, 0x23, 0x40, 0x5c, 0x73, 0x5d, 0x7b, 0x31, 0x2c, 0x35, 0x30, - 0x7d, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x72, - 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, - 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x0b, - 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x72, 0x65, 0x77, - 0x72, 0x69, 0x74, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, - 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, - 0x73, 0x0a, 0x10, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x5f, 0x0a, 0x1b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x5f, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, - 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x1b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, - 0x79, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x12, 0x41, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x5a, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, - 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x73, 0x0a, 0x10, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x1b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, - 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, - 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x1b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, - 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0xe3, 0x01, 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0x92, 0x41, 0x09, 0x4a, 0x07, - 0x22, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, - 0x11, 0x5e, 0x5b, 0x5e, 0x3a, 0x23, 0x40, 0x5c, 0x73, 0x5d, 0x7b, 0x31, 0x2c, 0x32, 0x35, 0x34, - 0x7d, 0x24, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0x92, 0x41, 0x0a, 0x4a, - 0x08, 0x22, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x32, 0x10, - 0x5e, 0x5b, 0x5e, 0x3a, 0x23, 0x40, 0x5c, 0x73, 0x5d, 0x7b, 0x31, 0x2c, 0x35, 0x30, 0x7d, 0x24, - 0xd0, 0x01, 0x01, 0x48, 0x00, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x32, 0x0a, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x57, - 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, - 0x61, 0x72, 0x64, 0x42, 0x16, 0x0a, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6f, 0x72, 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x22, 0x0a, 0x0a, 0x08, 0x57, - 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x22, 0x35, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x65, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22, 0x80, - 0x01, 0x0a, 0x0a, 0x44, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a, - 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, + 0x73, 0x12, 0x72, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x22, 0xfa, 0x42, 0x1f, 0x9a, 0x01, 0x1c, 0x10, 0x19, 0x22, + 0x18, 0x72, 0x16, 0x10, 0x01, 0x18, 0x32, 0x32, 0x10, 0x5e, 0x5b, 0x5e, 0x3a, 0x23, 0x40, 0x5c, + 0x73, 0x5d, 0x7b, 0x31, 0x2c, 0x35, 0x30, 0x7d, 0x24, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x54, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xba, 0x03, 0x0a, 0x0e, + 0x54, 0x79, 0x70, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2a, 0x92, 0x41, + 0x0c, 0x4a, 0x0a, 0x22, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xe0, 0x41, 0x02, + 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x5e, 0x3a, 0x23, 0x40, 0x5c, 0x73, 0x5d, + 0x7b, 0x31, 0x2c, 0x32, 0x35, 0x34, 0x7d, 0x24, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0xe2, + 0x01, 0x0a, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x79, 0x70, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x98, 0x01, + 0x92, 0x41, 0x79, 0x4a, 0x77, 0x7b, 0x22, 0x72, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x3a, 0x7b, + 0x22, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x7b, 0x22, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22, + 0x3a, 0x5b, 0x7b, 0x22, 0x74, 0x68, 0x69, 0x73, 0x22, 0x3a, 0x7b, 0x7d, 0x7d, 0x2c, 0x7b, 0x22, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x22, + 0x3a, 0x7b, 0x22, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x3a, 0x22, 0x22, 0x2c, 0x22, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3a, 0x22, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, + 0x22, 0x7d, 0x7d, 0x5d, 0x7d, 0x7d, 0x2c, 0x22, 0x77, 0x72, 0x69, 0x74, 0x65, 0x72, 0x22, 0x3a, + 0x7b, 0x22, 0x74, 0x68, 0x69, 0x73, 0x22, 0x3a, 0x7b, 0x7d, 0x7d, 0x7d, 0xfa, 0x42, 0x19, 0x9a, + 0x01, 0x16, 0x22, 0x14, 0x72, 0x12, 0x32, 0x10, 0x5e, 0x5b, 0x5e, 0x3a, 0x23, 0x40, 0x5c, 0x73, + 0x5d, 0x7b, 0x31, 0x2c, 0x35, 0x30, 0x7d, 0x24, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x51, 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, + 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xae, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x72, 0x12, 0x32, 0x10, 0x5e, 0x5b, 0x5e, 0x3a, + 0x23, 0x40, 0x5c, 0x73, 0x5d, 0x7b, 0x31, 0x2c, 0x35, 0x30, 0x7d, 0x24, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x0b, 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x72, 0x65, 0x77, 0x72, 0x69, 0x74, 0x65, 0x12, 0x39, + 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x08, 0x74, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x73, 0x0a, 0x10, 0x52, 0x65, 0x6c, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5f, 0x0a, + 0x1b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x52, 0x1b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, 0xa9, + 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x41, 0x0a, 0x09, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x5a, + 0x0a, 0x0e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x73, 0x0a, 0x10, 0x52, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, + 0x0a, 0x1b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x52, 0x1b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x5f, 0x72, 0x65, 0x6c, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x22, + 0x81, 0x02, 0x0a, 0x11, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x27, 0x92, 0x41, 0x09, 0x4a, 0x07, 0x22, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x22, 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x15, 0x72, 0x13, 0x32, 0x11, 0x5e, 0x5b, 0x5e, 0x3a, 0x23, + 0x40, 0x5c, 0x73, 0x5d, 0x7b, 0x31, 0x2c, 0x32, 0x35, 0x34, 0x7d, 0x24, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x27, 0x92, 0x41, 0x0a, 0x4a, 0x08, 0x22, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x22, 0xfa, 0x42, 0x17, 0x72, 0x15, 0x32, 0x10, 0x5e, 0x5b, 0x5e, 0x3a, 0x23, 0x40, + 0x5c, 0x73, 0x5d, 0x7b, 0x31, 0x2c, 0x35, 0x30, 0x7d, 0x24, 0xd0, 0x01, 0x01, 0x48, 0x00, 0x52, + 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x08, 0x77, 0x69, 0x6c, + 0x64, 0x63, 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, + 0x64, 0x48, 0x00, 0x52, 0x08, 0x77, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x16, 0x0a, 0x14, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x72, 0x5f, 0x77, 0x69, 0x6c, 0x64, 0x63, + 0x61, 0x72, 0x64, 0x22, 0x0a, 0x0a, 0x08, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x22, + 0x35, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x63, + 0x68, 0x69, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x52, + 0x05, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x22, 0x80, 0x01, 0x0a, 0x0a, 0x44, 0x69, 0x66, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x0b, 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x05, + 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x62, 0x61, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x73, + 0x75, 0x62, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x65, 0x74, 0x42, 0x0b, 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x08, 0x73, 0x75, 0x62, 0x74, 0x72, 0x61, 0x63, 0x74, 0x22, 0xfa, 0x02, 0x0a, 0x07, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x2f, 0x0a, 0x04, 0x74, 0x68, 0x69, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x48, 0x00, + 0x52, 0x04, 0x74, 0x68, 0x69, 0x73, 0x12, 0x47, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, + 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, + 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, + 0x46, 0x0a, 0x10, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, + 0x65, 0x72, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, + 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x73, 0x48, 0x00, 0x52, 0x05, + 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, - 0x42, 0x0b, 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x62, - 0x61, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x0b, 0xe0, 0x41, 0x02, 0xfa, - 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x73, 0x75, 0x62, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x22, 0xfa, 0x02, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x2f, 0x0a, - 0x04, 0x74, 0x68, 0x69, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6f, 0x70, - 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, - 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, 0x04, 0x74, 0x68, 0x69, 0x73, 0x12, 0x47, - 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, - 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x46, 0x0a, 0x10, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x54, - 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x48, 0x00, 0x52, - 0x0e, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, - 0x2c, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x73, 0x65, 0x74, 0x73, 0x48, 0x00, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, - 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x0a, 0x64, 0x69, 0x66, - 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x22, 0x0f, - 0x0a, 0x0d, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x22, - 0x57, 0x0a, 0x0e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x20, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, 0x28, 0x80, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x28, 0x32, 0x52, 0x08, - 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8f, 0x01, 0x0a, 0x0e, 0x54, 0x75, 0x70, - 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x08, 0x74, - 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, - 0x73, 0x65, 0x74, 0x12, 0x45, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x75, - 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x42, 0x9d, 0x01, 0x0a, 0x0e, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x41, - 0x75, 0x74, 0x68, 0x7a, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, - 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, - 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, - 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4f, 0x70, 0x65, 0x6e, - 0x66, 0x67, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x4f, - 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x48, 0x00, 0x52, 0x0c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x38, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, + 0x0a, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x75, + 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x22, 0x0f, 0x0a, 0x0d, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, + 0x55, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x22, 0x57, 0x0a, 0x0e, 0x4f, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x06, 0x6f, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03, + 0x28, 0x80, 0x02, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x23, 0x0a, 0x08, 0x72, + 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, + 0x42, 0x04, 0x72, 0x02, 0x28, 0x32, 0x52, 0x08, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x8f, 0x01, 0x0a, 0x0e, 0x54, 0x75, 0x70, 0x6c, 0x65, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, + 0x73, 0x65, 0x74, 0x12, 0x36, 0x0a, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x08, 0x74, 0x75, 0x70, 0x6c, 0x65, 0x73, 0x65, 0x74, 0x12, 0x45, 0x0a, 0x10, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x65, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x65, 0x74, 0x22, 0xb9, 0x02, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x32, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, + 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x18, 0x72, 0x16, 0x10, 0x01, 0x18, 0x32, 0x32, 0x10, 0x5e, 0x5b, + 0x5e, 0x3a, 0x23, 0x40, 0x5c, 0x73, 0x5d, 0x7b, 0x31, 0x2c, 0x35, 0x30, 0x7d, 0x24, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x05, + 0x72, 0x03, 0x28, 0x80, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x69, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x22, 0xfa, 0x42, + 0x1f, 0x9a, 0x01, 0x1c, 0x10, 0x19, 0x22, 0x18, 0x72, 0x16, 0x10, 0x01, 0x18, 0x32, 0x32, 0x10, + 0x5e, 0x5b, 0x5e, 0x3a, 0x23, 0x40, 0x5c, 0x73, 0x5d, 0x7b, 0x31, 0x2c, 0x35, 0x30, 0x7d, 0x24, + 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x60, 0x0a, 0x0f, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x37, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x65, 0x66, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd2, + 0x03, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x12, 0x54, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x0b, 0xe0, 0x41, 0x02, 0xfa, 0x42, 0x05, 0x82, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x50, + 0x0a, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, + 0x10, 0x05, 0x52, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x22, 0x90, 0x02, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, + 0x15, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x41, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x10, 0x02, 0x12, + 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x53, 0x54, 0x52, + 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x41, + 0x4d, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, + 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, + 0x44, 0x55, 0x52, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, + 0x50, 0x10, 0x08, 0x12, 0x11, 0x0a, 0x0d, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, + 0x5f, 0x4d, 0x41, 0x50, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, + 0x41, 0x4d, 0x45, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x0a, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x5f, 0x49, 0x50, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, + 0x53, 0x10, 0x0b, 0x42, 0x9d, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x66, 0x67, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x6d, 0x6f, 0x64, + 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2f, + 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, + 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x0a, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x16, 0x4f, + 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0b, 0x4f, 0x70, 0x65, 0x6e, 0x66, 0x67, 0x61, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1075,53 +1352,65 @@ func file_openfga_v1_authzmodel_proto_rawDescGZIP() []byte { return file_openfga_v1_authzmodel_proto_rawDescData } -var file_openfga_v1_authzmodel_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_openfga_v1_authzmodel_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_openfga_v1_authzmodel_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_openfga_v1_authzmodel_proto_goTypes = []interface{}{ - (*AuthorizationModel)(nil), // 0: openfga.v1.AuthorizationModel - (*TypeDefinition)(nil), // 1: openfga.v1.TypeDefinition - (*Relation)(nil), // 2: openfga.v1.Relation - (*RelationTypeInfo)(nil), // 3: openfga.v1.RelationTypeInfo - (*Metadata)(nil), // 4: openfga.v1.Metadata - (*RelationMetadata)(nil), // 5: openfga.v1.RelationMetadata - (*RelationReference)(nil), // 6: openfga.v1.RelationReference - (*Wildcard)(nil), // 7: openfga.v1.Wildcard - (*Usersets)(nil), // 8: openfga.v1.Usersets - (*Difference)(nil), // 9: openfga.v1.Difference - (*Userset)(nil), // 10: openfga.v1.Userset - (*DirectUserset)(nil), // 11: openfga.v1.DirectUserset - (*ObjectRelation)(nil), // 12: openfga.v1.ObjectRelation - (*TupleToUserset)(nil), // 13: openfga.v1.TupleToUserset - nil, // 14: openfga.v1.TypeDefinition.RelationsEntry - nil, // 15: openfga.v1.Metadata.RelationsEntry + (ConditionParamTypeRef_TypeName)(0), // 0: openfga.v1.ConditionParamTypeRef.TypeName + (*AuthorizationModel)(nil), // 1: openfga.v1.AuthorizationModel + (*TypeDefinition)(nil), // 2: openfga.v1.TypeDefinition + (*Relation)(nil), // 3: openfga.v1.Relation + (*RelationTypeInfo)(nil), // 4: openfga.v1.RelationTypeInfo + (*Metadata)(nil), // 5: openfga.v1.Metadata + (*RelationMetadata)(nil), // 6: openfga.v1.RelationMetadata + (*RelationReference)(nil), // 7: openfga.v1.RelationReference + (*Wildcard)(nil), // 8: openfga.v1.Wildcard + (*Usersets)(nil), // 9: openfga.v1.Usersets + (*Difference)(nil), // 10: openfga.v1.Difference + (*Userset)(nil), // 11: openfga.v1.Userset + (*DirectUserset)(nil), // 12: openfga.v1.DirectUserset + (*ObjectRelation)(nil), // 13: openfga.v1.ObjectRelation + (*TupleToUserset)(nil), // 14: openfga.v1.TupleToUserset + (*Condition)(nil), // 15: openfga.v1.Condition + (*ConditionParamTypeRef)(nil), // 16: openfga.v1.ConditionParamTypeRef + nil, // 17: openfga.v1.AuthorizationModel.ConditionsEntry + nil, // 18: openfga.v1.TypeDefinition.RelationsEntry + nil, // 19: openfga.v1.Metadata.RelationsEntry + nil, // 20: openfga.v1.Condition.ParametersEntry } var file_openfga_v1_authzmodel_proto_depIdxs = []int32{ - 1, // 0: openfga.v1.AuthorizationModel.type_definitions:type_name -> openfga.v1.TypeDefinition - 14, // 1: openfga.v1.TypeDefinition.relations:type_name -> openfga.v1.TypeDefinition.RelationsEntry - 4, // 2: openfga.v1.TypeDefinition.metadata:type_name -> openfga.v1.Metadata - 10, // 3: openfga.v1.Relation.rewrite:type_name -> openfga.v1.Userset - 3, // 4: openfga.v1.Relation.type_info:type_name -> openfga.v1.RelationTypeInfo - 6, // 5: openfga.v1.RelationTypeInfo.directly_related_user_types:type_name -> openfga.v1.RelationReference - 15, // 6: openfga.v1.Metadata.relations:type_name -> openfga.v1.Metadata.RelationsEntry - 6, // 7: openfga.v1.RelationMetadata.directly_related_user_types:type_name -> openfga.v1.RelationReference - 7, // 8: openfga.v1.RelationReference.wildcard:type_name -> openfga.v1.Wildcard - 10, // 9: openfga.v1.Usersets.child:type_name -> openfga.v1.Userset - 10, // 10: openfga.v1.Difference.base:type_name -> openfga.v1.Userset - 10, // 11: openfga.v1.Difference.subtract:type_name -> openfga.v1.Userset - 11, // 12: openfga.v1.Userset.this:type_name -> openfga.v1.DirectUserset - 12, // 13: openfga.v1.Userset.computed_userset:type_name -> openfga.v1.ObjectRelation - 13, // 14: openfga.v1.Userset.tuple_to_userset:type_name -> openfga.v1.TupleToUserset - 8, // 15: openfga.v1.Userset.union:type_name -> openfga.v1.Usersets - 8, // 16: openfga.v1.Userset.intersection:type_name -> openfga.v1.Usersets - 9, // 17: openfga.v1.Userset.difference:type_name -> openfga.v1.Difference - 12, // 18: openfga.v1.TupleToUserset.tupleset:type_name -> openfga.v1.ObjectRelation - 12, // 19: openfga.v1.TupleToUserset.computed_userset:type_name -> openfga.v1.ObjectRelation - 10, // 20: openfga.v1.TypeDefinition.RelationsEntry.value:type_name -> openfga.v1.Userset - 5, // 21: openfga.v1.Metadata.RelationsEntry.value:type_name -> openfga.v1.RelationMetadata - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 2, // 0: openfga.v1.AuthorizationModel.type_definitions:type_name -> openfga.v1.TypeDefinition + 17, // 1: openfga.v1.AuthorizationModel.conditions:type_name -> openfga.v1.AuthorizationModel.ConditionsEntry + 18, // 2: openfga.v1.TypeDefinition.relations:type_name -> openfga.v1.TypeDefinition.RelationsEntry + 5, // 3: openfga.v1.TypeDefinition.metadata:type_name -> openfga.v1.Metadata + 11, // 4: openfga.v1.Relation.rewrite:type_name -> openfga.v1.Userset + 4, // 5: openfga.v1.Relation.type_info:type_name -> openfga.v1.RelationTypeInfo + 7, // 6: openfga.v1.RelationTypeInfo.directly_related_user_types:type_name -> openfga.v1.RelationReference + 19, // 7: openfga.v1.Metadata.relations:type_name -> openfga.v1.Metadata.RelationsEntry + 7, // 8: openfga.v1.RelationMetadata.directly_related_user_types:type_name -> openfga.v1.RelationReference + 8, // 9: openfga.v1.RelationReference.wildcard:type_name -> openfga.v1.Wildcard + 11, // 10: openfga.v1.Usersets.child:type_name -> openfga.v1.Userset + 11, // 11: openfga.v1.Difference.base:type_name -> openfga.v1.Userset + 11, // 12: openfga.v1.Difference.subtract:type_name -> openfga.v1.Userset + 12, // 13: openfga.v1.Userset.this:type_name -> openfga.v1.DirectUserset + 13, // 14: openfga.v1.Userset.computed_userset:type_name -> openfga.v1.ObjectRelation + 14, // 15: openfga.v1.Userset.tuple_to_userset:type_name -> openfga.v1.TupleToUserset + 9, // 16: openfga.v1.Userset.union:type_name -> openfga.v1.Usersets + 9, // 17: openfga.v1.Userset.intersection:type_name -> openfga.v1.Usersets + 10, // 18: openfga.v1.Userset.difference:type_name -> openfga.v1.Difference + 13, // 19: openfga.v1.TupleToUserset.tupleset:type_name -> openfga.v1.ObjectRelation + 13, // 20: openfga.v1.TupleToUserset.computed_userset:type_name -> openfga.v1.ObjectRelation + 20, // 21: openfga.v1.Condition.parameters:type_name -> openfga.v1.Condition.ParametersEntry + 0, // 22: openfga.v1.ConditionParamTypeRef.type_name:type_name -> openfga.v1.ConditionParamTypeRef.TypeName + 16, // 23: openfga.v1.ConditionParamTypeRef.generic_types:type_name -> openfga.v1.ConditionParamTypeRef + 15, // 24: openfga.v1.AuthorizationModel.ConditionsEntry.value:type_name -> openfga.v1.Condition + 11, // 25: openfga.v1.TypeDefinition.RelationsEntry.value:type_name -> openfga.v1.Userset + 6, // 26: openfga.v1.Metadata.RelationsEntry.value:type_name -> openfga.v1.RelationMetadata + 16, // 27: openfga.v1.Condition.ParametersEntry.value:type_name -> openfga.v1.ConditionParamTypeRef + 28, // [28:28] is the sub-list for method output_type + 28, // [28:28] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name } func init() { file_openfga_v1_authzmodel_proto_init() } @@ -1298,6 +1587,30 @@ func file_openfga_v1_authzmodel_proto_init() { return nil } } + file_openfga_v1_authzmodel_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Condition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_openfga_v1_authzmodel_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ConditionParamTypeRef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_openfga_v1_authzmodel_proto_msgTypes[6].OneofWrappers = []interface{}{ (*RelationReference_Relation)(nil), @@ -1316,13 +1629,14 @@ func file_openfga_v1_authzmodel_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_openfga_v1_authzmodel_proto_rawDesc, - NumEnums: 0, - NumMessages: 16, + NumEnums: 1, + NumMessages: 20, NumExtensions: 0, NumServices: 0, }, GoTypes: file_openfga_v1_authzmodel_proto_goTypes, DependencyIndexes: file_openfga_v1_authzmodel_proto_depIdxs, + EnumInfos: file_openfga_v1_authzmodel_proto_enumTypes, MessageInfos: file_openfga_v1_authzmodel_proto_msgTypes, }.Build() File_openfga_v1_authzmodel_proto = out.File diff --git a/proto/openfga/v1/authzmodel.pb.validate.go b/proto/openfga/v1/authzmodel.pb.validate.go index 98bd2d0..e2bb9a8 100644 --- a/proto/openfga/v1/authzmodel.pb.validate.go +++ b/proto/openfga/v1/authzmodel.pb.validate.go @@ -104,6 +104,83 @@ func (m *AuthorizationModel) validate(all bool) error { } + if len(m.GetConditions()) > 25 { + err := AuthorizationModelValidationError{ + field: "Conditions", + reason: "value must contain no more than 25 pair(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + { + sorted_keys := make([]string, len(m.GetConditions())) + i := 0 + for key := range m.GetConditions() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetConditions()[key] + _ = val + + if l := utf8.RuneCountInString(key); l < 1 || l > 50 { + err := AuthorizationModelValidationError{ + field: fmt.Sprintf("Conditions[%v]", key), + reason: "value length must be between 1 and 50 runes, inclusive", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_AuthorizationModel_Conditions_Pattern.MatchString(key) { + err := AuthorizationModelValidationError{ + field: fmt.Sprintf("Conditions[%v]", key), + reason: "value does not match regex pattern \"^[^:#@\\\\s]{1,50}$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, AuthorizationModelValidationError{ + field: fmt.Sprintf("Conditions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, AuthorizationModelValidationError{ + field: fmt.Sprintf("Conditions[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return AuthorizationModelValidationError{ + field: fmt.Sprintf("Conditions[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + if len(errors) > 0 { return AuthorizationModelMultiError(errors) } @@ -186,6 +263,8 @@ var _ interface { var _AuthorizationModel_Id_Pattern = regexp.MustCompile("^[ABCDEFGHJKMNPQRSTVWXYZ0-9]{26}$") +var _AuthorizationModel_Conditions_Pattern = regexp.MustCompile("^[^:#@\\s]{1,50}$") + // Validate checks the field values on TypeDefinition with the rules defined in // the proto definition for this message. If any rules are violated, the first // error encountered is returned, or nil if there are no violations. @@ -1012,6 +1091,8 @@ func (m *RelationReference) validate(all bool) error { errors = append(errors, err) } + // no validation rules for Condition + switch v := m.RelationOrWildcard.(type) { case *RelationReference_Relation: if v == nil { @@ -2308,3 +2389,374 @@ var _ interface { Cause() error ErrorName() string } = TupleToUsersetValidationError{} + +// Validate checks the field values on Condition with the rules defined in the +// proto definition for this message. If any rules are violated, the first +// error encountered is returned, or nil if there are no violations. +func (m *Condition) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on Condition with the rules defined in +// the proto definition for this message. If any rules are violated, the +// result is a list of violation errors wrapped in ConditionMultiError, or nil +// if none found. +func (m *Condition) ValidateAll() error { + return m.validate(true) +} + +func (m *Condition) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if l := utf8.RuneCountInString(m.GetName()); l < 1 || l > 50 { + err := ConditionValidationError{ + field: "Name", + reason: "value length must be between 1 and 50 runes, inclusive", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_Condition_Name_Pattern.MatchString(m.GetName()) { + err := ConditionValidationError{ + field: "Name", + reason: "value does not match regex pattern \"^[^:#@\\\\s]{1,50}$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(m.GetExpression()) > 512 { + err := ConditionValidationError{ + field: "Expression", + reason: "value length must be at most 512 bytes", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(m.GetParameters()) > 25 { + err := ConditionValidationError{ + field: "Parameters", + reason: "value must contain no more than 25 pair(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + { + sorted_keys := make([]string, len(m.GetParameters())) + i := 0 + for key := range m.GetParameters() { + sorted_keys[i] = key + i++ + } + sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] }) + for _, key := range sorted_keys { + val := m.GetParameters()[key] + _ = val + + if l := utf8.RuneCountInString(key); l < 1 || l > 50 { + err := ConditionValidationError{ + field: fmt.Sprintf("Parameters[%v]", key), + reason: "value length must be between 1 and 50 runes, inclusive", + } + if !all { + return err + } + errors = append(errors, err) + } + + if !_Condition_Parameters_Pattern.MatchString(key) { + err := ConditionValidationError{ + field: fmt.Sprintf("Parameters[%v]", key), + reason: "value does not match regex pattern \"^[^:#@\\\\s]{1,50}$\"", + } + if !all { + return err + } + errors = append(errors, err) + } + + if all { + switch v := interface{}(val).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConditionValidationError{ + field: fmt.Sprintf("Parameters[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConditionValidationError{ + field: fmt.Sprintf("Parameters[%v]", key), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(val).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConditionValidationError{ + field: fmt.Sprintf("Parameters[%v]", key), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + } + + if len(errors) > 0 { + return ConditionMultiError(errors) + } + + return nil +} + +// ConditionMultiError is an error wrapping multiple validation errors returned +// by Condition.ValidateAll() if the designated constraints aren't met. +type ConditionMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConditionMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConditionMultiError) AllErrors() []error { return m } + +// ConditionValidationError is the validation error returned by +// Condition.Validate if the designated constraints aren't met. +type ConditionValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConditionValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConditionValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConditionValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConditionValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConditionValidationError) ErrorName() string { return "ConditionValidationError" } + +// Error satisfies the builtin error interface +func (e ConditionValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sCondition.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConditionValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConditionValidationError{} + +var _Condition_Name_Pattern = regexp.MustCompile("^[^:#@\\s]{1,50}$") + +var _Condition_Parameters_Pattern = regexp.MustCompile("^[^:#@\\s]{1,50}$") + +// Validate checks the field values on ConditionParamTypeRef with the rules +// defined in the proto definition for this message. If any rules are +// violated, the first error encountered is returned, or nil if there are no violations. +func (m *ConditionParamTypeRef) Validate() error { + return m.validate(false) +} + +// ValidateAll checks the field values on ConditionParamTypeRef with the rules +// defined in the proto definition for this message. If any rules are +// violated, the result is a list of violation errors wrapped in +// ConditionParamTypeRefMultiError, or nil if none found. +func (m *ConditionParamTypeRef) ValidateAll() error { + return m.validate(true) +} + +func (m *ConditionParamTypeRef) validate(all bool) error { + if m == nil { + return nil + } + + var errors []error + + if _, ok := ConditionParamTypeRef_TypeName_name[int32(m.GetTypeName())]; !ok { + err := ConditionParamTypeRefValidationError{ + field: "TypeName", + reason: "value must be one of the defined enum values", + } + if !all { + return err + } + errors = append(errors, err) + } + + if len(m.GetGenericTypes()) > 5 { + err := ConditionParamTypeRefValidationError{ + field: "GenericTypes", + reason: "value must contain no more than 5 item(s)", + } + if !all { + return err + } + errors = append(errors, err) + } + + for idx, item := range m.GetGenericTypes() { + _, _ = idx, item + + if all { + switch v := interface{}(item).(type) { + case interface{ ValidateAll() error }: + if err := v.ValidateAll(); err != nil { + errors = append(errors, ConditionParamTypeRefValidationError{ + field: fmt.Sprintf("GenericTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + case interface{ Validate() error }: + if err := v.Validate(); err != nil { + errors = append(errors, ConditionParamTypeRefValidationError{ + field: fmt.Sprintf("GenericTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + }) + } + } + } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { + if err := v.Validate(); err != nil { + return ConditionParamTypeRefValidationError{ + field: fmt.Sprintf("GenericTypes[%v]", idx), + reason: "embedded message failed validation", + cause: err, + } + } + } + + } + + if len(errors) > 0 { + return ConditionParamTypeRefMultiError(errors) + } + + return nil +} + +// ConditionParamTypeRefMultiError is an error wrapping multiple validation +// errors returned by ConditionParamTypeRef.ValidateAll() if the designated +// constraints aren't met. +type ConditionParamTypeRefMultiError []error + +// Error returns a concatenation of all the error messages it wraps. +func (m ConditionParamTypeRefMultiError) Error() string { + var msgs []string + for _, err := range m { + msgs = append(msgs, err.Error()) + } + return strings.Join(msgs, "; ") +} + +// AllErrors returns a list of validation violation errors. +func (m ConditionParamTypeRefMultiError) AllErrors() []error { return m } + +// ConditionParamTypeRefValidationError is the validation error returned by +// ConditionParamTypeRef.Validate if the designated constraints aren't met. +type ConditionParamTypeRefValidationError struct { + field string + reason string + cause error + key bool +} + +// Field function returns field value. +func (e ConditionParamTypeRefValidationError) Field() string { return e.field } + +// Reason function returns reason value. +func (e ConditionParamTypeRefValidationError) Reason() string { return e.reason } + +// Cause function returns cause value. +func (e ConditionParamTypeRefValidationError) Cause() error { return e.cause } + +// Key function returns key value. +func (e ConditionParamTypeRefValidationError) Key() bool { return e.key } + +// ErrorName returns error name. +func (e ConditionParamTypeRefValidationError) ErrorName() string { + return "ConditionParamTypeRefValidationError" +} + +// Error satisfies the builtin error interface +func (e ConditionParamTypeRefValidationError) Error() string { + cause := "" + if e.cause != nil { + cause = fmt.Sprintf(" | caused by: %v", e.cause) + } + + key := "" + if e.key { + key = "key for " + } + + return fmt.Sprintf( + "invalid %sConditionParamTypeRef.%s: %s%s", + key, + e.field, + e.reason, + cause) +} + +var _ error = ConditionParamTypeRefValidationError{} + +var _ interface { + Field() string + Reason() string + Key() bool + Cause() error + ErrorName() string +} = ConditionParamTypeRefValidationError{}