From bc2a712e9f5220c3bf973f5ba0c482692fba563a Mon Sep 17 00:00:00 2001 From: Anton Cornak <79978722+anton-cornak@users.noreply.github.com> Date: Tue, 13 Aug 2024 14:20:15 +0200 Subject: [PATCH] Adding confidence levels to async requests (#208) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added confidence to async * protogen * adding max results * protogen + make and dockerfile * readme * get transaction results updated --------- Co-authored-by: “anton-cornak” <“anton.cornak@visma.com”> --- Dockerfile | 4 + Makefile | 2 +- README.md | 2 + gen/csharp/Ssn/Async/V1/Async.cs | 198 ++++++--- gen/descriptor.bin | Bin 301942 -> 302161 bytes gen/go/ssn/async/v1/async.pb.go | 398 ++++++++++-------- .../ai/visma/ssn/async/v1/AsyncProto.java | 132 +++--- .../v1/GetTransactionResultsRequest.java | 230 ++++++++-- ...GetTransactionResultsRequestOrBuilder.java | 31 +- gen/js/ssn/async/v1/async_pb.d.ts | 8 + gen/js/ssn/async/v1/async_pb.js | 62 ++- gen/python/ssn/async/v1/async_pb2.py | 58 +-- gen/python/ssn/async/v1/async_pb2.pyi | 8 +- proto/ssn/async/v1/async.proto | 4 + 14 files changed, 750 insertions(+), 387 deletions(-) diff --git a/Dockerfile b/Dockerfile index eb18ab24..bf1f6d9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,10 @@ ENV PATH=/usr/local/go/bin:${PATH} ENV GOPATH=/go ENV PATH=/go/bin:$PATH +# https://buf.build/docs/bsr/authentication +ARG BUF_TOKEN +ENV BUF_TOKEN=${BUF_TOKEN} + RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin RUN apt-get update && \ diff --git a/Makefile b/Makefile index 4542b3f4..57ac8e43 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ docker: @rm -rf gen # run the code generation in docker and copy files to local directory in the end - docker build --progress plain -t vmlapis . + docker build --progress plain --build-arg BUF_TOKEN=$$BUF_TOKEN -t vmlapis . DOCKERID=$$(docker create vmlapis) ;\ docker cp $$DOCKERID:/app/gen ./ ;\ docker rm $$DOCKERID diff --git a/README.md b/README.md index e34ba2d1..58e34852 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ - `cd` into the cloned `vmlapis` directory - Run docker on your computer - Have `buf` installed +- Have `buf` [account](https://buf.build/signup) +- Have buf token generated and set as environment variable named BUF_TOKEN `export BUF_TOKEN=` ```bash brew install bufbuild/buf/buf diff --git a/gen/csharp/Ssn/Async/V1/Async.cs b/gen/csharp/Ssn/Async/V1/Async.cs index cab15d33..d6d12672 100644 --- a/gen/csharp/Ssn/Async/V1/Async.cs +++ b/gen/csharp/Ssn/Async/V1/Async.cs @@ -35,69 +35,71 @@ static AsyncReflection() { "AygJUgR0YWdzEhoKCGZlYXR1cmVzGAMgAygJUghmZWF0dXJlcxIbCgljdXN0", "b21faWQYBCABKAlSCGN1c3RvbUlkIkgKGUNyZWF0ZVRyYW5zYWN0aW9uUmVz", "cG9uc2USDgoCaWQYASABKAlSAmlkEhsKCWN1c3RvbV9pZBgCIAEoCVIIY3Vz", - "dG9tSWQiSwocR2V0VHJhbnNhY3Rpb25SZXN1bHRzUmVxdWVzdBIOCgJpZBgB", - "IAEoCVICaWQSGwoJY3VzdG9tX2lkGAIgASgJUghjdXN0b21JZCKtAQodR2V0", - "VHJhbnNhY3Rpb25SZXN1bHRzUmVzcG9uc2USDgoCaWQYASABKAlSAmlkEjoK", - "C2Fubm90YXRpb25zGAIgAygLMhguc3NuLmFzeW5jLnYxLkFubm90YXRpb25S", - "C2Fubm90YXRpb25zEiMKDWVycm9yX21lc3NhZ2UYAyABKAlSDGVycm9yTWVz", - "c2FnZRIbCgljdXN0b21faWQYBCABKAlSCGN1c3RvbUlkIj4KCUNhbmRpZGF0", - "ZRIxCgljYW5kaWRhdGUYASADKAsyEy5zc24udHlwZS5DYW5kaWRhdGVSCWNh", - "bmRpZGF0ZSJwChVQdXJjaGFzZUxpbmVDYW5kaWRhdGUSVwoXcHVyY2hh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Zi5F", + "bXB0eSIbgtPkkwIVKhMvdjEvdGFncy97dGFnX25hbWV9Qu4BChVhaS52aXNt", + "YS5zc24uYXN5bmMudjFCCkFzeW5jUHJvdG9QAVo8Z2l0aHViLmNvbS9lLWNv", + "bm9taWMvdm1sYXBpcy9nZW4vZ28vc3NuL2FzeW5jL3YxO3RyYW5zYWN0aW9u", + "ogIDU0FYqgIMU3NuLkFzeW5jLlYxygIMU3NuXEFzeW5jXFYx4gIYU3NuXEFz", + "eW5jXFYxXEdQQk1ldGFkYXRh6gIOU3NuOjpBc3luYzo6VjGSQTgSDwoJQXN5", + "bmMgQVBJMgJ2MSoBAjIQYXBwbGljYXRpb24vanNvbjoQYXBwbGljYXRpb24v", + "anNvbmIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Grpc.Gateway.ProtocGenOpenapiv2.Options.AnnotationsReflection.Descriptor, global::Ssn.Annotator.V1.AnnotatorReflection.Descriptor, global::Ssn.Type.CandidateReflection.Descriptor, global::Ssn.Type.TextAnnotationReflection.Descriptor, global::Validate.ValidateReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Ssn.Async.V1.CreateTransactionRequest), global::Ssn.Async.V1.CreateTransactionRequest.Parser, new[]{ "Document", "Tags", "Features", "CustomId" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Ssn.Async.V1.CreateTransactionResponse), global::Ssn.Async.V1.CreateTransactionResponse.Parser, new[]{ "Id", "CustomId" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Ssn.Async.V1.GetTransactionResultsRequest), global::Ssn.Async.V1.GetTransactionResultsRequest.Parser, new[]{ "Id", "CustomId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Ssn.Async.V1.GetTransactionResultsRequest), global::Ssn.Async.V1.GetTransactionResultsRequest.Parser, new[]{ "Id", "CustomId", "MinConfidence", "MaxResults" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Ssn.Async.V1.GetTransactionResultsResponse), global::Ssn.Async.V1.GetTransactionResultsResponse.Parser, new[]{ "Id", "Annotations", "ErrorMessage", "CustomId" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Ssn.Async.V1.Candidate), global::Ssn.Async.V1.Candidate.Parser, new[]{ "Candidate_" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Ssn.Async.V1.PurchaseLineCandidate), global::Ssn.Async.V1.PurchaseLineCandidate.Parser, new[]{ "PurchaseLineCandidate_" }, null, null, null, null), @@ -684,6 +686,8 @@ public GetTransactionResultsRequest() { public GetTransactionResultsRequest(GetTransactionResultsRequest other) : this() { id_ = other.id_; customId_ = other.customId_; + minConfidence_ = other.minConfidence_; + maxResults_ = other.maxResults_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -708,16 +712,40 @@ public string Id { /// Field number for the "custom_id" field. public const int CustomIdFieldNumber = 2; private string customId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CustomId { + get { return customId_; } + set { + customId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "min_confidence" field. + public const int MinConfidenceFieldNumber = 3; + private global::Ssn.Type.Confidence.Types.Level minConfidence_ = global::Ssn.Type.Confidence.Types.Level.Unknown; /// /// GetTransactionResultsRequest message can potentially have a list of features to filter the response /// e.g. repeated string features like in CreateTransactionRequest /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string CustomId { - get { return customId_; } + public global::Ssn.Type.Confidence.Types.Level MinConfidence { + get { return minConfidence_; } set { - customId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + minConfidence_ = value; + } + } + + /// Field number for the "max_results" field. + public const int MaxResultsFieldNumber = 4; + private int maxResults_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MaxResults { + get { return maxResults_; } + set { + maxResults_ = value; } } @@ -738,6 +766,8 @@ public bool Equals(GetTransactionResultsRequest other) { } if (Id != other.Id) return false; if (CustomId != other.CustomId) return false; + if (MinConfidence != other.MinConfidence) return false; + if (MaxResults != other.MaxResults) return false; return Equals(_unknownFields, other._unknownFields); } @@ -747,6 +777,8 @@ public override int GetHashCode() { int hash = 1; if (Id.Length != 0) hash ^= Id.GetHashCode(); if (CustomId.Length != 0) hash ^= CustomId.GetHashCode(); + if (MinConfidence != global::Ssn.Type.Confidence.Types.Level.Unknown) hash ^= MinConfidence.GetHashCode(); + if (MaxResults != 0) hash ^= MaxResults.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -773,6 +805,14 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(18); output.WriteString(CustomId); } + if (MinConfidence != global::Ssn.Type.Confidence.Types.Level.Unknown) { + output.WriteRawTag(24); + output.WriteEnum((int) MinConfidence); + } + if (MaxResults != 0) { + output.WriteRawTag(32); + output.WriteInt32(MaxResults); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -791,6 +831,14 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(18); output.WriteString(CustomId); } + if (MinConfidence != global::Ssn.Type.Confidence.Types.Level.Unknown) { + output.WriteRawTag(24); + output.WriteEnum((int) MinConfidence); + } + if (MaxResults != 0) { + output.WriteRawTag(32); + output.WriteInt32(MaxResults); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -807,6 +855,12 @@ public int CalculateSize() { if (CustomId.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(CustomId); } + if (MinConfidence != global::Ssn.Type.Confidence.Types.Level.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MinConfidence); + } + if (MaxResults != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxResults); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -825,6 +879,12 @@ public void MergeFrom(GetTransactionResultsRequest other) { if (other.CustomId.Length != 0) { CustomId = other.CustomId; } + if (other.MinConfidence != global::Ssn.Type.Confidence.Types.Level.Unknown) { + MinConfidence = other.MinConfidence; + } + if (other.MaxResults != 0) { + MaxResults = other.MaxResults; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -848,6 +908,14 @@ public void MergeFrom(pb::CodedInputStream input) { CustomId = input.ReadString(); break; } + case 24: { + MinConfidence = (global::Ssn.Type.Confidence.Types.Level) input.ReadEnum(); + break; + } + case 32: { + MaxResults = input.ReadInt32(); + break; + } } } #endif @@ -871,6 +939,14 @@ public void MergeFrom(pb::CodedInputStream input) { CustomId = input.ReadString(); break; } + case 24: { + MinConfidence = (global::Ssn.Type.Confidence.Types.Level) input.ReadEnum(); + break; + } + case 32: { + MaxResults = input.ReadInt32(); + break; + } } } } diff --git a/gen/descriptor.bin b/gen/descriptor.bin index d1007be390f5837ea2f2e0b6389794886924533b..14f938659a7b5e90ee8e12104e4ac23548abe7af 100644 GIT binary patch delta 2411 zcmYL~-%nIW6vywGdv>`yyNfu$uA)>x{Doco5z(mWL(?BNjnY&jBvK^>ZKWw#q0&m@ zuHq`vCJIJ!5$S`{CX#4u(x&#Ue}L(Oe?ikW?Mok<_PO6PcLv}1+%w0JTjRfOaiMZNYPUTo>7mE<06-5tP6>jt$Mpb$vIjj# z>q?>2tBUq*0K|G%V$w;k>jX8#deO=E(z;U0geTMvZu*v5RyO-iMWyBOI;Ru)iS-?x zAUIL#bngZ9sWq+?;=O&U#uH+FQN1TwStw%H6^DjT1!s~I2(ju^w8`p1nZ94ub=eFE zzJ50c2rK*D_#p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vCE9L#O19&|OYJ@_s|crT7WW6CaI=F-U0Ks- z+5*wLY7+rryQ&jy>VJw9_9(9f&o}r%ZtXy$qpVS~+(bbSG;5?PWRH>H{;UU2H~DgI z{Xn9P)(IO~r%wq1$-4ds7mNh75xjn%FSc$RNc45tumh*`G6rJc(-=6d;t$Dr6#R0Z zJ4+AA%a~EqdekjDDhQ(j!%=}S+_IwrVYp>qep(0Iwl5z9DbPyw#M?Fts*rB$EFH*_ zC{yvrh>!AdGjY gvPzcYH32 ssn.annotator.v1.Document - 10, // 1: ssn.async.v1.GetTransactionResultsResponse.annotations:type_name -> ssn.async.v1.Annotation - 16, // 2: ssn.async.v1.Candidate.candidate:type_name -> ssn.type.Candidate - 17, // 3: ssn.async.v1.PurchaseLineCandidate.purchase_line_candidate:type_name -> ssn.type.PurchaseLineCandidate - 18, // 4: ssn.async.v1.LineCandidate.line_candidates:type_name -> ssn.type.LineCandidate - 19, // 5: ssn.async.v1.AnswerCandidate.answers:type_name -> ssn.type.AnswerCandidate - 20, // 6: ssn.async.v1.PageText.page_text:type_name -> ssn.type.PageText - 21, // 7: ssn.async.v1.TextAnnotation.text_annotation:type_name -> ssn.type.TextAnnotation - 4, // 8: ssn.async.v1.Annotation.candidate:type_name -> ssn.async.v1.Candidate - 5, // 9: ssn.async.v1.Annotation.purchase_line_candidate:type_name -> ssn.async.v1.PurchaseLineCandidate - 7, // 10: ssn.async.v1.Annotation.answer_candidates:type_name -> ssn.async.v1.AnswerCandidate - 6, // 11: ssn.async.v1.Annotation.line_candidates:type_name -> ssn.async.v1.LineCandidate - 8, // 12: ssn.async.v1.Annotation.page_text:type_name -> ssn.async.v1.PageText - 9, // 13: ssn.async.v1.Annotation.text_annotation:type_name -> ssn.async.v1.TextAnnotation - 0, // 14: ssn.async.v1.TransactionService.CreateTransaction:input_type -> ssn.async.v1.CreateTransactionRequest - 2, // 15: ssn.async.v1.TransactionService.GetTransactionResults:input_type -> ssn.async.v1.GetTransactionResultsRequest - 11, // 16: ssn.async.v1.TransactionService.GetTransactionStatus:input_type -> ssn.async.v1.GetTransactionStatusRequest - 13, // 17: ssn.async.v1.TransactionService.DeleteTransaction:input_type -> ssn.async.v1.DeleteTransactionRequest - 14, // 18: ssn.async.v1.TransactionService.DeleteTag:input_type -> ssn.async.v1.DeleteTagRequest - 1, // 19: ssn.async.v1.TransactionService.CreateTransaction:output_type -> ssn.async.v1.CreateTransactionResponse - 3, // 20: ssn.async.v1.TransactionService.GetTransactionResults:output_type -> ssn.async.v1.GetTransactionResultsResponse - 12, // 21: ssn.async.v1.TransactionService.GetTransactionStatus:output_type -> ssn.async.v1.GetTransactionStatusResponse - 22, // 22: ssn.async.v1.TransactionService.DeleteTransaction:output_type -> google.protobuf.Empty - 22, // 23: ssn.async.v1.TransactionService.DeleteTag:output_type -> google.protobuf.Empty - 19, // [19:24] is the sub-list for method output_type - 14, // [14:19] 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 + 16, // 1: ssn.async.v1.GetTransactionResultsRequest.min_confidence:type_name -> ssn.type.Confidence.Level + 10, // 2: ssn.async.v1.GetTransactionResultsResponse.annotations:type_name -> ssn.async.v1.Annotation + 17, // 3: ssn.async.v1.Candidate.candidate:type_name -> ssn.type.Candidate + 18, // 4: ssn.async.v1.PurchaseLineCandidate.purchase_line_candidate:type_name -> ssn.type.PurchaseLineCandidate + 19, // 5: ssn.async.v1.LineCandidate.line_candidates:type_name -> ssn.type.LineCandidate + 20, // 6: ssn.async.v1.AnswerCandidate.answers:type_name -> ssn.type.AnswerCandidate + 21, // 7: ssn.async.v1.PageText.page_text:type_name -> ssn.type.PageText + 22, // 8: ssn.async.v1.TextAnnotation.text_annotation:type_name -> ssn.type.TextAnnotation + 4, // 9: ssn.async.v1.Annotation.candidate:type_name -> ssn.async.v1.Candidate + 5, // 10: ssn.async.v1.Annotation.purchase_line_candidate:type_name -> ssn.async.v1.PurchaseLineCandidate + 7, // 11: ssn.async.v1.Annotation.answer_candidates:type_name -> ssn.async.v1.AnswerCandidate + 6, // 12: ssn.async.v1.Annotation.line_candidates:type_name -> ssn.async.v1.LineCandidate + 8, // 13: ssn.async.v1.Annotation.page_text:type_name -> ssn.async.v1.PageText + 9, // 14: ssn.async.v1.Annotation.text_annotation:type_name -> ssn.async.v1.TextAnnotation + 0, // 15: ssn.async.v1.TransactionService.CreateTransaction:input_type -> ssn.async.v1.CreateTransactionRequest + 2, // 16: ssn.async.v1.TransactionService.GetTransactionResults:input_type -> ssn.async.v1.GetTransactionResultsRequest + 11, // 17: ssn.async.v1.TransactionService.GetTransactionStatus:input_type -> ssn.async.v1.GetTransactionStatusRequest + 13, // 18: ssn.async.v1.TransactionService.DeleteTransaction:input_type -> ssn.async.v1.DeleteTransactionRequest + 14, // 19: ssn.async.v1.TransactionService.DeleteTag:input_type -> ssn.async.v1.DeleteTagRequest + 1, // 20: ssn.async.v1.TransactionService.CreateTransaction:output_type -> ssn.async.v1.CreateTransactionResponse + 3, // 21: ssn.async.v1.TransactionService.GetTransactionResults:output_type -> ssn.async.v1.GetTransactionResultsResponse + 12, // 22: ssn.async.v1.TransactionService.GetTransactionStatus:output_type -> ssn.async.v1.GetTransactionStatusResponse + 23, // 23: ssn.async.v1.TransactionService.DeleteTransaction:output_type -> google.protobuf.Empty + 23, // 24: ssn.async.v1.TransactionService.DeleteTag:output_type -> google.protobuf.Empty + 20, // [20:25] is the sub-list for method output_type + 15, // [15:20] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_ssn_async_v1_async_proto_init() } diff --git a/gen/java/ai/visma/ssn/async/v1/AsyncProto.java b/gen/java/ai/visma/ssn/async/v1/AsyncProto.java index 320c409a..51ca3bed 100644 --- a/gen/java/ai/visma/ssn/async/v1/AsyncProto.java +++ b/gen/java/ai/visma/ssn/async/v1/AsyncProto.java @@ -110,70 +110,72 @@ public static void registerAllExtensions( "\003(\tR\004tags\022\032\n\010features\030\003 \003(\tR\010features\022\033\n" + "\tcustom_id\030\004 \001(\tR\010customId\"H\n\031CreateTran" + "sactionResponse\022\016\n\002id\030\001 \001(\tR\002id\022\033\n\tcusto" + - "m_id\030\002 \001(\tR\010customId\"K\n\034GetTransactionRe" + - "sultsRequest\022\016\n\002id\030\001 \001(\tR\002id\022\033\n\tcustom_i" + - "d\030\002 \001(\tR\010customId\"\255\001\n\035GetTransactionResu" + - "ltsResponse\022\016\n\002id\030\001 \001(\tR\002id\022:\n\013annotatio" + - "ns\030\002 \003(\0132\030.ssn.async.v1.AnnotationR\013anno" + - "tations\022#\n\rerror_message\030\003 \001(\tR\014errorMes" + - "sage\022\033\n\tcustom_id\030\004 \001(\tR\010customId\">\n\tCan" + - "didate\0221\n\tcandidate\030\001 \003(\0132\023.ssn.type.Can" + - "didateR\tcandidate\"p\n\025PurchaseLineCandida" + - "te\022W\n\027purchase_line_candidate\030\001 \003(\0132\037.ss" + - "n.type.PurchaseLineCandidateR\025purchaseLi" + - "neCandidate\"Q\n\rLineCandidate\022@\n\017line_can" + - "didates\030\001 \003(\0132\027.ssn.type.LineCandidateR\016" + - "lineCandidates\"F\n\017AnswerCandidate\0223\n\007ans" + - "wers\030\001 \003(\0132\031.ssn.type.AnswerCandidateR\007a" + - "nswers\";\n\010PageText\022/\n\tpage_text\030\001 \003(\0132\022." + - "ssn.type.PageTextR\010pageText\"S\n\016TextAnnot" + - "ation\022A\n\017text_annotation\030\001 \003(\0132\030.ssn.typ" + - "e.TextAnnotationR\016textAnnotation\"\342\003\n\nAnn" + - "otation\022\030\n\007feature\030\001 \001(\tR\007feature\0227\n\tcan" + - "didate\030\002 \001(\0132\027.ssn.async.v1.CandidateH\000R" + - "\tcandidate\022]\n\027purchase_line_candidate\030\003 " + - "\001(\0132#.ssn.async.v1.PurchaseLineCandidate" + - "H\000R\025purchaseLineCandidate\022L\n\021answer_cand" + - "idates\030\004 \001(\0132\035.ssn.async.v1.AnswerCandid" + - "ateH\000R\020answerCandidates\022F\n\017line_candidat" + - "es\030\005 \001(\0132\033.ssn.async.v1.LineCandidateH\000R" + - "\016lineCandidates\0225\n\tpage_text\030\006 \001(\0132\026.ssn" + - ".async.v1.PageTextH\000R\010pageText\022G\n\017text_a" + - "nnotation\030\007 \001(\0132\034.ssn.async.v1.TextAnnot" + - "ationH\000R\016textAnnotationB\014\n\ncandidates\"J\n" + - "\033GetTransactionStatusRequest\022\016\n\002id\030\001 \001(\t" + - "R\002id\022\033\n\tcustom_id\030\002 \001(\tR\010customId\"\210\001\n\034Ge" + - "tTransactionStatusResponse\022\016\n\002id\030\001 \001(\tR\002" + - "id\022\026\n\006status\030\002 \001(\tR\006status\022#\n\rerror_mess" + - "age\030\003 \001(\tR\014errorMessage\022\033\n\tcustom_id\030\004 \001" + - "(\tR\010customId\"G\n\030DeleteTransactionRequest" + - "\022\016\n\002id\030\001 \001(\tR\002id\022\033\n\tcustom_id\030\002 \001(\tR\010cus" + - "tomId\"W\n\020DeleteTagRequest\022C\n\010tag_name\030\001 " + - "\001(\tB(\372B%r#(\200\0022\036^[A-Za-z0-9.][A-Za-z0-9_." + - ">-]*$R\007tagName2\236\005\n\022TransactionService\022\201\001" + - "\n\021CreateTransaction\022&.ssn.async.v1.Creat" + - "eTransactionRequest\032\'.ssn.async.v1.Creat" + - "eTransactionResponse\"\033\202\323\344\223\002\025\"\020/v1/transa" + - "ctions:\001*\022\227\001\n\025GetTransactionResults\022*.ss" + - "n.async.v1.GetTransactionResultsRequest\032" + - "+.ssn.async.v1.GetTransactionResultsResp" + - "onse\"%\202\323\344\223\002\037\022\035/v1/transactions/{id}/resu" + - "lts\022\223\001\n\024GetTransactionStatus\022).ssn.async" + - ".v1.GetTransactionStatusRequest\032*.ssn.as" + - "ync.v1.GetTransactionStatusResponse\"$\202\323\344" + - "\223\002\036\022\034/v1/transactions/{id}/status\022r\n\021Del" + - "eteTransaction\022&.ssn.async.v1.DeleteTran" + - "sactionRequest\032\026.google.protobuf.Empty\"\035" + - "\202\323\344\223\002\027*\025/v1/transactions/{id}\022`\n\tDeleteT" + - "ag\022\036.ssn.async.v1.DeleteTagRequest\032\026.goo" + - "gle.protobuf.Empty\"\033\202\323\344\223\002\025*\023/v1/tags/{ta" + - "g_name}B\356\001\n\025ai.visma.ssn.async.v1B\nAsync" + - "ProtoP\001Z\n\tCandidate\0221\n\tcandidate" + + "\030\001 \003(\0132\023.ssn.type.CandidateR\tcandidate\"p" + + "\n\025PurchaseLineCandidate\022W\n\027purchase_line" + + "_candidate\030\001 \003(\0132\037.ssn.type.PurchaseLine" + + "CandidateR\025purchaseLineCandidate\"Q\n\rLine" + + "Candidate\022@\n\017line_candidates\030\001 \003(\0132\027.ssn" + + ".type.LineCandidateR\016lineCandidates\"F\n\017A" + + "nswerCandidate\0223\n\007answers\030\001 \003(\0132\031.ssn.ty" + + "pe.AnswerCandidateR\007answers\";\n\010PageText\022" + + "/\n\tpage_text\030\001 \003(\0132\022.ssn.type.PageTextR\010" + + "pageText\"S\n\016TextAnnotation\022A\n\017text_annot" + + "ation\030\001 \003(\0132\030.ssn.type.TextAnnotationR\016t" + + "extAnnotation\"\342\003\n\nAnnotation\022\030\n\007feature\030" + + "\001 \001(\tR\007feature\0227\n\tcandidate\030\002 \001(\0132\027.ssn." + + "async.v1.CandidateH\000R\tcandidate\022]\n\027purch" + + "ase_line_candidate\030\003 \001(\0132#.ssn.async.v1." + + "PurchaseLineCandidateH\000R\025purchaseLineCan" + + "didate\022L\n\021answer_candidates\030\004 \001(\0132\035.ssn." + + "async.v1.AnswerCandidateH\000R\020answerCandid" + + "ates\022F\n\017line_candidates\030\005 \001(\0132\033.ssn.asyn" + + "c.v1.LineCandidateH\000R\016lineCandidates\0225\n\t" + + "page_text\030\006 \001(\0132\026.ssn.async.v1.PageTextH" + + "\000R\010pageText\022G\n\017text_annotation\030\007 \001(\0132\034.s" + + "sn.async.v1.TextAnnotationH\000R\016textAnnota" + + "tionB\014\n\ncandidates\"J\n\033GetTransactionStat" + + "usRequest\022\016\n\002id\030\001 \001(\tR\002id\022\033\n\tcustom_id\030\002" + + " \001(\tR\010customId\"\210\001\n\034GetTransactionStatusR" + + "esponse\022\016\n\002id\030\001 \001(\tR\002id\022\026\n\006status\030\002 \001(\tR" + + "\006status\022#\n\rerror_message\030\003 \001(\tR\014errorMes" + + "sage\022\033\n\tcustom_id\030\004 \001(\tR\010customId\"G\n\030Del" + + "eteTransactionRequest\022\016\n\002id\030\001 \001(\tR\002id\022\033\n" + + "\tcustom_id\030\002 \001(\tR\010customId\"W\n\020DeleteTagR" + + "equest\022C\n\010tag_name\030\001 \001(\tB(\372B%r#(\200\0022\036^[A-" + + "Za-z0-9.][A-Za-z0-9_.>-]*$R\007tagName2\236\005\n\022" + + "TransactionService\022\201\001\n\021CreateTransaction" + + "\022&.ssn.async.v1.CreateTransactionRequest" + + "\032\'.ssn.async.v1.CreateTransactionRespons" + + "e\"\033\202\323\344\223\002\025\"\020/v1/transactions:\001*\022\227\001\n\025GetTr" + + "ansactionResults\022*.ssn.async.v1.GetTrans" + + "actionResultsRequest\032+.ssn.async.v1.GetT" + + "ransactionResultsResponse\"%\202\323\344\223\002\037\022\035/v1/t" + + "ransactions/{id}/results\022\223\001\n\024GetTransact" + + "ionStatus\022).ssn.async.v1.GetTransactionS" + + "tatusRequest\032*.ssn.async.v1.GetTransacti" + + "onStatusResponse\"$\202\323\344\223\002\036\022\034/v1/transactio" + + "ns/{id}/status\022r\n\021DeleteTransaction\022&.ss" + + "n.async.v1.DeleteTransactionRequest\032\026.go" + + "ogle.protobuf.Empty\"\035\202\323\344\223\002\027*\025/v1/transac" + + "tions/{id}\022`\n\tDeleteTag\022\036.ssn.async.v1.D" + + "eleteTagRequest\032\026.google.protobuf.Empty\"" + + "\033\202\323\344\223\002\025*\023/v1/tags/{tag_name}B\356\001\n\025ai.vism" + + "a.ssn.async.v1B\nAsyncProtoP\001Z - * GetTransactionResultsRequest message can potentially have a list of features to filter the response - * e.g. repeated string features like in CreateTransactionRequest - * - * * string custom_id = 2 [json_name = "customId"]; * @return The customId. */ @@ -109,11 +105,6 @@ public java.lang.String getCustomId() { } } /** - *
-   * GetTransactionResultsRequest message can potentially have a list of features to filter the response
-   * e.g. repeated string features like in CreateTransactionRequest
-   * 
- * * string custom_id = 2 [json_name = "customId"]; * @return The bytes for customId. */ @@ -132,6 +123,45 @@ public java.lang.String getCustomId() { } } + public static final int MIN_CONFIDENCE_FIELD_NUMBER = 3; + private int minConfidence_ = 0; + /** + *
+   * GetTransactionResultsRequest message can potentially have a list of features to filter the response
+   * e.g. repeated string features like in CreateTransactionRequest
+   * 
+ * + * .ssn.type.Confidence.Level min_confidence = 3 [json_name = "minConfidence"]; + * @return The enum numeric value on the wire for minConfidence. + */ + @java.lang.Override public int getMinConfidenceValue() { + return minConfidence_; + } + /** + *
+   * GetTransactionResultsRequest message can potentially have a list of features to filter the response
+   * e.g. repeated string features like in CreateTransactionRequest
+   * 
+ * + * .ssn.type.Confidence.Level min_confidence = 3 [json_name = "minConfidence"]; + * @return The minConfidence. + */ + @java.lang.Override public ai.visma.ssn.type.Confidence.Level getMinConfidence() { + ai.visma.ssn.type.Confidence.Level result = ai.visma.ssn.type.Confidence.Level.forNumber(minConfidence_); + return result == null ? ai.visma.ssn.type.Confidence.Level.UNRECOGNIZED : result; + } + + public static final int MAX_RESULTS_FIELD_NUMBER = 4; + private int maxResults_ = 0; + /** + * int32 max_results = 4 [json_name = "maxResults"]; + * @return The maxResults. + */ + @java.lang.Override + public int getMaxResults() { + return maxResults_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -152,6 +182,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, customId_); } + if (minConfidence_ != ai.visma.ssn.type.Confidence.Level.UNKNOWN.getNumber()) { + output.writeEnum(3, minConfidence_); + } + if (maxResults_ != 0) { + output.writeInt32(4, maxResults_); + } getUnknownFields().writeTo(output); } @@ -167,6 +203,14 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(customId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, customId_); } + if (minConfidence_ != ai.visma.ssn.type.Confidence.Level.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, minConfidence_); + } + if (maxResults_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, maxResults_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -186,6 +230,9 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getId())) return false; if (!getCustomId() .equals(other.getCustomId())) return false; + if (minConfidence_ != other.minConfidence_) return false; + if (getMaxResults() + != other.getMaxResults()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -201,6 +248,10 @@ public int hashCode() { hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + CUSTOM_ID_FIELD_NUMBER; hash = (53 * hash) + getCustomId().hashCode(); + hash = (37 * hash) + MIN_CONFIDENCE_FIELD_NUMBER; + hash = (53 * hash) + minConfidence_; + hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getMaxResults(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -338,6 +389,8 @@ public Builder clear() { bitField0_ = 0; id_ = ""; customId_ = ""; + minConfidence_ = 0; + maxResults_ = 0; return this; } @@ -377,6 +430,12 @@ private void buildPartial0(ai.visma.ssn.async.v1.GetTransactionResultsRequest re if (((from_bitField0_ & 0x00000002) != 0)) { result.customId_ = customId_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.minConfidence_ = minConfidence_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.maxResults_ = maxResults_; + } } @java.lang.Override @@ -433,6 +492,12 @@ public Builder mergeFrom(ai.visma.ssn.async.v1.GetTransactionResultsRequest othe bitField0_ |= 0x00000002; onChanged(); } + if (other.minConfidence_ != 0) { + setMinConfidenceValue(other.getMinConfidenceValue()); + } + if (other.getMaxResults() != 0) { + setMaxResults(other.getMaxResults()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -469,6 +534,16 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 18 + case 24: { + minConfidence_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + maxResults_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -560,11 +635,6 @@ public Builder setIdBytes( private java.lang.Object customId_ = ""; /** - *
-     * GetTransactionResultsRequest message can potentially have a list of features to filter the response
-     * e.g. repeated string features like in CreateTransactionRequest
-     * 
- * * string custom_id = 2 [json_name = "customId"]; * @return The customId. */ @@ -581,11 +651,6 @@ public java.lang.String getCustomId() { } } /** - *
-     * GetTransactionResultsRequest message can potentially have a list of features to filter the response
-     * e.g. repeated string features like in CreateTransactionRequest
-     * 
- * * string custom_id = 2 [json_name = "customId"]; * @return The bytes for customId. */ @@ -603,11 +668,6 @@ public java.lang.String getCustomId() { } } /** - *
-     * GetTransactionResultsRequest message can potentially have a list of features to filter the response
-     * e.g. repeated string features like in CreateTransactionRequest
-     * 
- * * string custom_id = 2 [json_name = "customId"]; * @param value The customId to set. * @return This builder for chaining. @@ -621,11 +681,6 @@ public Builder setCustomId( return this; } /** - *
-     * GetTransactionResultsRequest message can potentially have a list of features to filter the response
-     * e.g. repeated string features like in CreateTransactionRequest
-     * 
- * * string custom_id = 2 [json_name = "customId"]; * @return This builder for chaining. */ @@ -636,11 +691,6 @@ public Builder clearCustomId() { return this; } /** - *
-     * GetTransactionResultsRequest message can potentially have a list of features to filter the response
-     * e.g. repeated string features like in CreateTransactionRequest
-     * 
- * * string custom_id = 2 [json_name = "customId"]; * @param value The bytes for customId to set. * @return This builder for chaining. @@ -654,6 +704,116 @@ public Builder setCustomIdBytes( onChanged(); return this; } + + private int minConfidence_ = 0; + /** + *
+     * GetTransactionResultsRequest message can potentially have a list of features to filter the response
+     * e.g. repeated string features like in CreateTransactionRequest
+     * 
+ * + * .ssn.type.Confidence.Level min_confidence = 3 [json_name = "minConfidence"]; + * @return The enum numeric value on the wire for minConfidence. + */ + @java.lang.Override public int getMinConfidenceValue() { + return minConfidence_; + } + /** + *
+     * GetTransactionResultsRequest message can potentially have a list of features to filter the response
+     * e.g. repeated string features like in CreateTransactionRequest
+     * 
+ * + * .ssn.type.Confidence.Level min_confidence = 3 [json_name = "minConfidence"]; + * @param value The enum numeric value on the wire for minConfidence to set. + * @return This builder for chaining. + */ + public Builder setMinConfidenceValue(int value) { + minConfidence_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * GetTransactionResultsRequest message can potentially have a list of features to filter the response
+     * e.g. repeated string features like in CreateTransactionRequest
+     * 
+ * + * .ssn.type.Confidence.Level min_confidence = 3 [json_name = "minConfidence"]; + * @return The minConfidence. + */ + @java.lang.Override + public ai.visma.ssn.type.Confidence.Level getMinConfidence() { + ai.visma.ssn.type.Confidence.Level result = ai.visma.ssn.type.Confidence.Level.forNumber(minConfidence_); + return result == null ? ai.visma.ssn.type.Confidence.Level.UNRECOGNIZED : result; + } + /** + *
+     * GetTransactionResultsRequest message can potentially have a list of features to filter the response
+     * e.g. repeated string features like in CreateTransactionRequest
+     * 
+ * + * .ssn.type.Confidence.Level min_confidence = 3 [json_name = "minConfidence"]; + * @param value The minConfidence to set. + * @return This builder for chaining. + */ + public Builder setMinConfidence(ai.visma.ssn.type.Confidence.Level value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + minConfidence_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * GetTransactionResultsRequest message can potentially have a list of features to filter the response
+     * e.g. repeated string features like in CreateTransactionRequest
+     * 
+ * + * .ssn.type.Confidence.Level min_confidence = 3 [json_name = "minConfidence"]; + * @return This builder for chaining. + */ + public Builder clearMinConfidence() { + bitField0_ = (bitField0_ & ~0x00000004); + minConfidence_ = 0; + onChanged(); + return this; + } + + private int maxResults_ ; + /** + * int32 max_results = 4 [json_name = "maxResults"]; + * @return The maxResults. + */ + @java.lang.Override + public int getMaxResults() { + return maxResults_; + } + /** + * int32 max_results = 4 [json_name = "maxResults"]; + * @param value The maxResults to set. + * @return This builder for chaining. + */ + public Builder setMaxResults(int value) { + + maxResults_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 max_results = 4 [json_name = "maxResults"]; + * @return This builder for chaining. + */ + public Builder clearMaxResults() { + bitField0_ = (bitField0_ & ~0x00000008); + maxResults_ = 0; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/gen/java/ai/visma/ssn/async/v1/GetTransactionResultsRequestOrBuilder.java b/gen/java/ai/visma/ssn/async/v1/GetTransactionResultsRequestOrBuilder.java index 5d9912b0..4a5cadd5 100644 --- a/gen/java/ai/visma/ssn/async/v1/GetTransactionResultsRequestOrBuilder.java +++ b/gen/java/ai/visma/ssn/async/v1/GetTransactionResultsRequestOrBuilder.java @@ -19,25 +19,42 @@ public interface GetTransactionResultsRequestOrBuilder extends com.google.protobuf.ByteString getIdBytes(); + /** + * string custom_id = 2 [json_name = "customId"]; + * @return The customId. + */ + java.lang.String getCustomId(); + /** + * string custom_id = 2 [json_name = "customId"]; + * @return The bytes for customId. + */ + com.google.protobuf.ByteString + getCustomIdBytes(); + /** *
    * GetTransactionResultsRequest message can potentially have a list of features to filter the response
    * e.g. repeated string features like in CreateTransactionRequest
    * 
* - * string custom_id = 2 [json_name = "customId"]; - * @return The customId. + * .ssn.type.Confidence.Level min_confidence = 3 [json_name = "minConfidence"]; + * @return The enum numeric value on the wire for minConfidence. */ - java.lang.String getCustomId(); + int getMinConfidenceValue(); /** *
    * GetTransactionResultsRequest message can potentially have a list of features to filter the response
    * e.g. repeated string features like in CreateTransactionRequest
    * 
* - * string custom_id = 2 [json_name = "customId"]; - * @return The bytes for customId. + * .ssn.type.Confidence.Level min_confidence = 3 [json_name = "minConfidence"]; + * @return The minConfidence. */ - com.google.protobuf.ByteString - getCustomIdBytes(); + ai.visma.ssn.type.Confidence.Level getMinConfidence(); + + /** + * int32 max_results = 4 [json_name = "maxResults"]; + * @return The maxResults. + */ + int getMaxResults(); } diff --git a/gen/js/ssn/async/v1/async_pb.d.ts b/gen/js/ssn/async/v1/async_pb.d.ts index f12851ba..6771c007 100644 --- a/gen/js/ssn/async/v1/async_pb.d.ts +++ b/gen/js/ssn/async/v1/async_pb.d.ts @@ -74,6 +74,12 @@ export class GetTransactionResultsRequest extends jspb.Message { getCustomId(): string; setCustomId(value: string): GetTransactionResultsRequest; + getMinConfidence(): ssn_type_candidate_pb.Confidence.Level; + setMinConfidence(value: ssn_type_candidate_pb.Confidence.Level): GetTransactionResultsRequest; + + getMaxResults(): number; + setMaxResults(value: number): GetTransactionResultsRequest; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetTransactionResultsRequest.AsObject; static toObject(includeInstance: boolean, msg: GetTransactionResultsRequest): GetTransactionResultsRequest.AsObject; @@ -86,6 +92,8 @@ export namespace GetTransactionResultsRequest { export type AsObject = { id: string, customId: string, + minConfidence: ssn_type_candidate_pb.Confidence.Level, + maxResults: number, } } diff --git a/gen/js/ssn/async/v1/async_pb.js b/gen/js/ssn/async/v1/async_pb.js index e9bb2b5c..30dc4adf 100644 --- a/gen/js/ssn/async/v1/async_pb.js +++ b/gen/js/ssn/async/v1/async_pb.js @@ -845,7 +845,9 @@ proto.ssn.async.v1.GetTransactionResultsRequest.prototype.toObject = function(op proto.ssn.async.v1.GetTransactionResultsRequest.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), - customId: jspb.Message.getFieldWithDefault(msg, 2, "") + customId: jspb.Message.getFieldWithDefault(msg, 2, ""), + minConfidence: jspb.Message.getFieldWithDefault(msg, 3, 0), + maxResults: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -890,6 +892,14 @@ proto.ssn.async.v1.GetTransactionResultsRequest.deserializeBinaryFromReader = fu var value = /** @type {string} */ (reader.readString()); msg.setCustomId(value); break; + case 3: + var value = /** @type {!proto.ssn.type.Confidence.Level} */ (reader.readEnum()); + msg.setMinConfidence(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMaxResults(value); + break; default: reader.skipField(); break; @@ -933,6 +943,20 @@ proto.ssn.async.v1.GetTransactionResultsRequest.serializeBinaryToWriter = functi f ); } + f = message.getMinConfidence(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getMaxResults(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } }; @@ -972,6 +996,42 @@ proto.ssn.async.v1.GetTransactionResultsRequest.prototype.setCustomId = function }; +/** + * optional ssn.type.Confidence.Level min_confidence = 3; + * @return {!proto.ssn.type.Confidence.Level} + */ +proto.ssn.async.v1.GetTransactionResultsRequest.prototype.getMinConfidence = function() { + return /** @type {!proto.ssn.type.Confidence.Level} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.ssn.type.Confidence.Level} value + * @return {!proto.ssn.async.v1.GetTransactionResultsRequest} returns this + */ +proto.ssn.async.v1.GetTransactionResultsRequest.prototype.setMinConfidence = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional int32 max_results = 4; + * @return {number} + */ +proto.ssn.async.v1.GetTransactionResultsRequest.prototype.getMaxResults = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ssn.async.v1.GetTransactionResultsRequest} returns this + */ +proto.ssn.async.v1.GetTransactionResultsRequest.prototype.setMaxResults = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + /** * List of repeated fields within this message type. diff --git a/gen/python/ssn/async/v1/async_pb2.py b/gen/python/ssn/async/v1/async_pb2.py index dabdea21..10a1e329 100644 --- a/gen/python/ssn/async/v1/async_pb2.py +++ b/gen/python/ssn/async/v1/async_pb2.py @@ -20,7 +20,7 @@ from validate import validate_pb2 as validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18ssn/async/v1/async.proto\x12\x0cssn.async.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a ssn/annotator/v1/annotator.proto\x1a\x18ssn/type/candidate.proto\x1a\x1essn/type/text_annotation.proto\x1a\x17validate/validate.proto\"\x9f\x01\n\x18\x43reateTransactionRequest\x12\x36\n\x08\x64ocument\x18\x01 \x01(\x0b\x32\x1a.ssn.annotator.v1.DocumentR\x08\x64ocument\x12\x12\n\x04tags\x18\x02 \x03(\tR\x04tags\x12\x1a\n\x08\x66\x65\x61tures\x18\x03 \x03(\tR\x08\x66\x65\x61tures\x12\x1b\n\tcustom_id\x18\x04 \x01(\tR\x08\x63ustomId\"H\n\x19\x43reateTransactionResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n\tcustom_id\x18\x02 \x01(\tR\x08\x63ustomId\"K\n\x1cGetTransactionResultsRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n\tcustom_id\x18\x02 \x01(\tR\x08\x63ustomId\"\xad\x01\n\x1dGetTransactionResultsResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12:\n\x0b\x61nnotations\x18\x02 \x03(\x0b\x32\x18.ssn.async.v1.AnnotationR\x0b\x61nnotations\x12#\n\rerror_message\x18\x03 \x01(\tR\x0c\x65rrorMessage\x12\x1b\n\tcustom_id\x18\x04 \x01(\tR\x08\x63ustomId\">\n\tCandidate\x12\x31\n\tcandidate\x18\x01 \x03(\x0b\x32\x13.ssn.type.CandidateR\tcandidate\"p\n\x15PurchaseLineCandidate\x12W\n\x17purchase_line_candidate\x18\x01 \x03(\x0b\x32\x1f.ssn.type.PurchaseLineCandidateR\x15purchaseLineCandidate\"Q\n\rLineCandidate\x12@\n\x0fline_candidates\x18\x01 \x03(\x0b\x32\x17.ssn.type.LineCandidateR\x0elineCandidates\"F\n\x0f\x41nswerCandidate\x12\x33\n\x07\x61nswers\x18\x01 \x03(\x0b\x32\x19.ssn.type.AnswerCandidateR\x07\x61nswers\";\n\x08PageText\x12/\n\tpage_text\x18\x01 \x03(\x0b\x32\x12.ssn.type.PageTextR\x08pageText\"S\n\x0eTextAnnotation\x12\x41\n\x0ftext_annotation\x18\x01 \x03(\x0b\x32\x18.ssn.type.TextAnnotationR\x0etextAnnotation\"\xe2\x03\n\nAnnotation\x12\x18\n\x07\x66\x65\x61ture\x18\x01 \x01(\tR\x07\x66\x65\x61ture\x12\x37\n\tcandidate\x18\x02 \x01(\x0b\x32\x17.ssn.async.v1.CandidateH\x00R\tcandidate\x12]\n\x17purchase_line_candidate\x18\x03 \x01(\x0b\x32#.ssn.async.v1.PurchaseLineCandidateH\x00R\x15purchaseLineCandidate\x12L\n\x11\x61nswer_candidates\x18\x04 \x01(\x0b\x32\x1d.ssn.async.v1.AnswerCandidateH\x00R\x10\x61nswerCandidates\x12\x46\n\x0fline_candidates\x18\x05 \x01(\x0b\x32\x1b.ssn.async.v1.LineCandidateH\x00R\x0elineCandidates\x12\x35\n\tpage_text\x18\x06 \x01(\x0b\x32\x16.ssn.async.v1.PageTextH\x00R\x08pageText\x12G\n\x0ftext_annotation\x18\x07 \x01(\x0b\x32\x1c.ssn.async.v1.TextAnnotationH\x00R\x0etextAnnotationB\x0c\n\ncandidates\"J\n\x1bGetTransactionStatusRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n\tcustom_id\x18\x02 \x01(\tR\x08\x63ustomId\"\x88\x01\n\x1cGetTransactionStatusResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n\x06status\x18\x02 \x01(\tR\x06status\x12#\n\rerror_message\x18\x03 \x01(\tR\x0c\x65rrorMessage\x12\x1b\n\tcustom_id\x18\x04 \x01(\tR\x08\x63ustomId\"G\n\x18\x44\x65leteTransactionRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n\tcustom_id\x18\x02 \x01(\tR\x08\x63ustomId\"W\n\x10\x44\x65leteTagRequest\x12\x43\n\x08tag_name\x18\x01 \x01(\tB(\xfa\x42%r#(\x80\x02\x32\x1e^[A-Za-z0-9.][A-Za-z0-9_.>-]*$R\x07tagName2\x9e\x05\n\x12TransactionService\x12\x81\x01\n\x11\x43reateTransaction\x12&.ssn.async.v1.CreateTransactionRequest\x1a\'.ssn.async.v1.CreateTransactionResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/transactions:\x01*\x12\x97\x01\n\x15GetTransactionResults\x12*.ssn.async.v1.GetTransactionResultsRequest\x1a+.ssn.async.v1.GetTransactionResultsResponse\"%\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/transactions/{id}/results\x12\x93\x01\n\x14GetTransactionStatus\x12).ssn.async.v1.GetTransactionStatusRequest\x1a*.ssn.async.v1.GetTransactionStatusResponse\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/transactions/{id}/status\x12r\n\x11\x44\x65leteTransaction\x12&.ssn.async.v1.DeleteTransactionRequest\x1a\x16.google.protobuf.Empty\"\x1d\x82\xd3\xe4\x93\x02\x17*\x15/v1/transactions/{id}\x12`\n\tDeleteTag\x12\x1e.ssn.async.v1.DeleteTagRequest\x1a\x16.google.protobuf.Empty\"\x1b\x82\xd3\xe4\x93\x02\x15*\x13/v1/tags/{tag_name}ByZ\n\tCandidate\x12\x31\n\tcandidate\x18\x01 \x03(\x0b\x32\x13.ssn.type.CandidateR\tcandidate\"p\n\x15PurchaseLineCandidate\x12W\n\x17purchase_line_candidate\x18\x01 \x03(\x0b\x32\x1f.ssn.type.PurchaseLineCandidateR\x15purchaseLineCandidate\"Q\n\rLineCandidate\x12@\n\x0fline_candidates\x18\x01 \x03(\x0b\x32\x17.ssn.type.LineCandidateR\x0elineCandidates\"F\n\x0f\x41nswerCandidate\x12\x33\n\x07\x61nswers\x18\x01 \x03(\x0b\x32\x19.ssn.type.AnswerCandidateR\x07\x61nswers\";\n\x08PageText\x12/\n\tpage_text\x18\x01 \x03(\x0b\x32\x12.ssn.type.PageTextR\x08pageText\"S\n\x0eTextAnnotation\x12\x41\n\x0ftext_annotation\x18\x01 \x03(\x0b\x32\x18.ssn.type.TextAnnotationR\x0etextAnnotation\"\xe2\x03\n\nAnnotation\x12\x18\n\x07\x66\x65\x61ture\x18\x01 \x01(\tR\x07\x66\x65\x61ture\x12\x37\n\tcandidate\x18\x02 \x01(\x0b\x32\x17.ssn.async.v1.CandidateH\x00R\tcandidate\x12]\n\x17purchase_line_candidate\x18\x03 \x01(\x0b\x32#.ssn.async.v1.PurchaseLineCandidateH\x00R\x15purchaseLineCandidate\x12L\n\x11\x61nswer_candidates\x18\x04 \x01(\x0b\x32\x1d.ssn.async.v1.AnswerCandidateH\x00R\x10\x61nswerCandidates\x12\x46\n\x0fline_candidates\x18\x05 \x01(\x0b\x32\x1b.ssn.async.v1.LineCandidateH\x00R\x0elineCandidates\x12\x35\n\tpage_text\x18\x06 \x01(\x0b\x32\x16.ssn.async.v1.PageTextH\x00R\x08pageText\x12G\n\x0ftext_annotation\x18\x07 \x01(\x0b\x32\x1c.ssn.async.v1.TextAnnotationH\x00R\x0etextAnnotationB\x0c\n\ncandidates\"J\n\x1bGetTransactionStatusRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n\tcustom_id\x18\x02 \x01(\tR\x08\x63ustomId\"\x88\x01\n\x1cGetTransactionStatusResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n\x06status\x18\x02 \x01(\tR\x06status\x12#\n\rerror_message\x18\x03 \x01(\tR\x0c\x65rrorMessage\x12\x1b\n\tcustom_id\x18\x04 \x01(\tR\x08\x63ustomId\"G\n\x18\x44\x65leteTransactionRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n\tcustom_id\x18\x02 \x01(\tR\x08\x63ustomId\"W\n\x10\x44\x65leteTagRequest\x12\x43\n\x08tag_name\x18\x01 \x01(\tB(\xfa\x42%r#(\x80\x02\x32\x1e^[A-Za-z0-9.][A-Za-z0-9_.>-]*$R\x07tagName2\x9e\x05\n\x12TransactionService\x12\x81\x01\n\x11\x43reateTransaction\x12&.ssn.async.v1.CreateTransactionRequest\x1a\'.ssn.async.v1.CreateTransactionResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/transactions:\x01*\x12\x97\x01\n\x15GetTransactionResults\x12*.ssn.async.v1.GetTransactionResultsRequest\x1a+.ssn.async.v1.GetTransactionResultsResponse\"%\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/transactions/{id}/results\x12\x93\x01\n\x14GetTransactionStatus\x12).ssn.async.v1.GetTransactionStatusRequest\x1a*.ssn.async.v1.GetTransactionStatusResponse\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/transactions/{id}/status\x12r\n\x11\x44\x65leteTransaction\x12&.ssn.async.v1.DeleteTransactionRequest\x1a\x16.google.protobuf.Empty\"\x1d\x82\xd3\xe4\x93\x02\x17*\x15/v1/transactions/{id}\x12`\n\tDeleteTag\x12\x1e.ssn.async.v1.DeleteTagRequest\x1a\x16.google.protobuf.Empty\"\x1b\x82\xd3\xe4\x93\x02\x15*\x13/v1/tags/{tag_name}ByZ None: ... class GetTransactionResultsRequest(_message.Message): - __slots__ = ["id", "custom_id"] + __slots__ = ["id", "custom_id", "min_confidence", "max_results"] ID_FIELD_NUMBER: _ClassVar[int] CUSTOM_ID_FIELD_NUMBER: _ClassVar[int] + MIN_CONFIDENCE_FIELD_NUMBER: _ClassVar[int] + MAX_RESULTS_FIELD_NUMBER: _ClassVar[int] id: str custom_id: str - def __init__(self, id: _Optional[str] = ..., custom_id: _Optional[str] = ...) -> None: ... + min_confidence: _candidate_pb2.Confidence.Level + max_results: int + def __init__(self, id: _Optional[str] = ..., custom_id: _Optional[str] = ..., min_confidence: _Optional[_Union[_candidate_pb2.Confidence.Level, str]] = ..., max_results: _Optional[int] = ...) -> None: ... class GetTransactionResultsResponse(_message.Message): __slots__ = ["id", "annotations", "error_message", "custom_id"] diff --git a/proto/ssn/async/v1/async.proto b/proto/ssn/async/v1/async.proto index 89e3df75..60a9fe4b 100644 --- a/proto/ssn/async/v1/async.proto +++ b/proto/ssn/async/v1/async.proto @@ -73,6 +73,7 @@ message CreateTransactionRequest { repeated string features = 3; string custom_id = 4; } + message CreateTransactionResponse { string id = 1; string custom_id = 2; @@ -87,7 +88,10 @@ message GetTransactionResultsRequest { string custom_id = 2; // GetTransactionResultsRequest message can potentially have a list of features to filter the response // e.g. repeated string features like in CreateTransactionRequest + ssn.type.Confidence.Level min_confidence = 3; + int32 max_results = 4; } + message GetTransactionResultsResponse { string id = 1; // map: FEATURE NAME --> SSN CANDIDATES