google-api-client 0.18.1 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/generated/google/apis/androiddeviceprovisioning_v1.rb +1 -1
  4. data/generated/google/apis/androiddeviceprovisioning_v1/classes.rb +349 -0
  5. data/generated/google/apis/androiddeviceprovisioning_v1/representations.rb +153 -0
  6. data/generated/google/apis/androiddeviceprovisioning_v1/service.rb +412 -0
  7. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  8. data/generated/google/apis/androidmanagement_v1/classes.rb +75 -0
  9. data/generated/google/apis/androidmanagement_v1/representations.rb +22 -0
  10. data/generated/google/apis/bigquery_v2.rb +1 -1
  11. data/generated/google/apis/bigquery_v2/classes.rb +56 -0
  12. data/generated/google/apis/bigquery_v2/representations.rb +20 -0
  13. data/generated/google/apis/calendar_v3.rb +1 -1
  14. data/generated/google/apis/calendar_v3/classes.rb +15 -4
  15. data/generated/google/apis/calendar_v3/representations.rb +1 -0
  16. data/generated/google/apis/calendar_v3/service.rb +8 -4
  17. data/generated/google/apis/cloudfunctions_v1.rb +1 -1
  18. data/generated/google/apis/cloudfunctions_v1/service.rb +9 -2
  19. data/generated/google/apis/cloudfunctions_v1beta2.rb +1 -1
  20. data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +3 -3
  21. data/generated/google/apis/cloudfunctions_v1beta2/service.rb +8 -1
  22. data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
  23. data/generated/google/apis/cloudtasks_v2beta2/classes.rb +19 -18
  24. data/generated/google/apis/cloudtasks_v2beta2/representations.rb +2 -2
  25. data/generated/google/apis/compute_alpha.rb +1 -1
  26. data/generated/google/apis/compute_alpha/classes.rb +256 -63
  27. data/generated/google/apis/compute_alpha/representations.rb +44 -1
  28. data/generated/google/apis/compute_alpha/service.rb +217 -2
  29. data/generated/google/apis/compute_beta.rb +1 -1
  30. data/generated/google/apis/compute_beta/classes.rb +776 -46
  31. data/generated/google/apis/compute_beta/representations.rb +254 -0
  32. data/generated/google/apis/compute_beta/service.rb +1070 -13
  33. data/generated/google/apis/compute_v1.rb +1 -1
  34. data/generated/google/apis/compute_v1/classes.rb +83 -46
  35. data/generated/google/apis/compute_v1/service.rb +4 -2
  36. data/generated/google/apis/deploymentmanager_alpha.rb +1 -1
  37. data/generated/google/apis/deploymentmanager_alpha/classes.rb +52 -0
  38. data/generated/google/apis/deploymentmanager_alpha/representations.rb +19 -0
  39. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  40. data/generated/google/apis/dialogflow_v2beta1/classes.rb +31 -11
  41. data/generated/google/apis/dlp_v2beta1.rb +1 -1
  42. data/generated/google/apis/dlp_v2beta1/classes.rb +70 -4
  43. data/generated/google/apis/dlp_v2beta1/representations.rb +1 -0
  44. data/generated/google/apis/dlp_v2beta2.rb +1 -1
  45. data/generated/google/apis/dlp_v2beta2/classes.rb +124 -30
  46. data/generated/google/apis/dlp_v2beta2/representations.rb +2 -0
  47. data/generated/google/apis/dlp_v2beta2/service.rb +14 -10
  48. data/generated/google/apis/iam_v1.rb +1 -1
  49. data/generated/google/apis/iam_v1/classes.rb +0 -56
  50. data/generated/google/apis/iam_v1/representations.rb +0 -18
  51. data/generated/google/apis/logging_v2.rb +1 -1
  52. data/generated/google/apis/logging_v2/classes.rb +8 -6
  53. data/generated/google/apis/logging_v2beta1.rb +1 -1
  54. data/generated/google/apis/logging_v2beta1/classes.rb +8 -6
  55. data/generated/google/apis/ml_v1.rb +1 -1
  56. data/generated/google/apis/ml_v1/classes.rb +22 -5
  57. data/generated/google/apis/ml_v1/service.rb +19 -5
  58. data/generated/google/apis/runtimeconfig_v1beta1.rb +1 -1
  59. data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +2 -2
  60. data/generated/google/apis/servicecontrol_v1.rb +1 -1
  61. data/generated/google/apis/servicecontrol_v1/classes.rb +10 -0
  62. data/generated/google/apis/servicecontrol_v1/representations.rb +1 -0
  63. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  64. data/generated/google/apis/servicemanagement_v1/classes.rb +6 -5
  65. data/generated/google/apis/serviceuser_v1.rb +1 -1
  66. data/generated/google/apis/serviceuser_v1/classes.rb +6 -5
  67. data/generated/google/apis/sheets_v4.rb +1 -1
  68. data/generated/google/apis/sheets_v4/classes.rb +283 -0
  69. data/generated/google/apis/sheets_v4/representations.rb +90 -0
  70. data/generated/google/apis/speech_v1.rb +1 -1
  71. data/generated/google/apis/storage_v1.rb +1 -1
  72. data/generated/google/apis/storage_v1/classes.rb +115 -4
  73. data/generated/google/apis/storage_v1/representations.rb +23 -0
  74. data/generated/google/apis/storage_v1/service.rb +44 -1
  75. data/generated/google/apis/tpu_v1alpha1.rb +1 -1
  76. data/generated/google/apis/tpu_v1alpha1/classes.rb +11 -4
  77. data/generated/google/apis/tpu_v1alpha1/representations.rb +1 -0
  78. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  79. data/lib/google/apis/version.rb +1 -1
  80. metadata +2 -6
  81. data/generated/google/apis/consumersurveys_v2.rb +0 -40
  82. data/generated/google/apis/consumersurveys_v2/classes.rb +0 -736
  83. data/generated/google/apis/consumersurveys_v2/representations.rb +0 -343
  84. data/generated/google/apis/consumersurveys_v2/service.rb +0 -478
@@ -670,6 +670,12 @@ module Google
670
670
  include Google::Apis::Core::JsonObjectSupport
671
671
  end
672
672
 
673
+ class LineStyle
674
+ class Representation < Google::Apis::Core::JsonRepresentation; end
675
+
676
+ include Google::Apis::Core::JsonObjectSupport
677
+ end
678
+
673
679
  class MatchedDeveloperMetadata
674
680
  class Representation < Google::Apis::Core::JsonRepresentation; end
675
681
 
@@ -1024,6 +1030,30 @@ module Google
1024
1030
  include Google::Apis::Core::JsonObjectSupport
1025
1031
  end
1026
1032
 
1033
+ class WaterfallChartColumnStyle
1034
+ class Representation < Google::Apis::Core::JsonRepresentation; end
1035
+
1036
+ include Google::Apis::Core::JsonObjectSupport
1037
+ end
1038
+
1039
+ class WaterfallChartDomain
1040
+ class Representation < Google::Apis::Core::JsonRepresentation; end
1041
+
1042
+ include Google::Apis::Core::JsonObjectSupport
1043
+ end
1044
+
1045
+ class WaterfallChartSeries
1046
+ class Representation < Google::Apis::Core::JsonRepresentation; end
1047
+
1048
+ include Google::Apis::Core::JsonObjectSupport
1049
+ end
1050
+
1051
+ class WaterfallChartSpec
1052
+ class Representation < Google::Apis::Core::JsonRepresentation; end
1053
+
1054
+ include Google::Apis::Core::JsonObjectSupport
1055
+ end
1056
+
1027
1057
  class AddBandingRequest
1028
1058
  # @private
1029
1059
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1228,6 +1258,8 @@ module Google
1228
1258
  class BasicChartSeries
1229
1259
  # @private
1230
1260
  class Representation < Google::Apis::Core::JsonRepresentation
1261
+ property :line_style, as: 'lineStyle', class: Google::Apis::SheetsV4::LineStyle, decorator: Google::Apis::SheetsV4::LineStyle::Representation
1262
+
1231
1263
  property :series, as: 'series', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation
1232
1264
 
1233
1265
  property :target_axis, as: 'targetAxis'
@@ -1600,6 +1632,8 @@ module Google
1600
1632
 
1601
1633
  property :title_text_position, as: 'titleTextPosition', class: Google::Apis::SheetsV4::TextPosition, decorator: Google::Apis::SheetsV4::TextPosition::Representation
1602
1634
 
1635
+ property :waterfall_chart, as: 'waterfallChart', class: Google::Apis::SheetsV4::WaterfallChartSpec, decorator: Google::Apis::SheetsV4::WaterfallChartSpec::Representation
1636
+
1603
1637
  end
1604
1638
  end
1605
1639
 
@@ -2143,6 +2177,14 @@ module Google
2143
2177
  end
2144
2178
  end
2145
2179
 
2180
+ class LineStyle
2181
+ # @private
2182
+ class Representation < Google::Apis::Core::JsonRepresentation
2183
+ property :type, as: 'type'
2184
+ property :width, as: 'width'
2185
+ end
2186
+ end
2187
+
2146
2188
  class MatchedDeveloperMetadata
2147
2189
  # @private
2148
2190
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -2916,6 +2958,54 @@ module Google
2916
2958
 
2917
2959
  end
2918
2960
  end
2961
+
2962
+ class WaterfallChartColumnStyle
2963
+ # @private
2964
+ class Representation < Google::Apis::Core::JsonRepresentation
2965
+ property :color, as: 'color', class: Google::Apis::SheetsV4::Color, decorator: Google::Apis::SheetsV4::Color::Representation
2966
+
2967
+ property :label, as: 'label'
2968
+ end
2969
+ end
2970
+
2971
+ class WaterfallChartDomain
2972
+ # @private
2973
+ class Representation < Google::Apis::Core::JsonRepresentation
2974
+ property :data, as: 'data', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation
2975
+
2976
+ property :reversed, as: 'reversed'
2977
+ end
2978
+ end
2979
+
2980
+ class WaterfallChartSeries
2981
+ # @private
2982
+ class Representation < Google::Apis::Core::JsonRepresentation
2983
+ property :data, as: 'data', class: Google::Apis::SheetsV4::ChartData, decorator: Google::Apis::SheetsV4::ChartData::Representation
2984
+
2985
+ property :hide_trailing_subtotal, as: 'hideTrailingSubtotal'
2986
+ property :negative_columns_style, as: 'negativeColumnsStyle', class: Google::Apis::SheetsV4::WaterfallChartColumnStyle, decorator: Google::Apis::SheetsV4::WaterfallChartColumnStyle::Representation
2987
+
2988
+ property :positive_columns_style, as: 'positiveColumnsStyle', class: Google::Apis::SheetsV4::WaterfallChartColumnStyle, decorator: Google::Apis::SheetsV4::WaterfallChartColumnStyle::Representation
2989
+
2990
+ property :subtotal_columns_style, as: 'subtotalColumnsStyle', class: Google::Apis::SheetsV4::WaterfallChartColumnStyle, decorator: Google::Apis::SheetsV4::WaterfallChartColumnStyle::Representation
2991
+
2992
+ end
2993
+ end
2994
+
2995
+ class WaterfallChartSpec
2996
+ # @private
2997
+ class Representation < Google::Apis::Core::JsonRepresentation
2998
+ property :connector_line_style, as: 'connectorLineStyle', class: Google::Apis::SheetsV4::LineStyle, decorator: Google::Apis::SheetsV4::LineStyle::Representation
2999
+
3000
+ property :domain, as: 'domain', class: Google::Apis::SheetsV4::WaterfallChartDomain, decorator: Google::Apis::SheetsV4::WaterfallChartDomain::Representation
3001
+
3002
+ property :first_value_is_total, as: 'firstValueIsTotal'
3003
+ property :hide_connector_lines, as: 'hideConnectorLines'
3004
+ collection :series, as: 'series', class: Google::Apis::SheetsV4::WaterfallChartSeries, decorator: Google::Apis::SheetsV4::WaterfallChartSeries::Representation
3005
+
3006
+ property :stacked_type, as: 'stackedType'
3007
+ end
3008
+ end
2919
3009
  end
2920
3010
  end
2921
3011
  end
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://cloud.google.com/speech/
26
26
  module SpeechV1
27
27
  VERSION = 'V1'
28
- REVISION = '20171213'
28
+ REVISION = '20171219'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/storage/docs/json_api/
26
26
  module StorageV1
27
27
  VERSION = 'V1'
28
- REVISION = '20171018'
28
+ REVISION = '20171212'
29
29
 
30
30
  # View and manage your data across Google Cloud Platform services
31
31
  AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
@@ -41,6 +41,21 @@ module Google
41
41
  # @return [Array<Google::Apis::StorageV1::Bucket::CorsConfiguration>]
42
42
  attr_accessor :cors_configurations
43
43
 
44
+ # Defines the default value for Event-Based hold on newly created objects in
45
+ # this bucket. Event-Based hold is a way to retain objects indefinitely until an
46
+ # event occurs, signified by the hold's release. After being released, such
47
+ # objects will be subject to bucket-level retention (if any). One sample use
48
+ # case of this flag is for banks to hold loan documents for at least 3 years
49
+ # after loan is paid in full. Here bucket-level retention is 3 years and the
50
+ # event is loan being paid in full. In this example these objects will be held
51
+ # intact for any number of years until the event has occurred (hold is released)
52
+ # and then 3 more years after that. Objects under Event-Based hold cannot be
53
+ # deleted, overwritten or archived until the hold is removed.
54
+ # Corresponds to the JSON property `defaultEventBasedHold`
55
+ # @return [Boolean]
56
+ attr_accessor :default_event_based_hold
57
+ alias_method :default_event_based_hold?, :default_event_based_hold
58
+
44
59
  # Default access controls to apply to new objects when no ACL is provided.
45
60
  # Corresponds to the JSON property `defaultObjectAcl`
46
61
  # @return [Array<Google::Apis::StorageV1::ObjectAccessControl>]
@@ -57,7 +72,7 @@ module Google
57
72
  # @return [String]
58
73
  attr_accessor :etag
59
74
 
60
- # The ID of the bucket. For buckets, the id and name properities are the same.
75
+ # The ID of the bucket. For buckets, the id and name properties are the same.
61
76
  # Corresponds to the JSON property `id`
62
77
  # @return [String]
63
78
  attr_accessor :id
@@ -111,6 +126,19 @@ module Google
111
126
  # @return [Fixnum]
112
127
  attr_accessor :project_number
113
128
 
129
+ # Defines the retention policy for a bucket. The Retention policy enforces a
130
+ # minimum retention time for all objects contained in the bucket, based on their
131
+ # creation time. Any attempt to overwrite or delete objects younger than the
132
+ # retention period will result in a PERMISSION_DENIED error. An unlocked
133
+ # retention policy can be modified or removed from the bucket via the
134
+ # UpdateBucketMetadata RPC. A locked retention policy cannot be removed or
135
+ # shortened in duration for the lifetime of the bucket. Attempting to remove or
136
+ # decrease period of a locked retention policy will result in a
137
+ # PERMISSION_DENIED error.
138
+ # Corresponds to the JSON property `retentionPolicy`
139
+ # @return [Google::Apis::StorageV1::Bucket::RetentionPolicy]
140
+ attr_accessor :retention_policy
141
+
114
142
  # The URI of this bucket.
115
143
  # Corresponds to the JSON property `selfLink`
116
144
  # @return [String]
@@ -157,6 +185,7 @@ module Google
157
185
  @acl = args[:acl] if args.key?(:acl)
158
186
  @billing = args[:billing] if args.key?(:billing)
159
187
  @cors_configurations = args[:cors_configurations] if args.key?(:cors_configurations)
188
+ @default_event_based_hold = args[:default_event_based_hold] if args.key?(:default_event_based_hold)
160
189
  @default_object_acl = args[:default_object_acl] if args.key?(:default_object_acl)
161
190
  @encryption = args[:encryption] if args.key?(:encryption)
162
191
  @etag = args[:etag] if args.key?(:etag)
@@ -170,6 +199,7 @@ module Google
170
199
  @name = args[:name] if args.key?(:name)
171
200
  @owner = args[:owner] if args.key?(:owner)
172
201
  @project_number = args[:project_number] if args.key?(:project_number)
202
+ @retention_policy = args[:retention_policy] if args.key?(:retention_policy)
173
203
  @self_link = args[:self_link] if args.key?(:self_link)
174
204
  @storage_class = args[:storage_class] if args.key?(:storage_class)
175
205
  @time_created = args[:time_created] if args.key?(:time_created)
@@ -182,7 +212,7 @@ module Google
182
212
  class Billing
183
213
  include Google::Apis::Core::Hashable
184
214
 
185
- # When set to true, bucket is requester pays.
215
+ # When set to true, Requester Pays is enabled for this bucket.
186
216
  # Corresponds to the JSON property `requesterPays`
187
217
  # @return [Boolean]
188
218
  attr_accessor :requester_pays
@@ -245,7 +275,9 @@ module Google
245
275
  class Encryption
246
276
  include Google::Apis::Core::Hashable
247
277
 
248
- #
278
+ # A Cloud KMS key that will be used to encrypt objects inserted into this bucket,
279
+ # if no encryption method is specified. Limited availability; usable only by
280
+ # enabled projects.
249
281
  # Corresponds to the JSON property `defaultKmsKeyName`
250
282
  # @return [String]
251
283
  attr_accessor :default_kms_key_name
@@ -434,6 +466,49 @@ module Google
434
466
  end
435
467
  end
436
468
 
469
+ # Defines the retention policy for a bucket. The Retention policy enforces a
470
+ # minimum retention time for all objects contained in the bucket, based on their
471
+ # creation time. Any attempt to overwrite or delete objects younger than the
472
+ # retention period will result in a PERMISSION_DENIED error. An unlocked
473
+ # retention policy can be modified or removed from the bucket via the
474
+ # UpdateBucketMetadata RPC. A locked retention policy cannot be removed or
475
+ # shortened in duration for the lifetime of the bucket. Attempting to remove or
476
+ # decrease period of a locked retention policy will result in a
477
+ # PERMISSION_DENIED error.
478
+ class RetentionPolicy
479
+ include Google::Apis::Core::Hashable
480
+
481
+ # The time from which policy was enforced and effective. RFC 3339 format.
482
+ # Corresponds to the JSON property `effectiveTime`
483
+ # @return [DateTime]
484
+ attr_accessor :effective_time
485
+
486
+ # Once locked, an object retention policy cannot be modified.
487
+ # Corresponds to the JSON property `isLocked`
488
+ # @return [Boolean]
489
+ attr_accessor :is_locked
490
+ alias_method :is_locked?, :is_locked
491
+
492
+ # Specifies the duration that objects need to be retained. Retention duration
493
+ # must be greater than zero and less than 100 years. Note that enforcement of
494
+ # retention periods less than a day is not guaranteed. Such periods should only
495
+ # be used for testing purposes.
496
+ # Corresponds to the JSON property `retentionPeriod`
497
+ # @return [Fixnum]
498
+ attr_accessor :retention_period
499
+
500
+ def initialize(**args)
501
+ update!(**args)
502
+ end
503
+
504
+ # Update properties of this object
505
+ def update!(**args)
506
+ @effective_time = args[:effective_time] if args.key?(:effective_time)
507
+ @is_locked = args[:is_locked] if args.key?(:is_locked)
508
+ @retention_period = args[:retention_period] if args.key?(:retention_period)
509
+ end
510
+ end
511
+
437
512
  # The bucket's versioning configuration.
438
513
  class Versioning
439
514
  include Google::Apis::Core::Hashable
@@ -987,6 +1062,19 @@ module Google
987
1062
  # @return [String]
988
1063
  attr_accessor :etag
989
1064
 
1065
+ # Defines the Event-Based hold for an object. Event-Based hold is a way to
1066
+ # retain objects indefinitely until an event occurs, signified by the hold's
1067
+ # release. After being released, such objects will be subject to bucket-level
1068
+ # retention (if any). One sample use case of this flag is for banks to hold loan
1069
+ # documents for at least 3 years after loan is paid in full. Here bucket-level
1070
+ # retention is 3 years and the event is loan being paid in full. In this example
1071
+ # these objects will be held intact for any number of years until the event has
1072
+ # occurred (hold is released) and then 3 more years after that.
1073
+ # Corresponds to the JSON property `eventBasedHold`
1074
+ # @return [Boolean]
1075
+ attr_accessor :event_based_hold
1076
+ alias_method :event_based_hold?, :event_based_hold
1077
+
990
1078
  # The content generation of this object. Used for object versioning.
991
1079
  # Corresponds to the JSON property `generation`
992
1080
  # @return [Fixnum]
@@ -1004,7 +1092,7 @@ module Google
1004
1092
  attr_accessor :kind
1005
1093
 
1006
1094
  # Cloud KMS Key used to encrypt this object, if the object is encrypted by such
1007
- # a key.
1095
+ # a key. Limited availability; usable only by enabled projects.
1008
1096
  # Corresponds to the JSON property `kmsKeyName`
1009
1097
  # @return [String]
1010
1098
  attr_accessor :kms_key_name
@@ -1043,6 +1131,16 @@ module Google
1043
1131
  # @return [Google::Apis::StorageV1::Object::Owner]
1044
1132
  attr_accessor :owner
1045
1133
 
1134
+ # Specifies the earliest time that the object's retention period expires. This
1135
+ # value is server-determined and is in RFC 3339 format. Note 1: This field is
1136
+ # not provided for objects with an active Event-Based hold, since retention
1137
+ # expiration is unknown until the hold is removed. Note 2: This value can be
1138
+ # provided even when TemporaryHold is set (so that the user can reason about
1139
+ # policy without having to first unset the TemporaryHold).
1140
+ # Corresponds to the JSON property `retentionExpirationTime`
1141
+ # @return [DateTime]
1142
+ attr_accessor :retention_expiration_time
1143
+
1046
1144
  # The link to this object.
1047
1145
  # Corresponds to the JSON property `selfLink`
1048
1146
  # @return [String]
@@ -1058,6 +1156,16 @@ module Google
1058
1156
  # @return [String]
1059
1157
  attr_accessor :storage_class
1060
1158
 
1159
+ # Defines the temporary hold for an object. This flag is used to enforce a
1160
+ # temporary hold on an object. While it is set to true, the object is protected
1161
+ # against deletion and overwrites. A common use case of this flag is regulatory
1162
+ # investigations where objects need to be retained while the investigation is
1163
+ # ongoing.
1164
+ # Corresponds to the JSON property `temporaryHold`
1165
+ # @return [Boolean]
1166
+ attr_accessor :temporary_hold
1167
+ alias_method :temporary_hold?, :temporary_hold
1168
+
1061
1169
  # The creation time of the object in RFC 3339 format.
1062
1170
  # Corresponds to the JSON property `timeCreated`
1063
1171
  # @return [DateTime]
@@ -1097,6 +1205,7 @@ module Google
1097
1205
  @crc32c = args[:crc32c] if args.key?(:crc32c)
1098
1206
  @customer_encryption = args[:customer_encryption] if args.key?(:customer_encryption)
1099
1207
  @etag = args[:etag] if args.key?(:etag)
1208
+ @event_based_hold = args[:event_based_hold] if args.key?(:event_based_hold)
1100
1209
  @generation = args[:generation] if args.key?(:generation)
1101
1210
  @id = args[:id] if args.key?(:id)
1102
1211
  @kind = args[:kind] if args.key?(:kind)
@@ -1107,9 +1216,11 @@ module Google
1107
1216
  @metageneration = args[:metageneration] if args.key?(:metageneration)
1108
1217
  @name = args[:name] if args.key?(:name)
1109
1218
  @owner = args[:owner] if args.key?(:owner)
1219
+ @retention_expiration_time = args[:retention_expiration_time] if args.key?(:retention_expiration_time)
1110
1220
  @self_link = args[:self_link] if args.key?(:self_link)
1111
1221
  @size = args[:size] if args.key?(:size)
1112
1222
  @storage_class = args[:storage_class] if args.key?(:storage_class)
1223
+ @temporary_hold = args[:temporary_hold] if args.key?(:temporary_hold)
1113
1224
  @time_created = args[:time_created] if args.key?(:time_created)
1114
1225
  @time_deleted = args[:time_deleted] if args.key?(:time_deleted)
1115
1226
  @time_storage_class_updated = args[:time_storage_class_updated] if args.key?(:time_storage_class_updated)
@@ -79,6 +79,12 @@ module Google
79
79
  include Google::Apis::Core::JsonObjectSupport
80
80
  end
81
81
 
82
+ class RetentionPolicy
83
+ class Representation < Google::Apis::Core::JsonRepresentation; end
84
+
85
+ include Google::Apis::Core::JsonObjectSupport
86
+ end
87
+
82
88
  class Versioning
83
89
  class Representation < Google::Apis::Core::JsonRepresentation; end
84
90
 
@@ -235,6 +241,7 @@ module Google
235
241
 
236
242
  collection :cors_configurations, as: 'cors', class: Google::Apis::StorageV1::Bucket::CorsConfiguration, decorator: Google::Apis::StorageV1::Bucket::CorsConfiguration::Representation
237
243
 
244
+ property :default_event_based_hold, as: 'defaultEventBasedHold'
238
245
  collection :default_object_acl, as: 'defaultObjectAcl', class: Google::Apis::StorageV1::ObjectAccessControl, decorator: Google::Apis::StorageV1::ObjectAccessControl::Representation
239
246
 
240
247
  property :encryption, as: 'encryption', class: Google::Apis::StorageV1::Bucket::Encryption, decorator: Google::Apis::StorageV1::Bucket::Encryption::Representation
@@ -253,6 +260,8 @@ module Google
253
260
  property :owner, as: 'owner', class: Google::Apis::StorageV1::Bucket::Owner, decorator: Google::Apis::StorageV1::Bucket::Owner::Representation
254
261
 
255
262
  property :project_number, :numeric_string => true, as: 'projectNumber'
263
+ property :retention_policy, as: 'retentionPolicy', class: Google::Apis::StorageV1::Bucket::RetentionPolicy, decorator: Google::Apis::StorageV1::Bucket::RetentionPolicy::Representation
264
+
256
265
  property :self_link, as: 'selfLink'
257
266
  property :storage_class, as: 'storageClass'
258
267
  property :time_created, as: 'timeCreated', type: DateTime
@@ -343,6 +352,16 @@ module Google
343
352
  end
344
353
  end
345
354
 
355
+ class RetentionPolicy
356
+ # @private
357
+ class Representation < Google::Apis::Core::JsonRepresentation
358
+ property :effective_time, as: 'effectiveTime', type: DateTime
359
+
360
+ property :is_locked, as: 'isLocked'
361
+ property :retention_period, :numeric_string => true, as: 'retentionPeriod'
362
+ end
363
+ end
364
+
346
365
  class Versioning
347
366
  # @private
348
367
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -488,6 +507,7 @@ module Google
488
507
  property :customer_encryption, as: 'customerEncryption', class: Google::Apis::StorageV1::Object::CustomerEncryption, decorator: Google::Apis::StorageV1::Object::CustomerEncryption::Representation
489
508
 
490
509
  property :etag, as: 'etag'
510
+ property :event_based_hold, as: 'eventBasedHold'
491
511
  property :generation, :numeric_string => true, as: 'generation'
492
512
  property :id, as: 'id'
493
513
  property :kind, as: 'kind'
@@ -499,9 +519,12 @@ module Google
499
519
  property :name, as: 'name'
500
520
  property :owner, as: 'owner', class: Google::Apis::StorageV1::Object::Owner, decorator: Google::Apis::StorageV1::Object::Owner::Representation
501
521
 
522
+ property :retention_expiration_time, as: 'retentionExpirationTime', type: DateTime
523
+
502
524
  property :self_link, as: 'selfLink'
503
525
  property :size, :numeric_string => true, as: 'size'
504
526
  property :storage_class, as: 'storageClass'
527
+ property :temporary_hold, as: 'temporaryHold'
505
528
  property :time_created, as: 'timeCreated', type: DateTime
506
529
 
507
530
  property :time_deleted, as: 'timeDeleted', type: DateTime
@@ -539,6 +539,48 @@ module Google
539
539
  execute_or_queue_command(command, &block)
540
540
  end
541
541
 
542
+ # Locks retention policy on a bucket.
543
+ # @param [String] bucket
544
+ # Name of a bucket.
545
+ # @param [Fixnum] if_metageneration_match
546
+ # Makes the operation conditional on whether bucket's current metageneration
547
+ # matches the given value.
548
+ # @param [String] user_project
549
+ # The project to be billed for this request. Required for Requester Pays buckets.
550
+ # @param [String] fields
551
+ # Selector specifying which fields to include in a partial response.
552
+ # @param [String] quota_user
553
+ # Available to use for quota purposes for server-side applications. Can be any
554
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
555
+ # Overrides userIp if both are provided.
556
+ # @param [String] user_ip
557
+ # IP address of the site where the request originates. Use this if you want to
558
+ # enforce per-user limits.
559
+ # @param [Google::Apis::RequestOptions] options
560
+ # Request-specific options
561
+ #
562
+ # @yield [result, err] Result & error if block supplied
563
+ # @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object
564
+ # @yieldparam err [StandardError] error object if request failed
565
+ #
566
+ # @return [Google::Apis::StorageV1::Bucket]
567
+ #
568
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
569
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
570
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
571
+ def lock_bucket_retention_policy(bucket, if_metageneration_match, user_project: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
572
+ command = make_simple_command(:post, 'b/{bucket}/lockRetentionPolicy', options)
573
+ command.response_representation = Google::Apis::StorageV1::Bucket::Representation
574
+ command.response_class = Google::Apis::StorageV1::Bucket
575
+ command.params['bucket'] = bucket unless bucket.nil?
576
+ command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
577
+ command.query['userProject'] = user_project unless user_project.nil?
578
+ command.query['fields'] = fields unless fields.nil?
579
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
580
+ command.query['userIp'] = user_ip unless user_ip.nil?
581
+ execute_or_queue_command(command, &block)
582
+ end
583
+
542
584
  # Updates a bucket. Changes to the bucket will be readable immediately after
543
585
  # writing, but configuration changes may take time to propagate. This method
544
586
  # supports patch semantics.
@@ -1871,7 +1913,8 @@ module Google
1871
1913
  # @param [String] kms_key_name
1872
1914
  # Resource name of the Cloud KMS key, of the form projects/my-project/locations/
1873
1915
  # global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the
1874
- # object. Overrides the object metadata's kms_key_name value, if any.
1916
+ # object. Overrides the object metadata's kms_key_name value, if any. Limited
1917
+ # availability; usable only by enabled projects.
1875
1918
  # @param [String] name
1876
1919
  # Name of the object. Required when the object metadata is not otherwise
1877
1920
  # provided. Overrides the object metadata's name value, if any. For information