feature.proto 5.9 KB

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