processor.proto 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.documentai.v1beta3;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/cloud/documentai/v1beta3/document_io.proto";
  19. import "google/protobuf/timestamp.proto";
  20. import "google/api/annotations.proto";
  21. option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/documentai/v1beta3;documentai";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "DocumentAiProcessor";
  25. option java_package = "com.google.cloud.documentai.v1beta3";
  26. option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3";
  27. option ruby_package = "Google::Cloud::DocumentAI::V1beta3";
  28. // The first-class citizen for DocumentAI. Each processor defines how to extract
  29. // structural information from a document.
  30. message Processor {
  31. option (google.api.resource) = {
  32. type: "documentai.googleapis.com/Processor"
  33. pattern: "projects/{project}/locations/{location}/processors/{processor}"
  34. };
  35. // The possible states of the processor.
  36. enum State {
  37. // The processor is in an unspecified state.
  38. STATE_UNSPECIFIED = 0;
  39. // The processor is enabled.
  40. ENABLED = 1;
  41. // The processor is disabled.
  42. DISABLED = 2;
  43. // The processor is being enabled, will become ENABLED if successful.
  44. ENABLING = 3;
  45. // The processor is being disabled, will become DISABLED if successful.
  46. DISABLING = 4;
  47. // The processor is being created.
  48. CREATING = 5;
  49. // The processor failed during creation.
  50. FAILED = 6;
  51. // The processor is being deleted, will be removed if successful.
  52. DELETING = 7;
  53. }
  54. // Output only. Immutable. The resource name of the processor.
  55. // Format: projects/{project}/locations/{location}/processors/{processor}
  56. string name = 1 [
  57. (google.api.field_behavior) = IMMUTABLE,
  58. (google.api.field_behavior) = OUTPUT_ONLY
  59. ];
  60. // The processor type.
  61. string type = 2;
  62. // The display name of the processor.
  63. string display_name = 3;
  64. // Output only. The state of the processor.
  65. State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  66. // The default processor version.
  67. string default_processor_version = 9;
  68. // Output only. Immutable. The http endpoint that can be called to invoke processing.
  69. string process_endpoint = 6 [
  70. (google.api.field_behavior) = OUTPUT_ONLY,
  71. (google.api.field_behavior) = IMMUTABLE
  72. ];
  73. // The time the processor was created.
  74. google.protobuf.Timestamp create_time = 7;
  75. // The KMS key used for encryption/decryption in CMEK scenarios.
  76. // See https://cloud.google.com/security-key-management.
  77. string kms_key_name = 8;
  78. }