google-apis-drivelabels_v2 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1609 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'date'
16
+ require 'google/apis/core/base_service'
17
+ require 'google/apis/core/json_representation'
18
+ require 'google/apis/core/hashable'
19
+ require 'google/apis/errors'
20
+
21
+ module Google
22
+ module Apis
23
+ module DrivelabelsV2
24
+
25
+ # The color derived from BadgeConfig and coerced to the nearest supported color.
26
+ class GoogleAppsDriveLabelsV2BadgeColors
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # Represents a color in the RGBA color space. This representation is designed
30
+ # for simplicity of conversion to/from color representations in various
31
+ # languages over compactness. For example, the fields of this representation can
32
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
33
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
34
+ # method in iOS; and, with just a little work, it can be easily formatted into a
35
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
36
+ # information about the absolute color space that should be used to interpret
37
+ # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
38
+ # applications should assume the sRGB color space. When color equality needs to
39
+ # be decided, implementations, unless documented otherwise, treat two colors as
40
+ # equal if all their red, green, blue, and alpha values each differ by at most
41
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
42
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
43
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
44
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
45
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
46
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
47
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
48
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
49
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
50
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
51
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
52
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
53
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
54
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
55
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
56
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
57
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
58
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
59
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
60
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
61
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
62
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
63
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
64
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
65
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
66
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
67
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
68
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
69
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
70
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
71
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
72
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
73
+ # / ...
74
+ # Corresponds to the JSON property `backgroundColor`
75
+ # @return [Google::Apis::DrivelabelsV2::GoogleTypeColor]
76
+ attr_accessor :background_color
77
+
78
+ # Represents a color in the RGBA color space. This representation is designed
79
+ # for simplicity of conversion to/from color representations in various
80
+ # languages over compactness. For example, the fields of this representation can
81
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
82
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
83
+ # method in iOS; and, with just a little work, it can be easily formatted into a
84
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
85
+ # information about the absolute color space that should be used to interpret
86
+ # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
87
+ # applications should assume the sRGB color space. When color equality needs to
88
+ # be decided, implementations, unless documented otherwise, treat two colors as
89
+ # equal if all their red, green, blue, and alpha values each differ by at most
90
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
91
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
92
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
93
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
94
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
95
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
96
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
97
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
98
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
99
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
100
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
101
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
102
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
103
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
104
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
105
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
106
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
107
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
108
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
109
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
110
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
111
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
112
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
113
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
114
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
115
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
116
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
117
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
118
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
119
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
120
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
121
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
122
+ # / ...
123
+ # Corresponds to the JSON property `foregroundColor`
124
+ # @return [Google::Apis::DrivelabelsV2::GoogleTypeColor]
125
+ attr_accessor :foreground_color
126
+
127
+ # Represents a color in the RGBA color space. This representation is designed
128
+ # for simplicity of conversion to/from color representations in various
129
+ # languages over compactness. For example, the fields of this representation can
130
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
131
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
132
+ # method in iOS; and, with just a little work, it can be easily formatted into a
133
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
134
+ # information about the absolute color space that should be used to interpret
135
+ # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
136
+ # applications should assume the sRGB color space. When color equality needs to
137
+ # be decided, implementations, unless documented otherwise, treat two colors as
138
+ # equal if all their red, green, blue, and alpha values each differ by at most
139
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
140
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
141
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
142
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
143
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
144
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
145
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
146
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
147
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
148
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
149
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
150
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
151
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
152
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
153
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
154
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
155
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
156
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
157
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
158
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
159
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
160
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
161
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
162
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
163
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
164
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
165
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
166
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
167
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
168
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
169
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
170
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
171
+ # / ...
172
+ # Corresponds to the JSON property `soloColor`
173
+ # @return [Google::Apis::DrivelabelsV2::GoogleTypeColor]
174
+ attr_accessor :solo_color
175
+
176
+ def initialize(**args)
177
+ update!(**args)
178
+ end
179
+
180
+ # Update properties of this object
181
+ def update!(**args)
182
+ @background_color = args[:background_color] if args.key?(:background_color)
183
+ @foreground_color = args[:foreground_color] if args.key?(:foreground_color)
184
+ @solo_color = args[:solo_color] if args.key?(:solo_color)
185
+ end
186
+ end
187
+
188
+ # Badge status of the label.
189
+ class GoogleAppsDriveLabelsV2BadgeConfig
190
+ include Google::Apis::Core::Hashable
191
+
192
+ # Represents a color in the RGBA color space. This representation is designed
193
+ # for simplicity of conversion to/from color representations in various
194
+ # languages over compactness. For example, the fields of this representation can
195
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
196
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
197
+ # method in iOS; and, with just a little work, it can be easily formatted into a
198
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
199
+ # information about the absolute color space that should be used to interpret
200
+ # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
201
+ # applications should assume the sRGB color space. When color equality needs to
202
+ # be decided, implementations, unless documented otherwise, treat two colors as
203
+ # equal if all their red, green, blue, and alpha values each differ by at most
204
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
205
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
206
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
207
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
208
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
209
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
210
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
211
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
212
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
213
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
214
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
215
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
216
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
217
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
218
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
219
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
220
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
221
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
222
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
223
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
224
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
225
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
226
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
227
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
228
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
229
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
230
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
231
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
232
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
233
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
234
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
235
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
236
+ # / ...
237
+ # Corresponds to the JSON property `color`
238
+ # @return [Google::Apis::DrivelabelsV2::GoogleTypeColor]
239
+ attr_accessor :color
240
+
241
+ # Override the default global priority of this badge. When set to 0, the default
242
+ # priority heuristic will be used.
243
+ # Corresponds to the JSON property `priorityOverride`
244
+ # @return [Fixnum]
245
+ attr_accessor :priority_override
246
+
247
+ def initialize(**args)
248
+ update!(**args)
249
+ end
250
+
251
+ # Update properties of this object
252
+ def update!(**args)
253
+ @color = args[:color] if args.key?(:color)
254
+ @priority_override = args[:priority_override] if args.key?(:priority_override)
255
+ end
256
+ end
257
+
258
+ # Defines a field which has a display name, data type, and other configuration
259
+ # options. This field defines the kind of metadata that may be set on a Drive
260
+ # item.
261
+ class GoogleAppsDriveLabelsV2Field
262
+ include Google::Apis::Core::Hashable
263
+
264
+ # The capabilities related to this field on applied metadata.
265
+ # Corresponds to the JSON property `appliedCapabilities`
266
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldAppliedCapabilities]
267
+ attr_accessor :applied_capabilities
268
+
269
+ # Output only. The time this field was created.
270
+ # Corresponds to the JSON property `createTime`
271
+ # @return [String]
272
+ attr_accessor :create_time
273
+
274
+ # Information about a user.
275
+ # Corresponds to the JSON property `creator`
276
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo]
277
+ attr_accessor :creator
278
+
279
+ # Options for the date field type.
280
+ # Corresponds to the JSON property `dateOptions`
281
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldDateOptions]
282
+ attr_accessor :date_options
283
+
284
+ # Output only. The time this field was disabled. This value has no meaning when
285
+ # the field is not disabled.
286
+ # Corresponds to the JSON property `disableTime`
287
+ # @return [String]
288
+ attr_accessor :disable_time
289
+
290
+ # Information about a user.
291
+ # Corresponds to the JSON property `disabler`
292
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo]
293
+ attr_accessor :disabler
294
+
295
+ # UI Display hints for rendering a Field.
296
+ # Corresponds to the JSON property `displayHints`
297
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldDisplayHints]
298
+ attr_accessor :display_hints
299
+
300
+ # Output only. The key of a field, unique within a Label or Library. This value
301
+ # is autogenerated, and will match the form `([a-zA-Z0-9_])+
302
+ # Corresponds to the JSON property `id`
303
+ # @return [String]
304
+ attr_accessor :id
305
+
306
+ # Options for the Integer field type.
307
+ # Corresponds to the JSON property `integerOptions`
308
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldIntegerOptions]
309
+ attr_accessor :integer_options
310
+
311
+ # The lifecycle state of an object, e.g. Label, Field, or Choice. The Lifecycle
312
+ # enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `
313
+ # UNPUBLISHED_DRAFT` -> `PUBLISHED` * `UNPUBLISHED_DRAFT` -> (Deleted) * `
314
+ # PUBLISHED` -> `DISABLED` * `DISABLED` -> `PUBLISHED` * `DISABLED` -> (Deleted)
315
+ # The published and disabled states have some distinct characteristics: *
316
+ # Published - Some kinds of changes may be made to an object in this state, in
317
+ # which case `has_unpublished_changes` will be true. Some kinds of changes are
318
+ # not permitted. Generally, any change that would invalidate or cause new
319
+ # restrictions on existing metadata related to the Label will be rejected. *
320
+ # Disabled - When disabled, the configured `DisabledPolicy` will take effect.
321
+ # Corresponds to the JSON property `lifecycle`
322
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Lifecycle]
323
+ attr_accessor :lifecycle
324
+
325
+ # Contains information about whether a label component should be considered
326
+ # locked.
327
+ # Corresponds to the JSON property `lockStatus`
328
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LockStatus]
329
+ attr_accessor :lock_status
330
+
331
+ # The basic properties of the field.
332
+ # Corresponds to the JSON property `properties`
333
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldProperties]
334
+ attr_accessor :properties
335
+
336
+ # Information about a user.
337
+ # Corresponds to the JSON property `publisher`
338
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo]
339
+ attr_accessor :publisher
340
+
341
+ # Output only. The key to use when constructing Drive search queries to find
342
+ # files based on values defined for this Field on files. For example: "``
343
+ # query_key`` > 2001-01-01"
344
+ # Corresponds to the JSON property `queryKey`
345
+ # @return [String]
346
+ attr_accessor :query_key
347
+
348
+ # The capabilities related to this Field when editing the Field.
349
+ # Corresponds to the JSON property `schemaCapabilities`
350
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldSchemaCapabilities]
351
+ attr_accessor :schema_capabilities
352
+
353
+ # Options for the selection field type.
354
+ # Corresponds to the JSON property `selectionOptions`
355
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldSelectionOptions]
356
+ attr_accessor :selection_options
357
+
358
+ # Options for the Text field type.
359
+ # Corresponds to the JSON property `textOptions`
360
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldTextOptions]
361
+ attr_accessor :text_options
362
+
363
+ # Output only. The time this field was updated.
364
+ # Corresponds to the JSON property `updateTime`
365
+ # @return [String]
366
+ attr_accessor :update_time
367
+
368
+ # Information about a user.
369
+ # Corresponds to the JSON property `updater`
370
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo]
371
+ attr_accessor :updater
372
+
373
+ # Options for the user field type.
374
+ # Corresponds to the JSON property `userOptions`
375
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldUserOptions]
376
+ attr_accessor :user_options
377
+
378
+ def initialize(**args)
379
+ update!(**args)
380
+ end
381
+
382
+ # Update properties of this object
383
+ def update!(**args)
384
+ @applied_capabilities = args[:applied_capabilities] if args.key?(:applied_capabilities)
385
+ @create_time = args[:create_time] if args.key?(:create_time)
386
+ @creator = args[:creator] if args.key?(:creator)
387
+ @date_options = args[:date_options] if args.key?(:date_options)
388
+ @disable_time = args[:disable_time] if args.key?(:disable_time)
389
+ @disabler = args[:disabler] if args.key?(:disabler)
390
+ @display_hints = args[:display_hints] if args.key?(:display_hints)
391
+ @id = args[:id] if args.key?(:id)
392
+ @integer_options = args[:integer_options] if args.key?(:integer_options)
393
+ @lifecycle = args[:lifecycle] if args.key?(:lifecycle)
394
+ @lock_status = args[:lock_status] if args.key?(:lock_status)
395
+ @properties = args[:properties] if args.key?(:properties)
396
+ @publisher = args[:publisher] if args.key?(:publisher)
397
+ @query_key = args[:query_key] if args.key?(:query_key)
398
+ @schema_capabilities = args[:schema_capabilities] if args.key?(:schema_capabilities)
399
+ @selection_options = args[:selection_options] if args.key?(:selection_options)
400
+ @text_options = args[:text_options] if args.key?(:text_options)
401
+ @update_time = args[:update_time] if args.key?(:update_time)
402
+ @updater = args[:updater] if args.key?(:updater)
403
+ @user_options = args[:user_options] if args.key?(:user_options)
404
+ end
405
+ end
406
+
407
+ # The capabilities related to this field on applied metadata.
408
+ class GoogleAppsDriveLabelsV2FieldAppliedCapabilities
409
+ include Google::Apis::Core::Hashable
410
+
411
+ # Whether the user can read related applied metadata on items.
412
+ # Corresponds to the JSON property `canRead`
413
+ # @return [Boolean]
414
+ attr_accessor :can_read
415
+ alias_method :can_read?, :can_read
416
+
417
+ # Whether the user can search for drive items referencing this field.
418
+ # Corresponds to the JSON property `canSearch`
419
+ # @return [Boolean]
420
+ attr_accessor :can_search
421
+ alias_method :can_search?, :can_search
422
+
423
+ # Whether the user can set this field on drive items.
424
+ # Corresponds to the JSON property `canWrite`
425
+ # @return [Boolean]
426
+ attr_accessor :can_write
427
+ alias_method :can_write?, :can_write
428
+
429
+ def initialize(**args)
430
+ update!(**args)
431
+ end
432
+
433
+ # Update properties of this object
434
+ def update!(**args)
435
+ @can_read = args[:can_read] if args.key?(:can_read)
436
+ @can_search = args[:can_search] if args.key?(:can_search)
437
+ @can_write = args[:can_write] if args.key?(:can_write)
438
+ end
439
+ end
440
+
441
+ # Options for the date field type.
442
+ class GoogleAppsDriveLabelsV2FieldDateOptions
443
+ include Google::Apis::Core::Hashable
444
+
445
+ # Output only. ICU Date format.
446
+ # Corresponds to the JSON property `dateFormat`
447
+ # @return [String]
448
+ attr_accessor :date_format
449
+
450
+ # Localized date formatting option. Field values will be rendered in this format
451
+ # according to their locale.
452
+ # Corresponds to the JSON property `dateFormatType`
453
+ # @return [String]
454
+ attr_accessor :date_format_type
455
+
456
+ # Represents a whole or partial calendar date, such as a birthday. The time of
457
+ # day and time zone are either specified elsewhere or are insignificant. The
458
+ # date is relative to the Gregorian Calendar. This can represent one of the
459
+ # following: * A full date, with non-zero year, month, and day values. * A month
460
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
461
+ # with a zero month and a zero day. * A year and month, with a zero day (for
462
+ # example, a credit card expiration date). Related types: * google.type.
463
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
464
+ # Corresponds to the JSON property `maxValue`
465
+ # @return [Google::Apis::DrivelabelsV2::GoogleTypeDate]
466
+ attr_accessor :max_value
467
+
468
+ # Represents a whole or partial calendar date, such as a birthday. The time of
469
+ # day and time zone are either specified elsewhere or are insignificant. The
470
+ # date is relative to the Gregorian Calendar. This can represent one of the
471
+ # following: * A full date, with non-zero year, month, and day values. * A month
472
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
473
+ # with a zero month and a zero day. * A year and month, with a zero day (for
474
+ # example, a credit card expiration date). Related types: * google.type.
475
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
476
+ # Corresponds to the JSON property `minValue`
477
+ # @return [Google::Apis::DrivelabelsV2::GoogleTypeDate]
478
+ attr_accessor :min_value
479
+
480
+ def initialize(**args)
481
+ update!(**args)
482
+ end
483
+
484
+ # Update properties of this object
485
+ def update!(**args)
486
+ @date_format = args[:date_format] if args.key?(:date_format)
487
+ @date_format_type = args[:date_format_type] if args.key?(:date_format_type)
488
+ @max_value = args[:max_value] if args.key?(:max_value)
489
+ @min_value = args[:min_value] if args.key?(:min_value)
490
+ end
491
+ end
492
+
493
+ # UI Display hints for rendering a Field.
494
+ class GoogleAppsDriveLabelsV2FieldDisplayHints
495
+ include Google::Apis::Core::Hashable
496
+
497
+ # Whether the field should be shown in the UI as disabled.
498
+ # Corresponds to the JSON property `disabled`
499
+ # @return [Boolean]
500
+ attr_accessor :disabled
501
+ alias_method :disabled?, :disabled
502
+
503
+ # This Field should be hidden in the search menu.
504
+ # Corresponds to the JSON property `hiddenInSearch`
505
+ # @return [Boolean]
506
+ attr_accessor :hidden_in_search
507
+ alias_method :hidden_in_search?, :hidden_in_search
508
+
509
+ # Whether the Field should be shown as required in the UI.
510
+ # Corresponds to the JSON property `required`
511
+ # @return [Boolean]
512
+ attr_accessor :required
513
+ alias_method :required?, :required
514
+
515
+ # This Field should be shown when applying values to a Drive item.
516
+ # Corresponds to the JSON property `shownInApply`
517
+ # @return [Boolean]
518
+ attr_accessor :shown_in_apply
519
+ alias_method :shown_in_apply?, :shown_in_apply
520
+
521
+ def initialize(**args)
522
+ update!(**args)
523
+ end
524
+
525
+ # Update properties of this object
526
+ def update!(**args)
527
+ @disabled = args[:disabled] if args.key?(:disabled)
528
+ @hidden_in_search = args[:hidden_in_search] if args.key?(:hidden_in_search)
529
+ @required = args[:required] if args.key?(:required)
530
+ @shown_in_apply = args[:shown_in_apply] if args.key?(:shown_in_apply)
531
+ end
532
+ end
533
+
534
+ # Options for the Integer field type.
535
+ class GoogleAppsDriveLabelsV2FieldIntegerOptions
536
+ include Google::Apis::Core::Hashable
537
+
538
+ # Output only. The maximum valid value for the integer field.
539
+ # Corresponds to the JSON property `maxValue`
540
+ # @return [Fixnum]
541
+ attr_accessor :max_value
542
+
543
+ # Output only. The minimum valid value for the integer field.
544
+ # Corresponds to the JSON property `minValue`
545
+ # @return [Fixnum]
546
+ attr_accessor :min_value
547
+
548
+ def initialize(**args)
549
+ update!(**args)
550
+ end
551
+
552
+ # Update properties of this object
553
+ def update!(**args)
554
+ @max_value = args[:max_value] if args.key?(:max_value)
555
+ @min_value = args[:min_value] if args.key?(:min_value)
556
+ end
557
+ end
558
+
559
+ # Options for a multi-valued variant of an associated field type.
560
+ class GoogleAppsDriveLabelsV2FieldListOptions
561
+ include Google::Apis::Core::Hashable
562
+
563
+ # Maximum number of entries permitted.
564
+ # Corresponds to the JSON property `maxEntries`
565
+ # @return [Fixnum]
566
+ attr_accessor :max_entries
567
+
568
+ def initialize(**args)
569
+ update!(**args)
570
+ end
571
+
572
+ # Update properties of this object
573
+ def update!(**args)
574
+ @max_entries = args[:max_entries] if args.key?(:max_entries)
575
+ end
576
+ end
577
+
578
+ # The basic properties of the field.
579
+ class GoogleAppsDriveLabelsV2FieldProperties
580
+ include Google::Apis::Core::Hashable
581
+
582
+ # Required. The display text to show in the UI identifying this field.
583
+ # Corresponds to the JSON property `displayName`
584
+ # @return [String]
585
+ attr_accessor :display_name
586
+
587
+ # Input only. Insert or move this Field to be ordered before the indicated Field.
588
+ # If empty, the Field will be placed at the end of the list.
589
+ # Corresponds to the JSON property `insertBeforeField`
590
+ # @return [String]
591
+ attr_accessor :insert_before_field
592
+
593
+ # Whether the field should be marked as required.
594
+ # Corresponds to the JSON property `required`
595
+ # @return [Boolean]
596
+ attr_accessor :required
597
+ alias_method :required?, :required
598
+
599
+ def initialize(**args)
600
+ update!(**args)
601
+ end
602
+
603
+ # Update properties of this object
604
+ def update!(**args)
605
+ @display_name = args[:display_name] if args.key?(:display_name)
606
+ @insert_before_field = args[:insert_before_field] if args.key?(:insert_before_field)
607
+ @required = args[:required] if args.key?(:required)
608
+ end
609
+ end
610
+
611
+ # The capabilities related to this Field when editing the Field.
612
+ class GoogleAppsDriveLabelsV2FieldSchemaCapabilities
613
+ include Google::Apis::Core::Hashable
614
+
615
+ # Whether the user can delete this Field. The user must have permissions and the
616
+ # Field must be deprecated.
617
+ # Corresponds to the JSON property `canDelete`
618
+ # @return [Boolean]
619
+ attr_accessor :can_delete
620
+ alias_method :can_delete?, :can_delete
621
+
622
+ # Whether the user can disable this Field. The user must have permissions and
623
+ # this Field must not already be disabled.
624
+ # Corresponds to the JSON property `canDisable`
625
+ # @return [Boolean]
626
+ attr_accessor :can_disable
627
+ alias_method :can_disable?, :can_disable
628
+
629
+ # Whether the user can enable this Field. The user must have permissions and
630
+ # this Field must be disabled.
631
+ # Corresponds to the JSON property `canEnable`
632
+ # @return [Boolean]
633
+ attr_accessor :can_enable
634
+ alias_method :can_enable?, :can_enable
635
+
636
+ # Whether the user can change this field.
637
+ # Corresponds to the JSON property `canUpdate`
638
+ # @return [Boolean]
639
+ attr_accessor :can_update
640
+ alias_method :can_update?, :can_update
641
+
642
+ def initialize(**args)
643
+ update!(**args)
644
+ end
645
+
646
+ # Update properties of this object
647
+ def update!(**args)
648
+ @can_delete = args[:can_delete] if args.key?(:can_delete)
649
+ @can_disable = args[:can_disable] if args.key?(:can_disable)
650
+ @can_enable = args[:can_enable] if args.key?(:can_enable)
651
+ @can_update = args[:can_update] if args.key?(:can_update)
652
+ end
653
+ end
654
+
655
+ # Options for the selection field type.
656
+ class GoogleAppsDriveLabelsV2FieldSelectionOptions
657
+ include Google::Apis::Core::Hashable
658
+
659
+ # The options available for this selection field. The list order is consistent,
660
+ # and modified with `insert_before_choice`.
661
+ # Corresponds to the JSON property `choices`
662
+ # @return [Array<Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice>]
663
+ attr_accessor :choices
664
+
665
+ # Options for a multi-valued variant of an associated field type.
666
+ # Corresponds to the JSON property `listOptions`
667
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldListOptions]
668
+ attr_accessor :list_options
669
+
670
+ def initialize(**args)
671
+ update!(**args)
672
+ end
673
+
674
+ # Update properties of this object
675
+ def update!(**args)
676
+ @choices = args[:choices] if args.key?(:choices)
677
+ @list_options = args[:list_options] if args.key?(:list_options)
678
+ end
679
+ end
680
+
681
+ # Selection field Choice.
682
+ class GoogleAppsDriveLabelsV2FieldSelectionOptionsChoice
683
+ include Google::Apis::Core::Hashable
684
+
685
+ # The capabilities related to this Choice on applied metadata.
686
+ # Corresponds to the JSON property `appliedCapabilities`
687
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities]
688
+ attr_accessor :applied_capabilities
689
+
690
+ # Output only. The time this Choice was created.
691
+ # Corresponds to the JSON property `createTime`
692
+ # @return [String]
693
+ attr_accessor :create_time
694
+
695
+ # Information about a user.
696
+ # Corresponds to the JSON property `creator`
697
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo]
698
+ attr_accessor :creator
699
+
700
+ # Output only. The time this Choice was disabled. This value has no meaning when
701
+ # the Choice is not disabled.
702
+ # Corresponds to the JSON property `disableTime`
703
+ # @return [String]
704
+ attr_accessor :disable_time
705
+
706
+ # Information about a user.
707
+ # Corresponds to the JSON property `disabler`
708
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo]
709
+ attr_accessor :disabler
710
+
711
+ # UI Display hints for rendering a Option.
712
+ # Corresponds to the JSON property `displayHints`
713
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints]
714
+ attr_accessor :display_hints
715
+
716
+ # The unique value of the Choice. This ID will be autogenerated, and will match
717
+ # the form `([a-zA-Z0-9_])+`.
718
+ # Corresponds to the JSON property `id`
719
+ # @return [String]
720
+ attr_accessor :id
721
+
722
+ # The lifecycle state of an object, e.g. Label, Field, or Choice. The Lifecycle
723
+ # enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `
724
+ # UNPUBLISHED_DRAFT` -> `PUBLISHED` * `UNPUBLISHED_DRAFT` -> (Deleted) * `
725
+ # PUBLISHED` -> `DISABLED` * `DISABLED` -> `PUBLISHED` * `DISABLED` -> (Deleted)
726
+ # The published and disabled states have some distinct characteristics: *
727
+ # Published - Some kinds of changes may be made to an object in this state, in
728
+ # which case `has_unpublished_changes` will be true. Some kinds of changes are
729
+ # not permitted. Generally, any change that would invalidate or cause new
730
+ # restrictions on existing metadata related to the Label will be rejected. *
731
+ # Disabled - When disabled, the configured `DisabledPolicy` will take effect.
732
+ # Corresponds to the JSON property `lifecycle`
733
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Lifecycle]
734
+ attr_accessor :lifecycle
735
+
736
+ # Contains information about whether a label component should be considered
737
+ # locked.
738
+ # Corresponds to the JSON property `lockStatus`
739
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LockStatus]
740
+ attr_accessor :lock_status
741
+
742
+ # Basic properties of the Choice.
743
+ # Corresponds to the JSON property `properties`
744
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties]
745
+ attr_accessor :properties
746
+
747
+ # Output only. The time this Choice was published. This value has no meaning
748
+ # when the Choice is not published.
749
+ # Corresponds to the JSON property `publishTime`
750
+ # @return [String]
751
+ attr_accessor :publish_time
752
+
753
+ # Information about a user.
754
+ # Corresponds to the JSON property `publisher`
755
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo]
756
+ attr_accessor :publisher
757
+
758
+ # The capabilities related to this Choice when editing the Choice.
759
+ # Corresponds to the JSON property `schemaCapabilities`
760
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities]
761
+ attr_accessor :schema_capabilities
762
+
763
+ # Output only. The time this Choice was updated last.
764
+ # Corresponds to the JSON property `updateTime`
765
+ # @return [String]
766
+ attr_accessor :update_time
767
+
768
+ # Information about a user.
769
+ # Corresponds to the JSON property `updater`
770
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo]
771
+ attr_accessor :updater
772
+
773
+ def initialize(**args)
774
+ update!(**args)
775
+ end
776
+
777
+ # Update properties of this object
778
+ def update!(**args)
779
+ @applied_capabilities = args[:applied_capabilities] if args.key?(:applied_capabilities)
780
+ @create_time = args[:create_time] if args.key?(:create_time)
781
+ @creator = args[:creator] if args.key?(:creator)
782
+ @disable_time = args[:disable_time] if args.key?(:disable_time)
783
+ @disabler = args[:disabler] if args.key?(:disabler)
784
+ @display_hints = args[:display_hints] if args.key?(:display_hints)
785
+ @id = args[:id] if args.key?(:id)
786
+ @lifecycle = args[:lifecycle] if args.key?(:lifecycle)
787
+ @lock_status = args[:lock_status] if args.key?(:lock_status)
788
+ @properties = args[:properties] if args.key?(:properties)
789
+ @publish_time = args[:publish_time] if args.key?(:publish_time)
790
+ @publisher = args[:publisher] if args.key?(:publisher)
791
+ @schema_capabilities = args[:schema_capabilities] if args.key?(:schema_capabilities)
792
+ @update_time = args[:update_time] if args.key?(:update_time)
793
+ @updater = args[:updater] if args.key?(:updater)
794
+ end
795
+ end
796
+
797
+ # The capabilities related to this Choice on applied metadata.
798
+ class GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceAppliedCapabilities
799
+ include Google::Apis::Core::Hashable
800
+
801
+ # Whether the user can read related applied metadata on items.
802
+ # Corresponds to the JSON property `canRead`
803
+ # @return [Boolean]
804
+ attr_accessor :can_read
805
+ alias_method :can_read?, :can_read
806
+
807
+ # Whether the user can use this Choice in search queries.
808
+ # Corresponds to the JSON property `canSearch`
809
+ # @return [Boolean]
810
+ attr_accessor :can_search
811
+ alias_method :can_search?, :can_search
812
+
813
+ # Whether the user can select this Choice on an item.
814
+ # Corresponds to the JSON property `canSelect`
815
+ # @return [Boolean]
816
+ attr_accessor :can_select
817
+ alias_method :can_select?, :can_select
818
+
819
+ def initialize(**args)
820
+ update!(**args)
821
+ end
822
+
823
+ # Update properties of this object
824
+ def update!(**args)
825
+ @can_read = args[:can_read] if args.key?(:can_read)
826
+ @can_search = args[:can_search] if args.key?(:can_search)
827
+ @can_select = args[:can_select] if args.key?(:can_select)
828
+ end
829
+ end
830
+
831
+ # UI Display hints for rendering a Option.
832
+ class GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceDisplayHints
833
+ include Google::Apis::Core::Hashable
834
+
835
+ # The color derived from BadgeConfig and coerced to the nearest supported color.
836
+ # Corresponds to the JSON property `badgeColors`
837
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BadgeColors]
838
+ attr_accessor :badge_colors
839
+
840
+ # The priority of this badge, used to compare and sort between multiple badges.
841
+ # A lower number means that the badge should be shown first. When a badging
842
+ # configuration is not present, this will be 0. Otherwise, this will be set to `
843
+ # BadgeConfig.priority_override` or the default heuristic which prefers creation
844
+ # date of the Label, and field and option priority.
845
+ # Corresponds to the JSON property `badgePriority`
846
+ # @return [Fixnum]
847
+ attr_accessor :badge_priority
848
+
849
+ # The color derived from BadgeConfig and coerced to the nearest supported color.
850
+ # Corresponds to the JSON property `darkBadgeColors`
851
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BadgeColors]
852
+ attr_accessor :dark_badge_colors
853
+
854
+ # Whether the option should be shown in the UI as disabled.
855
+ # Corresponds to the JSON property `disabled`
856
+ # @return [Boolean]
857
+ attr_accessor :disabled
858
+ alias_method :disabled?, :disabled
859
+
860
+ # This option should be hidden in the search menu.
861
+ # Corresponds to the JSON property `hiddenInSearch`
862
+ # @return [Boolean]
863
+ attr_accessor :hidden_in_search
864
+ alias_method :hidden_in_search?, :hidden_in_search
865
+
866
+ # This option should be shown in the menu when applying values to a Drive item.
867
+ # Corresponds to the JSON property `shownInApply`
868
+ # @return [Boolean]
869
+ attr_accessor :shown_in_apply
870
+ alias_method :shown_in_apply?, :shown_in_apply
871
+
872
+ def initialize(**args)
873
+ update!(**args)
874
+ end
875
+
876
+ # Update properties of this object
877
+ def update!(**args)
878
+ @badge_colors = args[:badge_colors] if args.key?(:badge_colors)
879
+ @badge_priority = args[:badge_priority] if args.key?(:badge_priority)
880
+ @dark_badge_colors = args[:dark_badge_colors] if args.key?(:dark_badge_colors)
881
+ @disabled = args[:disabled] if args.key?(:disabled)
882
+ @hidden_in_search = args[:hidden_in_search] if args.key?(:hidden_in_search)
883
+ @shown_in_apply = args[:shown_in_apply] if args.key?(:shown_in_apply)
884
+ end
885
+ end
886
+
887
+ # Basic properties of the Choice.
888
+ class GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceProperties
889
+ include Google::Apis::Core::Hashable
890
+
891
+ # Badge status of the label.
892
+ # Corresponds to the JSON property `badgeConfig`
893
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2BadgeConfig]
894
+ attr_accessor :badge_config
895
+
896
+ # The description of this Label.
897
+ # Corresponds to the JSON property `description`
898
+ # @return [String]
899
+ attr_accessor :description
900
+
901
+ # Required. The display text to show in the UI identifying this field.
902
+ # Corresponds to the JSON property `displayName`
903
+ # @return [String]
904
+ attr_accessor :display_name
905
+
906
+ # Input only. Insert or move this Choice to be ordered before the indicated
907
+ # Choice. If empty, the Choice will be placed at the end of the list.
908
+ # Corresponds to the JSON property `insertBeforeChoice`
909
+ # @return [String]
910
+ attr_accessor :insert_before_choice
911
+
912
+ def initialize(**args)
913
+ update!(**args)
914
+ end
915
+
916
+ # Update properties of this object
917
+ def update!(**args)
918
+ @badge_config = args[:badge_config] if args.key?(:badge_config)
919
+ @description = args[:description] if args.key?(:description)
920
+ @display_name = args[:display_name] if args.key?(:display_name)
921
+ @insert_before_choice = args[:insert_before_choice] if args.key?(:insert_before_choice)
922
+ end
923
+ end
924
+
925
+ # The capabilities related to this Choice when editing the Choice.
926
+ class GoogleAppsDriveLabelsV2FieldSelectionOptionsChoiceSchemaCapabilities
927
+ include Google::Apis::Core::Hashable
928
+
929
+ # Whether the user can delete this Choice.
930
+ # Corresponds to the JSON property `canDelete`
931
+ # @return [Boolean]
932
+ attr_accessor :can_delete
933
+ alias_method :can_delete?, :can_delete
934
+
935
+ # Whether the user can disable this Chioce.
936
+ # Corresponds to the JSON property `canDisable`
937
+ # @return [Boolean]
938
+ attr_accessor :can_disable
939
+ alias_method :can_disable?, :can_disable
940
+
941
+ # Whether the user can enable this Choice.
942
+ # Corresponds to the JSON property `canEnable`
943
+ # @return [Boolean]
944
+ attr_accessor :can_enable
945
+ alias_method :can_enable?, :can_enable
946
+
947
+ # Whether the user can update this Choice.
948
+ # Corresponds to the JSON property `canUpdate`
949
+ # @return [Boolean]
950
+ attr_accessor :can_update
951
+ alias_method :can_update?, :can_update
952
+
953
+ def initialize(**args)
954
+ update!(**args)
955
+ end
956
+
957
+ # Update properties of this object
958
+ def update!(**args)
959
+ @can_delete = args[:can_delete] if args.key?(:can_delete)
960
+ @can_disable = args[:can_disable] if args.key?(:can_disable)
961
+ @can_enable = args[:can_enable] if args.key?(:can_enable)
962
+ @can_update = args[:can_update] if args.key?(:can_update)
963
+ end
964
+ end
965
+
966
+ # Options for the Text field type.
967
+ class GoogleAppsDriveLabelsV2FieldTextOptions
968
+ include Google::Apis::Core::Hashable
969
+
970
+ # Output only. The maximum valid length of values for the text field.
971
+ # Corresponds to the JSON property `maxLength`
972
+ # @return [Fixnum]
973
+ attr_accessor :max_length
974
+
975
+ # Output only. The minimum valid length of values for the text field.
976
+ # Corresponds to the JSON property `minLength`
977
+ # @return [Fixnum]
978
+ attr_accessor :min_length
979
+
980
+ def initialize(**args)
981
+ update!(**args)
982
+ end
983
+
984
+ # Update properties of this object
985
+ def update!(**args)
986
+ @max_length = args[:max_length] if args.key?(:max_length)
987
+ @min_length = args[:min_length] if args.key?(:min_length)
988
+ end
989
+ end
990
+
991
+ # Options for the user field type.
992
+ class GoogleAppsDriveLabelsV2FieldUserOptions
993
+ include Google::Apis::Core::Hashable
994
+
995
+ # Options for a multi-valued variant of an associated field type.
996
+ # Corresponds to the JSON property `listOptions`
997
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2FieldListOptions]
998
+ attr_accessor :list_options
999
+
1000
+ def initialize(**args)
1001
+ update!(**args)
1002
+ end
1003
+
1004
+ # Update properties of this object
1005
+ def update!(**args)
1006
+ @list_options = args[:list_options] if args.key?(:list_options)
1007
+ end
1008
+ end
1009
+
1010
+ # A Label defines a taxonomy which may be applied to a Drive items in order to
1011
+ # organize and search across Items. Labels may be simple strings, or may contain
1012
+ # Fields that describe additional metadata which can be further used to organize
1013
+ # and search Drive items.
1014
+ class GoogleAppsDriveLabelsV2Label
1015
+ include Google::Apis::Core::Hashable
1016
+
1017
+ # The capabilities a user has on this Label's applied metadata.
1018
+ # Corresponds to the JSON property `appliedCapabilities`
1019
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelAppliedCapabilities]
1020
+ attr_accessor :applied_capabilities
1021
+
1022
+ # Behavior of this Label when its applied to Drive items.
1023
+ # Corresponds to the JSON property `appliedLabelPolicy`
1024
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy]
1025
+ attr_accessor :applied_label_policy
1026
+
1027
+ # Output only. The time this label was created.
1028
+ # Corresponds to the JSON property `createTime`
1029
+ # @return [String]
1030
+ attr_accessor :create_time
1031
+
1032
+ # Information about a user.
1033
+ # Corresponds to the JSON property `creator`
1034
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo]
1035
+ attr_accessor :creator
1036
+
1037
+ # Output only. The time this label was disabled. This value has no meaning when
1038
+ # the label is not disabled.
1039
+ # Corresponds to the JSON property `disableTime`
1040
+ # @return [String]
1041
+ attr_accessor :disable_time
1042
+
1043
+ # Information about a user.
1044
+ # Corresponds to the JSON property `disabler`
1045
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo]
1046
+ attr_accessor :disabler
1047
+
1048
+ # UI Display hints for rendering the Label.
1049
+ # Corresponds to the JSON property `displayHints`
1050
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelDisplayHints]
1051
+ attr_accessor :display_hints
1052
+
1053
+ # List of Fields in descending priority order.
1054
+ # Corresponds to the JSON property `fields`
1055
+ # @return [Array<Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Field>]
1056
+ attr_accessor :fields
1057
+
1058
+ # Output only. Globally unique identifier of this Label. ID makes up part of the
1059
+ # Label `name`, but unlike `name`, ID is consistent between revisions. Matches
1060
+ # the regex: `([a-zA-Z0-9])+`
1061
+ # Corresponds to the JSON property `id`
1062
+ # @return [String]
1063
+ attr_accessor :id
1064
+
1065
+ # Required. The type of this label.
1066
+ # Corresponds to the JSON property `labelType`
1067
+ # @return [String]
1068
+ attr_accessor :label_type
1069
+
1070
+ # Custom URL to present to users to allow them to learn more about this label
1071
+ # and how it should be used.
1072
+ # Corresponds to the JSON property `learnMoreUri`
1073
+ # @return [String]
1074
+ attr_accessor :learn_more_uri
1075
+
1076
+ # The lifecycle state of an object, e.g. Label, Field, or Choice. The Lifecycle
1077
+ # enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `
1078
+ # UNPUBLISHED_DRAFT` -> `PUBLISHED` * `UNPUBLISHED_DRAFT` -> (Deleted) * `
1079
+ # PUBLISHED` -> `DISABLED` * `DISABLED` -> `PUBLISHED` * `DISABLED` -> (Deleted)
1080
+ # The published and disabled states have some distinct characteristics: *
1081
+ # Published - Some kinds of changes may be made to an object in this state, in
1082
+ # which case `has_unpublished_changes` will be true. Some kinds of changes are
1083
+ # not permitted. Generally, any change that would invalidate or cause new
1084
+ # restrictions on existing metadata related to the Label will be rejected. *
1085
+ # Disabled - When disabled, the configured `DisabledPolicy` will take effect.
1086
+ # Corresponds to the JSON property `lifecycle`
1087
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Lifecycle]
1088
+ attr_accessor :lifecycle
1089
+
1090
+ # Contains information about whether a label component should be considered
1091
+ # locked.
1092
+ # Corresponds to the JSON property `lockStatus`
1093
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LockStatus]
1094
+ attr_accessor :lock_status
1095
+
1096
+ # Output only. Resource name of the Label. Will be in the form of either: `
1097
+ # labels/`id`` or `labels/`id`@`revision_id`` depending on the request. See `id`
1098
+ # and `revision_id` below.
1099
+ # Corresponds to the JSON property `name`
1100
+ # @return [String]
1101
+ attr_accessor :name
1102
+
1103
+ # Basic properties of the Label.
1104
+ # Corresponds to the JSON property `properties`
1105
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelProperties]
1106
+ attr_accessor :properties
1107
+
1108
+ # Output only. The time this label was published. This value has no meaning when
1109
+ # the label is not published.
1110
+ # Corresponds to the JSON property `publishTime`
1111
+ # @return [String]
1112
+ attr_accessor :publish_time
1113
+
1114
+ # Information about a user.
1115
+ # Corresponds to the JSON property `publisher`
1116
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo]
1117
+ attr_accessor :publisher
1118
+
1119
+ # Output only. The time this label revision was created.
1120
+ # Corresponds to the JSON property `revisionCreateTime`
1121
+ # @return [String]
1122
+ attr_accessor :revision_create_time
1123
+
1124
+ # Information about a user.
1125
+ # Corresponds to the JSON property `revisionCreator`
1126
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2UserInfo]
1127
+ attr_accessor :revision_creator
1128
+
1129
+ # Output only. Revision ID of the Label. Revision ID may be part of the Label `
1130
+ # name` depending on the request issued. A new revision is created whenever
1131
+ # revisioned properties of a Label are changed. Matches the regex: `([a-zA-Z0-9])
1132
+ # +`
1133
+ # Corresponds to the JSON property `revisionId`
1134
+ # @return [String]
1135
+ attr_accessor :revision_id
1136
+
1137
+ # The capabilities related to this Label when editing the Label.
1138
+ # Corresponds to the JSON property `schemaCapabilities`
1139
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LabelSchemaCapabilities]
1140
+ attr_accessor :schema_capabilities
1141
+
1142
+ def initialize(**args)
1143
+ update!(**args)
1144
+ end
1145
+
1146
+ # Update properties of this object
1147
+ def update!(**args)
1148
+ @applied_capabilities = args[:applied_capabilities] if args.key?(:applied_capabilities)
1149
+ @applied_label_policy = args[:applied_label_policy] if args.key?(:applied_label_policy)
1150
+ @create_time = args[:create_time] if args.key?(:create_time)
1151
+ @creator = args[:creator] if args.key?(:creator)
1152
+ @disable_time = args[:disable_time] if args.key?(:disable_time)
1153
+ @disabler = args[:disabler] if args.key?(:disabler)
1154
+ @display_hints = args[:display_hints] if args.key?(:display_hints)
1155
+ @fields = args[:fields] if args.key?(:fields)
1156
+ @id = args[:id] if args.key?(:id)
1157
+ @label_type = args[:label_type] if args.key?(:label_type)
1158
+ @learn_more_uri = args[:learn_more_uri] if args.key?(:learn_more_uri)
1159
+ @lifecycle = args[:lifecycle] if args.key?(:lifecycle)
1160
+ @lock_status = args[:lock_status] if args.key?(:lock_status)
1161
+ @name = args[:name] if args.key?(:name)
1162
+ @properties = args[:properties] if args.key?(:properties)
1163
+ @publish_time = args[:publish_time] if args.key?(:publish_time)
1164
+ @publisher = args[:publisher] if args.key?(:publisher)
1165
+ @revision_create_time = args[:revision_create_time] if args.key?(:revision_create_time)
1166
+ @revision_creator = args[:revision_creator] if args.key?(:revision_creator)
1167
+ @revision_id = args[:revision_id] if args.key?(:revision_id)
1168
+ @schema_capabilities = args[:schema_capabilities] if args.key?(:schema_capabilities)
1169
+ end
1170
+ end
1171
+
1172
+ # The capabilities a user has on this Label's applied metadata.
1173
+ class GoogleAppsDriveLabelsV2LabelAppliedCapabilities
1174
+ include Google::Apis::Core::Hashable
1175
+
1176
+ # Whether the user can apply this Label to items.
1177
+ # Corresponds to the JSON property `canApply`
1178
+ # @return [Boolean]
1179
+ attr_accessor :can_apply
1180
+ alias_method :can_apply?, :can_apply
1181
+
1182
+ # Whether the user can read applied metadata related to this label.
1183
+ # Corresponds to the JSON property `canRead`
1184
+ # @return [Boolean]
1185
+ attr_accessor :can_read
1186
+ alias_method :can_read?, :can_read
1187
+
1188
+ # Whether the user can remove this Label from items.
1189
+ # Corresponds to the JSON property `canRemove`
1190
+ # @return [Boolean]
1191
+ attr_accessor :can_remove
1192
+ alias_method :can_remove?, :can_remove
1193
+
1194
+ def initialize(**args)
1195
+ update!(**args)
1196
+ end
1197
+
1198
+ # Update properties of this object
1199
+ def update!(**args)
1200
+ @can_apply = args[:can_apply] if args.key?(:can_apply)
1201
+ @can_read = args[:can_read] if args.key?(:can_read)
1202
+ @can_remove = args[:can_remove] if args.key?(:can_remove)
1203
+ end
1204
+ end
1205
+
1206
+ # Behavior of this Label when its applied to Drive items.
1207
+ class GoogleAppsDriveLabelsV2LabelAppliedLabelPolicy
1208
+ include Google::Apis::Core::Hashable
1209
+
1210
+ # Indicates how the applied Label, and Field values should be copied when a
1211
+ # Drive item is copied.
1212
+ # Corresponds to the JSON property `copyMode`
1213
+ # @return [String]
1214
+ attr_accessor :copy_mode
1215
+
1216
+ def initialize(**args)
1217
+ update!(**args)
1218
+ end
1219
+
1220
+ # Update properties of this object
1221
+ def update!(**args)
1222
+ @copy_mode = args[:copy_mode] if args.key?(:copy_mode)
1223
+ end
1224
+ end
1225
+
1226
+ # UI Display hints for rendering the Label.
1227
+ class GoogleAppsDriveLabelsV2LabelDisplayHints
1228
+ include Google::Apis::Core::Hashable
1229
+
1230
+ # Whether the Label should be shown in the UI as disabled.
1231
+ # Corresponds to the JSON property `disabled`
1232
+ # @return [Boolean]
1233
+ attr_accessor :disabled
1234
+ alias_method :disabled?, :disabled
1235
+
1236
+ # This Label should be hidden in the search menu when searching for Drive items.
1237
+ # Corresponds to the JSON property `hiddenInSearch`
1238
+ # @return [Boolean]
1239
+ attr_accessor :hidden_in_search
1240
+ alias_method :hidden_in_search?, :hidden_in_search
1241
+
1242
+ # Order to display label in a list
1243
+ # Corresponds to the JSON property `priority`
1244
+ # @return [Fixnum]
1245
+ attr_accessor :priority
1246
+
1247
+ # This Label should be shown in the apply menu.
1248
+ # Corresponds to the JSON property `shownInApply`
1249
+ # @return [Boolean]
1250
+ attr_accessor :shown_in_apply
1251
+ alias_method :shown_in_apply?, :shown_in_apply
1252
+
1253
+ def initialize(**args)
1254
+ update!(**args)
1255
+ end
1256
+
1257
+ # Update properties of this object
1258
+ def update!(**args)
1259
+ @disabled = args[:disabled] if args.key?(:disabled)
1260
+ @hidden_in_search = args[:hidden_in_search] if args.key?(:hidden_in_search)
1261
+ @priority = args[:priority] if args.key?(:priority)
1262
+ @shown_in_apply = args[:shown_in_apply] if args.key?(:shown_in_apply)
1263
+ end
1264
+ end
1265
+
1266
+ # Basic properties of the Label.
1267
+ class GoogleAppsDriveLabelsV2LabelProperties
1268
+ include Google::Apis::Core::Hashable
1269
+
1270
+ # The description of this Label.
1271
+ # Corresponds to the JSON property `description`
1272
+ # @return [String]
1273
+ attr_accessor :description
1274
+
1275
+ # Required. Title of the Label.
1276
+ # Corresponds to the JSON property `title`
1277
+ # @return [String]
1278
+ attr_accessor :title
1279
+
1280
+ def initialize(**args)
1281
+ update!(**args)
1282
+ end
1283
+
1284
+ # Update properties of this object
1285
+ def update!(**args)
1286
+ @description = args[:description] if args.key?(:description)
1287
+ @title = args[:title] if args.key?(:title)
1288
+ end
1289
+ end
1290
+
1291
+ # The capabilities related to this Label when editing the Label.
1292
+ class GoogleAppsDriveLabelsV2LabelSchemaCapabilities
1293
+ include Google::Apis::Core::Hashable
1294
+
1295
+ # Whether the user can delete this Label. The user must have permission and the
1296
+ # Label must be disabled.
1297
+ # Corresponds to the JSON property `canDelete`
1298
+ # @return [Boolean]
1299
+ attr_accessor :can_delete
1300
+ alias_method :can_delete?, :can_delete
1301
+
1302
+ # Whether the user can disable this Label. The user must have permission and
1303
+ # this Label must not already be disabled.
1304
+ # Corresponds to the JSON property `canDisable`
1305
+ # @return [Boolean]
1306
+ attr_accessor :can_disable
1307
+ alias_method :can_disable?, :can_disable
1308
+
1309
+ # Whether the user can enable this Label. The user must have permission and this
1310
+ # Label must be disabled.
1311
+ # Corresponds to the JSON property `canEnable`
1312
+ # @return [Boolean]
1313
+ attr_accessor :can_enable
1314
+ alias_method :can_enable?, :can_enable
1315
+
1316
+ # Whether the user can change this Label.
1317
+ # Corresponds to the JSON property `canUpdate`
1318
+ # @return [Boolean]
1319
+ attr_accessor :can_update
1320
+ alias_method :can_update?, :can_update
1321
+
1322
+ def initialize(**args)
1323
+ update!(**args)
1324
+ end
1325
+
1326
+ # Update properties of this object
1327
+ def update!(**args)
1328
+ @can_delete = args[:can_delete] if args.key?(:can_delete)
1329
+ @can_disable = args[:can_disable] if args.key?(:can_disable)
1330
+ @can_enable = args[:can_enable] if args.key?(:can_enable)
1331
+ @can_update = args[:can_update] if args.key?(:can_update)
1332
+ end
1333
+ end
1334
+
1335
+ # The lifecycle state of an object, e.g. Label, Field, or Choice. The Lifecycle
1336
+ # enforces the following transitions: * `UNPUBLISHED_DRAFT` (starting state) * `
1337
+ # UNPUBLISHED_DRAFT` -> `PUBLISHED` * `UNPUBLISHED_DRAFT` -> (Deleted) * `
1338
+ # PUBLISHED` -> `DISABLED` * `DISABLED` -> `PUBLISHED` * `DISABLED` -> (Deleted)
1339
+ # The published and disabled states have some distinct characteristics: *
1340
+ # Published - Some kinds of changes may be made to an object in this state, in
1341
+ # which case `has_unpublished_changes` will be true. Some kinds of changes are
1342
+ # not permitted. Generally, any change that would invalidate or cause new
1343
+ # restrictions on existing metadata related to the Label will be rejected. *
1344
+ # Disabled - When disabled, the configured `DisabledPolicy` will take effect.
1345
+ class GoogleAppsDriveLabelsV2Lifecycle
1346
+ include Google::Apis::Core::Hashable
1347
+
1348
+ # The policy that governs how to treat a disabled label, field, or selection
1349
+ # choice in different contexts.
1350
+ # Corresponds to the JSON property `disabledPolicy`
1351
+ # @return [Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2LifecycleDisabledPolicy]
1352
+ attr_accessor :disabled_policy
1353
+
1354
+ # Output only. Whether the object associated with this lifecycle has unpublished
1355
+ # changes.
1356
+ # Corresponds to the JSON property `hasUnpublishedChanges`
1357
+ # @return [Boolean]
1358
+ attr_accessor :has_unpublished_changes
1359
+ alias_method :has_unpublished_changes?, :has_unpublished_changes
1360
+
1361
+ # Output only. The state of the object associated with this lifecycle.
1362
+ # Corresponds to the JSON property `state`
1363
+ # @return [String]
1364
+ attr_accessor :state
1365
+
1366
+ def initialize(**args)
1367
+ update!(**args)
1368
+ end
1369
+
1370
+ # Update properties of this object
1371
+ def update!(**args)
1372
+ @disabled_policy = args[:disabled_policy] if args.key?(:disabled_policy)
1373
+ @has_unpublished_changes = args[:has_unpublished_changes] if args.key?(:has_unpublished_changes)
1374
+ @state = args[:state] if args.key?(:state)
1375
+ end
1376
+ end
1377
+
1378
+ # The policy that governs how to treat a disabled label, field, or selection
1379
+ # choice in different contexts.
1380
+ class GoogleAppsDriveLabelsV2LifecycleDisabledPolicy
1381
+ include Google::Apis::Core::Hashable
1382
+
1383
+ # Whether to hide this disabled object in the search menu for Drive items. *
1384
+ # When `false` the object will generally be shown in the UI as disabled (but
1385
+ # still permit searching) when searching for Drive items. * When `true` the
1386
+ # object will generally be hidden in the UI when searching for Drive items.
1387
+ # Corresponds to the JSON property `hideInSearch`
1388
+ # @return [Boolean]
1389
+ attr_accessor :hide_in_search
1390
+ alias_method :hide_in_search?, :hide_in_search
1391
+
1392
+ # Whether to show this disabled object in the apply menu on Drive items. * When `
1393
+ # true` the object will generally be shown in the UI as disabled and is
1394
+ # unselectable. * When `false` the object will generally be hidden in the UI.
1395
+ # Corresponds to the JSON property `showInApply`
1396
+ # @return [Boolean]
1397
+ attr_accessor :show_in_apply
1398
+ alias_method :show_in_apply?, :show_in_apply
1399
+
1400
+ def initialize(**args)
1401
+ update!(**args)
1402
+ end
1403
+
1404
+ # Update properties of this object
1405
+ def update!(**args)
1406
+ @hide_in_search = args[:hide_in_search] if args.key?(:hide_in_search)
1407
+ @show_in_apply = args[:show_in_apply] if args.key?(:show_in_apply)
1408
+ end
1409
+ end
1410
+
1411
+ # Response for listing Labels.
1412
+ class GoogleAppsDriveLabelsV2ListLabelsResponse
1413
+ include Google::Apis::Core::Hashable
1414
+
1415
+ # Labels.
1416
+ # Corresponds to the JSON property `labels`
1417
+ # @return [Array<Google::Apis::DrivelabelsV2::GoogleAppsDriveLabelsV2Label>]
1418
+ attr_accessor :labels
1419
+
1420
+ # The token of the next page in the response.
1421
+ # Corresponds to the JSON property `nextPageToken`
1422
+ # @return [String]
1423
+ attr_accessor :next_page_token
1424
+
1425
+ def initialize(**args)
1426
+ update!(**args)
1427
+ end
1428
+
1429
+ # Update properties of this object
1430
+ def update!(**args)
1431
+ @labels = args[:labels] if args.key?(:labels)
1432
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1433
+ end
1434
+ end
1435
+
1436
+ # Contains information about whether a label component should be considered
1437
+ # locked.
1438
+ class GoogleAppsDriveLabelsV2LockStatus
1439
+ include Google::Apis::Core::Hashable
1440
+
1441
+ # Output only. Indicates whether this label component is the (direct) target of
1442
+ # a LabelLock. A label component may be implicitly locked even if it is not the
1443
+ # direct target of a LabelLock, in which case this field will be false.
1444
+ # Corresponds to the JSON property `locked`
1445
+ # @return [Boolean]
1446
+ attr_accessor :locked
1447
+ alias_method :locked?, :locked
1448
+
1449
+ def initialize(**args)
1450
+ update!(**args)
1451
+ end
1452
+
1453
+ # Update properties of this object
1454
+ def update!(**args)
1455
+ @locked = args[:locked] if args.key?(:locked)
1456
+ end
1457
+ end
1458
+
1459
+ # Information about a user.
1460
+ class GoogleAppsDriveLabelsV2UserInfo
1461
+ include Google::Apis::Core::Hashable
1462
+
1463
+ # The identifier for this user who can be used with the People API to get more
1464
+ # information. e.g. people/12345678
1465
+ # Corresponds to the JSON property `person`
1466
+ # @return [String]
1467
+ attr_accessor :person
1468
+
1469
+ def initialize(**args)
1470
+ update!(**args)
1471
+ end
1472
+
1473
+ # Update properties of this object
1474
+ def update!(**args)
1475
+ @person = args[:person] if args.key?(:person)
1476
+ end
1477
+ end
1478
+
1479
+ # Represents a color in the RGBA color space. This representation is designed
1480
+ # for simplicity of conversion to/from color representations in various
1481
+ # languages over compactness. For example, the fields of this representation can
1482
+ # be trivially provided to the constructor of `java.awt.Color` in Java; it can
1483
+ # also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha`
1484
+ # method in iOS; and, with just a little work, it can be easily formatted into a
1485
+ # CSS `rgba()` string in JavaScript. This reference page doesn't carry
1486
+ # information about the absolute color space that should be used to interpret
1487
+ # the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, etc.). By default,
1488
+ # applications should assume the sRGB color space. When color equality needs to
1489
+ # be decided, implementations, unless documented otherwise, treat two colors as
1490
+ # equal if all their red, green, blue, and alpha values each differ by at most
1491
+ # 1e-5. Example (Java): import com.google.type.Color; // ... public static java.
1492
+ # awt.Color fromProto(Color protocolor) ` float alpha = protocolor.hasAlpha() ?
1493
+ # protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.
1494
+ # getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); ` public static
1495
+ # Color toProto(java.awt.Color color) ` float red = (float) color.getRed();
1496
+ # float green = (float) color.getGreen(); float blue = (float) color.getBlue();
1497
+ # float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .
1498
+ # setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue /
1499
+ # denominator); int alpha = color.getAlpha(); if (alpha != 255) ` result.
1500
+ # setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .
1501
+ # build()); ` return resultBuilder.build(); ` // ... Example (iOS / Obj-C): // ..
1502
+ # . static UIColor* fromProto(Color* protocolor) ` float red = [protocolor red];
1503
+ # float green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
1504
+ # alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
1505
+ # nil) ` alpha = [alpha_wrapper value]; ` return [UIColor colorWithRed:red green:
1506
+ # green blue:blue alpha:alpha]; ` static Color* toProto(UIColor* color) `
1507
+ # CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&
1508
+ # blue alpha:&alpha]) ` return nil; ` Color* result = [[Color alloc] init]; [
1509
+ # result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <
1510
+ # = 0.9999) ` [result setAlpha:floatWrapperWithValue(alpha)]; ` [result
1511
+ # autorelease]; return result; ` // ... Example (JavaScript): // ... var
1512
+ # protoToCssColor = function(rgb_color) ` var redFrac = rgb_color.red || 0.0;
1513
+ # var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0;
1514
+ # var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255);
1515
+ # var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) ` return
1516
+ # rgbToCssColor(red, green, blue); ` var alphaFrac = rgb_color.alpha.value || 0.
1517
+ # 0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',
1518
+ # ', alphaFrac, ')'].join(''); `; var rgbToCssColor = function(red, green, blue)
1519
+ # ` var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString
1520
+ # = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
1521
+ # resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) ` resultBuilder.
1522
+ # push('0'); ` resultBuilder.push(hexString); return resultBuilder.join(''); `; /
1523
+ # / ...
1524
+ class GoogleTypeColor
1525
+ include Google::Apis::Core::Hashable
1526
+
1527
+ # The fraction of this color that should be applied to the pixel. That is, the
1528
+ # final pixel color is defined by the equation: `pixel color = alpha * (this
1529
+ # color) + (1.0 - alpha) * (background color)` This means that a value of 1.0
1530
+ # corresponds to a solid color, whereas a value of 0.0 corresponds to a
1531
+ # completely transparent color. This uses a wrapper message rather than a simple
1532
+ # float scalar so that it is possible to distinguish between a default value and
1533
+ # the value being unset. If omitted, this color object is rendered as a solid
1534
+ # color (as if the alpha value had been explicitly given a value of 1.0).
1535
+ # Corresponds to the JSON property `alpha`
1536
+ # @return [Float]
1537
+ attr_accessor :alpha
1538
+
1539
+ # The amount of blue in the color as a value in the interval [0, 1].
1540
+ # Corresponds to the JSON property `blue`
1541
+ # @return [Float]
1542
+ attr_accessor :blue
1543
+
1544
+ # The amount of green in the color as a value in the interval [0, 1].
1545
+ # Corresponds to the JSON property `green`
1546
+ # @return [Float]
1547
+ attr_accessor :green
1548
+
1549
+ # The amount of red in the color as a value in the interval [0, 1].
1550
+ # Corresponds to the JSON property `red`
1551
+ # @return [Float]
1552
+ attr_accessor :red
1553
+
1554
+ def initialize(**args)
1555
+ update!(**args)
1556
+ end
1557
+
1558
+ # Update properties of this object
1559
+ def update!(**args)
1560
+ @alpha = args[:alpha] if args.key?(:alpha)
1561
+ @blue = args[:blue] if args.key?(:blue)
1562
+ @green = args[:green] if args.key?(:green)
1563
+ @red = args[:red] if args.key?(:red)
1564
+ end
1565
+ end
1566
+
1567
+ # Represents a whole or partial calendar date, such as a birthday. The time of
1568
+ # day and time zone are either specified elsewhere or are insignificant. The
1569
+ # date is relative to the Gregorian Calendar. This can represent one of the
1570
+ # following: * A full date, with non-zero year, month, and day values. * A month
1571
+ # and day, with a zero year (for example, an anniversary). * A year on its own,
1572
+ # with a zero month and a zero day. * A year and month, with a zero day (for
1573
+ # example, a credit card expiration date). Related types: * google.type.
1574
+ # TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
1575
+ class GoogleTypeDate
1576
+ include Google::Apis::Core::Hashable
1577
+
1578
+ # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to
1579
+ # specify a year by itself or a year and month where the day isn't significant.
1580
+ # Corresponds to the JSON property `day`
1581
+ # @return [Fixnum]
1582
+ attr_accessor :day
1583
+
1584
+ # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month
1585
+ # and day.
1586
+ # Corresponds to the JSON property `month`
1587
+ # @return [Fixnum]
1588
+ attr_accessor :month
1589
+
1590
+ # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
1591
+ # year.
1592
+ # Corresponds to the JSON property `year`
1593
+ # @return [Fixnum]
1594
+ attr_accessor :year
1595
+
1596
+ def initialize(**args)
1597
+ update!(**args)
1598
+ end
1599
+
1600
+ # Update properties of this object
1601
+ def update!(**args)
1602
+ @day = args[:day] if args.key?(:day)
1603
+ @month = args[:month] if args.key?(:month)
1604
+ @year = args[:year] if args.key?(:year)
1605
+ end
1606
+ end
1607
+ end
1608
+ end
1609
+ end