From 8cbe00a889048cece9ed9de45ba244c733592f70 Mon Sep 17 00:00:00 2001 From: Bas Kloosterman Date: Tue, 30 May 2023 09:45:14 +0200 Subject: [PATCH] v0.0.3 --- go.mod | 3 + okapi-errors.pb.go | 275 +++++ okapi-events.pb.go | 519 ++++++++ okapi-events.proto | 34 - okapi-onboarding.pb.go | 748 +++++++++++ okapi-patient-registration.pb.go | 1293 ++++++++++++++++++++ okapi-patient-registration.proto | 56 - okapi-service-config.pb.go | 1008 +++++++++++++++ okapi.pb.go | 170 +++ okapi_grpc.pb.go | 513 ++++++++ okapi-errors.proto => protobuf/okapi-errors.proto | 11 +- protobuf/okapi-events.proto | 65 + .../okapi-onboarding.proto | 12 +- protobuf/okapi-patient-registration.proto | 90 ++ .../okapi-service-config.proto | 38 +- okapi.proto => protobuf/okapi.proto | 11 +- 16 files changed, 4722 insertions(+), 124 deletions(-) create mode 100644 go.mod create mode 100644 okapi-errors.pb.go create mode 100644 okapi-events.pb.go delete mode 100644 okapi-events.proto create mode 100644 okapi-onboarding.pb.go create mode 100644 okapi-patient-registration.pb.go delete mode 100644 okapi-patient-registration.proto create mode 100644 okapi-service-config.pb.go create mode 100644 okapi.pb.go create mode 100644 okapi_grpc.pb.go rename okapi-errors.proto => protobuf/okapi-errors.proto (66%) create mode 100644 protobuf/okapi-events.proto rename okapi-onboarding.proto => protobuf/okapi-onboarding.proto (72%) create mode 100644 protobuf/okapi-patient-registration.proto rename okapi-service-config.proto => protobuf/okapi-service-config.proto (63%) rename okapi.proto => protobuf/okapi.proto (50%) diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..6a581ef --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module whiteboxsystems.nl/okapi + +go 1.19 diff --git a/okapi-errors.pb.go b/okapi-errors.pb.go new file mode 100644 index 0000000..820e0e7 --- /dev/null +++ b/okapi-errors.pb.go @@ -0,0 +1,275 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.21.12 +// source: okapi-errors.proto + +package okapi + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type OKAPIErrorCode int32 + +const ( + OKAPIErrorCode_None OKAPIErrorCode = 0 + // Invalide configuratie voor de gekozen methode + OKAPIErrorCode_InvalidXISAuthConfiguration OKAPIErrorCode = 1 + // Onbekende reference meegegeven + OKAPIErrorCode_UnkownReference OKAPIErrorCode = 2 + // Invalide autorisatietoken voor deze reference + OKAPIErrorCode_InvalidAuthorizationToken OKAPIErrorCode = 3 + // Onbekende service + OKAPIErrorCode_UnknownService OKAPIErrorCode = 4 + // Onbekende protocol + OKAPIErrorCode_UnknownProtocol OKAPIErrorCode = 5 + // Invalide procotol configuratie voor het aangegeven protocol + OKAPIErrorCode_InvalidProcotolConfig OKAPIErrorCode = 6 + // Authenticatie methode onbekend + OKAPIErrorCode_UnknownAuthMethod OKAPIErrorCode = 7 + // Invalide authorisatie configuratie voor het aangegeven protocol + OKAPIErrorCode_InvalidProcotolAuthConfig OKAPIErrorCode = 8 + // Er zijn niet genoeg events om deze pagina te bereiken + OKAPIErrorCode_InvalidPage OKAPIErrorCode = 9 + // Er wordt geprobeerd een patient af te melden die niet is ingeschreven + OKAPIErrorCode_AlreadyUnsubscribed OKAPIErrorCode = 10 + // De service is al actief + OKAPIErrorCode_ServiceAlreadyActivated OKAPIErrorCode = 11 + // De service is niet actief + OKAPIErrorCode_ServiceNotActive OKAPIErrorCode = 12 + // Een generieke error code die terug wordt gegeven met en omschrijving die + // meer informatie geeft over wat er fout is gegaan + OKAPIErrorCode_GenericException OKAPIErrorCode = 999 +) + +// Enum value maps for OKAPIErrorCode. +var ( + OKAPIErrorCode_name = map[int32]string{ + 0: "None", + 1: "InvalidXISAuthConfiguration", + 2: "UnkownReference", + 3: "InvalidAuthorizationToken", + 4: "UnknownService", + 5: "UnknownProtocol", + 6: "InvalidProcotolConfig", + 7: "UnknownAuthMethod", + 8: "InvalidProcotolAuthConfig", + 9: "InvalidPage", + 10: "AlreadyUnsubscribed", + 11: "ServiceAlreadyActivated", + 12: "ServiceNotActive", + 999: "GenericException", + } + OKAPIErrorCode_value = map[string]int32{ + "None": 0, + "InvalidXISAuthConfiguration": 1, + "UnkownReference": 2, + "InvalidAuthorizationToken": 3, + "UnknownService": 4, + "UnknownProtocol": 5, + "InvalidProcotolConfig": 6, + "UnknownAuthMethod": 7, + "InvalidProcotolAuthConfig": 8, + "InvalidPage": 9, + "AlreadyUnsubscribed": 10, + "ServiceAlreadyActivated": 11, + "ServiceNotActive": 12, + "GenericException": 999, + } +) + +func (x OKAPIErrorCode) Enum() *OKAPIErrorCode { + p := new(OKAPIErrorCode) + *p = x + return p +} + +func (x OKAPIErrorCode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (OKAPIErrorCode) Descriptor() protoreflect.EnumDescriptor { + return file_okapi_errors_proto_enumTypes[0].Descriptor() +} + +func (OKAPIErrorCode) Type() protoreflect.EnumType { + return &file_okapi_errors_proto_enumTypes[0] +} + +func (x OKAPIErrorCode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OKAPIErrorCode.Descriptor instead. +func (OKAPIErrorCode) EnumDescriptor() ([]byte, []int) { + return file_okapi_errors_proto_rawDescGZIP(), []int{0} +} + +type OKAPIError struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code OKAPIErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=OKAPIErrorCode" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` +} + +func (x *OKAPIError) Reset() { + *x = OKAPIError{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_errors_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OKAPIError) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OKAPIError) ProtoMessage() {} + +func (x *OKAPIError) ProtoReflect() protoreflect.Message { + mi := &file_okapi_errors_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OKAPIError.ProtoReflect.Descriptor instead. +func (*OKAPIError) Descriptor() ([]byte, []int) { + return file_okapi_errors_proto_rawDescGZIP(), []int{0} +} + +func (x *OKAPIError) GetCode() OKAPIErrorCode { + if x != nil { + return x.Code + } + return OKAPIErrorCode_None +} + +func (x *OKAPIError) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_okapi_errors_proto protoreflect.FileDescriptor + +var file_okapi_errors_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x2d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4b, 0x0a, 0x0a, 0x4f, 0x4b, 0x41, 0x50, 0x49, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x12, 0x23, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0f, 0x2e, 0x4f, 0x4b, 0x41, 0x50, 0x49, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x2a, 0xdd, 0x02, 0x0a, 0x0e, 0x4f, 0x4b, 0x41, 0x50, 0x49, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x43, 0x6f, 0x64, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x1f, + 0x0a, 0x1b, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x58, 0x49, 0x53, 0x41, 0x75, 0x74, 0x68, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, + 0x13, 0x0a, 0x0f, 0x55, 0x6e, 0x6b, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, + 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x50, 0x72, 0x6f, 0x63, 0x6f, 0x74, 0x6f, 0x6c, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, + 0x77, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x10, 0x07, 0x12, 0x1d, + 0x0a, 0x19, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x50, 0x72, 0x6f, 0x63, 0x6f, 0x74, 0x6f, + 0x6c, 0x41, 0x75, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0x08, 0x12, 0x0f, 0x0a, + 0x0b, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x50, 0x61, 0x67, 0x65, 0x10, 0x09, 0x12, 0x17, + 0x0a, 0x13, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x64, 0x10, 0x0a, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x64, 0x10, 0x0b, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, + 0x6f, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x0c, 0x12, 0x15, 0x0a, 0x10, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x69, 0x63, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0xe7, + 0x07, 0x42, 0x1a, 0x5a, 0x18, 0x77, 0x68, 0x69, 0x74, 0x65, 0x62, 0x6f, 0x78, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x73, 0x2e, 0x6e, 0x6c, 0x2f, 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_okapi_errors_proto_rawDescOnce sync.Once + file_okapi_errors_proto_rawDescData = file_okapi_errors_proto_rawDesc +) + +func file_okapi_errors_proto_rawDescGZIP() []byte { + file_okapi_errors_proto_rawDescOnce.Do(func() { + file_okapi_errors_proto_rawDescData = protoimpl.X.CompressGZIP(file_okapi_errors_proto_rawDescData) + }) + return file_okapi_errors_proto_rawDescData +} + +var file_okapi_errors_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_okapi_errors_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_okapi_errors_proto_goTypes = []interface{}{ + (OKAPIErrorCode)(0), // 0: OKAPIErrorCode + (*OKAPIError)(nil), // 1: OKAPIError +} +var file_okapi_errors_proto_depIdxs = []int32{ + 0, // 0: OKAPIError.code:type_name -> OKAPIErrorCode + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_okapi_errors_proto_init() } +func file_okapi_errors_proto_init() { + if File_okapi_errors_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_okapi_errors_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OKAPIError); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_okapi_errors_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_okapi_errors_proto_goTypes, + DependencyIndexes: file_okapi_errors_proto_depIdxs, + EnumInfos: file_okapi_errors_proto_enumTypes, + MessageInfos: file_okapi_errors_proto_msgTypes, + }.Build() + File_okapi_errors_proto = out.File + file_okapi_errors_proto_rawDesc = nil + file_okapi_errors_proto_goTypes = nil + file_okapi_errors_proto_depIdxs = nil +} diff --git a/okapi-events.pb.go b/okapi-events.pb.go new file mode 100644 index 0000000..5bca54b --- /dev/null +++ b/okapi-events.pb.go @@ -0,0 +1,519 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.21.12 +// source: okapi-events.proto + +package okapi + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Should events payloads be documented by for example json schema? +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + ServiceId string `protobuf:"bytes,3,opt,name=serviceId,proto3" json:"serviceId,omitempty"` + PatientId string `protobuf:"bytes,4,opt,name=patientId,proto3" json:"patientId,omitempty"` + Payload *structpb.Struct `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` // string schema = 6; // ? do we need a schema in the event itself +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_events_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_okapi_events_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_okapi_events_proto_rawDescGZIP(), []int{0} +} + +func (x *Event) GetTimestamp() uint64 { + if x != nil { + return x.Timestamp + } + return 0 +} + +func (x *Event) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Event) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +func (x *Event) GetPatientId() string { + if x != nil { + return x.PatientId + } + return "" +} + +func (x *Event) GetPayload() *structpb.Struct { + if x != nil { + return x.Payload + } + return nil +} + +type Query struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Start uint64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + End uint64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` + ServiceId string `protobuf:"bytes,4,opt,name=serviceId,proto3" json:"serviceId,omitempty"` + PatientId string `protobuf:"bytes,5,opt,name=patientId,proto3" json:"patientId,omitempty"` +} + +func (x *Query) Reset() { + *x = Query{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_events_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Query) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Query) ProtoMessage() {} + +func (x *Query) ProtoReflect() protoreflect.Message { + mi := &file_okapi_events_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Query.ProtoReflect.Descriptor instead. +func (*Query) Descriptor() ([]byte, []int) { + return file_okapi_events_proto_rawDescGZIP(), []int{1} +} + +func (x *Query) GetStart() uint64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *Query) GetEnd() uint64 { + if x != nil { + return x.End + } + return 0 +} + +func (x *Query) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Query) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +func (x *Query) GetPatientId() string { + if x != nil { + return x.PatientId + } + return "" +} + +type GetEventsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` + PerPage int32 `protobuf:"varint,3,opt,name=perPage,proto3" json:"perPage,omitempty"` + Query []*Query `protobuf:"bytes,4,rep,name=query,proto3" json:"query,omitempty"` +} + +func (x *GetEventsRequest) Reset() { + *x = GetEventsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_events_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEventsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEventsRequest) ProtoMessage() {} + +func (x *GetEventsRequest) ProtoReflect() protoreflect.Message { + mi := &file_okapi_events_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEventsRequest.ProtoReflect.Descriptor instead. +func (*GetEventsRequest) Descriptor() ([]byte, []int) { + return file_okapi_events_proto_rawDescGZIP(), []int{2} +} + +func (x *GetEventsRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *GetEventsRequest) GetPerPage() int32 { + if x != nil { + return x.PerPage + } + return 0 +} + +func (x *GetEventsRequest) GetQuery() []*Query { + if x != nil { + return x.Query + } + return nil +} + +type GetEventsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Page int32 `protobuf:"varint,2,opt,name=page,proto3" json:"page,omitempty"` + PerPage int32 `protobuf:"varint,3,opt,name=perPage,proto3" json:"perPage,omitempty"` + Events []*Event `protobuf:"bytes,4,rep,name=events,proto3" json:"events,omitempty"` +} + +func (x *GetEventsResponse) Reset() { + *x = GetEventsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_events_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEventsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEventsResponse) ProtoMessage() {} + +func (x *GetEventsResponse) ProtoReflect() protoreflect.Message { + mi := &file_okapi_events_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEventsResponse.ProtoReflect.Descriptor instead. +func (*GetEventsResponse) Descriptor() ([]byte, []int) { + return file_okapi_events_proto_rawDescGZIP(), []int{3} +} + +func (x *GetEventsResponse) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *GetEventsResponse) GetPerPage() int32 { + if x != nil { + return x.PerPage + } + return 0 +} + +func (x *GetEventsResponse) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +type GetEventsStreamRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Query []*Query `protobuf:"bytes,2,rep,name=query,proto3" json:"query,omitempty"` +} + +func (x *GetEventsStreamRequest) Reset() { + *x = GetEventsStreamRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_events_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetEventsStreamRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetEventsStreamRequest) ProtoMessage() {} + +func (x *GetEventsStreamRequest) ProtoReflect() protoreflect.Message { + mi := &file_okapi_events_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetEventsStreamRequest.ProtoReflect.Descriptor instead. +func (*GetEventsStreamRequest) Descriptor() ([]byte, []int) { + return file_okapi_events_proto_rawDescGZIP(), []int{4} +} + +func (x *GetEventsStreamRequest) GetQuery() []*Query { + if x != nil { + return x.Query + } + return nil +} + +var File_okapi_events_proto protoreflect.FileDescriptor + +var file_okapi_events_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x22, 0xa8, 0x01, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, + 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x7f, 0x0a, + 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, + 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x5e, + 0x0a, 0x10, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x50, 0x61, 0x67, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x65, 0x72, 0x50, 0x61, 0x67, 0x65, + 0x12, 0x1c, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x06, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x61, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x50, 0x61, + 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x70, 0x65, 0x72, 0x50, 0x61, 0x67, + 0x65, 0x12, 0x1e, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x06, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x22, 0x36, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x05, 0x71, + 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x06, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x42, 0x1a, 0x5a, 0x18, 0x77, 0x68, 0x69, + 0x74, 0x65, 0x62, 0x6f, 0x78, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2e, 0x6e, 0x6c, 0x2f, + 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_okapi_events_proto_rawDescOnce sync.Once + file_okapi_events_proto_rawDescData = file_okapi_events_proto_rawDesc +) + +func file_okapi_events_proto_rawDescGZIP() []byte { + file_okapi_events_proto_rawDescOnce.Do(func() { + file_okapi_events_proto_rawDescData = protoimpl.X.CompressGZIP(file_okapi_events_proto_rawDescData) + }) + return file_okapi_events_proto_rawDescData +} + +var file_okapi_events_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_okapi_events_proto_goTypes = []interface{}{ + (*Event)(nil), // 0: Event + (*Query)(nil), // 1: Query + (*GetEventsRequest)(nil), // 2: GetEventsRequest + (*GetEventsResponse)(nil), // 3: GetEventsResponse + (*GetEventsStreamRequest)(nil), // 4: GetEventsStreamRequest + (*structpb.Struct)(nil), // 5: google.protobuf.Struct +} +var file_okapi_events_proto_depIdxs = []int32{ + 5, // 0: Event.payload:type_name -> google.protobuf.Struct + 1, // 1: GetEventsRequest.query:type_name -> Query + 0, // 2: GetEventsResponse.events:type_name -> Event + 1, // 3: GetEventsStreamRequest.query:type_name -> Query + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_okapi_events_proto_init() } +func file_okapi_events_proto_init() { + if File_okapi_events_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_okapi_events_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_events_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Query); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_events_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEventsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_events_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEventsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_events_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetEventsStreamRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_okapi_events_proto_rawDesc, + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_okapi_events_proto_goTypes, + DependencyIndexes: file_okapi_events_proto_depIdxs, + MessageInfos: file_okapi_events_proto_msgTypes, + }.Build() + File_okapi_events_proto = out.File + file_okapi_events_proto_rawDesc = nil + file_okapi_events_proto_goTypes = nil + file_okapi_events_proto_depIdxs = nil +} diff --git a/okapi-events.proto b/okapi-events.proto deleted file mode 100644 index b21f2b3..0000000 --- a/okapi-events.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -import "google/protobuf/struct.proto"; -option go_package = "whiteboxsystems.nl/okapi"; - -message Event { - uint64 timestamp = 1; - string type = 2; - string serviceId = 3; - string patientId = 4; - google.protobuf.Struct payload = 5; -} -message Query { - uint64 start = 1; - uint64 end = 2; - string type = 3; - string serviceId = 4; - string patientId = 5; -} - -message GetEventsRequest { - int32 page = 2; - int32 perPage = 3; - repeated Query query = 4; -} - -message GetEventsResponse { - int32 page = 2; - int32 perPage = 3; - repeated Event events = 4; -} - -message GetEventsStreamRequest { - repeated Query query = 2; -} \ No newline at end of file diff --git a/okapi-onboarding.pb.go b/okapi-onboarding.pb.go new file mode 100644 index 0000000..c7e01d8 --- /dev/null +++ b/okapi-onboarding.pb.go @@ -0,0 +1,748 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.21.12 +// source: okapi-onboarding.proto + +package okapi + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type XISAuthMethod int32 + +const ( + XISAuthMethod_mTLS XISAuthMethod = 0 +) + +// Enum value maps for XISAuthMethod. +var ( + XISAuthMethod_name = map[int32]string{ + 0: "mTLS", + } + XISAuthMethod_value = map[string]int32{ + "mTLS": 0, + } +) + +func (x XISAuthMethod) Enum() *XISAuthMethod { + p := new(XISAuthMethod) + *p = x + return p +} + +func (x XISAuthMethod) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (XISAuthMethod) Descriptor() protoreflect.EnumDescriptor { + return file_okapi_onboarding_proto_enumTypes[0].Descriptor() +} + +func (XISAuthMethod) Type() protoreflect.EnumType { + return &file_okapi_onboarding_proto_enumTypes[0] +} + +func (x XISAuthMethod) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use XISAuthMethod.Descriptor instead. +func (XISAuthMethod) EnumDescriptor() ([]byte, []int) { + return file_okapi_onboarding_proto_rawDescGZIP(), []int{0} +} + +type MTLSConfigurationParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // JWK (RFC 7517) presentatie van publieke sleutel van het + // client certificaat dat gebruikt gaat worden voor het opzetten + // van de verbinding. + // Voorbeeld: "{\"crv\":\"P-256\",\"kty\":\"EC\",\"x\":\"PZlyqX3X...\", \"y\":\"AawwPSKBt...\"}" + PublicKey string `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"` +} + +func (x *MTLSConfigurationParams) Reset() { + *x = MTLSConfigurationParams{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_onboarding_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MTLSConfigurationParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MTLSConfigurationParams) ProtoMessage() {} + +func (x *MTLSConfigurationParams) ProtoReflect() protoreflect.Message { + mi := &file_okapi_onboarding_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MTLSConfigurationParams.ProtoReflect.Descriptor instead. +func (*MTLSConfigurationParams) Descriptor() ([]byte, []int) { + return file_okapi_onboarding_proto_rawDescGZIP(), []int{0} +} + +func (x *MTLSConfigurationParams) GetPublicKey() string { + if x != nil { + return x.PublicKey + } + return "" +} + +type XISAuthConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Method XISAuthMethod `protobuf:"varint,1,opt,name=method,proto3,enum=XISAuthMethod" json:"method,omitempty"` + // Types that are assignable to Configuration: + // + // *XISAuthConfiguration_MtlsConfiguration + Configuration isXISAuthConfiguration_Configuration `protobuf_oneof:"configuration"` +} + +func (x *XISAuthConfiguration) Reset() { + *x = XISAuthConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_onboarding_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *XISAuthConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*XISAuthConfiguration) ProtoMessage() {} + +func (x *XISAuthConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_okapi_onboarding_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use XISAuthConfiguration.ProtoReflect.Descriptor instead. +func (*XISAuthConfiguration) Descriptor() ([]byte, []int) { + return file_okapi_onboarding_proto_rawDescGZIP(), []int{1} +} + +func (x *XISAuthConfiguration) GetMethod() XISAuthMethod { + if x != nil { + return x.Method + } + return XISAuthMethod_mTLS +} + +func (m *XISAuthConfiguration) GetConfiguration() isXISAuthConfiguration_Configuration { + if m != nil { + return m.Configuration + } + return nil +} + +func (x *XISAuthConfiguration) GetMtlsConfiguration() *MTLSConfigurationParams { + if x, ok := x.GetConfiguration().(*XISAuthConfiguration_MtlsConfiguration); ok { + return x.MtlsConfiguration + } + return nil +} + +type isXISAuthConfiguration_Configuration interface { + isXISAuthConfiguration_Configuration() +} + +type XISAuthConfiguration_MtlsConfiguration struct { + MtlsConfiguration *MTLSConfigurationParams `protobuf:"bytes,2,opt,name=mtlsConfiguration,proto3,oneof"` +} + +func (*XISAuthConfiguration_MtlsConfiguration) isXISAuthConfiguration_Configuration() {} + +type GetMetadataRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetMetadataRequest) Reset() { + *x = GetMetadataRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_onboarding_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMetadataRequest) ProtoMessage() {} + +func (x *GetMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_okapi_onboarding_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMetadataRequest.ProtoReflect.Descriptor instead. +func (*GetMetadataRequest) Descriptor() ([]byte, []int) { + return file_okapi_onboarding_proto_rawDescGZIP(), []int{2} +} + +type GetMetadataResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SupplierFormalName string `protobuf:"bytes,1,opt,name=supplierFormalName,proto3" json:"supplierFormalName,omitempty"` + SupplierDisplayName string `protobuf:"bytes,2,opt,name=supplierDisplayName,proto3" json:"supplierDisplayName,omitempty"` + ProductName string `protobuf:"bytes,3,opt,name=productName,proto3" json:"productName,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` +} + +func (x *GetMetadataResponse) Reset() { + *x = GetMetadataResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_onboarding_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetMetadataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetMetadataResponse) ProtoMessage() {} + +func (x *GetMetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_okapi_onboarding_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetMetadataResponse.ProtoReflect.Descriptor instead. +func (*GetMetadataResponse) Descriptor() ([]byte, []int) { + return file_okapi_onboarding_proto_rawDescGZIP(), []int{3} +} + +func (x *GetMetadataResponse) GetSupplierFormalName() string { + if x != nil { + return x.SupplierFormalName + } + return "" +} + +func (x *GetMetadataResponse) GetSupplierDisplayName() string { + if x != nil { + return x.SupplierDisplayName + } + return "" +} + +func (x *GetMetadataResponse) GetProductName() string { + if x != nil { + return x.ProductName + } + return "" +} + +func (x *GetMetadataResponse) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +type RegisterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OrganisationFormalName string `protobuf:"bytes,1,opt,name=organisationFormalName,proto3" json:"organisationFormalName,omitempty"` + OrganisationDisplayName string `protobuf:"bytes,2,opt,name=organisationDisplayName,proto3" json:"organisationDisplayName,omitempty"` + OrganisationIdentifier string `protobuf:"bytes,3,opt,name=organisationIdentifier,proto3" json:"organisationIdentifier,omitempty"` + OrganisationIdentifierType string `protobuf:"bytes,4,opt,name=organisationIdentifierType,proto3" json:"organisationIdentifierType,omitempty"` // Type bijv. AGB, BIG registratie of KvK + Auth *XISAuthConfiguration `protobuf:"bytes,5,opt,name=auth,proto3" json:"auth,omitempty"` +} + +func (x *RegisterRequest) Reset() { + *x = RegisterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_onboarding_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterRequest) ProtoMessage() {} + +func (x *RegisterRequest) ProtoReflect() protoreflect.Message { + mi := &file_okapi_onboarding_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead. +func (*RegisterRequest) Descriptor() ([]byte, []int) { + return file_okapi_onboarding_proto_rawDescGZIP(), []int{4} +} + +func (x *RegisterRequest) GetOrganisationFormalName() string { + if x != nil { + return x.OrganisationFormalName + } + return "" +} + +func (x *RegisterRequest) GetOrganisationDisplayName() string { + if x != nil { + return x.OrganisationDisplayName + } + return "" +} + +func (x *RegisterRequest) GetOrganisationIdentifier() string { + if x != nil { + return x.OrganisationIdentifier + } + return "" +} + +func (x *RegisterRequest) GetOrganisationIdentifierType() string { + if x != nil { + return x.OrganisationIdentifierType + } + return "" +} + +func (x *RegisterRequest) GetAuth() *XISAuthConfiguration { + if x != nil { + return x.Auth + } + return nil +} + +type RegisterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"` +} + +func (x *RegisterResponse) Reset() { + *x = RegisterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_onboarding_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RegisterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RegisterResponse) ProtoMessage() {} + +func (x *RegisterResponse) ProtoReflect() protoreflect.Message { + mi := &file_okapi_onboarding_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead. +func (*RegisterResponse) Descriptor() ([]byte, []int) { + return file_okapi_onboarding_proto_rawDescGZIP(), []int{5} +} + +func (x *RegisterResponse) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +type CompleteRegistrationRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Reference string `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"` + AuthorizationToken string `protobuf:"bytes,2,opt,name=AuthorizationToken,proto3" json:"AuthorizationToken,omitempty"` +} + +func (x *CompleteRegistrationRequest) Reset() { + *x = CompleteRegistrationRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_onboarding_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompleteRegistrationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompleteRegistrationRequest) ProtoMessage() {} + +func (x *CompleteRegistrationRequest) ProtoReflect() protoreflect.Message { + mi := &file_okapi_onboarding_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompleteRegistrationRequest.ProtoReflect.Descriptor instead. +func (*CompleteRegistrationRequest) Descriptor() ([]byte, []int) { + return file_okapi_onboarding_proto_rawDescGZIP(), []int{6} +} + +func (x *CompleteRegistrationRequest) GetReference() string { + if x != nil { + return x.Reference + } + return "" +} + +func (x *CompleteRegistrationRequest) GetAuthorizationToken() string { + if x != nil { + return x.AuthorizationToken + } + return "" +} + +type CompleteRegistrationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CompleteRegistrationResponse) Reset() { + *x = CompleteRegistrationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_onboarding_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CompleteRegistrationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CompleteRegistrationResponse) ProtoMessage() {} + +func (x *CompleteRegistrationResponse) ProtoReflect() protoreflect.Message { + mi := &file_okapi_onboarding_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CompleteRegistrationResponse.ProtoReflect.Descriptor instead. +func (*CompleteRegistrationResponse) Descriptor() ([]byte, []int) { + return file_okapi_onboarding_proto_rawDescGZIP(), []int{7} +} + +var File_okapi_onboarding_proto protoreflect.FileDescriptor + +var file_okapi_onboarding_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x2d, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, + 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x37, 0x0a, 0x17, 0x4d, 0x54, 0x4c, 0x53, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x22, 0x99, 0x01, 0x0a, 0x14, 0x58, 0x49, 0x53, 0x41, 0x75, 0x74, 0x68, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x06, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0e, 0x2e, 0x58, 0x49, 0x53, + 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x12, 0x48, 0x0a, 0x11, 0x6d, 0x74, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x4d, 0x54, 0x4c, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x11, 0x6d, 0x74, 0x6c, 0x73, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x0d, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x14, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0xb3, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x73, + 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, + 0x72, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x13, 0x73, + 0x75, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x72, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x75, 0x70, 0x70, 0x6c, 0x69, + 0x65, 0x72, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x02, 0x0a, 0x0f, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, + 0x16, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6f, + 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x36, 0x0a, 0x16, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x16, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x1a, 0x6f, 0x72, 0x67, 0x61, 0x6e, + 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, + 0x69, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x58, 0x49, 0x53, 0x41, 0x75, 0x74, 0x68, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x61, 0x75, + 0x74, 0x68, 0x22, 0x30, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, + 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, + 0x65, 0x6e, 0x63, 0x65, 0x22, 0x6b, 0x0a, 0x1b, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, + 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x22, 0x1e, 0x0a, 0x1c, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2a, 0x19, 0x0a, 0x0d, 0x58, 0x49, 0x53, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x12, 0x08, 0x0a, 0x04, 0x6d, 0x54, 0x4c, 0x53, 0x10, 0x00, 0x42, 0x1a, 0x5a, 0x18, + 0x77, 0x68, 0x69, 0x74, 0x65, 0x62, 0x6f, 0x78, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2e, + 0x6e, 0x6c, 0x2f, 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_okapi_onboarding_proto_rawDescOnce sync.Once + file_okapi_onboarding_proto_rawDescData = file_okapi_onboarding_proto_rawDesc +) + +func file_okapi_onboarding_proto_rawDescGZIP() []byte { + file_okapi_onboarding_proto_rawDescOnce.Do(func() { + file_okapi_onboarding_proto_rawDescData = protoimpl.X.CompressGZIP(file_okapi_onboarding_proto_rawDescData) + }) + return file_okapi_onboarding_proto_rawDescData +} + +var file_okapi_onboarding_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_okapi_onboarding_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_okapi_onboarding_proto_goTypes = []interface{}{ + (XISAuthMethod)(0), // 0: XISAuthMethod + (*MTLSConfigurationParams)(nil), // 1: MTLSConfigurationParams + (*XISAuthConfiguration)(nil), // 2: XISAuthConfiguration + (*GetMetadataRequest)(nil), // 3: GetMetadataRequest + (*GetMetadataResponse)(nil), // 4: GetMetadataResponse + (*RegisterRequest)(nil), // 5: RegisterRequest + (*RegisterResponse)(nil), // 6: RegisterResponse + (*CompleteRegistrationRequest)(nil), // 7: CompleteRegistrationRequest + (*CompleteRegistrationResponse)(nil), // 8: CompleteRegistrationResponse +} +var file_okapi_onboarding_proto_depIdxs = []int32{ + 0, // 0: XISAuthConfiguration.method:type_name -> XISAuthMethod + 1, // 1: XISAuthConfiguration.mtlsConfiguration:type_name -> MTLSConfigurationParams + 2, // 2: RegisterRequest.auth:type_name -> XISAuthConfiguration + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_okapi_onboarding_proto_init() } +func file_okapi_onboarding_proto_init() { + if File_okapi_onboarding_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_okapi_onboarding_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MTLSConfigurationParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_onboarding_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*XISAuthConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_onboarding_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMetadataRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_onboarding_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetMetadataResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_onboarding_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_onboarding_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RegisterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_onboarding_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompleteRegistrationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_onboarding_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CompleteRegistrationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_okapi_onboarding_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*XISAuthConfiguration_MtlsConfiguration)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_okapi_onboarding_proto_rawDesc, + NumEnums: 1, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_okapi_onboarding_proto_goTypes, + DependencyIndexes: file_okapi_onboarding_proto_depIdxs, + EnumInfos: file_okapi_onboarding_proto_enumTypes, + MessageInfos: file_okapi_onboarding_proto_msgTypes, + }.Build() + File_okapi_onboarding_proto = out.File + file_okapi_onboarding_proto_rawDesc = nil + file_okapi_onboarding_proto_goTypes = nil + file_okapi_onboarding_proto_depIdxs = nil +} diff --git a/okapi-patient-registration.pb.go b/okapi-patient-registration.pb.go new file mode 100644 index 0000000..ed53b6d --- /dev/null +++ b/okapi-patient-registration.pb.go @@ -0,0 +1,1293 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.21.12 +// source: okapi-patient-registration.proto + +package okapi + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Identifier struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *Identifier) Reset() { + *x = Identifier{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Identifier) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Identifier) ProtoMessage() {} + +func (x *Identifier) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Identifier.ProtoReflect.Descriptor instead. +func (*Identifier) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{0} +} + +func (x *Identifier) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Identifier) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +type PatientRegistrationData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Subject *PatientMeta `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + CallbackProtocolData *structpb.Struct `protobuf:"bytes,3,opt,name=callbackProtocolData,proto3" json:"callbackProtocolData,omitempty"` + // Aangeven van extra data voor dienst specifieke zaken, bijv policy oid, + ServiceInput *structpb.Struct `protobuf:"bytes,4,opt,name=serviceInput,proto3" json:"serviceInput,omitempty"` + ServiceOutput *structpb.Struct `protobuf:"bytes,5,opt,name=serviceOutput,proto3" json:"serviceOutput,omitempty"` +} + +func (x *PatientRegistrationData) Reset() { + *x = PatientRegistrationData{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatientRegistrationData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatientRegistrationData) ProtoMessage() {} + +func (x *PatientRegistrationData) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatientRegistrationData.ProtoReflect.Descriptor instead. +func (*PatientRegistrationData) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{1} +} + +func (x *PatientRegistrationData) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PatientRegistrationData) GetSubject() *PatientMeta { + if x != nil { + return x.Subject + } + return nil +} + +func (x *PatientRegistrationData) GetCallbackProtocolData() *structpb.Struct { + if x != nil { + return x.CallbackProtocolData + } + return nil +} + +func (x *PatientRegistrationData) GetServiceInput() *structpb.Struct { + if x != nil { + return x.ServiceInput + } + return nil +} + +func (x *PatientRegistrationData) GetServiceOutput() *structpb.Struct { + if x != nil { + return x.ServiceOutput + } + return nil +} + +type Name struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Display string `protobuf:"bytes,1,opt,name=display,proto3" json:"display,omitempty"` + Given []string `protobuf:"bytes,2,rep,name=given,proto3" json:"given,omitempty"` + OwnName string `protobuf:"bytes,3,opt,name=ownName,proto3" json:"ownName,omitempty"` + OwnNamePrefix string `protobuf:"bytes,4,opt,name=ownNamePrefix,proto3" json:"ownNamePrefix,omitempty"` + PartnerName string `protobuf:"bytes,5,opt,name=partnerName,proto3" json:"partnerName,omitempty"` + PartnerNamePrefix string `protobuf:"bytes,6,opt,name=partnerNamePrefix,proto3" json:"partnerNamePrefix,omitempty"` +} + +func (x *Name) Reset() { + *x = Name{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Name) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Name) ProtoMessage() {} + +func (x *Name) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Name.ProtoReflect.Descriptor instead. +func (*Name) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{2} +} + +func (x *Name) GetDisplay() string { + if x != nil { + return x.Display + } + return "" +} + +func (x *Name) GetGiven() []string { + if x != nil { + return x.Given + } + return nil +} + +func (x *Name) GetOwnName() string { + if x != nil { + return x.OwnName + } + return "" +} + +func (x *Name) GetOwnNamePrefix() string { + if x != nil { + return x.OwnNamePrefix + } + return "" +} + +func (x *Name) GetPartnerName() string { + if x != nil { + return x.PartnerName + } + return "" +} + +func (x *Name) GetPartnerNamePrefix() string { + if x != nil { + return x.PartnerNamePrefix + } + return "" +} + +type Address struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Street string `protobuf:"bytes,1,opt,name=street,proto3" json:"street,omitempty"` + StreetNumber string `protobuf:"bytes,2,opt,name=streetNumber,proto3" json:"streetNumber,omitempty"` + PostalCode string `protobuf:"bytes,3,opt,name=postalCode,proto3" json:"postalCode,omitempty"` + City string `protobuf:"bytes,4,opt,name=city,proto3" json:"city,omitempty"` + Country string `protobuf:"bytes,5,opt,name=country,proto3" json:"country,omitempty"` +} + +func (x *Address) Reset() { + *x = Address{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Address) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Address) ProtoMessage() {} + +func (x *Address) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Address.ProtoReflect.Descriptor instead. +func (*Address) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{3} +} + +func (x *Address) GetStreet() string { + if x != nil { + return x.Street + } + return "" +} + +func (x *Address) GetStreetNumber() string { + if x != nil { + return x.StreetNumber + } + return "" +} + +func (x *Address) GetPostalCode() string { + if x != nil { + return x.PostalCode + } + return "" +} + +func (x *Address) GetCity() string { + if x != nil { + return x.City + } + return "" +} + +func (x *Address) GetCountry() string { + if x != nil { + return x.Country + } + return "" +} + +type PatientMeta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Identifier *Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` + Name *Name `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Address *Address `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + Birthdate string `protobuf:"bytes,4,opt,name=birthdate,proto3" json:"birthdate,omitempty"` // Date in format yyyy-mm-dd + Extra *structpb.Struct `protobuf:"bytes,5,opt,name=extra,proto3" json:"extra,omitempty"` +} + +func (x *PatientMeta) Reset() { + *x = PatientMeta{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatientMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatientMeta) ProtoMessage() {} + +func (x *PatientMeta) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatientMeta.ProtoReflect.Descriptor instead. +func (*PatientMeta) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{4} +} + +func (x *PatientMeta) GetIdentifier() *Identifier { + if x != nil { + return x.Identifier + } + return nil +} + +func (x *PatientMeta) GetName() *Name { + if x != nil { + return x.Name + } + return nil +} + +func (x *PatientMeta) GetAddress() *Address { + if x != nil { + return x.Address + } + return nil +} + +func (x *PatientMeta) GetBirthdate() string { + if x != nil { + return x.Birthdate + } + return "" +} + +func (x *PatientMeta) GetExtra() *structpb.Struct { + if x != nil { + return x.Extra + } + return nil +} + +type PatientRegistrationCreateOrUpdateData struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Subject *PatientMeta `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + CallbackProtocolData *structpb.Struct `protobuf:"bytes,3,opt,name=callbackProtocolData,proto3" json:"callbackProtocolData,omitempty"` + ServiceInput *structpb.Struct `protobuf:"bytes,4,opt,name=serviceInput,proto3" json:"serviceInput,omitempty"` +} + +func (x *PatientRegistrationCreateOrUpdateData) Reset() { + *x = PatientRegistrationCreateOrUpdateData{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatientRegistrationCreateOrUpdateData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatientRegistrationCreateOrUpdateData) ProtoMessage() {} + +func (x *PatientRegistrationCreateOrUpdateData) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatientRegistrationCreateOrUpdateData.ProtoReflect.Descriptor instead. +func (*PatientRegistrationCreateOrUpdateData) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{5} +} + +func (x *PatientRegistrationCreateOrUpdateData) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PatientRegistrationCreateOrUpdateData) GetSubject() *PatientMeta { + if x != nil { + return x.Subject + } + return nil +} + +func (x *PatientRegistrationCreateOrUpdateData) GetCallbackProtocolData() *structpb.Struct { + if x != nil { + return x.CallbackProtocolData + } + return nil +} + +func (x *PatientRegistrationCreateOrUpdateData) GetServiceInput() *structpb.Struct { + if x != nil { + return x.ServiceInput + } + return nil +} + +type PatientRegistrationResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ServiceOuput *structpb.Struct `protobuf:"bytes,2,opt,name=serviceOuput,proto3" json:"serviceOuput,omitempty"` + Error *OKAPIError `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *PatientRegistrationResult) Reset() { + *x = PatientRegistrationResult{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PatientRegistrationResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PatientRegistrationResult) ProtoMessage() {} + +func (x *PatientRegistrationResult) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PatientRegistrationResult.ProtoReflect.Descriptor instead. +func (*PatientRegistrationResult) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{6} +} + +func (x *PatientRegistrationResult) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PatientRegistrationResult) GetServiceOuput() *structpb.Struct { + if x != nil { + return x.ServiceOuput + } + return nil +} + +func (x *PatientRegistrationResult) GetError() *OKAPIError { + if x != nil { + return x.Error + } + return nil +} + +// Probably do this streaming (also)? +type CreateOrUpdatePatientRegistrationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId string `protobuf:"bytes,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"` + Registrations []*PatientRegistrationCreateOrUpdateData `protobuf:"bytes,2,rep,name=registrations,proto3" json:"registrations,omitempty"` +} + +func (x *CreateOrUpdatePatientRegistrationsRequest) Reset() { + *x = CreateOrUpdatePatientRegistrationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateOrUpdatePatientRegistrationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateOrUpdatePatientRegistrationsRequest) ProtoMessage() {} + +func (x *CreateOrUpdatePatientRegistrationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateOrUpdatePatientRegistrationsRequest.ProtoReflect.Descriptor instead. +func (*CreateOrUpdatePatientRegistrationsRequest) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateOrUpdatePatientRegistrationsRequest) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +func (x *CreateOrUpdatePatientRegistrationsRequest) GetRegistrations() []*PatientRegistrationCreateOrUpdateData { + if x != nil { + return x.Registrations + } + return nil +} + +type CreateOrUpdatePatientRegistrationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Results []*PatientRegistrationResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` +} + +func (x *CreateOrUpdatePatientRegistrationsResponse) Reset() { + *x = CreateOrUpdatePatientRegistrationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateOrUpdatePatientRegistrationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateOrUpdatePatientRegistrationsResponse) ProtoMessage() {} + +func (x *CreateOrUpdatePatientRegistrationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateOrUpdatePatientRegistrationsResponse.ProtoReflect.Descriptor instead. +func (*CreateOrUpdatePatientRegistrationsResponse) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{8} +} + +func (x *CreateOrUpdatePatientRegistrationsResponse) GetResults() []*PatientRegistrationResult { + if x != nil { + return x.Results + } + return nil +} + +type RemovePatientRegistrationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId string `protobuf:"bytes,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"` + Registrations []string `protobuf:"bytes,2,rep,name=registrations,proto3" json:"registrations,omitempty"` +} + +func (x *RemovePatientRegistrationsRequest) Reset() { + *x = RemovePatientRegistrationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemovePatientRegistrationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemovePatientRegistrationsRequest) ProtoMessage() {} + +func (x *RemovePatientRegistrationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemovePatientRegistrationsRequest.ProtoReflect.Descriptor instead. +func (*RemovePatientRegistrationsRequest) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{9} +} + +func (x *RemovePatientRegistrationsRequest) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +func (x *RemovePatientRegistrationsRequest) GetRegistrations() []string { + if x != nil { + return x.Registrations + } + return nil +} + +type RemovePatientRegistrationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Results []*PatientRegistrationResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` +} + +func (x *RemovePatientRegistrationsResponse) Reset() { + *x = RemovePatientRegistrationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemovePatientRegistrationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemovePatientRegistrationsResponse) ProtoMessage() {} + +func (x *RemovePatientRegistrationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemovePatientRegistrationsResponse.ProtoReflect.Descriptor instead. +func (*RemovePatientRegistrationsResponse) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{10} +} + +func (x *RemovePatientRegistrationsResponse) GetResults() []*PatientRegistrationResult { + if x != nil { + return x.Results + } + return nil +} + +type ListPatientRegistrationQuery struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id []string `protobuf:"bytes,1,rep,name=id,proto3" json:"id,omitempty"` + Identifier []*Identifier `protobuf:"bytes,2,rep,name=identifier,proto3" json:"identifier,omitempty"` +} + +func (x *ListPatientRegistrationQuery) Reset() { + *x = ListPatientRegistrationQuery{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPatientRegistrationQuery) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPatientRegistrationQuery) ProtoMessage() {} + +func (x *ListPatientRegistrationQuery) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPatientRegistrationQuery.ProtoReflect.Descriptor instead. +func (*ListPatientRegistrationQuery) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{11} +} + +func (x *ListPatientRegistrationQuery) GetId() []string { + if x != nil { + return x.Id + } + return nil +} + +func (x *ListPatientRegistrationQuery) GetIdentifier() []*Identifier { + if x != nil { + return x.Identifier + } + return nil +} + +type ListPatientRegistrationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId string `protobuf:"bytes,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"` + Query *ListPatientRegistrationQuery `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` +} + +func (x *ListPatientRegistrationsRequest) Reset() { + *x = ListPatientRegistrationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPatientRegistrationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPatientRegistrationsRequest) ProtoMessage() {} + +func (x *ListPatientRegistrationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPatientRegistrationsRequest.ProtoReflect.Descriptor instead. +func (*ListPatientRegistrationsRequest) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{12} +} + +func (x *ListPatientRegistrationsRequest) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +func (x *ListPatientRegistrationsRequest) GetQuery() *ListPatientRegistrationQuery { + if x != nil { + return x.Query + } + return nil +} + +type ListPatientRegistrationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PatientRegistrationData []*PatientRegistrationData `protobuf:"bytes,1,rep,name=patientRegistrationData,proto3" json:"patientRegistrationData,omitempty"` +} + +func (x *ListPatientRegistrationsResponse) Reset() { + *x = ListPatientRegistrationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_patient_registration_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListPatientRegistrationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListPatientRegistrationsResponse) ProtoMessage() {} + +func (x *ListPatientRegistrationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_okapi_patient_registration_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListPatientRegistrationsResponse.ProtoReflect.Descriptor instead. +func (*ListPatientRegistrationsResponse) Descriptor() ([]byte, []int) { + return file_okapi_patient_registration_proto_rawDescGZIP(), []int{13} +} + +func (x *ListPatientRegistrationsResponse) GetPatientRegistrationData() []*PatientRegistrationData { + if x != nil { + return x.PatientRegistrationData + } + return nil +} + +var File_okapi_patient_registration_proto protoreflect.FileDescriptor + +var file_okapi_patient_registration_proto_rawDesc = []byte{ + 0x0a, 0x20, 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x2d, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x2d, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x12, 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x2d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x36, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, + 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9a, 0x02, 0x0a, + 0x17, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, 0x61, 0x74, 0x69, + 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x12, 0x4b, 0x0a, 0x14, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x14, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, + 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0c, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x3d, 0x0a, 0x0d, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0xc6, 0x01, 0x0a, 0x04, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x67, 0x69, 0x76, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x67, 0x69, 0x76, + 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, + 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x77, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x4e, + 0x61, 0x6d, 0x65, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x11, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x22, 0x93, 0x01, 0x0a, 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x65, 0x65, 0x74, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, + 0x72, 0x65, 0x65, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6f, + 0x73, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, + 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x22, 0xc6, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x74, + 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x2b, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x49, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x05, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x22, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x08, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x69, 0x72, 0x74, 0x68, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x65, 0x78, 0x74, 0x72, + 0x61, 0x22, 0xe9, 0x01, 0x0a, 0x25, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, + 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x50, + 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x14, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x14, 0x63, 0x61, 0x6c, 0x6c, + 0x62, 0x61, 0x63, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x3b, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x8b, 0x01, + 0x0a, 0x19, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x0c, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x75, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x4f, 0x75, 0x70, 0x75, 0x74, 0x12, 0x21, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x4f, 0x4b, 0x41, 0x50, 0x49, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x97, 0x01, 0x0a, 0x29, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, + 0x2e, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x62, 0x0a, 0x2a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, + 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x67, 0x0a, 0x21, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0d, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x5a, 0x0a, 0x22, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x61, 0x74, 0x69, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x50, 0x61, 0x74, 0x69, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x5b, + 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, + 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, + 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x74, 0x0a, 0x1f, 0x4c, + 0x69, 0x73, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, + 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x33, 0x0a, 0x05, + 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x22, 0x76, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x17, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x17, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x42, 0x1a, 0x5a, 0x18, 0x77, 0x68, 0x69, + 0x74, 0x65, 0x62, 0x6f, 0x78, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2e, 0x6e, 0x6c, 0x2f, + 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_okapi_patient_registration_proto_rawDescOnce sync.Once + file_okapi_patient_registration_proto_rawDescData = file_okapi_patient_registration_proto_rawDesc +) + +func file_okapi_patient_registration_proto_rawDescGZIP() []byte { + file_okapi_patient_registration_proto_rawDescOnce.Do(func() { + file_okapi_patient_registration_proto_rawDescData = protoimpl.X.CompressGZIP(file_okapi_patient_registration_proto_rawDescData) + }) + return file_okapi_patient_registration_proto_rawDescData +} + +var file_okapi_patient_registration_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_okapi_patient_registration_proto_goTypes = []interface{}{ + (*Identifier)(nil), // 0: Identifier + (*PatientRegistrationData)(nil), // 1: PatientRegistrationData + (*Name)(nil), // 2: Name + (*Address)(nil), // 3: Address + (*PatientMeta)(nil), // 4: PatientMeta + (*PatientRegistrationCreateOrUpdateData)(nil), // 5: PatientRegistrationCreateOrUpdateData + (*PatientRegistrationResult)(nil), // 6: PatientRegistrationResult + (*CreateOrUpdatePatientRegistrationsRequest)(nil), // 7: CreateOrUpdatePatientRegistrationsRequest + (*CreateOrUpdatePatientRegistrationsResponse)(nil), // 8: CreateOrUpdatePatientRegistrationsResponse + (*RemovePatientRegistrationsRequest)(nil), // 9: RemovePatientRegistrationsRequest + (*RemovePatientRegistrationsResponse)(nil), // 10: RemovePatientRegistrationsResponse + (*ListPatientRegistrationQuery)(nil), // 11: ListPatientRegistrationQuery + (*ListPatientRegistrationsRequest)(nil), // 12: ListPatientRegistrationsRequest + (*ListPatientRegistrationsResponse)(nil), // 13: ListPatientRegistrationsResponse + (*structpb.Struct)(nil), // 14: google.protobuf.Struct + (*OKAPIError)(nil), // 15: OKAPIError +} +var file_okapi_patient_registration_proto_depIdxs = []int32{ + 4, // 0: PatientRegistrationData.subject:type_name -> PatientMeta + 14, // 1: PatientRegistrationData.callbackProtocolData:type_name -> google.protobuf.Struct + 14, // 2: PatientRegistrationData.serviceInput:type_name -> google.protobuf.Struct + 14, // 3: PatientRegistrationData.serviceOutput:type_name -> google.protobuf.Struct + 0, // 4: PatientMeta.identifier:type_name -> Identifier + 2, // 5: PatientMeta.name:type_name -> Name + 3, // 6: PatientMeta.address:type_name -> Address + 14, // 7: PatientMeta.extra:type_name -> google.protobuf.Struct + 4, // 8: PatientRegistrationCreateOrUpdateData.subject:type_name -> PatientMeta + 14, // 9: PatientRegistrationCreateOrUpdateData.callbackProtocolData:type_name -> google.protobuf.Struct + 14, // 10: PatientRegistrationCreateOrUpdateData.serviceInput:type_name -> google.protobuf.Struct + 14, // 11: PatientRegistrationResult.serviceOuput:type_name -> google.protobuf.Struct + 15, // 12: PatientRegistrationResult.error:type_name -> OKAPIError + 5, // 13: CreateOrUpdatePatientRegistrationsRequest.registrations:type_name -> PatientRegistrationCreateOrUpdateData + 6, // 14: CreateOrUpdatePatientRegistrationsResponse.results:type_name -> PatientRegistrationResult + 6, // 15: RemovePatientRegistrationsResponse.results:type_name -> PatientRegistrationResult + 0, // 16: ListPatientRegistrationQuery.identifier:type_name -> Identifier + 11, // 17: ListPatientRegistrationsRequest.query:type_name -> ListPatientRegistrationQuery + 1, // 18: ListPatientRegistrationsResponse.patientRegistrationData:type_name -> PatientRegistrationData + 19, // [19:19] is the sub-list for method output_type + 19, // [19:19] is the sub-list for method input_type + 19, // [19:19] is the sub-list for extension type_name + 19, // [19:19] is the sub-list for extension extendee + 0, // [0:19] is the sub-list for field type_name +} + +func init() { file_okapi_patient_registration_proto_init() } +func file_okapi_patient_registration_proto_init() { + if File_okapi_patient_registration_proto != nil { + return + } + file_okapi_errors_proto_init() + if !protoimpl.UnsafeEnabled { + file_okapi_patient_registration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Identifier); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatientRegistrationData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Name); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Address); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatientMeta); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatientRegistrationCreateOrUpdateData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PatientRegistrationResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateOrUpdatePatientRegistrationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateOrUpdatePatientRegistrationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemovePatientRegistrationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemovePatientRegistrationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPatientRegistrationQuery); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPatientRegistrationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_patient_registration_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListPatientRegistrationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_okapi_patient_registration_proto_rawDesc, + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_okapi_patient_registration_proto_goTypes, + DependencyIndexes: file_okapi_patient_registration_proto_depIdxs, + MessageInfos: file_okapi_patient_registration_proto_msgTypes, + }.Build() + File_okapi_patient_registration_proto = out.File + file_okapi_patient_registration_proto_rawDesc = nil + file_okapi_patient_registration_proto_goTypes = nil + file_okapi_patient_registration_proto_depIdxs = nil +} diff --git a/okapi-patient-registration.proto b/okapi-patient-registration.proto deleted file mode 100644 index 994a7ba..0000000 --- a/okapi-patient-registration.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; -import "google/protobuf/struct.proto"; -import "okapi-errors.proto"; -option go_package = "whiteboxsystems.nl/okapi"; - -message Identifier { - string type = 1; - string value = 2; -} - -message PatientRegistrationData { - PatientMeta subject = 1; - bool registered = 2; - string id = 3; - google.protobuf.Struct callbackProtocolData = 4; -} - -message PatientMeta { - repeated Identifier identifier = 1; - string firstname = 2; - string surname = 3; - string surnamePrefix = 4; - string birthdate = 5; - string street = 6; - string streetNumber = 7; - string streetNumberExtension = 8; - string postalCode = 9; - string city = 10; - string country = 11; - google.protobuf.Struct extra = 12; -} - -message PatientRegistrationError { - int32 index = 1; - OKAPIError error = 2; -} - -// Probably do this steaming (also)? - -message UpdatePatientRegistrationRequest { - string serviceId = 1; - repeated PatientRegistrationData PatientRegistrationData = 2; - bool atomicUpdate = 3; -} - -message UpdatePatientRegistrationResponse { - repeated PatientRegistrationError errors = 1; -} - -message ListPatientRegistrationRequest { - string serviceId = 1; -} - -message ListPatientRegistrationResponse { - repeated PatientRegistrationData PatientRegistrationData = 1; -} \ No newline at end of file diff --git a/okapi-service-config.pb.go b/okapi-service-config.pb.go new file mode 100644 index 0000000..26c40c6 --- /dev/null +++ b/okapi-service-config.pb.go @@ -0,0 +1,1008 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.21.12 +// source: okapi-service-config.proto + +package okapi + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + structpb "google.golang.org/protobuf/types/known/structpb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SubscriptionPolicy int32 + +const ( + SubscriptionPolicy_subnone SubscriptionPolicy = 0 + SubscriptionPolicy_optin SubscriptionPolicy = 1 + SubscriptionPolicy_optout SubscriptionPolicy = 2 +) + +// Enum value maps for SubscriptionPolicy. +var ( + SubscriptionPolicy_name = map[int32]string{ + 0: "subnone", + 1: "optin", + 2: "optout", + } + SubscriptionPolicy_value = map[string]int32{ + "subnone": 0, + "optin": 1, + "optout": 2, + } +) + +func (x SubscriptionPolicy) Enum() *SubscriptionPolicy { + p := new(SubscriptionPolicy) + *p = x + return p +} + +func (x SubscriptionPolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubscriptionPolicy) Descriptor() protoreflect.EnumDescriptor { + return file_okapi_service_config_proto_enumTypes[0].Descriptor() +} + +func (SubscriptionPolicy) Type() protoreflect.EnumType { + return &file_okapi_service_config_proto_enumTypes[0] +} + +func (x SubscriptionPolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SubscriptionPolicy.Descriptor instead. +func (SubscriptionPolicy) EnumDescriptor() ([]byte, []int) { + return file_okapi_service_config_proto_rawDescGZIP(), []int{0} +} + +type ConsentPolicy int32 + +const ( + ConsentPolicy_consentnone ConsentPolicy = 0 + ConsentPolicy_explicit ConsentPolicy = 1 + ConsentPolicy_presumed ConsentPolicy = 2 +) + +// Enum value maps for ConsentPolicy. +var ( + ConsentPolicy_name = map[int32]string{ + 0: "consentnone", + 1: "explicit", + 2: "presumed", + } + ConsentPolicy_value = map[string]int32{ + "consentnone": 0, + "explicit": 1, + "presumed": 2, + } +) + +func (x ConsentPolicy) Enum() *ConsentPolicy { + p := new(ConsentPolicy) + *p = x + return p +} + +func (x ConsentPolicy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ConsentPolicy) Descriptor() protoreflect.EnumDescriptor { + return file_okapi_service_config_proto_enumTypes[1].Descriptor() +} + +func (ConsentPolicy) Type() protoreflect.EnumType { + return &file_okapi_service_config_proto_enumTypes[1] +} + +func (x ConsentPolicy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ConsentPolicy.Descriptor instead. +func (ConsentPolicy) EnumDescriptor() ([]byte, []int) { + return file_okapi_service_config_proto_rawDescGZIP(), []int{1} +} + +type ProtocolAuthConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` + Configuration *structpb.Struct `protobuf:"bytes,2,opt,name=configuration,proto3" json:"configuration,omitempty"` +} + +func (x *ProtocolAuthConfiguration) Reset() { + *x = ProtocolAuthConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_service_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProtocolAuthConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProtocolAuthConfiguration) ProtoMessage() {} + +func (x *ProtocolAuthConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_okapi_service_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProtocolAuthConfiguration.ProtoReflect.Descriptor instead. +func (*ProtocolAuthConfiguration) Descriptor() ([]byte, []int) { + return file_okapi_service_config_proto_rawDescGZIP(), []int{0} +} + +func (x *ProtocolAuthConfiguration) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +func (x *ProtocolAuthConfiguration) GetConfiguration() *structpb.Struct { + if x != nil { + return x.Configuration + } + return nil +} + +type ProtocolDefinition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` + AuthMethods []string `protobuf:"bytes,2,rep,name=authMethods,proto3" json:"authMethods,omitempty"` +} + +func (x *ProtocolDefinition) Reset() { + *x = ProtocolDefinition{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_service_config_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ProtocolDefinition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProtocolDefinition) ProtoMessage() {} + +func (x *ProtocolDefinition) ProtoReflect() protoreflect.Message { + mi := &file_okapi_service_config_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProtocolDefinition.ProtoReflect.Descriptor instead. +func (*ProtocolDefinition) Descriptor() ([]byte, []int) { + return file_okapi_service_config_proto_rawDescGZIP(), []int{1} +} + +func (x *ProtocolDefinition) GetProtocol() string { + if x != nil { + return x.Protocol + } + return "" +} + +func (x *ProtocolDefinition) GetAuthMethods() []string { + if x != nil { + return x.AuthMethods + } + return nil +} + +type Service struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + 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"` + SubscriptionPolicy SubscriptionPolicy `protobuf:"varint,4,opt,name=subscriptionPolicy,proto3,enum=SubscriptionPolicy" json:"subscriptionPolicy,omitempty"` + ConsentPolicy ConsentPolicy `protobuf:"varint,5,opt,name=consentPolicy,proto3,enum=ConsentPolicy" json:"consentPolicy,omitempty"` + FetchProtocols []*ProtocolDefinition `protobuf:"bytes,6,rep,name=fetchProtocols,proto3" json:"fetchProtocols,omitempty"` + PushProtocols []*ProtocolDefinition `protobuf:"bytes,7,rep,name=pushProtocols,proto3" json:"pushProtocols,omitempty"` + FetchConfiguration *CallbackConfiguration `protobuf:"bytes,8,opt,name=fetchConfiguration,proto3" json:"fetchConfiguration,omitempty"` + PushConfiguration *CallbackConfiguration `protobuf:"bytes,9,opt,name=pushConfiguration,proto3" json:"pushConfiguration,omitempty"` + Enabled bool `protobuf:"varint,10,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +func (x *Service) Reset() { + *x = Service{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_service_config_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Service) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Service) ProtoMessage() {} + +func (x *Service) ProtoReflect() protoreflect.Message { + mi := &file_okapi_service_config_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Service.ProtoReflect.Descriptor instead. +func (*Service) Descriptor() ([]byte, []int) { + return file_okapi_service_config_proto_rawDescGZIP(), []int{2} +} + +func (x *Service) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Service) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Service) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Service) GetSubscriptionPolicy() SubscriptionPolicy { + if x != nil { + return x.SubscriptionPolicy + } + return SubscriptionPolicy_subnone +} + +func (x *Service) GetConsentPolicy() ConsentPolicy { + if x != nil { + return x.ConsentPolicy + } + return ConsentPolicy_consentnone +} + +func (x *Service) GetFetchProtocols() []*ProtocolDefinition { + if x != nil { + return x.FetchProtocols + } + return nil +} + +func (x *Service) GetPushProtocols() []*ProtocolDefinition { + if x != nil { + return x.PushProtocols + } + return nil +} + +func (x *Service) GetFetchConfiguration() *CallbackConfiguration { + if x != nil { + return x.FetchConfiguration + } + return nil +} + +func (x *Service) GetPushConfiguration() *CallbackConfiguration { + if x != nil { + return x.PushConfiguration + } + return nil +} + +func (x *Service) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +type CallbackConfiguration struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Protocol string `protobuf:"bytes,1,opt,name=protocol,proto3" json:"protocol,omitempty"` + Configuration *structpb.Struct `protobuf:"bytes,2,opt,name=configuration,proto3" json:"configuration,omitempty"` + Auth *ProtocolAuthConfiguration `protobuf:"bytes,3,opt,name=auth,proto3" json:"auth,omitempty"` +} + +func (x *CallbackConfiguration) Reset() { + *x = CallbackConfiguration{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_service_config_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CallbackConfiguration) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CallbackConfiguration) ProtoMessage() {} + +func (x *CallbackConfiguration) ProtoReflect() protoreflect.Message { + mi := &file_okapi_service_config_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CallbackConfiguration.ProtoReflect.Descriptor instead. +func (*CallbackConfiguration) Descriptor() ([]byte, []int) { + return file_okapi_service_config_proto_rawDescGZIP(), []int{3} +} + +func (x *CallbackConfiguration) GetProtocol() string { + if x != nil { + return x.Protocol + } + return "" +} + +func (x *CallbackConfiguration) GetConfiguration() *structpb.Struct { + if x != nil { + return x.Configuration + } + return nil +} + +func (x *CallbackConfiguration) GetAuth() *ProtocolAuthConfiguration { + if x != nil { + return x.Auth + } + return nil +} + +type EnableServiceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId string `protobuf:"bytes,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"` + Fetch *CallbackConfiguration `protobuf:"bytes,2,opt,name=fetch,proto3" json:"fetch,omitempty"` + Push *CallbackConfiguration `protobuf:"bytes,3,opt,name=push,proto3" json:"push,omitempty"` +} + +func (x *EnableServiceRequest) Reset() { + *x = EnableServiceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_service_config_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnableServiceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnableServiceRequest) ProtoMessage() {} + +func (x *EnableServiceRequest) ProtoReflect() protoreflect.Message { + mi := &file_okapi_service_config_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnableServiceRequest.ProtoReflect.Descriptor instead. +func (*EnableServiceRequest) Descriptor() ([]byte, []int) { + return file_okapi_service_config_proto_rawDescGZIP(), []int{4} +} + +func (x *EnableServiceRequest) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +func (x *EnableServiceRequest) GetFetch() *CallbackConfiguration { + if x != nil { + return x.Fetch + } + return nil +} + +func (x *EnableServiceRequest) GetPush() *CallbackConfiguration { + if x != nil { + return x.Push + } + return nil +} + +type EnableServiceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId string `protobuf:"bytes,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"` + Fetch *CallbackConfiguration `protobuf:"bytes,2,opt,name=fetch,proto3" json:"fetch,omitempty"` + Push *CallbackConfiguration `protobuf:"bytes,3,opt,name=push,proto3" json:"push,omitempty"` +} + +func (x *EnableServiceResponse) Reset() { + *x = EnableServiceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_service_config_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EnableServiceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnableServiceResponse) ProtoMessage() {} + +func (x *EnableServiceResponse) ProtoReflect() protoreflect.Message { + mi := &file_okapi_service_config_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnableServiceResponse.ProtoReflect.Descriptor instead. +func (*EnableServiceResponse) Descriptor() ([]byte, []int) { + return file_okapi_service_config_proto_rawDescGZIP(), []int{5} +} + +func (x *EnableServiceResponse) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +func (x *EnableServiceResponse) GetFetch() *CallbackConfiguration { + if x != nil { + return x.Fetch + } + return nil +} + +func (x *EnableServiceResponse) GetPush() *CallbackConfiguration { + if x != nil { + return x.Push + } + return nil +} + +type DisableServiceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServiceId string `protobuf:"bytes,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"` +} + +func (x *DisableServiceRequest) Reset() { + *x = DisableServiceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_service_config_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DisableServiceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DisableServiceRequest) ProtoMessage() {} + +func (x *DisableServiceRequest) ProtoReflect() protoreflect.Message { + mi := &file_okapi_service_config_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DisableServiceRequest.ProtoReflect.Descriptor instead. +func (*DisableServiceRequest) Descriptor() ([]byte, []int) { + return file_okapi_service_config_proto_rawDescGZIP(), []int{6} +} + +func (x *DisableServiceRequest) GetServiceId() string { + if x != nil { + return x.ServiceId + } + return "" +} + +type DisableServiceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DisableServiceResponse) Reset() { + *x = DisableServiceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_service_config_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DisableServiceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DisableServiceResponse) ProtoMessage() {} + +func (x *DisableServiceResponse) ProtoReflect() protoreflect.Message { + mi := &file_okapi_service_config_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DisableServiceResponse.ProtoReflect.Descriptor instead. +func (*DisableServiceResponse) Descriptor() ([]byte, []int) { + return file_okapi_service_config_proto_rawDescGZIP(), []int{7} +} + +type ListServicesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListServicesRequest) Reset() { + *x = ListServicesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_service_config_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListServicesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListServicesRequest) ProtoMessage() {} + +func (x *ListServicesRequest) ProtoReflect() protoreflect.Message { + mi := &file_okapi_service_config_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListServicesRequest.ProtoReflect.Descriptor instead. +func (*ListServicesRequest) Descriptor() ([]byte, []int) { + return file_okapi_service_config_proto_rawDescGZIP(), []int{8} +} + +type ListServicesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Services []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"` +} + +func (x *ListServicesResponse) Reset() { + *x = ListServicesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_okapi_service_config_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListServicesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListServicesResponse) ProtoMessage() {} + +func (x *ListServicesResponse) ProtoReflect() protoreflect.Message { + mi := &file_okapi_service_config_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListServicesResponse.ProtoReflect.Descriptor instead. +func (*ListServicesResponse) Descriptor() ([]byte, []int) { + return file_okapi_service_config_proto_rawDescGZIP(), []int{9} +} + +func (x *ListServicesResponse) GetServices() []*Service { + if x != nil { + return x.Services + } + return nil +} + +var File_okapi_service_config_proto protoreflect.FileDescriptor + +var file_okapi_service_config_proto_rawDesc = []byte{ + 0x0a, 0x1a, 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2d, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x72, 0x0a, 0x19, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, + 0x3d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, + 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x52, + 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, + 0x64, 0x73, 0x22, 0xea, 0x03, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 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, 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, 0x43, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x13, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x12, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x34, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0e, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, + 0x3b, 0x0a, 0x0e, 0x66, 0x65, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x66, 0x65, + 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x39, 0x0a, 0x0d, + 0x70, 0x75, 0x73, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x44, 0x65, + 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x70, 0x75, 0x73, 0x68, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x46, 0x0a, 0x12, 0x66, 0x65, 0x74, 0x63, 0x68, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x66, 0x65, 0x74, + 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x44, 0x0a, 0x11, 0x70, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x43, 0x61, 0x6c, + 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x11, 0x70, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, + 0xa2, 0x01, 0x0a, 0x15, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x3d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x41, 0x75, 0x74, + 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, + 0x61, 0x75, 0x74, 0x68, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x05, 0x66, + 0x65, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x43, 0x61, 0x6c, + 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x05, 0x66, 0x65, 0x74, 0x63, 0x68, 0x12, 0x2a, 0x0a, 0x04, 0x70, 0x75, 0x73, + 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, + 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x04, 0x70, 0x75, 0x73, 0x68, 0x22, 0x8f, 0x01, 0x0a, 0x15, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x2c, 0x0a, + 0x05, 0x66, 0x65, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x43, + 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x66, 0x65, 0x74, 0x63, 0x68, 0x12, 0x2a, 0x0a, 0x04, 0x70, + 0x75, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x43, 0x61, 0x6c, 0x6c, + 0x62, 0x61, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x04, 0x70, 0x75, 0x73, 0x68, 0x22, 0x35, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x61, 0x62, + 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x18, + 0x0a, 0x16, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x3c, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2a, 0x38, 0x0a, + 0x12, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6e, 0x6f, 0x6e, 0x65, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x6f, 0x70, 0x74, 0x69, 0x6e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x6f, + 0x70, 0x74, 0x6f, 0x75, 0x74, 0x10, 0x02, 0x2a, 0x3c, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x0f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x74, 0x6e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x65, 0x78, 0x70, + 0x6c, 0x69, 0x63, 0x69, 0x74, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x73, 0x75, + 0x6d, 0x65, 0x64, 0x10, 0x02, 0x42, 0x1a, 0x5a, 0x18, 0x77, 0x68, 0x69, 0x74, 0x65, 0x62, 0x6f, + 0x78, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2e, 0x6e, 0x6c, 0x2f, 0x6f, 0x6b, 0x61, 0x70, + 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_okapi_service_config_proto_rawDescOnce sync.Once + file_okapi_service_config_proto_rawDescData = file_okapi_service_config_proto_rawDesc +) + +func file_okapi_service_config_proto_rawDescGZIP() []byte { + file_okapi_service_config_proto_rawDescOnce.Do(func() { + file_okapi_service_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_okapi_service_config_proto_rawDescData) + }) + return file_okapi_service_config_proto_rawDescData +} + +var file_okapi_service_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_okapi_service_config_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_okapi_service_config_proto_goTypes = []interface{}{ + (SubscriptionPolicy)(0), // 0: SubscriptionPolicy + (ConsentPolicy)(0), // 1: ConsentPolicy + (*ProtocolAuthConfiguration)(nil), // 2: ProtocolAuthConfiguration + (*ProtocolDefinition)(nil), // 3: ProtocolDefinition + (*Service)(nil), // 4: Service + (*CallbackConfiguration)(nil), // 5: CallbackConfiguration + (*EnableServiceRequest)(nil), // 6: EnableServiceRequest + (*EnableServiceResponse)(nil), // 7: EnableServiceResponse + (*DisableServiceRequest)(nil), // 8: DisableServiceRequest + (*DisableServiceResponse)(nil), // 9: DisableServiceResponse + (*ListServicesRequest)(nil), // 10: ListServicesRequest + (*ListServicesResponse)(nil), // 11: ListServicesResponse + (*structpb.Struct)(nil), // 12: google.protobuf.Struct +} +var file_okapi_service_config_proto_depIdxs = []int32{ + 12, // 0: ProtocolAuthConfiguration.configuration:type_name -> google.protobuf.Struct + 0, // 1: Service.subscriptionPolicy:type_name -> SubscriptionPolicy + 1, // 2: Service.consentPolicy:type_name -> ConsentPolicy + 3, // 3: Service.fetchProtocols:type_name -> ProtocolDefinition + 3, // 4: Service.pushProtocols:type_name -> ProtocolDefinition + 5, // 5: Service.fetchConfiguration:type_name -> CallbackConfiguration + 5, // 6: Service.pushConfiguration:type_name -> CallbackConfiguration + 12, // 7: CallbackConfiguration.configuration:type_name -> google.protobuf.Struct + 2, // 8: CallbackConfiguration.auth:type_name -> ProtocolAuthConfiguration + 5, // 9: EnableServiceRequest.fetch:type_name -> CallbackConfiguration + 5, // 10: EnableServiceRequest.push:type_name -> CallbackConfiguration + 5, // 11: EnableServiceResponse.fetch:type_name -> CallbackConfiguration + 5, // 12: EnableServiceResponse.push:type_name -> CallbackConfiguration + 4, // 13: ListServicesResponse.services:type_name -> Service + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name +} + +func init() { file_okapi_service_config_proto_init() } +func file_okapi_service_config_proto_init() { + if File_okapi_service_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_okapi_service_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProtocolAuthConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_service_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ProtocolDefinition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_service_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Service); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_service_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CallbackConfiguration); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_service_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnableServiceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_service_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnableServiceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_service_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisableServiceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_service_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DisableServiceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_service_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListServicesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_okapi_service_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListServicesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_okapi_service_config_proto_rawDesc, + NumEnums: 2, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_okapi_service_config_proto_goTypes, + DependencyIndexes: file_okapi_service_config_proto_depIdxs, + EnumInfos: file_okapi_service_config_proto_enumTypes, + MessageInfos: file_okapi_service_config_proto_msgTypes, + }.Build() + File_okapi_service_config_proto = out.File + file_okapi_service_config_proto_rawDesc = nil + file_okapi_service_config_proto_goTypes = nil + file_okapi_service_config_proto_depIdxs = nil +} diff --git a/okapi.pb.go b/okapi.pb.go new file mode 100644 index 0000000..d80df0c --- /dev/null +++ b/okapi.pb.go @@ -0,0 +1,170 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.21.12 +// source: okapi.proto + +package okapi + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_okapi_proto protoreflect.FileDescriptor + +var file_okapi_proto_rawDesc = []byte{ + 0x0a, 0x0b, 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x6f, + 0x6b, 0x61, 0x70, 0x69, 0x2d, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x2d, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x20, 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x2d, 0x70, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, + 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x6f, 0x6b, 0x61, 0x70, 0x69, 0x2d, 0x65, 0x76, 0x65, 0x6e, 0x74, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xce, 0x06, 0x0a, 0x05, 0x4f, 0x6b, 0x41, 0x50, + 0x49, 0x12, 0x3a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x13, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x31, 0x0a, + 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x55, 0x0a, 0x14, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, + 0x65, 0x74, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x14, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0d, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x15, 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x2e, 0x44, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7f, 0x0a, + 0x22, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x2a, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2b, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x67, + 0x0a, 0x1a, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x50, + 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x74, 0x69, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x09, 0x47, 0x65, + 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x11, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x47, 0x65, 0x74, + 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x36, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x06, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x22, 0x00, 0x30, 0x01, 0x42, 0x1a, 0x5a, 0x18, 0x77, 0x68, 0x69, 0x74, + 0x65, 0x62, 0x6f, 0x78, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2e, 0x6e, 0x6c, 0x2f, 0x6f, + 0x6b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var file_okapi_proto_goTypes = []interface{}{ + (*GetMetadataRequest)(nil), // 0: GetMetadataRequest + (*RegisterRequest)(nil), // 1: RegisterRequest + (*CompleteRegistrationRequest)(nil), // 2: CompleteRegistrationRequest + (*ListServicesRequest)(nil), // 3: ListServicesRequest + (*EnableServiceRequest)(nil), // 4: EnableServiceRequest + (*DisableServiceRequest)(nil), // 5: DisableServiceRequest + (*CreateOrUpdatePatientRegistrationsRequest)(nil), // 6: CreateOrUpdatePatientRegistrationsRequest + (*RemovePatientRegistrationsRequest)(nil), // 7: RemovePatientRegistrationsRequest + (*ListPatientRegistrationsRequest)(nil), // 8: ListPatientRegistrationsRequest + (*GetEventsRequest)(nil), // 9: GetEventsRequest + (*GetEventsStreamRequest)(nil), // 10: GetEventsStreamRequest + (*GetMetadataResponse)(nil), // 11: GetMetadataResponse + (*RegisterResponse)(nil), // 12: RegisterResponse + (*CompleteRegistrationResponse)(nil), // 13: CompleteRegistrationResponse + (*ListServicesResponse)(nil), // 14: ListServicesResponse + (*EnableServiceResponse)(nil), // 15: EnableServiceResponse + (*DisableServiceResponse)(nil), // 16: DisableServiceResponse + (*CreateOrUpdatePatientRegistrationsResponse)(nil), // 17: CreateOrUpdatePatientRegistrationsResponse + (*RemovePatientRegistrationsResponse)(nil), // 18: RemovePatientRegistrationsResponse + (*ListPatientRegistrationsResponse)(nil), // 19: ListPatientRegistrationsResponse + (*GetEventsResponse)(nil), // 20: GetEventsResponse + (*Event)(nil), // 21: Event +} +var file_okapi_proto_depIdxs = []int32{ + 0, // 0: OkAPI.GetMetadata:input_type -> GetMetadataRequest + 1, // 1: OkAPI.Register:input_type -> RegisterRequest + 2, // 2: OkAPI.CompleteRegistration:input_type -> CompleteRegistrationRequest + 3, // 3: OkAPI.ListServices:input_type -> ListServicesRequest + 4, // 4: OkAPI.EnableService:input_type -> EnableServiceRequest + 5, // 5: OkAPI.DisableService:input_type -> DisableServiceRequest + 6, // 6: OkAPI.CreateOrUpdatePatientRegistrations:input_type -> CreateOrUpdatePatientRegistrationsRequest + 7, // 7: OkAPI.RemovePatientRegistrations:input_type -> RemovePatientRegistrationsRequest + 8, // 8: OkAPI.ListPatientRegistrations:input_type -> ListPatientRegistrationsRequest + 9, // 9: OkAPI.GetEvents:input_type -> GetEventsRequest + 10, // 10: OkAPI.GetEventsStream:input_type -> GetEventsStreamRequest + 11, // 11: OkAPI.GetMetadata:output_type -> GetMetadataResponse + 12, // 12: OkAPI.Register:output_type -> RegisterResponse + 13, // 13: OkAPI.CompleteRegistration:output_type -> CompleteRegistrationResponse + 14, // 14: OkAPI.ListServices:output_type -> ListServicesResponse + 15, // 15: OkAPI.EnableService:output_type -> EnableServiceResponse + 16, // 16: OkAPI.DisableService:output_type -> DisableServiceResponse + 17, // 17: OkAPI.CreateOrUpdatePatientRegistrations:output_type -> CreateOrUpdatePatientRegistrationsResponse + 18, // 18: OkAPI.RemovePatientRegistrations:output_type -> RemovePatientRegistrationsResponse + 19, // 19: OkAPI.ListPatientRegistrations:output_type -> ListPatientRegistrationsResponse + 20, // 20: OkAPI.GetEvents:output_type -> GetEventsResponse + 21, // 21: OkAPI.GetEventsStream:output_type -> Event + 11, // [11:22] is the sub-list for method output_type + 0, // [0:11] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_okapi_proto_init() } +func file_okapi_proto_init() { + if File_okapi_proto != nil { + return + } + file_okapi_onboarding_proto_init() + file_okapi_service_config_proto_init() + file_okapi_patient_registration_proto_init() + file_okapi_events_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_okapi_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_okapi_proto_goTypes, + DependencyIndexes: file_okapi_proto_depIdxs, + }.Build() + File_okapi_proto = out.File + file_okapi_proto_rawDesc = nil + file_okapi_proto_goTypes = nil + file_okapi_proto_depIdxs = nil +} diff --git a/okapi_grpc.pb.go b/okapi_grpc.pb.go new file mode 100644 index 0000000..b0c1121 --- /dev/null +++ b/okapi_grpc.pb.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.21.12 +// source: okapi.proto + +package okapi + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + OkAPI_GetMetadata_FullMethodName = "/OkAPI/GetMetadata" + OkAPI_Register_FullMethodName = "/OkAPI/Register" + OkAPI_CompleteRegistration_FullMethodName = "/OkAPI/CompleteRegistration" + OkAPI_ListServices_FullMethodName = "/OkAPI/ListServices" + OkAPI_EnableService_FullMethodName = "/OkAPI/EnableService" + OkAPI_DisableService_FullMethodName = "/OkAPI/DisableService" + OkAPI_CreateOrUpdatePatientRegistrations_FullMethodName = "/OkAPI/CreateOrUpdatePatientRegistrations" + OkAPI_RemovePatientRegistrations_FullMethodName = "/OkAPI/RemovePatientRegistrations" + OkAPI_ListPatientRegistrations_FullMethodName = "/OkAPI/ListPatientRegistrations" + OkAPI_GetEvents_FullMethodName = "/OkAPI/GetEvents" + OkAPI_GetEventsStream_FullMethodName = "/OkAPI/GetEventsStream" +) + +// OkAPIClient is the client API for OkAPI service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type OkAPIClient interface { + // Onboarding + GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error) + Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) + CompleteRegistration(ctx context.Context, in *CompleteRegistrationRequest, opts ...grpc.CallOption) (*CompleteRegistrationResponse, error) + // Configuration + ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) + EnableService(ctx context.Context, in *EnableServiceRequest, opts ...grpc.CallOption) (*EnableServiceResponse, error) + DisableService(ctx context.Context, in *DisableServiceRequest, opts ...grpc.CallOption) (*DisableServiceResponse, error) + CreateOrUpdatePatientRegistrations(ctx context.Context, in *CreateOrUpdatePatientRegistrationsRequest, opts ...grpc.CallOption) (*CreateOrUpdatePatientRegistrationsResponse, error) + RemovePatientRegistrations(ctx context.Context, in *RemovePatientRegistrationsRequest, opts ...grpc.CallOption) (*RemovePatientRegistrationsResponse, error) + ListPatientRegistrations(ctx context.Context, in *ListPatientRegistrationsRequest, opts ...grpc.CallOption) (*ListPatientRegistrationsResponse, error) + // Events + GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) + GetEventsStream(ctx context.Context, in *GetEventsStreamRequest, opts ...grpc.CallOption) (OkAPI_GetEventsStreamClient, error) +} + +type okAPIClient struct { + cc grpc.ClientConnInterface +} + +func NewOkAPIClient(cc grpc.ClientConnInterface) OkAPIClient { + return &okAPIClient{cc} +} + +func (c *okAPIClient) GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*GetMetadataResponse, error) { + out := new(GetMetadataResponse) + err := c.cc.Invoke(ctx, OkAPI_GetMetadata_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *okAPIClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) { + out := new(RegisterResponse) + err := c.cc.Invoke(ctx, OkAPI_Register_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *okAPIClient) CompleteRegistration(ctx context.Context, in *CompleteRegistrationRequest, opts ...grpc.CallOption) (*CompleteRegistrationResponse, error) { + out := new(CompleteRegistrationResponse) + err := c.cc.Invoke(ctx, OkAPI_CompleteRegistration_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *okAPIClient) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) { + out := new(ListServicesResponse) + err := c.cc.Invoke(ctx, OkAPI_ListServices_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *okAPIClient) EnableService(ctx context.Context, in *EnableServiceRequest, opts ...grpc.CallOption) (*EnableServiceResponse, error) { + out := new(EnableServiceResponse) + err := c.cc.Invoke(ctx, OkAPI_EnableService_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *okAPIClient) DisableService(ctx context.Context, in *DisableServiceRequest, opts ...grpc.CallOption) (*DisableServiceResponse, error) { + out := new(DisableServiceResponse) + err := c.cc.Invoke(ctx, OkAPI_DisableService_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *okAPIClient) CreateOrUpdatePatientRegistrations(ctx context.Context, in *CreateOrUpdatePatientRegistrationsRequest, opts ...grpc.CallOption) (*CreateOrUpdatePatientRegistrationsResponse, error) { + out := new(CreateOrUpdatePatientRegistrationsResponse) + err := c.cc.Invoke(ctx, OkAPI_CreateOrUpdatePatientRegistrations_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *okAPIClient) RemovePatientRegistrations(ctx context.Context, in *RemovePatientRegistrationsRequest, opts ...grpc.CallOption) (*RemovePatientRegistrationsResponse, error) { + out := new(RemovePatientRegistrationsResponse) + err := c.cc.Invoke(ctx, OkAPI_RemovePatientRegistrations_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *okAPIClient) ListPatientRegistrations(ctx context.Context, in *ListPatientRegistrationsRequest, opts ...grpc.CallOption) (*ListPatientRegistrationsResponse, error) { + out := new(ListPatientRegistrationsResponse) + err := c.cc.Invoke(ctx, OkAPI_ListPatientRegistrations_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *okAPIClient) GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) { + out := new(GetEventsResponse) + err := c.cc.Invoke(ctx, OkAPI_GetEvents_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *okAPIClient) GetEventsStream(ctx context.Context, in *GetEventsStreamRequest, opts ...grpc.CallOption) (OkAPI_GetEventsStreamClient, error) { + stream, err := c.cc.NewStream(ctx, &OkAPI_ServiceDesc.Streams[0], OkAPI_GetEventsStream_FullMethodName, opts...) + if err != nil { + return nil, err + } + x := &okAPIGetEventsStreamClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type OkAPI_GetEventsStreamClient interface { + Recv() (*Event, error) + grpc.ClientStream +} + +type okAPIGetEventsStreamClient struct { + grpc.ClientStream +} + +func (x *okAPIGetEventsStreamClient) Recv() (*Event, error) { + m := new(Event) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// OkAPIServer is the server API for OkAPI service. +// All implementations must embed UnimplementedOkAPIServer +// for forward compatibility +type OkAPIServer interface { + // Onboarding + GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error) + Register(context.Context, *RegisterRequest) (*RegisterResponse, error) + CompleteRegistration(context.Context, *CompleteRegistrationRequest) (*CompleteRegistrationResponse, error) + // Configuration + ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) + EnableService(context.Context, *EnableServiceRequest) (*EnableServiceResponse, error) + DisableService(context.Context, *DisableServiceRequest) (*DisableServiceResponse, error) + CreateOrUpdatePatientRegistrations(context.Context, *CreateOrUpdatePatientRegistrationsRequest) (*CreateOrUpdatePatientRegistrationsResponse, error) + RemovePatientRegistrations(context.Context, *RemovePatientRegistrationsRequest) (*RemovePatientRegistrationsResponse, error) + ListPatientRegistrations(context.Context, *ListPatientRegistrationsRequest) (*ListPatientRegistrationsResponse, error) + // Events + GetEvents(context.Context, *GetEventsRequest) (*GetEventsResponse, error) + GetEventsStream(*GetEventsStreamRequest, OkAPI_GetEventsStreamServer) error + mustEmbedUnimplementedOkAPIServer() +} + +// UnimplementedOkAPIServer must be embedded to have forward compatible implementations. +type UnimplementedOkAPIServer struct { +} + +func (UnimplementedOkAPIServer) GetMetadata(context.Context, *GetMetadataRequest) (*GetMetadataResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetMetadata not implemented") +} +func (UnimplementedOkAPIServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Register not implemented") +} +func (UnimplementedOkAPIServer) CompleteRegistration(context.Context, *CompleteRegistrationRequest) (*CompleteRegistrationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CompleteRegistration not implemented") +} +func (UnimplementedOkAPIServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") +} +func (UnimplementedOkAPIServer) EnableService(context.Context, *EnableServiceRequest) (*EnableServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EnableService not implemented") +} +func (UnimplementedOkAPIServer) DisableService(context.Context, *DisableServiceRequest) (*DisableServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DisableService not implemented") +} +func (UnimplementedOkAPIServer) CreateOrUpdatePatientRegistrations(context.Context, *CreateOrUpdatePatientRegistrationsRequest) (*CreateOrUpdatePatientRegistrationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateOrUpdatePatientRegistrations not implemented") +} +func (UnimplementedOkAPIServer) RemovePatientRegistrations(context.Context, *RemovePatientRegistrationsRequest) (*RemovePatientRegistrationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemovePatientRegistrations not implemented") +} +func (UnimplementedOkAPIServer) ListPatientRegistrations(context.Context, *ListPatientRegistrationsRequest) (*ListPatientRegistrationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListPatientRegistrations not implemented") +} +func (UnimplementedOkAPIServer) GetEvents(context.Context, *GetEventsRequest) (*GetEventsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetEvents not implemented") +} +func (UnimplementedOkAPIServer) GetEventsStream(*GetEventsStreamRequest, OkAPI_GetEventsStreamServer) error { + return status.Errorf(codes.Unimplemented, "method GetEventsStream not implemented") +} +func (UnimplementedOkAPIServer) mustEmbedUnimplementedOkAPIServer() {} + +// UnsafeOkAPIServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to OkAPIServer will +// result in compilation errors. +type UnsafeOkAPIServer interface { + mustEmbedUnimplementedOkAPIServer() +} + +func RegisterOkAPIServer(s grpc.ServiceRegistrar, srv OkAPIServer) { + s.RegisterService(&OkAPI_ServiceDesc, srv) +} + +func _OkAPI_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetMetadataRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OkAPIServer).GetMetadata(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OkAPI_GetMetadata_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OkAPIServer).GetMetadata(ctx, req.(*GetMetadataRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OkAPI_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OkAPIServer).Register(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OkAPI_Register_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OkAPIServer).Register(ctx, req.(*RegisterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OkAPI_CompleteRegistration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CompleteRegistrationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OkAPIServer).CompleteRegistration(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OkAPI_CompleteRegistration_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OkAPIServer).CompleteRegistration(ctx, req.(*CompleteRegistrationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OkAPI_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListServicesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OkAPIServer).ListServices(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OkAPI_ListServices_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OkAPIServer).ListServices(ctx, req.(*ListServicesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OkAPI_EnableService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EnableServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OkAPIServer).EnableService(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OkAPI_EnableService_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OkAPIServer).EnableService(ctx, req.(*EnableServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OkAPI_DisableService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DisableServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OkAPIServer).DisableService(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OkAPI_DisableService_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OkAPIServer).DisableService(ctx, req.(*DisableServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OkAPI_CreateOrUpdatePatientRegistrations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateOrUpdatePatientRegistrationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OkAPIServer).CreateOrUpdatePatientRegistrations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OkAPI_CreateOrUpdatePatientRegistrations_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OkAPIServer).CreateOrUpdatePatientRegistrations(ctx, req.(*CreateOrUpdatePatientRegistrationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OkAPI_RemovePatientRegistrations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemovePatientRegistrationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OkAPIServer).RemovePatientRegistrations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OkAPI_RemovePatientRegistrations_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OkAPIServer).RemovePatientRegistrations(ctx, req.(*RemovePatientRegistrationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OkAPI_ListPatientRegistrations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListPatientRegistrationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OkAPIServer).ListPatientRegistrations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OkAPI_ListPatientRegistrations_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OkAPIServer).ListPatientRegistrations(ctx, req.(*ListPatientRegistrationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OkAPI_GetEvents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetEventsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OkAPIServer).GetEvents(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: OkAPI_GetEvents_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OkAPIServer).GetEvents(ctx, req.(*GetEventsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _OkAPI_GetEventsStream_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(GetEventsStreamRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(OkAPIServer).GetEventsStream(m, &okAPIGetEventsStreamServer{stream}) +} + +type OkAPI_GetEventsStreamServer interface { + Send(*Event) error + grpc.ServerStream +} + +type okAPIGetEventsStreamServer struct { + grpc.ServerStream +} + +func (x *okAPIGetEventsStreamServer) Send(m *Event) error { + return x.ServerStream.SendMsg(m) +} + +// OkAPI_ServiceDesc is the grpc.ServiceDesc for OkAPI service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var OkAPI_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "OkAPI", + HandlerType: (*OkAPIServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetMetadata", + Handler: _OkAPI_GetMetadata_Handler, + }, + { + MethodName: "Register", + Handler: _OkAPI_Register_Handler, + }, + { + MethodName: "CompleteRegistration", + Handler: _OkAPI_CompleteRegistration_Handler, + }, + { + MethodName: "ListServices", + Handler: _OkAPI_ListServices_Handler, + }, + { + MethodName: "EnableService", + Handler: _OkAPI_EnableService_Handler, + }, + { + MethodName: "DisableService", + Handler: _OkAPI_DisableService_Handler, + }, + { + MethodName: "CreateOrUpdatePatientRegistrations", + Handler: _OkAPI_CreateOrUpdatePatientRegistrations_Handler, + }, + { + MethodName: "RemovePatientRegistrations", + Handler: _OkAPI_RemovePatientRegistrations_Handler, + }, + { + MethodName: "ListPatientRegistrations", + Handler: _OkAPI_ListPatientRegistrations_Handler, + }, + { + MethodName: "GetEvents", + Handler: _OkAPI_GetEvents_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "GetEventsStream", + Handler: _OkAPI_GetEventsStream_Handler, + ServerStreams: true, + }, + }, + Metadata: "okapi.proto", +} diff --git a/okapi-errors.proto b/protobuf/okapi-errors.proto similarity index 66% rename from okapi-errors.proto rename to protobuf/okapi-errors.proto index 12d86be..d22014e 100644 --- a/okapi-errors.proto +++ b/protobuf/okapi-errors.proto @@ -8,7 +8,7 @@ enum OKAPIErrorCode { // Onbekende reference meegegeven UnkownReference = 2; // Invalide autorisatietoken voor deze reference - InvalidAuthorisationToken = 3; + InvalidAuthorizationToken = 3; // Onbekende service UnknownService = 4; // Onbekende protocol @@ -21,6 +21,15 @@ enum OKAPIErrorCode { InvalidProcotolAuthConfig = 8; // Er zijn niet genoeg events om deze pagina te bereiken InvalidPage = 9; + // Er wordt geprobeerd een patient af te melden die niet is ingeschreven + AlreadyUnsubscribed = 10; + // De service is al actief + ServiceAlreadyActivated = 11; + // De service is niet actief + ServiceNotActive = 12; + // Een generieke error code die terug wordt gegeven met en omschrijving die + // meer informatie geeft over wat er fout is gegaan + GenericException = 999; } message OKAPIError { diff --git a/protobuf/okapi-events.proto b/protobuf/okapi-events.proto new file mode 100644 index 0000000..02c2629 --- /dev/null +++ b/protobuf/okapi-events.proto @@ -0,0 +1,65 @@ +syntax = "proto3"; +import "google/protobuf/struct.proto"; +option go_package = "whiteboxsystems.nl/okapi"; + +// idea: +// query: +// /:type[/:subtype+]/:service/:patient with wildcard + +// Should events payloads be documented by for example json schema? +message Event { + uint64 timestamp = 1; + string type = 2; + string serviceId = 3; + string patientId = 4; + google.protobuf.Struct payload = 5; + // string schema = 6; // ? do we need a schema in the event itself +} +message Query { + uint64 start = 1; + uint64 end = 2; + string type = 3; + string serviceId = 4; + string patientId = 5; +} + +message GetEventsRequest { + int32 page = 2; + int32 perPage = 3; + repeated Query query = 4; +} + +message GetEventsResponse { + int32 page = 2; + int32 perPage = 3; + repeated Event events = 4; +} + +message GetEventsStreamRequest { + repeated Query query = 2; +} + +// enum EventCallbackMethod { +// none = 0; +// webhook = 1; +// } + +// message EventCallback { +// string id = 1; // who fills this +// bool active = 2; +// EventCallbackMethod method = 3; +// repeated Query query = 4; +// } + +// message RegisterEventCallbackRequest { +// repeated EventCallback callbacks = 1; +// } + +// message RegisterEventCallbackResponse {} + +// message ListEventCallbacksRequest { +// } + +// message ListEventCallbacksResponse { +// repeated EventCallback callbacks = 1; +// } \ No newline at end of file diff --git a/okapi-onboarding.proto b/protobuf/okapi-onboarding.proto similarity index 72% rename from okapi-onboarding.proto rename to protobuf/okapi-onboarding.proto index 6ea1e46..e9c0723 100644 --- a/okapi-onboarding.proto +++ b/protobuf/okapi-onboarding.proto @@ -3,22 +3,20 @@ option go_package = "whiteboxsystems.nl/okapi"; enum XISAuthMethod { mTLS = 0; - BearerToken = 1; } message MTLSConfigurationParams { + // JWK (RFC 7517) presentatie van publieke sleutel van het + // client certificaat dat gebruikt gaat worden voor het opzetten + // van de verbinding. + // Voorbeeld: "{\"crv\":\"P-256\",\"kty\":\"EC\",\"x\":\"PZlyqX3X...\", \"y\":\"AawwPSKBt...\"}" string publicKey = 1; } -message BearerTokenConfigurationParams { - string token = 1; -} - message XISAuthConfiguration { XISAuthMethod method = 1; oneof configuration { MTLSConfigurationParams mtlsConfiguration = 2; - BearerTokenConfigurationParams apiTokenConfiguration = 3; } } @@ -45,7 +43,7 @@ message RegisterResponse { message CompleteRegistrationRequest { string reference = 1; - string authorisationToken = 2; + string AuthorizationToken = 2; } message CompleteRegistrationResponse {} \ No newline at end of file diff --git a/protobuf/okapi-patient-registration.proto b/protobuf/okapi-patient-registration.proto new file mode 100644 index 0000000..3ed33ed --- /dev/null +++ b/protobuf/okapi-patient-registration.proto @@ -0,0 +1,90 @@ +syntax = "proto3"; +import "google/protobuf/struct.proto"; +import "okapi-errors.proto"; +option go_package = "whiteboxsystems.nl/okapi"; + +message Identifier { + string type = 1; + string value = 2; +} + +message PatientRegistrationData { + string id = 1; + PatientMeta subject = 2; + google.protobuf.Struct callbackProtocolData = 3; + + // Aangeven van extra data voor dienst specifieke zaken, bijv policy oid, + google.protobuf.Struct serviceInput = 4; + google.protobuf.Struct serviceOutput = 5; +} + +message Name { + string display = 1; + repeated string given = 2; + string ownName = 3; + string ownNamePrefix = 4; + string partnerName = 5; + string partnerNamePrefix = 6; +} + +message Address { + string street = 1; + string streetNumber = 2; + string postalCode = 3; + string city = 4; + string country = 5; +} + +message PatientMeta { + Identifier identifier = 1; + Name name = 2; + Address address = 3; + string birthdate = 4; // Date in format yyyy-mm-dd + google.protobuf.Struct extra = 5; +} + +message PatientRegistrationCreateOrUpdateData { + string id = 1; + PatientMeta subject = 2; + google.protobuf.Struct callbackProtocolData = 3; + google.protobuf.Struct serviceInput = 4; +} + +message PatientRegistrationResult { + string id = 1; + google.protobuf.Struct serviceOuput = 2; + OKAPIError error = 3; +} + +// Probably do this streaming (also)? +message CreateOrUpdatePatientRegistrationsRequest { + string serviceId = 1; + repeated PatientRegistrationCreateOrUpdateData registrations = 2; +} + +message CreateOrUpdatePatientRegistrationsResponse { + repeated PatientRegistrationResult results = 1; +} + +message RemovePatientRegistrationsRequest { + string serviceId = 1; + repeated string registrations = 2; +} + +message RemovePatientRegistrationsResponse { + repeated PatientRegistrationResult results = 1; +} + +message ListPatientRegistrationQuery { + repeated string id = 1; + repeated Identifier identifier = 2; +} + +message ListPatientRegistrationsRequest { + string serviceId = 1; + ListPatientRegistrationQuery query = 2; +} + +message ListPatientRegistrationsResponse { + repeated PatientRegistrationData patientRegistrationData = 1; +} \ No newline at end of file diff --git a/okapi-service-config.proto b/protobuf/okapi-service-config.proto similarity index 63% rename from okapi-service-config.proto rename to protobuf/okapi-service-config.proto index f4729ad..a8d5a28 100644 --- a/okapi-service-config.proto +++ b/protobuf/okapi-service-config.proto @@ -26,7 +26,7 @@ message ProtocolDefinition { repeated string authMethods = 2; } -message ServiceDefinition { +message Service { string id = 1; string name = 2; string description = 3; @@ -34,6 +34,9 @@ message ServiceDefinition { ConsentPolicy consentPolicy = 5; repeated ProtocolDefinition fetchProtocols = 6; repeated ProtocolDefinition pushProtocols = 7; + CallbackConfiguration fetchConfiguration = 8; + CallbackConfiguration pushConfiguration = 9; + bool enabled = 10; } message CallbackConfiguration { @@ -42,37 +45,28 @@ message CallbackConfiguration { ProtocolAuthConfiguration auth = 3; } -message ConfigureCallbackRequest { +message EnableServiceRequest { string serviceId = 1; - bool enabled = 2; - CallbackConfiguration fetch = 3; - CallbackConfiguration push = 4; + CallbackConfiguration fetch = 2; + CallbackConfiguration push = 3; } -message ConfigureCallbackResponse { +message EnableServiceResponse { string serviceId = 1; - bool enabled = 2; - CallbackConfiguration fetch = 3; - CallbackConfiguration push = 4; + CallbackConfiguration fetch = 2; + CallbackConfiguration push = 3; } -// ListServices - -message ServiceConfiguration { +message DisableServiceRequest { string serviceId = 1; - bool enabled = 2; - CallbackConfiguration fetch = 3; - CallbackConfiguration push = 4; } -message ListServicesRequest {} +message DisableServiceResponse {} -message ListServicesResponse { - repeated ServiceDefinition availableServices = 1; -} +// ListServices -message ListServiceConfigurationsRequest {} +message ListServicesRequest {} -message ListServiceConfigurationsResponse { - repeated ServiceConfiguration configurations = 2; +message ListServicesResponse { + repeated Service services = 1; } diff --git a/okapi.proto b/protobuf/okapi.proto similarity index 50% rename from okapi.proto rename to protobuf/okapi.proto index 8a3bd24..67236b5 100644 --- a/okapi.proto +++ b/protobuf/okapi.proto @@ -12,15 +12,18 @@ service OkAPI { rpc CompleteRegistration (CompleteRegistrationRequest) returns (CompleteRegistrationResponse) {} // Configuration - rpc ConfigureCallback (ConfigureCallbackRequest) returns (ConfigureCallbackResponse) {} rpc ListServices (ListServicesRequest) returns (ListServicesResponse) {} - rpc ListServiceConfigurations (ListServiceConfigurationsRequest) returns (ListServiceConfigurationsResponse) {} + rpc EnableService (EnableServiceRequest) returns (EnableServiceResponse) {} + rpc DisableService (DisableServiceRequest) returns (DisableServiceResponse) {} - rpc UpdatePatientRegistration (UpdatePatientRegistrationRequest) returns (UpdatePatientRegistrationResponse) {} - rpc ListPatientRegistration (ListPatientRegistrationRequest) returns (ListPatientRegistrationResponse) {} + rpc ListPatientRegistrations (ListPatientRegistrationsRequest) returns (ListPatientRegistrationsResponse) {} + rpc CreateOrUpdatePatientRegistrations (CreateOrUpdatePatientRegistrationsRequest) returns (CreateOrUpdatePatientRegistrationsResponse) {} + rpc RemovePatientRegistrations (RemovePatientRegistrationsRequest) returns (RemovePatientRegistrationsResponse) {} // Events rpc GetEvents (GetEventsRequest) returns (GetEventsResponse) {} rpc GetEventsStream (GetEventsStreamRequest) returns (stream Event) {} + // rpc RegisterEventCallback (RegisterEventCallbackRequest) returns (RegisterEventCallbackResponse) {} + // rpc ListEventCallbacks (ListEventCallbacksRequest) returns (ListEventCallbacksResponse) {} }