From 3e1161c91b15d4359ab84c4a1cfff60d59abaa89 Mon Sep 17 00:00:00 2001 From: Max Baumann Date: Tue, 23 Jan 2024 09:55:42 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=80=20sqlc:=20tasks=20(#581)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 3 +- .../task_svc/v1/patient_svc.pbjson.dart | 25 +- .../services/task_svc/v1/task_svc.pbjson.dart | 46 +- .../services/task_svc/v1/patient_svc.pb.go | 489 ++++++------ .../proto/services/task_svc/v1/task_svc.pb.go | 719 +++++++++--------- .../services/task_svc/v1/patient_svc_pb2.py | 54 +- .../services/task_svc/v1/task_svc_pb2.py | 150 ++-- .../services/task_svc/v1/patient_svc_pb.d.ts | 9 +- .../services/task_svc/v1/patient_svc_pb.js | 24 +- .../services/task_svc/v1/task_svc_pb.d.ts | 18 +- .../proto/services/task_svc/v1/task_svc_pb.js | 48 +- libs/hwdb/go.mod | 1 + libs/hwdb/go.sum | 6 + libs/hwdb/helper.go | 21 + libs/hwdb/helper_test.go | 30 + libs/hwutil/parse.go | 2 +- libs/hwutil/parse_test.go | 54 ++ libs/proto_helpers/task_svc/v1/helpers.go | 32 - proto/services/task_svc/v1/patient_svc.proto | 2 +- proto/services/task_svc/v1/task_svc.proto | 4 +- .../services/task_svc/v1/patient_svc_pb2.py | 54 +- .../services/task_svc/v1/task_svc_pb2.py | 150 ++-- services/task-svc/go.mod | 1 - services/task-svc/go.sum | 10 - .../12.GetPatientDetails.expected | 56 +- .../29.GetAssignedTasks.expected | 341 +++++++-- .../task-svc/internal/models/bed_models.go | 14 - .../internal/models/patient_models.go | 24 - .../task-svc/internal/models/room_models.go | 18 - .../task-svc/internal/models/task_models.go | 33 - .../task-svc/internal/models/ward_models.go | 14 - services/task-svc/internal/patient/patient.go | 69 +- .../internal/repositories/task_repository.go | 142 ---- services/task-svc/internal/task/task.go | 451 ++++++----- services/task-svc/repos/patient_repo.sql | 5 - .../repos/patient_repo/patient_repo.sql.go | 13 - services/task-svc/repos/task_repo.sql | 86 +++ services/task-svc/repos/task_repo/db.go | 32 + services/task-svc/repos/task_repo/models.go | 83 ++ .../task-svc/repos/task_repo/task_repo.sql.go | 361 +++++++++ services/task-svc/sqlc.yaml | 8 + 41 files changed, 2218 insertions(+), 1484 deletions(-) create mode 100644 libs/hwdb/helper_test.go delete mode 100644 services/task-svc/internal/models/bed_models.go delete mode 100644 services/task-svc/internal/models/patient_models.go delete mode 100644 services/task-svc/internal/models/room_models.go delete mode 100644 services/task-svc/internal/models/task_models.go delete mode 100644 services/task-svc/internal/models/ward_models.go delete mode 100644 services/task-svc/internal/repositories/task_repository.go create mode 100644 services/task-svc/repos/task_repo.sql create mode 100644 services/task-svc/repos/task_repo/db.go create mode 100644 services/task-svc/repos/task_repo/models.go create mode 100644 services/task-svc/repos/task_repo/task_repo.sql.go diff --git a/.gitattributes b/.gitattributes index 270f83b4b..999700386 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,5 +3,4 @@ gen/**/helpers.go linguist-generated=false services/impulse_svc/gen/** linguist-generated=true services/**/schema.sql linguist-generated=true **/*.expected linguist-generated=true -services/user-svc/repos/**/ linguist-generated=true - +services/*/repos/**/ linguist-generated=true diff --git a/gen/dart/lib/proto/services/task_svc/v1/patient_svc.pbjson.dart b/gen/dart/lib/proto/services/task_svc/v1/patient_svc.pbjson.dart index d31686412..fb469cb73 100644 --- a/gen/dart/lib/proto/services/task_svc/v1/patient_svc.pbjson.dart +++ b/gen/dart/lib/proto/services/task_svc/v1/patient_svc.pbjson.dart @@ -511,12 +511,15 @@ const GetPatientDetailsResponse_Task$json = { {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, {'1': 'description', '3': 3, '4': 1, '5': 9, '10': 'description'}, {'1': 'status', '3': 4, '4': 1, '5': 14, '6': '.proto.services.task_svc.v1.GetPatientDetailsResponse.TaskStatus', '10': 'status'}, - {'1': 'assigned_user_id', '3': 5, '4': 1, '5': 9, '10': 'assignedUserId'}, + {'1': 'assigned_user_id', '3': 5, '4': 1, '5': 9, '9': 0, '10': 'assignedUserId', '17': true}, {'1': 'patient_id', '3': 6, '4': 1, '5': 9, '10': 'patientId'}, {'1': 'public', '3': 7, '4': 1, '5': 8, '10': 'public'}, {'1': 'subtasks', '3': 8, '4': 3, '5': 11, '6': '.proto.services.task_svc.v1.GetPatientDetailsResponse.Task.SubTask', '10': 'subtasks'}, ], '3': [GetPatientDetailsResponse_Task_SubTask$json], + '8': [ + {'1': '_assigned_user_id'}, + ], }; @$core.Deprecated('Use getPatientDetailsResponseDescriptor instead') @@ -551,18 +554,18 @@ final $typed_data.Uint8List getPatientDetailsResponseDescriptor = $convert.base6 'b21IAVIEcm9vbYgBARJQCgNiZWQYCCABKAsyOS5wcm90by5zZXJ2aWNlcy50YXNrX3N2Yy52MS' '5HZXRQYXRpZW50RGV0YWlsc1Jlc3BvbnNlLkJlZEgCUgNiZWSIAQEaQwoEUm9vbRIOCgJpZBgB' 'IAEoCVICaWQSEgoEbmFtZRgCIAEoCVIEbmFtZRIXCgd3YXJkX2lkGAMgASgJUgZ3YXJkSWQaKQ' - 'oDQmVkEg4KAmlkGAEgASgJUgJpZBISCgRuYW1lGAIgASgJUgRuYW1lGqoDCgRUYXNrEg4KAmlk' + 'oDQmVkEg4KAmlkGAEgASgJUgJpZBISCgRuYW1lGAIgASgJUgRuYW1lGsQDCgRUYXNrEg4KAmlk' 'GAEgASgJUgJpZBISCgRuYW1lGAIgASgJUgRuYW1lEiAKC2Rlc2NyaXB0aW9uGAMgASgJUgtkZX' 'NjcmlwdGlvbhJYCgZzdGF0dXMYBCABKA4yQC5wcm90by5zZXJ2aWNlcy50YXNrX3N2Yy52MS5H' - 'ZXRQYXRpZW50RGV0YWlsc1Jlc3BvbnNlLlRhc2tTdGF0dXNSBnN0YXR1cxIoChBhc3NpZ25lZF' - '91c2VyX2lkGAUgASgJUg5hc3NpZ25lZFVzZXJJZBIdCgpwYXRpZW50X2lkGAYgASgJUglwYXRp' - 'ZW50SWQSFgoGcHVibGljGAcgASgIUgZwdWJsaWMSXgoIc3VidGFza3MYCCADKAsyQi5wcm90by' - '5zZXJ2aWNlcy50YXNrX3N2Yy52MS5HZXRQYXRpZW50RGV0YWlsc1Jlc3BvbnNlLlRhc2suU3Vi' - 'VGFza1IIc3VidGFza3MaQQoHU3ViVGFzaxIOCgJpZBgBIAEoCVICaWQSEgoEbmFtZRgCIAEoCV' - 'IEbmFtZRISCgRkb25lGAMgASgIUgRkb25lInIKClRhc2tTdGF0dXMSGwoXVEFTS19TVEFUVVNf' - 'VU5TUEVDSUZJRUQQABIUChBUQVNLX1NUQVRVU19UT0RPEAESGwoXVEFTS19TVEFUVVNfSU5fUF' - 'JPR1JFU1MQAhIUChBUQVNLX1NUQVRVU19ET05FEANCCgoIX3dhcmRfaWRCBwoFX3Jvb21CBgoE' - 'X2JlZA=='); + 'ZXRQYXRpZW50RGV0YWlsc1Jlc3BvbnNlLlRhc2tTdGF0dXNSBnN0YXR1cxItChBhc3NpZ25lZF' + '91c2VyX2lkGAUgASgJSABSDmFzc2lnbmVkVXNlcklkiAEBEh0KCnBhdGllbnRfaWQYBiABKAlS' + 'CXBhdGllbnRJZBIWCgZwdWJsaWMYByABKAhSBnB1YmxpYxJeCghzdWJ0YXNrcxgIIAMoCzJCLn' + 'Byb3RvLnNlcnZpY2VzLnRhc2tfc3ZjLnYxLkdldFBhdGllbnREZXRhaWxzUmVzcG9uc2UuVGFz' + 'ay5TdWJUYXNrUghzdWJ0YXNrcxpBCgdTdWJUYXNrEg4KAmlkGAEgASgJUgJpZBISCgRuYW1lGA' + 'IgASgJUgRuYW1lEhIKBGRvbmUYAyABKAhSBGRvbmVCEwoRX2Fzc2lnbmVkX3VzZXJfaWQicgoK' + 'VGFza1N0YXR1cxIbChdUQVNLX1NUQVRVU19VTlNQRUNJRklFRBAAEhQKEFRBU0tfU1RBVFVTX1' + 'RPRE8QARIbChdUQVNLX1NUQVRVU19JTl9QUk9HUkVTUxACEhQKEFRBU0tfU1RBVFVTX0RPTkUQ' + 'A0IKCghfd2FyZF9pZEIHCgVfcm9vbUIGCgRfYmVk'); @$core.Deprecated('Use getPatientListRequestDescriptor instead') const GetPatientListRequest$json = { diff --git a/gen/dart/lib/proto/services/task_svc/v1/task_svc.pbjson.dart b/gen/dart/lib/proto/services/task_svc/v1/task_svc.pbjson.dart index 31f608289..c7d3f2c95 100644 --- a/gen/dart/lib/proto/services/task_svc/v1/task_svc.pbjson.dart +++ b/gen/dart/lib/proto/services/task_svc/v1/task_svc.pbjson.dart @@ -164,7 +164,7 @@ const GetTasksByPatientResponse_Task$json = { {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, {'1': 'description', '3': 3, '4': 1, '5': 9, '10': 'description'}, {'1': 'status', '3': 4, '4': 1, '5': 14, '6': '.proto.services.task_svc.v1.TaskStatus', '10': 'status'}, - {'1': 'assigned_user_id', '3': 5, '4': 1, '5': 9, '10': 'assignedUserId'}, + {'1': 'assigned_user_id', '3': 5, '4': 1, '5': 9, '9': 0, '10': 'assignedUserId', '17': true}, {'1': 'patient_id', '3': 6, '4': 1, '5': 9, '10': 'patientId'}, {'1': 'public', '3': 7, '4': 1, '5': 8, '10': 'public'}, {'1': 'due_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'dueAt'}, @@ -172,6 +172,9 @@ const GetTasksByPatientResponse_Task$json = { {'1': 'subtasks', '3': 10, '4': 3, '5': 11, '6': '.proto.services.task_svc.v1.GetTasksByPatientResponse.Task.SubTask', '10': 'subtasks'}, ], '3': [GetTasksByPatientResponse_Task_SubTask$json], + '8': [ + {'1': '_assigned_user_id'}, + ], }; @$core.Deprecated('Use getTasksByPatientResponseDescriptor instead') @@ -188,17 +191,17 @@ const GetTasksByPatientResponse_Task_SubTask$json = { /// Descriptor for `GetTasksByPatientResponse`. Decode as a `google.protobuf.DescriptorProto`. final $typed_data.Uint8List getTasksByPatientResponseDescriptor = $convert.base64Decode( 'ChlHZXRUYXNrc0J5UGF0aWVudFJlc3BvbnNlElAKBXRhc2tzGAEgAygLMjoucHJvdG8uc2Vydm' - 'ljZXMudGFza19zdmMudjEuR2V0VGFza3NCeVBhdGllbnRSZXNwb25zZS5UYXNrUgV0YXNrcxqB' + 'ljZXMudGFza19zdmMudjEuR2V0VGFza3NCeVBhdGllbnRSZXNwb25zZS5UYXNrUgV0YXNrcxqb' 'BAoEVGFzaxIOCgJpZBgBIAEoCVICaWQSEgoEbmFtZRgCIAEoCVIEbmFtZRIgCgtkZXNjcmlwdG' 'lvbhgDIAEoCVILZGVzY3JpcHRpb24SPgoGc3RhdHVzGAQgASgOMiYucHJvdG8uc2VydmljZXMu' - 'dGFza19zdmMudjEuVGFza1N0YXR1c1IGc3RhdHVzEigKEGFzc2lnbmVkX3VzZXJfaWQYBSABKA' - 'lSDmFzc2lnbmVkVXNlcklkEh0KCnBhdGllbnRfaWQYBiABKAlSCXBhdGllbnRJZBIWCgZwdWJs' - 'aWMYByABKAhSBnB1YmxpYxIxCgZkdWVfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZX' - 'N0YW1wUgVkdWVBdBIdCgpjcmVhdGVkX2J5GAkgASgJUgljcmVhdGVkQnkSXgoIc3VidGFza3MY' - 'CiADKAsyQi5wcm90by5zZXJ2aWNlcy50YXNrX3N2Yy52MS5HZXRUYXNrc0J5UGF0aWVudFJlc3' - 'BvbnNlLlRhc2suU3ViVGFza1IIc3VidGFza3MaYAoHU3ViVGFzaxIOCgJpZBgBIAEoCVICaWQS' - 'EgoEbmFtZRgCIAEoCVIEbmFtZRISCgRkb25lGAMgASgIUgRkb25lEh0KCmNyZWF0ZWRfYnkYBC' - 'ABKAlSCWNyZWF0ZWRCeQ=='); + 'dGFza19zdmMudjEuVGFza1N0YXR1c1IGc3RhdHVzEi0KEGFzc2lnbmVkX3VzZXJfaWQYBSABKA' + 'lIAFIOYXNzaWduZWRVc2VySWSIAQESHQoKcGF0aWVudF9pZBgGIAEoCVIJcGF0aWVudElkEhYK' + 'BnB1YmxpYxgHIAEoCFIGcHVibGljEjEKBmR1ZV9hdBgIIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi' + '5UaW1lc3RhbXBSBWR1ZUF0Eh0KCmNyZWF0ZWRfYnkYCSABKAlSCWNyZWF0ZWRCeRJeCghzdWJ0' + 'YXNrcxgKIAMoCzJCLnByb3RvLnNlcnZpY2VzLnRhc2tfc3ZjLnYxLkdldFRhc2tzQnlQYXRpZW' + '50UmVzcG9uc2UuVGFzay5TdWJUYXNrUghzdWJ0YXNrcxpgCgdTdWJUYXNrEg4KAmlkGAEgASgJ' + 'UgJpZBISCgRuYW1lGAIgASgJUgRuYW1lEhIKBGRvbmUYAyABKAhSBGRvbmUSHQoKY3JlYXRlZF' + '9ieRgEIAEoCVIJY3JlYXRlZEJ5QhMKEV9hc3NpZ25lZF91c2VyX2lk'); @$core.Deprecated('Use getTasksByPatientSortedByStatusRequestDescriptor instead') const GetTasksByPatientSortedByStatusRequest$json = { @@ -231,7 +234,7 @@ const GetTasksByPatientSortedByStatusResponse_Task$json = { {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, {'1': 'description', '3': 3, '4': 1, '5': 9, '10': 'description'}, - {'1': 'assigned_user_id', '3': 5, '4': 1, '5': 9, '10': 'assignedUserId'}, + {'1': 'assigned_user_id', '3': 5, '4': 1, '5': 9, '9': 0, '10': 'assignedUserId', '17': true}, {'1': 'patient_id', '3': 6, '4': 1, '5': 9, '10': 'patientId'}, {'1': 'public', '3': 7, '4': 1, '5': 8, '10': 'public'}, {'1': 'due_at', '3': 8, '4': 1, '5': 11, '6': '.google.protobuf.Timestamp', '10': 'dueAt'}, @@ -239,6 +242,9 @@ const GetTasksByPatientSortedByStatusResponse_Task$json = { {'1': 'subtasks', '3': 10, '4': 3, '5': 11, '6': '.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.Task.SubTask', '10': 'subtasks'}, ], '3': [GetTasksByPatientSortedByStatusResponse_Task_SubTask$json], + '8': [ + {'1': '_assigned_user_id'}, + ], }; @$core.Deprecated('Use getTasksByPatientSortedByStatusResponseDescriptor instead') @@ -260,15 +266,15 @@ final $typed_data.Uint8List getTasksByPatientSortedByStatusResponseDescriptor = 'VydmljZXMudGFza19zdmMudjEuR2V0VGFza3NCeVBhdGllbnRTb3J0ZWRCeVN0YXR1c1Jlc3Bv' 'bnNlLlRhc2tSCmluUHJvZ3Jlc3MSXAoEZG9uZRgDIAMoCzJILnByb3RvLnNlcnZpY2VzLnRhc2' 'tfc3ZjLnYxLkdldFRhc2tzQnlQYXRpZW50U29ydGVkQnlTdGF0dXNSZXNwb25zZS5UYXNrUgRk' - 'b25lGs8DCgRUYXNrEg4KAmlkGAEgASgJUgJpZBISCgRuYW1lGAIgASgJUgRuYW1lEiAKC2Rlc2' - 'NyaXB0aW9uGAMgASgJUgtkZXNjcmlwdGlvbhIoChBhc3NpZ25lZF91c2VyX2lkGAUgASgJUg5h' - 'c3NpZ25lZFVzZXJJZBIdCgpwYXRpZW50X2lkGAYgASgJUglwYXRpZW50SWQSFgoGcHVibGljGA' - 'cgASgIUgZwdWJsaWMSMQoGZHVlX2F0GAggASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFt' - 'cFIFZHVlQXQSHQoKY3JlYXRlZF9ieRgJIAEoCVIJY3JlYXRlZEJ5EmwKCHN1YnRhc2tzGAogAy' - 'gLMlAucHJvdG8uc2VydmljZXMudGFza19zdmMudjEuR2V0VGFza3NCeVBhdGllbnRTb3J0ZWRC' - 'eVN0YXR1c1Jlc3BvbnNlLlRhc2suU3ViVGFza1IIc3VidGFza3MaYAoHU3ViVGFzaxIOCgJpZB' - 'gBIAEoCVICaWQSEgoEbmFtZRgCIAEoCVIEbmFtZRISCgRkb25lGAMgASgIUgRkb25lEh0KCmNy' - 'ZWF0ZWRfYnkYBCABKAlSCWNyZWF0ZWRCeQ=='); + 'b25lGukDCgRUYXNrEg4KAmlkGAEgASgJUgJpZBISCgRuYW1lGAIgASgJUgRuYW1lEiAKC2Rlc2' + 'NyaXB0aW9uGAMgASgJUgtkZXNjcmlwdGlvbhItChBhc3NpZ25lZF91c2VyX2lkGAUgASgJSABS' + 'DmFzc2lnbmVkVXNlcklkiAEBEh0KCnBhdGllbnRfaWQYBiABKAlSCXBhdGllbnRJZBIWCgZwdW' + 'JsaWMYByABKAhSBnB1YmxpYxIxCgZkdWVfYXQYCCABKAsyGi5nb29nbGUucHJvdG9idWYuVGlt' + 'ZXN0YW1wUgVkdWVBdBIdCgpjcmVhdGVkX2J5GAkgASgJUgljcmVhdGVkQnkSbAoIc3VidGFza3' + 'MYCiADKAsyUC5wcm90by5zZXJ2aWNlcy50YXNrX3N2Yy52MS5HZXRUYXNrc0J5UGF0aWVudFNv' + 'cnRlZEJ5U3RhdHVzUmVzcG9uc2UuVGFzay5TdWJUYXNrUghzdWJ0YXNrcxpgCgdTdWJUYXNrEg' + '4KAmlkGAEgASgJUgJpZBISCgRuYW1lGAIgASgJUgRuYW1lEhIKBGRvbmUYAyABKAhSBGRvbmUS' + 'HQoKY3JlYXRlZF9ieRgEIAEoCVIJY3JlYXRlZEJ5QhMKEV9hc3NpZ25lZF91c2VyX2lk'); @$core.Deprecated('Use getAssignedTasksRequestDescriptor instead') const GetAssignedTasksRequest$json = { diff --git a/gen/go/proto/services/task_svc/v1/patient_svc.pb.go b/gen/go/proto/services/task_svc/v1/patient_svc.pb.go index 4e2332d3c..b5a0257bc 100644 --- a/gen/go/proto/services/task_svc/v1/patient_svc.pb.go +++ b/gen/go/proto/services/task_svc/v1/patient_svc.pb.go @@ -2247,7 +2247,7 @@ type GetPatientDetailsResponse_Task struct { Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Status GetPatientDetailsResponse_TaskStatus `protobuf:"varint,4,opt,name=status,proto3,enum=proto.services.task_svc.v1.GetPatientDetailsResponse_TaskStatus" json:"status,omitempty"` - AssignedUserId string `protobuf:"bytes,5,opt,name=assigned_user_id,json=assignedUserId,proto3" json:"assigned_user_id,omitempty"` + AssignedUserId *string `protobuf:"bytes,5,opt,name=assigned_user_id,json=assignedUserId,proto3,oneof" json:"assigned_user_id,omitempty"` PatientId string `protobuf:"bytes,6,opt,name=patient_id,json=patientId,proto3" json:"patient_id,omitempty"` Public bool `protobuf:"varint,7,opt,name=public,proto3" json:"public,omitempty"` Subtasks []*GetPatientDetailsResponse_Task_SubTask `protobuf:"bytes,8,rep,name=subtasks,proto3" json:"subtasks,omitempty"` @@ -2314,8 +2314,8 @@ func (x *GetPatientDetailsResponse_Task) GetStatus() GetPatientDetailsResponse_T } func (x *GetPatientDetailsResponse_Task) GetAssignedUserId() string { - if x != nil { - return x.AssignedUserId + if x != nil && x.AssignedUserId != nil { + return *x.AssignedUserId } return "" } @@ -3030,7 +3030,7 @@ var file_proto_services_task_svc_v1_patient_svc_proto_rawDesc = []byte{ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0xda, 0x08, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, + 0x69, 0x64, 0x22, 0xf4, 0x08, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, @@ -3064,7 +3064,7 @@ var file_proto_services_task_svc_v1_patient_svc_proto_rawDesc = []byte{ 0x77, 0x61, 0x72, 0x64, 0x49, 0x64, 0x1a, 0x29, 0x0a, 0x03, 0x42, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x1a, 0xaa, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x65, 0x1a, 0xc4, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, @@ -3074,264 +3074,266 @@ var file_proto_services_task_svc_v1_patient_svc_proto_rawDesc = []byte{ 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x73, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x73, - 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, - 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x5e, 0x0a, 0x08, 0x73, - 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, - 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, - 0x74, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x74, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, + 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x12, 0x5e, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x08, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, + 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x1a, 0x41, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, + 0x6f, 0x6e, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0x72, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x44, 0x4f, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x41, 0x53, + 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, + 0x52, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x42, 0x0a, 0x0a, 0x08, + 0x5f, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x72, 0x6f, 0x6f, + 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x62, 0x65, 0x64, 0x22, 0x41, 0x0a, 0x15, 0x47, 0x65, 0x74, + 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 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, + 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x22, 0x98, 0x0c, 0x0a, + 0x16, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x61, 0x74, 0x69, + 0x65, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x6e, 0x64, 0x42, 0x65, + 0x64, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x6b, 0x0a, 0x13, 0x75, 0x6e, 0x61, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x61, 0x74, 0x69, 0x65, + 0x6e, 0x74, 0x52, 0x12, 0x75, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x50, 0x61, + 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x6b, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x63, 0x68, 0x61, + 0x72, 0x67, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, + 0x12, 0x64, 0x69, 0x73, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x64, 0x50, 0x61, 0x74, 0x69, 0x65, + 0x6e, 0x74, 0x73, 0x1a, 0xba, 0x01, 0x0a, 0x07, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x3a, 0x0a, 0x19, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x17, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x52, 0x65, 0x61, 0x64, 0x61, 0x62, 0x6c, + 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, + 0x6f, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x65, + 0x73, 0x12, 0x4d, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x37, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x1a, 0x29, 0x0a, 0x03, 0x42, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x43, 0x0a, 0x04, 0x52, + 0x6f, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x77, 0x61, 0x72, 0x64, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x61, 0x72, 0x64, 0x49, 0x64, + 0x1a, 0xdf, 0x02, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, + 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x6e, 0x64, 0x42, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x19, 0x68, 0x75, + 0x6d, 0x61, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x68, + 0x75, 0x6d, 0x61, 0x6e, 0x52, 0x65, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72, + 0x6f, 0x6f, 0x6d, 0x12, 0x48, 0x0a, 0x03, 0x62, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x36, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x65, 0x64, 0x52, 0x03, 0x62, 0x65, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, + 0x74, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x1a, 0xbe, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x55, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x3d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x73, + 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x69, 0x65, + 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, + 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x5b, + 0x0a, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x3f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x41, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, - 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x22, 0x72, - 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x17, - 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x53, - 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x44, 0x4f, 0x10, 0x01, 0x12, - 0x1b, 0x0a, 0x17, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, - 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, - 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x4f, 0x4e, 0x45, - 0x10, 0x03, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x42, 0x07, - 0x0a, 0x05, 0x5f, 0x72, 0x6f, 0x6f, 0x6d, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x62, 0x65, 0x64, 0x22, - 0x41, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, - 0x74, 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, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x77, 0x61, 0x72, 0x64, 0x5f, - 0x69, 0x64, 0x22, 0x98, 0x0c, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, - 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, + 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x42, 0x13, + 0x0a, 0x11, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x22, 0x72, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, + 0x0a, 0x10, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, + 0x44, 0x4f, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, + 0x02, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x36, 0x0a, 0x15, 0x52, 0x65, 0x61, 0x64, 0x6d, + 0x69, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, + 0x18, 0x0a, 0x16, 0x52, 0x65, 0x61, 0x64, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe9, 0x0d, 0x0a, 0x0e, 0x50, 0x61, + 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0d, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, - 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, - 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x52, 0x6f, 0x6f, - 0x6d, 0x41, 0x6e, 0x64, 0x42, 0x65, 0x64, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, - 0x6b, 0x0a, 0x13, 0x75, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x70, 0x61, - 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, - 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, - 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x12, 0x75, 0x6e, 0x61, 0x73, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x6b, 0x0a, 0x13, - 0x64, 0x69, 0x73, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x69, 0x65, - 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, - 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x50, 0x61, - 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x12, 0x64, 0x69, 0x73, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, - 0x64, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0xba, 0x01, 0x0a, 0x07, 0x50, 0x61, - 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x19, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x72, - 0x65, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x52, - 0x65, 0x61, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, + 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, + 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x7c, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, + 0x74, 0x42, 0x79, 0x42, 0x65, 0x64, 0x12, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x29, 0x0a, 0x03, 0x42, 0x65, 0x64, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x1a, 0x43, 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, - 0x07, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x77, 0x61, 0x72, 0x64, 0x49, 0x64, 0x1a, 0xdf, 0x02, 0x0a, 0x15, 0x50, 0x61, 0x74, 0x69, 0x65, - 0x6e, 0x74, 0x57, 0x69, 0x74, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x41, 0x6e, 0x64, 0x42, 0x65, 0x64, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x3a, 0x0a, 0x19, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x17, 0x68, 0x75, 0x6d, 0x61, 0x6e, 0x52, 0x65, 0x61, 0x64, 0x61, 0x62, - 0x6c, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x04, - 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x70, 0x72, 0x6f, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, + 0x42, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, - 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, - 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x48, 0x0a, 0x03, 0x62, 0x65, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x42, 0x65, 0x64, 0x52, 0x03, - 0x62, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x05, 0x74, 0x61, 0x73, - 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, - 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0xbe, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, - 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x6e, 0x74, 0x42, 0x79, 0x42, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, + 0x73, 0x42, 0x79, 0x57, 0x61, 0x72, 0x64, 0x12, 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, - 0x0a, 0x10, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x73, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, - 0x0a, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x12, 0x5b, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x73, - 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, - 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, - 0x73, 0x1a, 0x41, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, - 0x64, 0x6f, 0x6e, 0x65, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0x72, 0x0a, 0x0a, 0x54, 0x61, 0x73, - 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x41, 0x53, 0x4b, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x44, 0x4f, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x41, - 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, - 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x53, 0x4b, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x36, 0x0a, - 0x15, 0x52, 0x65, 0x61, 0x64, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, 0x69, - 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x52, 0x65, 0x61, 0x64, 0x6d, 0x69, 0x74, - 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0xe9, 0x0d, 0x0a, 0x0e, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, - 0x65, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x47, 0x65, - 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, - 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7c, 0x0a, 0x0f, 0x47, 0x65, 0x74, - 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x42, 0x65, 0x64, 0x12, 0x32, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, - 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, - 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x42, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x42, 0x65, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, - 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x57, 0x61, 0x72, 0x64, 0x12, 0x34, 0x2e, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, + 0x42, 0x79, 0x57, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, - 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x57, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x57, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x9d, 0x01, 0x0a, - 0x1a, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, - 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x57, 0x61, 0x72, 0x64, 0x12, 0x3d, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, - 0x65, 0x6e, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x57, - 0x61, 0x72, 0x64, 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, 0x74, 0x61, 0x73, 0x6b, - 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, - 0x6e, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x57, 0x61, - 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x82, 0x01, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x42, 0x79, 0x57, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x9d, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x61, + 0x74, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, + 0x79, 0x57, 0x61, 0x72, 0x64, 0x12, 0x3d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x73, 0x73, + 0x69, 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x57, 0x61, 0x72, 0x64, 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, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x41, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x57, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x65, + 0x63, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x34, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, + 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x42, 0x65, 0x64, + 0x12, 0x2c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, + 0x73, 0x69, 0x67, 0x6e, 0x42, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x42, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x70, 0x0a, 0x0b, 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x42, 0x65, 0x64, 0x12, 0x2e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x73, + 0x73, 0x69, 0x67, 0x6e, 0x42, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x73, + 0x73, 0x69, 0x67, 0x6e, 0x42, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x7f, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x50, 0x61, + 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x50, 0x61, 0x74, 0x69, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x68, 0x61, 0x72, 0x67, + 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, + 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, - 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x50, - 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, - 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x09, 0x41, 0x73, 0x73, - 0x69, 0x67, 0x6e, 0x42, 0x65, 0x64, 0x12, 0x2c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x42, 0x65, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x42, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x70, 0x0a, 0x0b, 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, - 0x6e, 0x42, 0x65, 0x64, 0x12, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x42, 0x65, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x42, 0x65, 0x64, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7f, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x63, 0x68, - 0x61, 0x72, 0x67, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x68, 0x61, 0x72, - 0x67, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, - 0x73, 0x63, 0x68, 0x61, 0x72, 0x67, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, - 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x34, + 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, - 0x0e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x61, + 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x74, - 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, - 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x79, 0x0a, 0x0e, 0x52, 0x65, 0x61, 0x64, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, - 0x6e, 0x74, 0x12, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x61, 0x64, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, + 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, + 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x74, + 0x69, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, + 0x65, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xd5, 0x01, 0x0a, 0x1e, - 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x0f, - 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x76, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x1b, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2d, 0x73, 0x76, 0x63, 0xa2, 0x02, - 0x03, 0x50, 0x53, 0x54, 0xaa, 0x02, 0x19, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x19, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x5c, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x54, 0x61, - 0x73, 0x6b, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x0e, 0x52, 0x65, + 0x61, 0x64, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x31, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, + 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x6d, 0x69, + 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, + 0x64, 0x6d, 0x69, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xd5, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, + 0x74, 0x53, 0x76, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1b, 0x67, 0x65, 0x6e, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, + 0x74, 0x61, 0x73, 0x6b, 0x2d, 0x73, 0x76, 0x63, 0xa2, 0x02, 0x03, 0x50, 0x53, 0x54, 0xaa, 0x02, + 0x19, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x54, 0x61, 0x73, 0x6b, + 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5c, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x1c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x3a, 0x3a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4036,6 +4038,7 @@ func file_proto_services_task_svc_v1_patient_svc_proto_init() { file_proto_services_task_svc_v1_patient_svc_proto_msgTypes[24].OneofWrappers = []interface{}{} file_proto_services_task_svc_v1_patient_svc_proto_msgTypes[30].OneofWrappers = []interface{}{} file_proto_services_task_svc_v1_patient_svc_proto_msgTypes[32].OneofWrappers = []interface{}{} + file_proto_services_task_svc_v1_patient_svc_proto_msgTypes[39].OneofWrappers = []interface{}{} file_proto_services_task_svc_v1_patient_svc_proto_msgTypes[45].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/gen/go/proto/services/task_svc/v1/task_svc.pb.go b/gen/go/proto/services/task_svc/v1/task_svc.pb.go index 6155abd9b..7330c1fd5 100644 --- a/gen/go/proto/services/task_svc/v1/task_svc.pb.go +++ b/gen/go/proto/services/task_svc/v1/task_svc.pb.go @@ -2068,7 +2068,7 @@ type GetTasksByPatientResponse_Task struct { Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Status TaskStatus `protobuf:"varint,4,opt,name=status,proto3,enum=proto.services.task_svc.v1.TaskStatus" json:"status,omitempty"` - AssignedUserId string `protobuf:"bytes,5,opt,name=assigned_user_id,json=assignedUserId,proto3" json:"assigned_user_id,omitempty"` + AssignedUserId *string `protobuf:"bytes,5,opt,name=assigned_user_id,json=assignedUserId,proto3,oneof" json:"assigned_user_id,omitempty"` PatientId string `protobuf:"bytes,6,opt,name=patient_id,json=patientId,proto3" json:"patient_id,omitempty"` Public bool `protobuf:"varint,7,opt,name=public,proto3" json:"public,omitempty"` DueAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=due_at,json=dueAt,proto3" json:"due_at,omitempty"` @@ -2137,8 +2137,8 @@ func (x *GetTasksByPatientResponse_Task) GetStatus() TaskStatus { } func (x *GetTasksByPatientResponse_Task) GetAssignedUserId() string { - if x != nil { - return x.AssignedUserId + if x != nil && x.AssignedUserId != nil { + return *x.AssignedUserId } return "" } @@ -2257,7 +2257,7 @@ type GetTasksByPatientSortedByStatusResponse_Task struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - AssignedUserId string `protobuf:"bytes,5,opt,name=assigned_user_id,json=assignedUserId,proto3" json:"assigned_user_id,omitempty"` + AssignedUserId *string `protobuf:"bytes,5,opt,name=assigned_user_id,json=assignedUserId,proto3,oneof" json:"assigned_user_id,omitempty"` PatientId string `protobuf:"bytes,6,opt,name=patient_id,json=patientId,proto3" json:"patient_id,omitempty"` Public bool `protobuf:"varint,7,opt,name=public,proto3" json:"public,omitempty"` DueAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=due_at,json=dueAt,proto3" json:"due_at,omitempty"` @@ -2319,8 +2319,8 @@ func (x *GetTasksByPatientSortedByStatusResponse_Task) GetDescription() string { } func (x *GetTasksByPatientSortedByStatusResponse_Task) GetAssignedUserId() string { - if x != nil { - return x.AssignedUserId + if x != nil && x.AssignedUserId != nil { + return *x.AssignedUserId } return "" } @@ -2753,14 +2753,14 @@ var file_proto_services_task_svc_v1_task_svc_proto_rawDesc = []byte{ 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, 0x69, - 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xf1, 0x04, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, + 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x8b, 0x05, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, - 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x81, 0x04, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, + 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x9b, 0x04, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, @@ -2769,377 +2769,380 @@ var file_proto_services_task_svc_v1_task_svc_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x31, 0x0a, 0x06, 0x64, 0x75, 0x65, 0x5f, 0x61, 0x74, 0x18, - 0x08, 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, 0x52, 0x05, 0x64, 0x75, 0x65, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x5e, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, - 0x73, 0x6b, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, - 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x73, - 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x60, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x22, 0x47, 0x0a, 0x26, 0x47, 0x65, 0x74, - 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, - 0x72, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, - 0x49, 0x64, 0x22, 0xa2, 0x06, 0x0a, 0x27, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, - 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x42, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, - 0x0a, 0x04, 0x74, 0x6f, 0x64, 0x6f, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, - 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, - 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x65, - 0x64, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x74, 0x6f, 0x64, 0x6f, 0x12, 0x69, 0x0a, 0x0b, - 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x48, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, - 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x69, 0x6e, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x5c, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, - 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x1a, 0xcf, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1d, - 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, - 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x31, 0x0a, 0x06, 0x64, 0x75, 0x65, 0x5f, 0x61, 0x74, 0x18, - 0x08, 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, 0x52, 0x05, 0x64, 0x75, 0x65, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x6c, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, - 0x73, 0x6b, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x2d, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x0e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, + 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, + 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x31, 0x0a, 0x06, 0x64, 0x75, + 0x65, 0x5f, 0x61, 0x74, 0x18, 0x08, 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, 0x52, 0x05, 0x64, 0x75, 0x65, 0x41, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x5e, 0x0a, 0x08, + 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x75, 0x62, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x60, 0x0a, 0x07, + 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, + 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x42, 0x13, + 0x0a, 0x11, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, + 0x5f, 0x69, 0x64, 0x22, 0x47, 0x0a, 0x26, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x42, 0x79, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, - 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x73, 0x75, 0x62, - 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x60, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x41, 0x73, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0xdb, 0x05, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4f, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xbc, 0x06, 0x0a, + 0x27, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, + 0x6e, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x04, 0x74, 0x6f, 0x64, 0x6f, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, + 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, + 0x52, 0x04, 0x74, 0x6f, 0x64, 0x6f, 0x12, 0x69, 0x0a, 0x0b, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, + 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, + 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x5c, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x48, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, + 0x72, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x1a, + 0xe9, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2d, + 0x0a, 0x10, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, + 0x0a, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x12, 0x31, 0x0a, 0x06, 0x64, 0x75, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x08, + 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, + 0x52, 0x05, 0x64, 0x75, 0x65, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x6c, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, + 0x6b, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, + 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, + 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, + 0x73, 0x6b, 0x2e, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x73, 0x75, 0x62, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x1a, 0x60, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x42, 0x13, 0x0a, 0x11, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xdb, 0x05, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x41, 0x73, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, + 0x61, 0x73, 0x6b, 0x73, 0x1a, 0xed, 0x04, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x5b, 0x0a, + 0x07, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, - 0x1a, 0xed, 0x04, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x26, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x28, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x73, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x5b, 0x0a, 0x07, 0x70, 0x61, 0x74, - 0x69, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, - 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x70, - 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x31, - 0x0a, 0x06, 0x64, 0x75, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x08, 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, 0x52, 0x05, 0x64, 0x75, 0x65, 0x41, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, - 0x12, 0x5d, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x0a, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x53, 0x75, - 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x1a, - 0x2d, 0x0a, 0x07, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x60, - 0x0a, 0x07, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, - 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, - 0x22, 0xe7, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x12, - 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x06, 0x64, 0x75, 0x65, 0x5f, 0x61, 0x74, - 0x18, 0x04, 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, 0x02, 0x52, 0x05, 0x64, 0x75, 0x65, 0x41, 0x74, 0x88, 0x01, 0x01, 0x12, 0x1b, - 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x03, - 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, 0x75, 0x65, 0x5f, 0x61, 0x74, 0x42, - 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x22, 0x14, 0x0a, 0x12, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x62, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, - 0x49, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x48, 0x00, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, 0x5f, - 0x64, 0x6f, 0x6e, 0x65, 0x22, 0x24, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x53, 0x75, 0x62, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x26, 0x0a, 0x14, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x75, 0x62, 0x54, - 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x48, 0x0a, 0x14, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, 0x42, 0x07, 0x0a, 0x05, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, - 0x0a, 0x14, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x52, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x2e, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, + 0x74, 0x52, 0x07, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x12, 0x31, 0x0a, 0x06, 0x64, 0x75, 0x65, 0x5f, 0x61, 0x74, 0x18, 0x08, 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, 0x52, 0x05, + 0x64, 0x75, 0x65, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x62, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x42, 0x79, 0x12, 0x5d, 0x0a, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, 0x73, 0x6b, 0x73, + 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x2e, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x73, 0x75, 0x62, 0x74, 0x61, + 0x73, 0x6b, 0x73, 0x1a, 0x2d, 0x0a, 0x07, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x1a, 0x60, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x42, 0x79, 0x22, 0xe7, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x88, 0x01, 0x01, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x06, 0x64, 0x75, + 0x65, 0x5f, 0x61, 0x74, 0x18, 0x04, 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, 0x02, 0x52, 0x05, 0x64, 0x75, 0x65, 0x41, 0x74, 0x88, + 0x01, 0x01, 0x12, 0x1b, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x03, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x64, 0x75, 0x65, + 0x5f, 0x61, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x22, 0x14, + 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x53, 0x75, 0x62, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, + 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x42, + 0x07, 0x0a, 0x05, 0x5f, 0x64, 0x6f, 0x6e, 0x65, 0x22, 0x24, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x53, + 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x26, + 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, - 0x6b, 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x26, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x48, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x54, 0x61, - 0x73, 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x23, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, - 0x6f, 0x44, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x17, 0x54, - 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, 0x01, 0x01, + 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x26, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, + 0x6f, 0x44, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x75, + 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, + 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x53, + 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, 0x6f, + 0x44, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x54, 0x61, 0x73, + 0x6b, 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x29, 0x0a, 0x17, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x54, 0x61, + 0x73, 0x6b, 0x54, 0x6f, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, + 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x54, + 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x42, 0x0a, 0x17, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x54, + 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, + 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, + 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x2d, 0x0a, 0x1b, 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, + 0x6b, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x1e, 0x0a, 0x1c, 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, 0x6b, + 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x24, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, - 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x23, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x54, - 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, - 0x17, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, - 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x54, - 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2d, 0x0a, - 0x1b, 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x72, 0x6f, - 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1e, 0x0a, 0x1c, - 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x72, 0x6f, 0x6d, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x0a, 0x12, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, - 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x14, 0x55, 0x6e, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x17, 0x0a, 0x15, 0x55, 0x6e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, - 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x0a, 0x11, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x72, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x54, 0x4f, 0x44, 0x4f, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, - 0x53, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x32, 0x9c, 0x12, 0x0a, 0x0b, 0x54, 0x61, - 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x0a, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, - 0x61, 0x73, 0x6b, 0x12, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x82, - 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, - 0x69, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, 0x72, 0x6f, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, + 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, + 0x14, 0x55, 0x6e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x55, 0x6e, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, + 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x72, 0x0a, 0x0a, 0x54, 0x61, 0x73, + 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x41, 0x53, 0x4b, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x54, 0x4f, 0x44, 0x4f, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x41, + 0x53, 0x4b, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x50, 0x52, 0x4f, + 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x53, 0x4b, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x32, 0x9c, 0x12, + 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, + 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2d, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, - 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0xac, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x42, - 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x42, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x64, 0x0a, 0x07, + 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, - 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x70, 0x72, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, + 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, + 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, + 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xac, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x72, + 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x42, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x72, 0x74, 0x65, 0x64, - 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x7f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, - 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, - 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x69, - 0x67, 0x6e, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, - 0x6b, 0x12, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, - 0x64, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, - 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, - 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, - 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, 0x6f, - 0x44, 0x6f, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x53, 0x75, 0x62, - 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, + 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x43, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x73, 0x42, 0x79, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x6f, + 0x72, 0x74, 0x65, 0x64, 0x42, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, - 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, - 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, - 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, - 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x12, - 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x7f, 0x0a, 0x10, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, + 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x73, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x49, 0x6e, 0x50, - 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x12, - 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, - 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x7f, 0x0a, 0x10, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x53, 0x75, 0x62, + 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x55, 0x73, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, - 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, - 0x6b, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x8b, 0x01, 0x0a, 0x14, 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, - 0x73, 0x6b, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x37, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, - 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, - 0x54, 0x61, 0x73, 0x6b, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x72, 0x6f, - 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x70, 0x0a, 0x0b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2e, + 0x2e, 0x41, 0x64, 0x64, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, + 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, + 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x75, 0x62, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, + 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, + 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, 0x6f, 0x44, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, + 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, + 0x6f, 0x44, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, + 0x0d, 0x53, 0x75, 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x55, 0x6e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x62, 0x54, + 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, + 0x62, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, + 0x6f, 0x44, 0x6f, 0x12, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x6e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x55, 0x6e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x54, 0x6f, 0x44, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x7f, 0x0a, 0x10, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x49, 0x6e, + 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, + 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x49, 0x6e, 0x50, 0x72, + 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, + 0x6f, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x44, + 0x6f, 0x6e, 0x65, 0x12, 0x2d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x7f, 0x0a, 0x10, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, + 0x73, 0x6b, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x33, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, + 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, 0x6b, + 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, + 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x6f, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8b, 0x01, 0x0a, 0x14, 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, + 0x67, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x12, 0x37, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x73, + 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, + 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x54, 0x61, 0x73, + 0x6b, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x70, 0x0a, 0x0b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, + 0x73, 0x6b, 0x12, 0x2e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x76, 0x0a, 0x0d, 0x55, 0x6e, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x73, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x30, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xd2, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x54, 0x61, 0x73, - 0x6b, 0x53, 0x76, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1b, 0x67, 0x65, 0x6e, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, - 0x74, 0x61, 0x73, 0x6b, 0x2d, 0x73, 0x76, 0x63, 0xa2, 0x02, 0x03, 0x50, 0x53, 0x54, 0xaa, 0x02, - 0x19, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x50, 0x72, 0x6f, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, + 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6d, 0x0a, + 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x2d, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, + 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, + 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0xd2, 0x01, 0x0a, + 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42, + 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x1b, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2f, 0x74, 0x61, 0x73, 0x6b, 0x2d, 0x73, 0x76, 0x63, 0xa2, 0x02, 0x03, 0x50, + 0x53, 0x54, 0xaa, 0x02, 0x19, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x19, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, + 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x54, 0x61, 0x73, 0x6b, - 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5c, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5c, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x1c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x3a, 0x3a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x1c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x3a, 0x3a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x76, 0x63, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3849,6 +3852,8 @@ func file_proto_services_task_svc_v1_task_svc_proto_init() { file_proto_services_task_svc_v1_task_svc_proto_msgTypes[10].OneofWrappers = []interface{}{} file_proto_services_task_svc_v1_task_svc_proto_msgTypes[12].OneofWrappers = []interface{}{} file_proto_services_task_svc_v1_task_svc_proto_msgTypes[16].OneofWrappers = []interface{}{} + file_proto_services_task_svc_v1_task_svc_proto_msgTypes[40].OneofWrappers = []interface{}{} + file_proto_services_task_svc_v1_task_svc_proto_msgTypes[42].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/gen/python/proto/services/task_svc/v1/patient_svc_pb2.py b/gen/python/proto/services/task_svc/v1/patient_svc_pb2.py index 8a91cacdd..dd9ddee79 100644 --- a/gen/python/proto/services/task_svc/v1/patient_svc_pb2.py +++ b/gen/python/proto/services/task_svc/v1/patient_svc_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,proto/services/task_svc/v1/patient_svc.proto\x12\x1aproto.services.task_svc.v1\"h\n\x14\x43reatePatientRequest\x12:\n\x19human_readable_identifier\x18\x01 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x02 \x01(\tR\x05notes\"\'\n\x15\x43reatePatientResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"#\n\x11GetPatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xe9\x03\n\x12GetPatientResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12\x1e\n\x06\x62\x65\x64_id\x18\x04 \x01(\tB\x02\x18\x01H\x00R\x05\x62\x65\x64Id\x88\x01\x01\x12 \n\x07ward_id\x18\x05 \x01(\tB\x02\x18\x01H\x01R\x06wardId\x88\x01\x01\x12L\n\x04room\x18\x07 \x01(\x0b\x32\x33.proto.services.task_svc.v1.GetPatientResponse.RoomH\x02R\x04room\x88\x01\x01\x12I\n\x03\x62\x65\x64\x18\x08 \x01(\x0b\x32\x32.proto.services.task_svc.v1.GetPatientResponse.BedH\x03R\x03\x62\x65\x64\x88\x01\x01\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04nameB\t\n\x07_bed_idB\n\n\x08_ward_idB\x07\n\x05_roomB\x06\n\x04_bed\"&\n\x14\x44\x65letePatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15\x44\x65letePatientResponse\"/\n\x16GetPatientByBedRequest\x12\x15\n\x06\x62\x65\x64_id\x18\x01 \x01(\tR\x05\x62\x65\x64Id\"\xa2\x01\n\x17GetPatientByBedResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12\x1a\n\x06\x62\x65\x64_id\x18\x04 \x01(\tH\x00R\x05\x62\x65\x64Id\x88\x01\x01\x42\t\n\x07_bed_id\"3\n\x18GetPatientsByWardRequest\x12\x17\n\x07ward_id\x18\x01 \x01(\tR\x06wardId\"\x8b\x02\n\x19GetPatientsByWardResponse\x12Y\n\x08patients\x18\x01 \x03(\x0b\x32=.proto.services.task_svc.v1.GetPatientsByWardResponse.PatientR\x08patients\x1a\x92\x01\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12\x1a\n\x06\x62\x65\x64_id\x18\x04 \x01(\tH\x00R\x05\x62\x65\x64Id\x88\x01\x01\x42\t\n\x07_bed_id\"<\n!GetPatientAssignmentByWardRequest\x12\x17\n\x07ward_id\x18\x01 \x01(\tR\x06wardId\"\xe0\x03\n\"GetPatientAssignmentByWardResponse\x12Y\n\x05rooms\x18\x01 \x03(\x0b\x32\x43.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse.RoomR\x05rooms\x1a\xde\x02\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12[\n\x04\x62\x65\x64s\x18\x03 \x03(\x0b\x32G.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse.Room.BedR\x04\x62\x65\x64s\x1a\xd4\x01\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12n\n\x07patient\x18\x03 \x01(\x0b\x32O.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse.Room.Bed.PatientH\x00R\x07patient\x88\x01\x01\x1a-\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04nameB\n\n\x08_patient\"\x1a\n\x18GetRecentPatientsRequest\"\x84\x04\n\x19GetRecentPatientsResponse\x12t\n\x0frecent_patients\x18\x01 \x03(\x0b\x32K.proto.services.task_svc.v1.GetRecentPatientsResponse.PatientWithRoomAndBedR\x0erecentPatients\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a\x80\x02\n\x15PatientWithRoomAndBed\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12N\n\x04room\x18\x03 \x01(\x0b\x32:.proto.services.task_svc.v1.GetRecentPatientsResponse.RoomR\x04room\x12K\n\x03\x62\x65\x64\x18\x04 \x01(\x0b\x32\x39.proto.services.task_svc.v1.GetRecentPatientsResponse.BedR\x03\x62\x65\x64\"\xaa\x01\n\x14UpdatePatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12?\n\x19human_readable_identifier\x18\x02 \x01(\tH\x00R\x17humanReadableIdentifier\x88\x01\x01\x12\x19\n\x05notes\x18\x03 \x01(\tH\x01R\x05notes\x88\x01\x01\x42\x1c\n\x1a_human_readable_identifierB\x08\n\x06_notes\"\x17\n\x15UpdatePatientResponse\"9\n\x10\x41ssignBedRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62\x65\x64_id\x18\x02 \x01(\tR\x05\x62\x65\x64Id\"\x13\n\x11\x41ssignBedResponse\"$\n\x12UnassignBedRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x15\n\x13UnassignBedResponse\")\n\x17\x44ischargePatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x1a\n\x18\x44ischargePatientResponse\"*\n\x18GetPatientDetailsRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xda\x08\n\x19GetPatientDetailsResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12:\n\x19human_readable_identifier\x18\x03 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x04 \x01(\tR\x05notes\x12P\n\x05tasks\x18\x05 \x03(\x0b\x32:.proto.services.task_svc.v1.GetPatientDetailsResponse.TaskR\x05tasks\x12 \n\x07ward_id\x18\x06 \x01(\tB\x02\x18\x01H\x00R\x06wardId\x88\x01\x01\x12S\n\x04room\x18\x07 \x01(\x0b\x32:.proto.services.task_svc.v1.GetPatientDetailsResponse.RoomH\x01R\x04room\x88\x01\x01\x12P\n\x03\x62\x65\x64\x18\x08 \x01(\x0b\x32\x39.proto.services.task_svc.v1.GetPatientDetailsResponse.BedH\x02R\x03\x62\x65\x64\x88\x01\x01\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a\xaa\x03\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12X\n\x06status\x18\x04 \x01(\x0e\x32@.proto.services.task_svc.v1.GetPatientDetailsResponse.TaskStatusR\x06status\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12^\n\x08subtasks\x18\x08 \x03(\x0b\x32\x42.proto.services.task_svc.v1.GetPatientDetailsResponse.Task.SubTaskR\x08subtasks\x1a\x41\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\"r\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x14\n\x10TASK_STATUS_TODO\x10\x01\x12\x1b\n\x17TASK_STATUS_IN_PROGRESS\x10\x02\x12\x14\n\x10TASK_STATUS_DONE\x10\x03\x42\n\n\x08_ward_idB\x07\n\x05_roomB\x06\n\x04_bed\"A\n\x15GetPatientListRequest\x12\x1c\n\x07ward_id\x18\x01 \x01(\tH\x00R\x06wardId\x88\x01\x01\x42\n\n\x08_ward_id\"\x98\x0c\n\x16GetPatientListResponse\x12`\n\x06\x61\x63tive\x18\x01 \x03(\x0b\x32H.proto.services.task_svc.v1.GetPatientListResponse.PatientWithRoomAndBedR\x06\x61\x63tive\x12k\n\x13unassigned_patients\x18\x02 \x03(\x0b\x32:.proto.services.task_svc.v1.GetPatientListResponse.PatientR\x12unassignedPatients\x12k\n\x13\x64ischarged_patients\x18\x03 \x03(\x0b\x32:.proto.services.task_svc.v1.GetPatientListResponse.PatientR\x12\x64ischargedPatients\x1a\xba\x01\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12M\n\x05tasks\x18\x04 \x03(\x0b\x32\x37.proto.services.task_svc.v1.GetPatientListResponse.TaskR\x05tasks\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a\xdf\x02\n\x15PatientWithRoomAndBed\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12K\n\x04room\x18\x03 \x01(\x0b\x32\x37.proto.services.task_svc.v1.GetPatientListResponse.RoomR\x04room\x12H\n\x03\x62\x65\x64\x18\x04 \x01(\x0b\x32\x36.proto.services.task_svc.v1.GetPatientListResponse.BedR\x03\x62\x65\x64\x12\x14\n\x05notes\x18\x05 \x01(\tR\x05notes\x12M\n\x05tasks\x18\x06 \x03(\x0b\x32\x37.proto.services.task_svc.v1.GetPatientListResponse.TaskR\x05tasks\x1a\xbe\x03\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12U\n\x06status\x18\x04 \x01(\x0e\x32=.proto.services.task_svc.v1.GetPatientListResponse.TaskStatusR\x06status\x12-\n\x10\x61ssigned_user_id\x18\x05 \x01(\tH\x00R\x0e\x61ssignedUserId\x88\x01\x01\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12[\n\x08subtasks\x18\x08 \x03(\x0b\x32?.proto.services.task_svc.v1.GetPatientListResponse.Task.SubTaskR\x08subtasks\x1a\x41\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64oneB\x13\n\x11_assigned_user_id\"r\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x14\n\x10TASK_STATUS_TODO\x10\x01\x12\x1b\n\x17TASK_STATUS_IN_PROGRESS\x10\x02\x12\x14\n\x10TASK_STATUS_DONE\x10\x03\"6\n\x15ReadmitPatientRequest\x12\x1d\n\npatient_id\x18\x01 \x01(\tR\tpatientId\"\x18\n\x16ReadmitPatientResponse2\xe9\r\n\x0ePatientService\x12v\n\rCreatePatient\x12\x30.proto.services.task_svc.v1.CreatePatientRequest\x1a\x31.proto.services.task_svc.v1.CreatePatientResponse\"\x00\x12m\n\nGetPatient\x12-.proto.services.task_svc.v1.GetPatientRequest\x1a..proto.services.task_svc.v1.GetPatientResponse\"\x00\x12|\n\x0fGetPatientByBed\x12\x32.proto.services.task_svc.v1.GetPatientByBedRequest\x1a\x33.proto.services.task_svc.v1.GetPatientByBedResponse\"\x00\x12\x82\x01\n\x11GetPatientsByWard\x12\x34.proto.services.task_svc.v1.GetPatientsByWardRequest\x1a\x35.proto.services.task_svc.v1.GetPatientsByWardResponse\"\x00\x12\x9d\x01\n\x1aGetPatientAssignmentByWard\x12=.proto.services.task_svc.v1.GetPatientAssignmentByWardRequest\x1a>.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse\"\x00\x12\x82\x01\n\x11GetRecentPatients\x12\x34.proto.services.task_svc.v1.GetRecentPatientsRequest\x1a\x35.proto.services.task_svc.v1.GetRecentPatientsResponse\"\x00\x12v\n\rUpdatePatient\x12\x30.proto.services.task_svc.v1.UpdatePatientRequest\x1a\x31.proto.services.task_svc.v1.UpdatePatientResponse\"\x00\x12j\n\tAssignBed\x12,.proto.services.task_svc.v1.AssignBedRequest\x1a-.proto.services.task_svc.v1.AssignBedResponse\"\x00\x12p\n\x0bUnassignBed\x12..proto.services.task_svc.v1.UnassignBedRequest\x1a/.proto.services.task_svc.v1.UnassignBedResponse\"\x00\x12\x7f\n\x10\x44ischargePatient\x12\x33.proto.services.task_svc.v1.DischargePatientRequest\x1a\x34.proto.services.task_svc.v1.DischargePatientResponse\"\x00\x12\x82\x01\n\x11GetPatientDetails\x12\x34.proto.services.task_svc.v1.GetPatientDetailsRequest\x1a\x35.proto.services.task_svc.v1.GetPatientDetailsResponse\"\x00\x12y\n\x0eGetPatientList\x12\x31.proto.services.task_svc.v1.GetPatientListRequest\x1a\x32.proto.services.task_svc.v1.GetPatientListResponse\"\x00\x12v\n\rDeletePatient\x12\x30.proto.services.task_svc.v1.DeletePatientRequest\x1a\x31.proto.services.task_svc.v1.DeletePatientResponse\"\x00\x12y\n\x0eReadmitPatient\x12\x31.proto.services.task_svc.v1.ReadmitPatientRequest\x1a\x32.proto.services.task_svc.v1.ReadmitPatientResponse\"\x00\x42\xd5\x01\n\x1e\x63om.proto.services.task_svc.v1B\x0fPatientSvcProtoP\x01Z\x1bgen/proto/services/task-svc\xa2\x02\x03PST\xaa\x02\x19Proto.Services.TaskSvc.V1\xca\x02\x19Proto\\Services\\TaskSvc\\V1\xe2\x02%Proto\\Services\\TaskSvc\\V1\\GPBMetadata\xea\x02\x1cProto::Services::TaskSvc::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,proto/services/task_svc/v1/patient_svc.proto\x12\x1aproto.services.task_svc.v1\"h\n\x14\x43reatePatientRequest\x12:\n\x19human_readable_identifier\x18\x01 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x02 \x01(\tR\x05notes\"\'\n\x15\x43reatePatientResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"#\n\x11GetPatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xe9\x03\n\x12GetPatientResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12\x1e\n\x06\x62\x65\x64_id\x18\x04 \x01(\tB\x02\x18\x01H\x00R\x05\x62\x65\x64Id\x88\x01\x01\x12 \n\x07ward_id\x18\x05 \x01(\tB\x02\x18\x01H\x01R\x06wardId\x88\x01\x01\x12L\n\x04room\x18\x07 \x01(\x0b\x32\x33.proto.services.task_svc.v1.GetPatientResponse.RoomH\x02R\x04room\x88\x01\x01\x12I\n\x03\x62\x65\x64\x18\x08 \x01(\x0b\x32\x32.proto.services.task_svc.v1.GetPatientResponse.BedH\x03R\x03\x62\x65\x64\x88\x01\x01\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04nameB\t\n\x07_bed_idB\n\n\x08_ward_idB\x07\n\x05_roomB\x06\n\x04_bed\"&\n\x14\x44\x65letePatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15\x44\x65letePatientResponse\"/\n\x16GetPatientByBedRequest\x12\x15\n\x06\x62\x65\x64_id\x18\x01 \x01(\tR\x05\x62\x65\x64Id\"\xa2\x01\n\x17GetPatientByBedResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12\x1a\n\x06\x62\x65\x64_id\x18\x04 \x01(\tH\x00R\x05\x62\x65\x64Id\x88\x01\x01\x42\t\n\x07_bed_id\"3\n\x18GetPatientsByWardRequest\x12\x17\n\x07ward_id\x18\x01 \x01(\tR\x06wardId\"\x8b\x02\n\x19GetPatientsByWardResponse\x12Y\n\x08patients\x18\x01 \x03(\x0b\x32=.proto.services.task_svc.v1.GetPatientsByWardResponse.PatientR\x08patients\x1a\x92\x01\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12\x1a\n\x06\x62\x65\x64_id\x18\x04 \x01(\tH\x00R\x05\x62\x65\x64Id\x88\x01\x01\x42\t\n\x07_bed_id\"<\n!GetPatientAssignmentByWardRequest\x12\x17\n\x07ward_id\x18\x01 \x01(\tR\x06wardId\"\xe0\x03\n\"GetPatientAssignmentByWardResponse\x12Y\n\x05rooms\x18\x01 \x03(\x0b\x32\x43.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse.RoomR\x05rooms\x1a\xde\x02\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12[\n\x04\x62\x65\x64s\x18\x03 \x03(\x0b\x32G.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse.Room.BedR\x04\x62\x65\x64s\x1a\xd4\x01\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12n\n\x07patient\x18\x03 \x01(\x0b\x32O.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse.Room.Bed.PatientH\x00R\x07patient\x88\x01\x01\x1a-\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04nameB\n\n\x08_patient\"\x1a\n\x18GetRecentPatientsRequest\"\x84\x04\n\x19GetRecentPatientsResponse\x12t\n\x0frecent_patients\x18\x01 \x03(\x0b\x32K.proto.services.task_svc.v1.GetRecentPatientsResponse.PatientWithRoomAndBedR\x0erecentPatients\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a\x80\x02\n\x15PatientWithRoomAndBed\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12N\n\x04room\x18\x03 \x01(\x0b\x32:.proto.services.task_svc.v1.GetRecentPatientsResponse.RoomR\x04room\x12K\n\x03\x62\x65\x64\x18\x04 \x01(\x0b\x32\x39.proto.services.task_svc.v1.GetRecentPatientsResponse.BedR\x03\x62\x65\x64\"\xaa\x01\n\x14UpdatePatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12?\n\x19human_readable_identifier\x18\x02 \x01(\tH\x00R\x17humanReadableIdentifier\x88\x01\x01\x12\x19\n\x05notes\x18\x03 \x01(\tH\x01R\x05notes\x88\x01\x01\x42\x1c\n\x1a_human_readable_identifierB\x08\n\x06_notes\"\x17\n\x15UpdatePatientResponse\"9\n\x10\x41ssignBedRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62\x65\x64_id\x18\x02 \x01(\tR\x05\x62\x65\x64Id\"\x13\n\x11\x41ssignBedResponse\"$\n\x12UnassignBedRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x15\n\x13UnassignBedResponse\")\n\x17\x44ischargePatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x1a\n\x18\x44ischargePatientResponse\"*\n\x18GetPatientDetailsRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xf4\x08\n\x19GetPatientDetailsResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12:\n\x19human_readable_identifier\x18\x03 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x04 \x01(\tR\x05notes\x12P\n\x05tasks\x18\x05 \x03(\x0b\x32:.proto.services.task_svc.v1.GetPatientDetailsResponse.TaskR\x05tasks\x12 \n\x07ward_id\x18\x06 \x01(\tB\x02\x18\x01H\x00R\x06wardId\x88\x01\x01\x12S\n\x04room\x18\x07 \x01(\x0b\x32:.proto.services.task_svc.v1.GetPatientDetailsResponse.RoomH\x01R\x04room\x88\x01\x01\x12P\n\x03\x62\x65\x64\x18\x08 \x01(\x0b\x32\x39.proto.services.task_svc.v1.GetPatientDetailsResponse.BedH\x02R\x03\x62\x65\x64\x88\x01\x01\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a\xc4\x03\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12X\n\x06status\x18\x04 \x01(\x0e\x32@.proto.services.task_svc.v1.GetPatientDetailsResponse.TaskStatusR\x06status\x12-\n\x10\x61ssigned_user_id\x18\x05 \x01(\tH\x00R\x0e\x61ssignedUserId\x88\x01\x01\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12^\n\x08subtasks\x18\x08 \x03(\x0b\x32\x42.proto.services.task_svc.v1.GetPatientDetailsResponse.Task.SubTaskR\x08subtasks\x1a\x41\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64oneB\x13\n\x11_assigned_user_id\"r\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x14\n\x10TASK_STATUS_TODO\x10\x01\x12\x1b\n\x17TASK_STATUS_IN_PROGRESS\x10\x02\x12\x14\n\x10TASK_STATUS_DONE\x10\x03\x42\n\n\x08_ward_idB\x07\n\x05_roomB\x06\n\x04_bed\"A\n\x15GetPatientListRequest\x12\x1c\n\x07ward_id\x18\x01 \x01(\tH\x00R\x06wardId\x88\x01\x01\x42\n\n\x08_ward_id\"\x98\x0c\n\x16GetPatientListResponse\x12`\n\x06\x61\x63tive\x18\x01 \x03(\x0b\x32H.proto.services.task_svc.v1.GetPatientListResponse.PatientWithRoomAndBedR\x06\x61\x63tive\x12k\n\x13unassigned_patients\x18\x02 \x03(\x0b\x32:.proto.services.task_svc.v1.GetPatientListResponse.PatientR\x12unassignedPatients\x12k\n\x13\x64ischarged_patients\x18\x03 \x03(\x0b\x32:.proto.services.task_svc.v1.GetPatientListResponse.PatientR\x12\x64ischargedPatients\x1a\xba\x01\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12M\n\x05tasks\x18\x04 \x03(\x0b\x32\x37.proto.services.task_svc.v1.GetPatientListResponse.TaskR\x05tasks\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a\xdf\x02\n\x15PatientWithRoomAndBed\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12K\n\x04room\x18\x03 \x01(\x0b\x32\x37.proto.services.task_svc.v1.GetPatientListResponse.RoomR\x04room\x12H\n\x03\x62\x65\x64\x18\x04 \x01(\x0b\x32\x36.proto.services.task_svc.v1.GetPatientListResponse.BedR\x03\x62\x65\x64\x12\x14\n\x05notes\x18\x05 \x01(\tR\x05notes\x12M\n\x05tasks\x18\x06 \x03(\x0b\x32\x37.proto.services.task_svc.v1.GetPatientListResponse.TaskR\x05tasks\x1a\xbe\x03\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12U\n\x06status\x18\x04 \x01(\x0e\x32=.proto.services.task_svc.v1.GetPatientListResponse.TaskStatusR\x06status\x12-\n\x10\x61ssigned_user_id\x18\x05 \x01(\tH\x00R\x0e\x61ssignedUserId\x88\x01\x01\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12[\n\x08subtasks\x18\x08 \x03(\x0b\x32?.proto.services.task_svc.v1.GetPatientListResponse.Task.SubTaskR\x08subtasks\x1a\x41\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64oneB\x13\n\x11_assigned_user_id\"r\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x14\n\x10TASK_STATUS_TODO\x10\x01\x12\x1b\n\x17TASK_STATUS_IN_PROGRESS\x10\x02\x12\x14\n\x10TASK_STATUS_DONE\x10\x03\"6\n\x15ReadmitPatientRequest\x12\x1d\n\npatient_id\x18\x01 \x01(\tR\tpatientId\"\x18\n\x16ReadmitPatientResponse2\xe9\r\n\x0ePatientService\x12v\n\rCreatePatient\x12\x30.proto.services.task_svc.v1.CreatePatientRequest\x1a\x31.proto.services.task_svc.v1.CreatePatientResponse\"\x00\x12m\n\nGetPatient\x12-.proto.services.task_svc.v1.GetPatientRequest\x1a..proto.services.task_svc.v1.GetPatientResponse\"\x00\x12|\n\x0fGetPatientByBed\x12\x32.proto.services.task_svc.v1.GetPatientByBedRequest\x1a\x33.proto.services.task_svc.v1.GetPatientByBedResponse\"\x00\x12\x82\x01\n\x11GetPatientsByWard\x12\x34.proto.services.task_svc.v1.GetPatientsByWardRequest\x1a\x35.proto.services.task_svc.v1.GetPatientsByWardResponse\"\x00\x12\x9d\x01\n\x1aGetPatientAssignmentByWard\x12=.proto.services.task_svc.v1.GetPatientAssignmentByWardRequest\x1a>.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse\"\x00\x12\x82\x01\n\x11GetRecentPatients\x12\x34.proto.services.task_svc.v1.GetRecentPatientsRequest\x1a\x35.proto.services.task_svc.v1.GetRecentPatientsResponse\"\x00\x12v\n\rUpdatePatient\x12\x30.proto.services.task_svc.v1.UpdatePatientRequest\x1a\x31.proto.services.task_svc.v1.UpdatePatientResponse\"\x00\x12j\n\tAssignBed\x12,.proto.services.task_svc.v1.AssignBedRequest\x1a-.proto.services.task_svc.v1.AssignBedResponse\"\x00\x12p\n\x0bUnassignBed\x12..proto.services.task_svc.v1.UnassignBedRequest\x1a/.proto.services.task_svc.v1.UnassignBedResponse\"\x00\x12\x7f\n\x10\x44ischargePatient\x12\x33.proto.services.task_svc.v1.DischargePatientRequest\x1a\x34.proto.services.task_svc.v1.DischargePatientResponse\"\x00\x12\x82\x01\n\x11GetPatientDetails\x12\x34.proto.services.task_svc.v1.GetPatientDetailsRequest\x1a\x35.proto.services.task_svc.v1.GetPatientDetailsResponse\"\x00\x12y\n\x0eGetPatientList\x12\x31.proto.services.task_svc.v1.GetPatientListRequest\x1a\x32.proto.services.task_svc.v1.GetPatientListResponse\"\x00\x12v\n\rDeletePatient\x12\x30.proto.services.task_svc.v1.DeletePatientRequest\x1a\x31.proto.services.task_svc.v1.DeletePatientResponse\"\x00\x12y\n\x0eReadmitPatient\x12\x31.proto.services.task_svc.v1.ReadmitPatientRequest\x1a\x32.proto.services.task_svc.v1.ReadmitPatientResponse\"\x00\x42\xd5\x01\n\x1e\x63om.proto.services.task_svc.v1B\x0fPatientSvcProtoP\x01Z\x1bgen/proto/services/task-svc\xa2\x02\x03PST\xaa\x02\x19Proto.Services.TaskSvc.V1\xca\x02\x19Proto\\Services\\TaskSvc\\V1\xe2\x02%Proto\\Services\\TaskSvc\\V1\\GPBMetadata\xea\x02\x1cProto::Services::TaskSvc::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -93,39 +93,39 @@ _globals['_GETPATIENTDETAILSREQUEST']._serialized_start=2856 _globals['_GETPATIENTDETAILSREQUEST']._serialized_end=2898 _globals['_GETPATIENTDETAILSRESPONSE']._serialized_start=2901 - _globals['_GETPATIENTDETAILSRESPONSE']._serialized_end=4015 + _globals['_GETPATIENTDETAILSRESPONSE']._serialized_end=4041 _globals['_GETPATIENTDETAILSRESPONSE_ROOM']._serialized_start=600 _globals['_GETPATIENTDETAILSRESPONSE_ROOM']._serialized_end=667 _globals['_GETPATIENTDETAILSRESPONSE_BED']._serialized_start=669 _globals['_GETPATIENTDETAILSRESPONSE_BED']._serialized_end=710 _globals['_GETPATIENTDETAILSRESPONSE_TASK']._serialized_start=3444 - _globals['_GETPATIENTDETAILSRESPONSE_TASK']._serialized_end=3870 - _globals['_GETPATIENTDETAILSRESPONSE_TASK_SUBTASK']._serialized_start=3805 - _globals['_GETPATIENTDETAILSRESPONSE_TASK_SUBTASK']._serialized_end=3870 - _globals['_GETPATIENTDETAILSRESPONSE_TASKSTATUS']._serialized_start=3872 - _globals['_GETPATIENTDETAILSRESPONSE_TASKSTATUS']._serialized_end=3986 - _globals['_GETPATIENTLISTREQUEST']._serialized_start=4017 - _globals['_GETPATIENTLISTREQUEST']._serialized_end=4082 - _globals['_GETPATIENTLISTRESPONSE']._serialized_start=4085 - _globals['_GETPATIENTLISTRESPONSE']._serialized_end=5645 - _globals['_GETPATIENTLISTRESPONSE_PATIENT']._serialized_start=4428 - _globals['_GETPATIENTLISTRESPONSE_PATIENT']._serialized_end=4614 + _globals['_GETPATIENTDETAILSRESPONSE_TASK']._serialized_end=3896 + _globals['_GETPATIENTDETAILSRESPONSE_TASK_SUBTASK']._serialized_start=3810 + _globals['_GETPATIENTDETAILSRESPONSE_TASK_SUBTASK']._serialized_end=3875 + _globals['_GETPATIENTDETAILSRESPONSE_TASKSTATUS']._serialized_start=3898 + _globals['_GETPATIENTDETAILSRESPONSE_TASKSTATUS']._serialized_end=4012 + _globals['_GETPATIENTLISTREQUEST']._serialized_start=4043 + _globals['_GETPATIENTLISTREQUEST']._serialized_end=4108 + _globals['_GETPATIENTLISTRESPONSE']._serialized_start=4111 + _globals['_GETPATIENTLISTRESPONSE']._serialized_end=5671 + _globals['_GETPATIENTLISTRESPONSE_PATIENT']._serialized_start=4454 + _globals['_GETPATIENTLISTRESPONSE_PATIENT']._serialized_end=4640 _globals['_GETPATIENTLISTRESPONSE_BED']._serialized_start=669 _globals['_GETPATIENTLISTRESPONSE_BED']._serialized_end=710 _globals['_GETPATIENTLISTRESPONSE_ROOM']._serialized_start=600 _globals['_GETPATIENTLISTRESPONSE_ROOM']._serialized_end=667 - _globals['_GETPATIENTLISTRESPONSE_PATIENTWITHROOMANDBED']._serialized_start=4729 - _globals['_GETPATIENTLISTRESPONSE_PATIENTWITHROOMANDBED']._serialized_end=5080 - _globals['_GETPATIENTLISTRESPONSE_TASK']._serialized_start=5083 - _globals['_GETPATIENTLISTRESPONSE_TASK']._serialized_end=5529 - _globals['_GETPATIENTLISTRESPONSE_TASK_SUBTASK']._serialized_start=3805 - _globals['_GETPATIENTLISTRESPONSE_TASK_SUBTASK']._serialized_end=3870 - _globals['_GETPATIENTLISTRESPONSE_TASKSTATUS']._serialized_start=3872 - _globals['_GETPATIENTLISTRESPONSE_TASKSTATUS']._serialized_end=3986 - _globals['_READMITPATIENTREQUEST']._serialized_start=5647 - _globals['_READMITPATIENTREQUEST']._serialized_end=5701 - _globals['_READMITPATIENTRESPONSE']._serialized_start=5703 - _globals['_READMITPATIENTRESPONSE']._serialized_end=5727 - _globals['_PATIENTSERVICE']._serialized_start=5730 - _globals['_PATIENTSERVICE']._serialized_end=7499 + _globals['_GETPATIENTLISTRESPONSE_PATIENTWITHROOMANDBED']._serialized_start=4755 + _globals['_GETPATIENTLISTRESPONSE_PATIENTWITHROOMANDBED']._serialized_end=5106 + _globals['_GETPATIENTLISTRESPONSE_TASK']._serialized_start=5109 + _globals['_GETPATIENTLISTRESPONSE_TASK']._serialized_end=5555 + _globals['_GETPATIENTLISTRESPONSE_TASK_SUBTASK']._serialized_start=3810 + _globals['_GETPATIENTLISTRESPONSE_TASK_SUBTASK']._serialized_end=3875 + _globals['_GETPATIENTLISTRESPONSE_TASKSTATUS']._serialized_start=3898 + _globals['_GETPATIENTLISTRESPONSE_TASKSTATUS']._serialized_end=4012 + _globals['_READMITPATIENTREQUEST']._serialized_start=5673 + _globals['_READMITPATIENTREQUEST']._serialized_end=5727 + _globals['_READMITPATIENTRESPONSE']._serialized_start=5729 + _globals['_READMITPATIENTRESPONSE']._serialized_end=5753 + _globals['_PATIENTSERVICE']._serialized_start=5756 + _globals['_PATIENTSERVICE']._serialized_end=7525 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/proto/services/task_svc/v1/task_svc_pb2.py b/gen/python/proto/services/task_svc/v1/task_svc_pb2.py index 92af79f4e..1840d90a6 100644 --- a/gen/python/proto/services/task_svc/v1/task_svc_pb2.py +++ b/gen/python/proto/services/task_svc/v1/task_svc_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)proto/services/task_svc/v1/task_svc.proto\x12\x1aproto.services.task_svc.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaf\x02\n\x11\x43reateTaskRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12%\n\x0b\x64\x65scription\x18\x02 \x01(\tH\x00R\x0b\x64\x65scription\x88\x01\x01\x12\x1d\n\npatient_id\x18\x03 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x04 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12R\n\x0einitial_status\x18\x06 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusH\x01R\rinitialStatus\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x11\n\x0f_initial_status\"$\n\x12\x43reateTaskResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\" \n\x0eGetTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x85\x05\n\x0fGetTaskResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12>\n\x06status\x18\x04 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusR\x06status\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12M\n\x07patient\x18\x06 \x01(\x0b\x32\x33.proto.services.task_svc.v1.GetTaskResponse.PatientR\x07patient\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12O\n\x08subtasks\x18\n \x03(\x0b\x32\x33.proto.services.task_svc.v1.GetTaskResponse.SubTaskR\x08subtasks\x12\'\n\x0forganization_id\x18\x0b \x01(\tR\x0eorganizationId\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedBy\x1a-\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"9\n\x18GetTasksByPatientRequest\x12\x1d\n\npatient_id\x18\x01 \x01(\tR\tpatientId\"\xf1\x04\n\x19GetTasksByPatientResponse\x12P\n\x05tasks\x18\x01 \x03(\x0b\x32:.proto.services.task_svc.v1.GetTasksByPatientResponse.TaskR\x05tasks\x1a\x81\x04\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12>\n\x06status\x18\x04 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusR\x06status\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12^\n\x08subtasks\x18\n \x03(\x0b\x32\x42.proto.services.task_svc.v1.GetTasksByPatientResponse.Task.SubTaskR\x08subtasks\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedBy\"G\n&GetTasksByPatientSortedByStatusRequest\x12\x1d\n\npatient_id\x18\x01 \x01(\tR\tpatientId\"\xa2\x06\n\'GetTasksByPatientSortedByStatusResponse\x12\\\n\x04todo\x18\x01 \x03(\x0b\x32H.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.TaskR\x04todo\x12i\n\x0bin_progress\x18\x02 \x03(\x0b\x32H.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.TaskR\ninProgress\x12\\\n\x04\x64one\x18\x03 \x03(\x0b\x32H.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.TaskR\x04\x64one\x1a\xcf\x03\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12l\n\x08subtasks\x18\n \x03(\x0b\x32P.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.Task.SubTaskR\x08subtasks\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedBy\"\x19\n\x17GetAssignedTasksRequest\"\xdb\x05\n\x18GetAssignedTasksResponse\x12O\n\x05tasks\x18\x01 \x03(\x0b\x32\x39.proto.services.task_svc.v1.GetAssignedTasksResponse.TaskR\x05tasks\x1a\xed\x04\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12>\n\x06status\x18\x04 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusR\x06status\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12[\n\x07patient\x18\x06 \x01(\x0b\x32\x41.proto.services.task_svc.v1.GetAssignedTasksResponse.Task.PatientR\x07patient\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12]\n\x08subtasks\x18\n \x03(\x0b\x32\x41.proto.services.task_svc.v1.GetAssignedTasksResponse.Task.SubTaskR\x08subtasks\x1a-\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedBy\"\xe7\x01\n\x11UpdateTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n\x04name\x18\x02 \x01(\tH\x00R\x04name\x88\x01\x01\x12%\n\x0b\x64\x65scription\x18\x03 \x01(\tH\x01R\x0b\x64\x65scription\x88\x01\x01\x12\x36\n\x06\x64ue_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02R\x05\x64ueAt\x88\x01\x01\x12\x1b\n\x06public\x18\x05 \x01(\x08H\x03R\x06public\x88\x01\x01\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\t\n\x07_due_atB\t\n\x07_public\"\x14\n\x12UpdateTaskResponse\"b\n\x11\x41\x64\x64SubTaskRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x17\n\x07task_id\x18\x02 \x01(\tR\x06taskId\x12\x17\n\x04\x64one\x18\x03 \x01(\x08H\x00R\x04\x64one\x88\x01\x01\x42\x07\n\x05_done\"$\n\x12\x41\x64\x64SubTaskResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"&\n\x14RemoveSubTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15RemoveSubTaskResponse\"H\n\x14UpdateSubTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n\x04name\x18\x02 \x01(\tH\x00R\x04name\x88\x01\x01\x42\x07\n\x05_name\"\x17\n\x15UpdateSubTaskResponse\"&\n\x14SubTaskToToDoRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15SubTaskToToDoResponse\"&\n\x14SubTaskToDoneRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15SubTaskToDoneResponse\"#\n\x11TaskToToDoRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x14\n\x12TaskToToDoResponse\")\n\x17TaskToInProgressRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x1a\n\x18TaskToInProgressResponse\"#\n\x11TaskToDoneRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x14\n\x12TaskToDoneResponse\"B\n\x17\x41ssignTaskToUserRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n\x07user_id\x18\x02 \x01(\tR\x06userId\"\x1a\n\x18\x41ssignTaskToUserResponse\"-\n\x1bUnassignTaskFromUserRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x1e\n\x1cUnassignTaskFromUserResponse\"$\n\x12PublishTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x15\n\x13PublishTaskResponse\"&\n\x14UnpublishTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15UnpublishTaskResponse\"#\n\x11\x44\x65leteTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x14\n\x12\x44\x65leteTaskResponse*r\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x14\n\x10TASK_STATUS_TODO\x10\x01\x12\x1b\n\x17TASK_STATUS_IN_PROGRESS\x10\x02\x12\x14\n\x10TASK_STATUS_DONE\x10\x03\x32\x9c\x12\n\x0bTaskService\x12m\n\nCreateTask\x12-.proto.services.task_svc.v1.CreateTaskRequest\x1a..proto.services.task_svc.v1.CreateTaskResponse\"\x00\x12\x64\n\x07GetTask\x12*.proto.services.task_svc.v1.GetTaskRequest\x1a+.proto.services.task_svc.v1.GetTaskResponse\"\x00\x12\x82\x01\n\x11GetTasksByPatient\x12\x34.proto.services.task_svc.v1.GetTasksByPatientRequest\x1a\x35.proto.services.task_svc.v1.GetTasksByPatientResponse\"\x00\x12\xac\x01\n\x1fGetTasksByPatientSortedByStatus\x12\x42.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusRequest\x1a\x43.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse\"\x00\x12\x7f\n\x10GetAssignedTasks\x12\x33.proto.services.task_svc.v1.GetAssignedTasksRequest\x1a\x34.proto.services.task_svc.v1.GetAssignedTasksResponse\"\x00\x12m\n\nUpdateTask\x12-.proto.services.task_svc.v1.UpdateTaskRequest\x1a..proto.services.task_svc.v1.UpdateTaskResponse\"\x00\x12m\n\nAddSubTask\x12-.proto.services.task_svc.v1.AddSubTaskRequest\x1a..proto.services.task_svc.v1.AddSubTaskResponse\"\x00\x12v\n\rRemoveSubTask\x12\x30.proto.services.task_svc.v1.RemoveSubTaskRequest\x1a\x31.proto.services.task_svc.v1.RemoveSubTaskResponse\"\x00\x12v\n\rUpdateSubTask\x12\x30.proto.services.task_svc.v1.UpdateSubTaskRequest\x1a\x31.proto.services.task_svc.v1.UpdateSubTaskResponse\"\x00\x12v\n\rSubTaskToToDo\x12\x30.proto.services.task_svc.v1.SubTaskToToDoRequest\x1a\x31.proto.services.task_svc.v1.SubTaskToToDoResponse\"\x00\x12v\n\rSubTaskToDone\x12\x30.proto.services.task_svc.v1.SubTaskToDoneRequest\x1a\x31.proto.services.task_svc.v1.SubTaskToDoneResponse\"\x00\x12m\n\nTaskToToDo\x12-.proto.services.task_svc.v1.TaskToToDoRequest\x1a..proto.services.task_svc.v1.TaskToToDoResponse\"\x00\x12\x7f\n\x10TaskToInProgress\x12\x33.proto.services.task_svc.v1.TaskToInProgressRequest\x1a\x34.proto.services.task_svc.v1.TaskToInProgressResponse\"\x00\x12m\n\nTaskToDone\x12-.proto.services.task_svc.v1.TaskToDoneRequest\x1a..proto.services.task_svc.v1.TaskToDoneResponse\"\x00\x12\x7f\n\x10\x41ssignTaskToUser\x12\x33.proto.services.task_svc.v1.AssignTaskToUserRequest\x1a\x34.proto.services.task_svc.v1.AssignTaskToUserResponse\"\x00\x12\x8b\x01\n\x14UnassignTaskFromUser\x12\x37.proto.services.task_svc.v1.UnassignTaskFromUserRequest\x1a\x38.proto.services.task_svc.v1.UnassignTaskFromUserResponse\"\x00\x12p\n\x0bPublishTask\x12..proto.services.task_svc.v1.PublishTaskRequest\x1a/.proto.services.task_svc.v1.PublishTaskResponse\"\x00\x12v\n\rUnpublishTask\x12\x30.proto.services.task_svc.v1.UnpublishTaskRequest\x1a\x31.proto.services.task_svc.v1.UnpublishTaskResponse\"\x00\x12m\n\nDeleteTask\x12-.proto.services.task_svc.v1.DeleteTaskRequest\x1a..proto.services.task_svc.v1.DeleteTaskResponse\"\x00\x42\xd2\x01\n\x1e\x63om.proto.services.task_svc.v1B\x0cTaskSvcProtoP\x01Z\x1bgen/proto/services/task-svc\xa2\x02\x03PST\xaa\x02\x19Proto.Services.TaskSvc.V1\xca\x02\x19Proto\\Services\\TaskSvc\\V1\xe2\x02%Proto\\Services\\TaskSvc\\V1\\GPBMetadata\xea\x02\x1cProto::Services::TaskSvc::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)proto/services/task_svc/v1/task_svc.proto\x12\x1aproto.services.task_svc.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaf\x02\n\x11\x43reateTaskRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12%\n\x0b\x64\x65scription\x18\x02 \x01(\tH\x00R\x0b\x64\x65scription\x88\x01\x01\x12\x1d\n\npatient_id\x18\x03 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x04 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12R\n\x0einitial_status\x18\x06 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusH\x01R\rinitialStatus\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x11\n\x0f_initial_status\"$\n\x12\x43reateTaskResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\" \n\x0eGetTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x85\x05\n\x0fGetTaskResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12>\n\x06status\x18\x04 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusR\x06status\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12M\n\x07patient\x18\x06 \x01(\x0b\x32\x33.proto.services.task_svc.v1.GetTaskResponse.PatientR\x07patient\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12O\n\x08subtasks\x18\n \x03(\x0b\x32\x33.proto.services.task_svc.v1.GetTaskResponse.SubTaskR\x08subtasks\x12\'\n\x0forganization_id\x18\x0b \x01(\tR\x0eorganizationId\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedBy\x1a-\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"9\n\x18GetTasksByPatientRequest\x12\x1d\n\npatient_id\x18\x01 \x01(\tR\tpatientId\"\x8b\x05\n\x19GetTasksByPatientResponse\x12P\n\x05tasks\x18\x01 \x03(\x0b\x32:.proto.services.task_svc.v1.GetTasksByPatientResponse.TaskR\x05tasks\x1a\x9b\x04\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12>\n\x06status\x18\x04 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusR\x06status\x12-\n\x10\x61ssigned_user_id\x18\x05 \x01(\tH\x00R\x0e\x61ssignedUserId\x88\x01\x01\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12^\n\x08subtasks\x18\n \x03(\x0b\x32\x42.proto.services.task_svc.v1.GetTasksByPatientResponse.Task.SubTaskR\x08subtasks\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedByB\x13\n\x11_assigned_user_id\"G\n&GetTasksByPatientSortedByStatusRequest\x12\x1d\n\npatient_id\x18\x01 \x01(\tR\tpatientId\"\xbc\x06\n\'GetTasksByPatientSortedByStatusResponse\x12\\\n\x04todo\x18\x01 \x03(\x0b\x32H.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.TaskR\x04todo\x12i\n\x0bin_progress\x18\x02 \x03(\x0b\x32H.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.TaskR\ninProgress\x12\\\n\x04\x64one\x18\x03 \x03(\x0b\x32H.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.TaskR\x04\x64one\x1a\xe9\x03\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12-\n\x10\x61ssigned_user_id\x18\x05 \x01(\tH\x00R\x0e\x61ssignedUserId\x88\x01\x01\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12l\n\x08subtasks\x18\n \x03(\x0b\x32P.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.Task.SubTaskR\x08subtasks\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedByB\x13\n\x11_assigned_user_id\"\x19\n\x17GetAssignedTasksRequest\"\xdb\x05\n\x18GetAssignedTasksResponse\x12O\n\x05tasks\x18\x01 \x03(\x0b\x32\x39.proto.services.task_svc.v1.GetAssignedTasksResponse.TaskR\x05tasks\x1a\xed\x04\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12>\n\x06status\x18\x04 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusR\x06status\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12[\n\x07patient\x18\x06 \x01(\x0b\x32\x41.proto.services.task_svc.v1.GetAssignedTasksResponse.Task.PatientR\x07patient\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12]\n\x08subtasks\x18\n \x03(\x0b\x32\x41.proto.services.task_svc.v1.GetAssignedTasksResponse.Task.SubTaskR\x08subtasks\x1a-\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedBy\"\xe7\x01\n\x11UpdateTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n\x04name\x18\x02 \x01(\tH\x00R\x04name\x88\x01\x01\x12%\n\x0b\x64\x65scription\x18\x03 \x01(\tH\x01R\x0b\x64\x65scription\x88\x01\x01\x12\x36\n\x06\x64ue_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02R\x05\x64ueAt\x88\x01\x01\x12\x1b\n\x06public\x18\x05 \x01(\x08H\x03R\x06public\x88\x01\x01\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\t\n\x07_due_atB\t\n\x07_public\"\x14\n\x12UpdateTaskResponse\"b\n\x11\x41\x64\x64SubTaskRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x17\n\x07task_id\x18\x02 \x01(\tR\x06taskId\x12\x17\n\x04\x64one\x18\x03 \x01(\x08H\x00R\x04\x64one\x88\x01\x01\x42\x07\n\x05_done\"$\n\x12\x41\x64\x64SubTaskResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"&\n\x14RemoveSubTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15RemoveSubTaskResponse\"H\n\x14UpdateSubTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n\x04name\x18\x02 \x01(\tH\x00R\x04name\x88\x01\x01\x42\x07\n\x05_name\"\x17\n\x15UpdateSubTaskResponse\"&\n\x14SubTaskToToDoRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15SubTaskToToDoResponse\"&\n\x14SubTaskToDoneRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15SubTaskToDoneResponse\"#\n\x11TaskToToDoRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x14\n\x12TaskToToDoResponse\")\n\x17TaskToInProgressRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x1a\n\x18TaskToInProgressResponse\"#\n\x11TaskToDoneRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x14\n\x12TaskToDoneResponse\"B\n\x17\x41ssignTaskToUserRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n\x07user_id\x18\x02 \x01(\tR\x06userId\"\x1a\n\x18\x41ssignTaskToUserResponse\"-\n\x1bUnassignTaskFromUserRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x1e\n\x1cUnassignTaskFromUserResponse\"$\n\x12PublishTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x15\n\x13PublishTaskResponse\"&\n\x14UnpublishTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15UnpublishTaskResponse\"#\n\x11\x44\x65leteTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x14\n\x12\x44\x65leteTaskResponse*r\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x14\n\x10TASK_STATUS_TODO\x10\x01\x12\x1b\n\x17TASK_STATUS_IN_PROGRESS\x10\x02\x12\x14\n\x10TASK_STATUS_DONE\x10\x03\x32\x9c\x12\n\x0bTaskService\x12m\n\nCreateTask\x12-.proto.services.task_svc.v1.CreateTaskRequest\x1a..proto.services.task_svc.v1.CreateTaskResponse\"\x00\x12\x64\n\x07GetTask\x12*.proto.services.task_svc.v1.GetTaskRequest\x1a+.proto.services.task_svc.v1.GetTaskResponse\"\x00\x12\x82\x01\n\x11GetTasksByPatient\x12\x34.proto.services.task_svc.v1.GetTasksByPatientRequest\x1a\x35.proto.services.task_svc.v1.GetTasksByPatientResponse\"\x00\x12\xac\x01\n\x1fGetTasksByPatientSortedByStatus\x12\x42.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusRequest\x1a\x43.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse\"\x00\x12\x7f\n\x10GetAssignedTasks\x12\x33.proto.services.task_svc.v1.GetAssignedTasksRequest\x1a\x34.proto.services.task_svc.v1.GetAssignedTasksResponse\"\x00\x12m\n\nUpdateTask\x12-.proto.services.task_svc.v1.UpdateTaskRequest\x1a..proto.services.task_svc.v1.UpdateTaskResponse\"\x00\x12m\n\nAddSubTask\x12-.proto.services.task_svc.v1.AddSubTaskRequest\x1a..proto.services.task_svc.v1.AddSubTaskResponse\"\x00\x12v\n\rRemoveSubTask\x12\x30.proto.services.task_svc.v1.RemoveSubTaskRequest\x1a\x31.proto.services.task_svc.v1.RemoveSubTaskResponse\"\x00\x12v\n\rUpdateSubTask\x12\x30.proto.services.task_svc.v1.UpdateSubTaskRequest\x1a\x31.proto.services.task_svc.v1.UpdateSubTaskResponse\"\x00\x12v\n\rSubTaskToToDo\x12\x30.proto.services.task_svc.v1.SubTaskToToDoRequest\x1a\x31.proto.services.task_svc.v1.SubTaskToToDoResponse\"\x00\x12v\n\rSubTaskToDone\x12\x30.proto.services.task_svc.v1.SubTaskToDoneRequest\x1a\x31.proto.services.task_svc.v1.SubTaskToDoneResponse\"\x00\x12m\n\nTaskToToDo\x12-.proto.services.task_svc.v1.TaskToToDoRequest\x1a..proto.services.task_svc.v1.TaskToToDoResponse\"\x00\x12\x7f\n\x10TaskToInProgress\x12\x33.proto.services.task_svc.v1.TaskToInProgressRequest\x1a\x34.proto.services.task_svc.v1.TaskToInProgressResponse\"\x00\x12m\n\nTaskToDone\x12-.proto.services.task_svc.v1.TaskToDoneRequest\x1a..proto.services.task_svc.v1.TaskToDoneResponse\"\x00\x12\x7f\n\x10\x41ssignTaskToUser\x12\x33.proto.services.task_svc.v1.AssignTaskToUserRequest\x1a\x34.proto.services.task_svc.v1.AssignTaskToUserResponse\"\x00\x12\x8b\x01\n\x14UnassignTaskFromUser\x12\x37.proto.services.task_svc.v1.UnassignTaskFromUserRequest\x1a\x38.proto.services.task_svc.v1.UnassignTaskFromUserResponse\"\x00\x12p\n\x0bPublishTask\x12..proto.services.task_svc.v1.PublishTaskRequest\x1a/.proto.services.task_svc.v1.PublishTaskResponse\"\x00\x12v\n\rUnpublishTask\x12\x30.proto.services.task_svc.v1.UnpublishTaskRequest\x1a\x31.proto.services.task_svc.v1.UnpublishTaskResponse\"\x00\x12m\n\nDeleteTask\x12-.proto.services.task_svc.v1.DeleteTaskRequest\x1a..proto.services.task_svc.v1.DeleteTaskResponse\"\x00\x42\xd2\x01\n\x1e\x63om.proto.services.task_svc.v1B\x0cTaskSvcProtoP\x01Z\x1bgen/proto/services/task-svc\xa2\x02\x03PST\xaa\x02\x19Proto.Services.TaskSvc.V1\xca\x02\x19Proto\\Services\\TaskSvc\\V1\xe2\x02%Proto\\Services\\TaskSvc\\V1\\GPBMetadata\xea\x02\x1cProto::Services::TaskSvc::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,8 +23,8 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\036com.proto.services.task_svc.v1B\014TaskSvcProtoP\001Z\033gen/proto/services/task-svc\242\002\003PST\252\002\031Proto.Services.TaskSvc.V1\312\002\031Proto\\Services\\TaskSvc\\V1\342\002%Proto\\Services\\TaskSvc\\V1\\GPBMetadata\352\002\034Proto::Services::TaskSvc::V1' - _globals['_TASKSTATUS']._serialized_start=4695 - _globals['_TASKSTATUS']._serialized_end=4809 + _globals['_TASKSTATUS']._serialized_start=4747 + _globals['_TASKSTATUS']._serialized_end=4861 _globals['_CREATETASKREQUEST']._serialized_start=107 _globals['_CREATETASKREQUEST']._serialized_end=410 _globals['_CREATETASKRESPONSE']._serialized_start=412 @@ -40,85 +40,85 @@ _globals['_GETTASKSBYPATIENTREQUEST']._serialized_start=1132 _globals['_GETTASKSBYPATIENTREQUEST']._serialized_end=1189 _globals['_GETTASKSBYPATIENTRESPONSE']._serialized_start=1192 - _globals['_GETTASKSBYPATIENTRESPONSE']._serialized_end=1817 + _globals['_GETTASKSBYPATIENTRESPONSE']._serialized_end=1843 _globals['_GETTASKSBYPATIENTRESPONSE_TASK']._serialized_start=1304 - _globals['_GETTASKSBYPATIENTRESPONSE_TASK']._serialized_end=1817 + _globals['_GETTASKSBYPATIENTRESPONSE_TASK']._serialized_end=1843 _globals['_GETTASKSBYPATIENTRESPONSE_TASK_SUBTASK']._serialized_start=987 _globals['_GETTASKSBYPATIENTRESPONSE_TASK_SUBTASK']._serialized_end=1083 - _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSREQUEST']._serialized_start=1819 - _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSREQUEST']._serialized_end=1890 - _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE']._serialized_start=1893 - _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE']._serialized_end=2695 - _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE_TASK']._serialized_start=2232 - _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE_TASK']._serialized_end=2695 + _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSREQUEST']._serialized_start=1845 + _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSREQUEST']._serialized_end=1916 + _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE']._serialized_start=1919 + _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE']._serialized_end=2747 + _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE_TASK']._serialized_start=2258 + _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE_TASK']._serialized_end=2747 _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE_TASK_SUBTASK']._serialized_start=987 _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE_TASK_SUBTASK']._serialized_end=1083 - _globals['_GETASSIGNEDTASKSREQUEST']._serialized_start=2697 - _globals['_GETASSIGNEDTASKSREQUEST']._serialized_end=2722 - _globals['_GETASSIGNEDTASKSRESPONSE']._serialized_start=2725 - _globals['_GETASSIGNEDTASKSRESPONSE']._serialized_end=3456 - _globals['_GETASSIGNEDTASKSRESPONSE_TASK']._serialized_start=2835 - _globals['_GETASSIGNEDTASKSRESPONSE_TASK']._serialized_end=3456 + _globals['_GETASSIGNEDTASKSREQUEST']._serialized_start=2749 + _globals['_GETASSIGNEDTASKSREQUEST']._serialized_end=2774 + _globals['_GETASSIGNEDTASKSRESPONSE']._serialized_start=2777 + _globals['_GETASSIGNEDTASKSRESPONSE']._serialized_end=3508 + _globals['_GETASSIGNEDTASKSRESPONSE_TASK']._serialized_start=2887 + _globals['_GETASSIGNEDTASKSRESPONSE_TASK']._serialized_end=3508 _globals['_GETASSIGNEDTASKSRESPONSE_TASK_PATIENT']._serialized_start=1085 _globals['_GETASSIGNEDTASKSRESPONSE_TASK_PATIENT']._serialized_end=1130 _globals['_GETASSIGNEDTASKSRESPONSE_TASK_SUBTASK']._serialized_start=987 _globals['_GETASSIGNEDTASKSRESPONSE_TASK_SUBTASK']._serialized_end=1083 - _globals['_UPDATETASKREQUEST']._serialized_start=3459 - _globals['_UPDATETASKREQUEST']._serialized_end=3690 - _globals['_UPDATETASKRESPONSE']._serialized_start=3692 - _globals['_UPDATETASKRESPONSE']._serialized_end=3712 - _globals['_ADDSUBTASKREQUEST']._serialized_start=3714 - _globals['_ADDSUBTASKREQUEST']._serialized_end=3812 - _globals['_ADDSUBTASKRESPONSE']._serialized_start=3814 - _globals['_ADDSUBTASKRESPONSE']._serialized_end=3850 - _globals['_REMOVESUBTASKREQUEST']._serialized_start=3852 - _globals['_REMOVESUBTASKREQUEST']._serialized_end=3890 - _globals['_REMOVESUBTASKRESPONSE']._serialized_start=3892 - _globals['_REMOVESUBTASKRESPONSE']._serialized_end=3915 - _globals['_UPDATESUBTASKREQUEST']._serialized_start=3917 - _globals['_UPDATESUBTASKREQUEST']._serialized_end=3989 - _globals['_UPDATESUBTASKRESPONSE']._serialized_start=3991 - _globals['_UPDATESUBTASKRESPONSE']._serialized_end=4014 - _globals['_SUBTASKTOTODOREQUEST']._serialized_start=4016 - _globals['_SUBTASKTOTODOREQUEST']._serialized_end=4054 - _globals['_SUBTASKTOTODORESPONSE']._serialized_start=4056 - _globals['_SUBTASKTOTODORESPONSE']._serialized_end=4079 - _globals['_SUBTASKTODONEREQUEST']._serialized_start=4081 - _globals['_SUBTASKTODONEREQUEST']._serialized_end=4119 - _globals['_SUBTASKTODONERESPONSE']._serialized_start=4121 - _globals['_SUBTASKTODONERESPONSE']._serialized_end=4144 - _globals['_TASKTOTODOREQUEST']._serialized_start=4146 - _globals['_TASKTOTODOREQUEST']._serialized_end=4181 - _globals['_TASKTOTODORESPONSE']._serialized_start=4183 - _globals['_TASKTOTODORESPONSE']._serialized_end=4203 - _globals['_TASKTOINPROGRESSREQUEST']._serialized_start=4205 - _globals['_TASKTOINPROGRESSREQUEST']._serialized_end=4246 - _globals['_TASKTOINPROGRESSRESPONSE']._serialized_start=4248 - _globals['_TASKTOINPROGRESSRESPONSE']._serialized_end=4274 - _globals['_TASKTODONEREQUEST']._serialized_start=4276 - _globals['_TASKTODONEREQUEST']._serialized_end=4311 - _globals['_TASKTODONERESPONSE']._serialized_start=4313 - _globals['_TASKTODONERESPONSE']._serialized_end=4333 - _globals['_ASSIGNTASKTOUSERREQUEST']._serialized_start=4335 - _globals['_ASSIGNTASKTOUSERREQUEST']._serialized_end=4401 - _globals['_ASSIGNTASKTOUSERRESPONSE']._serialized_start=4403 - _globals['_ASSIGNTASKTOUSERRESPONSE']._serialized_end=4429 - _globals['_UNASSIGNTASKFROMUSERREQUEST']._serialized_start=4431 - _globals['_UNASSIGNTASKFROMUSERREQUEST']._serialized_end=4476 - _globals['_UNASSIGNTASKFROMUSERRESPONSE']._serialized_start=4478 - _globals['_UNASSIGNTASKFROMUSERRESPONSE']._serialized_end=4508 - _globals['_PUBLISHTASKREQUEST']._serialized_start=4510 - _globals['_PUBLISHTASKREQUEST']._serialized_end=4546 - _globals['_PUBLISHTASKRESPONSE']._serialized_start=4548 - _globals['_PUBLISHTASKRESPONSE']._serialized_end=4569 - _globals['_UNPUBLISHTASKREQUEST']._serialized_start=4571 - _globals['_UNPUBLISHTASKREQUEST']._serialized_end=4609 - _globals['_UNPUBLISHTASKRESPONSE']._serialized_start=4611 - _globals['_UNPUBLISHTASKRESPONSE']._serialized_end=4634 - _globals['_DELETETASKREQUEST']._serialized_start=4636 - _globals['_DELETETASKREQUEST']._serialized_end=4671 - _globals['_DELETETASKRESPONSE']._serialized_start=4673 - _globals['_DELETETASKRESPONSE']._serialized_end=4693 - _globals['_TASKSERVICE']._serialized_start=4812 - _globals['_TASKSERVICE']._serialized_end=7144 + _globals['_UPDATETASKREQUEST']._serialized_start=3511 + _globals['_UPDATETASKREQUEST']._serialized_end=3742 + _globals['_UPDATETASKRESPONSE']._serialized_start=3744 + _globals['_UPDATETASKRESPONSE']._serialized_end=3764 + _globals['_ADDSUBTASKREQUEST']._serialized_start=3766 + _globals['_ADDSUBTASKREQUEST']._serialized_end=3864 + _globals['_ADDSUBTASKRESPONSE']._serialized_start=3866 + _globals['_ADDSUBTASKRESPONSE']._serialized_end=3902 + _globals['_REMOVESUBTASKREQUEST']._serialized_start=3904 + _globals['_REMOVESUBTASKREQUEST']._serialized_end=3942 + _globals['_REMOVESUBTASKRESPONSE']._serialized_start=3944 + _globals['_REMOVESUBTASKRESPONSE']._serialized_end=3967 + _globals['_UPDATESUBTASKREQUEST']._serialized_start=3969 + _globals['_UPDATESUBTASKREQUEST']._serialized_end=4041 + _globals['_UPDATESUBTASKRESPONSE']._serialized_start=4043 + _globals['_UPDATESUBTASKRESPONSE']._serialized_end=4066 + _globals['_SUBTASKTOTODOREQUEST']._serialized_start=4068 + _globals['_SUBTASKTOTODOREQUEST']._serialized_end=4106 + _globals['_SUBTASKTOTODORESPONSE']._serialized_start=4108 + _globals['_SUBTASKTOTODORESPONSE']._serialized_end=4131 + _globals['_SUBTASKTODONEREQUEST']._serialized_start=4133 + _globals['_SUBTASKTODONEREQUEST']._serialized_end=4171 + _globals['_SUBTASKTODONERESPONSE']._serialized_start=4173 + _globals['_SUBTASKTODONERESPONSE']._serialized_end=4196 + _globals['_TASKTOTODOREQUEST']._serialized_start=4198 + _globals['_TASKTOTODOREQUEST']._serialized_end=4233 + _globals['_TASKTOTODORESPONSE']._serialized_start=4235 + _globals['_TASKTOTODORESPONSE']._serialized_end=4255 + _globals['_TASKTOINPROGRESSREQUEST']._serialized_start=4257 + _globals['_TASKTOINPROGRESSREQUEST']._serialized_end=4298 + _globals['_TASKTOINPROGRESSRESPONSE']._serialized_start=4300 + _globals['_TASKTOINPROGRESSRESPONSE']._serialized_end=4326 + _globals['_TASKTODONEREQUEST']._serialized_start=4328 + _globals['_TASKTODONEREQUEST']._serialized_end=4363 + _globals['_TASKTODONERESPONSE']._serialized_start=4365 + _globals['_TASKTODONERESPONSE']._serialized_end=4385 + _globals['_ASSIGNTASKTOUSERREQUEST']._serialized_start=4387 + _globals['_ASSIGNTASKTOUSERREQUEST']._serialized_end=4453 + _globals['_ASSIGNTASKTOUSERRESPONSE']._serialized_start=4455 + _globals['_ASSIGNTASKTOUSERRESPONSE']._serialized_end=4481 + _globals['_UNASSIGNTASKFROMUSERREQUEST']._serialized_start=4483 + _globals['_UNASSIGNTASKFROMUSERREQUEST']._serialized_end=4528 + _globals['_UNASSIGNTASKFROMUSERRESPONSE']._serialized_start=4530 + _globals['_UNASSIGNTASKFROMUSERRESPONSE']._serialized_end=4560 + _globals['_PUBLISHTASKREQUEST']._serialized_start=4562 + _globals['_PUBLISHTASKREQUEST']._serialized_end=4598 + _globals['_PUBLISHTASKRESPONSE']._serialized_start=4600 + _globals['_PUBLISHTASKRESPONSE']._serialized_end=4621 + _globals['_UNPUBLISHTASKREQUEST']._serialized_start=4623 + _globals['_UNPUBLISHTASKREQUEST']._serialized_end=4661 + _globals['_UNPUBLISHTASKRESPONSE']._serialized_start=4663 + _globals['_UNPUBLISHTASKRESPONSE']._serialized_end=4686 + _globals['_DELETETASKREQUEST']._serialized_start=4688 + _globals['_DELETETASKREQUEST']._serialized_end=4723 + _globals['_DELETETASKRESPONSE']._serialized_start=4725 + _globals['_DELETETASKRESPONSE']._serialized_end=4745 + _globals['_TASKSERVICE']._serialized_start=4864 + _globals['_TASKSERVICE']._serialized_end=7196 # @@protoc_insertion_point(module_scope) diff --git a/gen/ts/proto/services/task_svc/v1/patient_svc_pb.d.ts b/gen/ts/proto/services/task_svc/v1/patient_svc_pb.d.ts index 886ea1b4a..9eff3a1d3 100644 --- a/gen/ts/proto/services/task_svc/v1/patient_svc_pb.d.ts +++ b/gen/ts/proto/services/task_svc/v1/patient_svc_pb.d.ts @@ -876,6 +876,8 @@ export namespace GetPatientDetailsResponse { getAssignedUserId(): string; setAssignedUserId(value: string): Task; + hasAssignedUserId(): boolean; + clearAssignedUserId(): Task; getPatientId(): string; setPatientId(value: string): Task; @@ -902,7 +904,7 @@ export namespace GetPatientDetailsResponse { name: string, description: string, status: GetPatientDetailsResponse.TaskStatus, - assignedUserId: string, + assignedUserId?: string, patientId: string, pb_public: boolean, subtasksList: Array, @@ -934,6 +936,11 @@ export namespace GetPatientDetailsResponse { } } + + export enum AssignedUserIdCase { + _ASSIGNED_USER_ID_NOT_SET = 0, + ASSIGNED_USER_ID = 5, + } } diff --git a/gen/ts/proto/services/task_svc/v1/patient_svc_pb.js b/gen/ts/proto/services/task_svc/v1/patient_svc_pb.js index bfc1ef04f..836375fed 100644 --- a/gen/ts/proto/services/task_svc/v1/patient_svc_pb.js +++ b/gen/ts/proto/services/task_svc/v1/patient_svc_pb.js @@ -7020,8 +7020,8 @@ proto.proto.services.task_svc.v1.GetPatientDetailsResponse.Task.serializeBinaryT f ); } - f = message.getAssignedUserId(); - if (f.length > 0) { + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { writer.writeString( 5, f @@ -7328,7 +7328,25 @@ proto.proto.services.task_svc.v1.GetPatientDetailsResponse.Task.prototype.getAss * @return {!proto.proto.services.task_svc.v1.GetPatientDetailsResponse.Task} returns this */ proto.proto.services.task_svc.v1.GetPatientDetailsResponse.Task.prototype.setAssignedUserId = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.proto.services.task_svc.v1.GetPatientDetailsResponse.Task} returns this + */ +proto.proto.services.task_svc.v1.GetPatientDetailsResponse.Task.prototype.clearAssignedUserId = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.proto.services.task_svc.v1.GetPatientDetailsResponse.Task.prototype.hasAssignedUserId = function() { + return jspb.Message.getField(this, 5) != null; }; diff --git a/gen/ts/proto/services/task_svc/v1/task_svc_pb.d.ts b/gen/ts/proto/services/task_svc/v1/task_svc_pb.d.ts index c29bbfb9f..bf3db1368 100644 --- a/gen/ts/proto/services/task_svc/v1/task_svc_pb.d.ts +++ b/gen/ts/proto/services/task_svc/v1/task_svc_pb.d.ts @@ -263,6 +263,8 @@ export namespace GetTasksByPatientResponse { getAssignedUserId(): string; setAssignedUserId(value: string): Task; + hasAssignedUserId(): boolean; + clearAssignedUserId(): Task; getPatientId(): string; setPatientId(value: string): Task; @@ -297,7 +299,7 @@ export namespace GetTasksByPatientResponse { name: string, description: string, status: TaskStatus, - assignedUserId: string, + assignedUserId?: string, patientId: string, pb_public: boolean, dueAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, @@ -335,6 +337,11 @@ export namespace GetTasksByPatientResponse { } } + + export enum AssignedUserIdCase { + _ASSIGNED_USER_ID_NOT_SET = 0, + ASSIGNED_USER_ID = 5, + } } } @@ -400,6 +407,8 @@ export namespace GetTasksByPatientSortedByStatusResponse { getAssignedUserId(): string; setAssignedUserId(value: string): Task; + hasAssignedUserId(): boolean; + clearAssignedUserId(): Task; getPatientId(): string; setPatientId(value: string): Task; @@ -433,7 +442,7 @@ export namespace GetTasksByPatientSortedByStatusResponse { id: string, name: string, description: string, - assignedUserId: string, + assignedUserId?: string, patientId: string, pb_public: boolean, dueAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, @@ -471,6 +480,11 @@ export namespace GetTasksByPatientSortedByStatusResponse { } } + + export enum AssignedUserIdCase { + _ASSIGNED_USER_ID_NOT_SET = 0, + ASSIGNED_USER_ID = 5, + } } } diff --git a/gen/ts/proto/services/task_svc/v1/task_svc_pb.js b/gen/ts/proto/services/task_svc/v1/task_svc_pb.js index cc5fa8825..6b70fde4f 100644 --- a/gen/ts/proto/services/task_svc/v1/task_svc_pb.js +++ b/gen/ts/proto/services/task_svc/v1/task_svc_pb.js @@ -2974,8 +2974,8 @@ proto.proto.services.task_svc.v1.GetTasksByPatientResponse.Task.serializeBinaryT f ); } - f = message.getAssignedUserId(); - if (f.length > 0) { + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { writer.writeString( 5, f @@ -3327,7 +3327,25 @@ proto.proto.services.task_svc.v1.GetTasksByPatientResponse.Task.prototype.getAss * @return {!proto.proto.services.task_svc.v1.GetTasksByPatientResponse.Task} returns this */ proto.proto.services.task_svc.v1.GetTasksByPatientResponse.Task.prototype.setAssignedUserId = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.proto.services.task_svc.v1.GetTasksByPatientResponse.Task} returns this + */ +proto.proto.services.task_svc.v1.GetTasksByPatientResponse.Task.prototype.clearAssignedUserId = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.proto.services.task_svc.v1.GetTasksByPatientResponse.Task.prototype.hasAssignedUserId = function() { + return jspb.Message.getField(this, 5) != null; }; @@ -3953,8 +3971,8 @@ proto.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.Task.se f ); } - f = message.getAssignedUserId(); - if (f.length > 0) { + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { writer.writeString( 5, f @@ -4288,7 +4306,25 @@ proto.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.Task.pr * @return {!proto.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.Task} returns this */ proto.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.Task.prototype.setAssignedUserId = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); + return jspb.Message.setField(this, 5, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.Task} returns this + */ +proto.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.Task.prototype.clearAssignedUserId = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.Task.prototype.hasAssignedUserId = function() { + return jspb.Message.getField(this, 5) != null; }; diff --git a/libs/hwdb/go.mod b/libs/hwdb/go.mod index 1f0c9ff51..99f807e1c 100644 --- a/libs/hwdb/go.mod +++ b/libs/hwdb/go.mod @@ -14,6 +14,7 @@ require ( github.com/vgarvardt/pgx-google-uuid/v5 v5.0.0 go.opentelemetry.io/otel v1.21.0 go.opentelemetry.io/otel/trace v1.21.0 + google.golang.org/protobuf v1.31.0 hwutil v0.0.0 telemetry v0.0.0 ) diff --git a/libs/hwdb/go.sum b/libs/hwdb/go.sum index c4e2f29aa..f0428489e 100644 --- a/libs/hwdb/go.sum +++ b/libs/hwdb/go.sum @@ -20,6 +20,8 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91 github.com/go-playground/validator/v10 v10.16.0 h1:x+plE831WK4vaKHO/jpgUGsvLKIqRRkz6M78GuJAfGE= github.com/go-playground/validator/v10 v10.16.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -75,6 +77,10 @@ golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/libs/hwdb/helper.go b/libs/hwdb/helper.go index 8cf2a2d91..8045bd485 100644 --- a/libs/hwdb/helper.go +++ b/libs/hwdb/helper.go @@ -4,6 +4,9 @@ import ( "context" "errors" "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgtype" + "google.golang.org/protobuf/types/known/timestamppb" + "time" ) // Optional wraps a database query function and returns (nil, nil) in case of ErrNoRows @@ -19,3 +22,21 @@ func Optional[P any, R any](fn func(ctx context.Context, param P) (R, error)) fu } } } + +func TimeToTimestamp(src time.Time) pgtype.Timestamp { + // v4 used to enforce UTC for timestamps, I found nothing in the v5 docs, + // for the sake of sanity we enforce UTC anyway + // (as timestamp, as opposed to timestamptz, does not store tz info) + // + // the line below is essentially what .Scan() does, + // just slightly faster as we know the type is time.Time + // (bmn) + return pgtype.Timestamp{Time: src.UTC(), Valid: true} +} + +func PbToTimestamp(src *timestamppb.Timestamp) pgtype.Timestamp { + if src == nil { + return pgtype.Timestamp{Valid: false} + } + return pgtype.Timestamp{Time: (*src).AsTime().UTC(), Valid: true} +} diff --git a/libs/hwdb/helper_test.go b/libs/hwdb/helper_test.go new file mode 100644 index 000000000..f5e9c2392 --- /dev/null +++ b/libs/hwdb/helper_test.go @@ -0,0 +1,30 @@ +package hwdb_test + +import ( + "google.golang.org/protobuf/types/known/timestamppb" + "hwdb" + "testing" +) + +func TestPbToTimestamp(t *testing.T) { + t.Run("src = nil", func(t *testing.T) { + if hwdb.PbToTimestamp(nil).Valid { + t.Error() + } + }) + + t.Run("src not nil", func(t *testing.T) { + src := timestamppb.Timestamp{ + Seconds: 0, + Nanos: 0, + } + res := hwdb.PbToTimestamp(&src) + if !res.Valid { + t.Error("returned ts with Valid = False") + } + + if src.AsTime().UTC() != res.Time { + t.Error("time was not constructed the way it should be") + } + }) +} diff --git a/libs/hwutil/parse.go b/libs/hwutil/parse.go index f6fb51360..6df12b84e 100644 --- a/libs/hwutil/parse.go +++ b/libs/hwutil/parse.go @@ -32,7 +32,7 @@ func Validate(target any) error { } func StringsToUUIDs(strings []string) ([]uuid.UUID, error) { - ids := make([]uuid.UUID, len(strings)) + ids := make([]uuid.UUID, 0, len(strings)) for _, s := range strings { id, err := uuid.Parse(s) if err != nil { diff --git a/libs/hwutil/parse_test.go b/libs/hwutil/parse_test.go index 57907d01a..562dfee8b 100644 --- a/libs/hwutil/parse_test.go +++ b/libs/hwutil/parse_test.go @@ -1,7 +1,9 @@ package hwutil_test import ( + "errors" "fmt" + "github.com/google/uuid" "hwutil" "testing" ) @@ -27,3 +29,55 @@ func TestPtrTo(t *testing.T) { age: 20, }) } +func TestStringsToUUIDs(t *testing.T) { + t.Run("valid uuids", func(t *testing.T) { + uuidStrings := []string{ + "48441b57-a92a-4022-bfd9-9ded5acdb693", + "370472cf-0e4f-449f-a6a4-817d7e025552", + } + expected := []uuid.UUID{ + uuid.MustParse("48441b57-a92a-4022-bfd9-9ded5acdb693"), + uuid.MustParse("370472cf-0e4f-449f-a6a4-817d7e025552"), + } + + actual, err := hwutil.StringsToUUIDs(uuidStrings) + if err != nil { + t.Errorf("expected no error, got error: %v", err) + return + } + if len(actual) != len(expected) { + t.Errorf("expected length: %v, actual length: %v", len(expected), len(actual)) + return + } + for i, id := range actual { + if id != expected[i] { + t.Errorf("expected[%v]: %v, actual[%v]: %v", i, id, i, expected[i]) + return + } + } + }) + + t.Run("invalid uuids", func(t *testing.T) { + uuidStrings := []string{ + "48441b57-a92a-4022-bfd9-9ded5acdb693", + "asdasdasdsadsadadadsa", + } + _, expErr := uuid.Parse("asdasdasdsadsadadadsa") + + _, err := hwutil.StringsToUUIDs(uuidStrings) + if !errors.Is(err, expErr) { + t.Errorf("expected error: %v, actual error: %v", expErr, err) + } + }) + + t.Run("empty", func(t *testing.T) { + uuidStrings := []string{} + actual, err := hwutil.StringsToUUIDs(uuidStrings) + if err != nil { + t.Errorf("expected no error, got: %v", err) + } + if len(actual) != 0 { + t.Errorf("expected: [], got: %v", actual) + } + }) +} diff --git a/libs/proto_helpers/task_svc/v1/helpers.go b/libs/proto_helpers/task_svc/v1/helpers.go index 7218020e4..2a1d11931 100644 --- a/libs/proto_helpers/task_svc/v1/helpers.go +++ b/libs/proto_helpers/task_svc/v1/helpers.go @@ -4,38 +4,6 @@ import ( pb "gen/proto/services/task_svc/v1" ) -func UpdatesMapForUpdateTaskRequest(r *pb.UpdateTaskRequest) map[string]interface{} { - m := make(map[string]interface{}) - - if r.Name != nil { - m["name"] = *r.Name - } - - if r.Description != nil { - m["description"] = *r.Description - } - - if r.DueAt != nil { - m["due_at"] = r.DueAt.AsTime() - } - - if r.Public != nil { - m["public"] = *r.Public - } - - return m -} - -func UpdatesMapForUpdateSubTaskRequest(r *pb.UpdateSubTaskRequest) map[string]interface{} { - m := make(map[string]interface{}) - - if r.Name != nil { - m["name"] = *r.Name - } - - return m -} - func UpdatesMapForUpdateTaskTemplateRequest(r *pb.UpdateTaskTemplateRequest) map[string]interface{} { m := make(map[string]interface{}) diff --git a/proto/services/task_svc/v1/patient_svc.proto b/proto/services/task_svc/v1/patient_svc.proto index 7224f5262..4327d5c07 100644 --- a/proto/services/task_svc/v1/patient_svc.proto +++ b/proto/services/task_svc/v1/patient_svc.proto @@ -230,7 +230,7 @@ message GetPatientDetailsResponse { string name = 2; string description = 3; TaskStatus status = 4; - string assigned_user_id = 5; + optional string assigned_user_id = 5; string patient_id = 6; bool public = 7; repeated SubTask subtasks = 8; diff --git a/proto/services/task_svc/v1/task_svc.proto b/proto/services/task_svc/v1/task_svc.proto index da9073043..3f7b7dd7e 100644 --- a/proto/services/task_svc/v1/task_svc.proto +++ b/proto/services/task_svc/v1/task_svc.proto @@ -80,7 +80,7 @@ message GetTasksByPatientResponse { string name = 2; string description = 3; TaskStatus status = 4; - string assigned_user_id = 5; + optional string assigned_user_id = 5; string patient_id = 6; bool public = 7; google.protobuf.Timestamp due_at = 8; @@ -114,7 +114,7 @@ message GetTasksByPatientSortedByStatusResponse { string id = 1; string name = 2; string description = 3; - string assigned_user_id = 5; + optional string assigned_user_id = 5; string patient_id = 6; bool public = 7; google.protobuf.Timestamp due_at = 8; diff --git a/services/impulse_svc/gen/proto/services/task_svc/v1/patient_svc_pb2.py b/services/impulse_svc/gen/proto/services/task_svc/v1/patient_svc_pb2.py index 8a91cacdd..dd9ddee79 100644 --- a/services/impulse_svc/gen/proto/services/task_svc/v1/patient_svc_pb2.py +++ b/services/impulse_svc/gen/proto/services/task_svc/v1/patient_svc_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,proto/services/task_svc/v1/patient_svc.proto\x12\x1aproto.services.task_svc.v1\"h\n\x14\x43reatePatientRequest\x12:\n\x19human_readable_identifier\x18\x01 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x02 \x01(\tR\x05notes\"\'\n\x15\x43reatePatientResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"#\n\x11GetPatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xe9\x03\n\x12GetPatientResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12\x1e\n\x06\x62\x65\x64_id\x18\x04 \x01(\tB\x02\x18\x01H\x00R\x05\x62\x65\x64Id\x88\x01\x01\x12 \n\x07ward_id\x18\x05 \x01(\tB\x02\x18\x01H\x01R\x06wardId\x88\x01\x01\x12L\n\x04room\x18\x07 \x01(\x0b\x32\x33.proto.services.task_svc.v1.GetPatientResponse.RoomH\x02R\x04room\x88\x01\x01\x12I\n\x03\x62\x65\x64\x18\x08 \x01(\x0b\x32\x32.proto.services.task_svc.v1.GetPatientResponse.BedH\x03R\x03\x62\x65\x64\x88\x01\x01\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04nameB\t\n\x07_bed_idB\n\n\x08_ward_idB\x07\n\x05_roomB\x06\n\x04_bed\"&\n\x14\x44\x65letePatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15\x44\x65letePatientResponse\"/\n\x16GetPatientByBedRequest\x12\x15\n\x06\x62\x65\x64_id\x18\x01 \x01(\tR\x05\x62\x65\x64Id\"\xa2\x01\n\x17GetPatientByBedResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12\x1a\n\x06\x62\x65\x64_id\x18\x04 \x01(\tH\x00R\x05\x62\x65\x64Id\x88\x01\x01\x42\t\n\x07_bed_id\"3\n\x18GetPatientsByWardRequest\x12\x17\n\x07ward_id\x18\x01 \x01(\tR\x06wardId\"\x8b\x02\n\x19GetPatientsByWardResponse\x12Y\n\x08patients\x18\x01 \x03(\x0b\x32=.proto.services.task_svc.v1.GetPatientsByWardResponse.PatientR\x08patients\x1a\x92\x01\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12\x1a\n\x06\x62\x65\x64_id\x18\x04 \x01(\tH\x00R\x05\x62\x65\x64Id\x88\x01\x01\x42\t\n\x07_bed_id\"<\n!GetPatientAssignmentByWardRequest\x12\x17\n\x07ward_id\x18\x01 \x01(\tR\x06wardId\"\xe0\x03\n\"GetPatientAssignmentByWardResponse\x12Y\n\x05rooms\x18\x01 \x03(\x0b\x32\x43.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse.RoomR\x05rooms\x1a\xde\x02\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12[\n\x04\x62\x65\x64s\x18\x03 \x03(\x0b\x32G.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse.Room.BedR\x04\x62\x65\x64s\x1a\xd4\x01\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12n\n\x07patient\x18\x03 \x01(\x0b\x32O.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse.Room.Bed.PatientH\x00R\x07patient\x88\x01\x01\x1a-\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04nameB\n\n\x08_patient\"\x1a\n\x18GetRecentPatientsRequest\"\x84\x04\n\x19GetRecentPatientsResponse\x12t\n\x0frecent_patients\x18\x01 \x03(\x0b\x32K.proto.services.task_svc.v1.GetRecentPatientsResponse.PatientWithRoomAndBedR\x0erecentPatients\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a\x80\x02\n\x15PatientWithRoomAndBed\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12N\n\x04room\x18\x03 \x01(\x0b\x32:.proto.services.task_svc.v1.GetRecentPatientsResponse.RoomR\x04room\x12K\n\x03\x62\x65\x64\x18\x04 \x01(\x0b\x32\x39.proto.services.task_svc.v1.GetRecentPatientsResponse.BedR\x03\x62\x65\x64\"\xaa\x01\n\x14UpdatePatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12?\n\x19human_readable_identifier\x18\x02 \x01(\tH\x00R\x17humanReadableIdentifier\x88\x01\x01\x12\x19\n\x05notes\x18\x03 \x01(\tH\x01R\x05notes\x88\x01\x01\x42\x1c\n\x1a_human_readable_identifierB\x08\n\x06_notes\"\x17\n\x15UpdatePatientResponse\"9\n\x10\x41ssignBedRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62\x65\x64_id\x18\x02 \x01(\tR\x05\x62\x65\x64Id\"\x13\n\x11\x41ssignBedResponse\"$\n\x12UnassignBedRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x15\n\x13UnassignBedResponse\")\n\x17\x44ischargePatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x1a\n\x18\x44ischargePatientResponse\"*\n\x18GetPatientDetailsRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xda\x08\n\x19GetPatientDetailsResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12:\n\x19human_readable_identifier\x18\x03 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x04 \x01(\tR\x05notes\x12P\n\x05tasks\x18\x05 \x03(\x0b\x32:.proto.services.task_svc.v1.GetPatientDetailsResponse.TaskR\x05tasks\x12 \n\x07ward_id\x18\x06 \x01(\tB\x02\x18\x01H\x00R\x06wardId\x88\x01\x01\x12S\n\x04room\x18\x07 \x01(\x0b\x32:.proto.services.task_svc.v1.GetPatientDetailsResponse.RoomH\x01R\x04room\x88\x01\x01\x12P\n\x03\x62\x65\x64\x18\x08 \x01(\x0b\x32\x39.proto.services.task_svc.v1.GetPatientDetailsResponse.BedH\x02R\x03\x62\x65\x64\x88\x01\x01\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a\xaa\x03\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12X\n\x06status\x18\x04 \x01(\x0e\x32@.proto.services.task_svc.v1.GetPatientDetailsResponse.TaskStatusR\x06status\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12^\n\x08subtasks\x18\x08 \x03(\x0b\x32\x42.proto.services.task_svc.v1.GetPatientDetailsResponse.Task.SubTaskR\x08subtasks\x1a\x41\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\"r\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x14\n\x10TASK_STATUS_TODO\x10\x01\x12\x1b\n\x17TASK_STATUS_IN_PROGRESS\x10\x02\x12\x14\n\x10TASK_STATUS_DONE\x10\x03\x42\n\n\x08_ward_idB\x07\n\x05_roomB\x06\n\x04_bed\"A\n\x15GetPatientListRequest\x12\x1c\n\x07ward_id\x18\x01 \x01(\tH\x00R\x06wardId\x88\x01\x01\x42\n\n\x08_ward_id\"\x98\x0c\n\x16GetPatientListResponse\x12`\n\x06\x61\x63tive\x18\x01 \x03(\x0b\x32H.proto.services.task_svc.v1.GetPatientListResponse.PatientWithRoomAndBedR\x06\x61\x63tive\x12k\n\x13unassigned_patients\x18\x02 \x03(\x0b\x32:.proto.services.task_svc.v1.GetPatientListResponse.PatientR\x12unassignedPatients\x12k\n\x13\x64ischarged_patients\x18\x03 \x03(\x0b\x32:.proto.services.task_svc.v1.GetPatientListResponse.PatientR\x12\x64ischargedPatients\x1a\xba\x01\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12M\n\x05tasks\x18\x04 \x03(\x0b\x32\x37.proto.services.task_svc.v1.GetPatientListResponse.TaskR\x05tasks\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a\xdf\x02\n\x15PatientWithRoomAndBed\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12K\n\x04room\x18\x03 \x01(\x0b\x32\x37.proto.services.task_svc.v1.GetPatientListResponse.RoomR\x04room\x12H\n\x03\x62\x65\x64\x18\x04 \x01(\x0b\x32\x36.proto.services.task_svc.v1.GetPatientListResponse.BedR\x03\x62\x65\x64\x12\x14\n\x05notes\x18\x05 \x01(\tR\x05notes\x12M\n\x05tasks\x18\x06 \x03(\x0b\x32\x37.proto.services.task_svc.v1.GetPatientListResponse.TaskR\x05tasks\x1a\xbe\x03\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12U\n\x06status\x18\x04 \x01(\x0e\x32=.proto.services.task_svc.v1.GetPatientListResponse.TaskStatusR\x06status\x12-\n\x10\x61ssigned_user_id\x18\x05 \x01(\tH\x00R\x0e\x61ssignedUserId\x88\x01\x01\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12[\n\x08subtasks\x18\x08 \x03(\x0b\x32?.proto.services.task_svc.v1.GetPatientListResponse.Task.SubTaskR\x08subtasks\x1a\x41\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64oneB\x13\n\x11_assigned_user_id\"r\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x14\n\x10TASK_STATUS_TODO\x10\x01\x12\x1b\n\x17TASK_STATUS_IN_PROGRESS\x10\x02\x12\x14\n\x10TASK_STATUS_DONE\x10\x03\"6\n\x15ReadmitPatientRequest\x12\x1d\n\npatient_id\x18\x01 \x01(\tR\tpatientId\"\x18\n\x16ReadmitPatientResponse2\xe9\r\n\x0ePatientService\x12v\n\rCreatePatient\x12\x30.proto.services.task_svc.v1.CreatePatientRequest\x1a\x31.proto.services.task_svc.v1.CreatePatientResponse\"\x00\x12m\n\nGetPatient\x12-.proto.services.task_svc.v1.GetPatientRequest\x1a..proto.services.task_svc.v1.GetPatientResponse\"\x00\x12|\n\x0fGetPatientByBed\x12\x32.proto.services.task_svc.v1.GetPatientByBedRequest\x1a\x33.proto.services.task_svc.v1.GetPatientByBedResponse\"\x00\x12\x82\x01\n\x11GetPatientsByWard\x12\x34.proto.services.task_svc.v1.GetPatientsByWardRequest\x1a\x35.proto.services.task_svc.v1.GetPatientsByWardResponse\"\x00\x12\x9d\x01\n\x1aGetPatientAssignmentByWard\x12=.proto.services.task_svc.v1.GetPatientAssignmentByWardRequest\x1a>.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse\"\x00\x12\x82\x01\n\x11GetRecentPatients\x12\x34.proto.services.task_svc.v1.GetRecentPatientsRequest\x1a\x35.proto.services.task_svc.v1.GetRecentPatientsResponse\"\x00\x12v\n\rUpdatePatient\x12\x30.proto.services.task_svc.v1.UpdatePatientRequest\x1a\x31.proto.services.task_svc.v1.UpdatePatientResponse\"\x00\x12j\n\tAssignBed\x12,.proto.services.task_svc.v1.AssignBedRequest\x1a-.proto.services.task_svc.v1.AssignBedResponse\"\x00\x12p\n\x0bUnassignBed\x12..proto.services.task_svc.v1.UnassignBedRequest\x1a/.proto.services.task_svc.v1.UnassignBedResponse\"\x00\x12\x7f\n\x10\x44ischargePatient\x12\x33.proto.services.task_svc.v1.DischargePatientRequest\x1a\x34.proto.services.task_svc.v1.DischargePatientResponse\"\x00\x12\x82\x01\n\x11GetPatientDetails\x12\x34.proto.services.task_svc.v1.GetPatientDetailsRequest\x1a\x35.proto.services.task_svc.v1.GetPatientDetailsResponse\"\x00\x12y\n\x0eGetPatientList\x12\x31.proto.services.task_svc.v1.GetPatientListRequest\x1a\x32.proto.services.task_svc.v1.GetPatientListResponse\"\x00\x12v\n\rDeletePatient\x12\x30.proto.services.task_svc.v1.DeletePatientRequest\x1a\x31.proto.services.task_svc.v1.DeletePatientResponse\"\x00\x12y\n\x0eReadmitPatient\x12\x31.proto.services.task_svc.v1.ReadmitPatientRequest\x1a\x32.proto.services.task_svc.v1.ReadmitPatientResponse\"\x00\x42\xd5\x01\n\x1e\x63om.proto.services.task_svc.v1B\x0fPatientSvcProtoP\x01Z\x1bgen/proto/services/task-svc\xa2\x02\x03PST\xaa\x02\x19Proto.Services.TaskSvc.V1\xca\x02\x19Proto\\Services\\TaskSvc\\V1\xe2\x02%Proto\\Services\\TaskSvc\\V1\\GPBMetadata\xea\x02\x1cProto::Services::TaskSvc::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,proto/services/task_svc/v1/patient_svc.proto\x12\x1aproto.services.task_svc.v1\"h\n\x14\x43reatePatientRequest\x12:\n\x19human_readable_identifier\x18\x01 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x02 \x01(\tR\x05notes\"\'\n\x15\x43reatePatientResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"#\n\x11GetPatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xe9\x03\n\x12GetPatientResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12\x1e\n\x06\x62\x65\x64_id\x18\x04 \x01(\tB\x02\x18\x01H\x00R\x05\x62\x65\x64Id\x88\x01\x01\x12 \n\x07ward_id\x18\x05 \x01(\tB\x02\x18\x01H\x01R\x06wardId\x88\x01\x01\x12L\n\x04room\x18\x07 \x01(\x0b\x32\x33.proto.services.task_svc.v1.GetPatientResponse.RoomH\x02R\x04room\x88\x01\x01\x12I\n\x03\x62\x65\x64\x18\x08 \x01(\x0b\x32\x32.proto.services.task_svc.v1.GetPatientResponse.BedH\x03R\x03\x62\x65\x64\x88\x01\x01\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04nameB\t\n\x07_bed_idB\n\n\x08_ward_idB\x07\n\x05_roomB\x06\n\x04_bed\"&\n\x14\x44\x65letePatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15\x44\x65letePatientResponse\"/\n\x16GetPatientByBedRequest\x12\x15\n\x06\x62\x65\x64_id\x18\x01 \x01(\tR\x05\x62\x65\x64Id\"\xa2\x01\n\x17GetPatientByBedResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12\x1a\n\x06\x62\x65\x64_id\x18\x04 \x01(\tH\x00R\x05\x62\x65\x64Id\x88\x01\x01\x42\t\n\x07_bed_id\"3\n\x18GetPatientsByWardRequest\x12\x17\n\x07ward_id\x18\x01 \x01(\tR\x06wardId\"\x8b\x02\n\x19GetPatientsByWardResponse\x12Y\n\x08patients\x18\x01 \x03(\x0b\x32=.proto.services.task_svc.v1.GetPatientsByWardResponse.PatientR\x08patients\x1a\x92\x01\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12\x1a\n\x06\x62\x65\x64_id\x18\x04 \x01(\tH\x00R\x05\x62\x65\x64Id\x88\x01\x01\x42\t\n\x07_bed_id\"<\n!GetPatientAssignmentByWardRequest\x12\x17\n\x07ward_id\x18\x01 \x01(\tR\x06wardId\"\xe0\x03\n\"GetPatientAssignmentByWardResponse\x12Y\n\x05rooms\x18\x01 \x03(\x0b\x32\x43.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse.RoomR\x05rooms\x1a\xde\x02\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12[\n\x04\x62\x65\x64s\x18\x03 \x03(\x0b\x32G.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse.Room.BedR\x04\x62\x65\x64s\x1a\xd4\x01\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12n\n\x07patient\x18\x03 \x01(\x0b\x32O.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse.Room.Bed.PatientH\x00R\x07patient\x88\x01\x01\x1a-\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04nameB\n\n\x08_patient\"\x1a\n\x18GetRecentPatientsRequest\"\x84\x04\n\x19GetRecentPatientsResponse\x12t\n\x0frecent_patients\x18\x01 \x03(\x0b\x32K.proto.services.task_svc.v1.GetRecentPatientsResponse.PatientWithRoomAndBedR\x0erecentPatients\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a\x80\x02\n\x15PatientWithRoomAndBed\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12N\n\x04room\x18\x03 \x01(\x0b\x32:.proto.services.task_svc.v1.GetRecentPatientsResponse.RoomR\x04room\x12K\n\x03\x62\x65\x64\x18\x04 \x01(\x0b\x32\x39.proto.services.task_svc.v1.GetRecentPatientsResponse.BedR\x03\x62\x65\x64\"\xaa\x01\n\x14UpdatePatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12?\n\x19human_readable_identifier\x18\x02 \x01(\tH\x00R\x17humanReadableIdentifier\x88\x01\x01\x12\x19\n\x05notes\x18\x03 \x01(\tH\x01R\x05notes\x88\x01\x01\x42\x1c\n\x1a_human_readable_identifierB\x08\n\x06_notes\"\x17\n\x15UpdatePatientResponse\"9\n\x10\x41ssignBedRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x15\n\x06\x62\x65\x64_id\x18\x02 \x01(\tR\x05\x62\x65\x64Id\"\x13\n\x11\x41ssignBedResponse\"$\n\x12UnassignBedRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x15\n\x13UnassignBedResponse\")\n\x17\x44ischargePatientRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x1a\n\x18\x44ischargePatientResponse\"*\n\x18GetPatientDetailsRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\xf4\x08\n\x19GetPatientDetailsResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12:\n\x19human_readable_identifier\x18\x03 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x04 \x01(\tR\x05notes\x12P\n\x05tasks\x18\x05 \x03(\x0b\x32:.proto.services.task_svc.v1.GetPatientDetailsResponse.TaskR\x05tasks\x12 \n\x07ward_id\x18\x06 \x01(\tB\x02\x18\x01H\x00R\x06wardId\x88\x01\x01\x12S\n\x04room\x18\x07 \x01(\x0b\x32:.proto.services.task_svc.v1.GetPatientDetailsResponse.RoomH\x01R\x04room\x88\x01\x01\x12P\n\x03\x62\x65\x64\x18\x08 \x01(\x0b\x32\x39.proto.services.task_svc.v1.GetPatientDetailsResponse.BedH\x02R\x03\x62\x65\x64\x88\x01\x01\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a\xc4\x03\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12X\n\x06status\x18\x04 \x01(\x0e\x32@.proto.services.task_svc.v1.GetPatientDetailsResponse.TaskStatusR\x06status\x12-\n\x10\x61ssigned_user_id\x18\x05 \x01(\tH\x00R\x0e\x61ssignedUserId\x88\x01\x01\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12^\n\x08subtasks\x18\x08 \x03(\x0b\x32\x42.proto.services.task_svc.v1.GetPatientDetailsResponse.Task.SubTaskR\x08subtasks\x1a\x41\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64oneB\x13\n\x11_assigned_user_id\"r\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x14\n\x10TASK_STATUS_TODO\x10\x01\x12\x1b\n\x17TASK_STATUS_IN_PROGRESS\x10\x02\x12\x14\n\x10TASK_STATUS_DONE\x10\x03\x42\n\n\x08_ward_idB\x07\n\x05_roomB\x06\n\x04_bed\"A\n\x15GetPatientListRequest\x12\x1c\n\x07ward_id\x18\x01 \x01(\tH\x00R\x06wardId\x88\x01\x01\x42\n\n\x08_ward_id\"\x98\x0c\n\x16GetPatientListResponse\x12`\n\x06\x61\x63tive\x18\x01 \x03(\x0b\x32H.proto.services.task_svc.v1.GetPatientListResponse.PatientWithRoomAndBedR\x06\x61\x63tive\x12k\n\x13unassigned_patients\x18\x02 \x03(\x0b\x32:.proto.services.task_svc.v1.GetPatientListResponse.PatientR\x12unassignedPatients\x12k\n\x13\x64ischarged_patients\x18\x03 \x03(\x0b\x32:.proto.services.task_svc.v1.GetPatientListResponse.PatientR\x12\x64ischargedPatients\x1a\xba\x01\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12\x14\n\x05notes\x18\x03 \x01(\tR\x05notes\x12M\n\x05tasks\x18\x04 \x03(\x0b\x32\x37.proto.services.task_svc.v1.GetPatientListResponse.TaskR\x05tasks\x1a)\n\x03\x42\x65\x64\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a\x43\n\x04Room\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x17\n\x07ward_id\x18\x03 \x01(\tR\x06wardId\x1a\xdf\x02\n\x15PatientWithRoomAndBed\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x19human_readable_identifier\x18\x02 \x01(\tR\x17humanReadableIdentifier\x12K\n\x04room\x18\x03 \x01(\x0b\x32\x37.proto.services.task_svc.v1.GetPatientListResponse.RoomR\x04room\x12H\n\x03\x62\x65\x64\x18\x04 \x01(\x0b\x32\x36.proto.services.task_svc.v1.GetPatientListResponse.BedR\x03\x62\x65\x64\x12\x14\n\x05notes\x18\x05 \x01(\tR\x05notes\x12M\n\x05tasks\x18\x06 \x03(\x0b\x32\x37.proto.services.task_svc.v1.GetPatientListResponse.TaskR\x05tasks\x1a\xbe\x03\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12U\n\x06status\x18\x04 \x01(\x0e\x32=.proto.services.task_svc.v1.GetPatientListResponse.TaskStatusR\x06status\x12-\n\x10\x61ssigned_user_id\x18\x05 \x01(\tH\x00R\x0e\x61ssignedUserId\x88\x01\x01\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12[\n\x08subtasks\x18\x08 \x03(\x0b\x32?.proto.services.task_svc.v1.GetPatientListResponse.Task.SubTaskR\x08subtasks\x1a\x41\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64oneB\x13\n\x11_assigned_user_id\"r\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x14\n\x10TASK_STATUS_TODO\x10\x01\x12\x1b\n\x17TASK_STATUS_IN_PROGRESS\x10\x02\x12\x14\n\x10TASK_STATUS_DONE\x10\x03\"6\n\x15ReadmitPatientRequest\x12\x1d\n\npatient_id\x18\x01 \x01(\tR\tpatientId\"\x18\n\x16ReadmitPatientResponse2\xe9\r\n\x0ePatientService\x12v\n\rCreatePatient\x12\x30.proto.services.task_svc.v1.CreatePatientRequest\x1a\x31.proto.services.task_svc.v1.CreatePatientResponse\"\x00\x12m\n\nGetPatient\x12-.proto.services.task_svc.v1.GetPatientRequest\x1a..proto.services.task_svc.v1.GetPatientResponse\"\x00\x12|\n\x0fGetPatientByBed\x12\x32.proto.services.task_svc.v1.GetPatientByBedRequest\x1a\x33.proto.services.task_svc.v1.GetPatientByBedResponse\"\x00\x12\x82\x01\n\x11GetPatientsByWard\x12\x34.proto.services.task_svc.v1.GetPatientsByWardRequest\x1a\x35.proto.services.task_svc.v1.GetPatientsByWardResponse\"\x00\x12\x9d\x01\n\x1aGetPatientAssignmentByWard\x12=.proto.services.task_svc.v1.GetPatientAssignmentByWardRequest\x1a>.proto.services.task_svc.v1.GetPatientAssignmentByWardResponse\"\x00\x12\x82\x01\n\x11GetRecentPatients\x12\x34.proto.services.task_svc.v1.GetRecentPatientsRequest\x1a\x35.proto.services.task_svc.v1.GetRecentPatientsResponse\"\x00\x12v\n\rUpdatePatient\x12\x30.proto.services.task_svc.v1.UpdatePatientRequest\x1a\x31.proto.services.task_svc.v1.UpdatePatientResponse\"\x00\x12j\n\tAssignBed\x12,.proto.services.task_svc.v1.AssignBedRequest\x1a-.proto.services.task_svc.v1.AssignBedResponse\"\x00\x12p\n\x0bUnassignBed\x12..proto.services.task_svc.v1.UnassignBedRequest\x1a/.proto.services.task_svc.v1.UnassignBedResponse\"\x00\x12\x7f\n\x10\x44ischargePatient\x12\x33.proto.services.task_svc.v1.DischargePatientRequest\x1a\x34.proto.services.task_svc.v1.DischargePatientResponse\"\x00\x12\x82\x01\n\x11GetPatientDetails\x12\x34.proto.services.task_svc.v1.GetPatientDetailsRequest\x1a\x35.proto.services.task_svc.v1.GetPatientDetailsResponse\"\x00\x12y\n\x0eGetPatientList\x12\x31.proto.services.task_svc.v1.GetPatientListRequest\x1a\x32.proto.services.task_svc.v1.GetPatientListResponse\"\x00\x12v\n\rDeletePatient\x12\x30.proto.services.task_svc.v1.DeletePatientRequest\x1a\x31.proto.services.task_svc.v1.DeletePatientResponse\"\x00\x12y\n\x0eReadmitPatient\x12\x31.proto.services.task_svc.v1.ReadmitPatientRequest\x1a\x32.proto.services.task_svc.v1.ReadmitPatientResponse\"\x00\x42\xd5\x01\n\x1e\x63om.proto.services.task_svc.v1B\x0fPatientSvcProtoP\x01Z\x1bgen/proto/services/task-svc\xa2\x02\x03PST\xaa\x02\x19Proto.Services.TaskSvc.V1\xca\x02\x19Proto\\Services\\TaskSvc\\V1\xe2\x02%Proto\\Services\\TaskSvc\\V1\\GPBMetadata\xea\x02\x1cProto::Services::TaskSvc::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -93,39 +93,39 @@ _globals['_GETPATIENTDETAILSREQUEST']._serialized_start=2856 _globals['_GETPATIENTDETAILSREQUEST']._serialized_end=2898 _globals['_GETPATIENTDETAILSRESPONSE']._serialized_start=2901 - _globals['_GETPATIENTDETAILSRESPONSE']._serialized_end=4015 + _globals['_GETPATIENTDETAILSRESPONSE']._serialized_end=4041 _globals['_GETPATIENTDETAILSRESPONSE_ROOM']._serialized_start=600 _globals['_GETPATIENTDETAILSRESPONSE_ROOM']._serialized_end=667 _globals['_GETPATIENTDETAILSRESPONSE_BED']._serialized_start=669 _globals['_GETPATIENTDETAILSRESPONSE_BED']._serialized_end=710 _globals['_GETPATIENTDETAILSRESPONSE_TASK']._serialized_start=3444 - _globals['_GETPATIENTDETAILSRESPONSE_TASK']._serialized_end=3870 - _globals['_GETPATIENTDETAILSRESPONSE_TASK_SUBTASK']._serialized_start=3805 - _globals['_GETPATIENTDETAILSRESPONSE_TASK_SUBTASK']._serialized_end=3870 - _globals['_GETPATIENTDETAILSRESPONSE_TASKSTATUS']._serialized_start=3872 - _globals['_GETPATIENTDETAILSRESPONSE_TASKSTATUS']._serialized_end=3986 - _globals['_GETPATIENTLISTREQUEST']._serialized_start=4017 - _globals['_GETPATIENTLISTREQUEST']._serialized_end=4082 - _globals['_GETPATIENTLISTRESPONSE']._serialized_start=4085 - _globals['_GETPATIENTLISTRESPONSE']._serialized_end=5645 - _globals['_GETPATIENTLISTRESPONSE_PATIENT']._serialized_start=4428 - _globals['_GETPATIENTLISTRESPONSE_PATIENT']._serialized_end=4614 + _globals['_GETPATIENTDETAILSRESPONSE_TASK']._serialized_end=3896 + _globals['_GETPATIENTDETAILSRESPONSE_TASK_SUBTASK']._serialized_start=3810 + _globals['_GETPATIENTDETAILSRESPONSE_TASK_SUBTASK']._serialized_end=3875 + _globals['_GETPATIENTDETAILSRESPONSE_TASKSTATUS']._serialized_start=3898 + _globals['_GETPATIENTDETAILSRESPONSE_TASKSTATUS']._serialized_end=4012 + _globals['_GETPATIENTLISTREQUEST']._serialized_start=4043 + _globals['_GETPATIENTLISTREQUEST']._serialized_end=4108 + _globals['_GETPATIENTLISTRESPONSE']._serialized_start=4111 + _globals['_GETPATIENTLISTRESPONSE']._serialized_end=5671 + _globals['_GETPATIENTLISTRESPONSE_PATIENT']._serialized_start=4454 + _globals['_GETPATIENTLISTRESPONSE_PATIENT']._serialized_end=4640 _globals['_GETPATIENTLISTRESPONSE_BED']._serialized_start=669 _globals['_GETPATIENTLISTRESPONSE_BED']._serialized_end=710 _globals['_GETPATIENTLISTRESPONSE_ROOM']._serialized_start=600 _globals['_GETPATIENTLISTRESPONSE_ROOM']._serialized_end=667 - _globals['_GETPATIENTLISTRESPONSE_PATIENTWITHROOMANDBED']._serialized_start=4729 - _globals['_GETPATIENTLISTRESPONSE_PATIENTWITHROOMANDBED']._serialized_end=5080 - _globals['_GETPATIENTLISTRESPONSE_TASK']._serialized_start=5083 - _globals['_GETPATIENTLISTRESPONSE_TASK']._serialized_end=5529 - _globals['_GETPATIENTLISTRESPONSE_TASK_SUBTASK']._serialized_start=3805 - _globals['_GETPATIENTLISTRESPONSE_TASK_SUBTASK']._serialized_end=3870 - _globals['_GETPATIENTLISTRESPONSE_TASKSTATUS']._serialized_start=3872 - _globals['_GETPATIENTLISTRESPONSE_TASKSTATUS']._serialized_end=3986 - _globals['_READMITPATIENTREQUEST']._serialized_start=5647 - _globals['_READMITPATIENTREQUEST']._serialized_end=5701 - _globals['_READMITPATIENTRESPONSE']._serialized_start=5703 - _globals['_READMITPATIENTRESPONSE']._serialized_end=5727 - _globals['_PATIENTSERVICE']._serialized_start=5730 - _globals['_PATIENTSERVICE']._serialized_end=7499 + _globals['_GETPATIENTLISTRESPONSE_PATIENTWITHROOMANDBED']._serialized_start=4755 + _globals['_GETPATIENTLISTRESPONSE_PATIENTWITHROOMANDBED']._serialized_end=5106 + _globals['_GETPATIENTLISTRESPONSE_TASK']._serialized_start=5109 + _globals['_GETPATIENTLISTRESPONSE_TASK']._serialized_end=5555 + _globals['_GETPATIENTLISTRESPONSE_TASK_SUBTASK']._serialized_start=3810 + _globals['_GETPATIENTLISTRESPONSE_TASK_SUBTASK']._serialized_end=3875 + _globals['_GETPATIENTLISTRESPONSE_TASKSTATUS']._serialized_start=3898 + _globals['_GETPATIENTLISTRESPONSE_TASKSTATUS']._serialized_end=4012 + _globals['_READMITPATIENTREQUEST']._serialized_start=5673 + _globals['_READMITPATIENTREQUEST']._serialized_end=5727 + _globals['_READMITPATIENTRESPONSE']._serialized_start=5729 + _globals['_READMITPATIENTRESPONSE']._serialized_end=5753 + _globals['_PATIENTSERVICE']._serialized_start=5756 + _globals['_PATIENTSERVICE']._serialized_end=7525 # @@protoc_insertion_point(module_scope) diff --git a/services/impulse_svc/gen/proto/services/task_svc/v1/task_svc_pb2.py b/services/impulse_svc/gen/proto/services/task_svc/v1/task_svc_pb2.py index 92af79f4e..1840d90a6 100644 --- a/services/impulse_svc/gen/proto/services/task_svc/v1/task_svc_pb2.py +++ b/services/impulse_svc/gen/proto/services/task_svc/v1/task_svc_pb2.py @@ -15,7 +15,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)proto/services/task_svc/v1/task_svc.proto\x12\x1aproto.services.task_svc.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaf\x02\n\x11\x43reateTaskRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12%\n\x0b\x64\x65scription\x18\x02 \x01(\tH\x00R\x0b\x64\x65scription\x88\x01\x01\x12\x1d\n\npatient_id\x18\x03 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x04 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12R\n\x0einitial_status\x18\x06 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusH\x01R\rinitialStatus\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x11\n\x0f_initial_status\"$\n\x12\x43reateTaskResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\" \n\x0eGetTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x85\x05\n\x0fGetTaskResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12>\n\x06status\x18\x04 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusR\x06status\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12M\n\x07patient\x18\x06 \x01(\x0b\x32\x33.proto.services.task_svc.v1.GetTaskResponse.PatientR\x07patient\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12O\n\x08subtasks\x18\n \x03(\x0b\x32\x33.proto.services.task_svc.v1.GetTaskResponse.SubTaskR\x08subtasks\x12\'\n\x0forganization_id\x18\x0b \x01(\tR\x0eorganizationId\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedBy\x1a-\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"9\n\x18GetTasksByPatientRequest\x12\x1d\n\npatient_id\x18\x01 \x01(\tR\tpatientId\"\xf1\x04\n\x19GetTasksByPatientResponse\x12P\n\x05tasks\x18\x01 \x03(\x0b\x32:.proto.services.task_svc.v1.GetTasksByPatientResponse.TaskR\x05tasks\x1a\x81\x04\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12>\n\x06status\x18\x04 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusR\x06status\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12^\n\x08subtasks\x18\n \x03(\x0b\x32\x42.proto.services.task_svc.v1.GetTasksByPatientResponse.Task.SubTaskR\x08subtasks\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedBy\"G\n&GetTasksByPatientSortedByStatusRequest\x12\x1d\n\npatient_id\x18\x01 \x01(\tR\tpatientId\"\xa2\x06\n\'GetTasksByPatientSortedByStatusResponse\x12\\\n\x04todo\x18\x01 \x03(\x0b\x32H.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.TaskR\x04todo\x12i\n\x0bin_progress\x18\x02 \x03(\x0b\x32H.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.TaskR\ninProgress\x12\\\n\x04\x64one\x18\x03 \x03(\x0b\x32H.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.TaskR\x04\x64one\x1a\xcf\x03\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12l\n\x08subtasks\x18\n \x03(\x0b\x32P.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.Task.SubTaskR\x08subtasks\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedBy\"\x19\n\x17GetAssignedTasksRequest\"\xdb\x05\n\x18GetAssignedTasksResponse\x12O\n\x05tasks\x18\x01 \x03(\x0b\x32\x39.proto.services.task_svc.v1.GetAssignedTasksResponse.TaskR\x05tasks\x1a\xed\x04\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12>\n\x06status\x18\x04 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusR\x06status\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12[\n\x07patient\x18\x06 \x01(\x0b\x32\x41.proto.services.task_svc.v1.GetAssignedTasksResponse.Task.PatientR\x07patient\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12]\n\x08subtasks\x18\n \x03(\x0b\x32\x41.proto.services.task_svc.v1.GetAssignedTasksResponse.Task.SubTaskR\x08subtasks\x1a-\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedBy\"\xe7\x01\n\x11UpdateTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n\x04name\x18\x02 \x01(\tH\x00R\x04name\x88\x01\x01\x12%\n\x0b\x64\x65scription\x18\x03 \x01(\tH\x01R\x0b\x64\x65scription\x88\x01\x01\x12\x36\n\x06\x64ue_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02R\x05\x64ueAt\x88\x01\x01\x12\x1b\n\x06public\x18\x05 \x01(\x08H\x03R\x06public\x88\x01\x01\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\t\n\x07_due_atB\t\n\x07_public\"\x14\n\x12UpdateTaskResponse\"b\n\x11\x41\x64\x64SubTaskRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x17\n\x07task_id\x18\x02 \x01(\tR\x06taskId\x12\x17\n\x04\x64one\x18\x03 \x01(\x08H\x00R\x04\x64one\x88\x01\x01\x42\x07\n\x05_done\"$\n\x12\x41\x64\x64SubTaskResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"&\n\x14RemoveSubTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15RemoveSubTaskResponse\"H\n\x14UpdateSubTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n\x04name\x18\x02 \x01(\tH\x00R\x04name\x88\x01\x01\x42\x07\n\x05_name\"\x17\n\x15UpdateSubTaskResponse\"&\n\x14SubTaskToToDoRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15SubTaskToToDoResponse\"&\n\x14SubTaskToDoneRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15SubTaskToDoneResponse\"#\n\x11TaskToToDoRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x14\n\x12TaskToToDoResponse\")\n\x17TaskToInProgressRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x1a\n\x18TaskToInProgressResponse\"#\n\x11TaskToDoneRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x14\n\x12TaskToDoneResponse\"B\n\x17\x41ssignTaskToUserRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n\x07user_id\x18\x02 \x01(\tR\x06userId\"\x1a\n\x18\x41ssignTaskToUserResponse\"-\n\x1bUnassignTaskFromUserRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x1e\n\x1cUnassignTaskFromUserResponse\"$\n\x12PublishTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x15\n\x13PublishTaskResponse\"&\n\x14UnpublishTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15UnpublishTaskResponse\"#\n\x11\x44\x65leteTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x14\n\x12\x44\x65leteTaskResponse*r\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x14\n\x10TASK_STATUS_TODO\x10\x01\x12\x1b\n\x17TASK_STATUS_IN_PROGRESS\x10\x02\x12\x14\n\x10TASK_STATUS_DONE\x10\x03\x32\x9c\x12\n\x0bTaskService\x12m\n\nCreateTask\x12-.proto.services.task_svc.v1.CreateTaskRequest\x1a..proto.services.task_svc.v1.CreateTaskResponse\"\x00\x12\x64\n\x07GetTask\x12*.proto.services.task_svc.v1.GetTaskRequest\x1a+.proto.services.task_svc.v1.GetTaskResponse\"\x00\x12\x82\x01\n\x11GetTasksByPatient\x12\x34.proto.services.task_svc.v1.GetTasksByPatientRequest\x1a\x35.proto.services.task_svc.v1.GetTasksByPatientResponse\"\x00\x12\xac\x01\n\x1fGetTasksByPatientSortedByStatus\x12\x42.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusRequest\x1a\x43.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse\"\x00\x12\x7f\n\x10GetAssignedTasks\x12\x33.proto.services.task_svc.v1.GetAssignedTasksRequest\x1a\x34.proto.services.task_svc.v1.GetAssignedTasksResponse\"\x00\x12m\n\nUpdateTask\x12-.proto.services.task_svc.v1.UpdateTaskRequest\x1a..proto.services.task_svc.v1.UpdateTaskResponse\"\x00\x12m\n\nAddSubTask\x12-.proto.services.task_svc.v1.AddSubTaskRequest\x1a..proto.services.task_svc.v1.AddSubTaskResponse\"\x00\x12v\n\rRemoveSubTask\x12\x30.proto.services.task_svc.v1.RemoveSubTaskRequest\x1a\x31.proto.services.task_svc.v1.RemoveSubTaskResponse\"\x00\x12v\n\rUpdateSubTask\x12\x30.proto.services.task_svc.v1.UpdateSubTaskRequest\x1a\x31.proto.services.task_svc.v1.UpdateSubTaskResponse\"\x00\x12v\n\rSubTaskToToDo\x12\x30.proto.services.task_svc.v1.SubTaskToToDoRequest\x1a\x31.proto.services.task_svc.v1.SubTaskToToDoResponse\"\x00\x12v\n\rSubTaskToDone\x12\x30.proto.services.task_svc.v1.SubTaskToDoneRequest\x1a\x31.proto.services.task_svc.v1.SubTaskToDoneResponse\"\x00\x12m\n\nTaskToToDo\x12-.proto.services.task_svc.v1.TaskToToDoRequest\x1a..proto.services.task_svc.v1.TaskToToDoResponse\"\x00\x12\x7f\n\x10TaskToInProgress\x12\x33.proto.services.task_svc.v1.TaskToInProgressRequest\x1a\x34.proto.services.task_svc.v1.TaskToInProgressResponse\"\x00\x12m\n\nTaskToDone\x12-.proto.services.task_svc.v1.TaskToDoneRequest\x1a..proto.services.task_svc.v1.TaskToDoneResponse\"\x00\x12\x7f\n\x10\x41ssignTaskToUser\x12\x33.proto.services.task_svc.v1.AssignTaskToUserRequest\x1a\x34.proto.services.task_svc.v1.AssignTaskToUserResponse\"\x00\x12\x8b\x01\n\x14UnassignTaskFromUser\x12\x37.proto.services.task_svc.v1.UnassignTaskFromUserRequest\x1a\x38.proto.services.task_svc.v1.UnassignTaskFromUserResponse\"\x00\x12p\n\x0bPublishTask\x12..proto.services.task_svc.v1.PublishTaskRequest\x1a/.proto.services.task_svc.v1.PublishTaskResponse\"\x00\x12v\n\rUnpublishTask\x12\x30.proto.services.task_svc.v1.UnpublishTaskRequest\x1a\x31.proto.services.task_svc.v1.UnpublishTaskResponse\"\x00\x12m\n\nDeleteTask\x12-.proto.services.task_svc.v1.DeleteTaskRequest\x1a..proto.services.task_svc.v1.DeleteTaskResponse\"\x00\x42\xd2\x01\n\x1e\x63om.proto.services.task_svc.v1B\x0cTaskSvcProtoP\x01Z\x1bgen/proto/services/task-svc\xa2\x02\x03PST\xaa\x02\x19Proto.Services.TaskSvc.V1\xca\x02\x19Proto\\Services\\TaskSvc\\V1\xe2\x02%Proto\\Services\\TaskSvc\\V1\\GPBMetadata\xea\x02\x1cProto::Services::TaskSvc::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)proto/services/task_svc/v1/task_svc.proto\x12\x1aproto.services.task_svc.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaf\x02\n\x11\x43reateTaskRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12%\n\x0b\x64\x65scription\x18\x02 \x01(\tH\x00R\x0b\x64\x65scription\x88\x01\x01\x12\x1d\n\npatient_id\x18\x03 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x04 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12R\n\x0einitial_status\x18\x06 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusH\x01R\rinitialStatus\x88\x01\x01\x42\x0e\n\x0c_descriptionB\x11\n\x0f_initial_status\"$\n\x12\x43reateTaskResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\" \n\x0eGetTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x85\x05\n\x0fGetTaskResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12>\n\x06status\x18\x04 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusR\x06status\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12M\n\x07patient\x18\x06 \x01(\x0b\x32\x33.proto.services.task_svc.v1.GetTaskResponse.PatientR\x07patient\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12O\n\x08subtasks\x18\n \x03(\x0b\x32\x33.proto.services.task_svc.v1.GetTaskResponse.SubTaskR\x08subtasks\x12\'\n\x0forganization_id\x18\x0b \x01(\tR\x0eorganizationId\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedBy\x1a-\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\"9\n\x18GetTasksByPatientRequest\x12\x1d\n\npatient_id\x18\x01 \x01(\tR\tpatientId\"\x8b\x05\n\x19GetTasksByPatientResponse\x12P\n\x05tasks\x18\x01 \x03(\x0b\x32:.proto.services.task_svc.v1.GetTasksByPatientResponse.TaskR\x05tasks\x1a\x9b\x04\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12>\n\x06status\x18\x04 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusR\x06status\x12-\n\x10\x61ssigned_user_id\x18\x05 \x01(\tH\x00R\x0e\x61ssignedUserId\x88\x01\x01\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12^\n\x08subtasks\x18\n \x03(\x0b\x32\x42.proto.services.task_svc.v1.GetTasksByPatientResponse.Task.SubTaskR\x08subtasks\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedByB\x13\n\x11_assigned_user_id\"G\n&GetTasksByPatientSortedByStatusRequest\x12\x1d\n\npatient_id\x18\x01 \x01(\tR\tpatientId\"\xbc\x06\n\'GetTasksByPatientSortedByStatusResponse\x12\\\n\x04todo\x18\x01 \x03(\x0b\x32H.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.TaskR\x04todo\x12i\n\x0bin_progress\x18\x02 \x03(\x0b\x32H.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.TaskR\ninProgress\x12\\\n\x04\x64one\x18\x03 \x03(\x0b\x32H.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.TaskR\x04\x64one\x1a\xe9\x03\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12-\n\x10\x61ssigned_user_id\x18\x05 \x01(\tH\x00R\x0e\x61ssignedUserId\x88\x01\x01\x12\x1d\n\npatient_id\x18\x06 \x01(\tR\tpatientId\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12l\n\x08subtasks\x18\n \x03(\x0b\x32P.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse.Task.SubTaskR\x08subtasks\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedByB\x13\n\x11_assigned_user_id\"\x19\n\x17GetAssignedTasksRequest\"\xdb\x05\n\x18GetAssignedTasksResponse\x12O\n\x05tasks\x18\x01 \x03(\x0b\x32\x39.proto.services.task_svc.v1.GetAssignedTasksResponse.TaskR\x05tasks\x1a\xed\x04\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12>\n\x06status\x18\x04 \x01(\x0e\x32&.proto.services.task_svc.v1.TaskStatusR\x06status\x12(\n\x10\x61ssigned_user_id\x18\x05 \x01(\tR\x0e\x61ssignedUserId\x12[\n\x07patient\x18\x06 \x01(\x0b\x32\x41.proto.services.task_svc.v1.GetAssignedTasksResponse.Task.PatientR\x07patient\x12\x16\n\x06public\x18\x07 \x01(\x08R\x06public\x12\x31\n\x06\x64ue_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x05\x64ueAt\x12\x1d\n\ncreated_by\x18\t \x01(\tR\tcreatedBy\x12]\n\x08subtasks\x18\n \x03(\x0b\x32\x41.proto.services.task_svc.v1.GetAssignedTasksResponse.Task.SubTaskR\x08subtasks\x1a-\n\x07Patient\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x1a`\n\x07SubTask\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n\x04\x64one\x18\x03 \x01(\x08R\x04\x64one\x12\x1d\n\ncreated_by\x18\x04 \x01(\tR\tcreatedBy\"\xe7\x01\n\x11UpdateTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n\x04name\x18\x02 \x01(\tH\x00R\x04name\x88\x01\x01\x12%\n\x0b\x64\x65scription\x18\x03 \x01(\tH\x01R\x0b\x64\x65scription\x88\x01\x01\x12\x36\n\x06\x64ue_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02R\x05\x64ueAt\x88\x01\x01\x12\x1b\n\x06public\x18\x05 \x01(\x08H\x03R\x06public\x88\x01\x01\x42\x07\n\x05_nameB\x0e\n\x0c_descriptionB\t\n\x07_due_atB\t\n\x07_public\"\x14\n\x12UpdateTaskResponse\"b\n\x11\x41\x64\x64SubTaskRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12\x17\n\x07task_id\x18\x02 \x01(\tR\x06taskId\x12\x17\n\x04\x64one\x18\x03 \x01(\x08H\x00R\x04\x64one\x88\x01\x01\x42\x07\n\x05_done\"$\n\x12\x41\x64\x64SubTaskResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"&\n\x14RemoveSubTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15RemoveSubTaskResponse\"H\n\x14UpdateSubTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n\x04name\x18\x02 \x01(\tH\x00R\x04name\x88\x01\x01\x42\x07\n\x05_name\"\x17\n\x15UpdateSubTaskResponse\"&\n\x14SubTaskToToDoRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15SubTaskToToDoResponse\"&\n\x14SubTaskToDoneRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15SubTaskToDoneResponse\"#\n\x11TaskToToDoRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x14\n\x12TaskToToDoResponse\")\n\x17TaskToInProgressRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x1a\n\x18TaskToInProgressResponse\"#\n\x11TaskToDoneRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x14\n\x12TaskToDoneResponse\"B\n\x17\x41ssignTaskToUserRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x17\n\x07user_id\x18\x02 \x01(\tR\x06userId\"\x1a\n\x18\x41ssignTaskToUserResponse\"-\n\x1bUnassignTaskFromUserRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x1e\n\x1cUnassignTaskFromUserResponse\"$\n\x12PublishTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x15\n\x13PublishTaskResponse\"&\n\x14UnpublishTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x17\n\x15UnpublishTaskResponse\"#\n\x11\x44\x65leteTaskRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\"\x14\n\x12\x44\x65leteTaskResponse*r\n\nTaskStatus\x12\x1b\n\x17TASK_STATUS_UNSPECIFIED\x10\x00\x12\x14\n\x10TASK_STATUS_TODO\x10\x01\x12\x1b\n\x17TASK_STATUS_IN_PROGRESS\x10\x02\x12\x14\n\x10TASK_STATUS_DONE\x10\x03\x32\x9c\x12\n\x0bTaskService\x12m\n\nCreateTask\x12-.proto.services.task_svc.v1.CreateTaskRequest\x1a..proto.services.task_svc.v1.CreateTaskResponse\"\x00\x12\x64\n\x07GetTask\x12*.proto.services.task_svc.v1.GetTaskRequest\x1a+.proto.services.task_svc.v1.GetTaskResponse\"\x00\x12\x82\x01\n\x11GetTasksByPatient\x12\x34.proto.services.task_svc.v1.GetTasksByPatientRequest\x1a\x35.proto.services.task_svc.v1.GetTasksByPatientResponse\"\x00\x12\xac\x01\n\x1fGetTasksByPatientSortedByStatus\x12\x42.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusRequest\x1a\x43.proto.services.task_svc.v1.GetTasksByPatientSortedByStatusResponse\"\x00\x12\x7f\n\x10GetAssignedTasks\x12\x33.proto.services.task_svc.v1.GetAssignedTasksRequest\x1a\x34.proto.services.task_svc.v1.GetAssignedTasksResponse\"\x00\x12m\n\nUpdateTask\x12-.proto.services.task_svc.v1.UpdateTaskRequest\x1a..proto.services.task_svc.v1.UpdateTaskResponse\"\x00\x12m\n\nAddSubTask\x12-.proto.services.task_svc.v1.AddSubTaskRequest\x1a..proto.services.task_svc.v1.AddSubTaskResponse\"\x00\x12v\n\rRemoveSubTask\x12\x30.proto.services.task_svc.v1.RemoveSubTaskRequest\x1a\x31.proto.services.task_svc.v1.RemoveSubTaskResponse\"\x00\x12v\n\rUpdateSubTask\x12\x30.proto.services.task_svc.v1.UpdateSubTaskRequest\x1a\x31.proto.services.task_svc.v1.UpdateSubTaskResponse\"\x00\x12v\n\rSubTaskToToDo\x12\x30.proto.services.task_svc.v1.SubTaskToToDoRequest\x1a\x31.proto.services.task_svc.v1.SubTaskToToDoResponse\"\x00\x12v\n\rSubTaskToDone\x12\x30.proto.services.task_svc.v1.SubTaskToDoneRequest\x1a\x31.proto.services.task_svc.v1.SubTaskToDoneResponse\"\x00\x12m\n\nTaskToToDo\x12-.proto.services.task_svc.v1.TaskToToDoRequest\x1a..proto.services.task_svc.v1.TaskToToDoResponse\"\x00\x12\x7f\n\x10TaskToInProgress\x12\x33.proto.services.task_svc.v1.TaskToInProgressRequest\x1a\x34.proto.services.task_svc.v1.TaskToInProgressResponse\"\x00\x12m\n\nTaskToDone\x12-.proto.services.task_svc.v1.TaskToDoneRequest\x1a..proto.services.task_svc.v1.TaskToDoneResponse\"\x00\x12\x7f\n\x10\x41ssignTaskToUser\x12\x33.proto.services.task_svc.v1.AssignTaskToUserRequest\x1a\x34.proto.services.task_svc.v1.AssignTaskToUserResponse\"\x00\x12\x8b\x01\n\x14UnassignTaskFromUser\x12\x37.proto.services.task_svc.v1.UnassignTaskFromUserRequest\x1a\x38.proto.services.task_svc.v1.UnassignTaskFromUserResponse\"\x00\x12p\n\x0bPublishTask\x12..proto.services.task_svc.v1.PublishTaskRequest\x1a/.proto.services.task_svc.v1.PublishTaskResponse\"\x00\x12v\n\rUnpublishTask\x12\x30.proto.services.task_svc.v1.UnpublishTaskRequest\x1a\x31.proto.services.task_svc.v1.UnpublishTaskResponse\"\x00\x12m\n\nDeleteTask\x12-.proto.services.task_svc.v1.DeleteTaskRequest\x1a..proto.services.task_svc.v1.DeleteTaskResponse\"\x00\x42\xd2\x01\n\x1e\x63om.proto.services.task_svc.v1B\x0cTaskSvcProtoP\x01Z\x1bgen/proto/services/task-svc\xa2\x02\x03PST\xaa\x02\x19Proto.Services.TaskSvc.V1\xca\x02\x19Proto\\Services\\TaskSvc\\V1\xe2\x02%Proto\\Services\\TaskSvc\\V1\\GPBMetadata\xea\x02\x1cProto::Services::TaskSvc::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,8 +23,8 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\n\036com.proto.services.task_svc.v1B\014TaskSvcProtoP\001Z\033gen/proto/services/task-svc\242\002\003PST\252\002\031Proto.Services.TaskSvc.V1\312\002\031Proto\\Services\\TaskSvc\\V1\342\002%Proto\\Services\\TaskSvc\\V1\\GPBMetadata\352\002\034Proto::Services::TaskSvc::V1' - _globals['_TASKSTATUS']._serialized_start=4695 - _globals['_TASKSTATUS']._serialized_end=4809 + _globals['_TASKSTATUS']._serialized_start=4747 + _globals['_TASKSTATUS']._serialized_end=4861 _globals['_CREATETASKREQUEST']._serialized_start=107 _globals['_CREATETASKREQUEST']._serialized_end=410 _globals['_CREATETASKRESPONSE']._serialized_start=412 @@ -40,85 +40,85 @@ _globals['_GETTASKSBYPATIENTREQUEST']._serialized_start=1132 _globals['_GETTASKSBYPATIENTREQUEST']._serialized_end=1189 _globals['_GETTASKSBYPATIENTRESPONSE']._serialized_start=1192 - _globals['_GETTASKSBYPATIENTRESPONSE']._serialized_end=1817 + _globals['_GETTASKSBYPATIENTRESPONSE']._serialized_end=1843 _globals['_GETTASKSBYPATIENTRESPONSE_TASK']._serialized_start=1304 - _globals['_GETTASKSBYPATIENTRESPONSE_TASK']._serialized_end=1817 + _globals['_GETTASKSBYPATIENTRESPONSE_TASK']._serialized_end=1843 _globals['_GETTASKSBYPATIENTRESPONSE_TASK_SUBTASK']._serialized_start=987 _globals['_GETTASKSBYPATIENTRESPONSE_TASK_SUBTASK']._serialized_end=1083 - _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSREQUEST']._serialized_start=1819 - _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSREQUEST']._serialized_end=1890 - _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE']._serialized_start=1893 - _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE']._serialized_end=2695 - _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE_TASK']._serialized_start=2232 - _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE_TASK']._serialized_end=2695 + _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSREQUEST']._serialized_start=1845 + _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSREQUEST']._serialized_end=1916 + _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE']._serialized_start=1919 + _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE']._serialized_end=2747 + _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE_TASK']._serialized_start=2258 + _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE_TASK']._serialized_end=2747 _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE_TASK_SUBTASK']._serialized_start=987 _globals['_GETTASKSBYPATIENTSORTEDBYSTATUSRESPONSE_TASK_SUBTASK']._serialized_end=1083 - _globals['_GETASSIGNEDTASKSREQUEST']._serialized_start=2697 - _globals['_GETASSIGNEDTASKSREQUEST']._serialized_end=2722 - _globals['_GETASSIGNEDTASKSRESPONSE']._serialized_start=2725 - _globals['_GETASSIGNEDTASKSRESPONSE']._serialized_end=3456 - _globals['_GETASSIGNEDTASKSRESPONSE_TASK']._serialized_start=2835 - _globals['_GETASSIGNEDTASKSRESPONSE_TASK']._serialized_end=3456 + _globals['_GETASSIGNEDTASKSREQUEST']._serialized_start=2749 + _globals['_GETASSIGNEDTASKSREQUEST']._serialized_end=2774 + _globals['_GETASSIGNEDTASKSRESPONSE']._serialized_start=2777 + _globals['_GETASSIGNEDTASKSRESPONSE']._serialized_end=3508 + _globals['_GETASSIGNEDTASKSRESPONSE_TASK']._serialized_start=2887 + _globals['_GETASSIGNEDTASKSRESPONSE_TASK']._serialized_end=3508 _globals['_GETASSIGNEDTASKSRESPONSE_TASK_PATIENT']._serialized_start=1085 _globals['_GETASSIGNEDTASKSRESPONSE_TASK_PATIENT']._serialized_end=1130 _globals['_GETASSIGNEDTASKSRESPONSE_TASK_SUBTASK']._serialized_start=987 _globals['_GETASSIGNEDTASKSRESPONSE_TASK_SUBTASK']._serialized_end=1083 - _globals['_UPDATETASKREQUEST']._serialized_start=3459 - _globals['_UPDATETASKREQUEST']._serialized_end=3690 - _globals['_UPDATETASKRESPONSE']._serialized_start=3692 - _globals['_UPDATETASKRESPONSE']._serialized_end=3712 - _globals['_ADDSUBTASKREQUEST']._serialized_start=3714 - _globals['_ADDSUBTASKREQUEST']._serialized_end=3812 - _globals['_ADDSUBTASKRESPONSE']._serialized_start=3814 - _globals['_ADDSUBTASKRESPONSE']._serialized_end=3850 - _globals['_REMOVESUBTASKREQUEST']._serialized_start=3852 - _globals['_REMOVESUBTASKREQUEST']._serialized_end=3890 - _globals['_REMOVESUBTASKRESPONSE']._serialized_start=3892 - _globals['_REMOVESUBTASKRESPONSE']._serialized_end=3915 - _globals['_UPDATESUBTASKREQUEST']._serialized_start=3917 - _globals['_UPDATESUBTASKREQUEST']._serialized_end=3989 - _globals['_UPDATESUBTASKRESPONSE']._serialized_start=3991 - _globals['_UPDATESUBTASKRESPONSE']._serialized_end=4014 - _globals['_SUBTASKTOTODOREQUEST']._serialized_start=4016 - _globals['_SUBTASKTOTODOREQUEST']._serialized_end=4054 - _globals['_SUBTASKTOTODORESPONSE']._serialized_start=4056 - _globals['_SUBTASKTOTODORESPONSE']._serialized_end=4079 - _globals['_SUBTASKTODONEREQUEST']._serialized_start=4081 - _globals['_SUBTASKTODONEREQUEST']._serialized_end=4119 - _globals['_SUBTASKTODONERESPONSE']._serialized_start=4121 - _globals['_SUBTASKTODONERESPONSE']._serialized_end=4144 - _globals['_TASKTOTODOREQUEST']._serialized_start=4146 - _globals['_TASKTOTODOREQUEST']._serialized_end=4181 - _globals['_TASKTOTODORESPONSE']._serialized_start=4183 - _globals['_TASKTOTODORESPONSE']._serialized_end=4203 - _globals['_TASKTOINPROGRESSREQUEST']._serialized_start=4205 - _globals['_TASKTOINPROGRESSREQUEST']._serialized_end=4246 - _globals['_TASKTOINPROGRESSRESPONSE']._serialized_start=4248 - _globals['_TASKTOINPROGRESSRESPONSE']._serialized_end=4274 - _globals['_TASKTODONEREQUEST']._serialized_start=4276 - _globals['_TASKTODONEREQUEST']._serialized_end=4311 - _globals['_TASKTODONERESPONSE']._serialized_start=4313 - _globals['_TASKTODONERESPONSE']._serialized_end=4333 - _globals['_ASSIGNTASKTOUSERREQUEST']._serialized_start=4335 - _globals['_ASSIGNTASKTOUSERREQUEST']._serialized_end=4401 - _globals['_ASSIGNTASKTOUSERRESPONSE']._serialized_start=4403 - _globals['_ASSIGNTASKTOUSERRESPONSE']._serialized_end=4429 - _globals['_UNASSIGNTASKFROMUSERREQUEST']._serialized_start=4431 - _globals['_UNASSIGNTASKFROMUSERREQUEST']._serialized_end=4476 - _globals['_UNASSIGNTASKFROMUSERRESPONSE']._serialized_start=4478 - _globals['_UNASSIGNTASKFROMUSERRESPONSE']._serialized_end=4508 - _globals['_PUBLISHTASKREQUEST']._serialized_start=4510 - _globals['_PUBLISHTASKREQUEST']._serialized_end=4546 - _globals['_PUBLISHTASKRESPONSE']._serialized_start=4548 - _globals['_PUBLISHTASKRESPONSE']._serialized_end=4569 - _globals['_UNPUBLISHTASKREQUEST']._serialized_start=4571 - _globals['_UNPUBLISHTASKREQUEST']._serialized_end=4609 - _globals['_UNPUBLISHTASKRESPONSE']._serialized_start=4611 - _globals['_UNPUBLISHTASKRESPONSE']._serialized_end=4634 - _globals['_DELETETASKREQUEST']._serialized_start=4636 - _globals['_DELETETASKREQUEST']._serialized_end=4671 - _globals['_DELETETASKRESPONSE']._serialized_start=4673 - _globals['_DELETETASKRESPONSE']._serialized_end=4693 - _globals['_TASKSERVICE']._serialized_start=4812 - _globals['_TASKSERVICE']._serialized_end=7144 + _globals['_UPDATETASKREQUEST']._serialized_start=3511 + _globals['_UPDATETASKREQUEST']._serialized_end=3742 + _globals['_UPDATETASKRESPONSE']._serialized_start=3744 + _globals['_UPDATETASKRESPONSE']._serialized_end=3764 + _globals['_ADDSUBTASKREQUEST']._serialized_start=3766 + _globals['_ADDSUBTASKREQUEST']._serialized_end=3864 + _globals['_ADDSUBTASKRESPONSE']._serialized_start=3866 + _globals['_ADDSUBTASKRESPONSE']._serialized_end=3902 + _globals['_REMOVESUBTASKREQUEST']._serialized_start=3904 + _globals['_REMOVESUBTASKREQUEST']._serialized_end=3942 + _globals['_REMOVESUBTASKRESPONSE']._serialized_start=3944 + _globals['_REMOVESUBTASKRESPONSE']._serialized_end=3967 + _globals['_UPDATESUBTASKREQUEST']._serialized_start=3969 + _globals['_UPDATESUBTASKREQUEST']._serialized_end=4041 + _globals['_UPDATESUBTASKRESPONSE']._serialized_start=4043 + _globals['_UPDATESUBTASKRESPONSE']._serialized_end=4066 + _globals['_SUBTASKTOTODOREQUEST']._serialized_start=4068 + _globals['_SUBTASKTOTODOREQUEST']._serialized_end=4106 + _globals['_SUBTASKTOTODORESPONSE']._serialized_start=4108 + _globals['_SUBTASKTOTODORESPONSE']._serialized_end=4131 + _globals['_SUBTASKTODONEREQUEST']._serialized_start=4133 + _globals['_SUBTASKTODONEREQUEST']._serialized_end=4171 + _globals['_SUBTASKTODONERESPONSE']._serialized_start=4173 + _globals['_SUBTASKTODONERESPONSE']._serialized_end=4196 + _globals['_TASKTOTODOREQUEST']._serialized_start=4198 + _globals['_TASKTOTODOREQUEST']._serialized_end=4233 + _globals['_TASKTOTODORESPONSE']._serialized_start=4235 + _globals['_TASKTOTODORESPONSE']._serialized_end=4255 + _globals['_TASKTOINPROGRESSREQUEST']._serialized_start=4257 + _globals['_TASKTOINPROGRESSREQUEST']._serialized_end=4298 + _globals['_TASKTOINPROGRESSRESPONSE']._serialized_start=4300 + _globals['_TASKTOINPROGRESSRESPONSE']._serialized_end=4326 + _globals['_TASKTODONEREQUEST']._serialized_start=4328 + _globals['_TASKTODONEREQUEST']._serialized_end=4363 + _globals['_TASKTODONERESPONSE']._serialized_start=4365 + _globals['_TASKTODONERESPONSE']._serialized_end=4385 + _globals['_ASSIGNTASKTOUSERREQUEST']._serialized_start=4387 + _globals['_ASSIGNTASKTOUSERREQUEST']._serialized_end=4453 + _globals['_ASSIGNTASKTOUSERRESPONSE']._serialized_start=4455 + _globals['_ASSIGNTASKTOUSERRESPONSE']._serialized_end=4481 + _globals['_UNASSIGNTASKFROMUSERREQUEST']._serialized_start=4483 + _globals['_UNASSIGNTASKFROMUSERREQUEST']._serialized_end=4528 + _globals['_UNASSIGNTASKFROMUSERRESPONSE']._serialized_start=4530 + _globals['_UNASSIGNTASKFROMUSERRESPONSE']._serialized_end=4560 + _globals['_PUBLISHTASKREQUEST']._serialized_start=4562 + _globals['_PUBLISHTASKREQUEST']._serialized_end=4598 + _globals['_PUBLISHTASKRESPONSE']._serialized_start=4600 + _globals['_PUBLISHTASKRESPONSE']._serialized_end=4621 + _globals['_UNPUBLISHTASKREQUEST']._serialized_start=4623 + _globals['_UNPUBLISHTASKREQUEST']._serialized_end=4661 + _globals['_UNPUBLISHTASKRESPONSE']._serialized_start=4663 + _globals['_UNPUBLISHTASKRESPONSE']._serialized_end=4686 + _globals['_DELETETASKREQUEST']._serialized_start=4688 + _globals['_DELETETASKREQUEST']._serialized_end=4723 + _globals['_DELETETASKRESPONSE']._serialized_start=4725 + _globals['_DELETETASKRESPONSE']._serialized_end=4745 + _globals['_TASKSERVICE']._serialized_start=4864 + _globals['_TASKSERVICE']._serialized_end=7196 # @@protoc_insertion_point(module_scope) diff --git a/services/task-svc/go.mod b/services/task-svc/go.mod index a717b909a..53a57d1e4 100644 --- a/services/task-svc/go.mod +++ b/services/task-svc/go.mod @@ -25,7 +25,6 @@ require ( google.golang.org/grpc v1.60.1 google.golang.org/protobuf v1.31.0 gorm.io/gorm v1.25.5 - gorm.io/plugin/soft_delete v1.2.1 hwdb v0.0.0 hwes v0.0.0 hwgorm v0.0.0 diff --git a/services/task-svc/go.sum b/services/task-svc/go.sum index 58b4adb53..b5e743288 100644 --- a/services/task-svc/go.sum +++ b/services/task-svc/go.sum @@ -180,8 +180,6 @@ github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= @@ -214,8 +212,6 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-sqlite3 v1.14.3 h1:j7a/xn1U6TKA/PHHxqZuzh64CdtRc7rU9M+AvkOl5bA= -github.com/mattn/go-sqlite3 v1.14.3/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2 h1:SPoLlS9qUUnXcIY4pvA4CTwYjk0Is5f4UPEkeESr53k= github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUrjiz0MCtMV38jdMNW4doKSiBrEvCQQ= @@ -505,14 +501,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/postgres v1.5.4 h1:Iyrp9Meh3GmbSuyIAGyjkN+n9K+GHX9b9MqsTL4EJCo= gorm.io/driver/postgres v1.5.4/go.mod h1:Bgo89+h0CRcdA33Y6frlaHHVuTdOf87pmyzwW9C/BH0= -gorm.io/driver/sqlite v1.1.3 h1:BYfdVuZB5He/u9dt4qDpZqiqDJ6KhPqs5QUqsr/Eeuc= -gorm.io/driver/sqlite v1.1.3/go.mod h1:AKDgRWk8lcSQSw+9kxCJnX/yySj8G3rdwYlU57cB45c= -gorm.io/gorm v1.20.1/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= -gorm.io/gorm v1.23.0/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls= gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= -gorm.io/plugin/soft_delete v1.2.1 h1:qx9D/c4Xu6w5KT8LviX8DgLcB9hkKl6JC9f44Tj7cGU= -gorm.io/plugin/soft_delete v1.2.1/go.mod h1:Zv7vQctOJTGOsJ/bWgrN1n3od0GBAZgnLjEx+cApLGk= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/services/task-svc/integration_tests/12.GetPatientDetails.expected b/services/task-svc/integration_tests/12.GetPatientDetails.expected index 1de896f8a..198ea68fd 100644 --- a/services/task-svc/integration_tests/12.GetPatientDetails.expected +++ b/services/task-svc/integration_tests/12.GetPatientDetails.expected @@ -5,25 +5,6 @@ Assigned Patient, with tasks: "humanReadableIdentifier": "Clerc Levay", "notes": "Other extraarticular fracture of lower end of left radius, subsequent encounter for open fracture type I or II with nonunion", "tasks": [ - { - "id": "20863649-d855-4b0d-af4f-76199749c509", - "name": "Supplement L Metatarsotars Jt with Autol Sub, Perc Approach", - "status": "TASK_STATUS_DONE", - "assignedUserId": "8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9", - "patientId": "06f57c97-509e-4b41-9839-233f29197f56", - "subtasks": [ - { - "id": "539cae1d-29aa-4d87-aecf-ba4d5ad51da8", - "name": "Regional lymph node excision", - "done": true - }, - { - "id": "6c0f78df-ac07-4563-ada5-f0d8ae3c418f", - "name": "Other lysis of perivesical adhesions", - "done": true - } - ] - }, { "id": "1eaf1f03-d5b9-4f3a-b27f-f892c63886ec", "name": "Revision of Drain Dev in Tracheobronc Tree, Extern Approach", @@ -58,6 +39,25 @@ Assigned Patient, with tasks: } ] }, + { + "id": "20863649-d855-4b0d-af4f-76199749c509", + "name": "Supplement L Metatarsotars Jt with Autol Sub, Perc Approach", + "status": "TASK_STATUS_DONE", + "assignedUserId": "8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9", + "patientId": "06f57c97-509e-4b41-9839-233f29197f56", + "subtasks": [ + { + "id": "539cae1d-29aa-4d87-aecf-ba4d5ad51da8", + "name": "Regional lymph node excision", + "done": true + }, + { + "id": "6c0f78df-ac07-4563-ada5-f0d8ae3c418f", + "name": "Other lysis of perivesical adhesions", + "done": true + } + ] + }, { "id": "3023b697-b5e7-48b6-9c80-f5151e124ae4", "name": "Drainage of R Trunk Bursa/Lig, Open Approach, Diagn", @@ -117,15 +117,6 @@ Unassigned Patient, with tasks: } ] }, - { - "id": "f0566273-28e5-46f1-a85d-5ebd493a26de", - "name": "Drainage of Buccal Mucosa, Percutaneous Approach, Diagnostic", - "description": "Supplement Right Axilla with Synthetic Substitute, Percutaneous Endoscopic Approach", - "status": "TASK_STATUS_IN_PROGRESS", - "assignedUserId": "3e795d31-1912-4b09-8e5a-fd62a2461a8c", - "patientId": "2e830d2f-69c9-4e38-bd4b-ab43decc7ae3", - "public": true - }, { "id": "503b6598-a1f0-4a1f-b4b8-f37dea4ea9a9", "name": "Bypass Azygos Vein to Up Vein w Synth Sub, Perc Endo", @@ -139,6 +130,15 @@ Unassigned Patient, with tasks: "done": true } ] + }, + { + "id": "f0566273-28e5-46f1-a85d-5ebd493a26de", + "name": "Drainage of Buccal Mucosa, Percutaneous Approach, Diagnostic", + "description": "Supplement Right Axilla with Synthetic Substitute, Percutaneous Endoscopic Approach", + "status": "TASK_STATUS_IN_PROGRESS", + "assignedUserId": "3e795d31-1912-4b09-8e5a-fd62a2461a8c", + "patientId": "2e830d2f-69c9-4e38-bd4b-ab43decc7ae3", + "public": true } ] } diff --git a/services/task-svc/integration_tests/29.GetAssignedTasks.expected b/services/task-svc/integration_tests/29.GetAssignedTasks.expected index 393aad35b..55091371a 100644 --- a/services/task-svc/integration_tests/29.GetAssignedTasks.expected +++ b/services/task-svc/integration_tests/29.GetAssignedTasks.expected @@ -2,17 +2,40 @@ user: 8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9: { "tasks": [ { - "id": "cfdf8e12-7038-4580-9255-8fd51009f421", - "name": "Dilation of R Int Mamm Art, Bifurc, Open Approach", + "id": "283e2353-dbb5-4f9d-97e8-364a23d1ab2e", + "name": "Excision of Right Tarsal Joint, Percutaneous Approach", "status": "TASK_STATUS_IN_PROGRESS", - "assignedUserId": "531244c4-0500-4701-91ef-a03645ba92b2", + "assignedUserId": "8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9", "patient": { - "id": "f3c65081-1597-4b0b-bb7d-96256cf329fa", - "name": "Egbert Merriott" + "id": "53518dde-4fea-487c-946d-9aeedab4fd01", + "name": "Zorana Gery" }, - "public": true, - "dueAt": "2022-12-23T18:54:10Z", - "createdBy": "674217fc-05a6-4eec-ad7e-8a2d0dc8caa9" + "dueAt": "2024-01-15T15:52:58Z", + "createdBy": "3a82ae88-c43a-4ada-8659-9c5f372cb48d", + "subtasks": [ + { + "id": "69a82ad6-8063-44de-a115-5a43cb0d5a92", + "name": "Other operations on lacrimal system", + "createdBy": "531244c4-0500-4701-91ef-a03645ba92b2" + }, + { + "id": "6b5c985d-ef05-4c88-b552-bd6819216092", + "name": "Removal of embedded foreign body from conjunctiva by incision", + "done": true, + "createdBy": "8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9" + }, + { + "id": "12139a15-5158-4610-97a2-340dc9457236", + "name": "Removal of other urinary drainage device", + "createdBy": "5db6cc86-bbf1-4fa6-bbe8-a8cdea869758" + }, + { + "id": "be7cc5b7-afdc-40f7-a029-0772fa188c1a", + "name": "Anterior resection of rectum with synchronous colostomy", + "done": true, + "createdBy": "531244c4-0500-4701-91ef-a03645ba92b2" + } + ] }, { "id": "02d6632d-1a67-4182-992e-6384e00ac2d7", @@ -26,7 +49,43 @@ user: 8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9: }, "public": true, "dueAt": "2023-04-29T10:32:59Z", - "createdBy": "46697884-4792-49ff-b243-14a17eb5b871" + "createdBy": "46697884-4792-49ff-b243-14a17eb5b871", + "subtasks": [ + { + "id": "b66ca2da-ec1c-47a5-95f1-6ad7643fb1a7", + "name": "Symphysiotomy for horseshoe kidney", + "done": true, + "createdBy": "5db6cc86-bbf1-4fa6-bbe8-a8cdea869758" + } + ] + }, + { + "id": "7d4d16b2-f0d6-474d-9312-180e8734fc26", + "name": "Replacement of Low Tooth, All, with Synth Sub, Open Approach", + "description": "Release Tongue, Palate, Pharynx Muscle, Open Approach", + "status": "TASK_STATUS_IN_PROGRESS", + "assignedUserId": "8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9", + "patient": { + "id": "bf3ee02f-adba-4320-8fa6-dd9456585232", + "name": "Troy Whatling" + }, + "public": true, + "dueAt": "2024-11-20T23:26:08Z", + "createdBy": "df363387-7774-4592-b01c-2b765abaa86a" + }, + { + "id": "93665228-249f-4668-8ca6-2bb3b9936d96", + "name": "Occlusion of Colic Vein with Intralum Dev, Open Approach", + "description": "Insertion of Infusion Device into Right Lung, Percutaneous Approach", + "status": "TASK_STATUS_TODO", + "assignedUserId": "8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9", + "patient": { + "id": "2d977c7a-c0a8-4d06-b474-1824d440d8b4", + "name": "Dorothea Gurr" + }, + "public": true, + "dueAt": "2024-05-12T07:56:36Z", + "createdBy": "df363387-7774-4592-b01c-2b765abaa86a" } ] } @@ -34,94 +93,220 @@ user: 531244c4-0500-4701-91ef-a03645ba92b2: { "tasks": [ { - "id": "3b9e7844-6eee-4f7f-ba4d-2e0d977793c8", - "name": "Drainage of Cystic Duct, Perc Endo Approach, Diagn", - "status": "TASK_STATUS_TODO", + "id": "227c506a-c73b-4efc-bb88-6e119d87bf6b", + "name": "Excision of Right Middle Lobe Bronchus, Via Opening", + "description": "Drainage of Right Brachial Artery with Drainage Device, Open Approach", + "status": "TASK_STATUS_IN_PROGRESS", "assignedUserId": "531244c4-0500-4701-91ef-a03645ba92b2", "patient": { - "id": "04da6ed3-1082-4149-8b29-abbcde3cd6b5", - "name": "Lorain Marchiso" + "id": "2d977c7a-c0a8-4d06-b474-1824d440d8b4", + "name": "Dorothea Gurr" }, - "dueAt": "2024-06-18T17:45:44Z", - "createdBy": "674217fc-05a6-4eec-ad7e-8a2d0dc8caa9" + "dueAt": "2024-11-12T04:32:12Z", + "createdBy": "3a82ae88-c43a-4ada-8659-9c5f372cb48d", + "subtasks": [ + { + "id": "692d6de8-7fd7-4679-9fde-a7ae0b0a6a7b", + "name": "Reattachment of amputated ear", + "done": true, + "createdBy": "3e795d31-1912-4b09-8e5a-fd62a2461a8c" + } + ] }, { - "id": "ff04811d-e4f2-43a3-9d89-159b0541e436", - "name": "Removal of Autol Sub from Brain, Perc Approach", - "status": "TASK_STATUS_TODO", - "assignedUserId": "00000000-0000-0000-0000-000000000000", + "id": "b9c97686-edbb-46da-9f09-7d9c97186020", + "name": "Reattachment of Right Thorax Tendon, Open Approach", + "description": "Replacement of Nasal Turbinate with Autologous Tissue Substitute, Percutaneous Approach", + "status": "TASK_STATUS_DONE", + "assignedUserId": "531244c4-0500-4701-91ef-a03645ba92b2", "patient": { - "id": "4a2e5163-57a7-4a50-9ed7-981c119848d7", - "name": "Desiree Ert" + "id": "65708dab-983d-450a-8786-57b1336a2e9f", + "name": "Shawna Vondruska" }, - "dueAt": "2024-05-30T20:13:04Z", - "createdBy": "5db6cc86-bbf1-4fa6-bbe8-a8cdea869758" + "public": true, + "dueAt": "2023-11-29T07:08:28Z", + "createdBy": "8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9", + "subtasks": [ + { + "id": "74ba4f57-b222-439c-82ac-5a64467ac264", + "name": "Pericardiocentesis", + "createdBy": "3e795d31-1912-4b09-8e5a-fd62a2461a8c" + }, + { + "id": "50e79048-acaf-46b4-adb2-6f1b2754f2cb", + "name": "Other and open bilateral repair of inguinal hernia, one direct and one indirect, with graft or prosthesis", + "createdBy": "46697884-4792-49ff-b243-14a17eb5b871" + } + ] }, { - "id": "fbaaac31-0826-4289-b759-96a4f0d72401", - "name": "Extraction of Post Neck Subcu/Fascia, Perc Approach", - "description": "Removal of Autologous Tissue Substitute from Right Finger Phalangeal Joint, Percutaneous Approach", + "id": "6b7e7b0c-596f-499b-ae7b-e9f90dc60f4d", + "name": "Insertion of Radioactive Element into R Wrist, Open Approach", + "description": "Magnetic Resonance Imaging (MRI) of Neck using Other Contrast", "status": "TASK_STATUS_TODO", "assignedUserId": "531244c4-0500-4701-91ef-a03645ba92b2", "patient": { - "id": "4a2e5163-57a7-4a50-9ed7-981c119848d7", - "name": "Desiree Ert" + "id": "23edc7ee-5a0e-41ac-91b3-db21455b6e6b", + "name": "Janot Mabon" }, - "dueAt": "2024-10-24T15:23:21Z", - "createdBy": "46697884-4792-49ff-b243-14a17eb5b871" + "public": true, + "dueAt": "2023-05-13T05:08:24Z", + "createdBy": "3e795d31-1912-4b09-8e5a-fd62a2461a8c", + "subtasks": [ + { + "id": "c98735e7-988d-4151-9c8a-1abfcacf1eae", + "name": "Other lysis of peritoneal adhesions", + "createdBy": "46697884-4792-49ff-b243-14a17eb5b871" + }, + { + "id": "55914475-c913-453f-92d1-2a11cad57ae2", + "name": "Arthrodesis of shoulder", + "createdBy": "674217fc-05a6-4eec-ad7e-8a2d0dc8caa9" + }, + { + "id": "35a15a66-bad5-48af-829e-8df02f56c996", + "name": "Other excision or destruction of lesion or tissue of pancreas or pancreatic duct", + "createdBy": "3e795d31-1912-4b09-8e5a-fd62a2461a8c" + } + ] }, { - "id": "b2ed8f2b-1fc9-4bbe-8705-acf84850c6aa", - "name": "Drainage of Sigmoid Colon with Drain Dev, Perc Endo Approach", - "description": "Supplement Right Common Iliac Vein with Nonautologous Tissue Substitute, Percutaneous Endoscopic Approach", + "id": "bc5d1f18-5145-42b4-ba18-dc7242626fae", + "name": "Inspection of Right Wrist Joint, Open Approach", + "description": "Resection of Right Wrist Bursa and Ligament, Open Approach", + "status": "TASK_STATUS_DONE", + "assignedUserId": "531244c4-0500-4701-91ef-a03645ba92b2", + "patient": { + "id": "65708dab-983d-450a-8786-57b1336a2e9f", + "name": "Shawna Vondruska" + }, + "dueAt": "2024-09-10T21:27:34Z", + "createdBy": "3a82ae88-c43a-4ada-8659-9c5f372cb48d", + "subtasks": [ + { + "id": "f1d465c5-6f75-4b35-8719-05dd1dabca07", + "name": "Arteriography of femoral and other lower extremity arteries", + "done": true, + "createdBy": "3e795d31-1912-4b09-8e5a-fd62a2461a8c" + }, + { + "id": "2783544c-cac8-4b35-bea2-84666aa9c270", + "name": "Other evisceration of eyeball", + "done": true, + "createdBy": "531244c4-0500-4701-91ef-a03645ba92b2" + } + ] + }, + { + "id": "3b9e7844-6eee-4f7f-ba4d-2e0d977793c8", + "name": "Drainage of Cystic Duct, Perc Endo Approach, Diagn", "status": "TASK_STATUS_TODO", - "assignedUserId": "22b47b87-aadf-4e81-802d-9e23489e696c", + "assignedUserId": "531244c4-0500-4701-91ef-a03645ba92b2", "patient": { - "id": "4a2e5163-57a7-4a50-9ed7-981c119848d7", - "name": "Desiree Ert" + "id": "04da6ed3-1082-4149-8b29-abbcde3cd6b5", + "name": "Lorain Marchiso" }, - "dueAt": "2024-11-18T07:54:24Z", - "createdBy": "8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9" + "dueAt": "2024-06-18T17:45:44Z", + "createdBy": "674217fc-05a6-4eec-ad7e-8a2d0dc8caa9", + "subtasks": [ + { + "id": "f2681cab-88c2-4fa8-b28a-399cacf8c9c5", + "name": "Noninvasive programmed electrical stimulation [NIPS]", + "done": true, + "createdBy": "674217fc-05a6-4eec-ad7e-8a2d0dc8caa9" + }, + { + "id": "89d3e368-6b4e-4d11-b9cd-74e1c4411072", + "name": "Microscopic examination of specimen from other site, culture", + "createdBy": "3a82ae88-c43a-4ada-8659-9c5f372cb48d" + }, + { + "id": "7b2e28c8-0b55-4299-b4b1-90a828734805", + "name": "Partial gastrectomy with anastomosis to esophagus", + "createdBy": "674217fc-05a6-4eec-ad7e-8a2d0dc8caa9" + } + ] }, { - "id": "25c84b6d-b499-4b2a-9b8f-05ab144e353c", - "name": "Insertion of Ext Fix into L Patella, Perc Endo Approach", - "description": "Supplement Tibial Nerve with Autologous Tissue Substitute, Open Approach", + "id": "5bbda217-668f-498c-9a52-8f3a7fa6f772", + "name": "Revise of Infusion Dev in Vagina \u0026 Cul-de-sac, Perc Approach", "status": "TASK_STATUS_TODO", - "assignedUserId": "3e795d31-1912-4b09-8e5a-fd62a2461a8c", + "assignedUserId": "531244c4-0500-4701-91ef-a03645ba92b2", "patient": { - "id": "4a2e5163-57a7-4a50-9ed7-981c119848d7", - "name": "Desiree Ert" + "id": "de70d0d0-94da-4d00-9dfc-54723320fe47", + "name": "Gabriel Crotty" }, - "public": true, - "dueAt": "2023-05-16T11:53:06Z", - "createdBy": "00000000-0000-0000-0000-000000000000" + "dueAt": "2024-07-04T17:45:21Z", + "createdBy": "22b47b87-aadf-4e81-802d-9e23489e696c", + "subtasks": [ + { + "id": "1ce99fa5-efbb-4890-8e61-2b0f5890d761", + "name": "Arthroplasty of carpocarpal or carpometacarpal joint with implant", + "done": true, + "createdBy": "531244c4-0500-4701-91ef-a03645ba92b2" + } + ] }, { - "id": "249a1021-73ae-4996-a701-9a19603cec21", - "name": "Transplantation of Bilateral Lungs, Syngeneic, Open Approach", + "id": "2b32ad4a-100b-4cca-a4aa-90b53d12ccc2", + "name": "Revision of Nonaut Sub in R Low Extrem, Perc Endo Approach", + "description": "Resection of Jejunum, Open Approach", + "status": "TASK_STATUS_IN_PROGRESS", + "assignedUserId": "531244c4-0500-4701-91ef-a03645ba92b2", + "patient": { + "id": "bf3ee02f-adba-4320-8fa6-dd9456585232", + "name": "Troy Whatling" + }, + "dueAt": "2023-02-02T02:31:16Z", + "createdBy": "df363387-7774-4592-b01c-2b765abaa86a", + "subtasks": [ + { + "id": "3f70d251-eea0-4859-955b-0a7e6d06447f", + "name": "(Aorto)coronary bypass of two coronary arteries", + "createdBy": "8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9" + } + ] + }, + { + "id": "fbaaac31-0826-4289-b759-96a4f0d72401", + "name": "Extraction of Post Neck Subcu/Fascia, Perc Approach", + "description": "Removal of Autologous Tissue Substitute from Right Finger Phalangeal Joint, Percutaneous Approach", "status": "TASK_STATUS_TODO", "assignedUserId": "531244c4-0500-4701-91ef-a03645ba92b2", "patient": { - "id": "707aa958-b3b5-485a-83ab-bbd030605bf5", - "name": "Cosetta Enrico" + "id": "4a2e5163-57a7-4a50-9ed7-981c119848d7", + "name": "Desiree Ert" }, - "public": true, - "dueAt": "2022-12-27T11:56:37Z", - "createdBy": "8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9" + "dueAt": "2024-10-24T15:23:21Z", + "createdBy": "46697884-4792-49ff-b243-14a17eb5b871", + "subtasks": [ + { + "id": "5e89560d-149f-4de7-802b-df1d34d2cc97", + "name": "Other turbinectomy", + "done": true, + "createdBy": "00000000-0000-0000-0000-000000000000" + } + ] }, { - "id": "87a6446e-fcea-4c09-aa4f-bf3d529cebde", - "name": "Dilate Sup Mesent Art, Bifurc, w 3 Drug-elut, Open", + "id": "2788364b-6bdf-4b8d-aa01-041b1b80533e", + "name": "Detachment at Right Upper Leg, High, Open Approach", + "description": "Insertion of Spacer into Right Temporomandibular Joint, Percutaneous Approach", "status": "TASK_STATUS_TODO", - "assignedUserId": "3e795d31-1912-4b09-8e5a-fd62a2461a8c", + "assignedUserId": "531244c4-0500-4701-91ef-a03645ba92b2", "patient": { - "id": "707aa958-b3b5-485a-83ab-bbd030605bf5", - "name": "Cosetta Enrico" + "id": "23edc7ee-5a0e-41ac-91b3-db21455b6e6b", + "name": "Janot Mabon" }, - "public": true, - "dueAt": "2025-04-10T01:51:04Z", - "createdBy": "674217fc-05a6-4eec-ad7e-8a2d0dc8caa9" + "dueAt": "2025-01-24T07:27:54Z", + "createdBy": "531244c4-0500-4701-91ef-a03645ba92b2", + "subtasks": [ + { + "id": "62b512ed-11c9-4c0e-99ff-5531418fb675", + "name": "Local excision of esophageal diverticulum", + "createdBy": "5db6cc86-bbf1-4fa6-bbe8-a8cdea869758" + } + ] }, { "id": "cfdf8e12-7038-4580-9255-8fd51009f421", @@ -137,18 +322,30 @@ user: 531244c4-0500-4701-91ef-a03645ba92b2: "createdBy": "674217fc-05a6-4eec-ad7e-8a2d0dc8caa9" }, { - "id": "02d6632d-1a67-4182-992e-6384e00ac2d7", - "name": "Dilation of Abdominal Aorta with 2 Drug-elut, Perc Approach", - "description": "Extirpation of Matter from Coccygeal Joint, Percutaneous Endoscopic Approach", - "status": "TASK_STATUS_DONE", - "assignedUserId": "8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9", + "id": "39203936-ae8d-43f1-b5ad-a306461e865d", + "name": "Repair Buccal Mucosa, External Approach", + "description": "Revision of Infusion Device in Prostate and Seminal Vesicles, External Approach", + "status": "TASK_STATUS_IN_PROGRESS", + "assignedUserId": "531244c4-0500-4701-91ef-a03645ba92b2", "patient": { - "id": "f3c65081-1597-4b0b-bb7d-96256cf329fa", - "name": "Egbert Merriott" + "id": "b1f373b9-30f4-4e77-a202-bb392b4080d3", + "name": "Corissa Bruins" + }, + "dueAt": "2023-08-27T21:01:27Z", + "createdBy": "22b47b87-aadf-4e81-802d-9e23489e696c" + }, + { + "id": "249a1021-73ae-4996-a701-9a19603cec21", + "name": "Transplantation of Bilateral Lungs, Syngeneic, Open Approach", + "status": "TASK_STATUS_TODO", + "assignedUserId": "531244c4-0500-4701-91ef-a03645ba92b2", + "patient": { + "id": "707aa958-b3b5-485a-83ab-bbd030605bf5", + "name": "Cosetta Enrico" }, "public": true, - "dueAt": "2023-04-29T10:32:59Z", - "createdBy": "46697884-4792-49ff-b243-14a17eb5b871" + "dueAt": "2022-12-27T11:56:37Z", + "createdBy": "8aa8a5ee-2a35-4203-81bb-baf4ca17a9e9" } ] } diff --git a/services/task-svc/internal/models/bed_models.go b/services/task-svc/internal/models/bed_models.go deleted file mode 100644 index d2c03c4d8..000000000 --- a/services/task-svc/internal/models/bed_models.go +++ /dev/null @@ -1,14 +0,0 @@ -package models - -import ( - "github.com/google/uuid" -) - -type Bed struct { - ID uuid.UUID `gorm:"column:id;default:uuid_generate_v4()"` - RoomID uuid.UUID `gorm:"column:room_id"` - Room *Room `gorm:"foreignKey:RoomID"` - Patient *Patient `gorm:"foreignKey:BedID"` - OrganizationID uuid.UUID `gorm:"column:organization_id"` - Name string `gorm:"column:name"` -} diff --git a/services/task-svc/internal/models/patient_models.go b/services/task-svc/internal/models/patient_models.go deleted file mode 100644 index 5a6e449f2..000000000 --- a/services/task-svc/internal/models/patient_models.go +++ /dev/null @@ -1,24 +0,0 @@ -package models - -import ( - "github.com/google/uuid" - "gorm.io/plugin/soft_delete" - "time" -) - -type PatientBase struct { - HumanReadableIdentifier string `gorm:"column:human_readable_identifier"` - Notes string `gorm:"column:notes"` -} - -type Patient struct { - PatientBase - ID uuid.UUID `gorm:"column:id;default:uuid_generate_v4()"` - OrganizationID uuid.UUID `gorm:"column:organization_id"` - BedID *uuid.UUID `gorm:"column:bed_id;default:NULL"` - Bed *Bed `gorm:"foreignKey:BedID"` - Tasks []Task `gorm:"foreignKey:PatientId"` - IsDischarged soft_delete.DeletedAt `gorm:"column:is_discharged;softDelete:flag;default:0"` - CreatedAt time.Time - UpdatedAt time.Time -} diff --git a/services/task-svc/internal/models/room_models.go b/services/task-svc/internal/models/room_models.go deleted file mode 100644 index e1a4580ee..000000000 --- a/services/task-svc/internal/models/room_models.go +++ /dev/null @@ -1,18 +0,0 @@ -package models - -import ( - "github.com/google/uuid" -) - -type RoomBase struct { - Name string `gorm:"column:name"` -} - -type Room struct { - RoomBase - ID uuid.UUID `gorm:"column:id;default:uuid_generate_v4()"` - OrganizationID uuid.UUID `gorm:"column:organization_id"` - Beds []Bed `gorm:"foreignKey:RoomID"` - WardID uuid.UUID `gorm:"column:ward_id"` - Ward *Ward `gorm:"foreignKey:WardID"` -} diff --git a/services/task-svc/internal/models/task_models.go b/services/task-svc/internal/models/task_models.go deleted file mode 100644 index f471cc647..000000000 --- a/services/task-svc/internal/models/task_models.go +++ /dev/null @@ -1,33 +0,0 @@ -package models - -import ( - pb "gen/proto/services/task_svc/v1" - "github.com/google/uuid" - "time" -) - -type TaskBase struct { - Name string `gorm:"column:name"` - Description string `gorm:"column:description;default:''"` - Status pb.TaskStatus `gorm:"column:status"` -} - -type Task struct { - TaskBase - ID uuid.UUID `gorm:"column:id;default:uuid_generate_v4()"` - OrganizationID uuid.UUID `gorm:"column:organization_id"` - AssignedUserId uuid.NullUUID `gorm:"column:assigned_user_id;default:NULL"` - PatientId uuid.UUID `gorm:"column:patient_id"` - Subtasks []Subtask `gorm:"foreignKey:TaskID"` - Public bool `gorm:"column:public;default:False"` - CreatedBy uuid.UUID `gorm:"column:created_by"` - DueAt time.Time `gorm:"column:due_at"` -} - -type Subtask struct { - ID uuid.UUID `gorm:"column:id;default:uuid_generate_v4()"` - TaskID uuid.UUID `gorm:"column:task_id"` - Name string `gorm:"column:name"` - Done bool `gorm:"column:done;default:False"` - CreatedBy uuid.UUID `gorm:"column:created_by"` -} diff --git a/services/task-svc/internal/models/ward_models.go b/services/task-svc/internal/models/ward_models.go deleted file mode 100644 index d38dc2a6b..000000000 --- a/services/task-svc/internal/models/ward_models.go +++ /dev/null @@ -1,14 +0,0 @@ -package models - -import "github.com/google/uuid" - -type WardBase struct { - Name string `gorm:"column:name"` -} - -type Ward struct { - WardBase - ID uuid.UUID `gorm:"column:id;default:uuid_generate_v4()"` - OrganizationID uuid.UUID `gorm:"column:organization_id"` - Rooms []Room `gorm:"foreignKey:WardID"` -} diff --git a/services/task-svc/internal/patient/patient.go b/services/task-svc/internal/patient/patient.go index 5461d2b2e..edba465b7 100644 --- a/services/task-svc/internal/patient/patient.go +++ b/services/task-svc/internal/patient/patient.go @@ -7,12 +7,11 @@ import ( "hwdb" "hwgorm" "hwutil" - "task-svc/internal/models" - "task-svc/internal/repositories" "task-svc/internal/tracking" "task-svc/repos/bed_repo" "task-svc/repos/patient_repo" "task-svc/repos/room_repo" + "task-svc/repos/task_repo" "github.com/google/uuid" zlog "github.com/rs/zerolog/log" @@ -436,16 +435,21 @@ func (ServiceServer) DischargePatient(ctx context.Context, req *pb.DischargePati func (ServiceServer) GetPatientDetails(ctx context.Context, req *pb.GetPatientDetailsRequest) (*pb.GetPatientDetailsResponse, error) { patientRepo := patient_repo.New(hwdb.GetDB()) - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth - patientId, err := uuid.Parse(req.Id) + organizationID, err := common.GetOrganizationID(ctx) + if err != nil { + return nil, err + } + + patientID, err := uuid.Parse(req.Id) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) } - patientRes, err := hwdb.Optional(patientRepo.GetPatientWithBedAndRoom)(ctx, patientId) + patientRes, err := hwdb.Optional(patientRepo.GetPatientWithBedAndRoom)(ctx, patientID) if patientRes == nil { return nil, status.Error(codes.InvalidArgument, "patient not found") } @@ -453,40 +457,55 @@ func (ServiceServer) GetPatientDetails(ctx context.Context, req *pb.GetPatientDe return nil, status.Error(codes.Internal, err.Error()) } - tasks, err := taskRepo.GetTasksWithSubTasksByPatient(patientId) + taskRows, err := taskRepo.GetTasksWithSubTasksByPatient(ctx, task_repo.GetTasksWithSubTasksByPatientParams{ + PatientID: patientID, + OrganizationID: organizationID, + }) if err != nil { return nil, err } - var mappedTasks = hwutil.Map(tasks, func(task models.Task) *pb.GetPatientDetailsResponse_Task { - var mappedSubtasks = hwutil.Map(task.Subtasks, func(subtask models.Subtask) *pb.GetPatientDetailsResponse_Task_SubTask { - return &pb.GetPatientDetailsResponse_Task_SubTask{ - Id: subtask.ID.String(), - Done: subtask.Done, - Name: subtask.Name, + tasks := make([]*pb.GetPatientDetailsResponse_Task, 0) + taskMap := make(map[uuid.UUID]int) + + for _, row := range taskRows { + var task *pb.GetPatientDetailsResponse_Task + if ix, exists := taskMap[row.Task.ID]; exists { + task = tasks[ix] + } else { + task = &pb.GetPatientDetailsResponse_Task{ + Id: row.Task.ID.String(), + Name: row.Task.Name, + Description: row.Task.Description, + Status: pb.GetPatientDetailsResponse_TaskStatus(row.Task.Status), + AssignedUserId: hwutil.NullUUIDToStringPtr(row.Task.AssignedUserID), + PatientId: row.Task.PatientID.String(), + Public: row.Task.Public, + Subtasks: make([]*pb.GetPatientDetailsResponse_Task_SubTask, 0), } - }) - return &pb.GetPatientDetailsResponse_Task{ - Id: task.ID.String(), - Name: task.Name, - Description: task.Description, - Status: pb.GetPatientDetailsResponse_TaskStatus(task.Status), - AssignedUserId: task.AssignedUserId.UUID.String(), - PatientId: task.PatientId.String(), - Subtasks: mappedSubtasks, - Public: task.Public, + tasks = append(tasks, task) + taskMap[row.Task.ID] = len(tasks) - 1 } - }) + + if !row.SubtaskID.Valid { + continue + } + task.Subtasks = append(task.Subtasks, &pb.GetPatientDetailsResponse_Task_SubTask{ + Id: row.SubtaskID.UUID.String(), + Name: *row.SubtaskName, + Done: *row.SubtaskDone, + }) + } // TODO: check if tracking here makes sense or too much spam - tracking.AddPatientToRecentActivity(ctx, patientId.String()) + tracking.AddPatientToRecentActivity(ctx, patientID.String()) return &pb.GetPatientDetailsResponse{ Id: patientRes.ID.String(), HumanReadableIdentifier: patientRes.HumanReadableIdentifier, Notes: patientRes.Notes, Name: patientRes.HumanReadableIdentifier, // TODO replace later - Tasks: mappedTasks, + Tasks: tasks, WardId: hwutil.NullUUIDToStringPtr(patientRes.WardID), Room: hwutil.MapIf(patientRes.RoomID.Valid, *patientRes, func(res patient_repo.GetPatientWithBedAndRoomRow) pb.GetPatientDetailsResponse_Room { return pb.GetPatientDetailsResponse_Room{ diff --git a/services/task-svc/internal/repositories/task_repository.go b/services/task-svc/internal/repositories/task_repository.go deleted file mode 100644 index ca4ce6181..000000000 --- a/services/task-svc/internal/repositories/task_repository.go +++ /dev/null @@ -1,142 +0,0 @@ -package repositories - -import ( - "context" - "github.com/google/uuid" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "gorm.io/gorm" - "hwgorm" - "task-svc/internal/models" -) - -type TaskRepository struct { - db *gorm.DB -} - -func TaskRepo(ctx context.Context) TaskRepository { - return TaskRepository{ - db: hwgorm.GetDB(ctx), - } -} - -func (r *TaskRepository) CreateTask(task *models.Task) (*models.Task, error) { - query := r.db. - Create(task) - - if err := query.Error; err != nil { - return nil, err - } - return task, nil -} - -func (r *TaskRepository) CreateSubTask(subtask *models.Subtask) (*models.Subtask, error) { - query := r.db. - Create(subtask) - - if err := query.Error; err != nil { - return nil, err - } - return subtask, nil -} - -func (r *TaskRepository) GetTaskWithSubTasks(taskID uuid.UUID) (*models.Task, error) { - task := &models.Task{ID: taskID} - query := r.db. - Preload("Subtasks", func(db *gorm.DB) *gorm.DB { - return db.Order("creation_date ASC") - }). - First(task) - - if err := query.Error; err != nil { - return nil, err - } - return task, nil -} - -func (r *TaskRepository) GetTasksWithSubTasksByPatient(patientId uuid.UUID) ([]models.Task, error) { - var tasks []models.Task - - query := r.db. - Preload("Subtasks"). - Where("patient_id = ?", patientId). - Find(&tasks) - - if err := query.Error; err != nil { - return nil, err - } - return tasks, nil -} - -func (r *TaskRepository) GetTasksWithSubTasksByPatientForOrganization(patientID, organizationID uuid.UUID) ([]models.Task, error) { - var tasks []models.Task - query := r.db. - Preload("Subtasks"). - Where("patient_id = ? AND organization_id = ?", patientID, organizationID). - Find(&tasks) - - if err := query.Error; err != nil { - return nil, err - } - return tasks, nil -} - -// GetPatientsWithTasksByAssignee -func (r *TaskRepository) GetPatientsWithTasksByAssignee(ctx context.Context, assigneeID uuid.UUID) ([]models.Patient, error) { - db := hwgorm.GetDB(ctx) - var patients []models.Patient - if err := db. - Table("patients"). - Group("patients.id"). - Joins("JOIN tasks ON patients.id = tasks.patient_id"). - Where("tasks.assigned_user_id = ?", assigneeID). - Preload("Tasks"). - Find(&patients).Error; err != nil { - if hwgorm.IsOurFault(err) { - return nil, status.Error(codes.Internal, err.Error()) - } else { - return nil, status.Error(codes.InvalidArgument, "id not found") - } - } - return patients, nil -} - -func (r *TaskRepository) UpdateTask(taskID uuid.UUID, updates map[string]interface{}) (*models.Task, error) { - task := &models.Task{ID: taskID} - query := r.db. - Model(task). - Updates(updates) - - if err := query.Error; err != nil { - return nil, err - } - return task, nil -} - -func (r *TaskRepository) UpdateSubTask(subtaskID uuid.UUID, updates map[string]interface{}) (*models.Subtask, error) { - subtask := &models.Subtask{ID: subtaskID} - query := r.db. - Model(subtask). - Updates(updates) - - if err := query.Error; err != nil { - return nil, err - } - return subtask, nil -} - -func (r *TaskRepository) DeleteTask(taskID uuid.UUID) error { - task := &models.Task{ID: taskID} - query := r.db. - Delete(task) - - return query.Error -} - -func (r *TaskRepository) DeleteSubTask(subtaskID uuid.UUID) error { - subtask := &models.Subtask{ID: subtaskID} - query := r.db. - Delete(subtask) - - return query.Error -} diff --git a/services/task-svc/internal/task/task.go b/services/task-svc/internal/task/task.go index e3d0372ef..a1365aae9 100644 --- a/services/task-svc/internal/task/task.go +++ b/services/task-svc/internal/task/task.go @@ -4,20 +4,16 @@ import ( "common" "context" pb "gen/proto/services/task_svc/v1" - "hwdb" - "hwgorm" - "hwutil" - pbhelpers "proto_helpers/task_svc/v1" - "task-svc/internal/events" - "task-svc/internal/models" - "task-svc/internal/repositories" - "task-svc/repos/patient_repo" - "github.com/google/uuid" zlog "github.com/rs/zerolog/log" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/timestamppb" + "hwdb" + "hwutil" + "task-svc/internal/events" + "task-svc/repos/patient_repo" + "task-svc/repos/task_repo" ) type ServiceServer struct { @@ -31,7 +27,7 @@ func NewServiceServer() *ServiceServer { func (s ServiceServer) CreateTask(ctx context.Context, req *pb.CreateTaskRequest) (*pb.CreateTaskResponse, error) { log := zlog.Ctx(ctx) patientRepo := patient_repo.New(hwdb.GetDB()) - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -76,17 +72,15 @@ func (s ServiceServer) CreateTask(ctx context.Context, req *pb.CreateTaskRequest } } - task, err := taskRepo.CreateTask(&models.Task{ - TaskBase: models.TaskBase{ - Name: req.Name, - Description: description, - Status: initialStatus, - }, - PatientId: patientId, + taskId, err := taskRepo.CreateTask(ctx, task_repo.CreateTaskParams{ + Name: req.Name, + Description: description, + Status: int32(initialStatus), + PatientID: patientId, + Public: req.Public, OrganizationID: organizationID, CreatedBy: userID, - DueAt: req.DueAt.AsTime(), - Public: req.Public, + DueAt: hwdb.TimeToTimestamp(req.DueAt.AsTime()), }) if err != nil { @@ -94,18 +88,17 @@ func (s ServiceServer) CreateTask(ctx context.Context, req *pb.CreateTaskRequest } log.Info(). - Str("taskID", task.ID.String()). + Str("taskID", taskId.String()). Str("patientID", patientId.String()). Msg("task created for patient") return &pb.CreateTaskResponse{ - Id: task.ID.String(), + Id: taskId.String(), }, nil } func (ServiceServer) GetTask(ctx context.Context, req *pb.GetTaskRequest) (*pb.GetTaskResponse, error) { - taskRepo := repositories.TaskRepo(ctx) - patientRepo := patient_repo.New(hwdb.GetDB()) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -114,40 +107,37 @@ func (ServiceServer) GetTask(ctx context.Context, req *pb.GetTaskRequest) (*pb.G return nil, status.Error(codes.InvalidArgument, err.Error()) } - task, err := taskRepo.GetTaskWithSubTasks(id) + rows, err := taskRepo.GetTaskWithSubTasksAndPatientName(ctx, id) if err != nil { - if hwgorm.IsOurFault(err) { - return nil, status.Error(codes.Internal, err.Error()) - } else { - return nil, status.Error(codes.InvalidArgument, "id not found") - } + return nil, status.Error(codes.Internal, err.Error()) + } + if len(rows) == 0 { + return nil, status.Error(codes.InvalidArgument, "id not found") } + task := rows[0].Task + patientName := rows[0].PatientName - // TODO: task.AssignedUserId.UUID.String() should handle the translation to "", seems not to work. - assignedUserId := task.AssignedUserId.UUID.String() - if !task.AssignedUserId.Valid { + // TODO: replace with optional response field + assignedUserId := task.AssignedUserID.UUID.String() + if !task.AssignedUserID.Valid { assignedUserId = "" } - var subtasks = hwutil.Map(task.Subtasks, func(subtask models.Subtask) *pb.GetTaskResponse_SubTask { - return &pb.GetTaskResponse_SubTask{ - Id: subtask.ID.String(), - Done: subtask.Done, - Name: subtask.Name, - CreatedBy: subtask.CreatedBy.String(), + subtasks := hwutil.FlatMap(rows, func(row task_repo.GetTaskWithSubTasksAndPatientNameRow) **pb.GetTaskResponse_SubTask { + if !row.SubtaskID.Valid { + return nil } + val := &pb.GetTaskResponse_SubTask{ + Id: row.SubtaskID.UUID.String(), + Done: *row.SubtaskDone, + Name: *row.SubtaskName, + CreatedBy: row.SubtaskCreatedBy.UUID.String(), + } + return &val }) - patientName, err := patientRepo.GetPatientHumanReadableIdentifier(ctx, task.PatientId) - if err != nil { - if hwgorm.IsOurFault(err) { - return nil, status.Error(codes.Internal, err.Error()) - } else { - return nil, status.Error(codes.InvalidArgument, "id not found") - } - } - patientResponse := &pb.GetTaskResponse_Patient{ - Id: task.PatientId.String(), + patient := &pb.GetTaskResponse_Patient{ + Id: task.PatientID.String(), Name: patientName, } @@ -155,19 +145,19 @@ func (ServiceServer) GetTask(ctx context.Context, req *pb.GetTaskRequest) (*pb.G Id: task.ID.String(), Name: task.Name, Description: task.Description, - Status: task.Status, + Status: pb.TaskStatus(task.Status), AssignedUserId: assignedUserId, - Patient: patientResponse, + Patient: patient, Subtasks: subtasks, Public: task.Public, - DueAt: timestamppb.New(task.DueAt), + DueAt: timestamppb.New(task.DueAt.Time), CreatedBy: task.CreatedBy.String(), OrganizationId: task.OrganizationID.String(), }, nil } func (ServiceServer) GetTasksByPatient(ctx context.Context, req *pb.GetTasksByPatientRequest) (*pb.GetTasksByPatientResponse, error) { - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -181,45 +171,59 @@ func (ServiceServer) GetTasksByPatient(ctx context.Context, req *pb.GetTasksByPa return nil, status.Error(codes.InvalidArgument, err.Error()) } - tasks, err := taskRepo.GetTasksWithSubTasksByPatientForOrganization(patientID, organizationID) + rows, err := taskRepo.GetTasksWithSubTasksByPatient(ctx, task_repo.GetTasksWithSubTasksByPatientParams{ + PatientID: patientID, + OrganizationID: organizationID, + }) if err != nil { - if hwgorm.IsOurFault(err) { - return nil, status.Error(codes.Internal, err.Error()) - } else { - return nil, status.Error(codes.InvalidArgument, "id not found") - } + return nil, err } - var mappedTasks = hwutil.Map(tasks, func(task models.Task) *pb.GetTasksByPatientResponse_Task { - var mappedSubtasks = hwutil.Map(task.Subtasks, func(subtask models.Subtask) *pb.GetTasksByPatientResponse_Task_SubTask { - return &pb.GetTasksByPatientResponse_Task_SubTask{ - Id: subtask.ID.String(), - Done: subtask.Done, - Name: subtask.Name, - CreatedBy: subtask.CreatedBy.String(), + tasks := make([]*pb.GetTasksByPatientResponse_Task, 0) + taskMap := make(map[uuid.UUID]int) // id -> index map + + for _, row := range rows { + var task *pb.GetTasksByPatientResponse_Task + // if task was seen before (i.e. already has a GetTasksByPatientResponse_Task object), + // mutate that one + // else, create it + if ix, exists := taskMap[row.Task.ID]; exists { + task = tasks[ix] + } else { + task = &pb.GetTasksByPatientResponse_Task{ + Id: row.Task.ID.String(), + Name: row.Task.Name, + Description: row.Task.Description, + Status: pb.TaskStatus(row.Task.Status), + AssignedUserId: hwutil.NullUUIDToStringPtr(row.Task.AssignedUserID), + PatientId: row.Task.PatientID.String(), + Public: row.Task.Public, + DueAt: timestamppb.New(row.Task.DueAt.Time), + CreatedBy: row.Task.CreatedBy.String(), + Subtasks: make([]*pb.GetTasksByPatientResponse_Task_SubTask, 0), } - }) - return &pb.GetTasksByPatientResponse_Task{ - Id: task.ID.String(), - Name: task.Name, - Description: task.Description, - Status: task.Status, - AssignedUserId: task.AssignedUserId.UUID.String(), - PatientId: task.PatientId.String(), - Subtasks: mappedSubtasks, - Public: task.Public, - DueAt: timestamppb.New(task.DueAt), - CreatedBy: task.CreatedBy.String(), + tasks = append(tasks, task) + taskMap[row.Task.ID] = len(tasks) - 1 } - }) + + if !row.SubtaskID.Valid { + continue + } + task.Subtasks = append(task.Subtasks, &pb.GetTasksByPatientResponse_Task_SubTask{ + Id: row.SubtaskID.UUID.String(), + Name: *row.SubtaskName, + Done: *row.SubtaskDone, + CreatedBy: row.SubtaskCreatedBy.UUID.String(), + }) + } return &pb.GetTasksByPatientResponse{ - Tasks: mappedTasks, + Tasks: tasks, }, nil } func (ServiceServer) GetTasksByPatientSortedByStatus(ctx context.Context, req *pb.GetTasksByPatientSortedByStatusRequest) (*pb.GetTasksByPatientSortedByStatusResponse, error) { - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -233,94 +237,132 @@ func (ServiceServer) GetTasksByPatientSortedByStatus(ctx context.Context, req *p return nil, status.Error(codes.InvalidArgument, err.Error()) } - tasks, err := taskRepo.GetTasksWithSubTasksByPatientForOrganization(patientID, organizationID) + rows, err := taskRepo.GetTasksWithSubTasksByPatient(ctx, task_repo.GetTasksWithSubTasksByPatientParams{ + PatientID: patientID, + OrganizationID: organizationID, + }) if err != nil { - if hwgorm.IsOurFault(err) { - return nil, status.Error(codes.Internal, err.Error()) + return nil, status.Error(codes.Internal, err.Error()) + } + + tasks := make([]*pb.GetTasksByPatientSortedByStatusResponse_Task, 0) + taskMap := make(map[uuid.UUID]int) + + todo := make(map[int]bool) + inprogress := make(map[int]bool) + done := make(map[int]bool) + + for _, row := range rows { + var task *pb.GetTasksByPatientSortedByStatusResponse_Task + if i, exists := taskMap[row.Task.ID]; exists { + task = tasks[i] } else { - return nil, status.Error(codes.InvalidArgument, "id not found") + task = &pb.GetTasksByPatientSortedByStatusResponse_Task{ + Id: row.Task.ID.String(), + Name: row.Task.Name, + Description: row.Task.Description, + AssignedUserId: hwutil.NullUUIDToStringPtr(row.Task.AssignedUserID), + PatientId: row.Task.PatientID.String(), + Public: row.Task.Public, + DueAt: timestamppb.New(row.Task.DueAt.Time), + CreatedBy: row.Task.CreatedBy.String(), + Subtasks: make([]*pb.GetTasksByPatientSortedByStatusResponse_Task_SubTask, 0), + } + tasks = append(tasks, task) + ix := len(tasks) - 1 + taskMap[row.Task.ID] = ix + taskStatus := pb.TaskStatus(row.Task.Status) + if taskStatus == pb.TaskStatus_TASK_STATUS_TODO { + todo[ix] = true + } else if taskStatus == pb.TaskStatus_TASK_STATUS_IN_PROGRESS { + inprogress[ix] = true + } else if taskStatus == pb.TaskStatus_TASK_STATUS_DONE { + done[ix] = true + } + } + + if !row.SubtaskID.Valid { + continue } + task.Subtasks = append(task.Subtasks, &pb.GetTasksByPatientSortedByStatusResponse_Task_SubTask{ + Id: row.SubtaskID.UUID.String(), + Name: *row.SubtaskName, + Done: *row.SubtaskDone, + CreatedBy: row.SubtaskCreatedBy.UUID.String(), + }) } - var mappingFunction = func(tasks []models.Task) []*pb.GetTasksByPatientSortedByStatusResponse_Task { - return hwutil.Map(tasks, func(task models.Task) *pb.GetTasksByPatientSortedByStatusResponse_Task { - var mappedSubtasks = hwutil.Map(task.Subtasks, func(subtask models.Subtask) *pb.GetTasksByPatientSortedByStatusResponse_Task_SubTask { - return &pb.GetTasksByPatientSortedByStatusResponse_Task_SubTask{ - Id: subtask.ID.String(), - Done: subtask.Done, - Name: subtask.Name, - CreatedBy: subtask.CreatedBy.String(), - } - }) - return &pb.GetTasksByPatientSortedByStatusResponse_Task{ - Id: task.ID.String(), - Name: task.Name, - Description: task.Description, - AssignedUserId: task.AssignedUserId.UUID.String(), - PatientId: task.PatientId.String(), - Subtasks: mappedSubtasks, - Public: task.Public, - DueAt: timestamppb.New(task.DueAt), - CreatedBy: task.CreatedBy.String(), + collectIxs := func(set map[int]bool) []*pb.GetTasksByPatientSortedByStatusResponse_Task { + res := make([]*pb.GetTasksByPatientSortedByStatusResponse_Task, 0, len(set)) + + for key, value := range set { + if value { + res = append(res, tasks[key]) } - }) + } + + return res } return &pb.GetTasksByPatientSortedByStatusResponse{ - Todo: mappingFunction(hwutil.Filter(tasks, func(value models.Task) bool { - return value.Status == pb.TaskStatus_TASK_STATUS_TODO - })), - InProgress: mappingFunction(hwutil.Filter(tasks, func(value models.Task) bool { - return value.Status == pb.TaskStatus_TASK_STATUS_IN_PROGRESS - })), - Done: mappingFunction(hwutil.Filter(tasks, func(value models.Task) bool { - return value.Status == pb.TaskStatus_TASK_STATUS_DONE - })), + Todo: collectIxs(todo), + InProgress: collectIxs(inprogress), + Done: collectIxs(done), }, nil } func (ServiceServer) GetAssignedTasks(ctx context.Context, _ *pb.GetAssignedTasksRequest) (*pb.GetAssignedTasksResponse, error) { - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) assigneeID, err := common.GetUserID(ctx) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) } - patients, err := taskRepo.GetPatientsWithTasksByAssignee(ctx, assigneeID) + rows, err := taskRepo.GetTasksWithPatientsByAssignee(ctx, uuid.NullUUID{ + UUID: assigneeID, + Valid: true, + }) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) } var tasks []*pb.GetAssignedTasksResponse_Task + taskMap := make(map[uuid.UUID]int) - for _, patient := range patients { - mappedPatient := &pb.GetAssignedTasksResponse_Task_Patient{ - Id: patient.ID.String(), - Name: patient.HumanReadableIdentifier, - } - patientTasks := hwutil.Map(patient.Tasks, func(task models.Task) *pb.GetAssignedTasksResponse_Task { - var mappedSubtasks = hwutil.Map(task.Subtasks, func(subtask models.Subtask) *pb.GetAssignedTasksResponse_Task_SubTask { - return &pb.GetAssignedTasksResponse_Task_SubTask{ - Id: subtask.ID.String(), - Done: subtask.Done, - Name: subtask.Name, - CreatedBy: subtask.CreatedBy.String(), - } - }) - return &pb.GetAssignedTasksResponse_Task{ - Id: task.ID.String(), - Name: task.Name, - Description: task.Description, - Status: task.Status, - AssignedUserId: task.AssignedUserId.UUID.String(), - Patient: mappedPatient, - Subtasks: mappedSubtasks, - Public: task.Public, - DueAt: timestamppb.New(task.DueAt), - CreatedBy: task.CreatedBy.String(), + for _, row := range rows { + var task *pb.GetAssignedTasksResponse_Task + if ix, exists := taskMap[row.Task.ID]; exists { + task = tasks[ix] + } else { + task = &pb.GetAssignedTasksResponse_Task{ + Id: row.Task.ID.String(), + Name: row.Task.Name, + Description: row.Task.Description, + Status: pb.TaskStatus(row.Task.Status), + AssignedUserId: row.Task.AssignedUserID.UUID.String(), + Patient: &pb.GetAssignedTasksResponse_Task_Patient{ + Id: row.PatientID.String(), + Name: row.PatientName, + }, + Public: row.Task.Public, + DueAt: timestamppb.New(row.Task.DueAt.Time), + CreatedBy: row.Task.CreatedBy.String(), + Subtasks: make([]*pb.GetAssignedTasksResponse_Task_SubTask, 0), } + tasks = append(tasks, task) + taskMap[row.Task.ID] = len(tasks) - 1 + } + + if !row.SubtaskID.Valid { + continue + } + + task.Subtasks = append(task.Subtasks, &pb.GetAssignedTasksResponse_Task_SubTask{ + Id: row.SubtaskID.UUID.String(), + Name: *row.SubtaskName, + Done: *row.SubtaskDone, + CreatedBy: row.SubtaskCreatedBy.UUID.String(), }) - tasks = append(tasks, patientTasks...) } return &pb.GetAssignedTasksResponse{ @@ -329,7 +371,7 @@ func (ServiceServer) GetAssignedTasks(ctx context.Context, _ *pb.GetAssignedTask } func (ServiceServer) UpdateTask(ctx context.Context, req *pb.UpdateTaskRequest) (*pb.UpdateTaskResponse, error) { - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -338,9 +380,13 @@ func (ServiceServer) UpdateTask(ctx context.Context, req *pb.UpdateTaskRequest) return nil, status.Error(codes.InvalidArgument, err.Error()) } - updates := pbhelpers.UpdatesMapForUpdateTaskRequest(req) - - if _, err := taskRepo.UpdateTask(id, updates); err != nil { + if err := taskRepo.UpdateTask(ctx, task_repo.UpdateTaskParams{ + Name: req.Name, + Description: req.Description, + DueAt: hwdb.PbToTimestamp(req.DueAt), + Public: req.Public, + ID: id, + }); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -348,7 +394,7 @@ func (ServiceServer) UpdateTask(ctx context.Context, req *pb.UpdateTaskRequest) } func (ServiceServer) DeleteTask(ctx context.Context, req *pb.DeleteTaskRequest) (*pb.DeleteTaskResponse, error) { - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -357,7 +403,7 @@ func (ServiceServer) DeleteTask(ctx context.Context, req *pb.DeleteTaskRequest) return nil, status.Error(codes.InvalidArgument, err.Error()) } - if err := taskRepo.DeleteTask(id); err != nil { + if err := taskRepo.DeleteTask(ctx, id); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -365,7 +411,12 @@ func (ServiceServer) DeleteTask(ctx context.Context, req *pb.DeleteTaskRequest) } func (ServiceServer) AddSubTask(ctx context.Context, req *pb.AddSubTaskRequest) (*pb.AddSubTaskResponse, error) { - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) + + organizationID, err := common.GetOrganizationID(ctx) + if err != nil { + return nil, err + } userID, err := common.GetUserID(ctx) if err != nil { @@ -378,13 +429,14 @@ func (ServiceServer) AddSubTask(ctx context.Context, req *pb.AddSubTaskRequest) } // Check if task exists - // TODO: this is probably not needed due to the FK constrain in the subtask table - if _, err := taskRepo.GetTaskWithSubTasks(taskId); err != nil { - if hwgorm.IsOurFault(err) { - return nil, status.Error(codes.Internal, err.Error()) - } else { - return nil, status.Error(codes.InvalidArgument, "taskId not found") - } + // TODO: this is probably not needed due to the FK constrain in the subtaskID table + if exists, err := taskRepo.ExistsTask(ctx, task_repo.ExistsTaskParams{ + ID: taskId, + OrganizationID: organizationID, + }); err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } else if !exists { + return nil, status.Error(codes.InvalidArgument, "taskId not found") } done := false @@ -392,7 +444,7 @@ func (ServiceServer) AddSubTask(ctx context.Context, req *pb.AddSubTaskRequest) done = *req.Done } - subtask, err := taskRepo.CreateSubTask(&models.Subtask{ + subtaskID, err := taskRepo.CreateSubTask(ctx, task_repo.CreateSubTaskParams{ Name: req.Name, TaskID: taskId, Done: done, @@ -403,11 +455,11 @@ func (ServiceServer) AddSubTask(ctx context.Context, req *pb.AddSubTaskRequest) return nil, status.Error(codes.Internal, err.Error()) } - return &pb.AddSubTaskResponse{Id: subtask.ID.String()}, nil + return &pb.AddSubTaskResponse{Id: subtaskID.String()}, nil } func (ServiceServer) RemoveSubTask(ctx context.Context, req *pb.RemoveSubTaskRequest) (*pb.RemoveSubTaskResponse, error) { - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -416,7 +468,7 @@ func (ServiceServer) RemoveSubTask(ctx context.Context, req *pb.RemoveSubTaskReq return nil, status.Error(codes.InvalidArgument, err.Error()) } - if err := taskRepo.DeleteSubTask(subtaskID); err != nil { + if err := taskRepo.DeleteSubTask(ctx, subtaskID); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -424,16 +476,18 @@ func (ServiceServer) RemoveSubTask(ctx context.Context, req *pb.RemoveSubTaskReq } func (ServiceServer) UpdateSubTask(ctx context.Context, req *pb.UpdateSubTaskRequest) (*pb.UpdateSubTaskResponse, error) { - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) subtaskID, err := uuid.Parse(req.Id) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) } - updates := pbhelpers.UpdatesMapForUpdateSubTaskRequest(req) - - if _, err := taskRepo.UpdateSubTask(subtaskID, updates); err != nil { + if err := taskRepo.UpdateSubTask(ctx, task_repo.UpdateSubTaskParams{ + Name: req.Name, + Done: nil, + ID: subtaskID, + }); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -441,7 +495,7 @@ func (ServiceServer) UpdateSubTask(ctx context.Context, req *pb.UpdateSubTaskReq } func (ServiceServer) SubTaskToToDo(ctx context.Context, req *pb.SubTaskToToDoRequest) (*pb.SubTaskToToDoResponse, error) { - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -450,9 +504,10 @@ func (ServiceServer) SubTaskToToDo(ctx context.Context, req *pb.SubTaskToToDoReq return nil, status.Error(codes.InvalidArgument, err.Error()) } - updates := map[string]interface{}{"done": false} - - if _, err := taskRepo.UpdateSubTask(subtaskID, updates); err != nil { + if err := taskRepo.UpdateSubTask(ctx, task_repo.UpdateSubTaskParams{ + Done: hwutil.PtrTo(false), + ID: subtaskID, + }); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -460,7 +515,7 @@ func (ServiceServer) SubTaskToToDo(ctx context.Context, req *pb.SubTaskToToDoReq } func (ServiceServer) SubTaskToDone(ctx context.Context, req *pb.SubTaskToDoneRequest) (*pb.SubTaskToDoneResponse, error) { - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -469,9 +524,7 @@ func (ServiceServer) SubTaskToDone(ctx context.Context, req *pb.SubTaskToDoneReq return nil, status.Error(codes.InvalidArgument, err.Error()) } - updates := map[string]interface{}{"done": true} - - if _, err := taskRepo.UpdateSubTask(subtaskID, updates); err != nil { + if err := taskRepo.UpdateSubTask(ctx, task_repo.UpdateSubTaskParams{Done: hwutil.PtrTo(true), ID: subtaskID}); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -480,7 +533,7 @@ func (ServiceServer) SubTaskToDone(ctx context.Context, req *pb.SubTaskToDoneReq func (ServiceServer) TaskToToDo(ctx context.Context, req *pb.TaskToToDoRequest) (*pb.TaskToToDoResponse, error) { log := zlog.Ctx(ctx) - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -489,9 +542,8 @@ func (ServiceServer) TaskToToDo(ctx context.Context, req *pb.TaskToToDoRequest) return nil, status.Error(codes.InvalidArgument, err.Error()) } - updates := map[string]interface{}{"status": pb.TaskStatus_TASK_STATUS_TODO} - - if _, err := taskRepo.UpdateTask(id, updates); err != nil { + s := int32(pb.TaskStatus_TASK_STATUS_TODO) + if err := taskRepo.UpdateTask(ctx, task_repo.UpdateTaskParams{ID: id, Status: &s}); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -504,7 +556,7 @@ func (ServiceServer) TaskToToDo(ctx context.Context, req *pb.TaskToToDoRequest) func (ServiceServer) TaskToInProgress(ctx context.Context, req *pb.TaskToInProgressRequest) (*pb.TaskToInProgressResponse, error) { log := zlog.Ctx(ctx) - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -513,9 +565,8 @@ func (ServiceServer) TaskToInProgress(ctx context.Context, req *pb.TaskToInProgr return nil, status.Error(codes.InvalidArgument, err.Error()) } - updates := map[string]interface{}{"status": pb.TaskStatus_TASK_STATUS_IN_PROGRESS} - - if _, err := taskRepo.UpdateTask(id, updates); err != nil { + s := int32(pb.TaskStatus_TASK_STATUS_IN_PROGRESS) + if err := taskRepo.UpdateTask(ctx, task_repo.UpdateTaskParams{ID: id, Status: &s}); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -528,7 +579,7 @@ func (ServiceServer) TaskToInProgress(ctx context.Context, req *pb.TaskToInProgr func (ServiceServer) TaskToDone(ctx context.Context, req *pb.TaskToDoneRequest) (*pb.TaskToDoneResponse, error) { log := zlog.Ctx(ctx) - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -537,9 +588,8 @@ func (ServiceServer) TaskToDone(ctx context.Context, req *pb.TaskToDoneRequest) return nil, status.Error(codes.InvalidArgument, err.Error()) } - updates := map[string]interface{}{"status": pb.TaskStatus_TASK_STATUS_DONE} - - if _, err := taskRepo.UpdateTask(id, updates); err != nil { + s := int32(pb.TaskStatus_TASK_STATUS_DONE) + if err := taskRepo.UpdateTask(ctx, task_repo.UpdateTaskParams{ID: id, Status: &s}); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -552,7 +602,7 @@ func (ServiceServer) TaskToDone(ctx context.Context, req *pb.TaskToDoneRequest) func (ServiceServer) AssignTaskToUser(ctx context.Context, req *pb.AssignTaskToUserRequest) (*pb.AssignTaskToUserResponse, error) { log := zlog.Ctx(ctx) - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -568,9 +618,13 @@ func (ServiceServer) AssignTaskToUser(ctx context.Context, req *pb.AssignTaskToU // TODO: Check if user exists - updates := map[string]interface{}{"assigned_user_id": userId} - - if _, err := taskRepo.UpdateTask(id, updates); err != nil { + if err := taskRepo.UpdateTaskUser(ctx, task_repo.UpdateTaskUserParams{ + ID: id, + AssignedUserID: uuid.NullUUID{ + UUID: userId, + Valid: true, + }, + }); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -593,7 +647,7 @@ func (ServiceServer) AssignTaskToUser(ctx context.Context, req *pb.AssignTaskToU func (ServiceServer) UnassignTaskFromUser(ctx context.Context, req *pb.UnassignTaskFromUserRequest) (*pb.UnassignTaskFromUserResponse, error) { log := zlog.Ctx(ctx) - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -602,9 +656,7 @@ func (ServiceServer) UnassignTaskFromUser(ctx context.Context, req *pb.UnassignT return nil, status.Error(codes.InvalidArgument, err.Error()) } - updates := map[string]interface{}{"assigned_user_id": nil} - - if _, err := taskRepo.UpdateTask(id, updates); err != nil { + if err := taskRepo.UpdateTaskUser(ctx, task_repo.UpdateTaskUserParams{ID: id, AssignedUserID: uuid.NullUUID{}}); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -617,7 +669,7 @@ func (ServiceServer) UnassignTaskFromUser(ctx context.Context, req *pb.UnassignT func (ServiceServer) PublishTask(ctx context.Context, req *pb.PublishTaskRequest) (*pb.PublishTaskResponse, error) { log := zlog.Ctx(ctx) - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -626,9 +678,7 @@ func (ServiceServer) PublishTask(ctx context.Context, req *pb.PublishTaskRequest return nil, status.Error(codes.InvalidArgument, err.Error()) } - updates := map[string]interface{}{"public": true} - - if _, err := taskRepo.UpdateTask(id, updates); err != nil { + if err := taskRepo.UpdateTask(ctx, task_repo.UpdateTaskParams{ID: id, Public: hwutil.PtrTo(true)}); err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -641,7 +691,7 @@ func (ServiceServer) PublishTask(ctx context.Context, req *pb.PublishTaskRequest func (ServiceServer) UnpublishTask(ctx context.Context, req *pb.UnpublishTaskRequest) (*pb.UnpublishTaskResponse, error) { log := zlog.Ctx(ctx) - taskRepo := repositories.TaskRepo(ctx) + taskRepo := task_repo.New(hwdb.GetDB()) // TODO: Auth @@ -650,9 +700,10 @@ func (ServiceServer) UnpublishTask(ctx context.Context, req *pb.UnpublishTaskReq return nil, status.Error(codes.InvalidArgument, err.Error()) } - updates := map[string]interface{}{"public": false} - - if _, err := taskRepo.UpdateTask(id, updates); err != nil { + if err := taskRepo.UpdateTask(ctx, task_repo.UpdateTaskParams{ + Public: hwutil.PtrTo(false), + ID: id, + }); err != nil { return nil, status.Error(codes.Internal, err.Error()) } diff --git a/services/task-svc/repos/patient_repo.sql b/services/task-svc/repos/patient_repo.sql index 24b692393..69b2786ba 100644 --- a/services/task-svc/repos/patient_repo.sql +++ b/services/task-svc/repos/patient_repo.sql @@ -3,11 +3,6 @@ INSERT INTO patients (organization_id, human_readable_identifier, notes) VALUES (@organization_id, @human_readable_identifier, @notes) RETURNING id; --- name: GetPatientHumanReadableIdentifier :one -SELECT human_readable_identifier FROM patients - WHERE id = @id - LIMIT 1; - -- name: GetPatientByBed :one SELECT patients.* FROM patients diff --git a/services/task-svc/repos/patient_repo/patient_repo.sql.go b/services/task-svc/repos/patient_repo/patient_repo.sql.go index 5c8c34cf7..b44fcaaea 100644 --- a/services/task-svc/repos/patient_repo/patient_repo.sql.go +++ b/services/task-svc/repos/patient_repo/patient_repo.sql.go @@ -125,19 +125,6 @@ func (q *Queries) GetPatientByBed(ctx context.Context, bedID uuid.NullUUID) (Pat return i, err } -const getPatientHumanReadableIdentifier = `-- name: GetPatientHumanReadableIdentifier :one -SELECT human_readable_identifier FROM patients - WHERE id = $1 - LIMIT 1 -` - -func (q *Queries) GetPatientHumanReadableIdentifier(ctx context.Context, id uuid.UUID) (string, error) { - row := q.db.QueryRow(ctx, getPatientHumanReadableIdentifier, id) - var human_readable_identifier string - err := row.Scan(&human_readable_identifier) - return human_readable_identifier, err -} - const getPatientWithBedAndRoom = `-- name: GetPatientWithBedAndRoom :one SELECT patients.id, patients.human_readable_identifier, patients.organization_id, patients.notes, patients.bed_id, patients.is_discharged, patients.created_at, patients.updated_at, diff --git a/services/task-svc/repos/task_repo.sql b/services/task-svc/repos/task_repo.sql new file mode 100644 index 000000000..a12c0d938 --- /dev/null +++ b/services/task-svc/repos/task_repo.sql @@ -0,0 +1,86 @@ +-- name: CreateTask :one +INSERT INTO tasks + (name, description, status, patient_id, public, organization_id, created_by, due_at) +VALUES ($1, $2, $3, $4, $5, $6, $7, $8) +RETURNING id; + +-- name: CreateSubTask :one +INSERT INTO subtasks + (task_id, name, done, created_by) +VALUES ($1, $2, $3, $4) +RETURNING id; + +-- name: GetTaskWithSubTasksAndPatientName :many +SELECT + sqlc.embed(tasks), + subtasks.id as subtask_id, + subtasks.done as subtask_done, + subtasks.name as subtask_name, + subtasks.created_by as subtask_created_by, + patients.human_readable_identifier as patient_name +FROM tasks +JOIN patients ON patients.id = tasks.patient_id +LEFT JOIN subtasks ON subtasks.task_id = tasks.id +WHERE tasks.id = $1 +ORDER BY subtasks.creation_date ASC; + +-- name: UpdateTask :exec +UPDATE tasks +SET name = coalesce(sqlc.narg('name'), name), + description = coalesce(sqlc.narg('description'), description), + due_at = coalesce(sqlc.narg('due_at'), due_at), + public = coalesce(sqlc.narg('public'), public), + status = coalesce(sqlc.narg('status'), status) +WHERE id = @id; + +-- name: UpdateTaskUser :exec +UPDATE tasks +SET assigned_user_id = @assigned_user_id +WHERE id = @id; + +-- name: UpdateSubTask :exec +UPDATE subtasks +SET name = coalesce(sqlc.narg('name'), name), + done = coalesce(sqlc.narg('done'), done) +WHERE id = @id; + +-- name: GetTasksWithPatientsByAssignee :many +SELECT + sqlc.embed(tasks), + patients.id as patient_id, + patients.human_readable_identifier as patient_name, + subtasks.id as subtask_id, + subtasks.name as subtask_name, + subtasks.done as subtask_done, + subtasks.created_by as subtask_created_by +FROM patients +JOIN tasks ON tasks.patient_id = patients.id +LEFT JOIN subtasks ON subtasks.task_id = tasks.id +WHERE tasks.assigned_user_id = $1; + +-- name: GetTasksWithSubTasksByPatient :many +SELECT + sqlc.embed(tasks), + subtasks.id as subtask_id, + subtasks.name as subtask_name, + subtasks.done as subtask_done, + subtasks.created_by as subtask_created_by +FROM tasks +JOIN patients ON patients.id = tasks.patient_id +LEFT JOIN subtasks ON subtasks.task_id = tasks.id +WHERE tasks.patient_id = $1 +AND tasks.organization_id = $2; + +-- name: ExistsTask :one +SELECT EXISTS ( + SELECT 1 + FROM tasks + WHERE id = $1 + AND organization_id = $2 +) task_exists; + +-- name: DeleteSubTask :exec +DELETE FROM subtasks WHERE id = @id; + +-- name: DeleteTask :exec +DELETE FROM tasks WHERE id = @id; diff --git a/services/task-svc/repos/task_repo/db.go b/services/task-svc/repos/task_repo/db.go new file mode 100644 index 000000000..e08c5734e --- /dev/null +++ b/services/task-svc/repos/task_repo/db.go @@ -0,0 +1,32 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package task_repo + +import ( + "context" + + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgconn" +) + +type DBTX interface { + Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error) + Query(context.Context, string, ...interface{}) (pgx.Rows, error) + QueryRow(context.Context, string, ...interface{}) pgx.Row +} + +func New(db DBTX) *Queries { + return &Queries{db: db} +} + +type Queries struct { + db DBTX +} + +func (q *Queries) WithTx(tx pgx.Tx) *Queries { + return &Queries{ + db: tx, + } +} diff --git a/services/task-svc/repos/task_repo/models.go b/services/task-svc/repos/task_repo/models.go new file mode 100644 index 000000000..73e3f12b5 --- /dev/null +++ b/services/task-svc/repos/task_repo/models.go @@ -0,0 +1,83 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 + +package task_repo + +import ( + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" +) + +type Bed struct { + ID uuid.UUID + RoomID uuid.UUID + OrganizationID uuid.UUID + Name string +} + +type Patient struct { + ID uuid.UUID + HumanReadableIdentifier string + OrganizationID uuid.UUID + Notes string + BedID uuid.NullUUID + IsDischarged int32 + CreatedAt pgtype.Timestamp + UpdatedAt pgtype.Timestamp +} + +type Room struct { + ID uuid.UUID + Name string + OrganizationID uuid.UUID + WardID uuid.UUID +} + +type SchemaMigration struct { + Version int64 + Dirty bool +} + +type Subtask struct { + ID uuid.UUID + TaskID uuid.UUID + Name string + Done bool + CreatedBy uuid.UUID + CreationDate pgtype.Timestamp +} + +type Task struct { + ID uuid.UUID + Name string + Description string + Status int32 + AssignedUserID uuid.NullUUID + PatientID uuid.UUID + Public bool + OrganizationID uuid.UUID + CreatedBy uuid.UUID + DueAt pgtype.Timestamp +} + +type TaskTemplate struct { + ID uuid.UUID + Name string + Description string + WardID uuid.NullUUID + CreatedBy uuid.UUID + OrganizationID uuid.UUID +} + +type TaskTemplateSubtask struct { + ID uuid.UUID + TaskTemplateID uuid.UUID + Name string +} + +type Ward struct { + ID uuid.UUID + Name string + OrganizationID uuid.UUID +} diff --git a/services/task-svc/repos/task_repo/task_repo.sql.go b/services/task-svc/repos/task_repo/task_repo.sql.go new file mode 100644 index 000000000..641c7d765 --- /dev/null +++ b/services/task-svc/repos/task_repo/task_repo.sql.go @@ -0,0 +1,361 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.22.0 +// source: task_repo.sql + +package task_repo + +import ( + "context" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" +) + +const createSubTask = `-- name: CreateSubTask :one +INSERT INTO subtasks + (task_id, name, done, created_by) +VALUES ($1, $2, $3, $4) +RETURNING id +` + +type CreateSubTaskParams struct { + TaskID uuid.UUID + Name string + Done bool + CreatedBy uuid.UUID +} + +func (q *Queries) CreateSubTask(ctx context.Context, arg CreateSubTaskParams) (uuid.UUID, error) { + row := q.db.QueryRow(ctx, createSubTask, + arg.TaskID, + arg.Name, + arg.Done, + arg.CreatedBy, + ) + var id uuid.UUID + err := row.Scan(&id) + return id, err +} + +const createTask = `-- name: CreateTask :one +INSERT INTO tasks + (name, description, status, patient_id, public, organization_id, created_by, due_at) +VALUES ($1, $2, $3, $4, $5, $6, $7, $8) +RETURNING id +` + +type CreateTaskParams struct { + Name string + Description string + Status int32 + PatientID uuid.UUID + Public bool + OrganizationID uuid.UUID + CreatedBy uuid.UUID + DueAt pgtype.Timestamp +} + +func (q *Queries) CreateTask(ctx context.Context, arg CreateTaskParams) (uuid.UUID, error) { + row := q.db.QueryRow(ctx, createTask, + arg.Name, + arg.Description, + arg.Status, + arg.PatientID, + arg.Public, + arg.OrganizationID, + arg.CreatedBy, + arg.DueAt, + ) + var id uuid.UUID + err := row.Scan(&id) + return id, err +} + +const deleteSubTask = `-- name: DeleteSubTask :exec +DELETE FROM subtasks WHERE id = $1 +` + +func (q *Queries) DeleteSubTask(ctx context.Context, id uuid.UUID) error { + _, err := q.db.Exec(ctx, deleteSubTask, id) + return err +} + +const deleteTask = `-- name: DeleteTask :exec +DELETE FROM tasks WHERE id = $1 +` + +func (q *Queries) DeleteTask(ctx context.Context, id uuid.UUID) error { + _, err := q.db.Exec(ctx, deleteTask, id) + return err +} + +const existsTask = `-- name: ExistsTask :one +SELECT EXISTS ( + SELECT 1 + FROM tasks + WHERE id = $1 + AND organization_id = $2 +) task_exists +` + +type ExistsTaskParams struct { + ID uuid.UUID + OrganizationID uuid.UUID +} + +func (q *Queries) ExistsTask(ctx context.Context, arg ExistsTaskParams) (bool, error) { + row := q.db.QueryRow(ctx, existsTask, arg.ID, arg.OrganizationID) + var task_exists bool + err := row.Scan(&task_exists) + return task_exists, err +} + +const getTaskWithSubTasksAndPatientName = `-- name: GetTaskWithSubTasksAndPatientName :many +SELECT + tasks.id, tasks.name, tasks.description, tasks.status, tasks.assigned_user_id, tasks.patient_id, tasks.public, tasks.organization_id, tasks.created_by, tasks.due_at, + subtasks.id as subtask_id, + subtasks.done as subtask_done, + subtasks.name as subtask_name, + subtasks.created_by as subtask_created_by, + patients.human_readable_identifier as patient_name +FROM tasks +JOIN patients ON patients.id = tasks.patient_id +LEFT JOIN subtasks ON subtasks.task_id = tasks.id +WHERE tasks.id = $1 +ORDER BY subtasks.creation_date ASC +` + +type GetTaskWithSubTasksAndPatientNameRow struct { + Task Task + SubtaskID uuid.NullUUID + SubtaskDone *bool + SubtaskName *string + SubtaskCreatedBy uuid.NullUUID + PatientName string +} + +func (q *Queries) GetTaskWithSubTasksAndPatientName(ctx context.Context, id uuid.UUID) ([]GetTaskWithSubTasksAndPatientNameRow, error) { + rows, err := q.db.Query(ctx, getTaskWithSubTasksAndPatientName, id) + if err != nil { + return nil, err + } + defer rows.Close() + items := []GetTaskWithSubTasksAndPatientNameRow{} + for rows.Next() { + var i GetTaskWithSubTasksAndPatientNameRow + if err := rows.Scan( + &i.Task.ID, + &i.Task.Name, + &i.Task.Description, + &i.Task.Status, + &i.Task.AssignedUserID, + &i.Task.PatientID, + &i.Task.Public, + &i.Task.OrganizationID, + &i.Task.CreatedBy, + &i.Task.DueAt, + &i.SubtaskID, + &i.SubtaskDone, + &i.SubtaskName, + &i.SubtaskCreatedBy, + &i.PatientName, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const getTasksWithPatientsByAssignee = `-- name: GetTasksWithPatientsByAssignee :many +SELECT + tasks.id, tasks.name, tasks.description, tasks.status, tasks.assigned_user_id, tasks.patient_id, tasks.public, tasks.organization_id, tasks.created_by, tasks.due_at, + patients.id as patient_id, + patients.human_readable_identifier as patient_name, + subtasks.id as subtask_id, + subtasks.name as subtask_name, + subtasks.done as subtask_done, + subtasks.created_by as subtask_created_by +FROM patients +JOIN tasks ON tasks.patient_id = patients.id +LEFT JOIN subtasks ON subtasks.task_id = tasks.id +WHERE tasks.assigned_user_id = $1 +` + +type GetTasksWithPatientsByAssigneeRow struct { + Task Task + PatientID uuid.UUID + PatientName string + SubtaskID uuid.NullUUID + SubtaskName *string + SubtaskDone *bool + SubtaskCreatedBy uuid.NullUUID +} + +func (q *Queries) GetTasksWithPatientsByAssignee(ctx context.Context, assignedUserID uuid.NullUUID) ([]GetTasksWithPatientsByAssigneeRow, error) { + rows, err := q.db.Query(ctx, getTasksWithPatientsByAssignee, assignedUserID) + if err != nil { + return nil, err + } + defer rows.Close() + items := []GetTasksWithPatientsByAssigneeRow{} + for rows.Next() { + var i GetTasksWithPatientsByAssigneeRow + if err := rows.Scan( + &i.Task.ID, + &i.Task.Name, + &i.Task.Description, + &i.Task.Status, + &i.Task.AssignedUserID, + &i.Task.PatientID, + &i.Task.Public, + &i.Task.OrganizationID, + &i.Task.CreatedBy, + &i.Task.DueAt, + &i.PatientID, + &i.PatientName, + &i.SubtaskID, + &i.SubtaskName, + &i.SubtaskDone, + &i.SubtaskCreatedBy, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const getTasksWithSubTasksByPatient = `-- name: GetTasksWithSubTasksByPatient :many +SELECT + tasks.id, tasks.name, tasks.description, tasks.status, tasks.assigned_user_id, tasks.patient_id, tasks.public, tasks.organization_id, tasks.created_by, tasks.due_at, + subtasks.id as subtask_id, + subtasks.name as subtask_name, + subtasks.done as subtask_done, + subtasks.created_by as subtask_created_by +FROM tasks +JOIN patients ON patients.id = tasks.patient_id +LEFT JOIN subtasks ON subtasks.task_id = tasks.id +WHERE tasks.patient_id = $1 +AND tasks.organization_id = $2 +` + +type GetTasksWithSubTasksByPatientParams struct { + PatientID uuid.UUID + OrganizationID uuid.UUID +} + +type GetTasksWithSubTasksByPatientRow struct { + Task Task + SubtaskID uuid.NullUUID + SubtaskName *string + SubtaskDone *bool + SubtaskCreatedBy uuid.NullUUID +} + +func (q *Queries) GetTasksWithSubTasksByPatient(ctx context.Context, arg GetTasksWithSubTasksByPatientParams) ([]GetTasksWithSubTasksByPatientRow, error) { + rows, err := q.db.Query(ctx, getTasksWithSubTasksByPatient, arg.PatientID, arg.OrganizationID) + if err != nil { + return nil, err + } + defer rows.Close() + items := []GetTasksWithSubTasksByPatientRow{} + for rows.Next() { + var i GetTasksWithSubTasksByPatientRow + if err := rows.Scan( + &i.Task.ID, + &i.Task.Name, + &i.Task.Description, + &i.Task.Status, + &i.Task.AssignedUserID, + &i.Task.PatientID, + &i.Task.Public, + &i.Task.OrganizationID, + &i.Task.CreatedBy, + &i.Task.DueAt, + &i.SubtaskID, + &i.SubtaskName, + &i.SubtaskDone, + &i.SubtaskCreatedBy, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const updateSubTask = `-- name: UpdateSubTask :exec +UPDATE subtasks +SET name = coalesce($1, name), + done = coalesce($2, done) +WHERE id = $3 +` + +type UpdateSubTaskParams struct { + Name *string + Done *bool + ID uuid.UUID +} + +func (q *Queries) UpdateSubTask(ctx context.Context, arg UpdateSubTaskParams) error { + _, err := q.db.Exec(ctx, updateSubTask, arg.Name, arg.Done, arg.ID) + return err +} + +const updateTask = `-- name: UpdateTask :exec +UPDATE tasks +SET name = coalesce($1, name), + description = coalesce($2, description), + due_at = coalesce($3, due_at), + public = coalesce($4, public), + status = coalesce($5, status) +WHERE id = $6 +` + +type UpdateTaskParams struct { + Name *string + Description *string + DueAt pgtype.Timestamp + Public *bool + Status *int32 + ID uuid.UUID +} + +func (q *Queries) UpdateTask(ctx context.Context, arg UpdateTaskParams) error { + _, err := q.db.Exec(ctx, updateTask, + arg.Name, + arg.Description, + arg.DueAt, + arg.Public, + arg.Status, + arg.ID, + ) + return err +} + +const updateTaskUser = `-- name: UpdateTaskUser :exec +UPDATE tasks +SET assigned_user_id = $1 +WHERE id = $2 +` + +type UpdateTaskUserParams struct { + AssignedUserID uuid.NullUUID + ID uuid.UUID +} + +func (q *Queries) UpdateTaskUser(ctx context.Context, arg UpdateTaskUserParams) error { + _, err := q.db.Exec(ctx, updateTaskUser, arg.AssignedUserID, arg.ID) + return err +} diff --git a/services/task-svc/sqlc.yaml b/services/task-svc/sqlc.yaml index ea2c98ea3..93b54ad5f 100644 --- a/services/task-svc/sqlc.yaml +++ b/services/task-svc/sqlc.yaml @@ -42,3 +42,11 @@ sql: <<: *repo-go package: "ward_repo" out: "repos/ward_repo" + + - <<: *repo + queries: "./repos/task_repo.sql" + gen: + go: + <<: *repo-go + package: "task_repo" + out: "repos/task_repo"