From d10278575a7d8b05679697d8525a6cb7d7e1f7a1 Mon Sep 17 00:00:00 2001 From: Max Baumann Date: Sun, 26 May 2024 19:01:00 +0200 Subject: [PATCH] PropertyView + PropertyValues = Properties (#758) Co-authored-by: Paul Kalhorn <67231903+PaulKalho@users.noreply.github.com> --- dev/apisix_config.yaml | 4 - .../v1/property_value_svc.pb.dart | 97 ++++- .../v1/property_value_svc.pbjson.dart | 28 +- .../property_svc/v1/property_value_svc.pb.go | 341 ++++++++++++------ .../property_svc/v1/property_views_svc.pb.go | 229 ++++++------ .../v1/property_views_svc_grpc.pb.go | 30 +- .../services/property_svc/v1/types.pb.go | 61 ++-- .../property_svc/v1/property_value_svc_pb2.py | 20 +- .../property_svc/v1/property_views_svc_pb2.py | 19 +- .../v1/property_views_svc_pb2_grpc.py | 26 +- .../services/property_svc/v1/types_pb2.py | 8 +- .../v1/property_value_svc_pb.d.ts | 51 ++- .../property_svc/v1/property_value_svc_pb.js | 295 ++++++++++++++- .../v1/property_views_svc_grpc_web_pb.d.ts | 14 +- .../v1/property_views_svc_grpc_web_pb.js | 40 +- .../v1/property_views_svc_pb.d.ts | 64 ++-- .../property_svc/v1/property_views_svc_pb.js | 237 ++++++------ .../services/property_svc/v1/types_pb.d.ts | 1 + .../services/property_svc/v1/types_pb.js | 3 +- libs/hwutil/arrays.go | 20 + .../property_svc/v1/property_value_svc.proto | 10 +- .../property_svc/v1/property_views_svc.proto | 15 +- proto/services/property_svc/v1/types.proto | 1 + .../property_svc/v1/property_value_svc_pb2.py | 20 +- .../property_svc/v1/property_views_svc_pb2.py | 19 +- .../v1/property_views_svc_pb2_grpc.py | 26 +- .../services/property_svc/v1/types_pb2.py | 8 +- services/property-svc/go.mod | 1 + .../internal/property-value/api/grpc.go | 95 +++-- .../property-value/models/propertyValue.go | 23 ++ .../v1/get_property_values_by_subject_id.go | 84 +++-- .../internal/property-view/api/grpc.go | 34 +- .../internal/property-view/api/grpc_test.go | 113 ++++-- .../models/property_view_rule.go | 12 + .../models/task_property_matchers.go | 39 ++ .../property-view/queries/v1/views.go | 26 ++ services/property-svc/repos/property_repo.sql | 3 + .../repos/property_repo/property_repo.sql.go | 11 + .../repos/property_value_repo.sql | 21 +- .../property_value_repo.sql.go | 82 ++++- .../property-svc/repos/task_views_repo.sql | 13 + .../task_views_repo/task_views_repo.sql.go | 44 +++ services/property-svc/schema.sql | 2 +- 43 files changed, 1603 insertions(+), 687 deletions(-) create mode 100644 services/property-svc/internal/property-view/queries/v1/views.go diff --git a/dev/apisix_config.yaml b/dev/apisix_config.yaml index a4154698e..1d807db88 100644 --- a/dev/apisix_config.yaml +++ b/dev/apisix_config.yaml @@ -4,10 +4,6 @@ apisix: enable_http2: false node_listen: - port: 9080 - enable_control: true - control: - ip: "127.0.0.1" - port: 9081 deployment: role: data_plane diff --git a/gen/dart/lib/proto/services/property_svc/v1/property_value_svc.pb.dart b/gen/dart/lib/proto/services/property_svc/v1/property_value_svc.pb.dart index 81ddec242..c958626d5 100644 --- a/gen/dart/lib/proto/services/property_svc/v1/property_value_svc.pb.dart +++ b/gen/dart/lib/proto/services/property_svc/v1/property_value_svc.pb.dart @@ -244,15 +244,82 @@ class AttachPropertyValueResponse extends $pb.GeneratedMessage { void clearPropertyValueId() => clearField(1); } -/// -/// GetAttachedPropertyValue +class TaskPropertyMatcher extends $pb.GeneratedMessage { + factory TaskPropertyMatcher({ + $core.String? wardId, + $core.String? taskId, + }) { + final $result = create(); + if (wardId != null) { + $result.wardId = wardId; + } + if (taskId != null) { + $result.taskId = taskId; + } + return $result; + } + TaskPropertyMatcher._() : super(); + factory TaskPropertyMatcher.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); + factory TaskPropertyMatcher.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + + static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TaskPropertyMatcher', package: const $pb.PackageName(_omitMessageNames ? '' : 'proto.services.property_svc.v1'), createEmptyInstance: create) + ..aOS(1, _omitFieldNames ? '' : 'wardId') + ..aOS(2, _omitFieldNames ? '' : 'taskId') + ..hasRequiredFields = false + ; + + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' + 'Will be removed in next major version') + TaskPropertyMatcher clone() => TaskPropertyMatcher()..mergeFromMessage(this); + @$core.Deprecated( + 'Using this can add significant overhead to your binary. ' + 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' + 'Will be removed in next major version') + TaskPropertyMatcher copyWith(void Function(TaskPropertyMatcher) updates) => super.copyWith((message) => updates(message as TaskPropertyMatcher)) as TaskPropertyMatcher; + + $pb.BuilderInfo get info_ => _i; + + @$core.pragma('dart2js:noInline') + static TaskPropertyMatcher create() => TaskPropertyMatcher._(); + TaskPropertyMatcher createEmptyInstance() => create(); + static $pb.PbList createRepeated() => $pb.PbList(); + @$core.pragma('dart2js:noInline') + static TaskPropertyMatcher getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); + static TaskPropertyMatcher? _defaultInstance; + + @$pb.TagNumber(1) + $core.String get wardId => $_getSZ(0); + @$pb.TagNumber(1) + set wardId($core.String v) { $_setString(0, v); } + @$pb.TagNumber(1) + $core.bool hasWardId() => $_has(0); + @$pb.TagNumber(1) + void clearWardId() => clearField(1); + + @$pb.TagNumber(2) + $core.String get taskId => $_getSZ(1); + @$pb.TagNumber(2) + set taskId($core.String v) { $_setString(1, v); } + @$pb.TagNumber(2) + $core.bool hasTaskId() => $_has(1); + @$pb.TagNumber(2) + void clearTaskId() => clearField(2); +} + +enum GetAttachedPropertyValuesRequest_Matcher { + taskMatcher, + notSet +} + class GetAttachedPropertyValuesRequest extends $pb.GeneratedMessage { factory GetAttachedPropertyValuesRequest({ - $core.String? subjectId, + TaskPropertyMatcher? taskMatcher, }) { final $result = create(); - if (subjectId != null) { - $result.subjectId = subjectId; + if (taskMatcher != null) { + $result.taskMatcher = taskMatcher; } return $result; } @@ -260,8 +327,13 @@ class GetAttachedPropertyValuesRequest extends $pb.GeneratedMessage { factory GetAttachedPropertyValuesRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); factory GetAttachedPropertyValuesRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); + static const $core.Map<$core.int, GetAttachedPropertyValuesRequest_Matcher> _GetAttachedPropertyValuesRequest_MatcherByTag = { + 1 : GetAttachedPropertyValuesRequest_Matcher.taskMatcher, + 0 : GetAttachedPropertyValuesRequest_Matcher.notSet + }; static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GetAttachedPropertyValuesRequest', package: const $pb.PackageName(_omitMessageNames ? '' : 'proto.services.property_svc.v1'), createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'subjectId') + ..oo(0, [1]) + ..aOM(1, _omitFieldNames ? '' : 'taskMatcher', subBuilder: TaskPropertyMatcher.create) ..hasRequiredFields = false ; @@ -286,14 +358,19 @@ class GetAttachedPropertyValuesRequest extends $pb.GeneratedMessage { static GetAttachedPropertyValuesRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); static GetAttachedPropertyValuesRequest? _defaultInstance; + GetAttachedPropertyValuesRequest_Matcher whichMatcher() => _GetAttachedPropertyValuesRequest_MatcherByTag[$_whichOneof(0)]!; + void clearMatcher() => clearField($_whichOneof(0)); + @$pb.TagNumber(1) - $core.String get subjectId => $_getSZ(0); + TaskPropertyMatcher get taskMatcher => $_getN(0); @$pb.TagNumber(1) - set subjectId($core.String v) { $_setString(0, v); } + set taskMatcher(TaskPropertyMatcher v) { setField(1, v); } @$pb.TagNumber(1) - $core.bool hasSubjectId() => $_has(0); + $core.bool hasTaskMatcher() => $_has(0); @$pb.TagNumber(1) - void clearSubjectId() => clearField(1); + void clearTaskMatcher() => clearField(1); + @$pb.TagNumber(1) + TaskPropertyMatcher ensureTaskMatcher() => $_ensure(0); } enum GetAttachedPropertyValuesResponse_Value_Value { diff --git a/gen/dart/lib/proto/services/property_svc/v1/property_value_svc.pbjson.dart b/gen/dart/lib/proto/services/property_svc/v1/property_value_svc.pbjson.dart index 217743193..2a106d78c 100644 --- a/gen/dart/lib/proto/services/property_svc/v1/property_value_svc.pbjson.dart +++ b/gen/dart/lib/proto/services/property_svc/v1/property_value_svc.pbjson.dart @@ -54,18 +54,40 @@ final $typed_data.Uint8List attachPropertyValueResponseDescriptor = $convert.bas 'ChtBdHRhY2hQcm9wZXJ0eVZhbHVlUmVzcG9uc2USKgoRcHJvcGVydHlfdmFsdWVfaWQYASABKA' 'lSD3Byb3BlcnR5VmFsdWVJZA=='); +@$core.Deprecated('Use taskPropertyMatcherDescriptor instead') +const TaskPropertyMatcher$json = { + '1': 'TaskPropertyMatcher', + '2': [ + {'1': 'ward_id', '3': 1, '4': 1, '5': 9, '9': 0, '10': 'wardId', '17': true}, + {'1': 'task_id', '3': 2, '4': 1, '5': 9, '9': 1, '10': 'taskId', '17': true}, + ], + '8': [ + {'1': '_ward_id'}, + {'1': '_task_id'}, + ], +}; + +/// Descriptor for `TaskPropertyMatcher`. Decode as a `google.protobuf.DescriptorProto`. +final $typed_data.Uint8List taskPropertyMatcherDescriptor = $convert.base64Decode( + 'ChNUYXNrUHJvcGVydHlNYXRjaGVyEhwKB3dhcmRfaWQYASABKAlIAFIGd2FyZElkiAEBEhwKB3' + 'Rhc2tfaWQYAiABKAlIAVIGdGFza0lkiAEBQgoKCF93YXJkX2lkQgoKCF90YXNrX2lk'); + @$core.Deprecated('Use getAttachedPropertyValuesRequestDescriptor instead') const GetAttachedPropertyValuesRequest$json = { '1': 'GetAttachedPropertyValuesRequest', '2': [ - {'1': 'subject_id', '3': 1, '4': 1, '5': 9, '10': 'subjectId'}, + {'1': 'task_matcher', '3': 1, '4': 1, '5': 11, '6': '.proto.services.property_svc.v1.TaskPropertyMatcher', '9': 0, '10': 'taskMatcher'}, + ], + '8': [ + {'1': 'matcher'}, ], }; /// Descriptor for `GetAttachedPropertyValuesRequest`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getAttachedPropertyValuesRequestDescriptor = $convert.base64Decode( - 'CiBHZXRBdHRhY2hlZFByb3BlcnR5VmFsdWVzUmVxdWVzdBIdCgpzdWJqZWN0X2lkGAEgASgJUg' - 'lzdWJqZWN0SWQ='); + 'CiBHZXRBdHRhY2hlZFByb3BlcnR5VmFsdWVzUmVxdWVzdBJYCgx0YXNrX21hdGNoZXIYASABKA' + 'syMy5wcm90by5zZXJ2aWNlcy5wcm9wZXJ0eV9zdmMudjEuVGFza1Byb3BlcnR5TWF0Y2hlckgA' + 'Ugt0YXNrTWF0Y2hlckIJCgdtYXRjaGVy'); @$core.Deprecated('Use getAttachedPropertyValuesResponseDescriptor instead') const GetAttachedPropertyValuesResponse$json = { diff --git a/gen/go/proto/services/property_svc/v1/property_value_svc.pb.go b/gen/go/proto/services/property_svc/v1/property_value_svc.pb.go index 66a0977e9..47e1949d1 100644 --- a/gen/go/proto/services/property_svc/v1/property_value_svc.pb.go +++ b/gen/go/proto/services/property_svc/v1/property_value_svc.pb.go @@ -222,19 +222,76 @@ func (x *AttachPropertyValueResponse) GetPropertyValueId() string { return "" } -// GetAttachedPropertyValue +type TaskPropertyMatcher struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + WardId *string `protobuf:"bytes,1,opt,name=ward_id,json=wardId,proto3,oneof" json:"ward_id,omitempty" validate:"omitempty,omitnil,uuid4"` // @gotags: validate:"omitempty,omitnil,uuid4" + TaskId *string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3,oneof" json:"task_id,omitempty" validate:"omitempty,omitnil,uuid4"` // @gotags: validate:"omitempty,omitnil,uuid4" +} + +func (x *TaskPropertyMatcher) Reset() { + *x = TaskPropertyMatcher{} + if protoimpl.UnsafeEnabled { + mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskPropertyMatcher) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskPropertyMatcher) ProtoMessage() {} + +func (x *TaskPropertyMatcher) ProtoReflect() protoreflect.Message { + mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[2] + 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 TaskPropertyMatcher.ProtoReflect.Descriptor instead. +func (*TaskPropertyMatcher) Descriptor() ([]byte, []int) { + return file_proto_services_property_svc_v1_property_value_svc_proto_rawDescGZIP(), []int{2} +} + +func (x *TaskPropertyMatcher) GetWardId() string { + if x != nil && x.WardId != nil { + return *x.WardId + } + return "" +} + +func (x *TaskPropertyMatcher) GetTaskId() string { + if x != nil && x.TaskId != nil { + return *x.TaskId + } + return "" +} + type GetAttachedPropertyValuesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SubjectId string `protobuf:"bytes,1,opt,name=subject_id,json=subjectId,proto3" json:"subject_id,omitempty"` + // Types that are assignable to Matcher: + // + // *GetAttachedPropertyValuesRequest_TaskMatcher + Matcher isGetAttachedPropertyValuesRequest_Matcher `protobuf_oneof:"matcher"` } func (x *GetAttachedPropertyValuesRequest) Reset() { *x = GetAttachedPropertyValuesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[2] + mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -247,7 +304,7 @@ func (x *GetAttachedPropertyValuesRequest) String() string { func (*GetAttachedPropertyValuesRequest) ProtoMessage() {} func (x *GetAttachedPropertyValuesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[2] + mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -260,16 +317,33 @@ func (x *GetAttachedPropertyValuesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAttachedPropertyValuesRequest.ProtoReflect.Descriptor instead. func (*GetAttachedPropertyValuesRequest) Descriptor() ([]byte, []int) { - return file_proto_services_property_svc_v1_property_value_svc_proto_rawDescGZIP(), []int{2} + return file_proto_services_property_svc_v1_property_value_svc_proto_rawDescGZIP(), []int{3} } -func (x *GetAttachedPropertyValuesRequest) GetSubjectId() string { - if x != nil { - return x.SubjectId +func (m *GetAttachedPropertyValuesRequest) GetMatcher() isGetAttachedPropertyValuesRequest_Matcher { + if m != nil { + return m.Matcher } - return "" + return nil +} + +func (x *GetAttachedPropertyValuesRequest) GetTaskMatcher() *TaskPropertyMatcher { + if x, ok := x.GetMatcher().(*GetAttachedPropertyValuesRequest_TaskMatcher); ok { + return x.TaskMatcher + } + return nil } +type isGetAttachedPropertyValuesRequest_Matcher interface { + isGetAttachedPropertyValuesRequest_Matcher() +} + +type GetAttachedPropertyValuesRequest_TaskMatcher struct { + TaskMatcher *TaskPropertyMatcher `protobuf:"bytes,1,opt,name=task_matcher,json=taskMatcher,proto3,oneof"` +} + +func (*GetAttachedPropertyValuesRequest_TaskMatcher) isGetAttachedPropertyValuesRequest_Matcher() {} + type GetAttachedPropertyValuesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -281,7 +355,7 @@ type GetAttachedPropertyValuesResponse struct { func (x *GetAttachedPropertyValuesResponse) Reset() { *x = GetAttachedPropertyValuesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[3] + mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -294,7 +368,7 @@ func (x *GetAttachedPropertyValuesResponse) String() string { func (*GetAttachedPropertyValuesResponse) ProtoMessage() {} func (x *GetAttachedPropertyValuesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[3] + mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -307,7 +381,7 @@ func (x *GetAttachedPropertyValuesResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetAttachedPropertyValuesResponse.ProtoReflect.Descriptor instead. func (*GetAttachedPropertyValuesResponse) Descriptor() ([]byte, []int) { - return file_proto_services_property_svc_v1_property_value_svc_proto_rawDescGZIP(), []int{3} + return file_proto_services_property_svc_v1_property_value_svc_proto_rawDescGZIP(), []int{4} } func (x *GetAttachedPropertyValuesResponse) GetValues() []*GetAttachedPropertyValuesResponse_Value { @@ -341,7 +415,7 @@ type GetAttachedPropertyValuesResponse_Value struct { func (x *GetAttachedPropertyValuesResponse_Value) Reset() { *x = GetAttachedPropertyValuesResponse_Value{} if protoimpl.UnsafeEnabled { - mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[4] + mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -354,7 +428,7 @@ func (x *GetAttachedPropertyValuesResponse_Value) String() string { func (*GetAttachedPropertyValuesResponse_Value) ProtoMessage() {} func (x *GetAttachedPropertyValuesResponse_Value) ProtoReflect() protoreflect.Message { - mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[4] + mi := &file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -367,7 +441,7 @@ func (x *GetAttachedPropertyValuesResponse_Value) ProtoReflect() protoreflect.Me // Deprecated: Use GetAttachedPropertyValuesResponse_Value.ProtoReflect.Descriptor instead. func (*GetAttachedPropertyValuesResponse_Value) Descriptor() ([]byte, []int) { - return file_proto_services_property_svc_v1_property_value_svc_proto_rawDescGZIP(), []int{3, 0} + return file_proto_services_property_svc_v1_property_value_svc_proto_rawDescGZIP(), []int{4, 0} } func (x *GetAttachedPropertyValuesResponse_Value) GetPropertyId() string { @@ -542,88 +616,99 @@ var file_proto_services_property_svc_v1_property_value_svc_proto_rawDesc = []byt 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x49, 0x64, 0x22, 0x41, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, - 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x49, 0x64, 0x22, 0x87, 0x05, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, - 0x61, 0x63, 0x68, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x06, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x80, 0x04, 0x0a, - 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1f, 0x0a, 0x0b, - 0x69, 0x73, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x69, 0x73, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, 0x1f, 0x0a, - 0x0a, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x09, 0x74, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, - 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x49, 0x64, 0x22, 0x69, 0x0a, 0x13, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x07, 0x77, 0x61, 0x72, + 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x77, 0x61, + 0x72, 0x64, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, + 0x49, 0x64, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x69, + 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x22, 0x87, 0x01, + 0x0a, 0x20, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x50, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x58, 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x65, 0x48, 0x00, - 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x44, 0x0a, 0x0f, 0x64, - 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x48, 0x00, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, - 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x32, - 0xce, 0x02, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x90, 0x01, 0x0a, 0x13, 0x41, 0x74, 0x74, - 0x61, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x3a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, - 0x74, 0x61, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xa2, 0x01, 0x0a, 0x19, - 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, - 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x70, 0x72, + 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, + 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x09, 0x0a, 0x07, + 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x22, 0x87, 0x05, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x41, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x1a, 0x80, + 0x04, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x0a, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x1f, + 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, 0x12, + 0x1f, 0x0a, 0x0a, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x09, 0x74, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x23, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, + 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x61, 0x74, 0x65, + 0x48, 0x00, 0x52, 0x09, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x44, 0x0a, + 0x0f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x6c, + 0x65, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x32, 0xce, 0x02, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x90, 0x01, 0x0a, 0x13, 0x41, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x3a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xa2, 0x01, + 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x50, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x42, 0xf3, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x15, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x76, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x1f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2d, 0x73, 0x76, - 0x63, 0xa2, 0x02, 0x03, 0x50, 0x53, 0x50, 0xaa, 0x02, 0x1d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5c, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x29, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5c, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, - 0x79, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x53, - 0x76, 0x63, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0xf3, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x15, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x76, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2d, + 0x73, 0x76, 0x63, 0xa2, 0x02, 0x03, 0x50, 0x53, 0x50, 0xaa, 0x02, 0x1d, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1d, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x29, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x53, 0x76, 0x63, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -638,33 +723,35 @@ func file_proto_services_property_svc_v1_property_value_svc_proto_rawDescGZIP() return file_proto_services_property_svc_v1_property_value_svc_proto_rawDescData } -var file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_proto_services_property_svc_v1_property_value_svc_proto_goTypes = []interface{}{ (*AttachPropertyValueRequest)(nil), // 0: proto.services.property_svc.v1.AttachPropertyValueRequest (*AttachPropertyValueResponse)(nil), // 1: proto.services.property_svc.v1.AttachPropertyValueResponse - (*GetAttachedPropertyValuesRequest)(nil), // 2: proto.services.property_svc.v1.GetAttachedPropertyValuesRequest - (*GetAttachedPropertyValuesResponse)(nil), // 3: proto.services.property_svc.v1.GetAttachedPropertyValuesResponse - (*GetAttachedPropertyValuesResponse_Value)(nil), // 4: proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.Value - (*Date)(nil), // 5: proto.services.property_svc.v1.Date - (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp - (FieldType)(0), // 7: proto.services.property_svc.v1.FieldType + (*TaskPropertyMatcher)(nil), // 2: proto.services.property_svc.v1.TaskPropertyMatcher + (*GetAttachedPropertyValuesRequest)(nil), // 3: proto.services.property_svc.v1.GetAttachedPropertyValuesRequest + (*GetAttachedPropertyValuesResponse)(nil), // 4: proto.services.property_svc.v1.GetAttachedPropertyValuesResponse + (*GetAttachedPropertyValuesResponse_Value)(nil), // 5: proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.Value + (*Date)(nil), // 6: proto.services.property_svc.v1.Date + (*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp + (FieldType)(0), // 8: proto.services.property_svc.v1.FieldType } var file_proto_services_property_svc_v1_property_value_svc_proto_depIdxs = []int32{ - 5, // 0: proto.services.property_svc.v1.AttachPropertyValueRequest.date_value:type_name -> proto.services.property_svc.v1.Date - 6, // 1: proto.services.property_svc.v1.AttachPropertyValueRequest.date_time_value:type_name -> google.protobuf.Timestamp - 4, // 2: proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.values:type_name -> proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.Value - 7, // 3: proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.Value.field_type:type_name -> proto.services.property_svc.v1.FieldType - 5, // 4: proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.Value.date_value:type_name -> proto.services.property_svc.v1.Date - 6, // 5: proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.Value.date_time_value:type_name -> google.protobuf.Timestamp - 0, // 6: proto.services.property_svc.v1.PropertyValueService.AttachPropertyValue:input_type -> proto.services.property_svc.v1.AttachPropertyValueRequest - 2, // 7: proto.services.property_svc.v1.PropertyValueService.GetAttachedPropertyValues:input_type -> proto.services.property_svc.v1.GetAttachedPropertyValuesRequest - 1, // 8: proto.services.property_svc.v1.PropertyValueService.AttachPropertyValue:output_type -> proto.services.property_svc.v1.AttachPropertyValueResponse - 3, // 9: proto.services.property_svc.v1.PropertyValueService.GetAttachedPropertyValues:output_type -> proto.services.property_svc.v1.GetAttachedPropertyValuesResponse - 8, // [8:10] is the sub-list for method output_type - 6, // [6:8] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 6, // 0: proto.services.property_svc.v1.AttachPropertyValueRequest.date_value:type_name -> proto.services.property_svc.v1.Date + 7, // 1: proto.services.property_svc.v1.AttachPropertyValueRequest.date_time_value:type_name -> google.protobuf.Timestamp + 2, // 2: proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.task_matcher:type_name -> proto.services.property_svc.v1.TaskPropertyMatcher + 5, // 3: proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.values:type_name -> proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.Value + 8, // 4: proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.Value.field_type:type_name -> proto.services.property_svc.v1.FieldType + 6, // 5: proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.Value.date_value:type_name -> proto.services.property_svc.v1.Date + 7, // 6: proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.Value.date_time_value:type_name -> google.protobuf.Timestamp + 0, // 7: proto.services.property_svc.v1.PropertyValueService.AttachPropertyValue:input_type -> proto.services.property_svc.v1.AttachPropertyValueRequest + 3, // 8: proto.services.property_svc.v1.PropertyValueService.GetAttachedPropertyValues:input_type -> proto.services.property_svc.v1.GetAttachedPropertyValuesRequest + 1, // 9: proto.services.property_svc.v1.PropertyValueService.AttachPropertyValue:output_type -> proto.services.property_svc.v1.AttachPropertyValueResponse + 4, // 10: proto.services.property_svc.v1.PropertyValueService.GetAttachedPropertyValues:output_type -> proto.services.property_svc.v1.GetAttachedPropertyValuesResponse + 9, // [9:11] is the sub-list for method output_type + 7, // [7:9] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_proto_services_property_svc_v1_property_value_svc_proto_init() } @@ -699,7 +786,7 @@ func file_proto_services_property_svc_v1_property_value_svc_proto_init() { } } file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAttachedPropertyValuesRequest); i { + switch v := v.(*TaskPropertyMatcher); i { case 0: return &v.state case 1: @@ -711,7 +798,7 @@ func file_proto_services_property_svc_v1_property_value_svc_proto_init() { } } file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAttachedPropertyValuesResponse); i { + switch v := v.(*GetAttachedPropertyValuesRequest); i { case 0: return &v.state case 1: @@ -723,6 +810,18 @@ func file_proto_services_property_svc_v1_property_value_svc_proto_init() { } } file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAttachedPropertyValuesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetAttachedPropertyValuesResponse_Value); i { case 0: return &v.state @@ -743,7 +842,11 @@ func file_proto_services_property_svc_v1_property_value_svc_proto_init() { (*AttachPropertyValueRequest_DateTimeValue)(nil), (*AttachPropertyValueRequest_SelectValue)(nil), } - file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[4].OneofWrappers = []interface{}{ + file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[2].OneofWrappers = []interface{}{} + file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*GetAttachedPropertyValuesRequest_TaskMatcher)(nil), + } + file_proto_services_property_svc_v1_property_value_svc_proto_msgTypes[5].OneofWrappers = []interface{}{ (*GetAttachedPropertyValuesResponse_Value_TextValue)(nil), (*GetAttachedPropertyValuesResponse_Value_NumberValue)(nil), (*GetAttachedPropertyValuesResponse_Value_BoolValue)(nil), @@ -757,7 +860,7 @@ func file_proto_services_property_svc_v1_property_value_svc_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_services_property_svc_v1_property_value_svc_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/go/proto/services/property_svc/v1/property_views_svc.pb.go b/gen/go/proto/services/property_svc/v1/property_views_svc.pb.go index 28ff9a578..8a54b956d 100644 --- a/gen/go/proto/services/property_svc/v1/property_views_svc.pb.go +++ b/gen/go/proto/services/property_svc/v1/property_views_svc.pb.go @@ -97,19 +97,20 @@ func (x *FilterUpdate) GetRemoveFromDontAlwaysInclude() []string { return nil } -type UpdateTaskPropertyViewRuleRequest struct { +type UpdatePropertyViewRuleRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // task-specific matchers - WardId *string `protobuf:"bytes,1,opt,name=ward_id,json=wardId,proto3,oneof" json:"ward_id,omitempty" validate:"omitempty,omitnil,uuid4"` // @gotags: validate:"omitempty,omitnil,uuid4" - TaskId *string `protobuf:"bytes,2,opt,name=task_id,json=taskId,proto3,oneof" json:"task_id,omitempty" validate:"omitempty,omitnil,uuid4"` // @gotags: validate:"omitempty,omitnil,uuid4" - FilterUpdate *FilterUpdate `protobuf:"bytes,3,opt,name=filter_update,json=filterUpdate,proto3" json:"filter_update,omitempty" validate:"required"` // @gotags: validate:"required" + FilterUpdate *FilterUpdate `protobuf:"bytes,1,opt,name=filter_update,json=filterUpdate,proto3" json:"filter_update,omitempty" validate:"required"` // @gotags: validate:"required" + // Types that are assignable to Matcher: + // + // *UpdatePropertyViewRuleRequest_TaskMatcher + Matcher isUpdatePropertyViewRuleRequest_Matcher `protobuf_oneof:"matcher"` } -func (x *UpdateTaskPropertyViewRuleRequest) Reset() { - *x = UpdateTaskPropertyViewRuleRequest{} +func (x *UpdatePropertyViewRuleRequest) Reset() { + *x = UpdatePropertyViewRuleRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_services_property_svc_v1_property_views_svc_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -117,13 +118,13 @@ func (x *UpdateTaskPropertyViewRuleRequest) Reset() { } } -func (x *UpdateTaskPropertyViewRuleRequest) String() string { +func (x *UpdatePropertyViewRuleRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateTaskPropertyViewRuleRequest) ProtoMessage() {} +func (*UpdatePropertyViewRuleRequest) ProtoMessage() {} -func (x *UpdateTaskPropertyViewRuleRequest) ProtoReflect() protoreflect.Message { +func (x *UpdatePropertyViewRuleRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_services_property_svc_v1_property_views_svc_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -135,40 +136,50 @@ func (x *UpdateTaskPropertyViewRuleRequest) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use UpdateTaskPropertyViewRuleRequest.ProtoReflect.Descriptor instead. -func (*UpdateTaskPropertyViewRuleRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdatePropertyViewRuleRequest.ProtoReflect.Descriptor instead. +func (*UpdatePropertyViewRuleRequest) Descriptor() ([]byte, []int) { return file_proto_services_property_svc_v1_property_views_svc_proto_rawDescGZIP(), []int{1} } -func (x *UpdateTaskPropertyViewRuleRequest) GetWardId() string { - if x != nil && x.WardId != nil { - return *x.WardId +func (x *UpdatePropertyViewRuleRequest) GetFilterUpdate() *FilterUpdate { + if x != nil { + return x.FilterUpdate } - return "" + return nil } -func (x *UpdateTaskPropertyViewRuleRequest) GetTaskId() string { - if x != nil && x.TaskId != nil { - return *x.TaskId +func (m *UpdatePropertyViewRuleRequest) GetMatcher() isUpdatePropertyViewRuleRequest_Matcher { + if m != nil { + return m.Matcher } - return "" + return nil } -func (x *UpdateTaskPropertyViewRuleRequest) GetFilterUpdate() *FilterUpdate { - if x != nil { - return x.FilterUpdate +func (x *UpdatePropertyViewRuleRequest) GetTaskMatcher() *TaskPropertyMatcher { + if x, ok := x.GetMatcher().(*UpdatePropertyViewRuleRequest_TaskMatcher); ok { + return x.TaskMatcher } return nil } -type UpdateTaskPropertyViewRuleResponse struct { +type isUpdatePropertyViewRuleRequest_Matcher interface { + isUpdatePropertyViewRuleRequest_Matcher() +} + +type UpdatePropertyViewRuleRequest_TaskMatcher struct { + TaskMatcher *TaskPropertyMatcher `protobuf:"bytes,2,opt,name=task_matcher,json=taskMatcher,proto3,oneof"` +} + +func (*UpdatePropertyViewRuleRequest_TaskMatcher) isUpdatePropertyViewRuleRequest_Matcher() {} + +type UpdatePropertyViewRuleResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *UpdateTaskPropertyViewRuleResponse) Reset() { - *x = UpdateTaskPropertyViewRuleResponse{} +func (x *UpdatePropertyViewRuleResponse) Reset() { + *x = UpdatePropertyViewRuleResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_services_property_svc_v1_property_views_svc_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -176,13 +187,13 @@ func (x *UpdateTaskPropertyViewRuleResponse) Reset() { } } -func (x *UpdateTaskPropertyViewRuleResponse) String() string { +func (x *UpdatePropertyViewRuleResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateTaskPropertyViewRuleResponse) ProtoMessage() {} +func (*UpdatePropertyViewRuleResponse) ProtoMessage() {} -func (x *UpdateTaskPropertyViewRuleResponse) ProtoReflect() protoreflect.Message { +func (x *UpdatePropertyViewRuleResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_services_property_svc_v1_property_views_svc_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -194,8 +205,8 @@ func (x *UpdateTaskPropertyViewRuleResponse) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use UpdateTaskPropertyViewRuleResponse.ProtoReflect.Descriptor instead. -func (*UpdateTaskPropertyViewRuleResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdatePropertyViewRuleResponse.ProtoReflect.Descriptor instead. +func (*UpdatePropertyViewRuleResponse) Descriptor() ([]byte, []int) { return file_proto_services_property_svc_v1_property_views_svc_proto_rawDescGZIP(), []int{2} } @@ -207,67 +218,70 @@ var file_proto_services_property_svc_v1_property_views_svc_proto_rawDesc = []byt 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x73, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x22, 0x8c, 0x02, 0x0a, 0x0c, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x61, 0x70, - 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x69, - 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x61, 0x70, - 0x70, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x41, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x49, 0x6e, 0x63, 0x6c, - 0x75, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x66, 0x72, - 0x6f, 0x6d, 0x5f, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, - 0x72, 0x6f, 0x6d, 0x41, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, - 0x12, 0x40, 0x0a, 0x1d, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x6f, - 0x6e, 0x74, 0x5f, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, - 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x19, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x54, - 0x6f, 0x44, 0x6f, 0x6e, 0x74, 0x41, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, - 0x64, 0x65, 0x12, 0x44, 0x0a, 0x1f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x66, 0x72, 0x6f, - 0x6d, 0x5f, 0x64, 0x6f, 0x6e, 0x74, 0x5f, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x69, 0x6e, - 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1b, 0x72, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x6f, 0x6e, 0x74, 0x41, 0x6c, 0x77, 0x61, 0x79, - 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x22, 0xca, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, - 0x69, 0x65, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, - 0x0a, 0x07, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x06, 0x77, 0x61, 0x72, 0x64, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, - 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x51, 0x0a, 0x0d, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x1a, 0x37, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0x8c, 0x02, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, + 0x5f, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x41, + 0x6c, 0x77, 0x61, 0x79, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x12, 0x3b, 0x0a, 0x1a, + 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x6c, 0x77, 0x61, + 0x79, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x17, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x6c, 0x77, 0x61, + 0x79, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x12, 0x40, 0x0a, 0x1d, 0x61, 0x70, 0x70, + 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x6f, 0x6e, 0x74, 0x5f, 0x61, 0x6c, 0x77, 0x61, + 0x79, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x19, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x74, 0x41, 0x6c, + 0x77, 0x61, 0x79, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x12, 0x44, 0x0a, 0x1f, 0x72, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x64, 0x6f, 0x6e, 0x74, 0x5f, + 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x1b, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x46, 0x72, 0x6f, 0x6d, + 0x44, 0x6f, 0x6e, 0x74, 0x41, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, + 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x65, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x51, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, + 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, + 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x6d, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x72, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, + 0x42, 0x09, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x22, 0x20, 0x0a, 0x1e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x65, + 0x77, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb2, 0x01, + 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x65, 0x77, 0x73, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x99, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x65, 0x77, 0x52, 0x75, 0x6c, + 0x65, 0x12, 0x3d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, - 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x0a, 0x0a, - 0x08, 0x5f, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x74, 0x61, - 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x22, 0x24, 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x65, 0x77, 0x52, - 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xbe, 0x01, 0x0a, 0x14, - 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x65, 0x77, 0x73, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0xa5, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x65, 0x77, 0x52, - 0x75, 0x6c, 0x65, 0x12, 0x41, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x50, - 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x65, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x65, 0x77, 0x52, 0x75, - 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xf3, 0x01, 0x0a, - 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, - 0x2e, 0x76, 0x31, 0x42, 0x15, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x56, 0x69, 0x65, - 0x77, 0x73, 0x53, 0x76, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x65, - 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2d, 0x73, 0x76, 0x63, 0xa2, 0x02, 0x03, - 0x50, 0x53, 0x50, 0xaa, 0x02, 0x1d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x29, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x56, 0x69, 0x65, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x3e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x56, 0x69, 0x65, 0x77, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0xf3, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x15, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x56, 0x69, 0x65, 0x77, 0x73, 0x53, 0x76, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2d, + 0x73, 0x76, 0x63, 0xa2, 0x02, 0x03, 0x50, 0x53, 0x50, 0xaa, 0x02, 0x1d, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1d, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x29, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x53, 0x76, 0x63, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -284,19 +298,21 @@ func file_proto_services_property_svc_v1_property_views_svc_proto_rawDescGZIP() var file_proto_services_property_svc_v1_property_views_svc_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_proto_services_property_svc_v1_property_views_svc_proto_goTypes = []interface{}{ - (*FilterUpdate)(nil), // 0: proto.services.property_svc.v1.FilterUpdate - (*UpdateTaskPropertyViewRuleRequest)(nil), // 1: proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest - (*UpdateTaskPropertyViewRuleResponse)(nil), // 2: proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse + (*FilterUpdate)(nil), // 0: proto.services.property_svc.v1.FilterUpdate + (*UpdatePropertyViewRuleRequest)(nil), // 1: proto.services.property_svc.v1.UpdatePropertyViewRuleRequest + (*UpdatePropertyViewRuleResponse)(nil), // 2: proto.services.property_svc.v1.UpdatePropertyViewRuleResponse + (*TaskPropertyMatcher)(nil), // 3: proto.services.property_svc.v1.TaskPropertyMatcher } var file_proto_services_property_svc_v1_property_views_svc_proto_depIdxs = []int32{ - 0, // 0: proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.filter_update:type_name -> proto.services.property_svc.v1.FilterUpdate - 1, // 1: proto.services.property_svc.v1.PropertyViewsService.UpdateTaskPropertyViewRule:input_type -> proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest - 2, // 2: proto.services.property_svc.v1.PropertyViewsService.UpdateTaskPropertyViewRule:output_type -> proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 0, // 0: proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.filter_update:type_name -> proto.services.property_svc.v1.FilterUpdate + 3, // 1: proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.task_matcher:type_name -> proto.services.property_svc.v1.TaskPropertyMatcher + 1, // 2: proto.services.property_svc.v1.PropertyViewsService.UpdatePropertyViewRule:input_type -> proto.services.property_svc.v1.UpdatePropertyViewRuleRequest + 2, // 3: proto.services.property_svc.v1.PropertyViewsService.UpdatePropertyViewRule:output_type -> proto.services.property_svc.v1.UpdatePropertyViewRuleResponse + 3, // [3:4] is the sub-list for method output_type + 2, // [2:3] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_proto_services_property_svc_v1_property_views_svc_proto_init() } @@ -304,6 +320,7 @@ func file_proto_services_property_svc_v1_property_views_svc_proto_init() { if File_proto_services_property_svc_v1_property_views_svc_proto != nil { return } + file_proto_services_property_svc_v1_property_value_svc_proto_init() if !protoimpl.UnsafeEnabled { file_proto_services_property_svc_v1_property_views_svc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FilterUpdate); i { @@ -318,7 +335,7 @@ func file_proto_services_property_svc_v1_property_views_svc_proto_init() { } } file_proto_services_property_svc_v1_property_views_svc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateTaskPropertyViewRuleRequest); i { + switch v := v.(*UpdatePropertyViewRuleRequest); i { case 0: return &v.state case 1: @@ -330,7 +347,7 @@ func file_proto_services_property_svc_v1_property_views_svc_proto_init() { } } file_proto_services_property_svc_v1_property_views_svc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateTaskPropertyViewRuleResponse); i { + switch v := v.(*UpdatePropertyViewRuleResponse); i { case 0: return &v.state case 1: @@ -342,7 +359,9 @@ func file_proto_services_property_svc_v1_property_views_svc_proto_init() { } } } - file_proto_services_property_svc_v1_property_views_svc_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_proto_services_property_svc_v1_property_views_svc_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*UpdatePropertyViewRuleRequest_TaskMatcher)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/go/proto/services/property_svc/v1/property_views_svc_grpc.pb.go b/gen/go/proto/services/property_svc/v1/property_views_svc_grpc.pb.go index 4a6d8abbd..ea36a01b9 100644 --- a/gen/go/proto/services/property_svc/v1/property_views_svc_grpc.pb.go +++ b/gen/go/proto/services/property_svc/v1/property_views_svc_grpc.pb.go @@ -19,14 +19,14 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - PropertyViewsService_UpdateTaskPropertyViewRule_FullMethodName = "/proto.services.property_svc.v1.PropertyViewsService/UpdateTaskPropertyViewRule" + PropertyViewsService_UpdatePropertyViewRule_FullMethodName = "/proto.services.property_svc.v1.PropertyViewsService/UpdatePropertyViewRule" ) // PropertyViewsServiceClient is the client API for PropertyViewsService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type PropertyViewsServiceClient interface { - UpdateTaskPropertyViewRule(ctx context.Context, in *UpdateTaskPropertyViewRuleRequest, opts ...grpc.CallOption) (*UpdateTaskPropertyViewRuleResponse, error) + UpdatePropertyViewRule(ctx context.Context, in *UpdatePropertyViewRuleRequest, opts ...grpc.CallOption) (*UpdatePropertyViewRuleResponse, error) } type propertyViewsServiceClient struct { @@ -37,9 +37,9 @@ func NewPropertyViewsServiceClient(cc grpc.ClientConnInterface) PropertyViewsSer return &propertyViewsServiceClient{cc} } -func (c *propertyViewsServiceClient) UpdateTaskPropertyViewRule(ctx context.Context, in *UpdateTaskPropertyViewRuleRequest, opts ...grpc.CallOption) (*UpdateTaskPropertyViewRuleResponse, error) { - out := new(UpdateTaskPropertyViewRuleResponse) - err := c.cc.Invoke(ctx, PropertyViewsService_UpdateTaskPropertyViewRule_FullMethodName, in, out, opts...) +func (c *propertyViewsServiceClient) UpdatePropertyViewRule(ctx context.Context, in *UpdatePropertyViewRuleRequest, opts ...grpc.CallOption) (*UpdatePropertyViewRuleResponse, error) { + out := new(UpdatePropertyViewRuleResponse) + err := c.cc.Invoke(ctx, PropertyViewsService_UpdatePropertyViewRule_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -50,7 +50,7 @@ func (c *propertyViewsServiceClient) UpdateTaskPropertyViewRule(ctx context.Cont // All implementations must embed UnimplementedPropertyViewsServiceServer // for forward compatibility type PropertyViewsServiceServer interface { - UpdateTaskPropertyViewRule(context.Context, *UpdateTaskPropertyViewRuleRequest) (*UpdateTaskPropertyViewRuleResponse, error) + UpdatePropertyViewRule(context.Context, *UpdatePropertyViewRuleRequest) (*UpdatePropertyViewRuleResponse, error) mustEmbedUnimplementedPropertyViewsServiceServer() } @@ -58,8 +58,8 @@ type PropertyViewsServiceServer interface { type UnimplementedPropertyViewsServiceServer struct { } -func (UnimplementedPropertyViewsServiceServer) UpdateTaskPropertyViewRule(context.Context, *UpdateTaskPropertyViewRuleRequest) (*UpdateTaskPropertyViewRuleResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateTaskPropertyViewRule not implemented") +func (UnimplementedPropertyViewsServiceServer) UpdatePropertyViewRule(context.Context, *UpdatePropertyViewRuleRequest) (*UpdatePropertyViewRuleResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdatePropertyViewRule not implemented") } func (UnimplementedPropertyViewsServiceServer) mustEmbedUnimplementedPropertyViewsServiceServer() {} @@ -74,20 +74,20 @@ func RegisterPropertyViewsServiceServer(s grpc.ServiceRegistrar, srv PropertyVie s.RegisterService(&PropertyViewsService_ServiceDesc, srv) } -func _PropertyViewsService_UpdateTaskPropertyViewRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateTaskPropertyViewRuleRequest) +func _PropertyViewsService_UpdatePropertyViewRule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePropertyViewRuleRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(PropertyViewsServiceServer).UpdateTaskPropertyViewRule(ctx, in) + return srv.(PropertyViewsServiceServer).UpdatePropertyViewRule(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: PropertyViewsService_UpdateTaskPropertyViewRule_FullMethodName, + FullMethod: PropertyViewsService_UpdatePropertyViewRule_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(PropertyViewsServiceServer).UpdateTaskPropertyViewRule(ctx, req.(*UpdateTaskPropertyViewRuleRequest)) + return srv.(PropertyViewsServiceServer).UpdatePropertyViewRule(ctx, req.(*UpdatePropertyViewRuleRequest)) } return interceptor(ctx, in, info, handler) } @@ -100,8 +100,8 @@ var PropertyViewsService_ServiceDesc = grpc.ServiceDesc{ HandlerType: (*PropertyViewsServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "UpdateTaskPropertyViewRule", - Handler: _PropertyViewsService_UpdateTaskPropertyViewRule_Handler, + MethodName: "UpdatePropertyViewRule", + Handler: _PropertyViewsService_UpdatePropertyViewRule_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/gen/go/proto/services/property_svc/v1/types.pb.go b/gen/go/proto/services/property_svc/v1/types.pb.go index 858740502..41eae8532 100644 --- a/gen/go/proto/services/property_svc/v1/types.pb.go +++ b/gen/go/proto/services/property_svc/v1/types.pb.go @@ -25,6 +25,7 @@ type SubjectType int32 const ( SubjectType_SUBJECT_TYPE_UNSPECIFIED SubjectType = 0 SubjectType_SUBJECT_TYPE_PATIENT SubjectType = 1 + SubjectType_SUBJECT_TYPE_TASK SubjectType = 2 ) // Enum value maps for SubjectType. @@ -32,10 +33,12 @@ var ( SubjectType_name = map[int32]string{ 0: "SUBJECT_TYPE_UNSPECIFIED", 1: "SUBJECT_TYPE_PATIENT", + 2: "SUBJECT_TYPE_TASK", } SubjectType_value = map[string]int32{ "SUBJECT_TYPE_UNSPECIFIED": 0, "SUBJECT_TYPE_PATIENT": 1, + "SUBJECT_TYPE_TASK": 2, } ) @@ -202,37 +205,39 @@ var file_proto_services_property_svc_v1_types_proto_rawDesc = []byte{ 0x05, 0x52, 0x03, 0x64, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x79, 0x65, 0x61, 0x72, - 0x2a, 0x45, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x2a, 0x5c, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, - 0x54, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x2a, 0xb2, 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, - 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x12, 0x17, 0x0a, - 0x13, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, - 0x4b, 0x42, 0x4f, 0x58, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x45, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x46, - 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, - 0x49, 0x4d, 0x45, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x4c, 0x45, 0x43, 0x54, 0x10, 0x06, 0x42, 0xe8, 0x01, 0x0a, - 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, - 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x1f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2d, 0x73, - 0x76, 0x63, 0xa2, 0x02, 0x03, 0x50, 0x53, 0x50, 0xaa, 0x02, 0x1d, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1d, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x29, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x53, 0x76, 0x63, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x54, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x55, 0x42, 0x4a, 0x45, + 0x43, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x10, 0x02, 0x2a, 0xb2, + 0x01, 0x0a, 0x09, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, + 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x49, 0x45, 0x4c, + 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, + 0x11, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x55, 0x4d, 0x42, + 0x45, 0x52, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x42, 0x4f, 0x58, 0x10, 0x03, 0x12, 0x13, 0x0a, + 0x0f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x45, + 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, + 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x4c, 0x45, 0x43, + 0x54, 0x10, 0x06, 0x42, 0xe8, 0x01, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x2d, 0x73, 0x76, 0x63, 0xa2, 0x02, 0x03, 0x50, 0x53, 0x50, 0xaa, + 0x02, 0x1d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x1d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x5c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x29, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x5c, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x20, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x53, 0x76, 0x63, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/gen/python/proto/services/property_svc/v1/property_value_svc_pb2.py b/gen/python/proto/services/property_svc/v1/property_value_svc_pb2.py index b32bb42bc..089726219 100644 --- a/gen/python/proto/services/property_svc/v1/property_value_svc_pb2.py +++ b/gen/python/proto/services/property_svc/v1/property_value_svc_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7proto/services/property_svc/v1/property_value_svc.proto\x12\x1eproto.services.property_svc.v1\x1a*proto/services/property_svc/v1/types.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x02\n\x1a\x41ttachPropertyValueRequest\x12\x1d\n\nsubject_id\x18\x01 \x01(\tR\tsubjectId\x12\x1f\n\x0bproperty_id\x18\x02 \x01(\tR\npropertyId\x12\x1f\n\ntext_value\x18\x03 \x01(\tH\x00R\ttextValue\x12#\n\x0cnumber_value\x18\x04 \x01(\x01H\x00R\x0bnumberValue\x12\x1f\n\nbool_value\x18\x05 \x01(\x08H\x00R\tboolValue\x12\x45\n\ndate_value\x18\x06 \x01(\x0b\x32$.proto.services.property_svc.v1.DateH\x00R\tdateValue\x12\x44\n\x0f\x64\x61te_time_value\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\rdateTimeValue\x12#\n\x0cselect_value\x18\x08 \x01(\tH\x00R\x0bselectValueB\x07\n\x05value\"I\n\x1b\x41ttachPropertyValueResponse\x12*\n\x11property_value_id\x18\x01 \x01(\tR\x0fpropertyValueId\"A\n GetAttachedPropertyValuesRequest\x12\x1d\n\nsubject_id\x18\x01 \x01(\tR\tsubjectId\"\x87\x05\n!GetAttachedPropertyValuesResponse\x12_\n\x06values\x18\x01 \x03(\x0b\x32G.proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.ValueR\x06values\x1a\x80\x04\n\x05Value\x12\x1f\n\x0bproperty_id\x18\x01 \x01(\tR\npropertyId\x12H\n\nfield_type\x18\x02 \x01(\x0e\x32).proto.services.property_svc.v1.FieldTypeR\tfieldType\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12%\n\x0b\x64\x65scription\x18\x04 \x01(\tH\x01R\x0b\x64\x65scription\x88\x01\x01\x12\x1f\n\x0bis_archived\x18\x05 \x01(\x08R\nisArchived\x12\x1f\n\ntext_value\x18\x06 \x01(\tH\x00R\ttextValue\x12#\n\x0cnumber_value\x18\x07 \x01(\x01H\x00R\x0bnumberValue\x12\x1f\n\nbool_value\x18\x08 \x01(\x08H\x00R\tboolValue\x12\x45\n\ndate_value\x18\t \x01(\x0b\x32$.proto.services.property_svc.v1.DateH\x00R\tdateValue\x12\x44\n\x0f\x64\x61te_time_value\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\rdateTimeValue\x12#\n\x0cselect_value\x18\x0b \x01(\tH\x00R\x0bselectValueB\x07\n\x05valueB\x0e\n\x0c_description2\xce\x02\n\x14PropertyValueService\x12\x90\x01\n\x13\x41ttachPropertyValue\x12:.proto.services.property_svc.v1.AttachPropertyValueRequest\x1a;.proto.services.property_svc.v1.AttachPropertyValueResponse\"\x00\x12\xa2\x01\n\x19GetAttachedPropertyValues\x12@.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest\x1a\x41.proto.services.property_svc.v1.GetAttachedPropertyValuesResponse\"\x00\x42\xf3\x01\n\"com.proto.services.property_svc.v1B\x15PropertyValueSvcProtoP\x01Z\x1fgen/proto/services/property-svc\xa2\x02\x03PSP\xaa\x02\x1dProto.Services.PropertySvc.V1\xca\x02\x1dProto\\Services\\PropertySvc\\V1\xe2\x02)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\xea\x02 Proto::Services::PropertySvc::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7proto/services/property_svc/v1/property_value_svc.proto\x12\x1eproto.services.property_svc.v1\x1a*proto/services/property_svc/v1/types.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x02\n\x1a\x41ttachPropertyValueRequest\x12\x1d\n\nsubject_id\x18\x01 \x01(\tR\tsubjectId\x12\x1f\n\x0bproperty_id\x18\x02 \x01(\tR\npropertyId\x12\x1f\n\ntext_value\x18\x03 \x01(\tH\x00R\ttextValue\x12#\n\x0cnumber_value\x18\x04 \x01(\x01H\x00R\x0bnumberValue\x12\x1f\n\nbool_value\x18\x05 \x01(\x08H\x00R\tboolValue\x12\x45\n\ndate_value\x18\x06 \x01(\x0b\x32$.proto.services.property_svc.v1.DateH\x00R\tdateValue\x12\x44\n\x0f\x64\x61te_time_value\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\rdateTimeValue\x12#\n\x0cselect_value\x18\x08 \x01(\tH\x00R\x0bselectValueB\x07\n\x05value\"I\n\x1b\x41ttachPropertyValueResponse\x12*\n\x11property_value_id\x18\x01 \x01(\tR\x0fpropertyValueId\"i\n\x13TaskPropertyMatcher\x12\x1c\n\x07ward_id\x18\x01 \x01(\tH\x00R\x06wardId\x88\x01\x01\x12\x1c\n\x07task_id\x18\x02 \x01(\tH\x01R\x06taskId\x88\x01\x01\x42\n\n\x08_ward_idB\n\n\x08_task_id\"\x87\x01\n GetAttachedPropertyValuesRequest\x12X\n\x0ctask_matcher\x18\x01 \x01(\x0b\x32\x33.proto.services.property_svc.v1.TaskPropertyMatcherH\x00R\x0btaskMatcherB\t\n\x07matcher\"\x87\x05\n!GetAttachedPropertyValuesResponse\x12_\n\x06values\x18\x01 \x03(\x0b\x32G.proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.ValueR\x06values\x1a\x80\x04\n\x05Value\x12\x1f\n\x0bproperty_id\x18\x01 \x01(\tR\npropertyId\x12H\n\nfield_type\x18\x02 \x01(\x0e\x32).proto.services.property_svc.v1.FieldTypeR\tfieldType\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12%\n\x0b\x64\x65scription\x18\x04 \x01(\tH\x01R\x0b\x64\x65scription\x88\x01\x01\x12\x1f\n\x0bis_archived\x18\x05 \x01(\x08R\nisArchived\x12\x1f\n\ntext_value\x18\x06 \x01(\tH\x00R\ttextValue\x12#\n\x0cnumber_value\x18\x07 \x01(\x01H\x00R\x0bnumberValue\x12\x1f\n\nbool_value\x18\x08 \x01(\x08H\x00R\tboolValue\x12\x45\n\ndate_value\x18\t \x01(\x0b\x32$.proto.services.property_svc.v1.DateH\x00R\tdateValue\x12\x44\n\x0f\x64\x61te_time_value\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\rdateTimeValue\x12#\n\x0cselect_value\x18\x0b \x01(\tH\x00R\x0bselectValueB\x07\n\x05valueB\x0e\n\x0c_description2\xce\x02\n\x14PropertyValueService\x12\x90\x01\n\x13\x41ttachPropertyValue\x12:.proto.services.property_svc.v1.AttachPropertyValueRequest\x1a;.proto.services.property_svc.v1.AttachPropertyValueResponse\"\x00\x12\xa2\x01\n\x19GetAttachedPropertyValues\x12@.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest\x1a\x41.proto.services.property_svc.v1.GetAttachedPropertyValuesResponse\"\x00\x42\xf3\x01\n\"com.proto.services.property_svc.v1B\x15PropertyValueSvcProtoP\x01Z\x1fgen/proto/services/property-svc\xa2\x02\x03PSP\xaa\x02\x1dProto.Services.PropertySvc.V1\xca\x02\x1dProto\\Services\\PropertySvc\\V1\xe2\x02)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\xea\x02 Proto::Services::PropertySvc::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -28,12 +28,14 @@ _globals['_ATTACHPROPERTYVALUEREQUEST']._serialized_end=551 _globals['_ATTACHPROPERTYVALUERESPONSE']._serialized_start=553 _globals['_ATTACHPROPERTYVALUERESPONSE']._serialized_end=626 - _globals['_GETATTACHEDPROPERTYVALUESREQUEST']._serialized_start=628 - _globals['_GETATTACHEDPROPERTYVALUESREQUEST']._serialized_end=693 - _globals['_GETATTACHEDPROPERTYVALUESRESPONSE']._serialized_start=696 - _globals['_GETATTACHEDPROPERTYVALUESRESPONSE']._serialized_end=1343 - _globals['_GETATTACHEDPROPERTYVALUESRESPONSE_VALUE']._serialized_start=831 - _globals['_GETATTACHEDPROPERTYVALUESRESPONSE_VALUE']._serialized_end=1343 - _globals['_PROPERTYVALUESERVICE']._serialized_start=1346 - _globals['_PROPERTYVALUESERVICE']._serialized_end=1680 + _globals['_TASKPROPERTYMATCHER']._serialized_start=628 + _globals['_TASKPROPERTYMATCHER']._serialized_end=733 + _globals['_GETATTACHEDPROPERTYVALUESREQUEST']._serialized_start=736 + _globals['_GETATTACHEDPROPERTYVALUESREQUEST']._serialized_end=871 + _globals['_GETATTACHEDPROPERTYVALUESRESPONSE']._serialized_start=874 + _globals['_GETATTACHEDPROPERTYVALUESRESPONSE']._serialized_end=1521 + _globals['_GETATTACHEDPROPERTYVALUESRESPONSE_VALUE']._serialized_start=1009 + _globals['_GETATTACHEDPROPERTYVALUESRESPONSE_VALUE']._serialized_end=1521 + _globals['_PROPERTYVALUESERVICE']._serialized_start=1524 + _globals['_PROPERTYVALUESERVICE']._serialized_end=1858 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/proto/services/property_svc/v1/property_views_svc_pb2.py b/gen/python/proto/services/property_svc/v1/property_views_svc_pb2.py index 396df4729..3d739accc 100644 --- a/gen/python/proto/services/property_svc/v1/property_views_svc_pb2.py +++ b/gen/python/proto/services/property_svc/v1/property_views_svc_pb2.py @@ -12,9 +12,10 @@ _sym_db = _symbol_database.Default() +from proto.services.property_svc.v1 import property_value_svc_pb2 as proto_dot_services_dot_property__svc_dot_v1_dot_property__value__svc__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7proto/services/property_svc/v1/property_views_svc.proto\x12\x1eproto.services.property_svc.v1\"\x8c\x02\n\x0c\x46ilterUpdate\x12\x37\n\x18\x61ppend_to_always_include\x18\x01 \x03(\tR\x15\x61ppendToAlwaysInclude\x12;\n\x1aremove_from_always_include\x18\x02 \x03(\tR\x17removeFromAlwaysInclude\x12@\n\x1d\x61ppend_to_dont_always_include\x18\x03 \x03(\tR\x19\x61ppendToDontAlwaysInclude\x12\x44\n\x1fremove_from_dont_always_include\x18\x04 \x03(\tR\x1bremoveFromDontAlwaysInclude\"\xca\x01\n!UpdateTaskPropertyViewRuleRequest\x12\x1c\n\x07ward_id\x18\x01 \x01(\tH\x00R\x06wardId\x88\x01\x01\x12\x1c\n\x07task_id\x18\x02 \x01(\tH\x01R\x06taskId\x88\x01\x01\x12Q\n\rfilter_update\x18\x03 \x01(\x0b\x32,.proto.services.property_svc.v1.FilterUpdateR\x0c\x66ilterUpdateB\n\n\x08_ward_idB\n\n\x08_task_id\"$\n\"UpdateTaskPropertyViewRuleResponse2\xbe\x01\n\x14PropertyViewsService\x12\xa5\x01\n\x1aUpdateTaskPropertyViewRule\x12\x41.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest\x1a\x42.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse\"\x00\x42\xf3\x01\n\"com.proto.services.property_svc.v1B\x15PropertyViewsSvcProtoP\x01Z\x1fgen/proto/services/property-svc\xa2\x02\x03PSP\xaa\x02\x1dProto.Services.PropertySvc.V1\xca\x02\x1dProto\\Services\\PropertySvc\\V1\xe2\x02)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\xea\x02 Proto::Services::PropertySvc::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7proto/services/property_svc/v1/property_views_svc.proto\x12\x1eproto.services.property_svc.v1\x1a\x37proto/services/property_svc/v1/property_value_svc.proto\"\x8c\x02\n\x0c\x46ilterUpdate\x12\x37\n\x18\x61ppend_to_always_include\x18\x01 \x03(\tR\x15\x61ppendToAlwaysInclude\x12;\n\x1aremove_from_always_include\x18\x02 \x03(\tR\x17removeFromAlwaysInclude\x12@\n\x1d\x61ppend_to_dont_always_include\x18\x03 \x03(\tR\x19\x61ppendToDontAlwaysInclude\x12\x44\n\x1fremove_from_dont_always_include\x18\x04 \x03(\tR\x1bremoveFromDontAlwaysInclude\"\xd7\x01\n\x1dUpdatePropertyViewRuleRequest\x12Q\n\rfilter_update\x18\x01 \x01(\x0b\x32,.proto.services.property_svc.v1.FilterUpdateR\x0c\x66ilterUpdate\x12X\n\x0ctask_matcher\x18\x02 \x01(\x0b\x32\x33.proto.services.property_svc.v1.TaskPropertyMatcherH\x00R\x0btaskMatcherB\t\n\x07matcher\" \n\x1eUpdatePropertyViewRuleResponse2\xb2\x01\n\x14PropertyViewsService\x12\x99\x01\n\x16UpdatePropertyViewRule\x12=.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest\x1a>.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse\"\x00\x42\xf3\x01\n\"com.proto.services.property_svc.v1B\x15PropertyViewsSvcProtoP\x01Z\x1fgen/proto/services/property-svc\xa2\x02\x03PSP\xaa\x02\x1dProto.Services.PropertySvc.V1\xca\x02\x1dProto\\Services\\PropertySvc\\V1\xe2\x02)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\xea\x02 Proto::Services::PropertySvc::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -22,12 +23,12 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\"com.proto.services.property_svc.v1B\025PropertyViewsSvcProtoP\001Z\037gen/proto/services/property-svc\242\002\003PSP\252\002\035Proto.Services.PropertySvc.V1\312\002\035Proto\\Services\\PropertySvc\\V1\342\002)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\352\002 Proto::Services::PropertySvc::V1' - _globals['_FILTERUPDATE']._serialized_start=92 - _globals['_FILTERUPDATE']._serialized_end=360 - _globals['_UPDATETASKPROPERTYVIEWRULEREQUEST']._serialized_start=363 - _globals['_UPDATETASKPROPERTYVIEWRULEREQUEST']._serialized_end=565 - _globals['_UPDATETASKPROPERTYVIEWRULERESPONSE']._serialized_start=567 - _globals['_UPDATETASKPROPERTYVIEWRULERESPONSE']._serialized_end=603 - _globals['_PROPERTYVIEWSSERVICE']._serialized_start=606 - _globals['_PROPERTYVIEWSSERVICE']._serialized_end=796 + _globals['_FILTERUPDATE']._serialized_start=149 + _globals['_FILTERUPDATE']._serialized_end=417 + _globals['_UPDATEPROPERTYVIEWRULEREQUEST']._serialized_start=420 + _globals['_UPDATEPROPERTYVIEWRULEREQUEST']._serialized_end=635 + _globals['_UPDATEPROPERTYVIEWRULERESPONSE']._serialized_start=637 + _globals['_UPDATEPROPERTYVIEWRULERESPONSE']._serialized_end=669 + _globals['_PROPERTYVIEWSSERVICE']._serialized_start=672 + _globals['_PROPERTYVIEWSSERVICE']._serialized_end=850 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/proto/services/property_svc/v1/property_views_svc_pb2_grpc.py b/gen/python/proto/services/property_svc/v1/property_views_svc_pb2_grpc.py index 2faa0e8bd..36bd44957 100644 --- a/gen/python/proto/services/property_svc/v1/property_views_svc_pb2_grpc.py +++ b/gen/python/proto/services/property_svc/v1/property_views_svc_pb2_grpc.py @@ -14,17 +14,17 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ - self.UpdateTaskPropertyViewRule = channel.unary_unary( - '/proto.services.property_svc.v1.PropertyViewsService/UpdateTaskPropertyViewRule', - request_serializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdateTaskPropertyViewRuleRequest.SerializeToString, - response_deserializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdateTaskPropertyViewRuleResponse.FromString, + self.UpdatePropertyViewRule = channel.unary_unary( + '/proto.services.property_svc.v1.PropertyViewsService/UpdatePropertyViewRule', + request_serializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdatePropertyViewRuleRequest.SerializeToString, + response_deserializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdatePropertyViewRuleResponse.FromString, ) class PropertyViewsServiceServicer(object): """Missing associated documentation comment in .proto file.""" - def UpdateTaskPropertyViewRule(self, request, context): + def UpdatePropertyViewRule(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -33,10 +33,10 @@ def UpdateTaskPropertyViewRule(self, request, context): def add_PropertyViewsServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'UpdateTaskPropertyViewRule': grpc.unary_unary_rpc_method_handler( - servicer.UpdateTaskPropertyViewRule, - request_deserializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdateTaskPropertyViewRuleRequest.FromString, - response_serializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdateTaskPropertyViewRuleResponse.SerializeToString, + 'UpdatePropertyViewRule': grpc.unary_unary_rpc_method_handler( + servicer.UpdatePropertyViewRule, + request_deserializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdatePropertyViewRuleRequest.FromString, + response_serializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdatePropertyViewRuleResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( @@ -49,7 +49,7 @@ class PropertyViewsService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def UpdateTaskPropertyViewRule(request, + def UpdatePropertyViewRule(request, target, options=(), channel_credentials=None, @@ -59,8 +59,8 @@ def UpdateTaskPropertyViewRule(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/proto.services.property_svc.v1.PropertyViewsService/UpdateTaskPropertyViewRule', - proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdateTaskPropertyViewRuleRequest.SerializeToString, - proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdateTaskPropertyViewRuleResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/proto.services.property_svc.v1.PropertyViewsService/UpdatePropertyViewRule', + proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdatePropertyViewRuleRequest.SerializeToString, + proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdatePropertyViewRuleResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/gen/python/proto/services/property_svc/v1/types_pb2.py b/gen/python/proto/services/property_svc/v1/types_pb2.py index 22dfd8e75..7467c1c08 100644 --- a/gen/python/proto/services/property_svc/v1/types_pb2.py +++ b/gen/python/proto/services/property_svc/v1/types_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*proto/services/property_svc/v1/types.proto\x12\x1eproto.services.property_svc.v1\"B\n\x04\x44\x61te\x12\x10\n\x03\x64\x61y\x18\x01 \x01(\x05R\x03\x64\x61y\x12\x14\n\x05month\x18\x02 \x01(\x05R\x05month\x12\x12\n\x04year\x18\x03 \x01(\x05R\x04year*E\n\x0bSubjectType\x12\x1c\n\x18SUBJECT_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14SUBJECT_TYPE_PATIENT\x10\x01*\xb2\x01\n\tFieldType\x12\x1a\n\x16\x46IELD_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x46IELD_TYPE_TEXT\x10\x01\x12\x15\n\x11\x46IELD_TYPE_NUMBER\x10\x02\x12\x17\n\x13\x46IELD_TYPE_CHECKBOX\x10\x03\x12\x13\n\x0f\x46IELD_TYPE_DATE\x10\x04\x12\x18\n\x14\x46IELD_TYPE_DATE_TIME\x10\x05\x12\x15\n\x11\x46IELD_TYPE_SELECT\x10\x06\x42\xe8\x01\n\"com.proto.services.property_svc.v1B\nTypesProtoP\x01Z\x1fgen/proto/services/property-svc\xa2\x02\x03PSP\xaa\x02\x1dProto.Services.PropertySvc.V1\xca\x02\x1dProto\\Services\\PropertySvc\\V1\xe2\x02)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\xea\x02 Proto::Services::PropertySvc::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*proto/services/property_svc/v1/types.proto\x12\x1eproto.services.property_svc.v1\"B\n\x04\x44\x61te\x12\x10\n\x03\x64\x61y\x18\x01 \x01(\x05R\x03\x64\x61y\x12\x14\n\x05month\x18\x02 \x01(\x05R\x05month\x12\x12\n\x04year\x18\x03 \x01(\x05R\x04year*\\\n\x0bSubjectType\x12\x1c\n\x18SUBJECT_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14SUBJECT_TYPE_PATIENT\x10\x01\x12\x15\n\x11SUBJECT_TYPE_TASK\x10\x02*\xb2\x01\n\tFieldType\x12\x1a\n\x16\x46IELD_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x46IELD_TYPE_TEXT\x10\x01\x12\x15\n\x11\x46IELD_TYPE_NUMBER\x10\x02\x12\x17\n\x13\x46IELD_TYPE_CHECKBOX\x10\x03\x12\x13\n\x0f\x46IELD_TYPE_DATE\x10\x04\x12\x18\n\x14\x46IELD_TYPE_DATE_TIME\x10\x05\x12\x15\n\x11\x46IELD_TYPE_SELECT\x10\x06\x42\xe8\x01\n\"com.proto.services.property_svc.v1B\nTypesProtoP\x01Z\x1fgen/proto/services/property-svc\xa2\x02\x03PSP\xaa\x02\x1dProto.Services.PropertySvc.V1\xca\x02\x1dProto\\Services\\PropertySvc\\V1\xe2\x02)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\xea\x02 Proto::Services::PropertySvc::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,9 +23,9 @@ _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\"com.proto.services.property_svc.v1B\nTypesProtoP\001Z\037gen/proto/services/property-svc\242\002\003PSP\252\002\035Proto.Services.PropertySvc.V1\312\002\035Proto\\Services\\PropertySvc\\V1\342\002)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\352\002 Proto::Services::PropertySvc::V1' _globals['_SUBJECTTYPE']._serialized_start=146 - _globals['_SUBJECTTYPE']._serialized_end=215 - _globals['_FIELDTYPE']._serialized_start=218 - _globals['_FIELDTYPE']._serialized_end=396 + _globals['_SUBJECTTYPE']._serialized_end=238 + _globals['_FIELDTYPE']._serialized_start=241 + _globals['_FIELDTYPE']._serialized_end=419 _globals['_DATE']._serialized_start=78 _globals['_DATE']._serialized_end=144 # @@protoc_insertion_point(module_scope) diff --git a/gen/ts/proto/services/property_svc/v1/property_value_svc_pb.d.ts b/gen/ts/proto/services/property_svc/v1/property_value_svc_pb.d.ts index 6b275a580..24887552e 100644 --- a/gen/ts/proto/services/property_svc/v1/property_value_svc_pb.d.ts +++ b/gen/ts/proto/services/property_svc/v1/property_value_svc_pb.d.ts @@ -84,9 +84,49 @@ export namespace AttachPropertyValueResponse { } } +export class TaskPropertyMatcher extends jspb.Message { + getWardId(): string; + setWardId(value: string): TaskPropertyMatcher; + hasWardId(): boolean; + clearWardId(): TaskPropertyMatcher; + + getTaskId(): string; + setTaskId(value: string): TaskPropertyMatcher; + hasTaskId(): boolean; + clearTaskId(): TaskPropertyMatcher; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskPropertyMatcher.AsObject; + static toObject(includeInstance: boolean, msg: TaskPropertyMatcher): TaskPropertyMatcher.AsObject; + static serializeBinaryToWriter(message: TaskPropertyMatcher, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskPropertyMatcher; + static deserializeBinaryFromReader(message: TaskPropertyMatcher, reader: jspb.BinaryReader): TaskPropertyMatcher; +} + +export namespace TaskPropertyMatcher { + export type AsObject = { + wardId?: string, + taskId?: string, + } + + export enum WardIdCase { + _WARD_ID_NOT_SET = 0, + WARD_ID = 1, + } + + export enum TaskIdCase { + _TASK_ID_NOT_SET = 0, + TASK_ID = 2, + } +} + export class GetAttachedPropertyValuesRequest extends jspb.Message { - getSubjectId(): string; - setSubjectId(value: string): GetAttachedPropertyValuesRequest; + getTaskMatcher(): TaskPropertyMatcher | undefined; + setTaskMatcher(value?: TaskPropertyMatcher): GetAttachedPropertyValuesRequest; + hasTaskMatcher(): boolean; + clearTaskMatcher(): GetAttachedPropertyValuesRequest; + + getMatcherCase(): GetAttachedPropertyValuesRequest.MatcherCase; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetAttachedPropertyValuesRequest.AsObject; @@ -98,7 +138,12 @@ export class GetAttachedPropertyValuesRequest extends jspb.Message { export namespace GetAttachedPropertyValuesRequest { export type AsObject = { - subjectId: string, + taskMatcher?: TaskPropertyMatcher.AsObject, + } + + export enum MatcherCase { + MATCHER_NOT_SET = 0, + TASK_MATCHER = 1, } } diff --git a/gen/ts/proto/services/property_svc/v1/property_value_svc_pb.js b/gen/ts/proto/services/property_svc/v1/property_value_svc_pb.js index d08cc1b28..d50a3d5d3 100644 --- a/gen/ts/proto/services/property_svc/v1/property_value_svc_pb.js +++ b/gen/ts/proto/services/property_svc/v1/property_value_svc_pb.js @@ -29,9 +29,11 @@ goog.exportSymbol('proto.proto.services.property_svc.v1.AttachPropertyValueReque goog.exportSymbol('proto.proto.services.property_svc.v1.AttachPropertyValueRequest.ValueCase', null, global); goog.exportSymbol('proto.proto.services.property_svc.v1.AttachPropertyValueResponse', null, global); goog.exportSymbol('proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest', null, global); +goog.exportSymbol('proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.MatcherCase', null, global); goog.exportSymbol('proto.proto.services.property_svc.v1.GetAttachedPropertyValuesResponse', null, global); goog.exportSymbol('proto.proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.Value', null, global); goog.exportSymbol('proto.proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.Value.ValueCase', null, global); +goog.exportSymbol('proto.proto.services.property_svc.v1.TaskPropertyMatcher', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -84,9 +86,30 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest = function(opt_data) { +proto.proto.services.property_svc.v1.TaskPropertyMatcher = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +goog.inherits(proto.proto.services.property_svc.v1.TaskPropertyMatcher, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.proto.services.property_svc.v1.TaskPropertyMatcher.displayName = 'proto.proto.services.property_svc.v1.TaskPropertyMatcher'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.oneofGroups_); +}; goog.inherits(proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** @@ -754,6 +777,227 @@ proto.proto.services.property_svc.v1.AttachPropertyValueResponse.prototype.setPr +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.prototype.toObject = function(opt_includeInstance) { + return proto.proto.services.property_svc.v1.TaskPropertyMatcher.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.proto.services.property_svc.v1.TaskPropertyMatcher} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.toObject = function(includeInstance, msg) { + var f, obj = { + wardId: jspb.Message.getFieldWithDefault(msg, 1, ""), + taskId: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.proto.services.property_svc.v1.TaskPropertyMatcher} + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.proto.services.property_svc.v1.TaskPropertyMatcher; + return proto.proto.services.property_svc.v1.TaskPropertyMatcher.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.proto.services.property_svc.v1.TaskPropertyMatcher} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.proto.services.property_svc.v1.TaskPropertyMatcher} + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWardId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTaskId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.proto.services.property_svc.v1.TaskPropertyMatcher.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.proto.services.property_svc.v1.TaskPropertyMatcher} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string ward_id = 1; + * @return {string} + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.prototype.getWardId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.proto.services.property_svc.v1.TaskPropertyMatcher} returns this + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.prototype.setWardId = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.proto.services.property_svc.v1.TaskPropertyMatcher} returns this + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.prototype.clearWardId = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.prototype.hasWardId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string task_id = 2; + * @return {string} + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.prototype.getTaskId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.proto.services.property_svc.v1.TaskPropertyMatcher} returns this + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.prototype.setTaskId = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.proto.services.property_svc.v1.TaskPropertyMatcher} returns this + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.prototype.clearTaskId = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.proto.services.property_svc.v1.TaskPropertyMatcher.prototype.hasTaskId = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.MatcherCase = { + MATCHER_NOT_SET: 0, + TASK_MATCHER: 1 +}; + +/** + * @return {proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.MatcherCase} + */ +proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.prototype.getMatcherCase = function() { + return /** @type {proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.MatcherCase} */(jspb.Message.computeOneofCase(this, proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.oneofGroups_[0])); +}; + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -783,7 +1027,7 @@ proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.prototype. */ proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.toObject = function(includeInstance, msg) { var f, obj = { - subjectId: jspb.Message.getFieldWithDefault(msg, 1, "") + taskMatcher: (f = msg.getTaskMatcher()) && proto.proto.services.property_svc.v1.TaskPropertyMatcher.toObject(includeInstance, f) }; if (includeInstance) { @@ -821,8 +1065,9 @@ proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.deserializ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSubjectId(value); + var value = new proto.proto.services.property_svc.v1.TaskPropertyMatcher; + reader.readMessage(value,proto.proto.services.property_svc.v1.TaskPropertyMatcher.deserializeBinaryFromReader); + msg.setTaskMatcher(value); break; default: reader.skipField(); @@ -853,31 +1098,51 @@ proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.prototype. */ proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSubjectId(); - if (f.length > 0) { - writer.writeString( + f = message.getTaskMatcher(); + if (f != null) { + writer.writeMessage( 1, - f + f, + proto.proto.services.property_svc.v1.TaskPropertyMatcher.serializeBinaryToWriter ); } }; /** - * optional string subject_id = 1; - * @return {string} + * optional TaskPropertyMatcher task_matcher = 1; + * @return {?proto.proto.services.property_svc.v1.TaskPropertyMatcher} */ -proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.prototype.getSubjectId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.prototype.getTaskMatcher = function() { + return /** @type{?proto.proto.services.property_svc.v1.TaskPropertyMatcher} */ ( + jspb.Message.getWrapperField(this, proto.proto.services.property_svc.v1.TaskPropertyMatcher, 1)); }; /** - * @param {string} value + * @param {?proto.proto.services.property_svc.v1.TaskPropertyMatcher|undefined} value + * @return {!proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest} returns this +*/ +proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.prototype.setTaskMatcher = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. * @return {!proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest} returns this */ -proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.prototype.setSubjectId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.prototype.clearTaskMatcher = function() { + return this.setTaskMatcher(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest.prototype.hasTaskMatcher = function() { + return jspb.Message.getField(this, 1) != null; }; diff --git a/gen/ts/proto/services/property_svc/v1/property_views_svc_grpc_web_pb.d.ts b/gen/ts/proto/services/property_svc/v1/property_views_svc_grpc_web_pb.d.ts index ceaf6a2d6..c15d7e5d7 100644 --- a/gen/ts/proto/services/property_svc/v1/property_views_svc_grpc_web_pb.d.ts +++ b/gen/ts/proto/services/property_svc/v1/property_views_svc_grpc_web_pb.d.ts @@ -8,12 +8,12 @@ export class PropertyViewsServiceClient { credentials?: null | { [index: string]: string; }, options?: null | { [index: string]: any; }); - updateTaskPropertyViewRule( - request: proto_services_property_svc_v1_property_views_svc_pb.UpdateTaskPropertyViewRuleRequest, + updatePropertyViewRule( + request: proto_services_property_svc_v1_property_views_svc_pb.UpdatePropertyViewRuleRequest, metadata: grpcWeb.Metadata | undefined, callback: (err: grpcWeb.RpcError, - response: proto_services_property_svc_v1_property_views_svc_pb.UpdateTaskPropertyViewRuleResponse) => void - ): grpcWeb.ClientReadableStream; + response: proto_services_property_svc_v1_property_views_svc_pb.UpdatePropertyViewRuleResponse) => void + ): grpcWeb.ClientReadableStream; } @@ -22,10 +22,10 @@ export class PropertyViewsServicePromiseClient { credentials?: null | { [index: string]: string; }, options?: null | { [index: string]: any; }); - updateTaskPropertyViewRule( - request: proto_services_property_svc_v1_property_views_svc_pb.UpdateTaskPropertyViewRuleRequest, + updatePropertyViewRule( + request: proto_services_property_svc_v1_property_views_svc_pb.UpdatePropertyViewRuleRequest, metadata?: grpcWeb.Metadata - ): Promise; + ): Promise; } diff --git a/gen/ts/proto/services/property_svc/v1/property_views_svc_grpc_web_pb.js b/gen/ts/proto/services/property_svc/v1/property_views_svc_grpc_web_pb.js index 970a2f4c9..3cba2402b 100644 --- a/gen/ts/proto/services/property_svc/v1/property_views_svc_grpc_web_pb.js +++ b/gen/ts/proto/services/property_svc/v1/property_views_svc_grpc_web_pb.js @@ -19,6 +19,8 @@ const grpc = {}; grpc.web = require('grpc-web'); + +var proto_services_property_svc_v1_property_value_svc_pb = require('../../../../proto/services/property_svc/v1/property_value_svc_pb.js') const proto = {}; proto.proto = {}; proto.proto.services = {}; @@ -80,61 +82,61 @@ proto.proto.services.property_svc.v1.PropertyViewsServicePromiseClient = /** * @const * @type {!grpc.web.MethodDescriptor< - * !proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest, - * !proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse>} + * !proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest, + * !proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse>} */ -const methodDescriptor_PropertyViewsService_UpdateTaskPropertyViewRule = new grpc.web.MethodDescriptor( - '/proto.services.property_svc.v1.PropertyViewsService/UpdateTaskPropertyViewRule', +const methodDescriptor_PropertyViewsService_UpdatePropertyViewRule = new grpc.web.MethodDescriptor( + '/proto.services.property_svc.v1.PropertyViewsService/UpdatePropertyViewRule', grpc.web.MethodType.UNARY, - proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest, - proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse, + proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest, + proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse, /** - * @param {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} request + * @param {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, - proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.deserializeBinary + proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse.deserializeBinary ); /** - * @param {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} request The + * @param {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest} request The * request proto * @param {?Object} metadata User defined * call metadata - * @param {function(?grpc.web.RpcError, ?proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse)} + * @param {function(?grpc.web.RpcError, ?proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse)} * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} + * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ -proto.proto.services.property_svc.v1.PropertyViewsServiceClient.prototype.updateTaskPropertyViewRule = +proto.proto.services.property_svc.v1.PropertyViewsServiceClient.prototype.updatePropertyViewRule = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + - '/proto.services.property_svc.v1.PropertyViewsService/UpdateTaskPropertyViewRule', + '/proto.services.property_svc.v1.PropertyViewsService/UpdatePropertyViewRule', request, metadata || {}, - methodDescriptor_PropertyViewsService_UpdateTaskPropertyViewRule, + methodDescriptor_PropertyViewsService_UpdatePropertyViewRule, callback); }; /** - * @param {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} request The + * @param {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata - * @return {!Promise} + * @return {!Promise} * Promise that resolves to the response */ -proto.proto.services.property_svc.v1.PropertyViewsServicePromiseClient.prototype.updateTaskPropertyViewRule = +proto.proto.services.property_svc.v1.PropertyViewsServicePromiseClient.prototype.updatePropertyViewRule = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + - '/proto.services.property_svc.v1.PropertyViewsService/UpdateTaskPropertyViewRule', + '/proto.services.property_svc.v1.PropertyViewsService/UpdatePropertyViewRule', request, metadata || {}, - methodDescriptor_PropertyViewsService_UpdateTaskPropertyViewRule); + methodDescriptor_PropertyViewsService_UpdatePropertyViewRule); }; diff --git a/gen/ts/proto/services/property_svc/v1/property_views_svc_pb.d.ts b/gen/ts/proto/services/property_svc/v1/property_views_svc_pb.d.ts index 55c745f5d..a253389db 100644 --- a/gen/ts/proto/services/property_svc/v1/property_views_svc_pb.d.ts +++ b/gen/ts/proto/services/property_svc/v1/property_views_svc_pb.d.ts @@ -1,5 +1,6 @@ import * as jspb from 'google-protobuf' +import * as proto_services_property_svc_v1_property_value_svc_pb from '../../../../proto/services/property_svc/v1/property_value_svc_pb'; // proto import: "proto/services/property_svc/v1/property_value_svc.proto" export class FilterUpdate extends jspb.Message { @@ -40,58 +41,49 @@ export namespace FilterUpdate { } } -export class UpdateTaskPropertyViewRuleRequest extends jspb.Message { - getWardId(): string; - setWardId(value: string): UpdateTaskPropertyViewRuleRequest; - hasWardId(): boolean; - clearWardId(): UpdateTaskPropertyViewRuleRequest; - - getTaskId(): string; - setTaskId(value: string): UpdateTaskPropertyViewRuleRequest; - hasTaskId(): boolean; - clearTaskId(): UpdateTaskPropertyViewRuleRequest; - +export class UpdatePropertyViewRuleRequest extends jspb.Message { getFilterUpdate(): FilterUpdate | undefined; - setFilterUpdate(value?: FilterUpdate): UpdateTaskPropertyViewRuleRequest; + setFilterUpdate(value?: FilterUpdate): UpdatePropertyViewRuleRequest; hasFilterUpdate(): boolean; - clearFilterUpdate(): UpdateTaskPropertyViewRuleRequest; + clearFilterUpdate(): UpdatePropertyViewRuleRequest; + + getTaskMatcher(): proto_services_property_svc_v1_property_value_svc_pb.TaskPropertyMatcher | undefined; + setTaskMatcher(value?: proto_services_property_svc_v1_property_value_svc_pb.TaskPropertyMatcher): UpdatePropertyViewRuleRequest; + hasTaskMatcher(): boolean; + clearTaskMatcher(): UpdatePropertyViewRuleRequest; + + getMatcherCase(): UpdatePropertyViewRuleRequest.MatcherCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateTaskPropertyViewRuleRequest.AsObject; - static toObject(includeInstance: boolean, msg: UpdateTaskPropertyViewRuleRequest): UpdateTaskPropertyViewRuleRequest.AsObject; - static serializeBinaryToWriter(message: UpdateTaskPropertyViewRuleRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateTaskPropertyViewRuleRequest; - static deserializeBinaryFromReader(message: UpdateTaskPropertyViewRuleRequest, reader: jspb.BinaryReader): UpdateTaskPropertyViewRuleRequest; + toObject(includeInstance?: boolean): UpdatePropertyViewRuleRequest.AsObject; + static toObject(includeInstance: boolean, msg: UpdatePropertyViewRuleRequest): UpdatePropertyViewRuleRequest.AsObject; + static serializeBinaryToWriter(message: UpdatePropertyViewRuleRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdatePropertyViewRuleRequest; + static deserializeBinaryFromReader(message: UpdatePropertyViewRuleRequest, reader: jspb.BinaryReader): UpdatePropertyViewRuleRequest; } -export namespace UpdateTaskPropertyViewRuleRequest { +export namespace UpdatePropertyViewRuleRequest { export type AsObject = { - wardId?: string, - taskId?: string, filterUpdate?: FilterUpdate.AsObject, + taskMatcher?: proto_services_property_svc_v1_property_value_svc_pb.TaskPropertyMatcher.AsObject, } - export enum WardIdCase { - _WARD_ID_NOT_SET = 0, - WARD_ID = 1, - } - - export enum TaskIdCase { - _TASK_ID_NOT_SET = 0, - TASK_ID = 2, + export enum MatcherCase { + MATCHER_NOT_SET = 0, + TASK_MATCHER = 2, } } -export class UpdateTaskPropertyViewRuleResponse extends jspb.Message { +export class UpdatePropertyViewRuleResponse extends jspb.Message { serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateTaskPropertyViewRuleResponse.AsObject; - static toObject(includeInstance: boolean, msg: UpdateTaskPropertyViewRuleResponse): UpdateTaskPropertyViewRuleResponse.AsObject; - static serializeBinaryToWriter(message: UpdateTaskPropertyViewRuleResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateTaskPropertyViewRuleResponse; - static deserializeBinaryFromReader(message: UpdateTaskPropertyViewRuleResponse, reader: jspb.BinaryReader): UpdateTaskPropertyViewRuleResponse; + toObject(includeInstance?: boolean): UpdatePropertyViewRuleResponse.AsObject; + static toObject(includeInstance: boolean, msg: UpdatePropertyViewRuleResponse): UpdatePropertyViewRuleResponse.AsObject; + static serializeBinaryToWriter(message: UpdatePropertyViewRuleResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdatePropertyViewRuleResponse; + static deserializeBinaryFromReader(message: UpdatePropertyViewRuleResponse, reader: jspb.BinaryReader): UpdatePropertyViewRuleResponse; } -export namespace UpdateTaskPropertyViewRuleResponse { +export namespace UpdatePropertyViewRuleResponse { export type AsObject = { } } diff --git a/gen/ts/proto/services/property_svc/v1/property_views_svc_pb.js b/gen/ts/proto/services/property_svc/v1/property_views_svc_pb.js index df95c32d3..cac4792cf 100644 --- a/gen/ts/proto/services/property_svc/v1/property_views_svc_pb.js +++ b/gen/ts/proto/services/property_svc/v1/property_views_svc_pb.js @@ -21,9 +21,12 @@ var global = (function () { return this; }).call(null) || Function('return this')(); +var proto_services_property_svc_v1_property_value_svc_pb = require('../../../../proto/services/property_svc/v1/property_value_svc_pb.js'); +goog.object.extend(proto, proto_services_property_svc_v1_property_value_svc_pb); goog.exportSymbol('proto.proto.services.property_svc.v1.FilterUpdate', null, global); -goog.exportSymbol('proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest', null, global); -goog.exportSymbol('proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse', null, global); +goog.exportSymbol('proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest', null, global); +goog.exportSymbol('proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.MatcherCase', null, global); +goog.exportSymbol('proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -55,16 +58,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.oneofGroups_); }; -goog.inherits(proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest, jspb.Message); +goog.inherits(proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.displayName = 'proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest'; + proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.displayName = 'proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest'; } /** * Generated by JsPbCodeGenerator. @@ -76,16 +79,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse = function(opt_data) { +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse, jspb.Message); +goog.inherits(proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.displayName = 'proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse'; + proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse.displayName = 'proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse'; } /** @@ -391,6 +394,31 @@ proto.proto.services.property_svc.v1.FilterUpdate.prototype.clearRemoveFromDontA +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.oneofGroups_ = [[2]]; + +/** + * @enum {number} + */ +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.MatcherCase = { + MATCHER_NOT_SET: 0, + TASK_MATCHER: 2 +}; + +/** + * @return {proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.MatcherCase} + */ +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.prototype.getMatcherCase = function() { + return /** @type {proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.MatcherCase} */(jspb.Message.computeOneofCase(this, proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -406,8 +434,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.toObject = function(opt_includeInstance) { - return proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.toObject(opt_includeInstance, this); +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.prototype.toObject = function(opt_includeInstance) { + return proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.toObject(opt_includeInstance, this); }; @@ -416,15 +444,14 @@ proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} msg The msg instance to transform. + * @param {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.toObject = function(includeInstance, msg) { +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.toObject = function(includeInstance, msg) { var f, obj = { - wardId: jspb.Message.getFieldWithDefault(msg, 1, ""), - taskId: jspb.Message.getFieldWithDefault(msg, 2, ""), - filterUpdate: (f = msg.getFilterUpdate()) && proto.proto.services.property_svc.v1.FilterUpdate.toObject(includeInstance, f) + filterUpdate: (f = msg.getFilterUpdate()) && proto.proto.services.property_svc.v1.FilterUpdate.toObject(includeInstance, f), + taskMatcher: (f = msg.getTaskMatcher()) && proto_services_property_svc_v1_property_value_svc_pb.TaskPropertyMatcher.toObject(includeInstance, f) }; if (includeInstance) { @@ -438,23 +465,23 @@ proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.toObject /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} + * @return {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest} */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.deserializeBinary = function(bytes) { +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest; - return proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest; + return proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} msg The message object to deserialize into. + * @param {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} + * @return {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest} */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -462,18 +489,15 @@ proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.deseriali var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setWardId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setTaskId(value); - break; - case 3: var value = new proto.proto.services.property_svc.v1.FilterUpdate; reader.readMessage(value,proto.proto.services.property_svc.v1.FilterUpdate.deserializeBinaryFromReader); msg.setFilterUpdate(value); break; + case 2: + var value = new proto_services_property_svc_v1_property_value_svc_pb.TaskPropertyMatcher; + reader.readMessage(value,proto_services_property_svc_v1_property_value_svc_pb.TaskPropertyMatcher.deserializeBinaryFromReader); + msg.setTaskMatcher(value); + break; default: reader.skipField(); break; @@ -487,9 +511,9 @@ proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.deseriali * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.serializeBinary = function() { +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.serializeBinaryToWriter(this, writer); + proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -497,61 +521,56 @@ proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} message + * @param {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.serializeBinaryToWriter = function(message, writer) { +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); + f = message.getFilterUpdate(); if (f != null) { - writer.writeString( + writer.writeMessage( 1, - f - ); - } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { - writer.writeString( - 2, - f + f, + proto.proto.services.property_svc.v1.FilterUpdate.serializeBinaryToWriter ); } - f = message.getFilterUpdate(); + f = message.getTaskMatcher(); if (f != null) { writer.writeMessage( - 3, + 2, f, - proto.proto.services.property_svc.v1.FilterUpdate.serializeBinaryToWriter + proto_services_property_svc_v1_property_value_svc_pb.TaskPropertyMatcher.serializeBinaryToWriter ); } }; /** - * optional string ward_id = 1; - * @return {string} + * optional FilterUpdate filter_update = 1; + * @return {?proto.proto.services.property_svc.v1.FilterUpdate} */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.getWardId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.prototype.getFilterUpdate = function() { + return /** @type{?proto.proto.services.property_svc.v1.FilterUpdate} */ ( + jspb.Message.getWrapperField(this, proto.proto.services.property_svc.v1.FilterUpdate, 1)); }; /** - * @param {string} value - * @return {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} returns this - */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.setWardId = function(value) { - return jspb.Message.setField(this, 1, value); + * @param {?proto.proto.services.property_svc.v1.FilterUpdate|undefined} value + * @return {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest} returns this +*/ +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.prototype.setFilterUpdate = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** - * Clears the field making it undefined. - * @return {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} returns this + * Clears the message field making it undefined. + * @return {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest} returns this */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.clearWardId = function() { - return jspb.Message.setField(this, 1, undefined); +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.prototype.clearFilterUpdate = function() { + return this.setFilterUpdate(undefined); }; @@ -559,72 +578,36 @@ proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype * Returns whether this field is set. * @return {boolean} */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.hasWardId = function() { +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.prototype.hasFilterUpdate = function() { return jspb.Message.getField(this, 1) != null; }; /** - * optional string task_id = 2; - * @return {string} - */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.getTaskId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} returns this - */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.setTaskId = function(value) { - return jspb.Message.setField(this, 2, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} returns this + * optional TaskPropertyMatcher task_matcher = 2; + * @return {?proto.proto.services.property_svc.v1.TaskPropertyMatcher} */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.clearTaskId = function() { - return jspb.Message.setField(this, 2, undefined); +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.prototype.getTaskMatcher = function() { + return /** @type{?proto.proto.services.property_svc.v1.TaskPropertyMatcher} */ ( + jspb.Message.getWrapperField(this, proto_services_property_svc_v1_property_value_svc_pb.TaskPropertyMatcher, 2)); }; /** - * Returns whether this field is set. - * @return {boolean} - */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.hasTaskId = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional FilterUpdate filter_update = 3; - * @return {?proto.proto.services.property_svc.v1.FilterUpdate} - */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.getFilterUpdate = function() { - return /** @type{?proto.proto.services.property_svc.v1.FilterUpdate} */ ( - jspb.Message.getWrapperField(this, proto.proto.services.property_svc.v1.FilterUpdate, 3)); -}; - - -/** - * @param {?proto.proto.services.property_svc.v1.FilterUpdate|undefined} value - * @return {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} returns this + * @param {?proto.proto.services.property_svc.v1.TaskPropertyMatcher|undefined} value + * @return {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest} returns this */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.setFilterUpdate = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.prototype.setTaskMatcher = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest} returns this + * @return {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest} returns this */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.clearFilterUpdate = function() { - return this.setFilterUpdate(undefined); +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.prototype.clearTaskMatcher = function() { + return this.setTaskMatcher(undefined); }; @@ -632,8 +615,8 @@ proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype * Returns whether this field is set. * @return {boolean} */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest.prototype.hasFilterUpdate = function() { - return jspb.Message.getField(this, 3) != null; +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest.prototype.hasTaskMatcher = function() { + return jspb.Message.getField(this, 2) != null; }; @@ -653,8 +636,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.prototype.toObject = function(opt_includeInstance) { - return proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.toObject(opt_includeInstance, this); +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse.prototype.toObject = function(opt_includeInstance) { + return proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse.toObject(opt_includeInstance, this); }; @@ -663,11 +646,11 @@ proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.prototyp * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse} msg The msg instance to transform. + * @param {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.toObject = function(includeInstance, msg) { +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -683,23 +666,23 @@ proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.toObject /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse} + * @return {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse} */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.deserializeBinary = function(bytes) { +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse; - return proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse; + return proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse} msg The message object to deserialize into. + * @param {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse} + * @return {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse} */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -719,9 +702,9 @@ proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.deserial * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.prototype.serializeBinary = function() { +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.serializeBinaryToWriter(this, writer); + proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -729,11 +712,11 @@ proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.prototyp /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse} message + * @param {!proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse.serializeBinaryToWriter = function(message, writer) { +proto.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; diff --git a/gen/ts/proto/services/property_svc/v1/types_pb.d.ts b/gen/ts/proto/services/property_svc/v1/types_pb.d.ts index 5eb5fbeb1..6ee25aea8 100644 --- a/gen/ts/proto/services/property_svc/v1/types_pb.d.ts +++ b/gen/ts/proto/services/property_svc/v1/types_pb.d.ts @@ -31,6 +31,7 @@ export namespace Date { export enum SubjectType { SUBJECT_TYPE_UNSPECIFIED = 0, SUBJECT_TYPE_PATIENT = 1, + SUBJECT_TYPE_TASK = 2, } export enum FieldType { FIELD_TYPE_UNSPECIFIED = 0, diff --git a/gen/ts/proto/services/property_svc/v1/types_pb.js b/gen/ts/proto/services/property_svc/v1/types_pb.js index 3aaaf5815..edbbfbcce 100644 --- a/gen/ts/proto/services/property_svc/v1/types_pb.js +++ b/gen/ts/proto/services/property_svc/v1/types_pb.js @@ -240,7 +240,8 @@ proto.proto.services.property_svc.v1.Date.prototype.setYear = function(value) { */ proto.proto.services.property_svc.v1.SubjectType = { SUBJECT_TYPE_UNSPECIFIED: 0, - SUBJECT_TYPE_PATIENT: 1 + SUBJECT_TYPE_PATIENT: 1, + SUBJECT_TYPE_TASK: 2 }; /** diff --git a/libs/hwutil/arrays.go b/libs/hwutil/arrays.go index 1f212eeb7..8fbdfbe49 100644 --- a/libs/hwutil/arrays.go +++ b/libs/hwutil/arrays.go @@ -91,6 +91,26 @@ func SliceToSet[T comparable](ts []T) map[T]bool { return unique } +func SetToSlice[T comparable](set map[T]bool) []T { + slice := make([]T, 0, len(set)) + for key, t := range set { + if t { + slice = append(slice, key) + } + } + return slice +} + +func MapValuesPtrToSlice[K comparable, V any](set map[K]*V) []V { + slice := make([]V, 0, len(set)) + for _, p := range set { + if p != nil { + slice = append(slice, *p) + } + } + return slice +} + // MergeSlicesWithSet merges two slices, only keeping unique elements once, not stable the resulting order may be arbitrary // unlike MergeSlices, also returns the set of unique values func MergeSlicesWithSet[T comparable](as, bs []T) ([]T, map[T]bool) { diff --git a/proto/services/property_svc/v1/property_value_svc.proto b/proto/services/property_svc/v1/property_value_svc.proto index bdfeee301..3d5c41b98 100644 --- a/proto/services/property_svc/v1/property_value_svc.proto +++ b/proto/services/property_svc/v1/property_value_svc.proto @@ -31,8 +31,16 @@ message AttachPropertyValueResponse { // // GetAttachedPropertyValue // + +message TaskPropertyMatcher { + optional string ward_id = 1; // @gotags: validate:"omitempty,omitnil,uuid4" + optional string task_id = 2; // @gotags: validate:"omitempty,omitnil,uuid4" +} + message GetAttachedPropertyValuesRequest { - string subject_id = 1; + oneof matcher { + TaskPropertyMatcher task_matcher = 1; + } } message GetAttachedPropertyValuesResponse { diff --git a/proto/services/property_svc/v1/property_views_svc.proto b/proto/services/property_svc/v1/property_views_svc.proto index 6d8020b02..8960a6f93 100644 --- a/proto/services/property_svc/v1/property_views_svc.proto +++ b/proto/services/property_svc/v1/property_views_svc.proto @@ -1,4 +1,5 @@ syntax = "proto3"; +import "proto/services/property_svc/v1/property_value_svc.proto"; package proto.services.property_svc.v1; @@ -21,16 +22,16 @@ message FilterUpdate { repeated string remove_from_dont_always_include = 4; // @gotags: validate:"dive,uuid4" } -message UpdateTaskPropertyViewRuleRequest { - /* task-specific matchers */ - optional string ward_id = 1; // @gotags: validate:"omitempty,omitnil,uuid4" - optional string task_id = 2; // @gotags: validate:"omitempty,omitnil,uuid4" +message UpdatePropertyViewRuleRequest { + FilterUpdate filter_update = 1; // @gotags: validate:"required" - FilterUpdate filter_update = 3; // @gotags: validate:"required" + oneof matcher { + TaskPropertyMatcher task_matcher = 2; + } } -message UpdateTaskPropertyViewRuleResponse {} +message UpdatePropertyViewRuleResponse {} service PropertyViewsService { - rpc UpdateTaskPropertyViewRule (UpdateTaskPropertyViewRuleRequest) returns (UpdateTaskPropertyViewRuleResponse) {} + rpc UpdatePropertyViewRule (UpdatePropertyViewRuleRequest) returns (UpdatePropertyViewRuleResponse) {} } diff --git a/proto/services/property_svc/v1/types.proto b/proto/services/property_svc/v1/types.proto index 62a7b2867..3865c8fb0 100644 --- a/proto/services/property_svc/v1/types.proto +++ b/proto/services/property_svc/v1/types.proto @@ -13,6 +13,7 @@ message Date { enum SubjectType { SUBJECT_TYPE_UNSPECIFIED = 0; SUBJECT_TYPE_PATIENT = 1; + SUBJECT_TYPE_TASK = 2; } enum FieldType { diff --git a/services/impulse_svc/gen/proto/services/property_svc/v1/property_value_svc_pb2.py b/services/impulse_svc/gen/proto/services/property_svc/v1/property_value_svc_pb2.py index b32bb42bc..089726219 100644 --- a/services/impulse_svc/gen/proto/services/property_svc/v1/property_value_svc_pb2.py +++ b/services/impulse_svc/gen/proto/services/property_svc/v1/property_value_svc_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7proto/services/property_svc/v1/property_value_svc.proto\x12\x1eproto.services.property_svc.v1\x1a*proto/services/property_svc/v1/types.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x02\n\x1a\x41ttachPropertyValueRequest\x12\x1d\n\nsubject_id\x18\x01 \x01(\tR\tsubjectId\x12\x1f\n\x0bproperty_id\x18\x02 \x01(\tR\npropertyId\x12\x1f\n\ntext_value\x18\x03 \x01(\tH\x00R\ttextValue\x12#\n\x0cnumber_value\x18\x04 \x01(\x01H\x00R\x0bnumberValue\x12\x1f\n\nbool_value\x18\x05 \x01(\x08H\x00R\tboolValue\x12\x45\n\ndate_value\x18\x06 \x01(\x0b\x32$.proto.services.property_svc.v1.DateH\x00R\tdateValue\x12\x44\n\x0f\x64\x61te_time_value\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\rdateTimeValue\x12#\n\x0cselect_value\x18\x08 \x01(\tH\x00R\x0bselectValueB\x07\n\x05value\"I\n\x1b\x41ttachPropertyValueResponse\x12*\n\x11property_value_id\x18\x01 \x01(\tR\x0fpropertyValueId\"A\n GetAttachedPropertyValuesRequest\x12\x1d\n\nsubject_id\x18\x01 \x01(\tR\tsubjectId\"\x87\x05\n!GetAttachedPropertyValuesResponse\x12_\n\x06values\x18\x01 \x03(\x0b\x32G.proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.ValueR\x06values\x1a\x80\x04\n\x05Value\x12\x1f\n\x0bproperty_id\x18\x01 \x01(\tR\npropertyId\x12H\n\nfield_type\x18\x02 \x01(\x0e\x32).proto.services.property_svc.v1.FieldTypeR\tfieldType\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12%\n\x0b\x64\x65scription\x18\x04 \x01(\tH\x01R\x0b\x64\x65scription\x88\x01\x01\x12\x1f\n\x0bis_archived\x18\x05 \x01(\x08R\nisArchived\x12\x1f\n\ntext_value\x18\x06 \x01(\tH\x00R\ttextValue\x12#\n\x0cnumber_value\x18\x07 \x01(\x01H\x00R\x0bnumberValue\x12\x1f\n\nbool_value\x18\x08 \x01(\x08H\x00R\tboolValue\x12\x45\n\ndate_value\x18\t \x01(\x0b\x32$.proto.services.property_svc.v1.DateH\x00R\tdateValue\x12\x44\n\x0f\x64\x61te_time_value\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\rdateTimeValue\x12#\n\x0cselect_value\x18\x0b \x01(\tH\x00R\x0bselectValueB\x07\n\x05valueB\x0e\n\x0c_description2\xce\x02\n\x14PropertyValueService\x12\x90\x01\n\x13\x41ttachPropertyValue\x12:.proto.services.property_svc.v1.AttachPropertyValueRequest\x1a;.proto.services.property_svc.v1.AttachPropertyValueResponse\"\x00\x12\xa2\x01\n\x19GetAttachedPropertyValues\x12@.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest\x1a\x41.proto.services.property_svc.v1.GetAttachedPropertyValuesResponse\"\x00\x42\xf3\x01\n\"com.proto.services.property_svc.v1B\x15PropertyValueSvcProtoP\x01Z\x1fgen/proto/services/property-svc\xa2\x02\x03PSP\xaa\x02\x1dProto.Services.PropertySvc.V1\xca\x02\x1dProto\\Services\\PropertySvc\\V1\xe2\x02)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\xea\x02 Proto::Services::PropertySvc::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7proto/services/property_svc/v1/property_value_svc.proto\x12\x1eproto.services.property_svc.v1\x1a*proto/services/property_svc/v1/types.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x02\n\x1a\x41ttachPropertyValueRequest\x12\x1d\n\nsubject_id\x18\x01 \x01(\tR\tsubjectId\x12\x1f\n\x0bproperty_id\x18\x02 \x01(\tR\npropertyId\x12\x1f\n\ntext_value\x18\x03 \x01(\tH\x00R\ttextValue\x12#\n\x0cnumber_value\x18\x04 \x01(\x01H\x00R\x0bnumberValue\x12\x1f\n\nbool_value\x18\x05 \x01(\x08H\x00R\tboolValue\x12\x45\n\ndate_value\x18\x06 \x01(\x0b\x32$.proto.services.property_svc.v1.DateH\x00R\tdateValue\x12\x44\n\x0f\x64\x61te_time_value\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\rdateTimeValue\x12#\n\x0cselect_value\x18\x08 \x01(\tH\x00R\x0bselectValueB\x07\n\x05value\"I\n\x1b\x41ttachPropertyValueResponse\x12*\n\x11property_value_id\x18\x01 \x01(\tR\x0fpropertyValueId\"i\n\x13TaskPropertyMatcher\x12\x1c\n\x07ward_id\x18\x01 \x01(\tH\x00R\x06wardId\x88\x01\x01\x12\x1c\n\x07task_id\x18\x02 \x01(\tH\x01R\x06taskId\x88\x01\x01\x42\n\n\x08_ward_idB\n\n\x08_task_id\"\x87\x01\n GetAttachedPropertyValuesRequest\x12X\n\x0ctask_matcher\x18\x01 \x01(\x0b\x32\x33.proto.services.property_svc.v1.TaskPropertyMatcherH\x00R\x0btaskMatcherB\t\n\x07matcher\"\x87\x05\n!GetAttachedPropertyValuesResponse\x12_\n\x06values\x18\x01 \x03(\x0b\x32G.proto.services.property_svc.v1.GetAttachedPropertyValuesResponse.ValueR\x06values\x1a\x80\x04\n\x05Value\x12\x1f\n\x0bproperty_id\x18\x01 \x01(\tR\npropertyId\x12H\n\nfield_type\x18\x02 \x01(\x0e\x32).proto.services.property_svc.v1.FieldTypeR\tfieldType\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12%\n\x0b\x64\x65scription\x18\x04 \x01(\tH\x01R\x0b\x64\x65scription\x88\x01\x01\x12\x1f\n\x0bis_archived\x18\x05 \x01(\x08R\nisArchived\x12\x1f\n\ntext_value\x18\x06 \x01(\tH\x00R\ttextValue\x12#\n\x0cnumber_value\x18\x07 \x01(\x01H\x00R\x0bnumberValue\x12\x1f\n\nbool_value\x18\x08 \x01(\x08H\x00R\tboolValue\x12\x45\n\ndate_value\x18\t \x01(\x0b\x32$.proto.services.property_svc.v1.DateH\x00R\tdateValue\x12\x44\n\x0f\x64\x61te_time_value\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\rdateTimeValue\x12#\n\x0cselect_value\x18\x0b \x01(\tH\x00R\x0bselectValueB\x07\n\x05valueB\x0e\n\x0c_description2\xce\x02\n\x14PropertyValueService\x12\x90\x01\n\x13\x41ttachPropertyValue\x12:.proto.services.property_svc.v1.AttachPropertyValueRequest\x1a;.proto.services.property_svc.v1.AttachPropertyValueResponse\"\x00\x12\xa2\x01\n\x19GetAttachedPropertyValues\x12@.proto.services.property_svc.v1.GetAttachedPropertyValuesRequest\x1a\x41.proto.services.property_svc.v1.GetAttachedPropertyValuesResponse\"\x00\x42\xf3\x01\n\"com.proto.services.property_svc.v1B\x15PropertyValueSvcProtoP\x01Z\x1fgen/proto/services/property-svc\xa2\x02\x03PSP\xaa\x02\x1dProto.Services.PropertySvc.V1\xca\x02\x1dProto\\Services\\PropertySvc\\V1\xe2\x02)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\xea\x02 Proto::Services::PropertySvc::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -28,12 +28,14 @@ _globals['_ATTACHPROPERTYVALUEREQUEST']._serialized_end=551 _globals['_ATTACHPROPERTYVALUERESPONSE']._serialized_start=553 _globals['_ATTACHPROPERTYVALUERESPONSE']._serialized_end=626 - _globals['_GETATTACHEDPROPERTYVALUESREQUEST']._serialized_start=628 - _globals['_GETATTACHEDPROPERTYVALUESREQUEST']._serialized_end=693 - _globals['_GETATTACHEDPROPERTYVALUESRESPONSE']._serialized_start=696 - _globals['_GETATTACHEDPROPERTYVALUESRESPONSE']._serialized_end=1343 - _globals['_GETATTACHEDPROPERTYVALUESRESPONSE_VALUE']._serialized_start=831 - _globals['_GETATTACHEDPROPERTYVALUESRESPONSE_VALUE']._serialized_end=1343 - _globals['_PROPERTYVALUESERVICE']._serialized_start=1346 - _globals['_PROPERTYVALUESERVICE']._serialized_end=1680 + _globals['_TASKPROPERTYMATCHER']._serialized_start=628 + _globals['_TASKPROPERTYMATCHER']._serialized_end=733 + _globals['_GETATTACHEDPROPERTYVALUESREQUEST']._serialized_start=736 + _globals['_GETATTACHEDPROPERTYVALUESREQUEST']._serialized_end=871 + _globals['_GETATTACHEDPROPERTYVALUESRESPONSE']._serialized_start=874 + _globals['_GETATTACHEDPROPERTYVALUESRESPONSE']._serialized_end=1521 + _globals['_GETATTACHEDPROPERTYVALUESRESPONSE_VALUE']._serialized_start=1009 + _globals['_GETATTACHEDPROPERTYVALUESRESPONSE_VALUE']._serialized_end=1521 + _globals['_PROPERTYVALUESERVICE']._serialized_start=1524 + _globals['_PROPERTYVALUESERVICE']._serialized_end=1858 # @@protoc_insertion_point(module_scope) diff --git a/services/impulse_svc/gen/proto/services/property_svc/v1/property_views_svc_pb2.py b/services/impulse_svc/gen/proto/services/property_svc/v1/property_views_svc_pb2.py index 396df4729..3d739accc 100644 --- a/services/impulse_svc/gen/proto/services/property_svc/v1/property_views_svc_pb2.py +++ b/services/impulse_svc/gen/proto/services/property_svc/v1/property_views_svc_pb2.py @@ -12,9 +12,10 @@ _sym_db = _symbol_database.Default() +from proto.services.property_svc.v1 import property_value_svc_pb2 as proto_dot_services_dot_property__svc_dot_v1_dot_property__value__svc__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7proto/services/property_svc/v1/property_views_svc.proto\x12\x1eproto.services.property_svc.v1\"\x8c\x02\n\x0c\x46ilterUpdate\x12\x37\n\x18\x61ppend_to_always_include\x18\x01 \x03(\tR\x15\x61ppendToAlwaysInclude\x12;\n\x1aremove_from_always_include\x18\x02 \x03(\tR\x17removeFromAlwaysInclude\x12@\n\x1d\x61ppend_to_dont_always_include\x18\x03 \x03(\tR\x19\x61ppendToDontAlwaysInclude\x12\x44\n\x1fremove_from_dont_always_include\x18\x04 \x03(\tR\x1bremoveFromDontAlwaysInclude\"\xca\x01\n!UpdateTaskPropertyViewRuleRequest\x12\x1c\n\x07ward_id\x18\x01 \x01(\tH\x00R\x06wardId\x88\x01\x01\x12\x1c\n\x07task_id\x18\x02 \x01(\tH\x01R\x06taskId\x88\x01\x01\x12Q\n\rfilter_update\x18\x03 \x01(\x0b\x32,.proto.services.property_svc.v1.FilterUpdateR\x0c\x66ilterUpdateB\n\n\x08_ward_idB\n\n\x08_task_id\"$\n\"UpdateTaskPropertyViewRuleResponse2\xbe\x01\n\x14PropertyViewsService\x12\xa5\x01\n\x1aUpdateTaskPropertyViewRule\x12\x41.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleRequest\x1a\x42.proto.services.property_svc.v1.UpdateTaskPropertyViewRuleResponse\"\x00\x42\xf3\x01\n\"com.proto.services.property_svc.v1B\x15PropertyViewsSvcProtoP\x01Z\x1fgen/proto/services/property-svc\xa2\x02\x03PSP\xaa\x02\x1dProto.Services.PropertySvc.V1\xca\x02\x1dProto\\Services\\PropertySvc\\V1\xe2\x02)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\xea\x02 Proto::Services::PropertySvc::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n7proto/services/property_svc/v1/property_views_svc.proto\x12\x1eproto.services.property_svc.v1\x1a\x37proto/services/property_svc/v1/property_value_svc.proto\"\x8c\x02\n\x0c\x46ilterUpdate\x12\x37\n\x18\x61ppend_to_always_include\x18\x01 \x03(\tR\x15\x61ppendToAlwaysInclude\x12;\n\x1aremove_from_always_include\x18\x02 \x03(\tR\x17removeFromAlwaysInclude\x12@\n\x1d\x61ppend_to_dont_always_include\x18\x03 \x03(\tR\x19\x61ppendToDontAlwaysInclude\x12\x44\n\x1fremove_from_dont_always_include\x18\x04 \x03(\tR\x1bremoveFromDontAlwaysInclude\"\xd7\x01\n\x1dUpdatePropertyViewRuleRequest\x12Q\n\rfilter_update\x18\x01 \x01(\x0b\x32,.proto.services.property_svc.v1.FilterUpdateR\x0c\x66ilterUpdate\x12X\n\x0ctask_matcher\x18\x02 \x01(\x0b\x32\x33.proto.services.property_svc.v1.TaskPropertyMatcherH\x00R\x0btaskMatcherB\t\n\x07matcher\" \n\x1eUpdatePropertyViewRuleResponse2\xb2\x01\n\x14PropertyViewsService\x12\x99\x01\n\x16UpdatePropertyViewRule\x12=.proto.services.property_svc.v1.UpdatePropertyViewRuleRequest\x1a>.proto.services.property_svc.v1.UpdatePropertyViewRuleResponse\"\x00\x42\xf3\x01\n\"com.proto.services.property_svc.v1B\x15PropertyViewsSvcProtoP\x01Z\x1fgen/proto/services/property-svc\xa2\x02\x03PSP\xaa\x02\x1dProto.Services.PropertySvc.V1\xca\x02\x1dProto\\Services\\PropertySvc\\V1\xe2\x02)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\xea\x02 Proto::Services::PropertySvc::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -22,12 +23,12 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\"com.proto.services.property_svc.v1B\025PropertyViewsSvcProtoP\001Z\037gen/proto/services/property-svc\242\002\003PSP\252\002\035Proto.Services.PropertySvc.V1\312\002\035Proto\\Services\\PropertySvc\\V1\342\002)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\352\002 Proto::Services::PropertySvc::V1' - _globals['_FILTERUPDATE']._serialized_start=92 - _globals['_FILTERUPDATE']._serialized_end=360 - _globals['_UPDATETASKPROPERTYVIEWRULEREQUEST']._serialized_start=363 - _globals['_UPDATETASKPROPERTYVIEWRULEREQUEST']._serialized_end=565 - _globals['_UPDATETASKPROPERTYVIEWRULERESPONSE']._serialized_start=567 - _globals['_UPDATETASKPROPERTYVIEWRULERESPONSE']._serialized_end=603 - _globals['_PROPERTYVIEWSSERVICE']._serialized_start=606 - _globals['_PROPERTYVIEWSSERVICE']._serialized_end=796 + _globals['_FILTERUPDATE']._serialized_start=149 + _globals['_FILTERUPDATE']._serialized_end=417 + _globals['_UPDATEPROPERTYVIEWRULEREQUEST']._serialized_start=420 + _globals['_UPDATEPROPERTYVIEWRULEREQUEST']._serialized_end=635 + _globals['_UPDATEPROPERTYVIEWRULERESPONSE']._serialized_start=637 + _globals['_UPDATEPROPERTYVIEWRULERESPONSE']._serialized_end=669 + _globals['_PROPERTYVIEWSSERVICE']._serialized_start=672 + _globals['_PROPERTYVIEWSSERVICE']._serialized_end=850 # @@protoc_insertion_point(module_scope) diff --git a/services/impulse_svc/gen/proto/services/property_svc/v1/property_views_svc_pb2_grpc.py b/services/impulse_svc/gen/proto/services/property_svc/v1/property_views_svc_pb2_grpc.py index 2faa0e8bd..36bd44957 100644 --- a/services/impulse_svc/gen/proto/services/property_svc/v1/property_views_svc_pb2_grpc.py +++ b/services/impulse_svc/gen/proto/services/property_svc/v1/property_views_svc_pb2_grpc.py @@ -14,17 +14,17 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ - self.UpdateTaskPropertyViewRule = channel.unary_unary( - '/proto.services.property_svc.v1.PropertyViewsService/UpdateTaskPropertyViewRule', - request_serializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdateTaskPropertyViewRuleRequest.SerializeToString, - response_deserializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdateTaskPropertyViewRuleResponse.FromString, + self.UpdatePropertyViewRule = channel.unary_unary( + '/proto.services.property_svc.v1.PropertyViewsService/UpdatePropertyViewRule', + request_serializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdatePropertyViewRuleRequest.SerializeToString, + response_deserializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdatePropertyViewRuleResponse.FromString, ) class PropertyViewsServiceServicer(object): """Missing associated documentation comment in .proto file.""" - def UpdateTaskPropertyViewRule(self, request, context): + def UpdatePropertyViewRule(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -33,10 +33,10 @@ def UpdateTaskPropertyViewRule(self, request, context): def add_PropertyViewsServiceServicer_to_server(servicer, server): rpc_method_handlers = { - 'UpdateTaskPropertyViewRule': grpc.unary_unary_rpc_method_handler( - servicer.UpdateTaskPropertyViewRule, - request_deserializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdateTaskPropertyViewRuleRequest.FromString, - response_serializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdateTaskPropertyViewRuleResponse.SerializeToString, + 'UpdatePropertyViewRule': grpc.unary_unary_rpc_method_handler( + servicer.UpdatePropertyViewRule, + request_deserializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdatePropertyViewRuleRequest.FromString, + response_serializer=proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdatePropertyViewRuleResponse.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( @@ -49,7 +49,7 @@ class PropertyViewsService(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def UpdateTaskPropertyViewRule(request, + def UpdatePropertyViewRule(request, target, options=(), channel_credentials=None, @@ -59,8 +59,8 @@ def UpdateTaskPropertyViewRule(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/proto.services.property_svc.v1.PropertyViewsService/UpdateTaskPropertyViewRule', - proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdateTaskPropertyViewRuleRequest.SerializeToString, - proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdateTaskPropertyViewRuleResponse.FromString, + return grpc.experimental.unary_unary(request, target, '/proto.services.property_svc.v1.PropertyViewsService/UpdatePropertyViewRule', + proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdatePropertyViewRuleRequest.SerializeToString, + proto_dot_services_dot_property__svc_dot_v1_dot_property__views__svc__pb2.UpdatePropertyViewRuleResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/services/impulse_svc/gen/proto/services/property_svc/v1/types_pb2.py b/services/impulse_svc/gen/proto/services/property_svc/v1/types_pb2.py index 22dfd8e75..7467c1c08 100644 --- a/services/impulse_svc/gen/proto/services/property_svc/v1/types_pb2.py +++ b/services/impulse_svc/gen/proto/services/property_svc/v1/types_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*proto/services/property_svc/v1/types.proto\x12\x1eproto.services.property_svc.v1\"B\n\x04\x44\x61te\x12\x10\n\x03\x64\x61y\x18\x01 \x01(\x05R\x03\x64\x61y\x12\x14\n\x05month\x18\x02 \x01(\x05R\x05month\x12\x12\n\x04year\x18\x03 \x01(\x05R\x04year*E\n\x0bSubjectType\x12\x1c\n\x18SUBJECT_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14SUBJECT_TYPE_PATIENT\x10\x01*\xb2\x01\n\tFieldType\x12\x1a\n\x16\x46IELD_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x46IELD_TYPE_TEXT\x10\x01\x12\x15\n\x11\x46IELD_TYPE_NUMBER\x10\x02\x12\x17\n\x13\x46IELD_TYPE_CHECKBOX\x10\x03\x12\x13\n\x0f\x46IELD_TYPE_DATE\x10\x04\x12\x18\n\x14\x46IELD_TYPE_DATE_TIME\x10\x05\x12\x15\n\x11\x46IELD_TYPE_SELECT\x10\x06\x42\xe8\x01\n\"com.proto.services.property_svc.v1B\nTypesProtoP\x01Z\x1fgen/proto/services/property-svc\xa2\x02\x03PSP\xaa\x02\x1dProto.Services.PropertySvc.V1\xca\x02\x1dProto\\Services\\PropertySvc\\V1\xe2\x02)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\xea\x02 Proto::Services::PropertySvc::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n*proto/services/property_svc/v1/types.proto\x12\x1eproto.services.property_svc.v1\"B\n\x04\x44\x61te\x12\x10\n\x03\x64\x61y\x18\x01 \x01(\x05R\x03\x64\x61y\x12\x14\n\x05month\x18\x02 \x01(\x05R\x05month\x12\x12\n\x04year\x18\x03 \x01(\x05R\x04year*\\\n\x0bSubjectType\x12\x1c\n\x18SUBJECT_TYPE_UNSPECIFIED\x10\x00\x12\x18\n\x14SUBJECT_TYPE_PATIENT\x10\x01\x12\x15\n\x11SUBJECT_TYPE_TASK\x10\x02*\xb2\x01\n\tFieldType\x12\x1a\n\x16\x46IELD_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x46IELD_TYPE_TEXT\x10\x01\x12\x15\n\x11\x46IELD_TYPE_NUMBER\x10\x02\x12\x17\n\x13\x46IELD_TYPE_CHECKBOX\x10\x03\x12\x13\n\x0f\x46IELD_TYPE_DATE\x10\x04\x12\x18\n\x14\x46IELD_TYPE_DATE_TIME\x10\x05\x12\x15\n\x11\x46IELD_TYPE_SELECT\x10\x06\x42\xe8\x01\n\"com.proto.services.property_svc.v1B\nTypesProtoP\x01Z\x1fgen/proto/services/property-svc\xa2\x02\x03PSP\xaa\x02\x1dProto.Services.PropertySvc.V1\xca\x02\x1dProto\\Services\\PropertySvc\\V1\xe2\x02)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\xea\x02 Proto::Services::PropertySvc::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,9 +23,9 @@ _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\"com.proto.services.property_svc.v1B\nTypesProtoP\001Z\037gen/proto/services/property-svc\242\002\003PSP\252\002\035Proto.Services.PropertySvc.V1\312\002\035Proto\\Services\\PropertySvc\\V1\342\002)Proto\\Services\\PropertySvc\\V1\\GPBMetadata\352\002 Proto::Services::PropertySvc::V1' _globals['_SUBJECTTYPE']._serialized_start=146 - _globals['_SUBJECTTYPE']._serialized_end=215 - _globals['_FIELDTYPE']._serialized_start=218 - _globals['_FIELDTYPE']._serialized_end=396 + _globals['_SUBJECTTYPE']._serialized_end=238 + _globals['_FIELDTYPE']._serialized_start=241 + _globals['_FIELDTYPE']._serialized_end=419 _globals['_DATE']._serialized_start=78 _globals['_DATE']._serialized_end=144 # @@protoc_insertion_point(module_scope) diff --git a/services/property-svc/go.mod b/services/property-svc/go.mod index 52abf6d32..2bbfef72b 100644 --- a/services/property-svc/go.mod +++ b/services/property-svc/go.mod @@ -21,6 +21,7 @@ require ( github.com/google/uuid v1.6.0 github.com/jackc/pgx/v5 v5.5.5 github.com/pashagolub/pgxmock/v3 v3.4.0 + github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.32.0 github.com/stretchr/testify v1.9.0 google.golang.org/grpc v1.63.2 diff --git a/services/property-svc/internal/property-value/api/grpc.go b/services/property-svc/internal/property-value/api/grpc.go index b4e70533b..a4ddd2189 100644 --- a/services/property-svc/internal/property-value/api/grpc.go +++ b/services/property-svc/internal/property-value/api/grpc.go @@ -3,17 +3,48 @@ package api import ( "context" pb "gen/proto/services/property_svc/v1" - "github.com/google/uuid" - "google.golang.org/protobuf/types/known/timestamppb" "hwdb" "hwes" "hwutil" commandsV1 "property-svc/internal/property-value/commands/v1" "property-svc/internal/property-value/models" v1queries "property-svc/internal/property-value/queries/v1" + viewModels "property-svc/internal/property-view/models" "property-svc/repos/property_value_repo" + + "github.com/google/uuid" + zlog "github.com/rs/zerolog/log" + "google.golang.org/protobuf/types/known/timestamppb" ) +type MatchersRequest interface { + GetTaskMatcher() *pb.TaskPropertyMatcher +} + +// DeMuxMatchers de-multiplexes the matchers in a grpc request +// - the request must implement the MatchersRequest interface (see GetAttachedPropertyValuesRequest) +// - parsing might fail (i.e., invalid uuids) +// - a request may also carry no matchers at all, in that case (nil, nil) is returned +func DeMuxMatchers(req MatchersRequest) (viewModels.PropertyMatchers, error) { + var matcher viewModels.PropertyMatchers = nil + if taskMatcher := req.GetTaskMatcher(); taskMatcher != nil { + wardID, err := hwutil.ParseNullUUID(taskMatcher.WardId) + if err != nil { + return nil, err + } + taskID, err := hwutil.ParseNullUUID(taskMatcher.TaskId) + if err != nil { + return nil, err + } + + matcher = viewModels.TaskPropertyMatchers{ + WardID: wardID, + TaskID: taskID, + } + } + return matcher, nil +} + type PropertyValueGrpcService struct { pb.UnimplementedPropertyValueServiceServer as hwes.AggregateStore @@ -64,46 +95,60 @@ func (s *PropertyValueGrpcService) AttachPropertyValue(ctx context.Context, req } func (s *PropertyValueGrpcService) GetAttachedPropertyValues(ctx context.Context, req *pb.GetAttachedPropertyValuesRequest) (*pb.GetAttachedPropertyValuesResponse, error) { + log := zlog.Ctx(ctx) db := hwdb.GetDB() propertyValueRepo := property_value_repo.New(db) - subjectID, err := uuid.Parse(req.GetSubjectId()) + // de-mux matchers + matcher, err := DeMuxMatchers(req) if err != nil { return nil, err } - propertyValues, err := v1queries.NewGetPropertyValuesWithPropertiesBySubjectIDQueryHandler(propertyValueRepo)(ctx, subjectID) - if err != nil { - return nil, err + propertiesWithValues := make([]models.PropertyAndValue, 0) + + if matcher != nil { + propertiesWithValues, err = v1queries.NewGetRelevantPropertyValuesQueryHandler(propertyValueRepo)(ctx, matcher) + if err != nil { + return nil, err + } + } else { + log.Warn().Msg("Request is missing a matcher, can not determine relevant properties") } return &pb.GetAttachedPropertyValuesResponse{ - Values: hwutil.Map(propertyValues, func(pv models.PropertyValueWithProperty) *pb.GetAttachedPropertyValuesResponse_Value { + Values: hwutil.Map(propertiesWithValues, func(pv models.PropertyAndValue) *pb.GetAttachedPropertyValuesResponse_Value { res := &pb.GetAttachedPropertyValuesResponse_Value{ - PropertyId: pv.PropertyID.String(), - Name: pv.Name, - IsArchived: pv.IsArchived, - FieldType: pv.FieldType, + PropertyId: pv.PropertyID.String(), + FieldType: pv.FieldType, + Name: pv.Name, + Description: hwutil.MapIf(pv.Description != "", pv.Description, func(s string) string { return s }), + IsArchived: pv.IsArchived, + Value: nil, } switch { - case pv.TextValue != nil: - res.Value = &pb.GetAttachedPropertyValuesResponse_Value_TextValue{TextValue: *pv.TextValue} - case pv.BoolValue != nil: - res.Value = &pb.GetAttachedPropertyValuesResponse_Value_BoolValue{BoolValue: *pv.BoolValue} - case pv.NumberValue != nil: - res.Value = &pb.GetAttachedPropertyValuesResponse_Value_NumberValue{NumberValue: *pv.NumberValue} - case pv.SelectValue.Valid: - res.Value = &pb.GetAttachedPropertyValuesResponse_Value_SelectValue{SelectValue: pv.SelectValue.UUID.String()} - case pv.DateTimeValue != nil: - res.Value = &pb.GetAttachedPropertyValuesResponse_Value_DateTimeValue{DateTimeValue: timestamppb.New(*pv.DateTimeValue)} - case pv.DateValue != nil: + case pv.Value == nil: + return res + case pv.Value.TextValue != nil: + res.Value = &pb.GetAttachedPropertyValuesResponse_Value_TextValue{TextValue: *pv.Value.TextValue} + case pv.Value.BoolValue != nil: + res.Value = &pb.GetAttachedPropertyValuesResponse_Value_BoolValue{BoolValue: *pv.Value.BoolValue} + case pv.Value.NumberValue != nil: + res.Value = &pb.GetAttachedPropertyValuesResponse_Value_NumberValue{NumberValue: *pv.Value.NumberValue} + case pv.Value.SelectValue.Valid: + res.Value = &pb.GetAttachedPropertyValuesResponse_Value_SelectValue{SelectValue: pv.Value.SelectValue.UUID.String()} + case pv.Value.DateTimeValue != nil: + res.Value = &pb.GetAttachedPropertyValuesResponse_Value_DateTimeValue{DateTimeValue: timestamppb.New(*pv.Value.DateTimeValue)} + case pv.Value.DateValue != nil: res.Value = &pb.GetAttachedPropertyValuesResponse_Value_DateValue{ DateValue: &pb.Date{ - Day: int32(pv.DateValue.Day()), - Month: int32(pv.DateValue.Month()), - Year: int32(pv.DateValue.Year()), + Day: int32(pv.Value.DateValue.Day()), + Month: int32(pv.Value.DateValue.Month()), + Year: int32(pv.Value.DateValue.Year()), }, } + default: + log.Error().Any("pv", pv).Msg("pv.Value is in an invalid state!") } return res }), diff --git a/services/property-svc/internal/property-value/models/propertyValue.go b/services/property-svc/internal/property-value/models/propertyValue.go index 3ddc9bf0a..554c694c0 100644 --- a/services/property-svc/internal/property-value/models/propertyValue.go +++ b/services/property-svc/internal/property-value/models/propertyValue.go @@ -30,3 +30,26 @@ type PropertyValueWithProperty struct { DateTimeValue *time.Time DateValue *time.Time } + +type TypedValue struct { + TextValue *string + BoolValue *bool + NumberValue *float64 + SelectValue uuid.NullUUID + DateTimeValue *time.Time + DateValue *time.Time +} + +type PropertyAndValue struct { + PropertyID uuid.UUID + SubjectType pb.SubjectType + FieldType pb.FieldType + + Name string + Description string + IsArchived bool + + SetID uuid.NullUUID + + Value *TypedValue +} diff --git a/services/property-svc/internal/property-value/queries/v1/get_property_values_by_subject_id.go b/services/property-svc/internal/property-value/queries/v1/get_property_values_by_subject_id.go index 4ee9f478a..dafbf5f10 100644 --- a/services/property-svc/internal/property-value/queries/v1/get_property_values_by_subject_id.go +++ b/services/property-svc/internal/property-value/queries/v1/get_property_values_by_subject_id.go @@ -2,49 +2,75 @@ package v1 import ( "context" + "fmt" pb "gen/proto/services/property_svc/v1" - "github.com/google/uuid" "hwdb" "hwutil" "property-svc/internal/property-value/models" + viewModels "property-svc/internal/property-view/models" + viewQueries "property-svc/internal/property-view/queries/v1" "property-svc/repos/property_value_repo" + "time" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" ) -type GetPropertyValuesWithPropertiesBySubjectIQueryHandler func(ctx context.Context, subjectID uuid.UUID) ([]models.PropertyValueWithProperty, error) +type GetRelevantPropertyValuesQueryHandler func(ctx context.Context, matcher viewModels.PropertyMatchers) ([]models.PropertyAndValue, error) -func NewGetPropertyValuesWithPropertiesBySubjectIDQueryHandler(propertyValueRepo *property_value_repo.Queries) GetPropertyValuesWithPropertiesBySubjectIQueryHandler { - return func(ctx context.Context, subjectID uuid.UUID) ([]models.PropertyValueWithProperty, error) { +func NewGetRelevantPropertyValuesQueryHandler(propertyValueRepo *property_value_repo.Queries) GetRelevantPropertyValuesQueryHandler { + return func(ctx context.Context, matcher viewModels.PropertyMatchers) ([]models.PropertyAndValue, error) { + subjectId, err := matcher.GetSubjectId() + if err != nil { + return nil, fmt.Errorf("GetRelevantPropertyValuesQueryHandler: matcher error when getting subjectId: %w", err) + } + + alwaysInclude, err := viewQueries.GetAlwaysIncludePropertiesByMatcher(ctx, matcher) + if err != nil { + return nil, err + } - propertyValuesWithProperties, err := propertyValueRepo.GetPropertyValuesWithPropertyBySubjectID(ctx, subjectID) + propertyValuesWithProperties, err := propertyValueRepo.GetRelevantPropertyViews(ctx, property_value_repo.GetRelevantPropertyViewsParams{ + SubjectID: subjectId, + AlwaysInclude: alwaysInclude, + }) if err := hwdb.Error(ctx, err); err != nil { return nil, err } - if propertyValuesWithProperties != nil { - return hwutil.Map(propertyValuesWithProperties, func(row property_value_repo.GetPropertyValuesWithPropertyBySubjectIDRow) models.PropertyValueWithProperty { - fieldType := (pb.FieldType)(*row.FieldType) // safe, because it's NOT NULL - res := models.PropertyValueWithProperty{ - ID: row.PropertyValueID, - PropertyID: row.PropertyID.UUID, - Name: *row.PropertyName, // NOT NULL - IsArchived: *row.PropertyIsArchived, // NOT NULL - FieldType: fieldType, - // TODO: isSoftRequired - TextValue: row.TextValue, - BoolValue: row.BoolValue, - NumberValue: row.NumberValue, - SelectValue: row.SelectValue, - } - if row.DateTimeValue.Valid { - res.DateTimeValue = &row.DateTimeValue.Time - } - if row.DateValue.Valid { - res.DateValue = &row.DateValue.Time + properties := make(map[uuid.UUID]*models.PropertyAndValue) + + for _, row := range propertyValuesWithProperties { + + if _, ok := properties[row.Property.ID]; !ok { + properties[row.Property.ID] = &models.PropertyAndValue{ + PropertyID: row.Property.ID, + SubjectType: pb.SubjectType(row.Property.SubjectType), + FieldType: pb.FieldType(row.Property.FieldType), + Name: row.Property.Name, + Description: row.Property.Description, + IsArchived: row.Property.IsArchived, + SetID: row.Property.SetID, + Value: nil, } - return res - }), nil - } + } - return []models.PropertyValueWithProperty{}, nil + if row.TextValue == nil && row.BoolValue == nil && row.NumberValue == nil && !row.SelectValue.Valid && !row.DateTimeValue.Valid && !row.DateValue.Valid { + continue + } + properties[row.Property.ID].Value = &models.TypedValue{ + TextValue: row.TextValue, + BoolValue: row.BoolValue, + NumberValue: row.NumberValue, + SelectValue: row.SelectValue, + DateTimeValue: hwutil.MapIf(row.DateTimeValue.Valid, row.DateTimeValue, func(dtV pgtype.Timestamp) time.Time { + return dtV.Time + }), + DateValue: hwutil.MapIf(row.DateValue.Valid, row.DateValue, func(dV pgtype.Date) time.Time { + return dV.Time + }), + } + } + return hwutil.MapValuesPtrToSlice(properties), nil } } diff --git a/services/property-svc/internal/property-view/api/grpc.go b/services/property-svc/internal/property-view/api/grpc.go index 86b030bd0..066ee9dad 100644 --- a/services/property-svc/internal/property-view/api/grpc.go +++ b/services/property-svc/internal/property-view/api/grpc.go @@ -2,11 +2,13 @@ package api import ( "context" + "fmt" pb "gen/proto/services/property_svc/v1" + "github.com/pkg/errors" "hwes" "hwutil" + valuesApi "property-svc/internal/property-value/api" commandsV1 "property-svc/internal/property-view/commands/v1" - "property-svc/internal/property-view/models" ) type PropertyViewGrpcService struct { @@ -18,22 +20,21 @@ func NewPropertyViewService(aggregateStore hwes.AggregateStore) *PropertyViewGrp return &PropertyViewGrpcService{as: aggregateStore} } -func (s PropertyViewGrpcService) UpdateTaskPropertyViewRule(ctx context.Context, req *pb.UpdateTaskPropertyViewRuleRequest) (*pb.UpdateTaskPropertyViewRuleResponse, error) { - wardID, err := hwutil.ParseNullUUID(req.WardId) - if err != nil { - return nil, err +func (s PropertyViewGrpcService) UpdatePropertyViewRule(ctx context.Context, req *pb.UpdatePropertyViewRuleRequest) (*pb.UpdatePropertyViewRuleResponse, error) { + if req.FilterUpdate == nil { + // nothing to update + return &pb.UpdatePropertyViewRuleResponse{}, nil } - taskID, err := hwutil.ParseNullUUID(req.TaskId) + + matcher, err := valuesApi.DeMuxMatchers(req) if err != nil { - return nil, err + return nil, fmt.Errorf("UpdatePropertyViewRule: error in demux: %w", err) } - if req.FilterUpdate == nil { - // nothing to update - return &pb.UpdateTaskPropertyViewRuleResponse{}, nil + if matcher == nil { + return nil, errors.New("UpdatePropertyViewRule: no matcher provided") } - // when writing another view rule handler, move this into a common function appendToAlwaysInclude, err := hwutil.StringsToUUIDs(hwutil.OrEmptySlice(req.FilterUpdate.AppendToAlwaysInclude)) if err != nil { return nil, err @@ -56,15 +57,10 @@ func (s PropertyViewGrpcService) UpdateTaskPropertyViewRule(ctx context.Context, if len(appendToAlwaysInclude) == 0 && len(removeFromAlwaysInclude) == 0 && len(appendToDontAlwaysInclude) == 0 && len(removeFromDontAlwaysInclude) == 0 { // nothing to update - return &pb.UpdateTaskPropertyViewRuleResponse{}, nil + return &pb.UpdatePropertyViewRuleResponse{}, nil } - // --- - - if err := commandsV1.NewUpdatePropertyViewRuleCommandHandler(s.as)(ctx, models.TaskPropertyMatchers{ - WardID: wardID, - TaskID: taskID, - }, + if err := commandsV1.NewUpdatePropertyViewRuleCommandHandler(s.as)(ctx, matcher, appendToAlwaysInclude, removeFromAlwaysInclude, appendToDontAlwaysInclude, @@ -73,5 +69,5 @@ func (s PropertyViewGrpcService) UpdateTaskPropertyViewRule(ctx context.Context, return nil, err } - return &pb.UpdateTaskPropertyViewRuleResponse{}, nil + return &pb.UpdatePropertyViewRuleResponse{}, nil } diff --git a/services/property-svc/internal/property-view/api/grpc_test.go b/services/property-svc/internal/property-view/api/grpc_test.go index fbd5e8e78..2bd61635c 100644 --- a/services/property-svc/internal/property-view/api/grpc_test.go +++ b/services/property-svc/internal/property-view/api/grpc_test.go @@ -59,22 +59,25 @@ func setup(t *testing.T) (ctx context.Context, client pb.PropertyViewsServiceCli return ctx, client, as, dbMock, teardown } -func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_Validation(t *testing.T) { +func TestPropertyViewGrpcService_UpdatePropertyViewRule_Validation(t *testing.T) { ctx, client, _, dbMock, teardown := setup(t) defer teardown() // Empty Request - _, err := client.UpdateTaskPropertyViewRule(ctx, &pb.UpdateTaskPropertyViewRuleRequest{ - WardId: nil, - TaskId: nil, + _, err := client.UpdatePropertyViewRule(ctx, &pb.UpdatePropertyViewRuleRequest{ FilterUpdate: nil, + Matcher: nil, }) assert.Error(t, err, "accepts empty requests") // Semi-Empty Request - _, err = client.UpdateTaskPropertyViewRule(ctx, &pb.UpdateTaskPropertyViewRuleRequest{ - WardId: nil, - TaskId: nil, + _, err = client.UpdatePropertyViewRule(ctx, &pb.UpdatePropertyViewRuleRequest{ + Matcher: &pb.UpdatePropertyViewRuleRequest_TaskMatcher{ + TaskMatcher: &pb.TaskPropertyMatcher{ + WardId: nil, + TaskId: nil, + }, + }, FilterUpdate: &pb.FilterUpdate{ AppendToAlwaysInclude: nil, RemoveFromAlwaysInclude: nil, @@ -85,9 +88,13 @@ func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_Validation(t *testin assert.NoError(t, err, "rejects semi-empty requests") // Array-based Semi-Empty Request - _, err = client.UpdateTaskPropertyViewRule(ctx, &pb.UpdateTaskPropertyViewRuleRequest{ - WardId: nil, - TaskId: nil, + _, err = client.UpdatePropertyViewRule(ctx, &pb.UpdatePropertyViewRuleRequest{ + Matcher: &pb.UpdatePropertyViewRuleRequest_TaskMatcher{ + TaskMatcher: &pb.TaskPropertyMatcher{ + WardId: nil, + TaskId: nil, + }, + }, FilterUpdate: &pb.FilterUpdate{ AppendToAlwaysInclude: make([]string, 0), RemoveFromAlwaysInclude: make([]string, 0), @@ -98,9 +105,13 @@ func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_Validation(t *testin assert.NoError(t, err, "rejects array based semi-empty requests") // Invalid WardID - _, err = client.UpdateTaskPropertyViewRule(ctx, &pb.UpdateTaskPropertyViewRuleRequest{ - WardId: hwutil.PtrTo("asdasdads"), - TaskId: nil, + _, err = client.UpdatePropertyViewRule(ctx, &pb.UpdatePropertyViewRuleRequest{ + Matcher: &pb.UpdatePropertyViewRuleRequest_TaskMatcher{ + TaskMatcher: &pb.TaskPropertyMatcher{ + WardId: hwutil.PtrTo("asdasdads"), + TaskId: nil, + }, + }, FilterUpdate: &pb.FilterUpdate{ AppendToAlwaysInclude: nil, RemoveFromAlwaysInclude: nil, @@ -111,9 +122,13 @@ func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_Validation(t *testin assert.Error(t, err, "accepts invalid ward_id") // Invalid TaskID - _, err = client.UpdateTaskPropertyViewRule(ctx, &pb.UpdateTaskPropertyViewRuleRequest{ - WardId: nil, - TaskId: hwutil.PtrTo("asdasdads"), + _, err = client.UpdatePropertyViewRule(ctx, &pb.UpdatePropertyViewRuleRequest{ + Matcher: &pb.UpdatePropertyViewRuleRequest_TaskMatcher{ + TaskMatcher: &pb.TaskPropertyMatcher{ + TaskId: hwutil.PtrTo("asdasdads"), + WardId: nil, + }, + }, FilterUpdate: &pb.FilterUpdate{ AppendToAlwaysInclude: nil, RemoveFromAlwaysInclude: nil, @@ -124,9 +139,13 @@ func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_Validation(t *testin assert.Error(t, err, "accepts invalid task_id") // Valid IDs - _, err = client.UpdateTaskPropertyViewRule(ctx, &pb.UpdateTaskPropertyViewRuleRequest{ - WardId: hwutil.PtrTo("e602f938-66c5-4a08-a251-4aef94a98060"), - TaskId: hwutil.PtrTo("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), + _, err = client.UpdatePropertyViewRule(ctx, &pb.UpdatePropertyViewRuleRequest{ + Matcher: &pb.UpdatePropertyViewRuleRequest_TaskMatcher{ + TaskMatcher: &pb.TaskPropertyMatcher{ + WardId: hwutil.PtrTo("e602f938-66c5-4a08-a251-4aef94a98060"), + TaskId: hwutil.PtrTo("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), + }, + }, FilterUpdate: &pb.FilterUpdate{ AppendToAlwaysInclude: nil, RemoveFromAlwaysInclude: nil, @@ -137,9 +156,13 @@ func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_Validation(t *testin assert.NoError(t, err, "rejects valid matchers") // Invalid updates - _, err = client.UpdateTaskPropertyViewRule(ctx, &pb.UpdateTaskPropertyViewRuleRequest{ - WardId: hwutil.PtrTo("e602f938-66c5-4a08-a251-4aef94a98060"), - TaskId: hwutil.PtrTo("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), + _, err = client.UpdatePropertyViewRule(ctx, &pb.UpdatePropertyViewRuleRequest{ + Matcher: &pb.UpdatePropertyViewRuleRequest_TaskMatcher{ + TaskMatcher: &pb.TaskPropertyMatcher{ + WardId: hwutil.PtrTo("e602f938-66c5-4a08-a251-4aef94a98060"), + TaskId: hwutil.PtrTo("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), + }, + }, FilterUpdate: &pb.FilterUpdate{ AppendToAlwaysInclude: nil, RemoveFromAlwaysInclude: []string{"asdasdasda"}, @@ -155,9 +178,13 @@ func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_Validation(t *testin WithArgs(uuid.NullUUID{}, uuid.NullUUID{UUID: uuid.MustParse("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), Valid: true}). WillReturnRows(pgxmock.NewRows([]string{})) - _, err = client.UpdateTaskPropertyViewRule(ctx, &pb.UpdateTaskPropertyViewRuleRequest{ - WardId: nil, - TaskId: hwutil.PtrTo("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), + _, err = client.UpdatePropertyViewRule(ctx, &pb.UpdatePropertyViewRuleRequest{ + Matcher: &pb.UpdatePropertyViewRuleRequest_TaskMatcher{ + TaskMatcher: &pb.TaskPropertyMatcher{ + WardId: nil, + TaskId: hwutil.PtrTo("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), + }, + }, FilterUpdate: &pb.FilterUpdate{ AppendToAlwaysInclude: nil, RemoveFromAlwaysInclude: []string{"a7ff7a87-7787-42b4-9aa8-037293ac9d90", "08b23992-9489-41d2-b80d-d7d49c4c9168"}, @@ -168,14 +195,18 @@ func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_Validation(t *testin assert.NoError(t, err, "rejects fully valid request") } -func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_AllEmptyNoEffect(t *testing.T) { +func TestPropertyViewGrpcService_UpdatePropertyViewRule_AllEmptyNoEffect(t *testing.T) { ctx, client, as, _, teardown := setup(t) defer teardown() // Valid IDs - _, _ = client.UpdateTaskPropertyViewRule(ctx, &pb.UpdateTaskPropertyViewRuleRequest{ - WardId: hwutil.PtrTo("e602f938-66c5-4a08-a251-4aef94a98060"), - TaskId: hwutil.PtrTo("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), + _, _ = client.UpdatePropertyViewRule(ctx, &pb.UpdatePropertyViewRuleRequest{ + Matcher: &pb.UpdatePropertyViewRuleRequest_TaskMatcher{ + TaskMatcher: &pb.TaskPropertyMatcher{ + WardId: hwutil.PtrTo("e602f938-66c5-4a08-a251-4aef94a98060"), + TaskId: hwutil.PtrTo("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), + }, + }, FilterUpdate: &pb.FilterUpdate{ AppendToAlwaysInclude: []string{}, RemoveFromAlwaysInclude: []string{}, @@ -187,7 +218,7 @@ func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_AllEmptyNoEffect(t * as.ExpectToBeEmpty(t) } -func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_GreenPath_Created(t *testing.T) { +func TestPropertyViewGrpcService_UpdatePropertyViewRule_GreenPath_Created(t *testing.T) { ctx, client, as, dbMock, teardown := setup(t) defer teardown() @@ -196,9 +227,13 @@ func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_GreenPath_Created(t WithArgs(uuid.NullUUID{}, uuid.NullUUID{UUID: uuid.MustParse("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), Valid: true}). WillReturnRows(pgxmock.NewRows([]string{})) - _, _ = client.UpdateTaskPropertyViewRule(ctx, &pb.UpdateTaskPropertyViewRuleRequest{ - WardId: nil, - TaskId: hwutil.PtrTo("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), + _, _ = client.UpdatePropertyViewRule(ctx, &pb.UpdatePropertyViewRuleRequest{ + Matcher: &pb.UpdatePropertyViewRuleRequest_TaskMatcher{ + TaskMatcher: &pb.TaskPropertyMatcher{ + WardId: nil, + TaskId: hwutil.PtrTo("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), + }, + }, FilterUpdate: &pb.FilterUpdate{ AppendToAlwaysInclude: nil, RemoveFromAlwaysInclude: []string{"a7ff7a87-7787-42b4-9aa8-037293ac9d90", "08b23992-9489-41d2-b80d-d7d49c4c9168"}, @@ -237,7 +272,7 @@ func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_GreenPath_Created(t }) } -func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_GreenPath_Updated(t *testing.T) { +func TestPropertyViewGrpcService_UpdatePropertyViewRule_GreenPath_Updated(t *testing.T) { ctx, client, as, dbMock, teardown := setup(t) defer teardown() @@ -273,9 +308,13 @@ func TestPropertyViewGrpcService_UpdateTaskPropertyViewRule_GreenPath_Updated(t } as.SetStreams(streamsPrior) - _, _ = client.UpdateTaskPropertyViewRule(ctx, &pb.UpdateTaskPropertyViewRuleRequest{ - WardId: nil, - TaskId: hwutil.PtrTo("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), + _, _ = client.UpdatePropertyViewRule(ctx, &pb.UpdatePropertyViewRuleRequest{ + Matcher: &pb.UpdatePropertyViewRuleRequest_TaskMatcher{ + TaskMatcher: &pb.TaskPropertyMatcher{ + WardId: nil, + TaskId: hwutil.PtrTo("bca23ec4-e8fd-407d-8e7d-0d0a52ba097f"), + }, + }, FilterUpdate: &pb.FilterUpdate{ AppendToAlwaysInclude: nil, RemoveFromAlwaysInclude: []string{"a7ff7a87-7787-42b4-9aa8-037293ac9d90", "08b23992-9489-41d2-b80d-d7d49c4c9168"}, diff --git a/services/property-svc/internal/property-view/models/property_view_rule.go b/services/property-svc/internal/property-view/models/property_view_rule.go index d731e351e..4da6c046e 100644 --- a/services/property-svc/internal/property-view/models/property_view_rule.go +++ b/services/property-svc/internal/property-view/models/property_view_rule.go @@ -6,11 +6,23 @@ import ( "hwutil" ) +type PropertiesQueryRow interface { + GetPropertyID() uuid.UUID + GetDontAlwaysInclude() bool + GetSpecificity() int32 +} + type PropertyMatchers interface { hwutil.MapAble // FindExactRuleId queries (presumably the projection) for the one rule that has these matchers // MUST return (nil, nil) if no such rule exists FindExactRuleId(context.Context) (*uuid.UUID, error) + + // QueryProperties queries (presumably the projection) for all properties relevant for the user using the rules + // MUST be ordered in ascending order by specificity + QueryProperties(context.Context) ([]PropertiesQueryRow, error) + + GetSubjectId() (uuid.UUID, error) } type PropertyViewRule struct { diff --git a/services/property-svc/internal/property-view/models/task_property_matchers.go b/services/property-svc/internal/property-view/models/task_property_matchers.go index 74b01b9af..6aeb5a175 100644 --- a/services/property-svc/internal/property-view/models/task_property_matchers.go +++ b/services/property-svc/internal/property-view/models/task_property_matchers.go @@ -2,6 +2,7 @@ package models import ( "context" + "errors" "hwdb" "hwutil" "property-svc/repos/task_views_repo" @@ -23,6 +24,44 @@ func (m TaskPropertyMatchers) FindExactRuleId(ctx context.Context) (*uuid.UUID, }) } +type queryPropertiesRow struct { + task_views_repo.GetTaskPropertiesUsingMatchersRow +} + +func (r queryPropertiesRow) GetPropertyID() uuid.UUID { + return r.PropertyID +} + +func (r queryPropertiesRow) GetDontAlwaysInclude() bool { + return r.DontAlwaysInclude +} + +func (r queryPropertiesRow) GetSpecificity() int32 { + return r.Specificity +} + +func (m TaskPropertyMatchers) QueryProperties(ctx context.Context) ([]PropertiesQueryRow, error) { + taskViews := task_views_repo.New(hwdb.GetDB()) + + rows, err := taskViews.GetTaskPropertiesUsingMatchers(ctx, task_views_repo.GetTaskPropertiesUsingMatchersParams{ + WardID: m.WardID, + TaskID: m.TaskID, + }) + + cast := func(row task_views_repo.GetTaskPropertiesUsingMatchersRow) PropertiesQueryRow { + return queryPropertiesRow{row} + } + + return hwutil.Map(rows, cast), err +} + +func (m TaskPropertyMatchers) GetSubjectId() (uuid.UUID, error) { + if !m.TaskID.Valid { + return uuid.UUID{}, errors.New("TaskPropertyMatchers GetSubjectId: TaskID not valid") + } + return m.TaskID.UUID, nil +} + func (m TaskPropertyMatchers) ToMap() map[string]interface{} { mp := make(map[string]interface{}) if m.WardID.Valid { diff --git a/services/property-svc/internal/property-view/queries/v1/views.go b/services/property-svc/internal/property-view/queries/v1/views.go new file mode 100644 index 000000000..78cfbaad2 --- /dev/null +++ b/services/property-svc/internal/property-view/queries/v1/views.go @@ -0,0 +1,26 @@ +package v1 + +import ( + "context" + "hwutil" + "property-svc/internal/property-view/models" + + "github.com/google/uuid" +) + +func GetAlwaysIncludePropertiesByMatcher(ctx context.Context, matcher models.PropertyMatchers) ([]uuid.UUID, error) { + rows, err := matcher.QueryProperties(ctx) + if err != nil { + return nil, err + } + + alwaysInclude := make(map[uuid.UUID]bool) + + // keep in mind, we expect rows to be ordered by ascending specificity + // we will now iterate upwards, while filling in the alwaysInclude list + + for _, row := range rows { + alwaysInclude[row.GetPropertyID()] = !row.GetDontAlwaysInclude() + } + return hwutil.SetToSlice(alwaysInclude), nil +} diff --git a/services/property-svc/repos/property_repo.sql b/services/property-svc/repos/property_repo.sql index 188d9d1f5..f360f5b40 100644 --- a/services/property-svc/repos/property_repo.sql +++ b/services/property-svc/repos/property_repo.sql @@ -6,6 +6,9 @@ VALUES ($1, $2, $3, $4); -- name: GetPropertyById :one SELECT * FROM properties WHERE id = $1; +-- name: GetPropertySubjectType :one +SELECT subject_type FROM properties WHERE id = $1; + -- name: GetPropertiesWithSelectDataAndOptionsBySubjectTypeOrID :many SELECT sqlc.embed(properties), diff --git a/services/property-svc/repos/property_repo/property_repo.sql.go b/services/property-svc/repos/property_repo/property_repo.sql.go index 1f71fd338..de543f31f 100644 --- a/services/property-svc/repos/property_repo/property_repo.sql.go +++ b/services/property-svc/repos/property_repo/property_repo.sql.go @@ -172,6 +172,17 @@ func (q *Queries) GetPropertyById(ctx context.Context, id uuid.UUID) (Property, return i, err } +const getPropertySubjectType = `-- name: GetPropertySubjectType :one +SELECT subject_type FROM properties WHERE id = $1 +` + +func (q *Queries) GetPropertySubjectType(ctx context.Context, id uuid.UUID) (int32, error) { + row := q.db.QueryRow(ctx, getPropertySubjectType, id) + var subject_type int32 + err := row.Scan(&subject_type) + return subject_type, err +} + const updateProperty = `-- name: UpdateProperty :exec UPDATE properties SET subject_type = coalesce($2, subject_type), diff --git a/services/property-svc/repos/property_value_repo.sql b/services/property-svc/repos/property_value_repo.sql index 2d5fa4da6..8b86fbf96 100644 --- a/services/property-svc/repos/property_value_repo.sql +++ b/services/property-svc/repos/property_value_repo.sql @@ -45,8 +45,27 @@ SELECT properties.is_archived as property_is_archived, properties.field_type as field_type FROM property_values - LEFT JOIN properties ON property_values.property_id = properties.id + JOIN properties ON property_values.property_id = properties.id WHERE subject_id = $1; +-- name: GetRelevantPropertyViews :many +SELECT + sqlc.embed(properties), + values.id as value_id, + values.text_value, + values.bool_value, + values.number_value, + values.select_value, + values.date_time_value, + values.date_value +FROM properties + LEFT JOIN property_values as values ON values.property_id = properties.id +WHERE + properties.is_archived = false + AND ( + values.subject_id = @subject_id -- implies existence of value + OR properties.id = ANY(@always_include :: uuid[]) + ); + -- name: DeletePropertyValue :exec DELETE FROM property_values WHERE id = $1; diff --git a/services/property-svc/repos/property_value_repo/property_value_repo.sql.go b/services/property-svc/repos/property_value_repo/property_value_repo.sql.go index d51fbc0d0..cf4bb0028 100644 --- a/services/property-svc/repos/property_value_repo/property_value_repo.sql.go +++ b/services/property-svc/repos/property_value_repo/property_value_repo.sql.go @@ -118,7 +118,7 @@ SELECT properties.is_archived as property_is_archived, properties.field_type as field_type FROM property_values - LEFT JOIN properties ON property_values.property_id = properties.id + JOIN properties ON property_values.property_id = properties.id WHERE subject_id = $1 ` @@ -130,10 +130,10 @@ type GetPropertyValuesWithPropertyBySubjectIDRow struct { SelectValue uuid.NullUUID DateTimeValue pgtype.Timestamp DateValue pgtype.Date - PropertyID uuid.NullUUID - PropertyName *string - PropertyIsArchived *bool - FieldType *int32 + PropertyID uuid.UUID + PropertyName string + PropertyIsArchived bool + FieldType int32 } func (q *Queries) GetPropertyValuesWithPropertyBySubjectID(ctx context.Context, subjectID uuid.UUID) ([]GetPropertyValuesWithPropertyBySubjectIDRow, error) { @@ -168,6 +168,78 @@ func (q *Queries) GetPropertyValuesWithPropertyBySubjectID(ctx context.Context, return items, nil } +const getRelevantPropertyViews = `-- name: GetRelevantPropertyViews :many +SELECT + properties.id, properties.subject_type, properties.field_type, properties.name, properties.description, properties.is_archived, properties.set_id, properties.select_data_id, + values.id as value_id, + values.text_value, + values.bool_value, + values.number_value, + values.select_value, + values.date_time_value, + values.date_value +FROM properties + LEFT JOIN property_values as values ON values.property_id = properties.id +WHERE + properties.is_archived = false + AND ( + values.subject_id = $1 -- implies existence of value + OR properties.id = ANY($2 :: uuid[]) + ) +` + +type GetRelevantPropertyViewsParams struct { + SubjectID uuid.UUID + AlwaysInclude []uuid.UUID +} + +type GetRelevantPropertyViewsRow struct { + Property Property + ValueID uuid.NullUUID + TextValue *string + BoolValue *bool + NumberValue *float64 + SelectValue uuid.NullUUID + DateTimeValue pgtype.Timestamp + DateValue pgtype.Date +} + +func (q *Queries) GetRelevantPropertyViews(ctx context.Context, arg GetRelevantPropertyViewsParams) ([]GetRelevantPropertyViewsRow, error) { + rows, err := q.db.Query(ctx, getRelevantPropertyViews, arg.SubjectID, arg.AlwaysInclude) + if err != nil { + return nil, err + } + defer rows.Close() + items := []GetRelevantPropertyViewsRow{} + for rows.Next() { + var i GetRelevantPropertyViewsRow + if err := rows.Scan( + &i.Property.ID, + &i.Property.SubjectType, + &i.Property.FieldType, + &i.Property.Name, + &i.Property.Description, + &i.Property.IsArchived, + &i.Property.SetID, + &i.Property.SelectDataID, + &i.ValueID, + &i.TextValue, + &i.BoolValue, + &i.NumberValue, + &i.SelectValue, + &i.DateTimeValue, + &i.DateValue, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + const updatePropertyValueByID = `-- name: UpdatePropertyValueByID :exec UPDATE property_values SET text_value = $2, diff --git a/services/property-svc/repos/task_views_repo.sql b/services/property-svc/repos/task_views_repo.sql index 5c79494d4..f4eda9f9a 100644 --- a/services/property-svc/repos/task_views_repo.sql +++ b/services/property-svc/repos/task_views_repo.sql @@ -10,3 +10,16 @@ SELECT WHERE (rules.ward_id = sqlc.narg('ward_id') OR (rules.ward_id IS NULL AND sqlc.narg('ward_id') IS NULL)) AND ((rules.task_id = sqlc.narg('task_id')) OR (rules.task_id IS NULL AND sqlc.narg('task_id') IS NULL)); + + +-- name: GetTaskPropertiesUsingMatchers :many +SELECT + list_items.property_id, + list_items.dont_always_include, + calc_rule_specificity(rules.task_id IS NOT NULL, rules.ward_id IS NOT NULL) as specificity +FROM task_property_view_rules as rules +JOIN property_view_filter_always_include_items as list_items ON list_items.rule_id = rules.rule_id +WHERE + (rules.ward_id = @ward_id OR rules.ward_id IS NULL) +AND (rules.task_id = @task_id OR rules.task_id IS NULL) +ORDER BY specificity; diff --git a/services/property-svc/repos/task_views_repo/task_views_repo.sql.go b/services/property-svc/repos/task_views_repo/task_views_repo.sql.go index 335ac9958..04c744572 100644 --- a/services/property-svc/repos/task_views_repo/task_views_repo.sql.go +++ b/services/property-svc/repos/task_views_repo/task_views_repo.sql.go @@ -27,6 +27,50 @@ func (q *Queries) CreateTaskRule(ctx context.Context, arg CreateTaskRuleParams) return err } +const getTaskPropertiesUsingMatchers = `-- name: GetTaskPropertiesUsingMatchers :many +SELECT + list_items.property_id, + list_items.dont_always_include, + calc_rule_specificity(rules.task_id IS NOT NULL, rules.ward_id IS NOT NULL) as specificity +FROM task_property_view_rules as rules +JOIN property_view_filter_always_include_items as list_items ON list_items.rule_id = rules.rule_id +WHERE + (rules.ward_id = $1 OR rules.ward_id IS NULL) +AND (rules.task_id = $2 OR rules.task_id IS NULL) +ORDER BY specificity +` + +type GetTaskPropertiesUsingMatchersParams struct { + WardID uuid.NullUUID + TaskID uuid.NullUUID +} + +type GetTaskPropertiesUsingMatchersRow struct { + PropertyID uuid.UUID + DontAlwaysInclude bool + Specificity int32 +} + +func (q *Queries) GetTaskPropertiesUsingMatchers(ctx context.Context, arg GetTaskPropertiesUsingMatchersParams) ([]GetTaskPropertiesUsingMatchersRow, error) { + rows, err := q.db.Query(ctx, getTaskPropertiesUsingMatchers, arg.WardID, arg.TaskID) + if err != nil { + return nil, err + } + defer rows.Close() + items := []GetTaskPropertiesUsingMatchersRow{} + for rows.Next() { + var i GetTaskPropertiesUsingMatchersRow + if err := rows.Scan(&i.PropertyID, &i.DontAlwaysInclude, &i.Specificity); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + const getTaskRuleIdUsingExactMatchers = `-- name: GetTaskRuleIdUsingExactMatchers :one diff --git a/services/property-svc/schema.sql b/services/property-svc/schema.sql index 07bf65533..c0cfb0733 100644 --- a/services/property-svc/schema.sql +++ b/services/property-svc/schema.sql @@ -3,7 +3,7 @@ -- -- Dumped from database version 15.6 --- Dumped by pg_dump version 15.7 +-- Dumped by pg_dump version 15.6 SET statement_timeout = 0; SET lock_timeout = 0;