google-cloud-bigquery 1.32.1 → 1.33.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: 1189f91eb3d437aa9fa866f22bf19acaa4f5c1e1f6fec69e73ababe8d1297bdc
4
- data.tar.gz: 8d448952cc259e89076d6edf501c5b9ea3caf6b20b21fae9bcfe8056016549e0
3
+ metadata.gz: a862a905a85047fb36e5cde6792b85680c6f6693d5ce4a14e7e250687d9653b4
4
+ data.tar.gz: 4dfa04f351fa499194e29e932a6ab58f2eb4b03041629897ef1927442b0ade34
5
5
  SHA512:
6
- metadata.gz: 3f734ba5d4a6e7323ba88dd11c5ead491401e538b08c87fd91bc95ad069e61ab952cd8b3e8e6da0fa436f9ce9ff8338e81e274cfd97defe21a8981796049e6ba
7
- data.tar.gz: ef0a1fba42f761d313d71eaaca71ddfbae322d18f5a747cc24a596a0a804625568cac87434390dc8f5ff208001487e33c824c1015d654ee0967d5bebcefa34d6
6
+ metadata.gz: 780bb151f02706de7443572e5611d284ad8a27c5ae80e3a7c8c3033b06cfb846e74340069caa54715c5ad8e847cddfeb6b7e9820d4143c51963e2a81d8a71899
7
+ data.tar.gz: fcf7f28fef0b107da16a0640eedfd9494cd278d73a8092aba4697d937c01fb9ad58d6571a382799f14ca0463460a1f05fe45ee93cb92f0adf4fd06e750252e79
data/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Release History
2
2
 
3
+ ### 1.33.0 / 2021-07-14
4
+
5
+ #### Features
6
+
7
+ * Add policy tag support (Column ACLs)
8
+ * Add policy_tags to LoadJob field helper methods
9
+ * Add policy_tags to Schema field helper methods
10
+ * Add policy_tags to Schema::Field field helper methods
11
+ * Add policy_tags to Table field helper methods
12
+ * Add Schema::Field#policy_tags
13
+ * Add Schema::Field#policy_tags=
14
+ * Add support for parameterized types
15
+ * Add max_length to LoadJob::Updater#bytes
16
+ * Add max_length to LoadJob::Updater#string
17
+ * Add max_length to Schema#bytes
18
+ * Add max_length to Schema#string
19
+ * Add max_length to Schema::Field#bytes
20
+ * Add max_length to Schema::Field#string
21
+ * Add max_length to Table::Updater#bytes
22
+ * Add max_length to Table::Updater#string
23
+ * Add precision and scale to LoadJob::Updater#bignumeric
24
+ * Add precision and scale to LoadJob::Updater#numeric
25
+ * Add precision and scale to Schema#bignumeric
26
+ * Add precision and scale to Schema#numeric
27
+ * Add precision and scale to Schema::Field#bignumeric
28
+ * Add precision and scale to Schema::Field#numeric
29
+ * Add precision and scale to Table::Updater#bignumeric
30
+ * Add precision and scale to Table::Updater#numeric
31
+ * Add Schema::Field#max_length
32
+ * Add Schema::Field#precision
33
+ * Add Schema::Field#scale
34
+
3
35
  ### 1.32.1 / 2021-07-08
4
36
 
5
37
  #### Documentation
@@ -751,6 +751,12 @@ module Google
751
751
  # @param [Symbol] mode The field's mode. The possible values are
752
752
  # `:nullable`, `:required`, and `:repeated`. The default value is
753
753
  # `:nullable`.
754
+ # @param [Array<String>, String] policy_tags The policy tag list or
755
+ # single policy tag for the field. Policy tag identifiers are of
756
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
757
+ # At most 1 policy tag is currently allowed.
758
+ # @param [Integer] max_length The maximum UTF-8 length of strings
759
+ # allowed in the field.
754
760
  #
755
761
  # @example
756
762
  # require "google/cloud/bigquery"
@@ -762,8 +768,8 @@ module Google
762
768
  # end
763
769
  #
764
770
  # @!group Schema
765
- def string name, description: nil, mode: :nullable
766
- schema.string name, description: description, mode: mode
771
+ def string name, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
772
+ schema.string name, description: description, mode: mode, policy_tags: policy_tags, max_length: max_length
767
773
  end
768
774
 
769
775
  ##
@@ -779,6 +785,10 @@ module Google
779
785
  # @param [Symbol] mode The field's mode. The possible values are
780
786
  # `:nullable`, `:required`, and `:repeated`. The default value is
781
787
  # `:nullable`.
788
+ # @param [Array<String>, String] policy_tags The policy tag list or
789
+ # single policy tag for the field. Policy tag identifiers are of
790
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
791
+ # At most 1 policy tag is currently allowed.
782
792
  #
783
793
  # @example
784
794
  # require "google/cloud/bigquery"
@@ -790,8 +800,8 @@ module Google
790
800
  # end
791
801
  #
792
802
  # @!group Schema
793
- def integer name, description: nil, mode: :nullable
794
- schema.integer name, description: description, mode: mode
803
+ def integer name, description: nil, mode: :nullable, policy_tags: nil
804
+ schema.integer name, description: description, mode: mode, policy_tags: policy_tags
795
805
  end
796
806
 
797
807
  ##
@@ -807,6 +817,10 @@ module Google
807
817
  # @param [Symbol] mode The field's mode. The possible values are
808
818
  # `:nullable`, `:required`, and `:repeated`. The default value is
809
819
  # `:nullable`.
820
+ # @param [Array<String>, String] policy_tags The policy tag list or
821
+ # single policy tag for the field. Policy tag identifiers are of
822
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
823
+ # At most 1 policy tag is currently allowed.
810
824
  #
811
825
  # @example
812
826
  # require "google/cloud/bigquery"
@@ -818,8 +832,8 @@ module Google
818
832
  # end
819
833
  #
820
834
  # @!group Schema
821
- def float name, description: nil, mode: :nullable
822
- schema.float name, description: description, mode: mode
835
+ def float name, description: nil, mode: :nullable, policy_tags: nil
836
+ schema.float name, description: description, mode: mode, policy_tags: policy_tags
823
837
  end
824
838
 
825
839
  ##
@@ -846,6 +860,20 @@ module Google
846
860
  # @param [Symbol] mode The field's mode. The possible values are
847
861
  # `:nullable`, `:required`, and `:repeated`. The default value is
848
862
  # `:nullable`.
863
+ # @param [Array<String>, String] policy_tags The policy tag list or
864
+ # single policy tag for the field. Policy tag identifiers are of
865
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
866
+ # At most 1 policy tag is currently allowed.
867
+ # @param [Integer] precision The precision (maximum number of total
868
+ # digits) for the field. Acceptable values for precision must be:
869
+ # `1 ≤ (precision - scale) ≤ 29`. Values for scale must be:
870
+ # `0 ≤ scale ≤ 9`. If the scale value is set, the precision value
871
+ # must be set as well.
872
+ # @param [Integer] scale The scale (maximum number of digits in the
873
+ # fractional part) for the field. Acceptable values for precision
874
+ # must be: `1 ≤ (precision - scale) ≤ 29`. Values for scale must
875
+ # be: `0 ≤ scale ≤ 9`. If the scale value is set, the precision
876
+ # value must be set as well.
849
877
  #
850
878
  # @example
851
879
  # require "google/cloud/bigquery"
@@ -857,8 +885,13 @@ module Google
857
885
  # end
858
886
  #
859
887
  # @!group Schema
860
- def numeric name, description: nil, mode: :nullable
861
- schema.numeric name, description: description, mode: mode
888
+ def numeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil
889
+ schema.numeric name,
890
+ description: description,
891
+ mode: mode,
892
+ policy_tags: policy_tags,
893
+ precision: precision,
894
+ scale: scale
862
895
  end
863
896
 
864
897
  ##
@@ -885,6 +918,20 @@ module Google
885
918
  # @param [Symbol] mode The field's mode. The possible values are
886
919
  # `:nullable`, `:required`, and `:repeated`. The default value is
887
920
  # `:nullable`.
921
+ # @param [Array<String>, String] policy_tags The policy tag list or
922
+ # single policy tag for the field. Policy tag identifiers are of
923
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
924
+ # At most 1 policy tag is currently allowed.
925
+ # @param [Integer] precision The precision (maximum number of total
926
+ # digits) for the field. Acceptable values for precision must be:
927
+ # `1 ≤ (precision - scale) ≤ 38`. Values for scale must be:
928
+ # `0 ≤ scale ≤ 38`. If the scale value is set, the precision value
929
+ # must be set as well.
930
+ # @param [Integer] scale The scale (maximum number of digits in the
931
+ # fractional part) for the field. Acceptable values for precision
932
+ # must be: `1 ≤ (precision - scale) ≤ 38`. Values for scale must
933
+ # be: `0 ≤ scale ≤ 38`. If the scale value is set, the precision
934
+ # value must be set as well.
888
935
  #
889
936
  # @example
890
937
  # require "google/cloud/bigquery"
@@ -896,8 +943,13 @@ module Google
896
943
  # end
897
944
  #
898
945
  # @!group Schema
899
- def bignumeric name, description: nil, mode: :nullable
900
- schema.bignumeric name, description: description, mode: mode
946
+ def bignumeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil
947
+ schema.bignumeric name,
948
+ description: description,
949
+ mode: mode,
950
+ policy_tags: policy_tags,
951
+ precision: precision,
952
+ scale: scale
901
953
  end
902
954
 
903
955
  ##
@@ -913,6 +965,10 @@ module Google
913
965
  # @param [Symbol] mode The field's mode. The possible values are
914
966
  # `:nullable`, `:required`, and `:repeated`. The default value is
915
967
  # `:nullable`.
968
+ # @param [Array<String>, String] policy_tags The policy tag list or
969
+ # single policy tag for the field. Policy tag identifiers are of
970
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
971
+ # At most 1 policy tag is currently allowed.
916
972
  #
917
973
  # @example
918
974
  # require "google/cloud/bigquery"
@@ -924,8 +980,8 @@ module Google
924
980
  # end
925
981
  #
926
982
  # @!group Schema
927
- def boolean name, description: nil, mode: :nullable
928
- schema.boolean name, description: description, mode: mode
983
+ def boolean name, description: nil, mode: :nullable, policy_tags: nil
984
+ schema.boolean name, description: description, mode: mode, policy_tags: policy_tags
929
985
  end
930
986
 
931
987
  ##
@@ -941,6 +997,12 @@ module Google
941
997
  # @param [Symbol] mode The field's mode. The possible values are
942
998
  # `:nullable`, `:required`, and `:repeated`. The default value is
943
999
  # `:nullable`.
1000
+ # @param [Array<String>, String] policy_tags The policy tag list or
1001
+ # single policy tag for the field. Policy tag identifiers are of
1002
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
1003
+ # At most 1 policy tag is currently allowed.
1004
+ # @param [Integer] max_length The maximum the maximum number of
1005
+ # bytes in the field.
944
1006
  #
945
1007
  # @example
946
1008
  # require "google/cloud/bigquery"
@@ -952,8 +1014,8 @@ module Google
952
1014
  # end
953
1015
  #
954
1016
  # @!group Schema
955
- def bytes name, description: nil, mode: :nullable
956
- schema.bytes name, description: description, mode: mode
1017
+ def bytes name, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
1018
+ schema.bytes name, description: description, mode: mode, policy_tags: policy_tags, max_length: max_length
957
1019
  end
958
1020
 
959
1021
  ##
@@ -969,6 +1031,10 @@ module Google
969
1031
  # @param [Symbol] mode The field's mode. The possible values are
970
1032
  # `:nullable`, `:required`, and `:repeated`. The default value is
971
1033
  # `:nullable`.
1034
+ # @param [Array<String>, String] policy_tags The policy tag list or
1035
+ # single policy tag for the field. Policy tag identifiers are of
1036
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
1037
+ # At most 1 policy tag is currently allowed.
972
1038
  #
973
1039
  # @example
974
1040
  # require "google/cloud/bigquery"
@@ -980,8 +1046,8 @@ module Google
980
1046
  # end
981
1047
  #
982
1048
  # @!group Schema
983
- def timestamp name, description: nil, mode: :nullable
984
- schema.timestamp name, description: description, mode: mode
1049
+ def timestamp name, description: nil, mode: :nullable, policy_tags: nil
1050
+ schema.timestamp name, description: description, mode: mode, policy_tags: policy_tags
985
1051
  end
986
1052
 
987
1053
  ##
@@ -997,6 +1063,10 @@ module Google
997
1063
  # @param [Symbol] mode The field's mode. The possible values are
998
1064
  # `:nullable`, `:required`, and `:repeated`. The default value is
999
1065
  # `:nullable`.
1066
+ # @param [Array<String>, String] policy_tags The policy tag list or
1067
+ # single policy tag for the field. Policy tag identifiers are of
1068
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
1069
+ # At most 1 policy tag is currently allowed.
1000
1070
  #
1001
1071
  # @example
1002
1072
  # require "google/cloud/bigquery"
@@ -1008,8 +1078,8 @@ module Google
1008
1078
  # end
1009
1079
  #
1010
1080
  # @!group Schema
1011
- def time name, description: nil, mode: :nullable
1012
- schema.time name, description: description, mode: mode
1081
+ def time name, description: nil, mode: :nullable, policy_tags: nil
1082
+ schema.time name, description: description, mode: mode, policy_tags: policy_tags
1013
1083
  end
1014
1084
 
1015
1085
  ##
@@ -1025,6 +1095,10 @@ module Google
1025
1095
  # @param [Symbol] mode The field's mode. The possible values are
1026
1096
  # `:nullable`, `:required`, and `:repeated`. The default value is
1027
1097
  # `:nullable`.
1098
+ # @param [Array<String>, String] policy_tags The policy tag list or
1099
+ # single policy tag for the field. Policy tag identifiers are of
1100
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
1101
+ # At most 1 policy tag is currently allowed.
1028
1102
  #
1029
1103
  # @example
1030
1104
  # require "google/cloud/bigquery"
@@ -1036,8 +1110,8 @@ module Google
1036
1110
  # end
1037
1111
  #
1038
1112
  # @!group Schema
1039
- def datetime name, description: nil, mode: :nullable
1040
- schema.datetime name, description: description, mode: mode
1113
+ def datetime name, description: nil, mode: :nullable, policy_tags: nil
1114
+ schema.datetime name, description: description, mode: mode, policy_tags: policy_tags
1041
1115
  end
1042
1116
 
1043
1117
  ##
@@ -1053,6 +1127,10 @@ module Google
1053
1127
  # @param [Symbol] mode The field's mode. The possible values are
1054
1128
  # `:nullable`, `:required`, and `:repeated`. The default value is
1055
1129
  # `:nullable`.
1130
+ # @param [Array<String>, String] policy_tags The policy tag list or
1131
+ # single policy tag for the field. Policy tag identifiers are of
1132
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
1133
+ # At most 1 policy tag is currently allowed.
1056
1134
  #
1057
1135
  # @example
1058
1136
  # require "google/cloud/bigquery"
@@ -1064,8 +1142,8 @@ module Google
1064
1142
  # end
1065
1143
  #
1066
1144
  # @!group Schema
1067
- def date name, description: nil, mode: :nullable
1068
- schema.date name, description: description, mode: mode
1145
+ def date name, description: nil, mode: :nullable, policy_tags: nil
1146
+ schema.date name, description: description, mode: mode, policy_tags: policy_tags
1069
1147
  end
1070
1148
 
1071
1149
  ##
@@ -294,9 +294,20 @@ module Google
294
294
  # @param [Symbol] mode The field's mode. The possible values are
295
295
  # `:nullable`, `:required`, and `:repeated`. The default value is
296
296
  # `:nullable`.
297
- #
298
- def string name, description: nil, mode: :nullable
299
- add_field name, :string, description: description, mode: mode
297
+ # @param [Array<String>, String] policy_tags The policy tag list or
298
+ # single policy tag for the field. Policy tag identifiers are of
299
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
300
+ # At most 1 policy tag is currently allowed.
301
+ # @param [Integer] max_length The maximum UTF-8 length of strings
302
+ # allowed in the field.
303
+ #
304
+ def string name, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
305
+ add_field name,
306
+ :string,
307
+ description: description,
308
+ mode: mode,
309
+ policy_tags: policy_tags,
310
+ max_length: max_length
300
311
  end
301
312
 
302
313
  ##
@@ -310,9 +321,13 @@ module Google
310
321
  # @param [Symbol] mode The field's mode. The possible values are
311
322
  # `:nullable`, `:required`, and `:repeated`. The default value is
312
323
  # `:nullable`.
324
+ # @param [Array<String>, String] policy_tags The policy tag list or
325
+ # single policy tag for the field. Policy tag identifiers are of
326
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
327
+ # At most 1 policy tag is currently allowed.
313
328
  #
314
- def integer name, description: nil, mode: :nullable
315
- add_field name, :integer, description: description, mode: mode
329
+ def integer name, description: nil, mode: :nullable, policy_tags: nil
330
+ add_field name, :integer, description: description, mode: mode, policy_tags: policy_tags
316
331
  end
317
332
 
318
333
  ##
@@ -326,9 +341,13 @@ module Google
326
341
  # @param [Symbol] mode The field's mode. The possible values are
327
342
  # `:nullable`, `:required`, and `:repeated`. The default value is
328
343
  # `:nullable`.
344
+ # @param [Array<String>, String] policy_tags The policy tag list or
345
+ # single policy tag for the field. Policy tag identifiers are of
346
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
347
+ # At most 1 policy tag is currently allowed.
329
348
  #
330
- def float name, description: nil, mode: :nullable
331
- add_field name, :float, description: description, mode: mode
349
+ def float name, description: nil, mode: :nullable, policy_tags: nil
350
+ add_field name, :float, description: description, mode: mode, policy_tags: policy_tags
332
351
  end
333
352
 
334
353
  ##
@@ -353,9 +372,29 @@ module Google
353
372
  # @param [Symbol] mode The field's mode. The possible values are
354
373
  # `:nullable`, `:required`, and `:repeated`. The default value is
355
374
  # `:nullable`.
356
- #
357
- def numeric name, description: nil, mode: :nullable
358
- add_field name, :numeric, description: description, mode: mode
375
+ # @param [Array<String>, String] policy_tags The policy tag list or
376
+ # single policy tag for the field. Policy tag identifiers are of
377
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
378
+ # At most 1 policy tag is currently allowed.
379
+ # @param [Integer] precision The precision (maximum number of total
380
+ # digits) for the field. Acceptable values for precision must be:
381
+ # `1 ≤ (precision - scale) ≤ 29`. Values for scale must be:
382
+ # `0 ≤ scale ≤ 9`. If the scale value is set, the precision value
383
+ # must be set as well.
384
+ # @param [Integer] scale The scale (maximum number of digits in the
385
+ # fractional part) for the field. Acceptable values for precision
386
+ # must be: `1 ≤ (precision - scale) ≤ 29`. Values for scale must
387
+ # be: `0 ≤ scale ≤ 9`. If the scale value is set, the precision
388
+ # value must be set as well.
389
+ #
390
+ def numeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil
391
+ add_field name,
392
+ :numeric,
393
+ description: description,
394
+ mode: mode,
395
+ policy_tags: policy_tags,
396
+ precision: precision,
397
+ scale: scale
359
398
  end
360
399
 
361
400
  ##
@@ -380,9 +419,29 @@ module Google
380
419
  # @param [Symbol] mode The field's mode. The possible values are
381
420
  # `:nullable`, `:required`, and `:repeated`. The default value is
382
421
  # `:nullable`.
383
- #
384
- def bignumeric name, description: nil, mode: :nullable
385
- add_field name, :bignumeric, description: description, mode: mode
422
+ # @param [Array<String>, String] policy_tags The policy tag list or
423
+ # single policy tag for the field. Policy tag identifiers are of
424
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
425
+ # At most 1 policy tag is currently allowed.
426
+ # @param [Integer] precision The precision (maximum number of total
427
+ # digits) for the field. Acceptable values for precision must be:
428
+ # `1 ≤ (precision - scale) ≤ 38`. Values for scale must be:
429
+ # `0 ≤ scale ≤ 38`. If the scale value is set, the precision value
430
+ # must be set as well.
431
+ # @param [Integer] scale The scale (maximum number of digits in the
432
+ # fractional part) for the field. Acceptable values for precision
433
+ # must be: `1 ≤ (precision - scale) ≤ 38`. Values for scale must
434
+ # be: `0 ≤ scale ≤ 38`. If the scale value is set, the precision
435
+ # value must be set as well.
436
+ #
437
+ def bignumeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil
438
+ add_field name,
439
+ :bignumeric,
440
+ description: description,
441
+ mode: mode,
442
+ policy_tags: policy_tags,
443
+ precision: precision,
444
+ scale: scale
386
445
  end
387
446
 
388
447
  ##
@@ -396,9 +455,13 @@ module Google
396
455
  # @param [Symbol] mode The field's mode. The possible values are
397
456
  # `:nullable`, `:required`, and `:repeated`. The default value is
398
457
  # `:nullable`.
458
+ # @param [Array<String>, String] policy_tags The policy tag list or
459
+ # single policy tag for the field. Policy tag identifiers are of
460
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
461
+ # At most 1 policy tag is currently allowed.
399
462
  #
400
- def boolean name, description: nil, mode: :nullable
401
- add_field name, :boolean, description: description, mode: mode
463
+ def boolean name, description: nil, mode: :nullable, policy_tags: nil
464
+ add_field name, :boolean, description: description, mode: mode, policy_tags: policy_tags
402
465
  end
403
466
 
404
467
  ##
@@ -412,9 +475,15 @@ module Google
412
475
  # @param [Symbol] mode The field's mode. The possible values are
413
476
  # `:nullable`, `:required`, and `:repeated`. The default value is
414
477
  # `:nullable`.
415
- #
416
- def bytes name, description: nil, mode: :nullable
417
- add_field name, :bytes, description: description, mode: mode
478
+ # @param [Array<String>, String] policy_tags The policy tag list or
479
+ # single policy tag for the field. Policy tag identifiers are of
480
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
481
+ # At most 1 policy tag is currently allowed.
482
+ # @param [Integer] max_length The maximum the maximum number of
483
+ # bytes in the field.
484
+ #
485
+ def bytes name, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
486
+ add_field name, :bytes, description: description, mode: mode, policy_tags: policy_tags, max_length: max_length
418
487
  end
419
488
 
420
489
  ##
@@ -428,8 +497,13 @@ module Google
428
497
  # @param [Symbol] mode The field's mode. The possible values are
429
498
  # `:nullable`, `:required`, and `:repeated`. The default value is
430
499
  # `:nullable`.
431
- def timestamp name, description: nil, mode: :nullable
432
- add_field name, :timestamp, description: description, mode: mode
500
+ # @param [Array<String>, String] policy_tags The policy tag list or
501
+ # single policy tag for the field. Policy tag identifiers are of
502
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
503
+ # At most 1 policy tag is currently allowed.
504
+ #
505
+ def timestamp name, description: nil, mode: :nullable, policy_tags: nil
506
+ add_field name, :timestamp, description: description, mode: mode, policy_tags: policy_tags
433
507
  end
434
508
 
435
509
  ##
@@ -443,9 +517,13 @@ module Google
443
517
  # @param [Symbol] mode The field's mode. The possible values are
444
518
  # `:nullable`, `:required`, and `:repeated`. The default value is
445
519
  # `:nullable`.
520
+ # @param [Array<String>, String] policy_tags The policy tag list or
521
+ # single policy tag for the field. Policy tag identifiers are of
522
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
523
+ # At most 1 policy tag is currently allowed.
446
524
  #
447
- def time name, description: nil, mode: :nullable
448
- add_field name, :time, description: description, mode: mode
525
+ def time name, description: nil, mode: :nullable, policy_tags: nil
526
+ add_field name, :time, description: description, mode: mode, policy_tags: policy_tags
449
527
  end
450
528
 
451
529
  ##
@@ -459,9 +537,13 @@ module Google
459
537
  # @param [Symbol] mode The field's mode. The possible values are
460
538
  # `:nullable`, `:required`, and `:repeated`. The default value is
461
539
  # `:nullable`.
540
+ # @param [Array<String>, String] policy_tags The policy tag list or
541
+ # single policy tag for the field. Policy tag identifiers are of
542
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
543
+ # At most 1 policy tag is currently allowed.
462
544
  #
463
- def datetime name, description: nil, mode: :nullable
464
- add_field name, :datetime, description: description, mode: mode
545
+ def datetime name, description: nil, mode: :nullable, policy_tags: nil
546
+ add_field name, :datetime, description: description, mode: mode, policy_tags: policy_tags
465
547
  end
466
548
 
467
549
  ##
@@ -475,9 +557,13 @@ module Google
475
557
  # @param [Symbol] mode The field's mode. The possible values are
476
558
  # `:nullable`, `:required`, and `:repeated`. The default value is
477
559
  # `:nullable`.
560
+ # @param [Array<String>, String] policy_tags The policy tag list or
561
+ # single policy tag for the field. Policy tag identifiers are of
562
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
563
+ # At most 1 policy tag is currently allowed.
478
564
  #
479
- def date name, description: nil, mode: :nullable
480
- add_field name, :date, description: description, mode: mode
565
+ def date name, description: nil, mode: :nullable, policy_tags: nil
566
+ add_field name, :date, description: description, mode: mode, policy_tags: policy_tags
481
567
  end
482
568
 
483
569
  ##
@@ -560,7 +646,14 @@ module Google
560
646
  raise ArgumentError, "Cannot modify a frozen schema"
561
647
  end
562
648
 
563
- def add_field name, type, description: nil, mode: :nullable
649
+ def add_field name,
650
+ type,
651
+ description: nil,
652
+ mode: :nullable,
653
+ policy_tags: nil,
654
+ max_length: nil,
655
+ precision: nil,
656
+ scale: nil
564
657
  frozen_check!
565
658
 
566
659
  new_gapi = Google::Apis::BigqueryV2::TableFieldSchema.new(
@@ -570,7 +663,13 @@ module Google
570
663
  mode: verify_mode(mode),
571
664
  fields: []
572
665
  )
573
-
666
+ if policy_tags
667
+ policy_tags = Array(policy_tags)
668
+ new_gapi.policy_tags = Google::Apis::BigqueryV2::TableFieldSchema::PolicyTags.new names: policy_tags
669
+ end
670
+ new_gapi.max_length = max_length if max_length
671
+ new_gapi.precision = precision if precision
672
+ new_gapi.scale = scale if scale
574
673
  # Remove any existing field of this name
575
674
  @gapi.fields ||= []
576
675
  @gapi.fields.reject! { |f| f.name == new_gapi.name }
@@ -163,6 +163,101 @@ module Google
163
163
  @gapi.update! mode: verify_mode(new_mode)
164
164
  end
165
165
 
166
+ ##
167
+ # The policy tag list for the field. Policy tag identifiers are of the form
168
+ # `projects/*/locations/*/taxonomies/*/policyTags/*`. At most 1 policy tag
169
+ # is currently allowed.
170
+ #
171
+ # @see https://cloud.google.com/bigquery/docs/column-level-security-intro
172
+ # Introduction to BigQuery column-level security
173
+ #
174
+ # @return [Array<String>, nil] The policy tag list for the field, or `nil`.
175
+ #
176
+ # @example
177
+ # require "google/cloud/bigquery"
178
+ #
179
+ # bigquery = Google::Cloud::Bigquery.new
180
+ # dataset = bigquery.dataset "my_dataset"
181
+ # table = dataset.table "my_table"
182
+ #
183
+ # table.schema.field("age").policy_tags
184
+ #
185
+ def policy_tags
186
+ names = @gapi.policy_tags&.names
187
+ names.to_a if names && !names.empty?
188
+ end
189
+
190
+ ##
191
+ # Updates the policy tag list for the field.
192
+ #
193
+ # @see https://cloud.google.com/bigquery/docs/column-level-security-intro
194
+ # Introduction to BigQuery column-level security
195
+ #
196
+ # @param [Array<String>, String, nil] new_policy_tags The policy tag list or
197
+ # single policy tag for the field, or `nil` to remove the existing policy tags.
198
+ # Policy tag identifiers are of the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
199
+ # At most 1 policy tag is currently allowed.
200
+ #
201
+ # @example
202
+ # require "google/cloud/bigquery"
203
+ #
204
+ # bigquery = Google::Cloud::Bigquery.new
205
+ # dataset = bigquery.dataset "my_dataset"
206
+ # table = dataset.table "my_table"
207
+ #
208
+ # policy_tag = "projects/my-project/locations/us/taxonomies/my-taxonomy/policyTags/my-policy-tag"
209
+ # table.schema do |schema|
210
+ # schema.field("age").policy_tags = policy_tag
211
+ # end
212
+ #
213
+ # table.schema.field("age").policy_tags
214
+ #
215
+ def policy_tags= new_policy_tags
216
+ # If new_policy_tags is nil, send an empty array.
217
+ # Sending a nil value for policy_tags results in no change.
218
+ new_policy_tags = Array(new_policy_tags)
219
+ policy_tag_list = Google::Apis::BigqueryV2::TableFieldSchema::PolicyTags.new names: new_policy_tags
220
+ @gapi.update! policy_tags: policy_tag_list
221
+ end
222
+
223
+ ##
224
+ # The maximum length of values of this field for {#string?} or {bytes?} fields. If `max_length` is not
225
+ # specified, no maximum length constraint is imposed on this field. If type = `STRING`, then `max_length`
226
+ # represents the maximum UTF-8 length of strings in this field. If type = `BYTES`, then `max_length`
227
+ # represents the maximum number of bytes in this field.
228
+ #
229
+ # @return [Integer, nil] The maximum length of values of this field, or `nil`.
230
+ #
231
+ def max_length
232
+ @gapi.max_length
233
+ end
234
+
235
+ ##
236
+ # The precision (maximum number of total digits) for `NUMERIC` or `BIGNUMERIC` types. For {#numeric?} fields,
237
+ # acceptable values for precision must be `1 ≤ (precision - scale) ≤ 29` and values for scale must be `0 ≤
238
+ # scale ≤ 9`. For {#bignumeric?} fields, acceptable values for precision must be `1 ≤ (precision - scale) ≤
239
+ # 38` and values for scale must be `0 ≤ scale ≤ 38`. If the scale value is set, the precision value must be
240
+ # set as well.
241
+ #
242
+ # @return [Integer, nil] The precision for the field, or `nil`.
243
+ #
244
+ def precision
245
+ @gapi.precision
246
+ end
247
+
248
+ ##
249
+ # The scale (maximum number of digits in the fractional part) for `NUMERIC` or `BIGNUMERIC` types. For
250
+ # {#numeric?} fields, acceptable values for precision must be `1 ≤ (precision - scale) ≤ 29` and values for
251
+ # scale must be `0 ≤ scale ≤ 9`. For {#bignumeric?} fields, acceptable values for precision must be `1 ≤
252
+ # (precision - scale) ≤ 38` and values for scale must be `0 ≤ scale ≤ 38`. If the scale value is set, the
253
+ # precision value must be set as well.
254
+ #
255
+ # @return [Integer, nil] The scale for the field, or `nil`.
256
+ #
257
+ def scale
258
+ @gapi.scale
259
+ end
260
+
166
261
  ##
167
262
  # Checks if the type of the field is `STRING`.
168
263
  #
@@ -355,11 +450,22 @@ module Google
355
450
  # @param [Symbol] mode The field's mode. The possible values are
356
451
  # `:nullable`, `:required`, and `:repeated`. The default value is
357
452
  # `:nullable`.
358
- #
359
- def string name, description: nil, mode: :nullable
453
+ # @param [Array<String>, String] policy_tags The policy tag list or
454
+ # single policy tag for the field. Policy tag identifiers are of
455
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
456
+ # At most 1 policy tag is currently allowed.
457
+ # @param [Integer] max_length The maximum UTF-8 length of strings
458
+ # allowed in the field.
459
+ #
460
+ def string name, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
360
461
  record_check!
361
462
 
362
- add_field name, :string, description: description, mode: mode
463
+ add_field name,
464
+ :string,
465
+ description: description,
466
+ mode: mode,
467
+ policy_tags: policy_tags,
468
+ max_length: max_length
363
469
  end
364
470
 
365
471
  ##
@@ -375,11 +481,15 @@ module Google
375
481
  # @param [Symbol] mode The field's mode. The possible values are
376
482
  # `:nullable`, `:required`, and `:repeated`. The default value is
377
483
  # `:nullable`.
484
+ # @param [Array<String>, String] policy_tags The policy tag list or
485
+ # single policy tag for the field. Policy tag identifiers are of
486
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
487
+ # At most 1 policy tag is currently allowed.
378
488
  #
379
- def integer name, description: nil, mode: :nullable
489
+ def integer name, description: nil, mode: :nullable, policy_tags: nil
380
490
  record_check!
381
491
 
382
- add_field name, :integer, description: description, mode: mode
492
+ add_field name, :integer, description: description, mode: mode, policy_tags: policy_tags
383
493
  end
384
494
 
385
495
  ##
@@ -396,11 +506,15 @@ module Google
396
506
  # @param [Symbol] mode The field's mode. The possible values are
397
507
  # `:nullable`, `:required`, and `:repeated`. The default value is
398
508
  # `:nullable`.
509
+ # @param [Array<String>, String] policy_tags The policy tag list or
510
+ # single policy tag for the field. Policy tag identifiers are of
511
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
512
+ # At most 1 policy tag is currently allowed.
399
513
  #
400
- def float name, description: nil, mode: :nullable
514
+ def float name, description: nil, mode: :nullable, policy_tags: nil
401
515
  record_check!
402
516
 
403
- add_field name, :float, description: description, mode: mode
517
+ add_field name, :float, description: description, mode: mode, policy_tags: policy_tags
404
518
  end
405
519
 
406
520
  ##
@@ -427,11 +541,31 @@ module Google
427
541
  # @param [Symbol] mode The field's mode. The possible values are
428
542
  # `:nullable`, `:required`, and `:repeated`. The default value is
429
543
  # `:nullable`.
430
- #
431
- def numeric name, description: nil, mode: :nullable
544
+ # @param [Array<String>, String] policy_tags The policy tag list or
545
+ # single policy tag for the field. Policy tag identifiers are of
546
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
547
+ # At most 1 policy tag is currently allowed.
548
+ # @param [Integer] precision The precision (maximum number of total
549
+ # digits) for the field. Acceptable values for precision must be:
550
+ # `1 ≤ (precision - scale) ≤ 29`. Values for scale must be:
551
+ # `0 ≤ scale ≤ 9`. If the scale value is set, the precision value
552
+ # must be set as well.
553
+ # @param [Integer] scale The scale (maximum number of digits in the
554
+ # fractional part) for the field. Acceptable values for precision
555
+ # must be: `1 ≤ (precision - scale) ≤ 29`. Values for scale must
556
+ # be: `0 ≤ scale ≤ 9`. If the scale value is set, the precision
557
+ # value must be set as well.
558
+ #
559
+ def numeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil
432
560
  record_check!
433
561
 
434
- add_field name, :numeric, description: description, mode: mode
562
+ add_field name,
563
+ :numeric,
564
+ description: description,
565
+ mode: mode,
566
+ policy_tags: policy_tags,
567
+ precision: precision,
568
+ scale: scale
435
569
  end
436
570
 
437
571
  ##
@@ -458,11 +592,31 @@ module Google
458
592
  # @param [Symbol] mode The field's mode. The possible values are
459
593
  # `:nullable`, `:required`, and `:repeated`. The default value is
460
594
  # `:nullable`.
461
- #
462
- def bignumeric name, description: nil, mode: :nullable
595
+ # @param [Array<String>, String] policy_tags The policy tag list or
596
+ # single policy tag for the field. Policy tag identifiers are of
597
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
598
+ # At most 1 policy tag is currently allowed.
599
+ # @param [Integer] precision The precision (maximum number of total
600
+ # digits) for the field. Acceptable values for precision must be:
601
+ # `1 ≤ (precision - scale) ≤ 38`. Values for scale must be:
602
+ # `0 ≤ scale ≤ 38`. If the scale value is set, the precision value
603
+ # must be set as well.
604
+ # @param [Integer] scale The scale (maximum number of digits in the
605
+ # fractional part) for the field. Acceptable values for precision
606
+ # must be: `1 ≤ (precision - scale) ≤ 38`. Values for scale must
607
+ # be: `0 ≤ scale ≤ 38`. If the scale value is set, the precision
608
+ # value must be set as well.
609
+ #
610
+ def bignumeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil
463
611
  record_check!
464
612
 
465
- add_field name, :bignumeric, description: description, mode: mode
613
+ add_field name,
614
+ :bignumeric,
615
+ description: description,
616
+ mode: mode,
617
+ policy_tags: policy_tags,
618
+ precision: precision,
619
+ scale: scale
466
620
  end
467
621
 
468
622
  ##
@@ -478,11 +632,15 @@ module Google
478
632
  # @param [Symbol] mode The field's mode. The possible values are
479
633
  # `:nullable`, `:required`, and `:repeated`. The default value is
480
634
  # `:nullable`.
635
+ # @param [Array<String>, String] policy_tags The policy tag list or
636
+ # single policy tag for the field. Policy tag identifiers are of
637
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
638
+ # At most 1 policy tag is currently allowed.
481
639
  #
482
- def boolean name, description: nil, mode: :nullable
640
+ def boolean name, description: nil, mode: :nullable, policy_tags: nil
483
641
  record_check!
484
642
 
485
- add_field name, :boolean, description: description, mode: mode
643
+ add_field name, :boolean, description: description, mode: mode, policy_tags: policy_tags
486
644
  end
487
645
 
488
646
  ##
@@ -498,11 +656,22 @@ module Google
498
656
  # @param [Symbol] mode The field's mode. The possible values are
499
657
  # `:nullable`, `:required`, and `:repeated`. The default value is
500
658
  # `:nullable`.
501
- #
502
- def bytes name, description: nil, mode: :nullable
659
+ # @param [Array<String>, String] policy_tags The policy tag list or
660
+ # single policy tag for the field. Policy tag identifiers are of
661
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
662
+ # At most 1 policy tag is currently allowed.
663
+ # @param [Integer] max_length The maximum the maximum number of
664
+ # bytes in the field.
665
+ #
666
+ def bytes name, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
503
667
  record_check!
504
668
 
505
- add_field name, :bytes, description: description, mode: mode
669
+ add_field name,
670
+ :bytes,
671
+ description: description,
672
+ mode: mode,
673
+ policy_tags: policy_tags,
674
+ max_length: max_length
506
675
  end
507
676
 
508
677
  ##
@@ -518,11 +687,15 @@ module Google
518
687
  # @param [Symbol] mode The field's mode. The possible values are
519
688
  # `:nullable`, `:required`, and `:repeated`. The default value is
520
689
  # `:nullable`.
690
+ # @param [Array<String>, String] policy_tags The policy tag list or
691
+ # single policy tag for the field. Policy tag identifiers are of
692
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
693
+ # At most 1 policy tag is currently allowed.
521
694
  #
522
- def timestamp name, description: nil, mode: :nullable
695
+ def timestamp name, description: nil, mode: :nullable, policy_tags: nil
523
696
  record_check!
524
697
 
525
- add_field name, :timestamp, description: description, mode: mode
698
+ add_field name, :timestamp, description: description, mode: mode, policy_tags: policy_tags
526
699
  end
527
700
 
528
701
  ##
@@ -538,11 +711,15 @@ module Google
538
711
  # @param [Symbol] mode The field's mode. The possible values are
539
712
  # `:nullable`, `:required`, and `:repeated`. The default value is
540
713
  # `:nullable`.
714
+ # @param [Array<String>, String] policy_tags The policy tag list or
715
+ # single policy tag for the field. Policy tag identifiers are of
716
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
717
+ # At most 1 policy tag is currently allowed.
541
718
  #
542
- def time name, description: nil, mode: :nullable
719
+ def time name, description: nil, mode: :nullable, policy_tags: nil
543
720
  record_check!
544
721
 
545
- add_field name, :time, description: description, mode: mode
722
+ add_field name, :time, description: description, mode: mode, policy_tags: policy_tags
546
723
  end
547
724
 
548
725
  ##
@@ -558,11 +735,15 @@ module Google
558
735
  # @param [Symbol] mode The field's mode. The possible values are
559
736
  # `:nullable`, `:required`, and `:repeated`. The default value is
560
737
  # `:nullable`.
738
+ # @param [Array<String>, String] policy_tags The policy tag list or
739
+ # single policy tag for the field. Policy tag identifiers are of
740
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
741
+ # At most 1 policy tag is currently allowed.
561
742
  #
562
- def datetime name, description: nil, mode: :nullable
743
+ def datetime name, description: nil, mode: :nullable, policy_tags: nil
563
744
  record_check!
564
745
 
565
- add_field name, :datetime, description: description, mode: mode
746
+ add_field name, :datetime, description: description, mode: mode, policy_tags: policy_tags
566
747
  end
567
748
 
568
749
  ##
@@ -578,11 +759,15 @@ module Google
578
759
  # @param [Symbol] mode The field's mode. The possible values are
579
760
  # `:nullable`, `:required`, and `:repeated`. The default value is
580
761
  # `:nullable`.
762
+ # @param [Array<String>, String] policy_tags The policy tag list or
763
+ # single policy tag for the field. Policy tag identifiers are of
764
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
765
+ # At most 1 policy tag is currently allowed.
581
766
  #
582
- def date name, description: nil, mode: :nullable
767
+ def date name, description: nil, mode: :nullable, policy_tags: nil
583
768
  record_check!
584
769
 
585
- add_field name, :date, description: description, mode: mode
770
+ add_field name, :date, description: description, mode: mode, policy_tags: policy_tags
586
771
  end
587
772
 
588
773
  ##
@@ -678,7 +863,7 @@ module Google
678
863
  "Cannot add fields to a non-RECORD field (#{type})"
679
864
  end
680
865
 
681
- def add_field name, type, description: nil, mode: :nullable
866
+ def add_field name, type, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
682
867
  frozen_check!
683
868
 
684
869
  new_gapi = Google::Apis::BigqueryV2::TableFieldSchema.new(
@@ -688,7 +873,11 @@ module Google
688
873
  mode: verify_mode(mode),
689
874
  fields: []
690
875
  )
691
-
876
+ if policy_tags
877
+ policy_tags = Array(policy_tags)
878
+ new_gapi.policy_tags = Google::Apis::BigqueryV2::TableFieldSchema::PolicyTags.new names: policy_tags
879
+ end
880
+ new_gapi.max_length = max_length if max_length
692
881
  # Remove any existing field of this name
693
882
  @gapi.fields ||= []
694
883
  @gapi.fields.reject! { |f| f.name == new_gapi.name }
@@ -3238,6 +3238,12 @@ module Google
3238
3238
  # @param [Symbol] mode The field's mode. The possible values are
3239
3239
  # `:nullable`, `:required`, and `:repeated`. The default value is
3240
3240
  # `:nullable`.
3241
+ # @param [Array<String>, String] policy_tags The policy tag list or
3242
+ # single policy tag for the field. Policy tag identifiers are of
3243
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
3244
+ # At most 1 policy tag is currently allowed.
3245
+ # @param [Integer] max_length The maximum UTF-8 length of strings
3246
+ # allowed in the field.
3241
3247
  #
3242
3248
  # @example
3243
3249
  # require "google/cloud/bigquery"
@@ -3249,8 +3255,8 @@ module Google
3249
3255
  # end
3250
3256
  #
3251
3257
  # @!group Schema
3252
- def string name, description: nil, mode: :nullable
3253
- schema.string name, description: description, mode: mode
3258
+ def string name, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
3259
+ schema.string name, description: description, mode: mode, policy_tags: policy_tags, max_length: max_length
3254
3260
  end
3255
3261
 
3256
3262
  ##
@@ -3266,6 +3272,10 @@ module Google
3266
3272
  # @param [Symbol] mode The field's mode. The possible values are
3267
3273
  # `:nullable`, `:required`, and `:repeated`. The default value is
3268
3274
  # `:nullable`.
3275
+ # @param [Array<String>, String] policy_tags The policy tag list or
3276
+ # single policy tag for the field. Policy tag identifiers are of
3277
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
3278
+ # At most 1 policy tag is currently allowed.
3269
3279
  #
3270
3280
  # @example
3271
3281
  # require "google/cloud/bigquery"
@@ -3277,8 +3287,8 @@ module Google
3277
3287
  # end
3278
3288
  #
3279
3289
  # @!group Schema
3280
- def integer name, description: nil, mode: :nullable
3281
- schema.integer name, description: description, mode: mode
3290
+ def integer name, description: nil, mode: :nullable, policy_tags: nil
3291
+ schema.integer name, description: description, mode: mode, policy_tags: policy_tags
3282
3292
  end
3283
3293
 
3284
3294
  ##
@@ -3294,6 +3304,10 @@ module Google
3294
3304
  # @param [Symbol] mode The field's mode. The possible values are
3295
3305
  # `:nullable`, `:required`, and `:repeated`. The default value is
3296
3306
  # `:nullable`.
3307
+ # @param [Array<String>, String] policy_tags The policy tag list or
3308
+ # single policy tag for the field. Policy tag identifiers are of
3309
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
3310
+ # At most 1 policy tag is currently allowed.
3297
3311
  #
3298
3312
  # @example
3299
3313
  # require "google/cloud/bigquery"
@@ -3305,8 +3319,8 @@ module Google
3305
3319
  # end
3306
3320
  #
3307
3321
  # @!group Schema
3308
- def float name, description: nil, mode: :nullable
3309
- schema.float name, description: description, mode: mode
3322
+ def float name, description: nil, mode: :nullable, policy_tags: nil
3323
+ schema.float name, description: description, mode: mode, policy_tags: policy_tags
3310
3324
  end
3311
3325
 
3312
3326
  ##
@@ -3333,6 +3347,20 @@ module Google
3333
3347
  # @param [Symbol] mode The field's mode. The possible values are
3334
3348
  # `:nullable`, `:required`, and `:repeated`. The default value is
3335
3349
  # `:nullable`.
3350
+ # @param [Array<String>, String] policy_tags The policy tag list or
3351
+ # single policy tag for the field. Policy tag identifiers are of
3352
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
3353
+ # At most 1 policy tag is currently allowed.
3354
+ # @param [Integer] precision The precision (maximum number of total
3355
+ # digits) for the field. Acceptable values for precision must be:
3356
+ # `1 ≤ (precision - scale) ≤ 29`. Values for scale must be:
3357
+ # `0 ≤ scale ≤ 9`. If the scale value is set, the precision value
3358
+ # must be set as well.
3359
+ # @param [Integer] scale The scale (maximum number of digits in the
3360
+ # fractional part) for the field. Acceptable values for precision
3361
+ # must be: `1 ≤ (precision - scale) ≤ 29`. Values for scale must
3362
+ # be: `0 ≤ scale ≤ 9`. If the scale value is set, the precision
3363
+ # value must be set as well.
3336
3364
  #
3337
3365
  # @example
3338
3366
  # require "google/cloud/bigquery"
@@ -3344,8 +3372,13 @@ module Google
3344
3372
  # end
3345
3373
  #
3346
3374
  # @!group Schema
3347
- def numeric name, description: nil, mode: :nullable
3348
- schema.numeric name, description: description, mode: mode
3375
+ def numeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil
3376
+ schema.numeric name,
3377
+ description: description,
3378
+ mode: mode,
3379
+ policy_tags: policy_tags,
3380
+ precision: precision,
3381
+ scale: scale
3349
3382
  end
3350
3383
 
3351
3384
  ##
@@ -3372,6 +3405,20 @@ module Google
3372
3405
  # @param [Symbol] mode The field's mode. The possible values are
3373
3406
  # `:nullable`, `:required`, and `:repeated`. The default value is
3374
3407
  # `:nullable`.
3408
+ # @param [Array<String>, String] policy_tags The policy tag list or
3409
+ # single policy tag for the field. Policy tag identifiers are of
3410
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
3411
+ # At most 1 policy tag is currently allowed.
3412
+ # @param [Integer] precision The precision (maximum number of total
3413
+ # digits) for the field. Acceptable values for precision must be:
3414
+ # `1 ≤ (precision - scale) ≤ 38`. Values for scale must be:
3415
+ # `0 ≤ scale ≤ 38`. If the scale value is set, the precision value
3416
+ # must be set as well.
3417
+ # @param [Integer] scale The scale (maximum number of digits in the
3418
+ # fractional part) for the field. Acceptable values for precision
3419
+ # must be: `1 ≤ (precision - scale) ≤ 38`. Values for scale must
3420
+ # be: `0 ≤ scale ≤ 38`. If the scale value is set, the precision
3421
+ # value must be set as well.
3375
3422
  #
3376
3423
  # @example
3377
3424
  # require "google/cloud/bigquery"
@@ -3383,8 +3430,13 @@ module Google
3383
3430
  # end
3384
3431
  #
3385
3432
  # @!group Schema
3386
- def bignumeric name, description: nil, mode: :nullable
3387
- schema.bignumeric name, description: description, mode: mode
3433
+ def bignumeric name, description: nil, mode: :nullable, policy_tags: nil, precision: nil, scale: nil
3434
+ schema.bignumeric name,
3435
+ description: description,
3436
+ mode: mode,
3437
+ policy_tags: policy_tags,
3438
+ precision: precision,
3439
+ scale: scale
3388
3440
  end
3389
3441
 
3390
3442
  ##
@@ -3400,6 +3452,10 @@ module Google
3400
3452
  # @param [Symbol] mode The field's mode. The possible values are
3401
3453
  # `:nullable`, `:required`, and `:repeated`. The default value is
3402
3454
  # `:nullable`.
3455
+ # @param [Array<String>, String] policy_tags The policy tag list or
3456
+ # single policy tag for the field. Policy tag identifiers are of
3457
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
3458
+ # At most 1 policy tag is currently allowed.
3403
3459
  #
3404
3460
  # @example
3405
3461
  # require "google/cloud/bigquery"
@@ -3411,8 +3467,8 @@ module Google
3411
3467
  # end
3412
3468
  #
3413
3469
  # @!group Schema
3414
- def boolean name, description: nil, mode: :nullable
3415
- schema.boolean name, description: description, mode: mode
3470
+ def boolean name, description: nil, mode: :nullable, policy_tags: nil
3471
+ schema.boolean name, description: description, mode: mode, policy_tags: policy_tags
3416
3472
  end
3417
3473
 
3418
3474
  ##
@@ -3428,6 +3484,12 @@ module Google
3428
3484
  # @param [Symbol] mode The field's mode. The possible values are
3429
3485
  # `:nullable`, `:required`, and `:repeated`. The default value is
3430
3486
  # `:nullable`.
3487
+ # @param [Array<String>, String] policy_tags The policy tag list or
3488
+ # single policy tag for the field. Policy tag identifiers are of
3489
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
3490
+ # At most 1 policy tag is currently allowed.
3491
+ # @param [Integer] max_length The maximum the maximum number of
3492
+ # bytes in the field.
3431
3493
  #
3432
3494
  # @example
3433
3495
  # require "google/cloud/bigquery"
@@ -3439,8 +3501,8 @@ module Google
3439
3501
  # end
3440
3502
  #
3441
3503
  # @!group Schema
3442
- def bytes name, description: nil, mode: :nullable
3443
- schema.bytes name, description: description, mode: mode
3504
+ def bytes name, description: nil, mode: :nullable, policy_tags: nil, max_length: nil
3505
+ schema.bytes name, description: description, mode: mode, policy_tags: policy_tags, max_length: max_length
3444
3506
  end
3445
3507
 
3446
3508
  ##
@@ -3456,6 +3518,10 @@ module Google
3456
3518
  # @param [Symbol] mode The field's mode. The possible values are
3457
3519
  # `:nullable`, `:required`, and `:repeated`. The default value is
3458
3520
  # `:nullable`.
3521
+ # @param [Array<String>, String] policy_tags The policy tag list or
3522
+ # single policy tag for the field. Policy tag identifiers are of
3523
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
3524
+ # At most 1 policy tag is currently allowed.
3459
3525
  #
3460
3526
  # @example
3461
3527
  # require "google/cloud/bigquery"
@@ -3467,8 +3533,8 @@ module Google
3467
3533
  # end
3468
3534
  #
3469
3535
  # @!group Schema
3470
- def timestamp name, description: nil, mode: :nullable
3471
- schema.timestamp name, description: description, mode: mode
3536
+ def timestamp name, description: nil, mode: :nullable, policy_tags: nil
3537
+ schema.timestamp name, description: description, mode: mode, policy_tags: policy_tags
3472
3538
  end
3473
3539
 
3474
3540
  ##
@@ -3484,6 +3550,10 @@ module Google
3484
3550
  # @param [Symbol] mode The field's mode. The possible values are
3485
3551
  # `:nullable`, `:required`, and `:repeated`. The default value is
3486
3552
  # `:nullable`.
3553
+ # @param [Array<String>, String] policy_tags The policy tag list or
3554
+ # single policy tag for the field. Policy tag identifiers are of
3555
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
3556
+ # At most 1 policy tag is currently allowed.
3487
3557
  #
3488
3558
  # @example
3489
3559
  # require "google/cloud/bigquery"
@@ -3495,8 +3565,8 @@ module Google
3495
3565
  # end
3496
3566
  #
3497
3567
  # @!group Schema
3498
- def time name, description: nil, mode: :nullable
3499
- schema.time name, description: description, mode: mode
3568
+ def time name, description: nil, mode: :nullable, policy_tags: nil
3569
+ schema.time name, description: description, mode: mode, policy_tags: policy_tags
3500
3570
  end
3501
3571
 
3502
3572
  ##
@@ -3512,6 +3582,10 @@ module Google
3512
3582
  # @param [Symbol] mode The field's mode. The possible values are
3513
3583
  # `:nullable`, `:required`, and `:repeated`. The default value is
3514
3584
  # `:nullable`.
3585
+ # @param [Array<String>, String] policy_tags The policy tag list or
3586
+ # single policy tag for the field. Policy tag identifiers are of
3587
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
3588
+ # At most 1 policy tag is currently allowed.
3515
3589
  #
3516
3590
  # @example
3517
3591
  # require "google/cloud/bigquery"
@@ -3523,8 +3597,8 @@ module Google
3523
3597
  # end
3524
3598
  #
3525
3599
  # @!group Schema
3526
- def datetime name, description: nil, mode: :nullable
3527
- schema.datetime name, description: description, mode: mode
3600
+ def datetime name, description: nil, mode: :nullable, policy_tags: nil
3601
+ schema.datetime name, description: description, mode: mode, policy_tags: policy_tags
3528
3602
  end
3529
3603
 
3530
3604
  ##
@@ -3540,6 +3614,10 @@ module Google
3540
3614
  # @param [Symbol] mode The field's mode. The possible values are
3541
3615
  # `:nullable`, `:required`, and `:repeated`. The default value is
3542
3616
  # `:nullable`.
3617
+ # @param [Array<String>, String] policy_tags The policy tag list or
3618
+ # single policy tag for the field. Policy tag identifiers are of
3619
+ # the form `projects/*/locations/*/taxonomies/*/policyTags/*`.
3620
+ # At most 1 policy tag is currently allowed.
3543
3621
  #
3544
3622
  # @example
3545
3623
  # require "google/cloud/bigquery"
@@ -3551,8 +3629,8 @@ module Google
3551
3629
  # end
3552
3630
  #
3553
3631
  # @!group Schema
3554
- def date name, description: nil, mode: :nullable
3555
- schema.date name, description: description, mode: mode
3632
+ def date name, description: nil, mode: :nullable, policy_tags: nil
3633
+ schema.date name, description: description, mode: mode, policy_tags: policy_tags
3556
3634
  end
3557
3635
 
3558
3636
  ##
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Bigquery
19
- VERSION = "1.32.1".freeze
19
+ VERSION = "1.33.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.32.1
4
+ version: 1.33.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: 2021-07-08 00:00:00.000000000 Z
12
+ date: 2021-07-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby
@@ -101,6 +101,20 @@ dependencies:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '1.1'
104
+ - !ruby/object:Gem::Dependency
105
+ name: google-cloud-data_catalog
106
+ requirement: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.2'
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '1.2'
104
118
  - !ruby/object:Gem::Dependency
105
119
  name: google-style
106
120
  requirement: !ruby/object:Gem::Requirement