google-cloud-ai_platform-v1 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +164 -4
  4. data/lib/google/cloud/ai_platform/v1/dataset_service/paths.rb +21 -0
  5. data/lib/google/cloud/ai_platform/v1/dataset_service.rb +1 -1
  6. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +28 -21
  7. data/lib/google/cloud/ai_platform/v1/endpoint_service.rb +1 -1
  8. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +109 -5
  9. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service.rb +1 -1
  10. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +53 -50
  11. data/lib/google/cloud/ai_platform/v1/featurestore_service.rb +1 -1
  12. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +18 -14
  13. data/lib/google/cloud/ai_platform/v1/index_endpoint_service.rb +1 -1
  14. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +8 -4
  15. data/lib/google/cloud/ai_platform/v1/index_service.rb +1 -1
  16. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +53 -36
  17. data/lib/google/cloud/ai_platform/v1/job_service.rb +1 -1
  18. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +33 -36
  19. data/lib/google/cloud/ai_platform/v1/metadata_service.rb +1 -1
  20. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +3 -4
  21. data/lib/google/cloud/ai_platform/v1/migration_service.rb +1 -1
  22. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +53 -23
  23. data/lib/google/cloud/ai_platform/v1/model_service.rb +1 -1
  24. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +28 -17
  25. data/lib/google/cloud/ai_platform/v1/pipeline_service.rb +1 -1
  26. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +28 -19
  27. data/lib/google/cloud/ai_platform/v1/prediction_service.rb +1 -1
  28. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +5 -3
  29. data/lib/google/cloud/ai_platform/v1/specialist_pool_service.rb +1 -1
  30. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +165 -71
  31. data/lib/google/cloud/ai_platform/v1/tensorboard_service.rb +1 -1
  32. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  33. data/lib/google/cloud/ai_platform/v1/vizier_service.rb +1 -1
  34. data/lib/google/cloud/ai_platform/v1.rb +2 -2
  35. data/lib/google/cloud/aiplatform/v1/batch_prediction_job_pb.rb +8 -0
  36. data/lib/google/cloud/aiplatform/v1/dataset_pb.rb +3 -0
  37. data/lib/google/cloud/aiplatform/v1/dataset_service_pb.rb +34 -0
  38. data/lib/google/cloud/aiplatform/v1/dataset_service_services_pb.rb +2 -0
  39. data/lib/google/cloud/aiplatform/v1/featurestore_online_service_pb.rb +13 -0
  40. data/lib/google/cloud/aiplatform/v1/featurestore_online_service_services_pb.rb +6 -0
  41. data/lib/google/cloud/aiplatform/v1/featurestore_service_pb.rb +1 -0
  42. data/lib/google/cloud/aiplatform/v1/index_service_services_pb.rb +2 -1
  43. data/lib/google/cloud/aiplatform/v1/job_service_services_pb.rb +24 -14
  44. data/lib/google/cloud/aiplatform/v1/model_service_pb.rb +2 -0
  45. data/lib/google/cloud/aiplatform/v1/model_service_services_pb.rb +10 -5
  46. data/lib/google/cloud/aiplatform/v1/pipeline_service_services_pb.rb +16 -9
  47. data/lib/google/cloud/aiplatform/v1/prediction_service_services_pb.rb +10 -6
  48. data/lib/google/cloud/aiplatform/v1/study_pb.rb +1 -0
  49. data/lib/google/cloud/aiplatform/v1/tensorboard_service_pb.rb +17 -0
  50. data/lib/google/cloud/aiplatform/v1/tensorboard_service_services_pb.rb +8 -8
  51. data/proto_docs/google/cloud/aiplatform/v1/annotation.rb +9 -6
  52. data/proto_docs/google/cloud/aiplatform/v1/annotation_spec.rb +3 -3
  53. data/proto_docs/google/cloud/aiplatform/v1/batch_prediction_job.rb +185 -52
  54. data/proto_docs/google/cloud/aiplatform/v1/completion_stats.rb +8 -7
  55. data/proto_docs/google/cloud/aiplatform/v1/context.rb +2 -2
  56. data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +23 -18
  57. data/proto_docs/google/cloud/aiplatform/v1/data_item.rb +6 -5
  58. data/proto_docs/google/cloud/aiplatform/v1/data_labeling_job.rb +17 -17
  59. data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +38 -17
  60. data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +180 -24
  61. data/proto_docs/google/cloud/aiplatform/v1/encryption_spec.rb +2 -2
  62. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +39 -24
  63. data/proto_docs/google/cloud/aiplatform/v1/endpoint_service.rb +57 -35
  64. data/proto_docs/google/cloud/aiplatform/v1/entity_type.rb +8 -6
  65. data/proto_docs/google/cloud/aiplatform/v1/explanation.rb +111 -75
  66. data/proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb +58 -38
  67. data/proto_docs/google/cloud/aiplatform/v1/feature.rb +9 -6
  68. data/proto_docs/google/cloud/aiplatform/v1/feature_monitoring_stats.rb +2 -1
  69. data/proto_docs/google/cloud/aiplatform/v1/featurestore.rb +12 -11
  70. data/proto_docs/google/cloud/aiplatform/v1/featurestore_monitoring.rb +6 -2
  71. data/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb +65 -10
  72. data/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb +141 -99
  73. data/proto_docs/google/cloud/aiplatform/v1/hyperparameter_tuning_job.rb +10 -8
  74. data/proto_docs/google/cloud/aiplatform/v1/index.rb +19 -18
  75. data/proto_docs/google/cloud/aiplatform/v1/index_endpoint.rb +36 -24
  76. data/proto_docs/google/cloud/aiplatform/v1/index_endpoint_service.rb +49 -29
  77. data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +35 -17
  78. data/proto_docs/google/cloud/aiplatform/v1/io.rb +2 -1
  79. data/proto_docs/google/cloud/aiplatform/v1/job_service.rb +94 -57
  80. data/proto_docs/google/cloud/aiplatform/v1/machine_resources.rb +53 -43
  81. data/proto_docs/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.rb +5 -5
  82. data/proto_docs/google/cloud/aiplatform/v1/metadata_schema.rb +3 -3
  83. data/proto_docs/google/cloud/aiplatform/v1/metadata_service.rb +141 -91
  84. data/proto_docs/google/cloud/aiplatform/v1/migratable_resource.rb +3 -3
  85. data/proto_docs/google/cloud/aiplatform/v1/migration_service.rb +18 -15
  86. data/proto_docs/google/cloud/aiplatform/v1/model.rb +180 -133
  87. data/proto_docs/google/cloud/aiplatform/v1/model_deployment_monitoring_job.rb +22 -18
  88. data/proto_docs/google/cloud/aiplatform/v1/model_evaluation.rb +7 -6
  89. data/proto_docs/google/cloud/aiplatform/v1/model_evaluation_slice.rb +11 -7
  90. data/proto_docs/google/cloud/aiplatform/v1/model_monitoring.rb +4 -2
  91. data/proto_docs/google/cloud/aiplatform/v1/model_service.rb +119 -54
  92. data/proto_docs/google/cloud/aiplatform/v1/operation.rb +1 -1
  93. data/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb +59 -45
  94. data/proto_docs/google/cloud/aiplatform/v1/pipeline_service.rb +42 -22
  95. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +42 -28
  96. data/proto_docs/google/cloud/aiplatform/v1/saved_query.rb +2 -2
  97. data/proto_docs/google/cloud/aiplatform/v1/specialist_pool.rb +1 -1
  98. data/proto_docs/google/cloud/aiplatform/v1/specialist_pool_service.rb +19 -11
  99. data/proto_docs/google/cloud/aiplatform/v1/study.rb +42 -25
  100. data/proto_docs/google/cloud/aiplatform/v1/tensorboard.rb +3 -3
  101. data/proto_docs/google/cloud/aiplatform/v1/tensorboard_data.rb +8 -7
  102. data/proto_docs/google/cloud/aiplatform/v1/tensorboard_experiment.rb +2 -1
  103. data/proto_docs/google/cloud/aiplatform/v1/tensorboard_service.rb +203 -109
  104. data/proto_docs/google/cloud/aiplatform/v1/tensorboard_time_series.rb +8 -6
  105. data/proto_docs/google/cloud/aiplatform/v1/training_pipeline.rb +84 -59
  106. data/proto_docs/google/cloud/aiplatform/v1/unmanaged_container_model.rb +2 -2
  107. data/proto_docs/google/cloud/aiplatform/v1/vizier_service.rb +40 -20
  108. data/proto_docs/google/rpc/status.rb +4 -2
  109. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fec07cb88ed843442c56042d5870bcc796bf1df48c833721ed6371aa3ee55edb
4
- data.tar.gz: 0ba1012707451c007cabf7181b93edc3f57701570f878397330aff29a134a906
3
+ metadata.gz: b03faddc60324762295b33bd0a97fdcb1a1f252d978741e797a7342d46757003
4
+ data.tar.gz: cf31ffbb71ffcb19b75ff58d414e5e9310818fc9926db92e62d853b708d27894
5
5
  SHA512:
6
- metadata.gz: 948ae208928bdf72481e5a8717c124e651a4abe93985f798e2631d38fbec82035a51d2185bb32372811647180d7a713165ae458b3b5e90d4871954dbf415507b
7
- data.tar.gz: 7d23e21a73d60fd11f1dfc4d85b1101867fe8ac387b8d2688b9b143991da71481798bddc6e7ef5f1b22f990910da628bc268b39995a6cfdfc057b4d3759df6ec
6
+ metadata.gz: f6ca374c53304c94b2f7deee5a6c1dc5b3e9a64d943859e7bfb170d4578ab245926ec37f145fa3d8e5811558fe29a099d42333abd9be3673c0c549de4f23853d
7
+ data.tar.gz: 34be80ff99785d227656aaa604c9128e89c9f92cfce15553b6e936146194c4366b4ec2e98f85246d42b09312de5f495e020672a727d4fca0956585bee6e2075c
data/README.md CHANGED
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -391,8 +391,8 @@ module Google
391
391
  # Required. The Dataset which replaces the resource on the server.
392
392
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
393
393
  # Required. The update mask applies to the resource.
394
- # For the `FieldMask` definition, see {::Google::Protobuf::FieldMask google.protobuf.FieldMask}.
395
- # Updatable fields:
394
+ # For the `FieldMask` definition, see
395
+ # {::Google::Protobuf::FieldMask google.protobuf.FieldMask}. Updatable fields:
396
396
  #
397
397
  # * `display_name`
398
398
  # * `description`
@@ -702,8 +702,8 @@ module Google
702
702
  # Format:
703
703
  # `projects/{project}/locations/{location}/datasets/{dataset}`
704
704
  # @param import_configs [::Array<::Google::Cloud::AIPlatform::V1::ImportDataConfig, ::Hash>]
705
- # Required. The desired input locations. The contents of all input locations will be
706
- # imported in one batch.
705
+ # Required. The desired input locations. The contents of all input locations
706
+ # will be imported in one batch.
707
707
  #
708
708
  # @yield [response, operation] Access the result along with the RPC operation
709
709
  # @yieldparam response [::Gapic::Operation]
@@ -979,6 +979,159 @@ module Google
979
979
  raise ::Google::Cloud::Error.from_error(e)
980
980
  end
981
981
 
982
+ ##
983
+ # Searches DataItems in a Dataset.
984
+ #
985
+ # @overload search_data_items(request, options = nil)
986
+ # Pass arguments to `search_data_items` via a request object, either of type
987
+ # {::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest} or an equivalent Hash.
988
+ #
989
+ # @param request [::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest, ::Hash]
990
+ # A request object representing the call parameters. Required. To specify no
991
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
992
+ # @param options [::Gapic::CallOptions, ::Hash]
993
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
994
+ #
995
+ # @overload search_data_items(order_by_data_item: nil, order_by_annotation: nil, dataset: nil, saved_query: nil, data_labeling_job: nil, data_item_filter: nil, annotations_filter: nil, annotation_filters: nil, field_mask: nil, annotations_limit: nil, page_size: nil, order_by: nil, page_token: nil)
996
+ # Pass arguments to `search_data_items` via keyword arguments. Note that at
997
+ # least one keyword argument is required. To specify no parameters, or to keep all
998
+ # the default parameter values, pass an empty Hash as a request object (see above).
999
+ #
1000
+ # @param order_by_data_item [::String]
1001
+ # A comma-separated list of data item fields to order by, sorted in
1002
+ # ascending order. Use "desc" after a field name for descending.
1003
+ # @param order_by_annotation [::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest::OrderByAnnotation, ::Hash]
1004
+ # Expression that allows ranking results based on annotation's property.
1005
+ # @param dataset [::String]
1006
+ # Required. The resource name of the Dataset from which to search DataItems.
1007
+ # Format:
1008
+ # `projects/{project}/locations/{location}/datasets/{dataset}`
1009
+ # @param saved_query [::String]
1010
+ # The resource name of a SavedQuery(annotation set in UI).
1011
+ # Format:
1012
+ # `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
1013
+ # All of the search will be done in the context of this SavedQuery.
1014
+ # @param data_labeling_job [::String]
1015
+ # The resource name of a DataLabelingJob.
1016
+ # Format:
1017
+ # `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
1018
+ # If this field is set, all of the search will be done in the context of
1019
+ # this DataLabelingJob.
1020
+ # @param data_item_filter [::String]
1021
+ # An expression for filtering the DataItem that will be returned.
1022
+ #
1023
+ # * `data_item_id` - for = or !=.
1024
+ # * `labeled` - for = or !=.
1025
+ # * `has_annotation(ANNOTATION_SPEC_ID)` - true only for DataItem that
1026
+ # have at least one annotation with annotation_spec_id =
1027
+ # `ANNOTATION_SPEC_ID` in the context of SavedQuery or DataLabelingJob.
1028
+ #
1029
+ # For example:
1030
+ #
1031
+ # * `data_item=1`
1032
+ # * `has_annotation(5)`
1033
+ # @param annotations_filter [::String]
1034
+ # An expression for filtering the Annotations that will be returned per
1035
+ # DataItem.
1036
+ # * `annotation_spec_id` - for = or !=.
1037
+ # @param annotation_filters [::Array<::String>]
1038
+ # An expression that specifies what Annotations will be returned per
1039
+ # DataItem. Annotations satisfied either of the conditions will be returned.
1040
+ # * `annotation_spec_id` - for = or !=.
1041
+ # Must specify `saved_query_id=` - saved query id that annotations should
1042
+ # belong to.
1043
+ # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
1044
+ # Mask specifying which fields of
1045
+ # {::Google::Cloud::AIPlatform::V1::DataItemView DataItemView} to read.
1046
+ # @param annotations_limit [::Integer]
1047
+ # If set, only up to this many of Annotations will be returned per
1048
+ # DataItemView. The maximum value is 1000. If not set, the maximum value will
1049
+ # be used.
1050
+ # @param page_size [::Integer]
1051
+ # Requested page size. Server may return fewer results than requested.
1052
+ # Default and maximum page size is 100.
1053
+ # @param order_by [::String]
1054
+ # A comma-separated list of fields to order by, sorted in ascending order.
1055
+ # Use "desc" after a field name for descending.
1056
+ # @param page_token [::String]
1057
+ # A token identifying a page of results for the server to return
1058
+ # Typically obtained via
1059
+ # {::Google::Cloud::AIPlatform::V1::SearchDataItemsResponse#next_page_token SearchDataItemsResponse.next_page_token}
1060
+ # of the previous
1061
+ # {::Google::Cloud::AIPlatform::V1::DatasetService::Client#search_data_items DatasetService.SearchDataItems}
1062
+ # call.
1063
+ #
1064
+ # @yield [response, operation] Access the result along with the RPC operation
1065
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView>]
1066
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1067
+ #
1068
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView>]
1069
+ #
1070
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1071
+ #
1072
+ # @example Basic example
1073
+ # require "google/cloud/ai_platform/v1"
1074
+ #
1075
+ # # Create a client object. The client can be reused for multiple calls.
1076
+ # client = Google::Cloud::AIPlatform::V1::DatasetService::Client.new
1077
+ #
1078
+ # # Create a request. To set request fields, pass in keyword arguments.
1079
+ # request = Google::Cloud::AIPlatform::V1::SearchDataItemsRequest.new
1080
+ #
1081
+ # # Call the search_data_items method.
1082
+ # result = client.search_data_items request
1083
+ #
1084
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1085
+ # # iterate over all elements by calling #each, and the enumerable
1086
+ # # will lazily make API calls to fetch subsequent pages. Other
1087
+ # # methods are also available for managing paging directly.
1088
+ # result.each do |response|
1089
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::DataItemView.
1090
+ # p response
1091
+ # end
1092
+ #
1093
+ def search_data_items request, options = nil
1094
+ raise ::ArgumentError, "request must be provided" if request.nil?
1095
+
1096
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest
1097
+
1098
+ # Converts hash and nil to an options object
1099
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1100
+
1101
+ # Customize the options with defaults
1102
+ metadata = @config.rpcs.search_data_items.metadata.to_h
1103
+
1104
+ # Set x-goog-api-client and x-goog-user-project headers
1105
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1106
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1107
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
1108
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1109
+
1110
+ header_params = {}
1111
+ if request.dataset
1112
+ header_params["dataset"] = request.dataset
1113
+ end
1114
+
1115
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1116
+ metadata[:"x-goog-request-params"] ||= request_params_header
1117
+
1118
+ options.apply_defaults timeout: @config.rpcs.search_data_items.timeout,
1119
+ metadata: metadata,
1120
+ retry_policy: @config.rpcs.search_data_items.retry_policy
1121
+
1122
+ options.apply_defaults timeout: @config.timeout,
1123
+ metadata: @config.metadata,
1124
+ retry_policy: @config.retry_policy
1125
+
1126
+ @dataset_service_stub.call_rpc :search_data_items, request, options: options do |response, operation|
1127
+ response = ::Gapic::PagedEnumerable.new @dataset_service_stub, :search_data_items, request, response, operation, options
1128
+ yield response, operation if block_given?
1129
+ return response
1130
+ end
1131
+ rescue ::GRPC::BadStatus => e
1132
+ raise ::Google::Cloud::Error.from_error(e)
1133
+ end
1134
+
982
1135
  ##
983
1136
  # Lists SavedQueries in a Dataset.
984
1137
  #
@@ -1454,6 +1607,11 @@ module Google
1454
1607
  #
1455
1608
  attr_reader :list_data_items
1456
1609
  ##
1610
+ # RPC-specific configuration for `search_data_items`
1611
+ # @return [::Gapic::Config::Method]
1612
+ #
1613
+ attr_reader :search_data_items
1614
+ ##
1457
1615
  # RPC-specific configuration for `list_saved_queries`
1458
1616
  # @return [::Gapic::Config::Method]
1459
1617
  #
@@ -1487,6 +1645,8 @@ module Google
1487
1645
  @export_data = ::Gapic::Config::Method.new export_data_config
1488
1646
  list_data_items_config = parent_rpcs.list_data_items if parent_rpcs.respond_to? :list_data_items
1489
1647
  @list_data_items = ::Gapic::Config::Method.new list_data_items_config
1648
+ search_data_items_config = parent_rpcs.search_data_items if parent_rpcs.respond_to? :search_data_items
1649
+ @search_data_items = ::Gapic::Config::Method.new search_data_items_config
1490
1650
  list_saved_queries_config = parent_rpcs.list_saved_queries if parent_rpcs.respond_to? :list_saved_queries
1491
1651
  @list_saved_queries = ::Gapic::Config::Method.new list_saved_queries_config
1492
1652
  get_annotation_spec_config = parent_rpcs.get_annotation_spec if parent_rpcs.respond_to? :get_annotation_spec
@@ -102,6 +102,27 @@ module Google
102
102
  "projects/#{project}/locations/#{location}"
103
103
  end
104
104
 
105
+ ##
106
+ # Create a fully-qualified SavedQuery resource string.
107
+ #
108
+ # The resource will be in the following format:
109
+ #
110
+ # `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`
111
+ #
112
+ # @param project [String]
113
+ # @param location [String]
114
+ # @param dataset [String]
115
+ # @param saved_query [String]
116
+ #
117
+ # @return [::String]
118
+ def saved_query_path project:, location:, dataset:, saved_query:
119
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
120
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
121
+ raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/"
122
+
123
+ "projects/#{project}/locations/#{location}/datasets/#{dataset}/savedQueries/#{saved_query}"
124
+ end
125
+
105
126
  extend self
106
127
  end
107
128
  end
@@ -35,7 +35,7 @@ module Google
35
35
  # The service that handles the CRUD of Vertex AI Dataset and its child
36
36
  # resources.
37
37
  #
38
- # To load this service and instantiate a client:
38
+ # @example Load this service and instantiate a gRPC client
39
39
  #
40
40
  # require "google/cloud/ai_platform/v1/dataset_service"
41
41
  # client = ::Google::Cloud::AIPlatform::V1::DatasetService::Client.new
@@ -396,14 +396,15 @@ module Google
396
396
  # the default parameter values, pass an empty Hash as a request object (see above).
397
397
  #
398
398
  # @param parent [::String]
399
- # Required. The resource name of the Location from which to list the Endpoints.
400
- # Format: `projects/{project}/locations/{location}`
399
+ # Required. The resource name of the Location from which to list the
400
+ # Endpoints. Format: `projects/{project}/locations/{location}`
401
401
  # @param filter [::String]
402
- # Optional. An expression for filtering the results of the request. For field names
403
- # both snake_case and camelCase are supported.
402
+ # Optional. An expression for filtering the results of the request. For field
403
+ # names both snake_case and camelCase are supported.
404
404
  #
405
405
  # * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID,
406
- # i.e. the last segment of the Endpoint's {::Google::Cloud::AIPlatform::V1::Endpoint#name resource name}.
406
+ # i.e. the last segment of the Endpoint's [resource
407
+ # name][google.cloud.aiplatform.v1.Endpoint.name].
407
408
  # * `display_name` supports = and, !=
408
409
  # * `labels` supports general map functions that is:
409
410
  # * `labels.key=value` - key:value equality
@@ -419,8 +420,10 @@ module Google
419
420
  # @param page_token [::String]
420
421
  # Optional. The standard list page token.
421
422
  # Typically obtained via
422
- # {::Google::Cloud::AIPlatform::V1::ListEndpointsResponse#next_page_token ListEndpointsResponse.next_page_token} of the previous
423
- # {::Google::Cloud::AIPlatform::V1::EndpointService::Client#list_endpoints EndpointService.ListEndpoints} call.
423
+ # {::Google::Cloud::AIPlatform::V1::ListEndpointsResponse#next_page_token ListEndpointsResponse.next_page_token}
424
+ # of the previous
425
+ # {::Google::Cloud::AIPlatform::V1::EndpointService::Client#list_endpoints EndpointService.ListEndpoints}
426
+ # call.
424
427
  # @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
425
428
  # Optional. Mask specifying which fields to read.
426
429
  # @param order_by [::String]
@@ -525,7 +528,8 @@ module Google
525
528
  # @param endpoint [::Google::Cloud::AIPlatform::V1::Endpoint, ::Hash]
526
529
  # Required. The Endpoint which replaces the resource on the server.
527
530
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
528
- # Required. The update mask applies to the resource. See {::Google::Protobuf::FieldMask google.protobuf.FieldMask}.
531
+ # Required. The update mask applies to the resource. See
532
+ # {::Google::Protobuf::FieldMask google.protobuf.FieldMask}.
529
533
  #
530
534
  # @yield [response, operation] Access the result along with the RPC operation
531
535
  # @yieldparam response [::Google::Cloud::AIPlatform::V1::Endpoint]
@@ -710,21 +714,24 @@ module Google
710
714
  # `projects/{project}/locations/{location}/endpoints/{endpoint}`
711
715
  # @param deployed_model [::Google::Cloud::AIPlatform::V1::DeployedModel, ::Hash]
712
716
  # Required. The DeployedModel to be created within the Endpoint. Note that
713
- # {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split Endpoint.traffic_split} must be updated for the DeployedModel to start
714
- # receiving traffic, either as part of this call, or via
717
+ # {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split Endpoint.traffic_split}
718
+ # must be updated for the DeployedModel to start receiving traffic, either as
719
+ # part of this call, or via
715
720
  # {::Google::Cloud::AIPlatform::V1::EndpointService::Client#update_endpoint EndpointService.UpdateEndpoint}.
716
721
  # @param traffic_split [::Hash{::String => ::Integer}]
717
722
  # A map from a DeployedModel's ID to the percentage of this Endpoint's
718
723
  # traffic that should be forwarded to that DeployedModel.
719
724
  #
720
725
  # If this field is non-empty, then the Endpoint's
721
- # {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split traffic_split} will be overwritten with it.
722
- # To refer to the ID of the just being deployed Model, a "0" should be used,
723
- # and the actual ID of the new DeployedModel will be filled in its place by
724
- # this method. The traffic percentage values must add up to 100.
726
+ # {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split traffic_split} will be
727
+ # overwritten with it. To refer to the ID of the just being deployed Model, a
728
+ # "0" should be used, and the actual ID of the new DeployedModel will be
729
+ # filled in its place by this method. The traffic percentage values must add
730
+ # up to 100.
725
731
  #
726
732
  # If this field is empty, then the Endpoint's
727
- # {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split traffic_split} is not updated.
733
+ # {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split traffic_split} is not
734
+ # updated.
728
735
  #
729
736
  # @yield [response, operation] Access the result along with the RPC operation
730
737
  # @yieldparam response [::Gapic::Operation]
@@ -825,12 +832,12 @@ module Google
825
832
  # Required. The ID of the DeployedModel to be undeployed from the Endpoint.
826
833
  # @param traffic_split [::Hash{::String => ::Integer}]
827
834
  # If this field is provided, then the Endpoint's
828
- # {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split traffic_split} will be overwritten with it. If
829
- # last DeployedModel is being undeployed from the Endpoint, the
830
- # [Endpoint.traffic_split] will always end up empty when this call returns.
831
- # A DeployedModel will be successfully undeployed only if it doesn't have
832
- # any traffic assigned to it when this method executes, or if this field
833
- # unassigns any traffic to it.
835
+ # {::Google::Cloud::AIPlatform::V1::Endpoint#traffic_split traffic_split} will be
836
+ # overwritten with it. If last DeployedModel is being undeployed from the
837
+ # Endpoint, the [Endpoint.traffic_split] will always end up empty when this
838
+ # call returns. A DeployedModel will be successfully undeployed only if it
839
+ # doesn't have any traffic assigned to it when this method executes, or if
840
+ # this field unassigns any traffic to it.
834
841
  #
835
842
  # @yield [response, operation] Access the result along with the RPC operation
836
843
  # @yieldparam response [::Gapic::Operation]
@@ -34,7 +34,7 @@ module Google
34
34
  ##
35
35
  # A service for managing Vertex AI's Endpoints.
36
36
  #
37
- # To load this service and instantiate a client:
37
+ # @example Load this service and instantiate a gRPC client
38
38
  #
39
39
  # require "google/cloud/ai_platform/v1/endpoint_service"
40
40
  # client = ::Google::Cloud::AIPlatform::V1::EndpointService::Client.new
@@ -297,12 +297,12 @@ module Google
297
297
  # for a machine learning model predicting user clicks on a website, an
298
298
  # EntityType ID could be `user`.
299
299
  # @param entity_ids [::Array<::String>]
300
- # Required. IDs of entities to read Feature values of. The maximum number of IDs is
301
- # 100. For example, for a machine learning model predicting user clicks on a
302
- # website, an entity ID could be `user_123`.
300
+ # Required. IDs of entities to read Feature values of. The maximum number of
301
+ # IDs is 100. For example, for a machine learning model predicting user
302
+ # clicks on a website, an entity ID could be `user_123`.
303
303
  # @param feature_selector [::Google::Cloud::AIPlatform::V1::FeatureSelector, ::Hash]
304
- # Required. Selector choosing Features of the target EntityType. Feature IDs will be
305
- # deduplicated.
304
+ # Required. Selector choosing Features of the target EntityType. Feature IDs
305
+ # will be deduplicated.
306
306
  #
307
307
  # @yield [response, operation] Access the result along with the RPC operation
308
308
  # @yieldparam response [::Enumerable<::Google::Cloud::AIPlatform::V1::ReadFeatureValuesResponse>]
@@ -371,6 +371,103 @@ module Google
371
371
  raise ::Google::Cloud::Error.from_error(e)
372
372
  end
373
373
 
374
+ ##
375
+ # Writes Feature values of one or more entities of an EntityType.
376
+ #
377
+ # The Feature values are merged into existing entities if any. The Feature
378
+ # values to be written must have timestamp within the online storage
379
+ # retention.
380
+ #
381
+ # @overload write_feature_values(request, options = nil)
382
+ # Pass arguments to `write_feature_values` via a request object, either of type
383
+ # {::Google::Cloud::AIPlatform::V1::WriteFeatureValuesRequest} or an equivalent Hash.
384
+ #
385
+ # @param request [::Google::Cloud::AIPlatform::V1::WriteFeatureValuesRequest, ::Hash]
386
+ # A request object representing the call parameters. Required. To specify no
387
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
388
+ # @param options [::Gapic::CallOptions, ::Hash]
389
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
390
+ #
391
+ # @overload write_feature_values(entity_type: nil, payloads: nil)
392
+ # Pass arguments to `write_feature_values` via keyword arguments. Note that at
393
+ # least one keyword argument is required. To specify no parameters, or to keep all
394
+ # the default parameter values, pass an empty Hash as a request object (see above).
395
+ #
396
+ # @param entity_type [::String]
397
+ # Required. The resource name of the EntityType for the entities being
398
+ # written. Value format:
399
+ # `projects/{project}/locations/{location}/featurestores/
400
+ # \\{featurestore}/entityTypes/\\{entityType}`. For example,
401
+ # for a machine learning model predicting user clicks on a website, an
402
+ # EntityType ID could be `user`.
403
+ # @param payloads [::Array<::Google::Cloud::AIPlatform::V1::WriteFeatureValuesPayload, ::Hash>]
404
+ # Required. The entities to be written. Up to 100,000 feature values can be
405
+ # written across all `payloads`.
406
+ #
407
+ # @yield [response, operation] Access the result along with the RPC operation
408
+ # @yieldparam response [::Google::Cloud::AIPlatform::V1::WriteFeatureValuesResponse]
409
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
410
+ #
411
+ # @return [::Google::Cloud::AIPlatform::V1::WriteFeatureValuesResponse]
412
+ #
413
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
414
+ #
415
+ # @example Basic example
416
+ # require "google/cloud/ai_platform/v1"
417
+ #
418
+ # # Create a client object. The client can be reused for multiple calls.
419
+ # client = Google::Cloud::AIPlatform::V1::FeaturestoreOnlineServingService::Client.new
420
+ #
421
+ # # Create a request. To set request fields, pass in keyword arguments.
422
+ # request = Google::Cloud::AIPlatform::V1::WriteFeatureValuesRequest.new
423
+ #
424
+ # # Call the write_feature_values method.
425
+ # result = client.write_feature_values request
426
+ #
427
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::WriteFeatureValuesResponse.
428
+ # p result
429
+ #
430
+ def write_feature_values request, options = nil
431
+ raise ::ArgumentError, "request must be provided" if request.nil?
432
+
433
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::WriteFeatureValuesRequest
434
+
435
+ # Converts hash and nil to an options object
436
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
437
+
438
+ # Customize the options with defaults
439
+ metadata = @config.rpcs.write_feature_values.metadata.to_h
440
+
441
+ # Set x-goog-api-client and x-goog-user-project headers
442
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
443
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
444
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
445
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
446
+
447
+ header_params = {}
448
+ if request.entity_type
449
+ header_params["entity_type"] = request.entity_type
450
+ end
451
+
452
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
453
+ metadata[:"x-goog-request-params"] ||= request_params_header
454
+
455
+ options.apply_defaults timeout: @config.rpcs.write_feature_values.timeout,
456
+ metadata: metadata,
457
+ retry_policy: @config.rpcs.write_feature_values.retry_policy
458
+
459
+ options.apply_defaults timeout: @config.timeout,
460
+ metadata: @config.metadata,
461
+ retry_policy: @config.retry_policy
462
+
463
+ @featurestore_online_serving_service_stub.call_rpc :write_feature_values, request, options: options do |response, operation|
464
+ yield response, operation if block_given?
465
+ return response
466
+ end
467
+ rescue ::GRPC::BadStatus => e
468
+ raise ::Google::Cloud::Error.from_error(e)
469
+ end
470
+
374
471
  ##
375
472
  # Configuration class for the FeaturestoreOnlineServingService API.
376
473
  #
@@ -516,6 +613,11 @@ module Google
516
613
  # @return [::Gapic::Config::Method]
517
614
  #
518
615
  attr_reader :streaming_read_feature_values
616
+ ##
617
+ # RPC-specific configuration for `write_feature_values`
618
+ # @return [::Gapic::Config::Method]
619
+ #
620
+ attr_reader :write_feature_values
519
621
 
520
622
  # @private
521
623
  def initialize parent_rpcs = nil
@@ -523,6 +625,8 @@ module Google
523
625
  @read_feature_values = ::Gapic::Config::Method.new read_feature_values_config
524
626
  streaming_read_feature_values_config = parent_rpcs.streaming_read_feature_values if parent_rpcs.respond_to? :streaming_read_feature_values
525
627
  @streaming_read_feature_values = ::Gapic::Config::Method.new streaming_read_feature_values_config
628
+ write_feature_values_config = parent_rpcs.write_feature_values if parent_rpcs.respond_to? :write_feature_values
629
+ @write_feature_values = ::Gapic::Config::Method.new write_feature_values_config
526
630
 
527
631
  yield self if block_given?
528
632
  end
@@ -33,7 +33,7 @@ module Google
33
33
  ##
34
34
  # A service for serving online feature values.
35
35
  #
36
- # To load this service and instantiate a client:
36
+ # @example Load this service and instantiate a gRPC client
37
37
  #
38
38
  # require "google/cloud/ai_platform/v1/featurestore_online_serving_service"
39
39
  # client = ::Google::Cloud::AIPlatform::V1::FeaturestoreOnlineServingService::Client.new