google-cloud-ai_platform-v1 0.55.0 → 0.56.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 (25) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +111 -1
  3. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +104 -1
  4. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/service_stub.rb +60 -0
  5. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +7 -6
  6. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +7 -6
  7. data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +104 -0
  8. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +97 -0
  9. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +60 -0
  10. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  11. data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +1 -1
  12. data/lib/google/cloud/aiplatform/v1/feature_registry_service_pb.rb +1 -1
  13. data/lib/google/cloud/aiplatform/v1/feature_registry_service_services_pb.rb +2 -0
  14. data/lib/google/cloud/aiplatform/v1/featurestore_service_pb.rb +1 -1
  15. data/lib/google/cloud/aiplatform/v1/notebook_service_pb.rb +4 -1
  16. data/lib/google/cloud/aiplatform/v1/notebook_service_services_pb.rb +2 -0
  17. data/lib/google/cloud/aiplatform/v1/tool_pb.rb +1 -1
  18. data/proto_docs/google/api/client.rb +6 -0
  19. data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +13 -0
  20. data/proto_docs/google/cloud/aiplatform/v1/feature_registry_service.rb +1 -1
  21. data/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb +9 -6
  22. data/proto_docs/google/cloud/aiplatform/v1/notebook_service.rb +30 -0
  23. data/proto_docs/google/cloud/aiplatform/v1/openapi.rb +6 -3
  24. data/proto_docs/google/cloud/aiplatform/v1/tool.rb +12 -4
  25. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 292afb58f3cdf4ff9b22dbbc1ca24184910ed35aff12f3b2788d131d594c4f72
4
- data.tar.gz: 7a0fd8ad2d6c4cc1708b03a0ad6cb8463ce464a69c8ff3f26c0c9c215a66d0e4
3
+ metadata.gz: c216c1d77f12c3de06e07ae0561e027d1e13944c6a6188ba452b9ce63ee1f75d
4
+ data.tar.gz: 46ef4d8af087c9e28b01825dbc28381e2d0a639049af957411a1682e08573260
5
5
  SHA512:
6
- metadata.gz: e29510b89343e267a882cdf9d2f83ffd901e5317c223472d598065a328291db04c9df721aba7461c7b4a6d687a7fb2481c2e812ad5484bb51602ebe71c40f832
7
- data.tar.gz: 8fd987400b2a37917694c9dbafebca57f2cde883519e0c02d9de26fd60c826495c3ff1bfd398cbc8bd830bc81e60d9de7d5cfe4727584fb38588f97ab045a1d7
6
+ metadata.gz: 1c05f3acbbc6ec0639effe7751b2ddead1fedf02f3ccad6d09c3b71d1683f70824166c30e3a056c27b9f7361d90d015abf3bd65eefe90d13e17a985dfa096ab8
7
+ data.tar.gz: afcfcbad50fc84c6a2304c6f9d5f84b3847c756be5adbcbe44a9de6226849c3a204c5c23d2b769e9f352ae025ec2f6ed0316113565aa4396b14c739ef3eb1a8d
@@ -236,7 +236,7 @@ module Google
236
236
  # Required. The ID to use for this FeatureGroup, which will become the final
237
237
  # component of the FeatureGroup's resource name.
238
238
  #
239
- # This value may be up to 60 characters, and valid characters are
239
+ # This value may be up to 128 characters, and valid characters are
240
240
  # `[a-z0-9_]`. The first character cannot be a number.
241
241
  #
242
242
  # The value must be unique within the project and location.
@@ -850,6 +850,109 @@ module Google
850
850
  raise ::Google::Cloud::Error.from_error(e)
851
851
  end
852
852
 
853
+ ##
854
+ # Creates a batch of Features in a given FeatureGroup.
855
+ #
856
+ # @overload batch_create_features(request, options = nil)
857
+ # Pass arguments to `batch_create_features` via a request object, either of type
858
+ # {::Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest} or an equivalent Hash.
859
+ #
860
+ # @param request [::Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest, ::Hash]
861
+ # A request object representing the call parameters. Required. To specify no
862
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
863
+ # @param options [::Gapic::CallOptions, ::Hash]
864
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
865
+ #
866
+ # @overload batch_create_features(parent: nil, requests: nil)
867
+ # Pass arguments to `batch_create_features` via keyword arguments. Note that at
868
+ # least one keyword argument is required. To specify no parameters, or to keep all
869
+ # the default parameter values, pass an empty Hash as a request object (see above).
870
+ #
871
+ # @param parent [::String]
872
+ # Required. The resource name of the EntityType/FeatureGroup to create the
873
+ # batch of Features under. Format:
874
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
875
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}`
876
+ # @param requests [::Array<::Google::Cloud::AIPlatform::V1::CreateFeatureRequest, ::Hash>]
877
+ # Required. The request message specifying the Features to create. All
878
+ # Features must be created under the same parent EntityType / FeatureGroup.
879
+ # The `parent` field in each child request message can be omitted. If
880
+ # `parent` is set in a child request, then the value must match the `parent`
881
+ # value in this request message.
882
+ #
883
+ # @yield [response, operation] Access the result along with the RPC operation
884
+ # @yieldparam response [::Gapic::Operation]
885
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
886
+ #
887
+ # @return [::Gapic::Operation]
888
+ #
889
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
890
+ #
891
+ # @example Basic example
892
+ # require "google/cloud/ai_platform/v1"
893
+ #
894
+ # # Create a client object. The client can be reused for multiple calls.
895
+ # client = Google::Cloud::AIPlatform::V1::FeatureRegistryService::Client.new
896
+ #
897
+ # # Create a request. To set request fields, pass in keyword arguments.
898
+ # request = Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest.new
899
+ #
900
+ # # Call the batch_create_features method.
901
+ # result = client.batch_create_features request
902
+ #
903
+ # # The returned object is of type Gapic::Operation. You can use it to
904
+ # # check the status of an operation, cancel it, or wait for results.
905
+ # # Here is how to wait for a response.
906
+ # result.wait_until_done! timeout: 60
907
+ # if result.response?
908
+ # p result.response
909
+ # else
910
+ # puts "No response received."
911
+ # end
912
+ #
913
+ def batch_create_features request, options = nil
914
+ raise ::ArgumentError, "request must be provided" if request.nil?
915
+
916
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest
917
+
918
+ # Converts hash and nil to an options object
919
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
920
+
921
+ # Customize the options with defaults
922
+ metadata = @config.rpcs.batch_create_features.metadata.to_h
923
+
924
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
925
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
926
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
927
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
928
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
929
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
930
+
931
+ header_params = {}
932
+ if request.parent
933
+ header_params["parent"] = request.parent
934
+ end
935
+
936
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
937
+ metadata[:"x-goog-request-params"] ||= request_params_header
938
+
939
+ options.apply_defaults timeout: @config.rpcs.batch_create_features.timeout,
940
+ metadata: metadata,
941
+ retry_policy: @config.rpcs.batch_create_features.retry_policy
942
+
943
+ options.apply_defaults timeout: @config.timeout,
944
+ metadata: @config.metadata,
945
+ retry_policy: @config.retry_policy
946
+
947
+ @feature_registry_service_stub.call_rpc :batch_create_features, request, options: options do |response, operation|
948
+ response = ::Gapic::Operation.new response, @operations_client, options: options
949
+ yield response, operation if block_given?
950
+ return response
951
+ end
952
+ rescue ::GRPC::BadStatus => e
953
+ raise ::Google::Cloud::Error.from_error(e)
954
+ end
955
+
853
956
  ##
854
957
  # Gets details of a single Feature.
855
958
  #
@@ -1486,6 +1589,11 @@ module Google
1486
1589
  #
1487
1590
  attr_reader :create_feature
1488
1591
  ##
1592
+ # RPC-specific configuration for `batch_create_features`
1593
+ # @return [::Gapic::Config::Method]
1594
+ #
1595
+ attr_reader :batch_create_features
1596
+ ##
1489
1597
  # RPC-specific configuration for `get_feature`
1490
1598
  # @return [::Gapic::Config::Method]
1491
1599
  #
@@ -1520,6 +1628,8 @@ module Google
1520
1628
  @delete_feature_group = ::Gapic::Config::Method.new delete_feature_group_config
1521
1629
  create_feature_config = parent_rpcs.create_feature if parent_rpcs.respond_to? :create_feature
1522
1630
  @create_feature = ::Gapic::Config::Method.new create_feature_config
1631
+ batch_create_features_config = parent_rpcs.batch_create_features if parent_rpcs.respond_to? :batch_create_features
1632
+ @batch_create_features = ::Gapic::Config::Method.new batch_create_features_config
1523
1633
  get_feature_config = parent_rpcs.get_feature if parent_rpcs.respond_to? :get_feature
1524
1634
  @get_feature = ::Gapic::Config::Method.new get_feature_config
1525
1635
  list_features_config = parent_rpcs.list_features if parent_rpcs.respond_to? :list_features
@@ -231,7 +231,7 @@ module Google
231
231
  # Required. The ID to use for this FeatureGroup, which will become the final
232
232
  # component of the FeatureGroup's resource name.
233
233
  #
234
- # This value may be up to 60 characters, and valid characters are
234
+ # This value may be up to 128 characters, and valid characters are
235
235
  # `[a-z0-9_]`. The first character cannot be a number.
236
236
  #
237
237
  # The value must be unique within the project and location.
@@ -803,6 +803,102 @@ module Google
803
803
  raise ::Google::Cloud::Error.from_error(e)
804
804
  end
805
805
 
806
+ ##
807
+ # Creates a batch of Features in a given FeatureGroup.
808
+ #
809
+ # @overload batch_create_features(request, options = nil)
810
+ # Pass arguments to `batch_create_features` via a request object, either of type
811
+ # {::Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest} or an equivalent Hash.
812
+ #
813
+ # @param request [::Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest, ::Hash]
814
+ # A request object representing the call parameters. Required. To specify no
815
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
816
+ # @param options [::Gapic::CallOptions, ::Hash]
817
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
818
+ #
819
+ # @overload batch_create_features(parent: nil, requests: nil)
820
+ # Pass arguments to `batch_create_features` via keyword arguments. Note that at
821
+ # least one keyword argument is required. To specify no parameters, or to keep all
822
+ # the default parameter values, pass an empty Hash as a request object (see above).
823
+ #
824
+ # @param parent [::String]
825
+ # Required. The resource name of the EntityType/FeatureGroup to create the
826
+ # batch of Features under. Format:
827
+ # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
828
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}`
829
+ # @param requests [::Array<::Google::Cloud::AIPlatform::V1::CreateFeatureRequest, ::Hash>]
830
+ # Required. The request message specifying the Features to create. All
831
+ # Features must be created under the same parent EntityType / FeatureGroup.
832
+ # The `parent` field in each child request message can be omitted. If
833
+ # `parent` is set in a child request, then the value must match the `parent`
834
+ # value in this request message.
835
+ # @yield [result, operation] Access the result along with the TransportOperation object
836
+ # @yieldparam result [::Gapic::Operation]
837
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
838
+ #
839
+ # @return [::Gapic::Operation]
840
+ #
841
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
842
+ #
843
+ # @example Basic example
844
+ # require "google/cloud/ai_platform/v1"
845
+ #
846
+ # # Create a client object. The client can be reused for multiple calls.
847
+ # client = Google::Cloud::AIPlatform::V1::FeatureRegistryService::Rest::Client.new
848
+ #
849
+ # # Create a request. To set request fields, pass in keyword arguments.
850
+ # request = Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest.new
851
+ #
852
+ # # Call the batch_create_features method.
853
+ # result = client.batch_create_features request
854
+ #
855
+ # # The returned object is of type Gapic::Operation. You can use it to
856
+ # # check the status of an operation, cancel it, or wait for results.
857
+ # # Here is how to wait for a response.
858
+ # result.wait_until_done! timeout: 60
859
+ # if result.response?
860
+ # p result.response
861
+ # else
862
+ # puts "No response received."
863
+ # end
864
+ #
865
+ def batch_create_features request, options = nil
866
+ raise ::ArgumentError, "request must be provided" if request.nil?
867
+
868
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest
869
+
870
+ # Converts hash and nil to an options object
871
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
872
+
873
+ # Customize the options with defaults
874
+ call_metadata = @config.rpcs.batch_create_features.metadata.to_h
875
+
876
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
877
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
878
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
879
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
880
+ transports_version_send: [:rest]
881
+
882
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
883
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
884
+
885
+ options.apply_defaults timeout: @config.rpcs.batch_create_features.timeout,
886
+ metadata: call_metadata,
887
+ retry_policy: @config.rpcs.batch_create_features.retry_policy
888
+
889
+ options.apply_defaults timeout: @config.timeout,
890
+ metadata: @config.metadata,
891
+ retry_policy: @config.retry_policy
892
+
893
+ @feature_registry_service_stub.batch_create_features request, options do |result, operation|
894
+ result = ::Gapic::Operation.new result, @operations_client, options: options
895
+ yield result, operation if block_given?
896
+ return result
897
+ end
898
+ rescue ::Gapic::Rest::Error => e
899
+ raise ::Google::Cloud::Error.from_error(e)
900
+ end
901
+
806
902
  ##
807
903
  # Gets details of a single Feature.
808
904
  #
@@ -1398,6 +1494,11 @@ module Google
1398
1494
  #
1399
1495
  attr_reader :create_feature
1400
1496
  ##
1497
+ # RPC-specific configuration for `batch_create_features`
1498
+ # @return [::Gapic::Config::Method]
1499
+ #
1500
+ attr_reader :batch_create_features
1501
+ ##
1401
1502
  # RPC-specific configuration for `get_feature`
1402
1503
  # @return [::Gapic::Config::Method]
1403
1504
  #
@@ -1432,6 +1533,8 @@ module Google
1432
1533
  @delete_feature_group = ::Gapic::Config::Method.new delete_feature_group_config
1433
1534
  create_feature_config = parent_rpcs.create_feature if parent_rpcs.respond_to? :create_feature
1434
1535
  @create_feature = ::Gapic::Config::Method.new create_feature_config
1536
+ batch_create_features_config = parent_rpcs.batch_create_features if parent_rpcs.respond_to? :batch_create_features
1537
+ @batch_create_features = ::Gapic::Config::Method.new batch_create_features_config
1435
1538
  get_feature_config = parent_rpcs.get_feature if parent_rpcs.respond_to? :get_feature
1436
1539
  @get_feature = ::Gapic::Config::Method.new get_feature_config
1437
1540
  list_features_config = parent_rpcs.list_features if parent_rpcs.respond_to? :list_features
@@ -289,6 +289,44 @@ module Google
289
289
  result
290
290
  end
291
291
 
292
+ ##
293
+ # Baseline implementation for the batch_create_features REST call
294
+ #
295
+ # @param request_pb [::Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest]
296
+ # A request object representing the call parameters. Required.
297
+ # @param options [::Gapic::CallOptions]
298
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
299
+ #
300
+ # @yield [result, operation] Access the result along with the TransportOperation object
301
+ # @yieldparam result [::Google::Longrunning::Operation]
302
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
303
+ #
304
+ # @return [::Google::Longrunning::Operation]
305
+ # A result object deserialized from the server's reply
306
+ def batch_create_features request_pb, options = nil
307
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
308
+
309
+ verb, uri, query_string_params, body = ServiceStub.transcode_batch_create_features_request request_pb
310
+ query_string_params = if query_string_params.any?
311
+ query_string_params.to_h { |p| p.split "=", 2 }
312
+ else
313
+ {}
314
+ end
315
+
316
+ response = @client_stub.make_http_request(
317
+ verb,
318
+ uri: uri,
319
+ body: body || "",
320
+ params: query_string_params,
321
+ options: options
322
+ )
323
+ operation = ::Gapic::Rest::TransportOperation.new response
324
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
325
+
326
+ yield result, operation if block_given?
327
+ result
328
+ end
329
+
292
330
  ##
293
331
  # Baseline implementation for the get_feature REST call
294
332
  #
@@ -570,6 +608,28 @@ module Google
570
608
  transcoder.transcode request_pb
571
609
  end
572
610
 
611
+ ##
612
+ # @private
613
+ #
614
+ # GRPC transcoding helper method for the batch_create_features REST call
615
+ #
616
+ # @param request_pb [::Google::Cloud::AIPlatform::V1::BatchCreateFeaturesRequest]
617
+ # A request object representing the call parameters. Required.
618
+ # @return [Array(String, [String, nil], Hash{String => String})]
619
+ # Uri, Body, Query string parameters
620
+ def self.transcode_batch_create_features_request request_pb
621
+ transcoder = Gapic::Rest::GrpcTranscoder.new
622
+ .with_bindings(
623
+ uri_method: :post,
624
+ uri_template: "/v1/{parent}/features:batchCreate",
625
+ body: "*",
626
+ matches: [
627
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/featureGroups/[^/]+/?$}, false]
628
+ ]
629
+ )
630
+ transcoder.transcode request_pb
631
+ end
632
+
573
633
  ##
574
634
  # @private
575
635
  #
@@ -1413,15 +1413,16 @@ module Google
1413
1413
  # the default parameter values, pass an empty Hash as a request object (see above).
1414
1414
  #
1415
1415
  # @param parent [::String]
1416
- # Required. The resource name of the EntityType to create the batch of
1417
- # Features under. Format:
1416
+ # Required. The resource name of the EntityType/FeatureGroup to create the
1417
+ # batch of Features under. Format:
1418
1418
  # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
1419
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}`
1419
1420
  # @param requests [::Array<::Google::Cloud::AIPlatform::V1::CreateFeatureRequest, ::Hash>]
1420
1421
  # Required. The request message specifying the Features to create. All
1421
- # Features must be created under the same parent EntityType. The `parent`
1422
- # field in each child request message can be omitted. If `parent` is set in a
1423
- # child request, then the value must match the `parent` value in this request
1424
- # message.
1422
+ # Features must be created under the same parent EntityType / FeatureGroup.
1423
+ # The `parent` field in each child request message can be omitted. If
1424
+ # `parent` is set in a child request, then the value must match the `parent`
1425
+ # value in this request message.
1425
1426
  #
1426
1427
  # @yield [response, operation] Access the result along with the RPC operation
1427
1428
  # @yieldparam response [::Gapic::Operation]
@@ -1331,15 +1331,16 @@ module Google
1331
1331
  # the default parameter values, pass an empty Hash as a request object (see above).
1332
1332
  #
1333
1333
  # @param parent [::String]
1334
- # Required. The resource name of the EntityType to create the batch of
1335
- # Features under. Format:
1334
+ # Required. The resource name of the EntityType/FeatureGroup to create the
1335
+ # batch of Features under. Format:
1336
1336
  # `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`
1337
+ # `projects/{project}/locations/{location}/featureGroups/{feature_group}`
1337
1338
  # @param requests [::Array<::Google::Cloud::AIPlatform::V1::CreateFeatureRequest, ::Hash>]
1338
1339
  # Required. The request message specifying the Features to create. All
1339
- # Features must be created under the same parent EntityType. The `parent`
1340
- # field in each child request message can be omitted. If `parent` is set in a
1341
- # child request, then the value must match the `parent` value in this request
1342
- # message.
1340
+ # Features must be created under the same parent EntityType / FeatureGroup.
1341
+ # The `parent` field in each child request message can be omitted. If
1342
+ # `parent` is set in a child request, then the value must match the `parent`
1343
+ # value in this request message.
1343
1344
  # @yield [result, operation] Access the result along with the TransportOperation object
1344
1345
  # @yieldparam result [::Gapic::Operation]
1345
1346
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -1351,6 +1351,103 @@ module Google
1351
1351
  raise ::Google::Cloud::Error.from_error(e)
1352
1352
  end
1353
1353
 
1354
+ ##
1355
+ # Stops a NotebookRuntime.
1356
+ #
1357
+ # @overload stop_notebook_runtime(request, options = nil)
1358
+ # Pass arguments to `stop_notebook_runtime` via a request object, either of type
1359
+ # {::Google::Cloud::AIPlatform::V1::StopNotebookRuntimeRequest} or an equivalent Hash.
1360
+ #
1361
+ # @param request [::Google::Cloud::AIPlatform::V1::StopNotebookRuntimeRequest, ::Hash]
1362
+ # A request object representing the call parameters. Required. To specify no
1363
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1364
+ # @param options [::Gapic::CallOptions, ::Hash]
1365
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1366
+ #
1367
+ # @overload stop_notebook_runtime(name: nil)
1368
+ # Pass arguments to `stop_notebook_runtime` via keyword arguments. Note that at
1369
+ # least one keyword argument is required. To specify no parameters, or to keep all
1370
+ # the default parameter values, pass an empty Hash as a request object (see above).
1371
+ #
1372
+ # @param name [::String]
1373
+ # Required. The name of the NotebookRuntime resource to be stopped.
1374
+ # Instead of checking whether the name is in valid NotebookRuntime resource
1375
+ # name format, directly throw NotFound exception if there is no such
1376
+ # NotebookRuntime in spanner.
1377
+ #
1378
+ # @yield [response, operation] Access the result along with the RPC operation
1379
+ # @yieldparam response [::Gapic::Operation]
1380
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1381
+ #
1382
+ # @return [::Gapic::Operation]
1383
+ #
1384
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1385
+ #
1386
+ # @example Basic example
1387
+ # require "google/cloud/ai_platform/v1"
1388
+ #
1389
+ # # Create a client object. The client can be reused for multiple calls.
1390
+ # client = Google::Cloud::AIPlatform::V1::NotebookService::Client.new
1391
+ #
1392
+ # # Create a request. To set request fields, pass in keyword arguments.
1393
+ # request = Google::Cloud::AIPlatform::V1::StopNotebookRuntimeRequest.new
1394
+ #
1395
+ # # Call the stop_notebook_runtime method.
1396
+ # result = client.stop_notebook_runtime request
1397
+ #
1398
+ # # The returned object is of type Gapic::Operation. You can use it to
1399
+ # # check the status of an operation, cancel it, or wait for results.
1400
+ # # Here is how to wait for a response.
1401
+ # result.wait_until_done! timeout: 60
1402
+ # if result.response?
1403
+ # p result.response
1404
+ # else
1405
+ # puts "No response received."
1406
+ # end
1407
+ #
1408
+ def stop_notebook_runtime request, options = nil
1409
+ raise ::ArgumentError, "request must be provided" if request.nil?
1410
+
1411
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::StopNotebookRuntimeRequest
1412
+
1413
+ # Converts hash and nil to an options object
1414
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1415
+
1416
+ # Customize the options with defaults
1417
+ metadata = @config.rpcs.stop_notebook_runtime.metadata.to_h
1418
+
1419
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1420
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1421
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1422
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
1423
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1424
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1425
+
1426
+ header_params = {}
1427
+ if request.name
1428
+ header_params["name"] = request.name
1429
+ end
1430
+
1431
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1432
+ metadata[:"x-goog-request-params"] ||= request_params_header
1433
+
1434
+ options.apply_defaults timeout: @config.rpcs.stop_notebook_runtime.timeout,
1435
+ metadata: metadata,
1436
+ retry_policy: @config.rpcs.stop_notebook_runtime.retry_policy
1437
+
1438
+ options.apply_defaults timeout: @config.timeout,
1439
+ metadata: @config.metadata,
1440
+ retry_policy: @config.retry_policy
1441
+
1442
+ @notebook_service_stub.call_rpc :stop_notebook_runtime, request, options: options do |response, operation|
1443
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1444
+ yield response, operation if block_given?
1445
+ return response
1446
+ end
1447
+ rescue ::GRPC::BadStatus => e
1448
+ raise ::Google::Cloud::Error.from_error(e)
1449
+ end
1450
+
1354
1451
  ##
1355
1452
  # Creates a NotebookExecutionJob.
1356
1453
  #
@@ -1966,6 +2063,11 @@ module Google
1966
2063
  #
1967
2064
  attr_reader :start_notebook_runtime
1968
2065
  ##
2066
+ # RPC-specific configuration for `stop_notebook_runtime`
2067
+ # @return [::Gapic::Config::Method]
2068
+ #
2069
+ attr_reader :stop_notebook_runtime
2070
+ ##
1969
2071
  # RPC-specific configuration for `create_notebook_execution_job`
1970
2072
  # @return [::Gapic::Config::Method]
1971
2073
  #
@@ -2010,6 +2112,8 @@ module Google
2010
2112
  @upgrade_notebook_runtime = ::Gapic::Config::Method.new upgrade_notebook_runtime_config
2011
2113
  start_notebook_runtime_config = parent_rpcs.start_notebook_runtime if parent_rpcs.respond_to? :start_notebook_runtime
2012
2114
  @start_notebook_runtime = ::Gapic::Config::Method.new start_notebook_runtime_config
2115
+ stop_notebook_runtime_config = parent_rpcs.stop_notebook_runtime if parent_rpcs.respond_to? :stop_notebook_runtime
2116
+ @stop_notebook_runtime = ::Gapic::Config::Method.new stop_notebook_runtime_config
2013
2117
  create_notebook_execution_job_config = parent_rpcs.create_notebook_execution_job if parent_rpcs.respond_to? :create_notebook_execution_job
2014
2118
  @create_notebook_execution_job = ::Gapic::Config::Method.new create_notebook_execution_job_config
2015
2119
  get_notebook_execution_job_config = parent_rpcs.get_notebook_execution_job if parent_rpcs.respond_to? :get_notebook_execution_job
@@ -1269,6 +1269,96 @@ module Google
1269
1269
  raise ::Google::Cloud::Error.from_error(e)
1270
1270
  end
1271
1271
 
1272
+ ##
1273
+ # Stops a NotebookRuntime.
1274
+ #
1275
+ # @overload stop_notebook_runtime(request, options = nil)
1276
+ # Pass arguments to `stop_notebook_runtime` via a request object, either of type
1277
+ # {::Google::Cloud::AIPlatform::V1::StopNotebookRuntimeRequest} or an equivalent Hash.
1278
+ #
1279
+ # @param request [::Google::Cloud::AIPlatform::V1::StopNotebookRuntimeRequest, ::Hash]
1280
+ # A request object representing the call parameters. Required. To specify no
1281
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1282
+ # @param options [::Gapic::CallOptions, ::Hash]
1283
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1284
+ #
1285
+ # @overload stop_notebook_runtime(name: nil)
1286
+ # Pass arguments to `stop_notebook_runtime` via keyword arguments. Note that at
1287
+ # least one keyword argument is required. To specify no parameters, or to keep all
1288
+ # the default parameter values, pass an empty Hash as a request object (see above).
1289
+ #
1290
+ # @param name [::String]
1291
+ # Required. The name of the NotebookRuntime resource to be stopped.
1292
+ # Instead of checking whether the name is in valid NotebookRuntime resource
1293
+ # name format, directly throw NotFound exception if there is no such
1294
+ # NotebookRuntime in spanner.
1295
+ # @yield [result, operation] Access the result along with the TransportOperation object
1296
+ # @yieldparam result [::Gapic::Operation]
1297
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1298
+ #
1299
+ # @return [::Gapic::Operation]
1300
+ #
1301
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1302
+ #
1303
+ # @example Basic example
1304
+ # require "google/cloud/ai_platform/v1"
1305
+ #
1306
+ # # Create a client object. The client can be reused for multiple calls.
1307
+ # client = Google::Cloud::AIPlatform::V1::NotebookService::Rest::Client.new
1308
+ #
1309
+ # # Create a request. To set request fields, pass in keyword arguments.
1310
+ # request = Google::Cloud::AIPlatform::V1::StopNotebookRuntimeRequest.new
1311
+ #
1312
+ # # Call the stop_notebook_runtime method.
1313
+ # result = client.stop_notebook_runtime request
1314
+ #
1315
+ # # The returned object is of type Gapic::Operation. You can use it to
1316
+ # # check the status of an operation, cancel it, or wait for results.
1317
+ # # Here is how to wait for a response.
1318
+ # result.wait_until_done! timeout: 60
1319
+ # if result.response?
1320
+ # p result.response
1321
+ # else
1322
+ # puts "No response received."
1323
+ # end
1324
+ #
1325
+ def stop_notebook_runtime request, options = nil
1326
+ raise ::ArgumentError, "request must be provided" if request.nil?
1327
+
1328
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::StopNotebookRuntimeRequest
1329
+
1330
+ # Converts hash and nil to an options object
1331
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1332
+
1333
+ # Customize the options with defaults
1334
+ call_metadata = @config.rpcs.stop_notebook_runtime.metadata.to_h
1335
+
1336
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1337
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1338
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1339
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1340
+ transports_version_send: [:rest]
1341
+
1342
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1343
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1344
+
1345
+ options.apply_defaults timeout: @config.rpcs.stop_notebook_runtime.timeout,
1346
+ metadata: call_metadata,
1347
+ retry_policy: @config.rpcs.stop_notebook_runtime.retry_policy
1348
+
1349
+ options.apply_defaults timeout: @config.timeout,
1350
+ metadata: @config.metadata,
1351
+ retry_policy: @config.retry_policy
1352
+
1353
+ @notebook_service_stub.stop_notebook_runtime request, options do |result, operation|
1354
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1355
+ yield result, operation if block_given?
1356
+ return result
1357
+ end
1358
+ rescue ::Gapic::Rest::Error => e
1359
+ raise ::Google::Cloud::Error.from_error(e)
1360
+ end
1361
+
1272
1362
  ##
1273
1363
  # Creates a NotebookExecutionJob.
1274
1364
  #
@@ -1843,6 +1933,11 @@ module Google
1843
1933
  #
1844
1934
  attr_reader :start_notebook_runtime
1845
1935
  ##
1936
+ # RPC-specific configuration for `stop_notebook_runtime`
1937
+ # @return [::Gapic::Config::Method]
1938
+ #
1939
+ attr_reader :stop_notebook_runtime
1940
+ ##
1846
1941
  # RPC-specific configuration for `create_notebook_execution_job`
1847
1942
  # @return [::Gapic::Config::Method]
1848
1943
  #
@@ -1887,6 +1982,8 @@ module Google
1887
1982
  @upgrade_notebook_runtime = ::Gapic::Config::Method.new upgrade_notebook_runtime_config
1888
1983
  start_notebook_runtime_config = parent_rpcs.start_notebook_runtime if parent_rpcs.respond_to? :start_notebook_runtime
1889
1984
  @start_notebook_runtime = ::Gapic::Config::Method.new start_notebook_runtime_config
1985
+ stop_notebook_runtime_config = parent_rpcs.stop_notebook_runtime if parent_rpcs.respond_to? :stop_notebook_runtime
1986
+ @stop_notebook_runtime = ::Gapic::Config::Method.new stop_notebook_runtime_config
1890
1987
  create_notebook_execution_job_config = parent_rpcs.create_notebook_execution_job if parent_rpcs.respond_to? :create_notebook_execution_job
1891
1988
  @create_notebook_execution_job = ::Gapic::Config::Method.new create_notebook_execution_job_config
1892
1989
  get_notebook_execution_job_config = parent_rpcs.get_notebook_execution_job if parent_rpcs.respond_to? :get_notebook_execution_job