lva.proto 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. // Copyright 2022 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.visionai.v1alpha1;
  16. option csharp_namespace = "Google.Cloud.VisionAI.V1Alpha1";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/visionai/v1alpha1;visionai";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "LvaProto";
  20. option java_package = "com.google.cloud.visionai.v1alpha1";
  21. option php_namespace = "Google\\Cloud\\VisionAI\\V1alpha1";
  22. option ruby_package = "Google::Cloud::VisionAI::V1alpha1";
  23. // Represents an actual value of an operator attribute.
  24. message AttributeValue {
  25. // Attribute value.
  26. oneof value {
  27. // int.
  28. int64 i = 1;
  29. // float.
  30. float f = 2;
  31. // bool.
  32. bool b = 3;
  33. // string.
  34. bytes s = 4;
  35. }
  36. }
  37. // Defines an Analyzer.
  38. //
  39. // An analyzer processes data from its input streams using the logic defined in
  40. // the Operator that it represents. Of course, it produces data for the output
  41. // streams declared in the Operator.
  42. message AnalyzerDefinition {
  43. // The inputs to this analyzer.
  44. //
  45. // We accept input name references of the following form:
  46. // <analyzer-name>:<output-argument-name>
  47. //
  48. // Example:
  49. //
  50. // Suppose you had an operator named "SomeOp" that has 2 output
  51. // arguments, the first of which is named "foo" and the second of which is
  52. // named "bar", and an operator named "MyOp" that accepts 2 inputs.
  53. //
  54. // Also suppose that there is an analyzer named "some-analyzer" that is
  55. // running "SomeOp" and another analyzer named "my-analyzer" running "MyOp".
  56. //
  57. // To indicate that "my-analyzer" is to consume "some-analyzer"'s "foo"
  58. // output as its first input and "some-analyzer"'s "bar" output as its
  59. // second input, you can set this field to the following:
  60. // input = ["some-analyzer:foo", "some-analyzer:bar"]
  61. message StreamInput {
  62. // The name of the stream input (as discussed above).
  63. string input = 1;
  64. }
  65. // Options available for debugging purposes only.
  66. message DebugOptions {
  67. // Environment variables.
  68. map<string, string> environment_variables = 1;
  69. }
  70. // The name of this analyzer.
  71. //
  72. // Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*.
  73. string analyzer = 1;
  74. // The name of the operator that this analyzer runs.
  75. //
  76. // Must match the name of a supported operator.
  77. string operator = 2;
  78. // Input streams.
  79. repeated StreamInput inputs = 3;
  80. // The attribute values that this analyzer applies to the operator.
  81. //
  82. // Supply a mapping between the attribute names and the actual value you wish
  83. // to apply. If an attribute name is omitted, then it will take a
  84. // preconfigured default value.
  85. map<string, AttributeValue> attrs = 4;
  86. // Debug options.
  87. DebugOptions debug_options = 5;
  88. }
  89. // Defines a full analysis.
  90. //
  91. // This is a description of the overall live analytics pipeline.
  92. // You may think of this as an edge list representation of a multigraph.
  93. //
  94. // This may be directly authored by a human in protobuf textformat, or it may be
  95. // generated by a programming API (perhaps Python or JavaScript depending on
  96. // context).
  97. message AnalysisDefinition {
  98. // Analyzer definitions.
  99. repeated AnalyzerDefinition analyzers = 1;
  100. }