google-cloud-bigquery-analytics_hub-v1 0.13.0 → 0.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.
@@ -954,6 +954,286 @@ module Google
954
954
  end
955
955
  end
956
956
 
957
+ ##
958
+ # Baseline implementation for the create_query_template REST call
959
+ #
960
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest]
961
+ # A request object representing the call parameters. Required.
962
+ # @param options [::Gapic::CallOptions]
963
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
964
+ #
965
+ # @yield [result, operation] Access the result along with the TransportOperation object
966
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate]
967
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
968
+ #
969
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate]
970
+ # A result object deserialized from the server's reply
971
+ def create_query_template request_pb, options = nil
972
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
973
+
974
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_query_template_request request_pb
975
+ query_string_params = if query_string_params.any?
976
+ query_string_params.to_h { |p| p.split "=", 2 }
977
+ else
978
+ {}
979
+ end
980
+
981
+ response = @client_stub.make_http_request(
982
+ verb,
983
+ uri: uri,
984
+ body: body || "",
985
+ params: query_string_params,
986
+ method_name: "create_query_template",
987
+ options: options
988
+ )
989
+ operation = ::Gapic::Rest::TransportOperation.new response
990
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true
991
+ catch :response do
992
+ yield result, operation if block_given?
993
+ result
994
+ end
995
+ end
996
+
997
+ ##
998
+ # Baseline implementation for the get_query_template REST call
999
+ #
1000
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest]
1001
+ # A request object representing the call parameters. Required.
1002
+ # @param options [::Gapic::CallOptions]
1003
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1004
+ #
1005
+ # @yield [result, operation] Access the result along with the TransportOperation object
1006
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate]
1007
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1008
+ #
1009
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate]
1010
+ # A result object deserialized from the server's reply
1011
+ def get_query_template request_pb, options = nil
1012
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1013
+
1014
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_query_template_request request_pb
1015
+ query_string_params = if query_string_params.any?
1016
+ query_string_params.to_h { |p| p.split "=", 2 }
1017
+ else
1018
+ {}
1019
+ end
1020
+
1021
+ response = @client_stub.make_http_request(
1022
+ verb,
1023
+ uri: uri,
1024
+ body: body || "",
1025
+ params: query_string_params,
1026
+ method_name: "get_query_template",
1027
+ options: options
1028
+ )
1029
+ operation = ::Gapic::Rest::TransportOperation.new response
1030
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true
1031
+ catch :response do
1032
+ yield result, operation if block_given?
1033
+ result
1034
+ end
1035
+ end
1036
+
1037
+ ##
1038
+ # Baseline implementation for the list_query_templates REST call
1039
+ #
1040
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest]
1041
+ # A request object representing the call parameters. Required.
1042
+ # @param options [::Gapic::CallOptions]
1043
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1044
+ #
1045
+ # @yield [result, operation] Access the result along with the TransportOperation object
1046
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse]
1047
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1048
+ #
1049
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse]
1050
+ # A result object deserialized from the server's reply
1051
+ def list_query_templates request_pb, options = nil
1052
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1053
+
1054
+ verb, uri, query_string_params, body = ServiceStub.transcode_list_query_templates_request request_pb
1055
+ query_string_params = if query_string_params.any?
1056
+ query_string_params.to_h { |p| p.split "=", 2 }
1057
+ else
1058
+ {}
1059
+ end
1060
+
1061
+ response = @client_stub.make_http_request(
1062
+ verb,
1063
+ uri: uri,
1064
+ body: body || "",
1065
+ params: query_string_params,
1066
+ method_name: "list_query_templates",
1067
+ options: options
1068
+ )
1069
+ operation = ::Gapic::Rest::TransportOperation.new response
1070
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesResponse.decode_json response.body, ignore_unknown_fields: true
1071
+ catch :response do
1072
+ yield result, operation if block_given?
1073
+ result
1074
+ end
1075
+ end
1076
+
1077
+ ##
1078
+ # Baseline implementation for the update_query_template REST call
1079
+ #
1080
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest]
1081
+ # A request object representing the call parameters. Required.
1082
+ # @param options [::Gapic::CallOptions]
1083
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1084
+ #
1085
+ # @yield [result, operation] Access the result along with the TransportOperation object
1086
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate]
1087
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1088
+ #
1089
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate]
1090
+ # A result object deserialized from the server's reply
1091
+ def update_query_template request_pb, options = nil
1092
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1093
+
1094
+ verb, uri, query_string_params, body = ServiceStub.transcode_update_query_template_request request_pb
1095
+ query_string_params = if query_string_params.any?
1096
+ query_string_params.to_h { |p| p.split "=", 2 }
1097
+ else
1098
+ {}
1099
+ end
1100
+
1101
+ response = @client_stub.make_http_request(
1102
+ verb,
1103
+ uri: uri,
1104
+ body: body || "",
1105
+ params: query_string_params,
1106
+ method_name: "update_query_template",
1107
+ options: options
1108
+ )
1109
+ operation = ::Gapic::Rest::TransportOperation.new response
1110
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true
1111
+ catch :response do
1112
+ yield result, operation if block_given?
1113
+ result
1114
+ end
1115
+ end
1116
+
1117
+ ##
1118
+ # Baseline implementation for the delete_query_template REST call
1119
+ #
1120
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest]
1121
+ # A request object representing the call parameters. Required.
1122
+ # @param options [::Gapic::CallOptions]
1123
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1124
+ #
1125
+ # @yield [result, operation] Access the result along with the TransportOperation object
1126
+ # @yieldparam result [::Google::Protobuf::Empty]
1127
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1128
+ #
1129
+ # @return [::Google::Protobuf::Empty]
1130
+ # A result object deserialized from the server's reply
1131
+ def delete_query_template request_pb, options = nil
1132
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1133
+
1134
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_query_template_request request_pb
1135
+ query_string_params = if query_string_params.any?
1136
+ query_string_params.to_h { |p| p.split "=", 2 }
1137
+ else
1138
+ {}
1139
+ end
1140
+
1141
+ response = @client_stub.make_http_request(
1142
+ verb,
1143
+ uri: uri,
1144
+ body: body || "",
1145
+ params: query_string_params,
1146
+ method_name: "delete_query_template",
1147
+ options: options
1148
+ )
1149
+ operation = ::Gapic::Rest::TransportOperation.new response
1150
+ result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
1151
+ catch :response do
1152
+ yield result, operation if block_given?
1153
+ result
1154
+ end
1155
+ end
1156
+
1157
+ ##
1158
+ # Baseline implementation for the submit_query_template REST call
1159
+ #
1160
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest]
1161
+ # A request object representing the call parameters. Required.
1162
+ # @param options [::Gapic::CallOptions]
1163
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1164
+ #
1165
+ # @yield [result, operation] Access the result along with the TransportOperation object
1166
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate]
1167
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1168
+ #
1169
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate]
1170
+ # A result object deserialized from the server's reply
1171
+ def submit_query_template request_pb, options = nil
1172
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1173
+
1174
+ verb, uri, query_string_params, body = ServiceStub.transcode_submit_query_template_request request_pb
1175
+ query_string_params = if query_string_params.any?
1176
+ query_string_params.to_h { |p| p.split "=", 2 }
1177
+ else
1178
+ {}
1179
+ end
1180
+
1181
+ response = @client_stub.make_http_request(
1182
+ verb,
1183
+ uri: uri,
1184
+ body: body || "",
1185
+ params: query_string_params,
1186
+ method_name: "submit_query_template",
1187
+ options: options
1188
+ )
1189
+ operation = ::Gapic::Rest::TransportOperation.new response
1190
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true
1191
+ catch :response do
1192
+ yield result, operation if block_given?
1193
+ result
1194
+ end
1195
+ end
1196
+
1197
+ ##
1198
+ # Baseline implementation for the approve_query_template REST call
1199
+ #
1200
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest]
1201
+ # A request object representing the call parameters. Required.
1202
+ # @param options [::Gapic::CallOptions]
1203
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1204
+ #
1205
+ # @yield [result, operation] Access the result along with the TransportOperation object
1206
+ # @yieldparam result [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate]
1207
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1208
+ #
1209
+ # @return [::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate]
1210
+ # A result object deserialized from the server's reply
1211
+ def approve_query_template request_pb, options = nil
1212
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
1213
+
1214
+ verb, uri, query_string_params, body = ServiceStub.transcode_approve_query_template_request request_pb
1215
+ query_string_params = if query_string_params.any?
1216
+ query_string_params.to_h { |p| p.split "=", 2 }
1217
+ else
1218
+ {}
1219
+ end
1220
+
1221
+ response = @client_stub.make_http_request(
1222
+ verb,
1223
+ uri: uri,
1224
+ body: body || "",
1225
+ params: query_string_params,
1226
+ method_name: "approve_query_template",
1227
+ options: options
1228
+ )
1229
+ operation = ::Gapic::Rest::TransportOperation.new response
1230
+ result = ::Google::Cloud::Bigquery::AnalyticsHub::V1::QueryTemplate.decode_json response.body, ignore_unknown_fields: true
1231
+ catch :response do
1232
+ yield result, operation if block_given?
1233
+ result
1234
+ end
1235
+ end
1236
+
957
1237
  ##
958
1238
  # @private
959
1239
  #
@@ -1473,6 +1753,157 @@ module Google
1473
1753
  )
1474
1754
  transcoder.transcode request_pb
1475
1755
  end
1756
+
1757
+ ##
1758
+ # @private
1759
+ #
1760
+ # GRPC transcoding helper method for the create_query_template REST call
1761
+ #
1762
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::CreateQueryTemplateRequest]
1763
+ # A request object representing the call parameters. Required.
1764
+ # @return [Array(String, [String, nil], Hash{String => String})]
1765
+ # Uri, Body, Query string parameters
1766
+ def self.transcode_create_query_template_request request_pb
1767
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1768
+ .with_bindings(
1769
+ uri_method: :post,
1770
+ uri_template: "/v1/{parent}/queryTemplates",
1771
+ body: "query_template",
1772
+ matches: [
1773
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
1774
+ ]
1775
+ )
1776
+ transcoder.transcode request_pb
1777
+ end
1778
+
1779
+ ##
1780
+ # @private
1781
+ #
1782
+ # GRPC transcoding helper method for the get_query_template REST call
1783
+ #
1784
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::GetQueryTemplateRequest]
1785
+ # A request object representing the call parameters. Required.
1786
+ # @return [Array(String, [String, nil], Hash{String => String})]
1787
+ # Uri, Body, Query string parameters
1788
+ def self.transcode_get_query_template_request request_pb
1789
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1790
+ .with_bindings(
1791
+ uri_method: :get,
1792
+ uri_template: "/v1/{name}",
1793
+ matches: [
1794
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false]
1795
+ ]
1796
+ )
1797
+ transcoder.transcode request_pb
1798
+ end
1799
+
1800
+ ##
1801
+ # @private
1802
+ #
1803
+ # GRPC transcoding helper method for the list_query_templates REST call
1804
+ #
1805
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ListQueryTemplatesRequest]
1806
+ # A request object representing the call parameters. Required.
1807
+ # @return [Array(String, [String, nil], Hash{String => String})]
1808
+ # Uri, Body, Query string parameters
1809
+ def self.transcode_list_query_templates_request request_pb
1810
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1811
+ .with_bindings(
1812
+ uri_method: :get,
1813
+ uri_template: "/v1/{parent}/queryTemplates",
1814
+ matches: [
1815
+ ["parent", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/?$}, false]
1816
+ ]
1817
+ )
1818
+ transcoder.transcode request_pb
1819
+ end
1820
+
1821
+ ##
1822
+ # @private
1823
+ #
1824
+ # GRPC transcoding helper method for the update_query_template REST call
1825
+ #
1826
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::UpdateQueryTemplateRequest]
1827
+ # A request object representing the call parameters. Required.
1828
+ # @return [Array(String, [String, nil], Hash{String => String})]
1829
+ # Uri, Body, Query string parameters
1830
+ def self.transcode_update_query_template_request request_pb
1831
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1832
+ .with_bindings(
1833
+ uri_method: :patch,
1834
+ uri_template: "/v1/{query_template.name}",
1835
+ body: "query_template",
1836
+ matches: [
1837
+ ["query_template.name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false]
1838
+ ]
1839
+ )
1840
+ transcoder.transcode request_pb
1841
+ end
1842
+
1843
+ ##
1844
+ # @private
1845
+ #
1846
+ # GRPC transcoding helper method for the delete_query_template REST call
1847
+ #
1848
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::DeleteQueryTemplateRequest]
1849
+ # A request object representing the call parameters. Required.
1850
+ # @return [Array(String, [String, nil], Hash{String => String})]
1851
+ # Uri, Body, Query string parameters
1852
+ def self.transcode_delete_query_template_request request_pb
1853
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1854
+ .with_bindings(
1855
+ uri_method: :delete,
1856
+ uri_template: "/v1/{name}",
1857
+ matches: [
1858
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false]
1859
+ ]
1860
+ )
1861
+ transcoder.transcode request_pb
1862
+ end
1863
+
1864
+ ##
1865
+ # @private
1866
+ #
1867
+ # GRPC transcoding helper method for the submit_query_template REST call
1868
+ #
1869
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::SubmitQueryTemplateRequest]
1870
+ # A request object representing the call parameters. Required.
1871
+ # @return [Array(String, [String, nil], Hash{String => String})]
1872
+ # Uri, Body, Query string parameters
1873
+ def self.transcode_submit_query_template_request request_pb
1874
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1875
+ .with_bindings(
1876
+ uri_method: :post,
1877
+ uri_template: "/v1/{name}:submit",
1878
+ body: "*",
1879
+ matches: [
1880
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false]
1881
+ ]
1882
+ )
1883
+ transcoder.transcode request_pb
1884
+ end
1885
+
1886
+ ##
1887
+ # @private
1888
+ #
1889
+ # GRPC transcoding helper method for the approve_query_template REST call
1890
+ #
1891
+ # @param request_pb [::Google::Cloud::Bigquery::AnalyticsHub::V1::ApproveQueryTemplateRequest]
1892
+ # A request object representing the call parameters. Required.
1893
+ # @return [Array(String, [String, nil], Hash{String => String})]
1894
+ # Uri, Body, Query string parameters
1895
+ def self.transcode_approve_query_template_request request_pb
1896
+ transcoder = Gapic::Rest::GrpcTranscoder.new
1897
+ .with_bindings(
1898
+ uri_method: :post,
1899
+ uri_template: "/v1/{name}:approve",
1900
+ body: "*",
1901
+ matches: [
1902
+ ["name", %r{^projects/[^/]+/locations/[^/]+/dataExchanges/[^/]+/queryTemplates/[^/]+/?$}, false]
1903
+ ]
1904
+ )
1905
+ transcoder.transcode request_pb
1906
+ end
1476
1907
  end
1477
1908
  end
1478
1909
  end
@@ -22,7 +22,7 @@ module Google
22
22
  module Bigquery
23
23
  module AnalyticsHub
24
24
  module V1
25
- VERSION = "0.13.0"
25
+ VERSION = "0.14.0"
26
26
  end
27
27
  end
28
28
  end