feature.proto 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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.aiplatform.v1beta1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/cloud/aiplatform/v1beta1/feature_monitoring_stats.proto";
  19. import "google/cloud/aiplatform/v1beta1/featurestore_monitoring.proto";
  20. import "google/protobuf/timestamp.proto";
  21. option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "FeatureProto";
  25. option java_package = "com.google.cloud.aiplatform.v1beta1";
  26. option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
  27. option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
  28. // Feature Metadata information that describes an attribute of an entity type.
  29. // For example, apple is an entity type, and color is a feature that describes
  30. // apple.
  31. message Feature {
  32. option (google.api.resource) = {
  33. type: "aiplatform.googleapis.com/Feature"
  34. pattern: "projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}"
  35. };
  36. // A list of historical [Snapshot
  37. // Analysis][FeaturestoreMonitoringConfig.SnapshotAnalysis] or [Import Feature
  38. // Analysis] [FeaturestoreMonitoringConfig.ImportFeatureAnalysis] stats
  39. // requested by user, sorted by [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time] descending.
  40. message MonitoringStatsAnomaly {
  41. // If the objective in the request is both
  42. // Import Feature Analysis and Snapshot Analysis, this objective could be
  43. // one of them. Otherwise, this objective should be the same as the
  44. // objective in the request.
  45. enum Objective {
  46. // If it's OBJECTIVE_UNSPECIFIED, monitoring_stats will be empty.
  47. OBJECTIVE_UNSPECIFIED = 0;
  48. // Stats are generated by Import Feature Analysis.
  49. IMPORT_FEATURE_ANALYSIS = 1;
  50. // Stats are generated by Snapshot Analysis.
  51. SNAPSHOT_ANALYSIS = 2;
  52. }
  53. // Output only. The objective for each stats.
  54. Objective objective = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  55. // Output only. The stats and anomalies generated at specific timestamp.
  56. FeatureStatsAnomaly feature_stats_anomaly = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  57. }
  58. // An enum representing the value type of a feature.
  59. enum ValueType {
  60. // The value type is unspecified.
  61. VALUE_TYPE_UNSPECIFIED = 0;
  62. // Used for Feature that is a boolean.
  63. BOOL = 1;
  64. // Used for Feature that is a list of boolean.
  65. BOOL_ARRAY = 2;
  66. // Used for Feature that is double.
  67. DOUBLE = 3;
  68. // Used for Feature that is a list of double.
  69. DOUBLE_ARRAY = 4;
  70. // Used for Feature that is INT64.
  71. INT64 = 9;
  72. // Used for Feature that is a list of INT64.
  73. INT64_ARRAY = 10;
  74. // Used for Feature that is string.
  75. STRING = 11;
  76. // Used for Feature that is a list of String.
  77. STRING_ARRAY = 12;
  78. // Used for Feature that is bytes.
  79. BYTES = 13;
  80. }
  81. // Immutable. Name of the Feature.
  82. // Format:
  83. // `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`
  84. //
  85. // The last part feature is assigned by the client. The feature can be up to
  86. // 64 characters long and can consist only of ASCII Latin letters A-Z and a-z,
  87. // underscore(_), and ASCII digits 0-9 starting with a letter. The value will
  88. // be unique given an entity type.
  89. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  90. // Description of the Feature.
  91. string description = 2;
  92. // Required. Immutable. Type of Feature value.
  93. ValueType value_type = 3 [
  94. (google.api.field_behavior) = REQUIRED,
  95. (google.api.field_behavior) = IMMUTABLE
  96. ];
  97. // Output only. Timestamp when this EntityType was created.
  98. google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  99. // Output only. Timestamp when this EntityType was most recently updated.
  100. google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  101. // Optional. The labels with user-defined metadata to organize your Features.
  102. //
  103. // Label keys and values can be no longer than 64 characters
  104. // (Unicode codepoints), can only contain lowercase letters, numeric
  105. // characters, underscores and dashes. International characters are allowed.
  106. //
  107. // See https://goo.gl/xmQnxf for more information on and examples of labels.
  108. // No more than 64 user labels can be associated with one Feature (System
  109. // labels are excluded)."
  110. // System reserved label keys are prefixed with "aiplatform.googleapis.com/"
  111. // and are immutable.
  112. map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL];
  113. // Used to perform a consistent read-modify-write updates. If not set, a blind
  114. // "overwrite" update happens.
  115. string etag = 7;
  116. // Optional. Deprecated: The custom monitoring configuration for this Feature, if not
  117. // set, use the monitoring_config defined for the EntityType this Feature
  118. // belongs to.
  119. // Only Features with type ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType]) BOOL, STRING, DOUBLE or
  120. // INT64 can enable monitoring.
  121. //
  122. // If this is populated with
  123. // [FeaturestoreMonitoringConfig.disabled][] = true, snapshot analysis
  124. // monitoring is disabled; if
  125. // [FeaturestoreMonitoringConfig.monitoring_interval][] specified, snapshot
  126. // analysis monitoring is enabled. Otherwise, snapshot analysis monitoring
  127. // config is same as the EntityType's this Feature belongs to.
  128. FeaturestoreMonitoringConfig monitoring_config = 9 [
  129. deprecated = true,
  130. (google.api.field_behavior) = OPTIONAL
  131. ];
  132. // Optional. If not set, use the monitoring_config defined for the EntityType this
  133. // Feature belongs to.
  134. // Only Features with type ([Feature.ValueType][google.cloud.aiplatform.v1beta1.Feature.ValueType]) BOOL, STRING, DOUBLE or
  135. // INT64 can enable monitoring.
  136. //
  137. // If set to true, all types of data monitoring are disabled despite the
  138. // config on EntityType.
  139. bool disable_monitoring = 12 [(google.api.field_behavior) = OPTIONAL];
  140. // Output only. A list of historical [Snapshot
  141. // Analysis][FeaturestoreMonitoringConfig.SnapshotAnalysis]
  142. // stats requested by user, sorted by [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1beta1.FeatureStatsAnomaly.start_time]
  143. // descending.
  144. repeated FeatureStatsAnomaly monitoring_stats = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  145. // Output only. The list of historical stats and anomalies with specified objectives.
  146. repeated MonitoringStatsAnomaly monitoring_stats_anomalies = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  147. }