google-cloud-bigquery 1.23.0 → 1.24.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89f8e3d756fc514c769c82a9a7db9f342626761d65607b5b837c29a691e27c28
4
- data.tar.gz: 93f69944889b1a3fd1ddf4a14e42b72c0d4842d905b6b055343928d0fec1a173
3
+ metadata.gz: 32f4b672ccecbbd45bfb9790fc4110a22244a6459c459aa40bb1c1b4b77c1094
4
+ data.tar.gz: 2ac69379fefad5547aac47be509a50945af647d7fe7b61e1653fc4dd9c9ca865
5
5
  SHA512:
6
- metadata.gz: c72ef2e170c0b2b0c897c0bab8c5e2e1e7694af1e0b1b3f19ce0e40acce6d07993bb39ecb5b90509bdcf8f8f1c66596ef4ea7801532bb25799cdd7b6edfa3bd0
7
- data.tar.gz: b22e6d9c70f1428d970c8f9fed8076194f4cf58872f56449a214ff46b93561e06d71ebcf8ecd1af18f1899c50c1130454b200870ea40919acda00e6e0ffc5dcb
6
+ metadata.gz: 9362e5d687de750ecdbdcbb131739116d3571c58db900fdf4748b6ce480f120670fce8901a8a9cfe83ddd53bbfd5e7866e396caff66e2151dc36a22dbabc3e7f
7
+ data.tar.gz: f08197d575142c5c5c16ba4c09e9d96af5ccb5e92fd9b0c11b87fe8431a0cac72bc2462e57ec6080a8c2d8c45b2f92b25a908cdbab35c3116e33f41b46b82559
@@ -1,5 +1,21 @@
1
1
  # Release History
2
2
 
3
+ ### 1.24.0 / 2020-10-29
4
+
5
+ #### Features
6
+
7
+ * Add iamMember to Dataset::Access
8
+
9
+ #### Bug Fixes
10
+
11
+ * Ensure dense encoding of JSON responses
12
+ * Set query param prettyPrint=false for all requests.
13
+ * Upgrade google-api-client to ~> 0.47
14
+
15
+ #### Documentation
16
+
17
+ * Update supported types for time partition type
18
+
3
19
  ### 1.23.0 / 2020-09-17
4
20
 
5
21
  #### Features
@@ -48,16 +48,18 @@ module Google
48
48
 
49
49
  # @private
50
50
  SCOPES = {
51
- "user" => :user_by_email,
52
- "user_by_email" => :user_by_email,
53
- "userByEmail" => :user_by_email,
51
+ "domain" => :domain,
54
52
  "group" => :group_by_email,
55
53
  "group_by_email" => :group_by_email,
56
54
  "groupByEmail" => :group_by_email,
57
- "domain" => :domain,
55
+ "iam_member" => :iam_member,
56
+ "iamMember" => :iam_member,
58
57
  "special" => :special_group,
59
58
  "special_group" => :special_group,
60
59
  "specialGroup" => :special_group,
60
+ "user" => :user_by_email,
61
+ "user_by_email" => :user_by_email,
62
+ "userByEmail" => :user_by_email,
61
63
  "view" => :view
62
64
  }.freeze
63
65
 
@@ -150,6 +152,26 @@ module Google
150
152
  add_access_role_scope_value :reader, :group, email
151
153
  end
152
154
 
155
+ ##
156
+ # Add reader access to some other type of member that appears in the IAM
157
+ # Policy but isn't a user, group, domain, or special group.
158
+ #
159
+ # @param [String] identity The identity reference.
160
+ #
161
+ # @example
162
+ # require "google/cloud/bigquery"
163
+ #
164
+ # bigquery = Google::Cloud::Bigquery.new
165
+ # dataset = bigquery.dataset "my_dataset"
166
+ #
167
+ # dataset.access do |access|
168
+ # access.add_reader_iam_member "entity@example.com"
169
+ # end
170
+ #
171
+ def add_reader_iam_member identity
172
+ add_access_role_scope_value :reader, :iam_member, identity
173
+ end
174
+
153
175
  ##
154
176
  # Add reader access to a domain.
155
177
  #
@@ -255,6 +277,26 @@ module Google
255
277
  add_access_role_scope_value :writer, :group, email
256
278
  end
257
279
 
280
+ ##
281
+ # Add writer access to some other type of member that appears in the IAM
282
+ # Policy but isn't a user, group, domain, or special group.
283
+ #
284
+ # @param [String] identity The identity reference.
285
+ #
286
+ # @example
287
+ # require "google/cloud/bigquery"
288
+ #
289
+ # bigquery = Google::Cloud::Bigquery.new
290
+ # dataset = bigquery.dataset "my_dataset"
291
+ #
292
+ # dataset.access do |access|
293
+ # access.add_writer_iam_member "entity@example.com"
294
+ # end
295
+ #
296
+ def add_writer_iam_member identity
297
+ add_access_role_scope_value :writer, :iam_member, identity
298
+ end
299
+
258
300
  ##
259
301
  # Add writer access to a domain.
260
302
  #
@@ -333,6 +375,26 @@ module Google
333
375
  add_access_role_scope_value :owner, :group, email
334
376
  end
335
377
 
378
+ ##
379
+ # Add owner access to some other type of member that appears in the IAM
380
+ # Policy but isn't a user, group, domain, or special group.
381
+ #
382
+ # @param [String] identity The identity reference.
383
+ #
384
+ # @example
385
+ # require "google/cloud/bigquery"
386
+ #
387
+ # bigquery = Google::Cloud::Bigquery.new
388
+ # dataset = bigquery.dataset "my_dataset"
389
+ #
390
+ # dataset.access do |access|
391
+ # access.add_owner_iam_member "entity@example.com"
392
+ # end
393
+ #
394
+ def add_owner_iam_member identity
395
+ add_access_role_scope_value :owner, :iam_member, identity
396
+ end
397
+
336
398
  ##
337
399
  # Add owner access to a domain.
338
400
  #
@@ -411,6 +473,26 @@ module Google
411
473
  remove_access_role_scope_value :reader, :group, email
412
474
  end
413
475
 
476
+ ##
477
+ # Remove reader access from some other type of member that appears in the IAM
478
+ # Policy but isn't a user, group, domain, or special group.
479
+ #
480
+ # @param [String] identity The identity reference.
481
+ #
482
+ # @example
483
+ # require "google/cloud/bigquery"
484
+ #
485
+ # bigquery = Google::Cloud::Bigquery.new
486
+ # dataset = bigquery.dataset "my_dataset"
487
+ #
488
+ # dataset.access do |access|
489
+ # access.remove_reader_iam_member "entity@example.com"
490
+ # end
491
+ #
492
+ def remove_reader_iam_member identity
493
+ remove_access_role_scope_value :reader, :iam_member, identity
494
+ end
495
+
414
496
  ##
415
497
  # Remove reader access from a domain.
416
498
  #
@@ -516,6 +598,26 @@ module Google
516
598
  remove_access_role_scope_value :writer, :group, email
517
599
  end
518
600
 
601
+ ##
602
+ # Remove writer access from some other type of member that appears in the IAM
603
+ # Policy but isn't a user, group, domain, or special group.
604
+ #
605
+ # @param [String] identity The identity reference.
606
+ #
607
+ # @example
608
+ # require "google/cloud/bigquery"
609
+ #
610
+ # bigquery = Google::Cloud::Bigquery.new
611
+ # dataset = bigquery.dataset "my_dataset"
612
+ #
613
+ # dataset.access do |access|
614
+ # access.remove_writer_iam_member "entity@example.com"
615
+ # end
616
+ #
617
+ def remove_writer_iam_member identity
618
+ remove_access_role_scope_value :writer, :iam_member, identity
619
+ end
620
+
519
621
  ##
520
622
  # Remove writer access from a domain.
521
623
  #
@@ -594,6 +696,26 @@ module Google
594
696
  remove_access_role_scope_value :owner, :group, email
595
697
  end
596
698
 
699
+ ##
700
+ # Remove owner access from some other type of member that appears in the IAM
701
+ # Policy but isn't a user, group, domain, or special group.
702
+ #
703
+ # @param [String] identity The identity reference.
704
+ #
705
+ # @example
706
+ # require "google/cloud/bigquery"
707
+ #
708
+ # bigquery = Google::Cloud::Bigquery.new
709
+ # dataset = bigquery.dataset "my_dataset"
710
+ #
711
+ # dataset.access do |access|
712
+ # access.remove_owner_iam_member "entity@example.com"
713
+ # end
714
+ #
715
+ def remove_owner_iam_member identity
716
+ remove_access_role_scope_value :owner, :iam_member, identity
717
+ end
718
+
597
719
  ##
598
720
  # Remove owner access from a domain.
599
721
  #
@@ -670,6 +792,25 @@ module Google
670
792
  lookup_access_role_scope_value :reader, :group, email
671
793
  end
672
794
 
795
+ ##
796
+ # Checks reader access for some other type of member that appears in the IAM
797
+ # Policy but isn't a user, group, domain, or special group.
798
+ #
799
+ # @param [String] identity The identity reference.
800
+ #
801
+ # @example
802
+ # require "google/cloud/bigquery"
803
+ #
804
+ # bigquery = Google::Cloud::Bigquery.new
805
+ # dataset = bigquery.dataset "my_dataset"
806
+ #
807
+ # access = dataset.access
808
+ # access.reader_iam_member? "entity@example.com" #=> false
809
+ #
810
+ def reader_iam_member? identity
811
+ lookup_access_role_scope_value :reader, :iam_member, identity
812
+ end
813
+
673
814
  ##
674
815
  # Checks reader access for a domain.
675
816
  #
@@ -770,6 +911,25 @@ module Google
770
911
  lookup_access_role_scope_value :writer, :group, email
771
912
  end
772
913
 
914
+ ##
915
+ # Checks writer access for some other type of member that appears in the IAM
916
+ # Policy but isn't a user, group, domain, or special group.
917
+ #
918
+ # @param [String] identity The identity reference.
919
+ #
920
+ # @example
921
+ # require "google/cloud/bigquery"
922
+ #
923
+ # bigquery = Google::Cloud::Bigquery.new
924
+ # dataset = bigquery.dataset "my_dataset"
925
+ #
926
+ # access = dataset.access
927
+ # access.writer_iam_member? "entity@example.com" #=> false
928
+ #
929
+ def writer_iam_member? identity
930
+ lookup_access_role_scope_value :writer, :iam_member, identity
931
+ end
932
+
773
933
  ##
774
934
  # Checks writer access for a domain.
775
935
  #
@@ -844,6 +1004,25 @@ module Google
844
1004
  lookup_access_role_scope_value :owner, :group, email
845
1005
  end
846
1006
 
1007
+ ##
1008
+ # Checks owner access for some other type of member that appears in the IAM
1009
+ # Policy but isn't a user, group, domain, or special group.
1010
+ #
1011
+ # @param [String] identity The identity reference.
1012
+ #
1013
+ # @example
1014
+ # require "google/cloud/bigquery"
1015
+ #
1016
+ # bigquery = Google::Cloud::Bigquery.new
1017
+ # dataset = bigquery.dataset "my_dataset"
1018
+ #
1019
+ # access = dataset.access
1020
+ # access.owner_iam_member? "entity@example.com" #=> false
1021
+ #
1022
+ def owner_iam_member? identity
1023
+ lookup_access_role_scope_value :owner, :iam_member, identity
1024
+ end
1025
+
847
1026
  ##
848
1027
  # Checks owner access for a domain.
849
1028
  #
@@ -428,8 +428,9 @@ module Google
428
428
  # The period for which the destination table will be time partitioned, if
429
429
  # any. See [Partitioned Tables](https://cloud.google.com/bigquery/docs/partitioned-tables).
430
430
  #
431
- # @return [String, nil] The time partition type. Currently the only supported
432
- # value is "DAY", or `nil` if not present.
431
+ # @return [String, nil] The time partition type. The supported types are `DAY`,
432
+ # `HOUR`, `MONTH`, and `YEAR`, which will generate one partition per day,
433
+ # hour, month, and year, respectively; or `nil` if not present.
433
434
  #
434
435
  # @!group Attributes
435
436
  #
@@ -1499,8 +1500,9 @@ module Google
1499
1500
  # BigQuery does not allow you to change partitioning on an existing
1500
1501
  # table.
1501
1502
  #
1502
- # @param [String] type The time partition type. Currently the only
1503
- # supported value is "DAY".
1503
+ # @param [String] type The time partition type. The supported types are `DAY`,
1504
+ # `HOUR`, `MONTH`, and `YEAR`, which will generate one partition per day,
1505
+ # hour, month, and year, respectively.
1504
1506
  #
1505
1507
  # @example
1506
1508
  # require "google/cloud/bigquery"
@@ -528,8 +528,9 @@ module Google
528
528
  # The period for which the destination table will be partitioned, if
529
529
  # any. See [Partitioned Tables](https://cloud.google.com/bigquery/docs/partitioned-tables).
530
530
  #
531
- # @return [String, nil] The partition type. Currently the only supported
532
- # value is "DAY", or `nil` if not present.
531
+ # @return [String, nil] The partition type. The supported types are `DAY`,
532
+ # `HOUR`, `MONTH`, and `YEAR`, which will generate one partition per day,
533
+ # hour, month, and year, respectively; or `nil` if not present.
533
534
  #
534
535
  # @!group Attributes
535
536
  #
@@ -1302,13 +1303,16 @@ module Google
1302
1303
  ##
1303
1304
  # Sets the partitioning for the destination table. See [Partitioned
1304
1305
  # Tables](https://cloud.google.com/bigquery/docs/partitioned-tables).
1306
+ # The supported types are `DAY`, `HOUR`, `MONTH`, and `YEAR`, which will
1307
+ # generate one partition per day, hour, month, and year, respectively.
1305
1308
  #
1306
1309
  # You can only set the partitioning field while creating a table.
1307
1310
  # BigQuery does not allow you to change partitioning on an existing
1308
1311
  # table.
1309
1312
  #
1310
- # @param [String] type The partition type. Currently the only
1311
- # supported value is "DAY".
1313
+ # @param [String] type The partition type. The supported types are `DAY`,
1314
+ # `HOUR`, `MONTH`, and `YEAR`, which will generate one partition per day,
1315
+ # hour, month, and year, respectively.
1312
1316
  #
1313
1317
  # @example
1314
1318
  # require "google/cloud/bigquery"
@@ -65,6 +65,8 @@ module Google
65
65
  service.request_options.header ||= {}
66
66
  service.request_options.header["x-goog-api-client"] = \
67
67
  "gl-ruby/#{RUBY_VERSION} gccl/#{Google::Cloud::Bigquery::VERSION}"
68
+ service.request_options.query ||= {}
69
+ service.request_options.query["prettyPrint"] = false
68
70
  service.request_options.quota_project = @quota_project if @quota_project
69
71
  service.authorization = @credentials.client
70
72
  service.root_url = host if host
@@ -250,9 +250,10 @@ module Google
250
250
  # The period for which the table is time partitioned, if any. See
251
251
  # [Partitioned Tables](https://cloud.google.com/bigquery/docs/partitioned-tables).
252
252
  #
253
- # @return [String, nil] The time partition type. Currently the only supported
254
- # value is "DAY", or `nil` if the object is a reference (see
255
- # {#reference?}).
253
+ # @return [String, nil] The time partition type. The supported types are `DAY`,
254
+ # `HOUR`, `MONTH`, and `YEAR`, which will generate one partition per day,
255
+ # hour, month, and year, respectively; or `nil` if not set or the object is a
256
+ # reference (see {#reference?}).
256
257
  #
257
258
  # @!group Attributes
258
259
  #
@@ -265,13 +266,16 @@ module Google
265
266
  ##
266
267
  # Sets the time partitioning type for the table. See [Partitioned
267
268
  # Tables](https://cloud.google.com/bigquery/docs/partitioned-tables).
269
+ # The supported types are `DAY`, `HOUR`, `MONTH`, and `YEAR`, which will
270
+ # generate one partition per day, hour, month, and year, respectively.
268
271
  #
269
272
  # You can only set time partitioning when creating a table as in
270
273
  # the example below. BigQuery does not allow you to change time partitioning
271
274
  # on an existing table.
272
275
  #
273
- # @param [String] type The time partition type. Currently the only
274
- # supported value is "DAY".
276
+ # @param [String] type The time partition type. The supported types are `DAY`,
277
+ # `HOUR`, `MONTH`, and `YEAR`, which will generate one partition per day,
278
+ # hour, month, and year, respectively.
275
279
  #
276
280
  # @example
277
281
  # require "google/cloud/bigquery"
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Bigquery
19
- VERSION = "1.23.0".freeze
19
+ VERSION = "1.24.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.23.0
4
+ version: 1.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-09-17 00:00:00.000000000 Z
12
+ date: 2020-10-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '0.33'
34
+ version: '0.47'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '0.33'
41
+ version: '0.47'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: google-cloud-core
44
44
  requirement: !ruby/object:Gem::Requirement