migration_metrics.proto 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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.bigquery.migration.v2alpha;
  16. import "google/api/distribution.proto";
  17. import "google/api/field_behavior.proto";
  18. import "google/api/metric.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/migration/v2alpha;migration";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "MigrationMetricsProto";
  24. option java_package = "com.google.cloud.bigquery.migration.v2alpha";
  25. option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha";
  26. // The metrics object for a SubTask.
  27. message TimeSeries {
  28. // Required. The name of the metric.
  29. //
  30. // If the metric is not known by the service yet, it will be auto-created.
  31. string metric = 1 [(google.api.field_behavior) = REQUIRED];
  32. // Required. The value type of the time series.
  33. google.api.MetricDescriptor.ValueType value_type = 2 [(google.api.field_behavior) = REQUIRED];
  34. // Optional. The metric kind of the time series.
  35. //
  36. // If present, it must be the same as the metric kind of the associated
  37. // metric. If the associated metric's descriptor must be auto-created, then
  38. // this field specifies the metric kind of the new descriptor and must be
  39. // either `GAUGE` (the default) or `CUMULATIVE`.
  40. google.api.MetricDescriptor.MetricKind metric_kind = 3 [(google.api.field_behavior) = OPTIONAL];
  41. // Required. The data points of this time series. When listing time series, points are
  42. // returned in reverse time order.
  43. //
  44. // When creating a time series, this field must contain exactly one point and
  45. // the point's type must be the same as the value type of the associated
  46. // metric. If the associated metric's descriptor must be auto-created, then
  47. // the value type of the descriptor is determined by the point's type, which
  48. // must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`.
  49. repeated Point points = 4 [(google.api.field_behavior) = REQUIRED];
  50. }
  51. // A single data point in a time series.
  52. message Point {
  53. // The time interval to which the data point applies. For `GAUGE` metrics,
  54. // the start time does not need to be supplied, but if it is supplied, it must
  55. // equal the end time. For `DELTA` metrics, the start and end time should
  56. // specify a non-zero interval, with subsequent points specifying contiguous
  57. // and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end
  58. // time should specify a non-zero interval, with subsequent points specifying
  59. // the same start time and increasing end times, until an event resets the
  60. // cumulative value to zero and sets a new start time for the following
  61. // points.
  62. TimeInterval interval = 1;
  63. // The value of the data point.
  64. TypedValue value = 2;
  65. }
  66. // A time interval extending just after a start time through an end time.
  67. // If the start time is the same as the end time, then the interval
  68. // represents a single point in time.
  69. message TimeInterval {
  70. // Optional. The beginning of the time interval. The default value
  71. // for the start time is the end time. The start time must not be
  72. // later than the end time.
  73. google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OPTIONAL];
  74. // Required. The end of the time interval.
  75. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = REQUIRED];
  76. }
  77. // A single strongly-typed value.
  78. message TypedValue {
  79. // The typed value field.
  80. oneof value {
  81. // A Boolean value: `true` or `false`.
  82. bool bool_value = 1;
  83. // A 64-bit integer. Its range is approximately +/-9.2x10^18.
  84. int64 int64_value = 2;
  85. // A 64-bit double-precision floating-point number. Its magnitude
  86. // is approximately +/-10^(+/-300) and it has 16 significant digits of
  87. // precision.
  88. double double_value = 3;
  89. // A variable-length string value.
  90. string string_value = 4;
  91. // A distribution value.
  92. google.api.Distribution distribution_value = 5;
  93. }
  94. }