google-cloud-dataform-v1beta1 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -153,15 +153,27 @@ module Google
153
153
  endpoint: @config.endpoint,
154
154
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
155
155
  universe_domain: @config.universe_domain,
156
- credentials: credentials
156
+ credentials: credentials,
157
+ logger: @config.logger
157
158
  )
158
159
 
160
+ @dataform_stub.logger(stub: true)&.info do |entry|
161
+ entry.set_system_name
162
+ entry.set_service
163
+ entry.message = "Created client for #{entry.service}"
164
+ entry.set_credentials_fields credentials
165
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
166
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
167
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
168
+ end
169
+
159
170
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
160
171
  config.credentials = credentials
161
172
  config.quota_project = @quota_project_id
162
173
  config.endpoint = @dataform_stub.endpoint
163
174
  config.universe_domain = @dataform_stub.universe_domain
164
175
  config.bindings_override = @config.bindings_override
176
+ config.logger = @dataform_stub.logger if config.respond_to? :logger=
165
177
  end
166
178
 
167
179
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -170,6 +182,7 @@ module Google
170
182
  config.endpoint = @dataform_stub.endpoint
171
183
  config.universe_domain = @dataform_stub.universe_domain
172
184
  config.bindings_override = @config.bindings_override
185
+ config.logger = @dataform_stub.logger if config.respond_to? :logger=
173
186
  end
174
187
  end
175
188
 
@@ -187,6 +200,15 @@ module Google
187
200
  #
188
201
  attr_reader :iam_policy_client
189
202
 
203
+ ##
204
+ # The logger used for request/response debug logging.
205
+ #
206
+ # @return [Logger]
207
+ #
208
+ def logger
209
+ @dataform_stub.logger
210
+ end
211
+
190
212
  # Service calls
191
213
 
192
214
  ##
@@ -283,7 +305,6 @@ module Google
283
305
 
284
306
  @dataform_stub.list_repositories request, options do |result, operation|
285
307
  yield result, operation if block_given?
286
- return result
287
308
  end
288
309
  rescue ::Gapic::Rest::Error => e
289
310
  raise ::Google::Cloud::Error.from_error(e)
@@ -362,7 +383,6 @@ module Google
362
383
 
363
384
  @dataform_stub.get_repository request, options do |result, operation|
364
385
  yield result, operation if block_given?
365
- return result
366
386
  end
367
387
  rescue ::Gapic::Rest::Error => e
368
388
  raise ::Google::Cloud::Error.from_error(e)
@@ -447,7 +467,6 @@ module Google
447
467
 
448
468
  @dataform_stub.create_repository request, options do |result, operation|
449
469
  yield result, operation if block_given?
450
- return result
451
470
  end
452
471
  rescue ::Gapic::Rest::Error => e
453
472
  raise ::Google::Cloud::Error.from_error(e)
@@ -529,7 +548,6 @@ module Google
529
548
 
530
549
  @dataform_stub.update_repository request, options do |result, operation|
531
550
  yield result, operation if block_given?
532
- return result
533
551
  end
534
552
  rescue ::Gapic::Rest::Error => e
535
553
  raise ::Google::Cloud::Error.from_error(e)
@@ -612,7 +630,6 @@ module Google
612
630
 
613
631
  @dataform_stub.delete_repository request, options do |result, operation|
614
632
  yield result, operation if block_given?
615
- return result
616
633
  end
617
634
  rescue ::Gapic::Rest::Error => e
618
635
  raise ::Google::Cloud::Error.from_error(e)
@@ -701,7 +718,6 @@ module Google
701
718
 
702
719
  @dataform_stub.commit_repository_changes request, options do |result, operation|
703
720
  yield result, operation if block_given?
704
- return result
705
721
  end
706
722
  rescue ::Gapic::Rest::Error => e
707
723
  raise ::Google::Cloud::Error.from_error(e)
@@ -786,7 +802,6 @@ module Google
786
802
 
787
803
  @dataform_stub.read_repository_file request, options do |result, operation|
788
804
  yield result, operation if block_given?
789
- return result
790
805
  end
791
806
  rescue ::Gapic::Rest::Error => e
792
807
  raise ::Google::Cloud::Error.from_error(e)
@@ -889,7 +904,7 @@ module Google
889
904
  @dataform_stub.query_repository_directory_contents request, options do |result, operation|
890
905
  result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_repository_directory_contents, "directory_entries", request, result, options
891
906
  yield result, operation if block_given?
892
- return result
907
+ throw :response, result
893
908
  end
894
909
  rescue ::Gapic::Rest::Error => e
895
910
  raise ::Google::Cloud::Error.from_error(e)
@@ -984,7 +999,7 @@ module Google
984
999
  @dataform_stub.fetch_repository_history request, options do |result, operation|
985
1000
  result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :fetch_repository_history, "commits", request, result, options
986
1001
  yield result, operation if block_given?
987
- return result
1002
+ throw :response, result
988
1003
  end
989
1004
  rescue ::Gapic::Rest::Error => e
990
1005
  raise ::Google::Cloud::Error.from_error(e)
@@ -1063,7 +1078,6 @@ module Google
1063
1078
 
1064
1079
  @dataform_stub.compute_repository_access_token_status request, options do |result, operation|
1065
1080
  yield result, operation if block_given?
1066
- return result
1067
1081
  end
1068
1082
  rescue ::Gapic::Rest::Error => e
1069
1083
  raise ::Google::Cloud::Error.from_error(e)
@@ -1142,7 +1156,6 @@ module Google
1142
1156
 
1143
1157
  @dataform_stub.fetch_remote_branches request, options do |result, operation|
1144
1158
  yield result, operation if block_given?
1145
- return result
1146
1159
  end
1147
1160
  rescue ::Gapic::Rest::Error => e
1148
1161
  raise ::Google::Cloud::Error.from_error(e)
@@ -1242,7 +1255,6 @@ module Google
1242
1255
 
1243
1256
  @dataform_stub.list_workspaces request, options do |result, operation|
1244
1257
  yield result, operation if block_given?
1245
- return result
1246
1258
  end
1247
1259
  rescue ::Gapic::Rest::Error => e
1248
1260
  raise ::Google::Cloud::Error.from_error(e)
@@ -1321,7 +1333,6 @@ module Google
1321
1333
 
1322
1334
  @dataform_stub.get_workspace request, options do |result, operation|
1323
1335
  yield result, operation if block_given?
1324
- return result
1325
1336
  end
1326
1337
  rescue ::Gapic::Rest::Error => e
1327
1338
  raise ::Google::Cloud::Error.from_error(e)
@@ -1406,7 +1417,6 @@ module Google
1406
1417
 
1407
1418
  @dataform_stub.create_workspace request, options do |result, operation|
1408
1419
  yield result, operation if block_given?
1409
- return result
1410
1420
  end
1411
1421
  rescue ::Gapic::Rest::Error => e
1412
1422
  raise ::Google::Cloud::Error.from_error(e)
@@ -1485,7 +1495,6 @@ module Google
1485
1495
 
1486
1496
  @dataform_stub.delete_workspace request, options do |result, operation|
1487
1497
  yield result, operation if block_given?
1488
- return result
1489
1498
  end
1490
1499
  rescue ::Gapic::Rest::Error => e
1491
1500
  raise ::Google::Cloud::Error.from_error(e)
@@ -1564,7 +1573,6 @@ module Google
1564
1573
 
1565
1574
  @dataform_stub.install_npm_packages request, options do |result, operation|
1566
1575
  yield result, operation if block_given?
1567
- return result
1568
1576
  end
1569
1577
  rescue ::Gapic::Rest::Error => e
1570
1578
  raise ::Google::Cloud::Error.from_error(e)
@@ -1649,7 +1657,6 @@ module Google
1649
1657
 
1650
1658
  @dataform_stub.pull_git_commits request, options do |result, operation|
1651
1659
  yield result, operation if block_given?
1652
- return result
1653
1660
  end
1654
1661
  rescue ::Gapic::Rest::Error => e
1655
1662
  raise ::Google::Cloud::Error.from_error(e)
@@ -1732,7 +1739,6 @@ module Google
1732
1739
 
1733
1740
  @dataform_stub.push_git_commits request, options do |result, operation|
1734
1741
  yield result, operation if block_given?
1735
- return result
1736
1742
  end
1737
1743
  rescue ::Gapic::Rest::Error => e
1738
1744
  raise ::Google::Cloud::Error.from_error(e)
@@ -1811,7 +1817,6 @@ module Google
1811
1817
 
1812
1818
  @dataform_stub.fetch_file_git_statuses request, options do |result, operation|
1813
1819
  yield result, operation if block_given?
1814
- return result
1815
1820
  end
1816
1821
  rescue ::Gapic::Rest::Error => e
1817
1822
  raise ::Google::Cloud::Error.from_error(e)
@@ -1894,7 +1899,6 @@ module Google
1894
1899
 
1895
1900
  @dataform_stub.fetch_git_ahead_behind request, options do |result, operation|
1896
1901
  yield result, operation if block_given?
1897
- return result
1898
1902
  end
1899
1903
  rescue ::Gapic::Rest::Error => e
1900
1904
  raise ::Google::Cloud::Error.from_error(e)
@@ -1980,7 +1984,6 @@ module Google
1980
1984
 
1981
1985
  @dataform_stub.commit_workspace_changes request, options do |result, operation|
1982
1986
  yield result, operation if block_given?
1983
- return result
1984
1987
  end
1985
1988
  rescue ::Gapic::Rest::Error => e
1986
1989
  raise ::Google::Cloud::Error.from_error(e)
@@ -2064,7 +2067,6 @@ module Google
2064
2067
 
2065
2068
  @dataform_stub.reset_workspace_changes request, options do |result, operation|
2066
2069
  yield result, operation if block_given?
2067
- return result
2068
2070
  end
2069
2071
  rescue ::Gapic::Rest::Error => e
2070
2072
  raise ::Google::Cloud::Error.from_error(e)
@@ -2146,7 +2148,6 @@ module Google
2146
2148
 
2147
2149
  @dataform_stub.fetch_file_diff request, options do |result, operation|
2148
2150
  yield result, operation if block_given?
2149
- return result
2150
2151
  end
2151
2152
  rescue ::Gapic::Rest::Error => e
2152
2153
  raise ::Google::Cloud::Error.from_error(e)
@@ -2244,7 +2245,7 @@ module Google
2244
2245
  @dataform_stub.query_directory_contents request, options do |result, operation|
2245
2246
  result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_directory_contents, "directory_entries", request, result, options
2246
2247
  yield result, operation if block_given?
2247
- return result
2248
+ throw :response, result
2248
2249
  end
2249
2250
  rescue ::Gapic::Rest::Error => e
2250
2251
  raise ::Google::Cloud::Error.from_error(e)
@@ -2326,7 +2327,6 @@ module Google
2326
2327
 
2327
2328
  @dataform_stub.make_directory request, options do |result, operation|
2328
2329
  yield result, operation if block_given?
2329
- return result
2330
2330
  end
2331
2331
  rescue ::Gapic::Rest::Error => e
2332
2332
  raise ::Google::Cloud::Error.from_error(e)
@@ -2408,7 +2408,6 @@ module Google
2408
2408
 
2409
2409
  @dataform_stub.remove_directory request, options do |result, operation|
2410
2410
  yield result, operation if block_given?
2411
- return result
2412
2411
  end
2413
2412
  rescue ::Gapic::Rest::Error => e
2414
2413
  raise ::Google::Cloud::Error.from_error(e)
@@ -2494,7 +2493,6 @@ module Google
2494
2493
 
2495
2494
  @dataform_stub.move_directory request, options do |result, operation|
2496
2495
  yield result, operation if block_given?
2497
- return result
2498
2496
  end
2499
2497
  rescue ::Gapic::Rest::Error => e
2500
2498
  raise ::Google::Cloud::Error.from_error(e)
@@ -2576,7 +2574,6 @@ module Google
2576
2574
 
2577
2575
  @dataform_stub.read_file request, options do |result, operation|
2578
2576
  yield result, operation if block_given?
2579
- return result
2580
2577
  end
2581
2578
  rescue ::Gapic::Rest::Error => e
2582
2579
  raise ::Google::Cloud::Error.from_error(e)
@@ -2658,7 +2655,6 @@ module Google
2658
2655
 
2659
2656
  @dataform_stub.remove_file request, options do |result, operation|
2660
2657
  yield result, operation if block_given?
2661
- return result
2662
2658
  end
2663
2659
  rescue ::Gapic::Rest::Error => e
2664
2660
  raise ::Google::Cloud::Error.from_error(e)
@@ -2743,7 +2739,6 @@ module Google
2743
2739
 
2744
2740
  @dataform_stub.move_file request, options do |result, operation|
2745
2741
  yield result, operation if block_given?
2746
- return result
2747
2742
  end
2748
2743
  rescue ::Gapic::Rest::Error => e
2749
2744
  raise ::Google::Cloud::Error.from_error(e)
@@ -2826,7 +2821,6 @@ module Google
2826
2821
 
2827
2822
  @dataform_stub.write_file request, options do |result, operation|
2828
2823
  yield result, operation if block_given?
2829
- return result
2830
2824
  end
2831
2825
  rescue ::Gapic::Rest::Error => e
2832
2826
  raise ::Google::Cloud::Error.from_error(e)
@@ -2920,7 +2914,6 @@ module Google
2920
2914
 
2921
2915
  @dataform_stub.list_release_configs request, options do |result, operation|
2922
2916
  yield result, operation if block_given?
2923
- return result
2924
2917
  end
2925
2918
  rescue ::Gapic::Rest::Error => e
2926
2919
  raise ::Google::Cloud::Error.from_error(e)
@@ -2999,7 +2992,6 @@ module Google
2999
2992
 
3000
2993
  @dataform_stub.get_release_config request, options do |result, operation|
3001
2994
  yield result, operation if block_given?
3002
- return result
3003
2995
  end
3004
2996
  rescue ::Gapic::Rest::Error => e
3005
2997
  raise ::Google::Cloud::Error.from_error(e)
@@ -3084,7 +3076,6 @@ module Google
3084
3076
 
3085
3077
  @dataform_stub.create_release_config request, options do |result, operation|
3086
3078
  yield result, operation if block_given?
3087
- return result
3088
3079
  end
3089
3080
  rescue ::Gapic::Rest::Error => e
3090
3081
  raise ::Google::Cloud::Error.from_error(e)
@@ -3166,7 +3157,6 @@ module Google
3166
3157
 
3167
3158
  @dataform_stub.update_release_config request, options do |result, operation|
3168
3159
  yield result, operation if block_given?
3169
- return result
3170
3160
  end
3171
3161
  rescue ::Gapic::Rest::Error => e
3172
3162
  raise ::Google::Cloud::Error.from_error(e)
@@ -3245,7 +3235,6 @@ module Google
3245
3235
 
3246
3236
  @dataform_stub.delete_release_config request, options do |result, operation|
3247
3237
  yield result, operation if block_given?
3248
- return result
3249
3238
  end
3250
3239
  rescue ::Gapic::Rest::Error => e
3251
3240
  raise ::Google::Cloud::Error.from_error(e)
@@ -3339,7 +3328,6 @@ module Google
3339
3328
 
3340
3329
  @dataform_stub.list_compilation_results request, options do |result, operation|
3341
3330
  yield result, operation if block_given?
3342
- return result
3343
3331
  end
3344
3332
  rescue ::Gapic::Rest::Error => e
3345
3333
  raise ::Google::Cloud::Error.from_error(e)
@@ -3418,7 +3406,6 @@ module Google
3418
3406
 
3419
3407
  @dataform_stub.get_compilation_result request, options do |result, operation|
3420
3408
  yield result, operation if block_given?
3421
- return result
3422
3409
  end
3423
3410
  rescue ::Gapic::Rest::Error => e
3424
3411
  raise ::Google::Cloud::Error.from_error(e)
@@ -3500,7 +3487,6 @@ module Google
3500
3487
 
3501
3488
  @dataform_stub.create_compilation_result request, options do |result, operation|
3502
3489
  yield result, operation if block_given?
3503
- return result
3504
3490
  end
3505
3491
  rescue ::Gapic::Rest::Error => e
3506
3492
  raise ::Google::Cloud::Error.from_error(e)
@@ -3599,7 +3585,7 @@ module Google
3599
3585
  @dataform_stub.query_compilation_result_actions request, options do |result, operation|
3600
3586
  result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_compilation_result_actions, "compilation_result_actions", request, result, options
3601
3587
  yield result, operation if block_given?
3602
- return result
3588
+ throw :response, result
3603
3589
  end
3604
3590
  rescue ::Gapic::Rest::Error => e
3605
3591
  raise ::Google::Cloud::Error.from_error(e)
@@ -3693,7 +3679,6 @@ module Google
3693
3679
 
3694
3680
  @dataform_stub.list_workflow_configs request, options do |result, operation|
3695
3681
  yield result, operation if block_given?
3696
- return result
3697
3682
  end
3698
3683
  rescue ::Gapic::Rest::Error => e
3699
3684
  raise ::Google::Cloud::Error.from_error(e)
@@ -3772,7 +3757,6 @@ module Google
3772
3757
 
3773
3758
  @dataform_stub.get_workflow_config request, options do |result, operation|
3774
3759
  yield result, operation if block_given?
3775
- return result
3776
3760
  end
3777
3761
  rescue ::Gapic::Rest::Error => e
3778
3762
  raise ::Google::Cloud::Error.from_error(e)
@@ -3857,7 +3841,6 @@ module Google
3857
3841
 
3858
3842
  @dataform_stub.create_workflow_config request, options do |result, operation|
3859
3843
  yield result, operation if block_given?
3860
- return result
3861
3844
  end
3862
3845
  rescue ::Gapic::Rest::Error => e
3863
3846
  raise ::Google::Cloud::Error.from_error(e)
@@ -3939,7 +3922,6 @@ module Google
3939
3922
 
3940
3923
  @dataform_stub.update_workflow_config request, options do |result, operation|
3941
3924
  yield result, operation if block_given?
3942
- return result
3943
3925
  end
3944
3926
  rescue ::Gapic::Rest::Error => e
3945
3927
  raise ::Google::Cloud::Error.from_error(e)
@@ -4018,7 +4000,6 @@ module Google
4018
4000
 
4019
4001
  @dataform_stub.delete_workflow_config request, options do |result, operation|
4020
4002
  yield result, operation if block_given?
4021
- return result
4022
4003
  end
4023
4004
  rescue ::Gapic::Rest::Error => e
4024
4005
  raise ::Google::Cloud::Error.from_error(e)
@@ -4118,7 +4099,6 @@ module Google
4118
4099
 
4119
4100
  @dataform_stub.list_workflow_invocations request, options do |result, operation|
4120
4101
  yield result, operation if block_given?
4121
- return result
4122
4102
  end
4123
4103
  rescue ::Gapic::Rest::Error => e
4124
4104
  raise ::Google::Cloud::Error.from_error(e)
@@ -4197,7 +4177,6 @@ module Google
4197
4177
 
4198
4178
  @dataform_stub.get_workflow_invocation request, options do |result, operation|
4199
4179
  yield result, operation if block_given?
4200
- return result
4201
4180
  end
4202
4181
  rescue ::Gapic::Rest::Error => e
4203
4182
  raise ::Google::Cloud::Error.from_error(e)
@@ -4279,7 +4258,6 @@ module Google
4279
4258
 
4280
4259
  @dataform_stub.create_workflow_invocation request, options do |result, operation|
4281
4260
  yield result, operation if block_given?
4282
- return result
4283
4261
  end
4284
4262
  rescue ::Gapic::Rest::Error => e
4285
4263
  raise ::Google::Cloud::Error.from_error(e)
@@ -4358,7 +4336,6 @@ module Google
4358
4336
 
4359
4337
  @dataform_stub.delete_workflow_invocation request, options do |result, operation|
4360
4338
  yield result, operation if block_given?
4361
- return result
4362
4339
  end
4363
4340
  rescue ::Gapic::Rest::Error => e
4364
4341
  raise ::Google::Cloud::Error.from_error(e)
@@ -4437,7 +4414,6 @@ module Google
4437
4414
 
4438
4415
  @dataform_stub.cancel_workflow_invocation request, options do |result, operation|
4439
4416
  yield result, operation if block_given?
4440
- return result
4441
4417
  end
4442
4418
  rescue ::Gapic::Rest::Error => e
4443
4419
  raise ::Google::Cloud::Error.from_error(e)
@@ -4533,7 +4509,7 @@ module Google
4533
4509
  @dataform_stub.query_workflow_invocation_actions request, options do |result, operation|
4534
4510
  result = ::Gapic::Rest::PagedEnumerable.new @dataform_stub, :query_workflow_invocation_actions, "workflow_invocation_actions", request, result, options
4535
4511
  yield result, operation if block_given?
4536
- return result
4512
+ throw :response, result
4537
4513
  end
4538
4514
  rescue ::Gapic::Rest::Error => e
4539
4515
  raise ::Google::Cloud::Error.from_error(e)
@@ -4613,6 +4589,11 @@ module Google
4613
4589
  # default endpoint URL. The default value of nil uses the environment
4614
4590
  # universe (usually the default "googleapis.com" universe).
4615
4591
  # @return [::String,nil]
4592
+ # @!attribute [rw] logger
4593
+ # A custom logger to use for request/response debug logging, or the value
4594
+ # `:default` (the default) to construct a default logger, or `nil` to
4595
+ # explicitly disable logging.
4596
+ # @return [::Logger,:default,nil]
4616
4597
  #
4617
4598
  class Configuration
4618
4599
  extend ::Gapic::Config
@@ -4641,6 +4622,7 @@ module Google
4641
4622
  # by the host service.
4642
4623
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
4643
4624
  config_attr :bindings_override, {}, ::Hash, nil
4625
+ config_attr :logger, :default, ::Logger, nil, :default
4644
4626
 
4645
4627
  # @private
4646
4628
  def initialize parent_config = nil