google-cloud-bigtable-admin-v2 1.7.0 → 1.8.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.
@@ -318,7 +318,6 @@ module Google
318
318
  # cluster ID, e.g., just `mycluster` rather than
319
319
  # `projects/myproject/instances/myinstance/clusters/mycluster`.
320
320
  # Fields marked `OutputOnly` must be left blank.
321
- # Currently, at most four clusters can be specified.
322
321
  #
323
322
  # @yield [response, operation] Access the result along with the RPC operation
324
323
  # @yieldparam response [::Gapic::Operation]
@@ -582,7 +581,7 @@ module Google
582
581
  # @param options [::Gapic::CallOptions, ::Hash]
583
582
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
584
583
  #
585
- # @overload update_instance(name: nil, display_name: nil, state: nil, type: nil, labels: nil)
584
+ # @overload update_instance(name: nil, display_name: nil, type: nil, labels: nil)
586
585
  # Pass arguments to `update_instance` via keyword arguments. Note that at
587
586
  # least one keyword argument is required. To specify no parameters, or to keep all
588
587
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -594,9 +593,6 @@ module Google
594
593
  # Required. The descriptive name for this instance as it appears in UIs.
595
594
  # Can be changed at any time, but should be kept globally unique
596
595
  # to avoid confusion.
597
- # @param state [::Google::Cloud::Bigtable::Admin::V2::Instance::State]
598
- # (`OutputOnly`)
599
- # The current state of the instance.
600
596
  # @param type [::Google::Cloud::Bigtable::Admin::V2::Instance::Type]
601
597
  # The type of the instance. Defaults to `PRODUCTION`.
602
598
  # @param labels [::Hash{::String => ::String}]
@@ -1176,8 +1172,9 @@ module Google
1176
1172
  # cluster. Currently only zones are supported, so values should be of the
1177
1173
  # form `projects/{project}/locations/{zone}`.
1178
1174
  # @param serve_nodes [::Integer]
1179
- # The number of nodes allocated to this cluster. More nodes enable higher
1180
- # throughput and more consistent performance.
1175
+ # The number of nodes in the cluster. If no value is set,
1176
+ # Cloud Bigtable automatically allocates nodes based on your data footprint
1177
+ # and optimized for 50% storage utilization.
1181
1178
  # @param node_scaling_factor [::Google::Cloud::Bigtable::Admin::V2::Cluster::NodeScalingFactor]
1182
1179
  # Immutable. The node scaling factor of this cluster.
1183
1180
  # @param cluster_config [::Google::Cloud::Bigtable::Admin::V2::Cluster::ClusterConfig, ::Hash]
@@ -2325,6 +2322,967 @@ module Google
2325
2322
  raise ::Google::Cloud::Error.from_error(e)
2326
2323
  end
2327
2324
 
2325
+ ##
2326
+ # Creates a logical view within an instance.
2327
+ #
2328
+ # @overload create_logical_view(request, options = nil)
2329
+ # Pass arguments to `create_logical_view` via a request object, either of type
2330
+ # {::Google::Cloud::Bigtable::Admin::V2::CreateLogicalViewRequest} or an equivalent Hash.
2331
+ #
2332
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::CreateLogicalViewRequest, ::Hash]
2333
+ # A request object representing the call parameters. Required. To specify no
2334
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2335
+ # @param options [::Gapic::CallOptions, ::Hash]
2336
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2337
+ #
2338
+ # @overload create_logical_view(parent: nil, logical_view_id: nil, logical_view: nil)
2339
+ # Pass arguments to `create_logical_view` via keyword arguments. Note that at
2340
+ # least one keyword argument is required. To specify no parameters, or to keep all
2341
+ # the default parameter values, pass an empty Hash as a request object (see above).
2342
+ #
2343
+ # @param parent [::String]
2344
+ # Required. The parent instance where this logical view will be created.
2345
+ # Format: `projects/{project}/instances/{instance}`.
2346
+ # @param logical_view_id [::String]
2347
+ # Required. The ID to use for the logical view, which will become the final
2348
+ # component of the logical view's resource name.
2349
+ # @param logical_view [::Google::Cloud::Bigtable::Admin::V2::LogicalView, ::Hash]
2350
+ # Required. The logical view to create.
2351
+ #
2352
+ # @yield [response, operation] Access the result along with the RPC operation
2353
+ # @yieldparam response [::Gapic::Operation]
2354
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2355
+ #
2356
+ # @return [::Gapic::Operation]
2357
+ #
2358
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2359
+ #
2360
+ # @example Basic example
2361
+ # require "google/cloud/bigtable/admin/v2"
2362
+ #
2363
+ # # Create a client object. The client can be reused for multiple calls.
2364
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
2365
+ #
2366
+ # # Create a request. To set request fields, pass in keyword arguments.
2367
+ # request = Google::Cloud::Bigtable::Admin::V2::CreateLogicalViewRequest.new
2368
+ #
2369
+ # # Call the create_logical_view method.
2370
+ # result = client.create_logical_view request
2371
+ #
2372
+ # # The returned object is of type Gapic::Operation. You can use it to
2373
+ # # check the status of an operation, cancel it, or wait for results.
2374
+ # # Here is how to wait for a response.
2375
+ # result.wait_until_done! timeout: 60
2376
+ # if result.response?
2377
+ # p result.response
2378
+ # else
2379
+ # puts "No response received."
2380
+ # end
2381
+ #
2382
+ def create_logical_view request, options = nil
2383
+ raise ::ArgumentError, "request must be provided" if request.nil?
2384
+
2385
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::CreateLogicalViewRequest
2386
+
2387
+ # Converts hash and nil to an options object
2388
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2389
+
2390
+ # Customize the options with defaults
2391
+ metadata = @config.rpcs.create_logical_view.metadata.to_h
2392
+
2393
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2394
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2395
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2396
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
2397
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2398
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2399
+
2400
+ header_params = {}
2401
+ if request.parent
2402
+ header_params["parent"] = request.parent
2403
+ end
2404
+
2405
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2406
+ metadata[:"x-goog-request-params"] ||= request_params_header
2407
+
2408
+ options.apply_defaults timeout: @config.rpcs.create_logical_view.timeout,
2409
+ metadata: metadata,
2410
+ retry_policy: @config.rpcs.create_logical_view.retry_policy
2411
+
2412
+ options.apply_defaults timeout: @config.timeout,
2413
+ metadata: @config.metadata,
2414
+ retry_policy: @config.retry_policy
2415
+
2416
+ @bigtable_instance_admin_stub.call_rpc :create_logical_view, request, options: options do |response, operation|
2417
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2418
+ yield response, operation if block_given?
2419
+ throw :response, response
2420
+ end
2421
+ rescue ::GRPC::BadStatus => e
2422
+ raise ::Google::Cloud::Error.from_error(e)
2423
+ end
2424
+
2425
+ ##
2426
+ # Gets information about a logical view.
2427
+ #
2428
+ # @overload get_logical_view(request, options = nil)
2429
+ # Pass arguments to `get_logical_view` via a request object, either of type
2430
+ # {::Google::Cloud::Bigtable::Admin::V2::GetLogicalViewRequest} or an equivalent Hash.
2431
+ #
2432
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::GetLogicalViewRequest, ::Hash]
2433
+ # A request object representing the call parameters. Required. To specify no
2434
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2435
+ # @param options [::Gapic::CallOptions, ::Hash]
2436
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2437
+ #
2438
+ # @overload get_logical_view(name: nil)
2439
+ # Pass arguments to `get_logical_view` via keyword arguments. Note that at
2440
+ # least one keyword argument is required. To specify no parameters, or to keep all
2441
+ # the default parameter values, pass an empty Hash as a request object (see above).
2442
+ #
2443
+ # @param name [::String]
2444
+ # Required. The unique name of the requested logical view. Values are of the
2445
+ # form `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2446
+ #
2447
+ # @yield [response, operation] Access the result along with the RPC operation
2448
+ # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::LogicalView]
2449
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2450
+ #
2451
+ # @return [::Google::Cloud::Bigtable::Admin::V2::LogicalView]
2452
+ #
2453
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2454
+ #
2455
+ # @example Basic example
2456
+ # require "google/cloud/bigtable/admin/v2"
2457
+ #
2458
+ # # Create a client object. The client can be reused for multiple calls.
2459
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
2460
+ #
2461
+ # # Create a request. To set request fields, pass in keyword arguments.
2462
+ # request = Google::Cloud::Bigtable::Admin::V2::GetLogicalViewRequest.new
2463
+ #
2464
+ # # Call the get_logical_view method.
2465
+ # result = client.get_logical_view request
2466
+ #
2467
+ # # The returned object is of type Google::Cloud::Bigtable::Admin::V2::LogicalView.
2468
+ # p result
2469
+ #
2470
+ def get_logical_view request, options = nil
2471
+ raise ::ArgumentError, "request must be provided" if request.nil?
2472
+
2473
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::GetLogicalViewRequest
2474
+
2475
+ # Converts hash and nil to an options object
2476
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2477
+
2478
+ # Customize the options with defaults
2479
+ metadata = @config.rpcs.get_logical_view.metadata.to_h
2480
+
2481
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2482
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2483
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2484
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
2485
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2486
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2487
+
2488
+ header_params = {}
2489
+ if request.name
2490
+ header_params["name"] = request.name
2491
+ end
2492
+
2493
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2494
+ metadata[:"x-goog-request-params"] ||= request_params_header
2495
+
2496
+ options.apply_defaults timeout: @config.rpcs.get_logical_view.timeout,
2497
+ metadata: metadata,
2498
+ retry_policy: @config.rpcs.get_logical_view.retry_policy
2499
+
2500
+ options.apply_defaults timeout: @config.timeout,
2501
+ metadata: @config.metadata,
2502
+ retry_policy: @config.retry_policy
2503
+
2504
+ @bigtable_instance_admin_stub.call_rpc :get_logical_view, request, options: options do |response, operation|
2505
+ yield response, operation if block_given?
2506
+ end
2507
+ rescue ::GRPC::BadStatus => e
2508
+ raise ::Google::Cloud::Error.from_error(e)
2509
+ end
2510
+
2511
+ ##
2512
+ # Lists information about logical views in an instance.
2513
+ #
2514
+ # @overload list_logical_views(request, options = nil)
2515
+ # Pass arguments to `list_logical_views` via a request object, either of type
2516
+ # {::Google::Cloud::Bigtable::Admin::V2::ListLogicalViewsRequest} or an equivalent Hash.
2517
+ #
2518
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::ListLogicalViewsRequest, ::Hash]
2519
+ # A request object representing the call parameters. Required. To specify no
2520
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2521
+ # @param options [::Gapic::CallOptions, ::Hash]
2522
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2523
+ #
2524
+ # @overload list_logical_views(parent: nil, page_size: nil, page_token: nil)
2525
+ # Pass arguments to `list_logical_views` via keyword arguments. Note that at
2526
+ # least one keyword argument is required. To specify no parameters, or to keep all
2527
+ # the default parameter values, pass an empty Hash as a request object (see above).
2528
+ #
2529
+ # @param parent [::String]
2530
+ # Required. The unique name of the instance for which the list of logical
2531
+ # views is requested. Values are of the form
2532
+ # `projects/{project}/instances/{instance}`.
2533
+ # @param page_size [::Integer]
2534
+ # Optional. The maximum number of logical views to return. The service may
2535
+ # return fewer than this value
2536
+ # @param page_token [::String]
2537
+ # Optional. A page token, received from a previous `ListLogicalViews` call.
2538
+ # Provide this to retrieve the subsequent page.
2539
+ #
2540
+ # When paginating, all other parameters provided to `ListLogicalViews` must
2541
+ # match the call that provided the page token.
2542
+ #
2543
+ # @yield [response, operation] Access the result along with the RPC operation
2544
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::LogicalView>]
2545
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2546
+ #
2547
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::LogicalView>]
2548
+ #
2549
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2550
+ #
2551
+ # @example Basic example
2552
+ # require "google/cloud/bigtable/admin/v2"
2553
+ #
2554
+ # # Create a client object. The client can be reused for multiple calls.
2555
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
2556
+ #
2557
+ # # Create a request. To set request fields, pass in keyword arguments.
2558
+ # request = Google::Cloud::Bigtable::Admin::V2::ListLogicalViewsRequest.new
2559
+ #
2560
+ # # Call the list_logical_views method.
2561
+ # result = client.list_logical_views request
2562
+ #
2563
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2564
+ # # over elements, and API calls will be issued to fetch pages as needed.
2565
+ # result.each do |item|
2566
+ # # Each element is of type ::Google::Cloud::Bigtable::Admin::V2::LogicalView.
2567
+ # p item
2568
+ # end
2569
+ #
2570
+ def list_logical_views request, options = nil
2571
+ raise ::ArgumentError, "request must be provided" if request.nil?
2572
+
2573
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::ListLogicalViewsRequest
2574
+
2575
+ # Converts hash and nil to an options object
2576
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2577
+
2578
+ # Customize the options with defaults
2579
+ metadata = @config.rpcs.list_logical_views.metadata.to_h
2580
+
2581
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2582
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2583
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2584
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
2585
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2586
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2587
+
2588
+ header_params = {}
2589
+ if request.parent
2590
+ header_params["parent"] = request.parent
2591
+ end
2592
+
2593
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2594
+ metadata[:"x-goog-request-params"] ||= request_params_header
2595
+
2596
+ options.apply_defaults timeout: @config.rpcs.list_logical_views.timeout,
2597
+ metadata: metadata,
2598
+ retry_policy: @config.rpcs.list_logical_views.retry_policy
2599
+
2600
+ options.apply_defaults timeout: @config.timeout,
2601
+ metadata: @config.metadata,
2602
+ retry_policy: @config.retry_policy
2603
+
2604
+ @bigtable_instance_admin_stub.call_rpc :list_logical_views, request, options: options do |response, operation|
2605
+ response = ::Gapic::PagedEnumerable.new @bigtable_instance_admin_stub, :list_logical_views, request, response, operation, options
2606
+ yield response, operation if block_given?
2607
+ throw :response, response
2608
+ end
2609
+ rescue ::GRPC::BadStatus => e
2610
+ raise ::Google::Cloud::Error.from_error(e)
2611
+ end
2612
+
2613
+ ##
2614
+ # Updates a logical view within an instance.
2615
+ #
2616
+ # @overload update_logical_view(request, options = nil)
2617
+ # Pass arguments to `update_logical_view` via a request object, either of type
2618
+ # {::Google::Cloud::Bigtable::Admin::V2::UpdateLogicalViewRequest} or an equivalent Hash.
2619
+ #
2620
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::UpdateLogicalViewRequest, ::Hash]
2621
+ # A request object representing the call parameters. Required. To specify no
2622
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2623
+ # @param options [::Gapic::CallOptions, ::Hash]
2624
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2625
+ #
2626
+ # @overload update_logical_view(logical_view: nil, update_mask: nil)
2627
+ # Pass arguments to `update_logical_view` via keyword arguments. Note that at
2628
+ # least one keyword argument is required. To specify no parameters, or to keep all
2629
+ # the default parameter values, pass an empty Hash as a request object (see above).
2630
+ #
2631
+ # @param logical_view [::Google::Cloud::Bigtable::Admin::V2::LogicalView, ::Hash]
2632
+ # Required. The logical view to update.
2633
+ #
2634
+ # The logical view's `name` field is used to identify the view to update.
2635
+ # Format:
2636
+ # `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2637
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2638
+ # Optional. The list of fields to update.
2639
+ #
2640
+ # @yield [response, operation] Access the result along with the RPC operation
2641
+ # @yieldparam response [::Gapic::Operation]
2642
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2643
+ #
2644
+ # @return [::Gapic::Operation]
2645
+ #
2646
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2647
+ #
2648
+ # @example Basic example
2649
+ # require "google/cloud/bigtable/admin/v2"
2650
+ #
2651
+ # # Create a client object. The client can be reused for multiple calls.
2652
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
2653
+ #
2654
+ # # Create a request. To set request fields, pass in keyword arguments.
2655
+ # request = Google::Cloud::Bigtable::Admin::V2::UpdateLogicalViewRequest.new
2656
+ #
2657
+ # # Call the update_logical_view method.
2658
+ # result = client.update_logical_view request
2659
+ #
2660
+ # # The returned object is of type Gapic::Operation. You can use it to
2661
+ # # check the status of an operation, cancel it, or wait for results.
2662
+ # # Here is how to wait for a response.
2663
+ # result.wait_until_done! timeout: 60
2664
+ # if result.response?
2665
+ # p result.response
2666
+ # else
2667
+ # puts "No response received."
2668
+ # end
2669
+ #
2670
+ def update_logical_view request, options = nil
2671
+ raise ::ArgumentError, "request must be provided" if request.nil?
2672
+
2673
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::UpdateLogicalViewRequest
2674
+
2675
+ # Converts hash and nil to an options object
2676
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2677
+
2678
+ # Customize the options with defaults
2679
+ metadata = @config.rpcs.update_logical_view.metadata.to_h
2680
+
2681
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2682
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2683
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2684
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
2685
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2686
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2687
+
2688
+ header_params = {}
2689
+ if request.logical_view&.name
2690
+ header_params["logical_view.name"] = request.logical_view.name
2691
+ end
2692
+
2693
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2694
+ metadata[:"x-goog-request-params"] ||= request_params_header
2695
+
2696
+ options.apply_defaults timeout: @config.rpcs.update_logical_view.timeout,
2697
+ metadata: metadata,
2698
+ retry_policy: @config.rpcs.update_logical_view.retry_policy
2699
+
2700
+ options.apply_defaults timeout: @config.timeout,
2701
+ metadata: @config.metadata,
2702
+ retry_policy: @config.retry_policy
2703
+
2704
+ @bigtable_instance_admin_stub.call_rpc :update_logical_view, request, options: options do |response, operation|
2705
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2706
+ yield response, operation if block_given?
2707
+ throw :response, response
2708
+ end
2709
+ rescue ::GRPC::BadStatus => e
2710
+ raise ::Google::Cloud::Error.from_error(e)
2711
+ end
2712
+
2713
+ ##
2714
+ # Deletes a logical view from an instance.
2715
+ #
2716
+ # @overload delete_logical_view(request, options = nil)
2717
+ # Pass arguments to `delete_logical_view` via a request object, either of type
2718
+ # {::Google::Cloud::Bigtable::Admin::V2::DeleteLogicalViewRequest} or an equivalent Hash.
2719
+ #
2720
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::DeleteLogicalViewRequest, ::Hash]
2721
+ # A request object representing the call parameters. Required. To specify no
2722
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2723
+ # @param options [::Gapic::CallOptions, ::Hash]
2724
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2725
+ #
2726
+ # @overload delete_logical_view(name: nil, etag: nil)
2727
+ # Pass arguments to `delete_logical_view` via keyword arguments. Note that at
2728
+ # least one keyword argument is required. To specify no parameters, or to keep all
2729
+ # the default parameter values, pass an empty Hash as a request object (see above).
2730
+ #
2731
+ # @param name [::String]
2732
+ # Required. The unique name of the logical view to be deleted.
2733
+ # Format:
2734
+ # `projects/{project}/instances/{instance}/logicalViews/{logical_view}`.
2735
+ # @param etag [::String]
2736
+ # Optional. The current etag of the logical view.
2737
+ # If an etag is provided and does not match the current etag of the
2738
+ # logical view, deletion will be blocked and an ABORTED error will be
2739
+ # returned.
2740
+ #
2741
+ # @yield [response, operation] Access the result along with the RPC operation
2742
+ # @yieldparam response [::Google::Protobuf::Empty]
2743
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2744
+ #
2745
+ # @return [::Google::Protobuf::Empty]
2746
+ #
2747
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2748
+ #
2749
+ # @example Basic example
2750
+ # require "google/cloud/bigtable/admin/v2"
2751
+ #
2752
+ # # Create a client object. The client can be reused for multiple calls.
2753
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
2754
+ #
2755
+ # # Create a request. To set request fields, pass in keyword arguments.
2756
+ # request = Google::Cloud::Bigtable::Admin::V2::DeleteLogicalViewRequest.new
2757
+ #
2758
+ # # Call the delete_logical_view method.
2759
+ # result = client.delete_logical_view request
2760
+ #
2761
+ # # The returned object is of type Google::Protobuf::Empty.
2762
+ # p result
2763
+ #
2764
+ def delete_logical_view request, options = nil
2765
+ raise ::ArgumentError, "request must be provided" if request.nil?
2766
+
2767
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::DeleteLogicalViewRequest
2768
+
2769
+ # Converts hash and nil to an options object
2770
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2771
+
2772
+ # Customize the options with defaults
2773
+ metadata = @config.rpcs.delete_logical_view.metadata.to_h
2774
+
2775
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2776
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2777
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2778
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
2779
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2780
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2781
+
2782
+ header_params = {}
2783
+ if request.name
2784
+ header_params["name"] = request.name
2785
+ end
2786
+
2787
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2788
+ metadata[:"x-goog-request-params"] ||= request_params_header
2789
+
2790
+ options.apply_defaults timeout: @config.rpcs.delete_logical_view.timeout,
2791
+ metadata: metadata,
2792
+ retry_policy: @config.rpcs.delete_logical_view.retry_policy
2793
+
2794
+ options.apply_defaults timeout: @config.timeout,
2795
+ metadata: @config.metadata,
2796
+ retry_policy: @config.retry_policy
2797
+
2798
+ @bigtable_instance_admin_stub.call_rpc :delete_logical_view, request, options: options do |response, operation|
2799
+ yield response, operation if block_given?
2800
+ end
2801
+ rescue ::GRPC::BadStatus => e
2802
+ raise ::Google::Cloud::Error.from_error(e)
2803
+ end
2804
+
2805
+ ##
2806
+ # Creates a materialized view within an instance.
2807
+ #
2808
+ # @overload create_materialized_view(request, options = nil)
2809
+ # Pass arguments to `create_materialized_view` via a request object, either of type
2810
+ # {::Google::Cloud::Bigtable::Admin::V2::CreateMaterializedViewRequest} or an equivalent Hash.
2811
+ #
2812
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::CreateMaterializedViewRequest, ::Hash]
2813
+ # A request object representing the call parameters. Required. To specify no
2814
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2815
+ # @param options [::Gapic::CallOptions, ::Hash]
2816
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2817
+ #
2818
+ # @overload create_materialized_view(parent: nil, materialized_view_id: nil, materialized_view: nil)
2819
+ # Pass arguments to `create_materialized_view` via keyword arguments. Note that at
2820
+ # least one keyword argument is required. To specify no parameters, or to keep all
2821
+ # the default parameter values, pass an empty Hash as a request object (see above).
2822
+ #
2823
+ # @param parent [::String]
2824
+ # Required. The parent instance where this materialized view will be created.
2825
+ # Format: `projects/{project}/instances/{instance}`.
2826
+ # @param materialized_view_id [::String]
2827
+ # Required. The ID to use for the materialized view, which will become the
2828
+ # final component of the materialized view's resource name.
2829
+ # @param materialized_view [::Google::Cloud::Bigtable::Admin::V2::MaterializedView, ::Hash]
2830
+ # Required. The materialized view to create.
2831
+ #
2832
+ # @yield [response, operation] Access the result along with the RPC operation
2833
+ # @yieldparam response [::Gapic::Operation]
2834
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2835
+ #
2836
+ # @return [::Gapic::Operation]
2837
+ #
2838
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2839
+ #
2840
+ # @example Basic example
2841
+ # require "google/cloud/bigtable/admin/v2"
2842
+ #
2843
+ # # Create a client object. The client can be reused for multiple calls.
2844
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
2845
+ #
2846
+ # # Create a request. To set request fields, pass in keyword arguments.
2847
+ # request = Google::Cloud::Bigtable::Admin::V2::CreateMaterializedViewRequest.new
2848
+ #
2849
+ # # Call the create_materialized_view method.
2850
+ # result = client.create_materialized_view request
2851
+ #
2852
+ # # The returned object is of type Gapic::Operation. You can use it to
2853
+ # # check the status of an operation, cancel it, or wait for results.
2854
+ # # Here is how to wait for a response.
2855
+ # result.wait_until_done! timeout: 60
2856
+ # if result.response?
2857
+ # p result.response
2858
+ # else
2859
+ # puts "No response received."
2860
+ # end
2861
+ #
2862
+ def create_materialized_view request, options = nil
2863
+ raise ::ArgumentError, "request must be provided" if request.nil?
2864
+
2865
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::CreateMaterializedViewRequest
2866
+
2867
+ # Converts hash and nil to an options object
2868
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2869
+
2870
+ # Customize the options with defaults
2871
+ metadata = @config.rpcs.create_materialized_view.metadata.to_h
2872
+
2873
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2874
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2875
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2876
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
2877
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2878
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2879
+
2880
+ header_params = {}
2881
+ if request.parent
2882
+ header_params["parent"] = request.parent
2883
+ end
2884
+
2885
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2886
+ metadata[:"x-goog-request-params"] ||= request_params_header
2887
+
2888
+ options.apply_defaults timeout: @config.rpcs.create_materialized_view.timeout,
2889
+ metadata: metadata,
2890
+ retry_policy: @config.rpcs.create_materialized_view.retry_policy
2891
+
2892
+ options.apply_defaults timeout: @config.timeout,
2893
+ metadata: @config.metadata,
2894
+ retry_policy: @config.retry_policy
2895
+
2896
+ @bigtable_instance_admin_stub.call_rpc :create_materialized_view, request, options: options do |response, operation|
2897
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2898
+ yield response, operation if block_given?
2899
+ throw :response, response
2900
+ end
2901
+ rescue ::GRPC::BadStatus => e
2902
+ raise ::Google::Cloud::Error.from_error(e)
2903
+ end
2904
+
2905
+ ##
2906
+ # Gets information about a materialized view.
2907
+ #
2908
+ # @overload get_materialized_view(request, options = nil)
2909
+ # Pass arguments to `get_materialized_view` via a request object, either of type
2910
+ # {::Google::Cloud::Bigtable::Admin::V2::GetMaterializedViewRequest} or an equivalent Hash.
2911
+ #
2912
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::GetMaterializedViewRequest, ::Hash]
2913
+ # A request object representing the call parameters. Required. To specify no
2914
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2915
+ # @param options [::Gapic::CallOptions, ::Hash]
2916
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2917
+ #
2918
+ # @overload get_materialized_view(name: nil)
2919
+ # Pass arguments to `get_materialized_view` via keyword arguments. Note that at
2920
+ # least one keyword argument is required. To specify no parameters, or to keep all
2921
+ # the default parameter values, pass an empty Hash as a request object (see above).
2922
+ #
2923
+ # @param name [::String]
2924
+ # Required. The unique name of the requested materialized view. Values are of
2925
+ # the form
2926
+ # `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
2927
+ #
2928
+ # @yield [response, operation] Access the result along with the RPC operation
2929
+ # @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::MaterializedView]
2930
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2931
+ #
2932
+ # @return [::Google::Cloud::Bigtable::Admin::V2::MaterializedView]
2933
+ #
2934
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2935
+ #
2936
+ # @example Basic example
2937
+ # require "google/cloud/bigtable/admin/v2"
2938
+ #
2939
+ # # Create a client object. The client can be reused for multiple calls.
2940
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
2941
+ #
2942
+ # # Create a request. To set request fields, pass in keyword arguments.
2943
+ # request = Google::Cloud::Bigtable::Admin::V2::GetMaterializedViewRequest.new
2944
+ #
2945
+ # # Call the get_materialized_view method.
2946
+ # result = client.get_materialized_view request
2947
+ #
2948
+ # # The returned object is of type Google::Cloud::Bigtable::Admin::V2::MaterializedView.
2949
+ # p result
2950
+ #
2951
+ def get_materialized_view request, options = nil
2952
+ raise ::ArgumentError, "request must be provided" if request.nil?
2953
+
2954
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::GetMaterializedViewRequest
2955
+
2956
+ # Converts hash and nil to an options object
2957
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2958
+
2959
+ # Customize the options with defaults
2960
+ metadata = @config.rpcs.get_materialized_view.metadata.to_h
2961
+
2962
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2963
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2964
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2965
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
2966
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2967
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2968
+
2969
+ header_params = {}
2970
+ if request.name
2971
+ header_params["name"] = request.name
2972
+ end
2973
+
2974
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2975
+ metadata[:"x-goog-request-params"] ||= request_params_header
2976
+
2977
+ options.apply_defaults timeout: @config.rpcs.get_materialized_view.timeout,
2978
+ metadata: metadata,
2979
+ retry_policy: @config.rpcs.get_materialized_view.retry_policy
2980
+
2981
+ options.apply_defaults timeout: @config.timeout,
2982
+ metadata: @config.metadata,
2983
+ retry_policy: @config.retry_policy
2984
+
2985
+ @bigtable_instance_admin_stub.call_rpc :get_materialized_view, request, options: options do |response, operation|
2986
+ yield response, operation if block_given?
2987
+ end
2988
+ rescue ::GRPC::BadStatus => e
2989
+ raise ::Google::Cloud::Error.from_error(e)
2990
+ end
2991
+
2992
+ ##
2993
+ # Lists information about materialized views in an instance.
2994
+ #
2995
+ # @overload list_materialized_views(request, options = nil)
2996
+ # Pass arguments to `list_materialized_views` via a request object, either of type
2997
+ # {::Google::Cloud::Bigtable::Admin::V2::ListMaterializedViewsRequest} or an equivalent Hash.
2998
+ #
2999
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::ListMaterializedViewsRequest, ::Hash]
3000
+ # A request object representing the call parameters. Required. To specify no
3001
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3002
+ # @param options [::Gapic::CallOptions, ::Hash]
3003
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3004
+ #
3005
+ # @overload list_materialized_views(parent: nil, page_size: nil, page_token: nil)
3006
+ # Pass arguments to `list_materialized_views` via keyword arguments. Note that at
3007
+ # least one keyword argument is required. To specify no parameters, or to keep all
3008
+ # the default parameter values, pass an empty Hash as a request object (see above).
3009
+ #
3010
+ # @param parent [::String]
3011
+ # Required. The unique name of the instance for which the list of
3012
+ # materialized views is requested. Values are of the form
3013
+ # `projects/{project}/instances/{instance}`.
3014
+ # @param page_size [::Integer]
3015
+ # Optional. The maximum number of materialized views to return. The service
3016
+ # may return fewer than this value
3017
+ # @param page_token [::String]
3018
+ # Optional. A page token, received from a previous `ListMaterializedViews`
3019
+ # call. Provide this to retrieve the subsequent page.
3020
+ #
3021
+ # When paginating, all other parameters provided to `ListMaterializedViews`
3022
+ # must match the call that provided the page token.
3023
+ #
3024
+ # @yield [response, operation] Access the result along with the RPC operation
3025
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::MaterializedView>]
3026
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3027
+ #
3028
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::MaterializedView>]
3029
+ #
3030
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3031
+ #
3032
+ # @example Basic example
3033
+ # require "google/cloud/bigtable/admin/v2"
3034
+ #
3035
+ # # Create a client object. The client can be reused for multiple calls.
3036
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
3037
+ #
3038
+ # # Create a request. To set request fields, pass in keyword arguments.
3039
+ # request = Google::Cloud::Bigtable::Admin::V2::ListMaterializedViewsRequest.new
3040
+ #
3041
+ # # Call the list_materialized_views method.
3042
+ # result = client.list_materialized_views request
3043
+ #
3044
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3045
+ # # over elements, and API calls will be issued to fetch pages as needed.
3046
+ # result.each do |item|
3047
+ # # Each element is of type ::Google::Cloud::Bigtable::Admin::V2::MaterializedView.
3048
+ # p item
3049
+ # end
3050
+ #
3051
+ def list_materialized_views request, options = nil
3052
+ raise ::ArgumentError, "request must be provided" if request.nil?
3053
+
3054
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::ListMaterializedViewsRequest
3055
+
3056
+ # Converts hash and nil to an options object
3057
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3058
+
3059
+ # Customize the options with defaults
3060
+ metadata = @config.rpcs.list_materialized_views.metadata.to_h
3061
+
3062
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3063
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3064
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3065
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
3066
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3067
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3068
+
3069
+ header_params = {}
3070
+ if request.parent
3071
+ header_params["parent"] = request.parent
3072
+ end
3073
+
3074
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3075
+ metadata[:"x-goog-request-params"] ||= request_params_header
3076
+
3077
+ options.apply_defaults timeout: @config.rpcs.list_materialized_views.timeout,
3078
+ metadata: metadata,
3079
+ retry_policy: @config.rpcs.list_materialized_views.retry_policy
3080
+
3081
+ options.apply_defaults timeout: @config.timeout,
3082
+ metadata: @config.metadata,
3083
+ retry_policy: @config.retry_policy
3084
+
3085
+ @bigtable_instance_admin_stub.call_rpc :list_materialized_views, request, options: options do |response, operation|
3086
+ response = ::Gapic::PagedEnumerable.new @bigtable_instance_admin_stub, :list_materialized_views, request, response, operation, options
3087
+ yield response, operation if block_given?
3088
+ throw :response, response
3089
+ end
3090
+ rescue ::GRPC::BadStatus => e
3091
+ raise ::Google::Cloud::Error.from_error(e)
3092
+ end
3093
+
3094
+ ##
3095
+ # Updates a materialized view within an instance.
3096
+ #
3097
+ # @overload update_materialized_view(request, options = nil)
3098
+ # Pass arguments to `update_materialized_view` via a request object, either of type
3099
+ # {::Google::Cloud::Bigtable::Admin::V2::UpdateMaterializedViewRequest} or an equivalent Hash.
3100
+ #
3101
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::UpdateMaterializedViewRequest, ::Hash]
3102
+ # A request object representing the call parameters. Required. To specify no
3103
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3104
+ # @param options [::Gapic::CallOptions, ::Hash]
3105
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3106
+ #
3107
+ # @overload update_materialized_view(materialized_view: nil, update_mask: nil)
3108
+ # Pass arguments to `update_materialized_view` via keyword arguments. Note that at
3109
+ # least one keyword argument is required. To specify no parameters, or to keep all
3110
+ # the default parameter values, pass an empty Hash as a request object (see above).
3111
+ #
3112
+ # @param materialized_view [::Google::Cloud::Bigtable::Admin::V2::MaterializedView, ::Hash]
3113
+ # Required. The materialized view to update.
3114
+ #
3115
+ # The materialized view's `name` field is used to identify the view to
3116
+ # update. Format:
3117
+ # `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3118
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3119
+ # Optional. The list of fields to update.
3120
+ #
3121
+ # @yield [response, operation] Access the result along with the RPC operation
3122
+ # @yieldparam response [::Gapic::Operation]
3123
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3124
+ #
3125
+ # @return [::Gapic::Operation]
3126
+ #
3127
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3128
+ #
3129
+ # @example Basic example
3130
+ # require "google/cloud/bigtable/admin/v2"
3131
+ #
3132
+ # # Create a client object. The client can be reused for multiple calls.
3133
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
3134
+ #
3135
+ # # Create a request. To set request fields, pass in keyword arguments.
3136
+ # request = Google::Cloud::Bigtable::Admin::V2::UpdateMaterializedViewRequest.new
3137
+ #
3138
+ # # Call the update_materialized_view method.
3139
+ # result = client.update_materialized_view request
3140
+ #
3141
+ # # The returned object is of type Gapic::Operation. You can use it to
3142
+ # # check the status of an operation, cancel it, or wait for results.
3143
+ # # Here is how to wait for a response.
3144
+ # result.wait_until_done! timeout: 60
3145
+ # if result.response?
3146
+ # p result.response
3147
+ # else
3148
+ # puts "No response received."
3149
+ # end
3150
+ #
3151
+ def update_materialized_view request, options = nil
3152
+ raise ::ArgumentError, "request must be provided" if request.nil?
3153
+
3154
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::UpdateMaterializedViewRequest
3155
+
3156
+ # Converts hash and nil to an options object
3157
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3158
+
3159
+ # Customize the options with defaults
3160
+ metadata = @config.rpcs.update_materialized_view.metadata.to_h
3161
+
3162
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3163
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3164
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3165
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
3166
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3167
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3168
+
3169
+ header_params = {}
3170
+ if request.materialized_view&.name
3171
+ header_params["materialized_view.name"] = request.materialized_view.name
3172
+ end
3173
+
3174
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3175
+ metadata[:"x-goog-request-params"] ||= request_params_header
3176
+
3177
+ options.apply_defaults timeout: @config.rpcs.update_materialized_view.timeout,
3178
+ metadata: metadata,
3179
+ retry_policy: @config.rpcs.update_materialized_view.retry_policy
3180
+
3181
+ options.apply_defaults timeout: @config.timeout,
3182
+ metadata: @config.metadata,
3183
+ retry_policy: @config.retry_policy
3184
+
3185
+ @bigtable_instance_admin_stub.call_rpc :update_materialized_view, request, options: options do |response, operation|
3186
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3187
+ yield response, operation if block_given?
3188
+ throw :response, response
3189
+ end
3190
+ rescue ::GRPC::BadStatus => e
3191
+ raise ::Google::Cloud::Error.from_error(e)
3192
+ end
3193
+
3194
+ ##
3195
+ # Deletes a materialized view from an instance.
3196
+ #
3197
+ # @overload delete_materialized_view(request, options = nil)
3198
+ # Pass arguments to `delete_materialized_view` via a request object, either of type
3199
+ # {::Google::Cloud::Bigtable::Admin::V2::DeleteMaterializedViewRequest} or an equivalent Hash.
3200
+ #
3201
+ # @param request [::Google::Cloud::Bigtable::Admin::V2::DeleteMaterializedViewRequest, ::Hash]
3202
+ # A request object representing the call parameters. Required. To specify no
3203
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3204
+ # @param options [::Gapic::CallOptions, ::Hash]
3205
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3206
+ #
3207
+ # @overload delete_materialized_view(name: nil, etag: nil)
3208
+ # Pass arguments to `delete_materialized_view` via keyword arguments. Note that at
3209
+ # least one keyword argument is required. To specify no parameters, or to keep all
3210
+ # the default parameter values, pass an empty Hash as a request object (see above).
3211
+ #
3212
+ # @param name [::String]
3213
+ # Required. The unique name of the materialized view to be deleted.
3214
+ # Format:
3215
+ # `projects/{project}/instances/{instance}/materializedViews/{materialized_view}`.
3216
+ # @param etag [::String]
3217
+ # Optional. The current etag of the materialized view.
3218
+ # If an etag is provided and does not match the current etag of the
3219
+ # materialized view, deletion will be blocked and an ABORTED error will be
3220
+ # returned.
3221
+ #
3222
+ # @yield [response, operation] Access the result along with the RPC operation
3223
+ # @yieldparam response [::Google::Protobuf::Empty]
3224
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3225
+ #
3226
+ # @return [::Google::Protobuf::Empty]
3227
+ #
3228
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3229
+ #
3230
+ # @example Basic example
3231
+ # require "google/cloud/bigtable/admin/v2"
3232
+ #
3233
+ # # Create a client object. The client can be reused for multiple calls.
3234
+ # client = Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
3235
+ #
3236
+ # # Create a request. To set request fields, pass in keyword arguments.
3237
+ # request = Google::Cloud::Bigtable::Admin::V2::DeleteMaterializedViewRequest.new
3238
+ #
3239
+ # # Call the delete_materialized_view method.
3240
+ # result = client.delete_materialized_view request
3241
+ #
3242
+ # # The returned object is of type Google::Protobuf::Empty.
3243
+ # p result
3244
+ #
3245
+ def delete_materialized_view request, options = nil
3246
+ raise ::ArgumentError, "request must be provided" if request.nil?
3247
+
3248
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::DeleteMaterializedViewRequest
3249
+
3250
+ # Converts hash and nil to an options object
3251
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3252
+
3253
+ # Customize the options with defaults
3254
+ metadata = @config.rpcs.delete_materialized_view.metadata.to_h
3255
+
3256
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3257
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3258
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3259
+ gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
3260
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3261
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3262
+
3263
+ header_params = {}
3264
+ if request.name
3265
+ header_params["name"] = request.name
3266
+ end
3267
+
3268
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3269
+ metadata[:"x-goog-request-params"] ||= request_params_header
3270
+
3271
+ options.apply_defaults timeout: @config.rpcs.delete_materialized_view.timeout,
3272
+ metadata: metadata,
3273
+ retry_policy: @config.rpcs.delete_materialized_view.retry_policy
3274
+
3275
+ options.apply_defaults timeout: @config.timeout,
3276
+ metadata: @config.metadata,
3277
+ retry_policy: @config.retry_policy
3278
+
3279
+ @bigtable_instance_admin_stub.call_rpc :delete_materialized_view, request, options: options do |response, operation|
3280
+ yield response, operation if block_given?
3281
+ end
3282
+ rescue ::GRPC::BadStatus => e
3283
+ raise ::Google::Cloud::Error.from_error(e)
3284
+ end
3285
+
2328
3286
  ##
2329
3287
  # Configuration class for the BigtableInstanceAdmin API.
2330
3288
  #
@@ -2596,6 +3554,56 @@ module Google
2596
3554
  # @return [::Gapic::Config::Method]
2597
3555
  #
2598
3556
  attr_reader :list_hot_tablets
3557
+ ##
3558
+ # RPC-specific configuration for `create_logical_view`
3559
+ # @return [::Gapic::Config::Method]
3560
+ #
3561
+ attr_reader :create_logical_view
3562
+ ##
3563
+ # RPC-specific configuration for `get_logical_view`
3564
+ # @return [::Gapic::Config::Method]
3565
+ #
3566
+ attr_reader :get_logical_view
3567
+ ##
3568
+ # RPC-specific configuration for `list_logical_views`
3569
+ # @return [::Gapic::Config::Method]
3570
+ #
3571
+ attr_reader :list_logical_views
3572
+ ##
3573
+ # RPC-specific configuration for `update_logical_view`
3574
+ # @return [::Gapic::Config::Method]
3575
+ #
3576
+ attr_reader :update_logical_view
3577
+ ##
3578
+ # RPC-specific configuration for `delete_logical_view`
3579
+ # @return [::Gapic::Config::Method]
3580
+ #
3581
+ attr_reader :delete_logical_view
3582
+ ##
3583
+ # RPC-specific configuration for `create_materialized_view`
3584
+ # @return [::Gapic::Config::Method]
3585
+ #
3586
+ attr_reader :create_materialized_view
3587
+ ##
3588
+ # RPC-specific configuration for `get_materialized_view`
3589
+ # @return [::Gapic::Config::Method]
3590
+ #
3591
+ attr_reader :get_materialized_view
3592
+ ##
3593
+ # RPC-specific configuration for `list_materialized_views`
3594
+ # @return [::Gapic::Config::Method]
3595
+ #
3596
+ attr_reader :list_materialized_views
3597
+ ##
3598
+ # RPC-specific configuration for `update_materialized_view`
3599
+ # @return [::Gapic::Config::Method]
3600
+ #
3601
+ attr_reader :update_materialized_view
3602
+ ##
3603
+ # RPC-specific configuration for `delete_materialized_view`
3604
+ # @return [::Gapic::Config::Method]
3605
+ #
3606
+ attr_reader :delete_materialized_view
2599
3607
 
2600
3608
  # @private
2601
3609
  def initialize parent_rpcs = nil
@@ -2641,6 +3649,26 @@ module Google
2641
3649
  @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
2642
3650
  list_hot_tablets_config = parent_rpcs.list_hot_tablets if parent_rpcs.respond_to? :list_hot_tablets
2643
3651
  @list_hot_tablets = ::Gapic::Config::Method.new list_hot_tablets_config
3652
+ create_logical_view_config = parent_rpcs.create_logical_view if parent_rpcs.respond_to? :create_logical_view
3653
+ @create_logical_view = ::Gapic::Config::Method.new create_logical_view_config
3654
+ get_logical_view_config = parent_rpcs.get_logical_view if parent_rpcs.respond_to? :get_logical_view
3655
+ @get_logical_view = ::Gapic::Config::Method.new get_logical_view_config
3656
+ list_logical_views_config = parent_rpcs.list_logical_views if parent_rpcs.respond_to? :list_logical_views
3657
+ @list_logical_views = ::Gapic::Config::Method.new list_logical_views_config
3658
+ update_logical_view_config = parent_rpcs.update_logical_view if parent_rpcs.respond_to? :update_logical_view
3659
+ @update_logical_view = ::Gapic::Config::Method.new update_logical_view_config
3660
+ delete_logical_view_config = parent_rpcs.delete_logical_view if parent_rpcs.respond_to? :delete_logical_view
3661
+ @delete_logical_view = ::Gapic::Config::Method.new delete_logical_view_config
3662
+ create_materialized_view_config = parent_rpcs.create_materialized_view if parent_rpcs.respond_to? :create_materialized_view
3663
+ @create_materialized_view = ::Gapic::Config::Method.new create_materialized_view_config
3664
+ get_materialized_view_config = parent_rpcs.get_materialized_view if parent_rpcs.respond_to? :get_materialized_view
3665
+ @get_materialized_view = ::Gapic::Config::Method.new get_materialized_view_config
3666
+ list_materialized_views_config = parent_rpcs.list_materialized_views if parent_rpcs.respond_to? :list_materialized_views
3667
+ @list_materialized_views = ::Gapic::Config::Method.new list_materialized_views_config
3668
+ update_materialized_view_config = parent_rpcs.update_materialized_view if parent_rpcs.respond_to? :update_materialized_view
3669
+ @update_materialized_view = ::Gapic::Config::Method.new update_materialized_view_config
3670
+ delete_materialized_view_config = parent_rpcs.delete_materialized_view if parent_rpcs.respond_to? :delete_materialized_view
3671
+ @delete_materialized_view = ::Gapic::Config::Method.new delete_materialized_view_config
2644
3672
 
2645
3673
  yield self if block_given?
2646
3674
  end