google-cloud-bigtable-v2 1.12.0 → 1.14.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.
- checksums.yaml +4 -4
- data/lib/google/bigtable/v2/bigtable_pb.rb +2 -1
- data/lib/google/bigtable/v2/bigtable_services_pb.rb +19 -0
- data/lib/google/bigtable/v2/data_pb.rb +2 -1
- data/lib/google/bigtable/v2/feature_flags_pb.rb +1 -1
- data/lib/google/bigtable/v2/peer_info_pb.rb +1 -1
- data/lib/google/bigtable/v2/session_pb.rb +84 -0
- data/lib/google/cloud/bigtable/v2/bigtable/client.rb +372 -2
- data/lib/google/cloud/bigtable/v2/version.rb +1 -1
- data/proto_docs/google/api/client.rb +149 -29
- data/proto_docs/google/api/routing.rb +7 -3
- data/proto_docs/google/bigtable/v2/bigtable.rb +32 -5
- data/proto_docs/google/bigtable/v2/data.rb +39 -19
- data/proto_docs/google/bigtable/v2/feature_flags.rb +6 -0
- data/proto_docs/google/bigtable/v2/peer_info.rb +6 -1
- data/proto_docs/google/bigtable/v2/session.rb +793 -0
- data/proto_docs/google/rpc/error_details.rb +420 -0
- data/proto_docs/google/type/date.rb +10 -7
- metadata +4 -1
|
@@ -361,6 +361,9 @@ module Google
|
|
|
361
361
|
# which can be used to break up the data for distributed tasks like
|
|
362
362
|
# mapreduces.
|
|
363
363
|
#
|
|
364
|
+
# If a `row_range` is provided in the request, the returned samples will be
|
|
365
|
+
# restricted to the specified range.
|
|
366
|
+
#
|
|
364
367
|
# @overload sample_row_keys(request, options = nil)
|
|
365
368
|
# Pass arguments to `sample_row_keys` via a request object, either of type
|
|
366
369
|
# {::Google::Cloud::Bigtable::V2::SampleRowKeysRequest} or an equivalent Hash.
|
|
@@ -371,7 +374,7 @@ module Google
|
|
|
371
374
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
372
375
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
373
376
|
#
|
|
374
|
-
# @overload sample_row_keys(table_name: nil, authorized_view_name: nil, materialized_view_name: nil, app_profile_id: nil)
|
|
377
|
+
# @overload sample_row_keys(table_name: nil, authorized_view_name: nil, materialized_view_name: nil, app_profile_id: nil, row_range: nil)
|
|
375
378
|
# Pass arguments to `sample_row_keys` via keyword arguments. Note that at
|
|
376
379
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
377
380
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -395,6 +398,11 @@ module Google
|
|
|
395
398
|
# @param app_profile_id [::String]
|
|
396
399
|
# This value specifies routing for replication. If not specified, the
|
|
397
400
|
# "default" application profile will be used.
|
|
401
|
+
# @param row_range [::Google::Cloud::Bigtable::V2::RowRange, ::Hash]
|
|
402
|
+
# Optional. The row range to sample. If not specified, samples
|
|
403
|
+
# from all rows.
|
|
404
|
+
# The output will always return the end key in the range as the last sample
|
|
405
|
+
# returned.
|
|
398
406
|
#
|
|
399
407
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
400
408
|
# @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::SampleRowKeysResponse>]
|
|
@@ -1410,7 +1418,7 @@ module Google
|
|
|
1410
1418
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1411
1419
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1412
1420
|
#
|
|
1413
|
-
# @overload execute_query(instance_name: nil, app_profile_id: nil, query: nil, prepared_query: nil, proto_format: nil, resume_token: nil, params: nil)
|
|
1421
|
+
# @overload execute_query(instance_name: nil, app_profile_id: nil, query: nil, prepared_query: nil, proto_format: nil, resume_token: nil, params: nil, view_parameters: nil)
|
|
1414
1422
|
# Pass arguments to `execute_query` via keyword arguments. Note that at
|
|
1415
1423
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1416
1424
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
@@ -1472,6 +1480,13 @@ module Google
|
|
|
1472
1480
|
# inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty
|
|
1473
1481
|
# `Value.type` must match the corresponding `param_types` entry, or be
|
|
1474
1482
|
# rejected with `INVALID_ARGUMENT`.
|
|
1483
|
+
# @param view_parameters [::Hash{::String => ::Google::Cloud::Bigtable::V2::Value, ::Hash}]
|
|
1484
|
+
# Optional. This map provides the runtime values returned by the
|
|
1485
|
+
# VIEW_PARAMETERS() function calls, typically used for user-level scoping of
|
|
1486
|
+
# data based on identity.
|
|
1487
|
+
#
|
|
1488
|
+
# The key is the name of the view parameter e.g. `user_id`, and
|
|
1489
|
+
# the value is the parameter value e.g. `alice@example.com`.
|
|
1475
1490
|
#
|
|
1476
1491
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
1477
1492
|
# @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::ExecuteQueryResponse>]
|
|
@@ -1544,6 +1559,333 @@ module Google
|
|
|
1544
1559
|
raise ::Google::Cloud::Error.from_error(e)
|
|
1545
1560
|
end
|
|
1546
1561
|
|
|
1562
|
+
##
|
|
1563
|
+
# This RPC is only intended to be used by the official Cloud Bigtable client
|
|
1564
|
+
# libraries to implement the Bigtable Session based protocol. It is subject
|
|
1565
|
+
# to change without notice.
|
|
1566
|
+
#
|
|
1567
|
+
# @overload get_client_configuration(request, options = nil)
|
|
1568
|
+
# Pass arguments to `get_client_configuration` via a request object, either of type
|
|
1569
|
+
# {::Google::Cloud::Bigtable::V2::GetClientConfigurationRequest} or an equivalent Hash.
|
|
1570
|
+
#
|
|
1571
|
+
# @param request [::Google::Cloud::Bigtable::V2::GetClientConfigurationRequest, ::Hash]
|
|
1572
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1573
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1574
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1575
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1576
|
+
#
|
|
1577
|
+
# @overload get_client_configuration(instance_name: nil, app_profile_id: nil)
|
|
1578
|
+
# Pass arguments to `get_client_configuration` via keyword arguments. Note that at
|
|
1579
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1580
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1581
|
+
#
|
|
1582
|
+
# @param instance_name [::String]
|
|
1583
|
+
# Required. The unique name of the instance for which the client will target
|
|
1584
|
+
# with Data API requests.
|
|
1585
|
+
#
|
|
1586
|
+
# Values are of the form `projects/<project>/instances/<instance>`
|
|
1587
|
+
# @param app_profile_id [::String]
|
|
1588
|
+
# Optional. The name of the AppProfile which will be used by the client when
|
|
1589
|
+
# sending requests in the Data API.
|
|
1590
|
+
#
|
|
1591
|
+
# If not specified, the `default` application profile will be used.
|
|
1592
|
+
#
|
|
1593
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1594
|
+
# @yieldparam response [::Google::Cloud::Bigtable::V2::ClientConfiguration]
|
|
1595
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1596
|
+
#
|
|
1597
|
+
# @return [::Google::Cloud::Bigtable::V2::ClientConfiguration]
|
|
1598
|
+
#
|
|
1599
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1600
|
+
#
|
|
1601
|
+
# @example Basic example
|
|
1602
|
+
# require "google/cloud/bigtable/v2"
|
|
1603
|
+
#
|
|
1604
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1605
|
+
# client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
|
1606
|
+
#
|
|
1607
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1608
|
+
# request = Google::Cloud::Bigtable::V2::GetClientConfigurationRequest.new
|
|
1609
|
+
#
|
|
1610
|
+
# # Call the get_client_configuration method.
|
|
1611
|
+
# result = client.get_client_configuration request
|
|
1612
|
+
#
|
|
1613
|
+
# # The returned object is of type Google::Cloud::Bigtable::V2::ClientConfiguration.
|
|
1614
|
+
# p result
|
|
1615
|
+
#
|
|
1616
|
+
def get_client_configuration request, options = nil
|
|
1617
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1618
|
+
|
|
1619
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::GetClientConfigurationRequest
|
|
1620
|
+
|
|
1621
|
+
# Converts hash and nil to an options object
|
|
1622
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1623
|
+
|
|
1624
|
+
# Customize the options with defaults
|
|
1625
|
+
metadata = @config.rpcs.get_client_configuration.metadata.to_h
|
|
1626
|
+
|
|
1627
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1628
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1629
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1630
|
+
gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
|
|
1631
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1632
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1633
|
+
|
|
1634
|
+
options.apply_defaults timeout: @config.rpcs.get_client_configuration.timeout,
|
|
1635
|
+
metadata: metadata,
|
|
1636
|
+
retry_policy: @config.rpcs.get_client_configuration.retry_policy
|
|
1637
|
+
|
|
1638
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1639
|
+
metadata: @config.metadata,
|
|
1640
|
+
retry_policy: @config.retry_policy
|
|
1641
|
+
|
|
1642
|
+
@bigtable_stub.call_rpc :get_client_configuration, request, options: options do |response, operation|
|
|
1643
|
+
yield response, operation if block_given?
|
|
1644
|
+
end
|
|
1645
|
+
rescue ::GRPC::BadStatus => e
|
|
1646
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1647
|
+
end
|
|
1648
|
+
|
|
1649
|
+
##
|
|
1650
|
+
# This RPC is only intended to be used by the official Cloud Bigtable client
|
|
1651
|
+
# libraries to implement the Bigtable Session based protocol. It is subject
|
|
1652
|
+
# to change without notice.
|
|
1653
|
+
#
|
|
1654
|
+
# @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Bigtable::V2::SessionRequest, ::Hash>]
|
|
1655
|
+
# An enumerable of {::Google::Cloud::Bigtable::V2::SessionRequest} instances.
|
|
1656
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1657
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1658
|
+
#
|
|
1659
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1660
|
+
# @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::SessionResponse>]
|
|
1661
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1662
|
+
#
|
|
1663
|
+
# @return [::Enumerable<::Google::Cloud::Bigtable::V2::SessionResponse>]
|
|
1664
|
+
#
|
|
1665
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1666
|
+
#
|
|
1667
|
+
# @example Basic example
|
|
1668
|
+
# require "google/cloud/bigtable/v2"
|
|
1669
|
+
#
|
|
1670
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1671
|
+
# client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
|
1672
|
+
#
|
|
1673
|
+
# # Create an input stream.
|
|
1674
|
+
# input = Gapic::StreamInput.new
|
|
1675
|
+
#
|
|
1676
|
+
# # Call the open_table method to start streaming.
|
|
1677
|
+
# output = client.open_table input
|
|
1678
|
+
#
|
|
1679
|
+
# # Send requests on the stream. For each request object, set fields by
|
|
1680
|
+
# # passing keyword arguments. Be sure to close the stream when done.
|
|
1681
|
+
# input << Google::Cloud::Bigtable::V2::SessionRequest.new
|
|
1682
|
+
# input << Google::Cloud::Bigtable::V2::SessionRequest.new
|
|
1683
|
+
# input.close
|
|
1684
|
+
#
|
|
1685
|
+
# # The returned object is a streamed enumerable yielding elements of type
|
|
1686
|
+
# # ::Google::Cloud::Bigtable::V2::SessionResponse
|
|
1687
|
+
# output.each do |current_response|
|
|
1688
|
+
# p current_response
|
|
1689
|
+
# end
|
|
1690
|
+
#
|
|
1691
|
+
def open_table request, options = nil
|
|
1692
|
+
unless request.is_a? ::Enumerable
|
|
1693
|
+
raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum
|
|
1694
|
+
request = request.to_enum
|
|
1695
|
+
end
|
|
1696
|
+
|
|
1697
|
+
request = request.lazy.map do |req|
|
|
1698
|
+
::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Bigtable::V2::SessionRequest
|
|
1699
|
+
end
|
|
1700
|
+
|
|
1701
|
+
# Converts hash and nil to an options object
|
|
1702
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1703
|
+
|
|
1704
|
+
# Customize the options with defaults
|
|
1705
|
+
metadata = @config.rpcs.open_table.metadata.to_h
|
|
1706
|
+
|
|
1707
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1708
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1709
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1710
|
+
gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
|
|
1711
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1712
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1713
|
+
|
|
1714
|
+
options.apply_defaults timeout: @config.rpcs.open_table.timeout,
|
|
1715
|
+
metadata: metadata,
|
|
1716
|
+
retry_policy: @config.rpcs.open_table.retry_policy
|
|
1717
|
+
|
|
1718
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1719
|
+
metadata: @config.metadata,
|
|
1720
|
+
retry_policy: @config.retry_policy
|
|
1721
|
+
|
|
1722
|
+
@bigtable_stub.call_rpc :open_table, request, options: options do |response, operation|
|
|
1723
|
+
yield response, operation if block_given?
|
|
1724
|
+
end
|
|
1725
|
+
rescue ::GRPC::BadStatus => e
|
|
1726
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1727
|
+
end
|
|
1728
|
+
|
|
1729
|
+
##
|
|
1730
|
+
# This RPC is only intended to be used by the official Cloud Bigtable client
|
|
1731
|
+
# libraries to implement the Bigtable Session based protocol. It is subject
|
|
1732
|
+
# to change without notice.
|
|
1733
|
+
#
|
|
1734
|
+
# @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Bigtable::V2::SessionRequest, ::Hash>]
|
|
1735
|
+
# An enumerable of {::Google::Cloud::Bigtable::V2::SessionRequest} instances.
|
|
1736
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1737
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1738
|
+
#
|
|
1739
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1740
|
+
# @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::SessionResponse>]
|
|
1741
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1742
|
+
#
|
|
1743
|
+
# @return [::Enumerable<::Google::Cloud::Bigtable::V2::SessionResponse>]
|
|
1744
|
+
#
|
|
1745
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1746
|
+
#
|
|
1747
|
+
# @example Basic example
|
|
1748
|
+
# require "google/cloud/bigtable/v2"
|
|
1749
|
+
#
|
|
1750
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1751
|
+
# client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
|
1752
|
+
#
|
|
1753
|
+
# # Create an input stream.
|
|
1754
|
+
# input = Gapic::StreamInput.new
|
|
1755
|
+
#
|
|
1756
|
+
# # Call the open_authorized_view method to start streaming.
|
|
1757
|
+
# output = client.open_authorized_view input
|
|
1758
|
+
#
|
|
1759
|
+
# # Send requests on the stream. For each request object, set fields by
|
|
1760
|
+
# # passing keyword arguments. Be sure to close the stream when done.
|
|
1761
|
+
# input << Google::Cloud::Bigtable::V2::SessionRequest.new
|
|
1762
|
+
# input << Google::Cloud::Bigtable::V2::SessionRequest.new
|
|
1763
|
+
# input.close
|
|
1764
|
+
#
|
|
1765
|
+
# # The returned object is a streamed enumerable yielding elements of type
|
|
1766
|
+
# # ::Google::Cloud::Bigtable::V2::SessionResponse
|
|
1767
|
+
# output.each do |current_response|
|
|
1768
|
+
# p current_response
|
|
1769
|
+
# end
|
|
1770
|
+
#
|
|
1771
|
+
def open_authorized_view request, options = nil
|
|
1772
|
+
unless request.is_a? ::Enumerable
|
|
1773
|
+
raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum
|
|
1774
|
+
request = request.to_enum
|
|
1775
|
+
end
|
|
1776
|
+
|
|
1777
|
+
request = request.lazy.map do |req|
|
|
1778
|
+
::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Bigtable::V2::SessionRequest
|
|
1779
|
+
end
|
|
1780
|
+
|
|
1781
|
+
# Converts hash and nil to an options object
|
|
1782
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1783
|
+
|
|
1784
|
+
# Customize the options with defaults
|
|
1785
|
+
metadata = @config.rpcs.open_authorized_view.metadata.to_h
|
|
1786
|
+
|
|
1787
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1788
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1789
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1790
|
+
gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
|
|
1791
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1792
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1793
|
+
|
|
1794
|
+
options.apply_defaults timeout: @config.rpcs.open_authorized_view.timeout,
|
|
1795
|
+
metadata: metadata,
|
|
1796
|
+
retry_policy: @config.rpcs.open_authorized_view.retry_policy
|
|
1797
|
+
|
|
1798
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1799
|
+
metadata: @config.metadata,
|
|
1800
|
+
retry_policy: @config.retry_policy
|
|
1801
|
+
|
|
1802
|
+
@bigtable_stub.call_rpc :open_authorized_view, request, options: options do |response, operation|
|
|
1803
|
+
yield response, operation if block_given?
|
|
1804
|
+
end
|
|
1805
|
+
rescue ::GRPC::BadStatus => e
|
|
1806
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1807
|
+
end
|
|
1808
|
+
|
|
1809
|
+
##
|
|
1810
|
+
# This RPC is only intended to be used by the official Cloud Bigtable client
|
|
1811
|
+
# libraries to implement the Bigtable Session based protocol. It is subject
|
|
1812
|
+
# to change without notice.
|
|
1813
|
+
#
|
|
1814
|
+
# @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Bigtable::V2::SessionRequest, ::Hash>]
|
|
1815
|
+
# An enumerable of {::Google::Cloud::Bigtable::V2::SessionRequest} instances.
|
|
1816
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1817
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1818
|
+
#
|
|
1819
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1820
|
+
# @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::SessionResponse>]
|
|
1821
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1822
|
+
#
|
|
1823
|
+
# @return [::Enumerable<::Google::Cloud::Bigtable::V2::SessionResponse>]
|
|
1824
|
+
#
|
|
1825
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1826
|
+
#
|
|
1827
|
+
# @example Basic example
|
|
1828
|
+
# require "google/cloud/bigtable/v2"
|
|
1829
|
+
#
|
|
1830
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1831
|
+
# client = Google::Cloud::Bigtable::V2::Bigtable::Client.new
|
|
1832
|
+
#
|
|
1833
|
+
# # Create an input stream.
|
|
1834
|
+
# input = Gapic::StreamInput.new
|
|
1835
|
+
#
|
|
1836
|
+
# # Call the open_materialized_view method to start streaming.
|
|
1837
|
+
# output = client.open_materialized_view input
|
|
1838
|
+
#
|
|
1839
|
+
# # Send requests on the stream. For each request object, set fields by
|
|
1840
|
+
# # passing keyword arguments. Be sure to close the stream when done.
|
|
1841
|
+
# input << Google::Cloud::Bigtable::V2::SessionRequest.new
|
|
1842
|
+
# input << Google::Cloud::Bigtable::V2::SessionRequest.new
|
|
1843
|
+
# input.close
|
|
1844
|
+
#
|
|
1845
|
+
# # The returned object is a streamed enumerable yielding elements of type
|
|
1846
|
+
# # ::Google::Cloud::Bigtable::V2::SessionResponse
|
|
1847
|
+
# output.each do |current_response|
|
|
1848
|
+
# p current_response
|
|
1849
|
+
# end
|
|
1850
|
+
#
|
|
1851
|
+
def open_materialized_view request, options = nil
|
|
1852
|
+
unless request.is_a? ::Enumerable
|
|
1853
|
+
raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum
|
|
1854
|
+
request = request.to_enum
|
|
1855
|
+
end
|
|
1856
|
+
|
|
1857
|
+
request = request.lazy.map do |req|
|
|
1858
|
+
::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Bigtable::V2::SessionRequest
|
|
1859
|
+
end
|
|
1860
|
+
|
|
1861
|
+
# Converts hash and nil to an options object
|
|
1862
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1863
|
+
|
|
1864
|
+
# Customize the options with defaults
|
|
1865
|
+
metadata = @config.rpcs.open_materialized_view.metadata.to_h
|
|
1866
|
+
|
|
1867
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1868
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1869
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1870
|
+
gapic_version: ::Google::Cloud::Bigtable::V2::VERSION
|
|
1871
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1872
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1873
|
+
|
|
1874
|
+
options.apply_defaults timeout: @config.rpcs.open_materialized_view.timeout,
|
|
1875
|
+
metadata: metadata,
|
|
1876
|
+
retry_policy: @config.rpcs.open_materialized_view.retry_policy
|
|
1877
|
+
|
|
1878
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1879
|
+
metadata: @config.metadata,
|
|
1880
|
+
retry_policy: @config.retry_policy
|
|
1881
|
+
|
|
1882
|
+
@bigtable_stub.call_rpc :open_materialized_view, request, options: options do |response, operation|
|
|
1883
|
+
yield response, operation if block_given?
|
|
1884
|
+
end
|
|
1885
|
+
rescue ::GRPC::BadStatus => e
|
|
1886
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1887
|
+
end
|
|
1888
|
+
|
|
1547
1889
|
##
|
|
1548
1890
|
# Configuration class for the Bigtable API.
|
|
1549
1891
|
#
|
|
@@ -1782,6 +2124,26 @@ module Google
|
|
|
1782
2124
|
# @return [::Gapic::Config::Method]
|
|
1783
2125
|
#
|
|
1784
2126
|
attr_reader :execute_query
|
|
2127
|
+
##
|
|
2128
|
+
# RPC-specific configuration for `get_client_configuration`
|
|
2129
|
+
# @return [::Gapic::Config::Method]
|
|
2130
|
+
#
|
|
2131
|
+
attr_reader :get_client_configuration
|
|
2132
|
+
##
|
|
2133
|
+
# RPC-specific configuration for `open_table`
|
|
2134
|
+
# @return [::Gapic::Config::Method]
|
|
2135
|
+
#
|
|
2136
|
+
attr_reader :open_table
|
|
2137
|
+
##
|
|
2138
|
+
# RPC-specific configuration for `open_authorized_view`
|
|
2139
|
+
# @return [::Gapic::Config::Method]
|
|
2140
|
+
#
|
|
2141
|
+
attr_reader :open_authorized_view
|
|
2142
|
+
##
|
|
2143
|
+
# RPC-specific configuration for `open_materialized_view`
|
|
2144
|
+
# @return [::Gapic::Config::Method]
|
|
2145
|
+
#
|
|
2146
|
+
attr_reader :open_materialized_view
|
|
1785
2147
|
|
|
1786
2148
|
# @private
|
|
1787
2149
|
def initialize parent_rpcs = nil
|
|
@@ -1807,6 +2169,14 @@ module Google
|
|
|
1807
2169
|
@prepare_query = ::Gapic::Config::Method.new prepare_query_config
|
|
1808
2170
|
execute_query_config = parent_rpcs.execute_query if parent_rpcs.respond_to? :execute_query
|
|
1809
2171
|
@execute_query = ::Gapic::Config::Method.new execute_query_config
|
|
2172
|
+
get_client_configuration_config = parent_rpcs.get_client_configuration if parent_rpcs.respond_to? :get_client_configuration
|
|
2173
|
+
@get_client_configuration = ::Gapic::Config::Method.new get_client_configuration_config
|
|
2174
|
+
open_table_config = parent_rpcs.open_table if parent_rpcs.respond_to? :open_table
|
|
2175
|
+
@open_table = ::Gapic::Config::Method.new open_table_config
|
|
2176
|
+
open_authorized_view_config = parent_rpcs.open_authorized_view if parent_rpcs.respond_to? :open_authorized_view
|
|
2177
|
+
@open_authorized_view = ::Gapic::Config::Method.new open_authorized_view_config
|
|
2178
|
+
open_materialized_view_config = parent_rpcs.open_materialized_view if parent_rpcs.respond_to? :open_materialized_view
|
|
2179
|
+
@open_materialized_view = ::Gapic::Config::Method.new open_materialized_view_config
|
|
1810
2180
|
|
|
1811
2181
|
yield self if block_given?
|
|
1812
2182
|
end
|