Debian Codegraph @

drivelabels/v2beta/drivelabels-gen.go

raw
1 // Copyright 2026 Google LLC.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Code generated file. DO NOT EDIT.
6
7 // Package drivelabels provides access to the Drive Labels API.
8 //
9 // For product documentation, see: https://developers.google.com/workspace/drive/labels
10 //
11 // # Library status
12 //
13 // These client libraries are officially supported by Google. However, this
14 // library is considered complete and is in maintenance mode. This means
15 // that we will address critical bugs and security issues but will not add
16 // any new features.
17 //
18 // When possible, we recommend using our newer
19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
20 // that are still actively being worked and iterated on.
21 //
22 // # Creating a client
23 //
24 // Usage example:
25 //
26 // import "google.golang.org/api/drivelabels/v2beta"
27 // ...
28 // ctx := context.Background()
29 // drivelabelsService, err := drivelabels.NewService(ctx)
30 //
31 // In this example, Google Application Default Credentials are used for
32 // authentication. For information on how to create and obtain Application
33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
34 //
35 // # Other authentication options
36 //
37 // By default, all available scopes (see "Constants") are used to authenticate.
38 // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
39 //
40 // drivelabelsService, err := drivelabels.NewService(ctx, option.WithScopes(drivelabels.DriveLabelsReadonlyScope))
41 //
42 // To use an API key for authentication (note: some APIs do not support API
43 // keys), use [google.golang.org/api/option.WithAPIKey]:
44 //
45 // drivelabelsService, err := drivelabels.NewService(ctx, option.WithAPIKey("AIza..."))
46 //
47 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
48 // flow, use [google.golang.org/api/option.WithTokenSource]:
49 //
50 // config := &oauth2.Config{...}
51 // // ...
52 // token, err := config.Exchange(ctx, ...)
53 // drivelabelsService, err := drivelabels.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
54 //
55 // See [google.golang.org/api/option.ClientOption] for details on options.
56 package drivelabels // import "google.golang.org/api/drivelabels/v2beta"
57
58 import (
59 "bytes"
60 "context"
61 "encoding/json"
62 "errors"
63 "fmt"
64 "io"
65 "log/slog"
66 "net/http"
67 "net/url"
68 "strconv"
69 "strings"
70
71 "github.com/googleapis/gax-go/v2/internallog"
72 googleapi "google.golang.org/api/googleapi"
73 internal "google.golang.org/api/internal"
74 gensupport "google.golang.org/api/internal/gensupport"
75 option "google.golang.org/api/option"
76 internaloption "google.golang.org/api/option/internaloption"
77 htransport "google.golang.org/api/transport/http"
78 )
79
80 // Always reference these packages, just in case the auto-generated code
81 // below doesn't.
82 var _ = bytes.NewBuffer
83 var _ = strconv.Itoa
84 var _ = fmt.Sprintf
85 var _ = json.NewDecoder
86 var _ = io.Copy
87 var _ = url.Parse
88 var _ = gensupport.MarshalJSON
89 var _ = googleapi.Version
90 var _ = errors.New
91 var _ = strings.Replace
92 var _ = context.Canceled
93 var _ = internaloption.WithDefaultEndpoint
94 var _ = internal.Version
95 var _ = internallog.New
96
97 const apiId = "drivelabels:v2beta"
98 const apiName = "drivelabels"
99 const apiVersion = "v2beta"
100 const basePath = "https://drivelabels.googleapis.com/"
101 const basePathTemplate = "https://drivelabels.UNIVERSE_DOMAIN/"
102 const mtlsBasePath = "https://drivelabels.mtls.googleapis.com/"
103
104 // OAuth2 scopes used by this API.
105 const (
106 // See, edit, create, and delete all Google Drive labels in your organization,
107 // and see your organization's label-related admin policies
108 DriveAdminLabelsScope = "https://www.googleapis.com/auth/drive.admin.labels"
109
110 // See all Google Drive labels and label-related admin policies in your
111 // organization
112 DriveAdminLabelsReadonlyScope = "https://www.googleapis.com/auth/drive.admin.labels.readonly"
113
114 // See, edit, create, and delete your Google Drive labels
115 DriveLabelsScope = "https://www.googleapis.com/auth/drive.labels"
116
117 // See your Google Drive labels
118 DriveLabelsReadonlyScope = "https://www.googleapis.com/auth/drive.labels.readonly"
119 )
120
121 // NewService creates a new Service.
122 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
123 scopesOption := internaloption.WithDefaultScopes(
124 "https://www.googleapis.com/auth/drive.admin.labels",
125 "https://www.googleapis.com/auth/drive.admin.labels.readonly",
126 "https://www.googleapis.com/auth/drive.labels",
127 "https://www.googleapis.com/auth/drive.labels.readonly",
128 )
129 // NOTE: prepend, so we don't override user-specified scopes.
130 opts = append([]option.ClientOption{scopesOption}, opts...)
131 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
132 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
133 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
134 opts = append(opts, internaloption.EnableNewAuthLibrary())
135 client, endpoint, err := htransport.NewClient(ctx, opts...)
136 if err != nil {
137 return nil, err
138 }
139 s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
140 s.Labels = NewLabelsService(s)
141 s.Limits = NewLimitsService(s)
142 s.Users = NewUsersService(s)
143 if endpoint != "" {
144 s.BasePath = endpoint
145 }
146 return s, nil
147 }
148
149 // New creates a new Service. It uses the provided http.Client for requests.
150 //
151 // Deprecated: please use NewService instead.
152 // To provide a custom HTTP client, use option.WithHTTPClient.
153 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
154 func New(client *http.Client) (*Service, error) {
155 if client == nil {
156 return nil, errors.New("client is nil")
157 }
158 return NewService(context.TODO(), option.WithHTTPClient(client))
159 }
160
161 type Service struct {
162 client *http.Client
163 logger *slog.Logger
164 BasePath string // API endpoint base URL
165 UserAgent string // optional additional User-Agent fragment
166
167 Labels *LabelsService
168
169 Limits *LimitsService
170
171 Users *UsersService
172 }
173
174 func (s *Service) userAgent() string {
175 if s.UserAgent == "" {
176 return googleapi.UserAgent
177 }
178 return googleapi.UserAgent + " " + s.UserAgent
179 }
180
181 func NewLabelsService(s *Service) *LabelsService {
182 rs := &LabelsService{s: s}
183 rs.Locks = NewLabelsLocksService(s)
184 rs.Permissions = NewLabelsPermissionsService(s)
185 rs.Revisions = NewLabelsRevisionsService(s)
186 return rs
187 }
188
189 type LabelsService struct {
190 s *Service
191
192 Locks *LabelsLocksService
193
194 Permissions *LabelsPermissionsService
195
196 Revisions *LabelsRevisionsService
197 }
198
199 func NewLabelsLocksService(s *Service) *LabelsLocksService {
200 rs := &LabelsLocksService{s: s}
201 return rs
202 }
203
204 type LabelsLocksService struct {
205 s *Service
206 }
207
208 func NewLabelsPermissionsService(s *Service) *LabelsPermissionsService {
209 rs := &LabelsPermissionsService{s: s}
210 return rs
211 }
212
213 type LabelsPermissionsService struct {
214 s *Service
215 }
216
217 func NewLabelsRevisionsService(s *Service) *LabelsRevisionsService {
218 rs := &LabelsRevisionsService{s: s}
219 rs.Locks = NewLabelsRevisionsLocksService(s)
220 rs.Permissions = NewLabelsRevisionsPermissionsService(s)
221 return rs
222 }
223
224 type LabelsRevisionsService struct {
225 s *Service
226
227 Locks *LabelsRevisionsLocksService
228
229 Permissions *LabelsRevisionsPermissionsService
230 }
231
232 func NewLabelsRevisionsLocksService(s *Service) *LabelsRevisionsLocksService {
233 rs := &LabelsRevisionsLocksService{s: s}
234 return rs
235 }
236
237 type LabelsRevisionsLocksService struct {
238 s *Service
239 }
240
241 func NewLabelsRevisionsPermissionsService(s *Service) *LabelsRevisionsPermissionsService {
242 rs := &LabelsRevisionsPermissionsService{s: s}
243 return rs
244 }
245
246 type LabelsRevisionsPermissionsService struct {
247 s *Service
248 }
249
250 func NewLimitsService(s *Service) *LimitsService {
251 rs := &LimitsService{s: s}
252 return rs
253 }
254
255 type LimitsService struct {
256 s *Service
257 }
258
259 func NewUsersService(s *Service) *UsersService {
260 rs := &UsersService{s: s}
261 return rs
262 }
263
264 type UsersService struct {
265 s *Service
266 }
267
268 // GoogleAppsDriveLabelsV2betaBadgeColors: The color derived from BadgeConfig
269 // and changed to the closest recommended supported color.
270 type GoogleAppsDriveLabelsV2betaBadgeColors struct {
271 // BackgroundColor: Output only. Badge background that pairs with the
272 // foreground.
273 BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"`
274 // ForegroundColor: Output only. Badge foreground that pairs with the
275 // background.
276 ForegroundColor *GoogleTypeColor `json:"foregroundColor,omitempty"`
277 // SoloColor: Output only. Color that can be used for text without a
278 // background.
279 SoloColor *GoogleTypeColor `json:"soloColor,omitempty"`
280 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to
281 // unconditionally include in API requests. By default, fields with empty or
282 // default values are omitted from API requests. See
283 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
284 // details.
285 ForceSendFields []string `json:"-"`
286 // NullFields is a list of field names (e.g. "BackgroundColor") to include in
287 // API requests with the JSON null value. By default, fields with empty values
288 // are omitted from API requests. See
289 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
290 NullFields []string `json:"-"`
291 }
292
293 func (s GoogleAppsDriveLabelsV2betaBadgeColors) MarshalJSON() ([]byte, error) {
294 type NoMethod GoogleAppsDriveLabelsV2betaBadgeColors
295 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
296 }
297
298 // GoogleAppsDriveLabelsV2betaBadgeConfig: Badge status of the label.
299 type GoogleAppsDriveLabelsV2betaBadgeConfig struct {
300 // Color: The color of the badge. When not specified, no badge is rendered. The
301 // background, foreground, and solo (light and dark mode) colors set here are
302 // changed in the Drive UI into the closest recommended supported color.
303 Color *GoogleTypeColor `json:"color,omitempty"`
304 // PriorityOverride: Override the default global priority of this badge. When
305 // set to 0, the default priority heuristic is used.
306 PriorityOverride int64 `json:"priorityOverride,omitempty,string"`
307 // ForceSendFields is a list of field names (e.g. "Color") to unconditionally
308 // include in API requests. By default, fields with empty or default values are
309 // omitted from API requests. See
310 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
311 // details.
312 ForceSendFields []string `json:"-"`
313 // NullFields is a list of field names (e.g. "Color") to include in API
314 // requests with the JSON null value. By default, fields with empty values are
315 // omitted from API requests. See
316 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
317 NullFields []string `json:"-"`
318 }
319
320 func (s GoogleAppsDriveLabelsV2betaBadgeConfig) MarshalJSON() ([]byte, error) {
321 type NoMethod GoogleAppsDriveLabelsV2betaBadgeConfig
322 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
323 }
324
325 // GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest: Deletes one
326 // or more label permissions.
327 type GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest struct {
328 // Requests: Required. The request message specifying the resources to update.
329 Requests []*GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest `json:"requests,omitempty"`
330 // UseAdminAccess: Set to `true` in order to use the user's admin credentials.
331 // The server will verify the user is an admin for the label before allowing
332 // access. If this is set, the `use_admin_access` field in the
333 // `DeleteLabelPermissionRequest` messages must either be empty or match this
334 // field.
335 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
336 // ForceSendFields is a list of field names (e.g. "Requests") to
337 // unconditionally include in API requests. By default, fields with empty or
338 // default values are omitted from API requests. See
339 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
340 // details.
341 ForceSendFields []string `json:"-"`
342 // NullFields is a list of field names (e.g. "Requests") to include in API
343 // requests with the JSON null value. By default, fields with empty values are
344 // omitted from API requests. See
345 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
346 NullFields []string `json:"-"`
347 }
348
349 func (s GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest) MarshalJSON() ([]byte, error) {
350 type NoMethod GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest
351 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
352 }
353
354 // GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest: Updates one
355 // or more label permissions.
356 type GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest struct {
357 // Requests: Required. The request message specifying the resources to update.
358 Requests []*GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest `json:"requests,omitempty"`
359 // UseAdminAccess: Set to `true` in order to use the user's admin credentials.
360 // The server will verify the user is an admin for the label before allowing
361 // access. If this is set, the `use_admin_access` field in the
362 // `UpdateLabelPermissionRequest` messages must either be empty or match this
363 // field.
364 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
365 // ForceSendFields is a list of field names (e.g. "Requests") to
366 // unconditionally include in API requests. By default, fields with empty or
367 // default values are omitted from API requests. See
368 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
369 // details.
370 ForceSendFields []string `json:"-"`
371 // NullFields is a list of field names (e.g. "Requests") to include in API
372 // requests with the JSON null value. By default, fields with empty values are
373 // omitted from API requests. See
374 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
375 NullFields []string `json:"-"`
376 }
377
378 func (s GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest) MarshalJSON() ([]byte, error) {
379 type NoMethod GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest
380 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
381 }
382
383 // GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse: Response for
384 // updating one or more label permissions.
385 type GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse struct {
386 // Permissions: Required. Permissions updated.
387 Permissions []*GoogleAppsDriveLabelsV2betaLabelPermission `json:"permissions,omitempty"`
388
389 // ServerResponse contains the HTTP response code and headers from the server.
390 googleapi.ServerResponse `json:"-"`
391 // ForceSendFields is a list of field names (e.g. "Permissions") to
392 // unconditionally include in API requests. By default, fields with empty or
393 // default values are omitted from API requests. See
394 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
395 // details.
396 ForceSendFields []string `json:"-"`
397 // NullFields is a list of field names (e.g. "Permissions") to include in API
398 // requests with the JSON null value. By default, fields with empty values are
399 // omitted from API requests. See
400 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
401 NullFields []string `json:"-"`
402 }
403
404 func (s GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse) MarshalJSON() ([]byte, error) {
405 type NoMethod GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse
406 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
407 }
408
409 // GoogleAppsDriveLabelsV2betaDateLimits: Limits for date field type.
410 type GoogleAppsDriveLabelsV2betaDateLimits struct {
411 // MaxValue: Maximum value for the date field type.
412 MaxValue *GoogleTypeDate `json:"maxValue,omitempty"`
413 // MinValue: Minimum value for the date field type.
414 MinValue *GoogleTypeDate `json:"minValue,omitempty"`
415 // ForceSendFields is a list of field names (e.g. "MaxValue") to
416 // unconditionally include in API requests. By default, fields with empty or
417 // default values are omitted from API requests. See
418 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
419 // details.
420 ForceSendFields []string `json:"-"`
421 // NullFields is a list of field names (e.g. "MaxValue") to include in API
422 // requests with the JSON null value. By default, fields with empty values are
423 // omitted from API requests. See
424 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
425 NullFields []string `json:"-"`
426 }
427
428 func (s GoogleAppsDriveLabelsV2betaDateLimits) MarshalJSON() ([]byte, error) {
429 type NoMethod GoogleAppsDriveLabelsV2betaDateLimits
430 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
431 }
432
433 // GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest: Deletes a label
434 // permission. Permissions affect the label resource as a whole, aren't
435 // revisioned, and don't require publishing.
436 type GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest struct {
437 // Name: Required. Label permission resource name.
438 Name string `json:"name,omitempty"`
439 // UseAdminAccess: Set to `true` in order to use the user's admin credentials.
440 // The server will verify the user is an admin for the label before allowing
441 // access.
442 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
443 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
444 // include in API requests. By default, fields with empty or default values are
445 // omitted from API requests. See
446 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
447 // details.
448 ForceSendFields []string `json:"-"`
449 // NullFields is a list of field names (e.g. "Name") to include in API requests
450 // with the JSON null value. By default, fields with empty values are omitted
451 // from API requests. See
452 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
453 NullFields []string `json:"-"`
454 }
455
456 func (s GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest) MarshalJSON() ([]byte, error) {
457 type NoMethod GoogleAppsDriveLabelsV2betaDeleteLabelPermissionRequest
458 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
459 }
460
461 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest: The set of requests for
462 // updating aspects of a label. If any request isn't valid, no requests will be
463 // applied.
464 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest struct {
465 // LanguageCode: The BCP-47 language code to use for evaluating localized field
466 // labels when `include_label_in_response` is `true`.
467 LanguageCode string `json:"languageCode,omitempty"`
468 // Requests: A list of updates to apply to the label. Requests will be applied
469 // in the order they are specified.
470 Requests []*GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest `json:"requests,omitempty"`
471 // UseAdminAccess: Set to `true` in order to use the user's admin credentials.
472 // The server will verify the user is an admin for the label before allowing
473 // access.
474 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
475 // View: When specified, only certain fields belonging to the indicated view
476 // will be returned.
477 //
478 // Possible values:
479 // "LABEL_VIEW_BASIC" - Implies the field mask:
480 // `name,id,revision_id,label_type,properties.*`
481 // "LABEL_VIEW_FULL" - All possible fields.
482 View string `json:"view,omitempty"`
483 // WriteControl: Provides control over how write requests are executed.
484 WriteControl *GoogleAppsDriveLabelsV2betaWriteControl `json:"writeControl,omitempty"`
485 // ForceSendFields is a list of field names (e.g. "LanguageCode") to
486 // unconditionally include in API requests. By default, fields with empty or
487 // default values are omitted from API requests. See
488 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
489 // details.
490 ForceSendFields []string `json:"-"`
491 // NullFields is a list of field names (e.g. "LanguageCode") to include in API
492 // requests with the JSON null value. By default, fields with empty values are
493 // omitted from API requests. See
494 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
495 NullFields []string `json:"-"`
496 }
497
498 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest) MarshalJSON() ([]byte, error) {
499 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest
500 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
501 }
502
503 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest:
504 // Request to create a field within a label.
505 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest struct {
506 // Field: Required. Field to create.
507 Field *GoogleAppsDriveLabelsV2betaField `json:"field,omitempty"`
508 // ForceSendFields is a list of field names (e.g. "Field") to unconditionally
509 // include in API requests. By default, fields with empty or default values are
510 // omitted from API requests. See
511 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
512 // details.
513 ForceSendFields []string `json:"-"`
514 // NullFields is a list of field names (e.g. "Field") to include in API
515 // requests with the JSON null value. By default, fields with empty values are
516 // omitted from API requests. See
517 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
518 NullFields []string `json:"-"`
519 }
520
521 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest) MarshalJSON() ([]byte, error) {
522 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest
523 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
524 }
525
526 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoiceReques
527 // t: Request to create a selection choice.
528 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoiceRequest struct {
529 // Choice: Required. The choice to create.
530 Choice *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice `json:"choice,omitempty"`
531 // FieldId: Required. The selection field in which a choice will be created.
532 FieldId string `json:"fieldId,omitempty"`
533 // ForceSendFields is a list of field names (e.g. "Choice") to unconditionally
534 // include in API requests. By default, fields with empty or default values are
535 // omitted from API requests. See
536 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
537 // details.
538 ForceSendFields []string `json:"-"`
539 // NullFields is a list of field names (e.g. "Choice") to include in API
540 // requests with the JSON null value. By default, fields with empty values are
541 // omitted from API requests. See
542 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
543 NullFields []string `json:"-"`
544 }
545
546 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoiceRequest) MarshalJSON() ([]byte, error) {
547 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoiceRequest
548 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
549 }
550
551 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest:
552 // Request to delete the field.
553 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest struct {
554 // Id: Required. ID of the field to delete.
555 Id string `json:"id,omitempty"`
556 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally
557 // include in API requests. By default, fields with empty or default values are
558 // omitted from API requests. See
559 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
560 // details.
561 ForceSendFields []string `json:"-"`
562 // NullFields is a list of field names (e.g. "Id") to include in API requests
563 // with the JSON null value. By default, fields with empty values are omitted
564 // from API requests. See
565 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
566 NullFields []string `json:"-"`
567 }
568
569 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest) MarshalJSON() ([]byte, error) {
570 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest
571 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
572 }
573
574 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoiceReques
575 // t: Request to delete a choice.
576 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoiceRequest struct {
577 // FieldId: Required. The selection field from which a choice will be deleted.
578 FieldId string `json:"fieldId,omitempty"`
579 // Id: Required. Choice to delete.
580 Id string `json:"id,omitempty"`
581 // ForceSendFields is a list of field names (e.g. "FieldId") to unconditionally
582 // include in API requests. By default, fields with empty or default values are
583 // omitted from API requests. See
584 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
585 // details.
586 ForceSendFields []string `json:"-"`
587 // NullFields is a list of field names (e.g. "FieldId") to include in API
588 // requests with the JSON null value. By default, fields with empty values are
589 // omitted from API requests. See
590 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
591 NullFields []string `json:"-"`
592 }
593
594 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoiceRequest) MarshalJSON() ([]byte, error) {
595 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoiceRequest
596 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
597 }
598
599 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest:
600 // Request to disable the field.
601 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest struct {
602 // DisabledPolicy: Required. Field disabled policy.
603 DisabledPolicy *GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy `json:"disabledPolicy,omitempty"`
604 // Id: Required. Key of the field to disable.
605 Id string `json:"id,omitempty"`
606 // UpdateMask: The fields that should be updated. At least one field must be
607 // specified. The root `disabled_policy` is implied and should not be
608 // specified. A single `*` can be used as a short-hand for updating every
609 // field.
610 UpdateMask string `json:"updateMask,omitempty"`
611 // ForceSendFields is a list of field names (e.g. "DisabledPolicy") to
612 // unconditionally include in API requests. By default, fields with empty or
613 // default values are omitted from API requests. See
614 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
615 // details.
616 ForceSendFields []string `json:"-"`
617 // NullFields is a list of field names (e.g. "DisabledPolicy") to include in
618 // API requests with the JSON null value. By default, fields with empty values
619 // are omitted from API requests. See
620 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
621 NullFields []string `json:"-"`
622 }
623
624 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest) MarshalJSON() ([]byte, error) {
625 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest
626 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
627 }
628
629 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoiceReque
630 // st: Request to disable a choice.
631 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoiceRequest struct {
632 // DisabledPolicy: Required. The disabled policy to update.
633 DisabledPolicy *GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy `json:"disabledPolicy,omitempty"`
634 // FieldId: Required. The selection field in which a choice will be disabled.
635 FieldId string `json:"fieldId,omitempty"`
636 // Id: Required. Choice to disable.
637 Id string `json:"id,omitempty"`
638 // UpdateMask: The fields that should be updated. At least one field must be
639 // specified. The root `disabled_policy` is implied and should not be
640 // specified. A single `*` can be used as a short-hand for updating every
641 // field.
642 UpdateMask string `json:"updateMask,omitempty"`
643 // ForceSendFields is a list of field names (e.g. "DisabledPolicy") to
644 // unconditionally include in API requests. By default, fields with empty or
645 // default values are omitted from API requests. See
646 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
647 // details.
648 ForceSendFields []string `json:"-"`
649 // NullFields is a list of field names (e.g. "DisabledPolicy") to include in
650 // API requests with the JSON null value. By default, fields with empty values
651 // are omitted from API requests. See
652 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
653 NullFields []string `json:"-"`
654 }
655
656 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoiceRequest) MarshalJSON() ([]byte, error) {
657 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoiceRequest
658 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
659 }
660
661 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest:
662 // Request to enable the field.
663 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest struct {
664 // Id: Required. ID of the field to enable.
665 Id string `json:"id,omitempty"`
666 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally
667 // include in API requests. By default, fields with empty or default values are
668 // omitted from API requests. See
669 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
670 // details.
671 ForceSendFields []string `json:"-"`
672 // NullFields is a list of field names (e.g. "Id") to include in API requests
673 // with the JSON null value. By default, fields with empty values are omitted
674 // from API requests. See
675 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
676 NullFields []string `json:"-"`
677 }
678
679 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest) MarshalJSON() ([]byte, error) {
680 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest
681 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
682 }
683
684 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoiceReques
685 // t: Request to enable a choice.
686 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoiceRequest struct {
687 // FieldId: Required. The selection field in which a choice will be enabled.
688 FieldId string `json:"fieldId,omitempty"`
689 // Id: Required. Choice to enable.
690 Id string `json:"id,omitempty"`
691 // ForceSendFields is a list of field names (e.g. "FieldId") to unconditionally
692 // include in API requests. By default, fields with empty or default values are
693 // omitted from API requests. See
694 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
695 // details.
696 ForceSendFields []string `json:"-"`
697 // NullFields is a list of field names (e.g. "FieldId") to include in API
698 // requests with the JSON null value. By default, fields with empty values are
699 // omitted from API requests. See
700 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
701 NullFields []string `json:"-"`
702 }
703
704 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoiceRequest) MarshalJSON() ([]byte, error) {
705 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoiceRequest
706 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
707 }
708
709 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest: A single kind of
710 // update to apply to a label.
711 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest struct {
712 // CreateField: Creates a field.
713 CreateField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateFieldRequest `json:"createField,omitempty"`
714 // CreateSelectionChoice: Create a choice within a selection field.
715 CreateSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestCreateSelectionChoiceRequest `json:"createSelectionChoice,omitempty"`
716 // DeleteField: Deletes a field from the label.
717 DeleteField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteFieldRequest `json:"deleteField,omitempty"`
718 // DeleteSelectionChoice: Delete a choice within a selection field.
719 DeleteSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDeleteSelectionChoiceRequest `json:"deleteSelectionChoice,omitempty"`
720 // DisableField: Disables the field.
721 DisableField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableFieldRequest `json:"disableField,omitempty"`
722 // DisableSelectionChoice: Disable a choice within a selection field.
723 DisableSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestDisableSelectionChoiceRequest `json:"disableSelectionChoice,omitempty"`
724 // EnableField: Enables the field.
725 EnableField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableFieldRequest `json:"enableField,omitempty"`
726 // EnableSelectionChoice: Enable a choice within a selection field.
727 EnableSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestEnableSelectionChoiceRequest `json:"enableSelectionChoice,omitempty"`
728 // UpdateField: Updates basic properties of a field.
729 UpdateField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertiesRequest `json:"updateField,omitempty"`
730 // UpdateFieldType: Update field type and/or type options.
731 UpdateFieldType *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeRequest `json:"updateFieldType,omitempty"`
732 // UpdateLabel: Updates the label properties.
733 UpdateLabel *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertiesRequest `json:"updateLabel,omitempty"`
734 // UpdateSelectionChoiceProperties: Update a choice property within a selection
735 // field.
736 UpdateSelectionChoiceProperties *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest `json:"updateSelectionChoiceProperties,omitempty"`
737 // ForceSendFields is a list of field names (e.g. "CreateField") to
738 // unconditionally include in API requests. By default, fields with empty or
739 // default values are omitted from API requests. See
740 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
741 // details.
742 ForceSendFields []string `json:"-"`
743 // NullFields is a list of field names (e.g. "CreateField") to include in API
744 // requests with the JSON null value. By default, fields with empty values are
745 // omitted from API requests. See
746 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
747 NullFields []string `json:"-"`
748 }
749
750 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest) MarshalJSON() ([]byte, error) {
751 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestRequest
752 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
753 }
754
755 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertiesReques
756 // t: Request to update field properties.
757 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertiesRequest struct {
758 // Id: Required. The field to update.
759 Id string `json:"id,omitempty"`
760 // Properties: Required. Basic field properties.
761 Properties *GoogleAppsDriveLabelsV2betaFieldProperties `json:"properties,omitempty"`
762 // UpdateMask: The fields that should be updated. At least one field must be
763 // specified. The root `properties` is implied and should not be specified. A
764 // single `*` can be used as a short-hand for updating every field.
765 UpdateMask string `json:"updateMask,omitempty"`
766 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally
767 // include in API requests. By default, fields with empty or default values are
768 // omitted from API requests. See
769 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
770 // details.
771 ForceSendFields []string `json:"-"`
772 // NullFields is a list of field names (e.g. "Id") to include in API requests
773 // with the JSON null value. By default, fields with empty values are omitted
774 // from API requests. See
775 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
776 NullFields []string `json:"-"`
777 }
778
779 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertiesRequest) MarshalJSON() ([]byte, error) {
780 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldPropertiesRequest
781 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
782 }
783
784 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeRequest:
785 // Request to change the type of a field.
786 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeRequest struct {
787 // DateOptions: Update field to Date.
788 DateOptions *GoogleAppsDriveLabelsV2betaFieldDateOptions `json:"dateOptions,omitempty"`
789 // Id: Required. The field to update.
790 Id string `json:"id,omitempty"`
791 // IntegerOptions: Update field to Integer.
792 IntegerOptions *GoogleAppsDriveLabelsV2betaFieldIntegerOptions `json:"integerOptions,omitempty"`
793 // SelectionOptions: Update field to Selection.
794 SelectionOptions *GoogleAppsDriveLabelsV2betaFieldSelectionOptions `json:"selectionOptions,omitempty"`
795 // TextOptions: Update field to Text.
796 TextOptions *GoogleAppsDriveLabelsV2betaFieldTextOptions `json:"textOptions,omitempty"`
797 // UpdateMask: The fields that should be updated. At least one field must be
798 // specified. The root of `type_options` is implied and should not be
799 // specified. A single `*` can be used as a short-hand for updating every
800 // field.
801 UpdateMask string `json:"updateMask,omitempty"`
802 // UserOptions: Update field to User.
803 UserOptions *GoogleAppsDriveLabelsV2betaFieldUserOptions `json:"userOptions,omitempty"`
804 // ForceSendFields is a list of field names (e.g. "DateOptions") to
805 // unconditionally include in API requests. By default, fields with empty or
806 // default values are omitted from API requests. See
807 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
808 // details.
809 ForceSendFields []string `json:"-"`
810 // NullFields is a list of field names (e.g. "DateOptions") to include in API
811 // requests with the JSON null value. By default, fields with empty values are
812 // omitted from API requests. See
813 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
814 NullFields []string `json:"-"`
815 }
816
817 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeRequest) MarshalJSON() ([]byte, error) {
818 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateFieldTypeRequest
819 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
820 }
821
822 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertiesReques
823 // t: Updates basic properties of a label.
824 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertiesRequest struct {
825 // Properties: Required. Label properties to update.
826 Properties *GoogleAppsDriveLabelsV2betaLabelProperties `json:"properties,omitempty"`
827 // UpdateMask: The fields that should be updated. At least one field must be
828 // specified. The root `label_properties` is implied and should not be
829 // specified. A single `*` can be used as a short-hand for updating every
830 // field.
831 UpdateMask string `json:"updateMask,omitempty"`
832 // ForceSendFields is a list of field names (e.g. "Properties") to
833 // unconditionally include in API requests. By default, fields with empty or
834 // default values are omitted from API requests. See
835 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
836 // details.
837 ForceSendFields []string `json:"-"`
838 // NullFields is a list of field names (e.g. "Properties") to include in API
839 // requests with the JSON null value. By default, fields with empty values are
840 // omitted from API requests. See
841 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
842 NullFields []string `json:"-"`
843 }
844
845 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertiesRequest) MarshalJSON() ([]byte, error) {
846 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateLabelPropertiesRequest
847 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
848 }
849
850 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoiceProper
851 // tiesRequest: Request to update a choice property.
852 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest struct {
853 // FieldId: Required. The selection field to update.
854 FieldId string `json:"fieldId,omitempty"`
855 // Id: Required. The choice to update.
856 Id string `json:"id,omitempty"`
857 // Properties: Required. The choice properties to update.
858 Properties *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties `json:"properties,omitempty"`
859 // UpdateMask: The fields that should be updated. At least one field must be
860 // specified. The root `properties` is implied and should not be specified. A
861 // single `*` can be used as a short-hand for updating every field.
862 UpdateMask string `json:"updateMask,omitempty"`
863 // ForceSendFields is a list of field names (e.g. "FieldId") to unconditionally
864 // include in API requests. By default, fields with empty or default values are
865 // omitted from API requests. See
866 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
867 // details.
868 ForceSendFields []string `json:"-"`
869 // NullFields is a list of field names (e.g. "FieldId") to include in API
870 // requests with the JSON null value. By default, fields with empty values are
871 // omitted from API requests. See
872 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
873 NullFields []string `json:"-"`
874 }
875
876 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest) MarshalJSON() ([]byte, error) {
877 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequestUpdateSelectionChoicePropertiesRequest
878 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
879 }
880
881 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse: Response for label
882 // update.
883 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse struct {
884 // Responses: The reply of the updates. This maps 1:1 with the updates,
885 // although responses to some requests may be empty.
886 Responses []*GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse `json:"responses,omitempty"`
887 // UpdatedLabel: The label after updates were applied. This is only set if
888 // `include_label_in_response` is `true` and there were no errors.
889 UpdatedLabel *GoogleAppsDriveLabelsV2betaLabel `json:"updatedLabel,omitempty"`
890
891 // ServerResponse contains the HTTP response code and headers from the server.
892 googleapi.ServerResponse `json:"-"`
893 // ForceSendFields is a list of field names (e.g. "Responses") to
894 // unconditionally include in API requests. By default, fields with empty or
895 // default values are omitted from API requests. See
896 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
897 // details.
898 ForceSendFields []string `json:"-"`
899 // NullFields is a list of field names (e.g. "Responses") to include in API
900 // requests with the JSON null value. By default, fields with empty values are
901 // omitted from API requests. See
902 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
903 NullFields []string `json:"-"`
904 }
905
906 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse) MarshalJSON() ([]byte, error) {
907 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse
908 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
909 }
910
911 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse:
912 // Response following field create.
913 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse struct {
914 // Id: The field of the created field. When left blank in a create request, a
915 // key will be autogenerated and can be identified here.
916 Id string `json:"id,omitempty"`
917 // Priority: The priority of the created field. The priority may change from
918 // what was specified to assure contiguous priorities between fields (1-n).
919 Priority int64 `json:"priority,omitempty"`
920 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally
921 // include in API requests. By default, fields with empty or default values are
922 // omitted from API requests. See
923 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
924 // details.
925 ForceSendFields []string `json:"-"`
926 // NullFields is a list of field names (e.g. "Id") to include in API requests
927 // with the JSON null value. By default, fields with empty values are omitted
928 // from API requests. See
929 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
930 NullFields []string `json:"-"`
931 }
932
933 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse) MarshalJSON() ([]byte, error) {
934 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse
935 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
936 }
937
938 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoiceRespo
939 // nse: Response following selection choice create.
940 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoiceResponse struct {
941 // FieldId: The server-generated ID of the field.
942 FieldId string `json:"fieldId,omitempty"`
943 // Id: The server-generated ID of the created choice within the field.
944 Id string `json:"id,omitempty"`
945 // ForceSendFields is a list of field names (e.g. "FieldId") to unconditionally
946 // include in API requests. By default, fields with empty or default values are
947 // omitted from API requests. See
948 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
949 // details.
950 ForceSendFields []string `json:"-"`
951 // NullFields is a list of field names (e.g. "FieldId") to include in API
952 // requests with the JSON null value. By default, fields with empty values are
953 // omitted from API requests. See
954 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
955 NullFields []string `json:"-"`
956 }
957
958 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoiceResponse) MarshalJSON() ([]byte, error) {
959 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoiceResponse
960 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
961 }
962
963 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteFieldResponse:
964 // Response following field delete.
965 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteFieldResponse struct {
966 }
967
968 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteSelectionChoiceRespo
969 // nse: Response following choice delete.
970 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteSelectionChoiceResponse struct {
971 }
972
973 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableFieldResponse:
974 // Response following field disable.
975 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableFieldResponse struct {
976 }
977
978 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableSelectionChoiceResp
979 // onse: Response following choice disable.
980 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableSelectionChoiceResponse struct {
981 }
982
983 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableFieldResponse:
984 // Response following field enable.
985 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableFieldResponse struct {
986 }
987
988 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableSelectionChoiceRespo
989 // nse: Response following choice enable.
990 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableSelectionChoiceResponse struct {
991 }
992
993 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse: A single
994 // response from an update.
995 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse struct {
996 // CreateField: Creates a field.
997 CreateField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateFieldResponse `json:"createField,omitempty"`
998 // CreateSelectionChoice: Creates a selection list option to add to a selection
999 // field.
1000 CreateSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseCreateSelectionChoiceResponse `json:"createSelectionChoice,omitempty"`
1001 // DeleteField: Deletes a field from the label.
1002 DeleteField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteFieldResponse `json:"deleteField,omitempty"`
1003 // DeleteSelectionChoice: Deletes a choice from a selection field.
1004 DeleteSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDeleteSelectionChoiceResponse `json:"deleteSelectionChoice,omitempty"`
1005 // DisableField: Disables field.
1006 DisableField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableFieldResponse `json:"disableField,omitempty"`
1007 // DisableSelectionChoice: Disables a choice within a selection field.
1008 DisableSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseDisableSelectionChoiceResponse `json:"disableSelectionChoice,omitempty"`
1009 // EnableField: Enables field.
1010 EnableField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableFieldResponse `json:"enableField,omitempty"`
1011 // EnableSelectionChoice: Enables a choice within a selection field.
1012 EnableSelectionChoice *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseEnableSelectionChoiceResponse `json:"enableSelectionChoice,omitempty"`
1013 // UpdateField: Updates basic properties of a field.
1014 UpdateField *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldPropertiesResponse `json:"updateField,omitempty"`
1015 // UpdateFieldType: Updates field type and/or type options.
1016 UpdateFieldType *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldTypeResponse `json:"updateFieldType,omitempty"`
1017 // UpdateLabel: Updates basic properties of a label.
1018 UpdateLabel *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateLabelPropertiesResponse `json:"updateLabel,omitempty"`
1019 // UpdateSelectionChoiceProperties: Updates a choice within a selection field.
1020 UpdateSelectionChoiceProperties *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse `json:"updateSelectionChoiceProperties,omitempty"`
1021 // ForceSendFields is a list of field names (e.g. "CreateField") to
1022 // unconditionally include in API requests. By default, fields with empty or
1023 // default values are omitted from API requests. See
1024 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1025 // details.
1026 ForceSendFields []string `json:"-"`
1027 // NullFields is a list of field names (e.g. "CreateField") to include in API
1028 // requests with the JSON null value. By default, fields with empty values are
1029 // omitted from API requests. See
1030 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1031 NullFields []string `json:"-"`
1032 }
1033
1034 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse) MarshalJSON() ([]byte, error) {
1035 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseResponse
1036 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1037 }
1038
1039 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldPropertiesRespo
1040 // nse: Response following update to field properties.
1041 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldPropertiesResponse struct {
1042 // Priority: The priority of the updated field. The priority may change from
1043 // what was specified to assure contiguous priorities between fields (1-n).
1044 Priority int64 `json:"priority,omitempty"`
1045 // ForceSendFields is a list of field names (e.g. "Priority") to
1046 // unconditionally include in API requests. By default, fields with empty or
1047 // default values are omitted from API requests. See
1048 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1049 // details.
1050 ForceSendFields []string `json:"-"`
1051 // NullFields is a list of field names (e.g. "Priority") to include in API
1052 // requests with the JSON null value. By default, fields with empty values are
1053 // omitted from API requests. See
1054 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1055 NullFields []string `json:"-"`
1056 }
1057
1058 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldPropertiesResponse) MarshalJSON() ([]byte, error) {
1059 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldPropertiesResponse
1060 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1061 }
1062
1063 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldTypeResponse:
1064 // Response following update to field type.
1065 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateFieldTypeResponse struct {
1066 }
1067
1068 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateLabelPropertiesRespo
1069 // nse: Response following update to label properties.
1070 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateLabelPropertiesResponse struct {
1071 }
1072
1073 // GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoicePrope
1074 // rtiesResponse: Response following update to selection choice properties.
1075 type GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse struct {
1076 // Priority: The priority of the updated choice. The priority may change from
1077 // what was specified to assure contiguous priorities between choices (1-n).
1078 Priority int64 `json:"priority,omitempty"`
1079 // ForceSendFields is a list of field names (e.g. "Priority") to
1080 // unconditionally include in API requests. By default, fields with empty or
1081 // default values are omitted from API requests. See
1082 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1083 // details.
1084 ForceSendFields []string `json:"-"`
1085 // NullFields is a list of field names (e.g. "Priority") to include in API
1086 // requests with the JSON null value. By default, fields with empty values are
1087 // omitted from API requests. See
1088 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1089 NullFields []string `json:"-"`
1090 }
1091
1092 func (s GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse) MarshalJSON() ([]byte, error) {
1093 type NoMethod GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponseUpdateSelectionChoicePropertiesResponse
1094 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1095 }
1096
1097 // GoogleAppsDriveLabelsV2betaDisableLabelRequest: Request to deprecate a
1098 // published label.
1099 type GoogleAppsDriveLabelsV2betaDisableLabelRequest struct {
1100 // DisabledPolicy: Disabled policy to use.
1101 DisabledPolicy *GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy `json:"disabledPolicy,omitempty"`
1102 // LanguageCode: The BCP-47 language code to use for evaluating localized field
1103 // labels. When not specified, values in the default configured language will
1104 // be used.
1105 LanguageCode string `json:"languageCode,omitempty"`
1106 // UpdateMask: The fields that should be updated. At least one field must be
1107 // specified. The root `disabled_policy` is implied and should not be
1108 // specified. A single `*` can be used as a short-hand for updating every
1109 // field.
1110 UpdateMask string `json:"updateMask,omitempty"`
1111 // UseAdminAccess: Set to `true` in order to use the user's admin credentials.
1112 // The server will verify the user is an admin for the label before allowing
1113 // access.
1114 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
1115 // WriteControl: Provides control over how write requests are executed.
1116 // Defaults to unset, which means the last write wins.
1117 WriteControl *GoogleAppsDriveLabelsV2betaWriteControl `json:"writeControl,omitempty"`
1118 // ForceSendFields is a list of field names (e.g. "DisabledPolicy") to
1119 // unconditionally include in API requests. By default, fields with empty or
1120 // default values are omitted from API requests. See
1121 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1122 // details.
1123 ForceSendFields []string `json:"-"`
1124 // NullFields is a list of field names (e.g. "DisabledPolicy") to include in
1125 // API requests with the JSON null value. By default, fields with empty values
1126 // are omitted from API requests. See
1127 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1128 NullFields []string `json:"-"`
1129 }
1130
1131 func (s GoogleAppsDriveLabelsV2betaDisableLabelRequest) MarshalJSON() ([]byte, error) {
1132 type NoMethod GoogleAppsDriveLabelsV2betaDisableLabelRequest
1133 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1134 }
1135
1136 // GoogleAppsDriveLabelsV2betaEnableLabelRequest: Request to enable a label.
1137 type GoogleAppsDriveLabelsV2betaEnableLabelRequest struct {
1138 // LanguageCode: The BCP-47 language code to use for evaluating localized field
1139 // labels. When not specified, values in the default configured language will
1140 // be used.
1141 LanguageCode string `json:"languageCode,omitempty"`
1142 // UseAdminAccess: Set to `true` in order to use the user's admin credentials.
1143 // The server will verify the user is an admin for the label before allowing
1144 // access.
1145 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
1146 // WriteControl: Provides control over how write requests are executed.
1147 // Defaults to unset, which means the last write wins.
1148 WriteControl *GoogleAppsDriveLabelsV2betaWriteControl `json:"writeControl,omitempty"`
1149 // ForceSendFields is a list of field names (e.g. "LanguageCode") to
1150 // unconditionally include in API requests. By default, fields with empty or
1151 // default values are omitted from API requests. See
1152 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1153 // details.
1154 ForceSendFields []string `json:"-"`
1155 // NullFields is a list of field names (e.g. "LanguageCode") to include in API
1156 // requests with the JSON null value. By default, fields with empty values are
1157 // omitted from API requests. See
1158 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1159 NullFields []string `json:"-"`
1160 }
1161
1162 func (s GoogleAppsDriveLabelsV2betaEnableLabelRequest) MarshalJSON() ([]byte, error) {
1163 type NoMethod GoogleAppsDriveLabelsV2betaEnableLabelRequest
1164 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1165 }
1166
1167 // GoogleAppsDriveLabelsV2betaField: Defines a field that has a display name,
1168 // data type, and other configuration options. This field defines the kind of
1169 // metadata that may be set on a Drive item.
1170 type GoogleAppsDriveLabelsV2betaField struct {
1171 // AppliedCapabilities: Output only. The capabilities this user has on this
1172 // field and its value when the label is applied on Drive items.
1173 AppliedCapabilities *GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities `json:"appliedCapabilities,omitempty"`
1174 // CreateTime: Output only. The time this field was created.
1175 CreateTime string `json:"createTime,omitempty"`
1176 // Creator: Output only. The user who created this field.
1177 Creator *GoogleAppsDriveLabelsV2betaUserInfo `json:"creator,omitempty"`
1178 // DateOptions: Date field options.
1179 DateOptions *GoogleAppsDriveLabelsV2betaFieldDateOptions `json:"dateOptions,omitempty"`
1180 // DisableTime: Output only. The time this field was disabled. This value has
1181 // no meaning when the field is not disabled.
1182 DisableTime string `json:"disableTime,omitempty"`
1183 // Disabler: Output only. The user who disabled this field. This value has no
1184 // meaning when the field is not disabled.
1185 Disabler *GoogleAppsDriveLabelsV2betaUserInfo `json:"disabler,omitempty"`
1186 // DisplayHints: Output only. UI display hints for rendering a field.
1187 DisplayHints *GoogleAppsDriveLabelsV2betaFieldDisplayHints `json:"displayHints,omitempty"`
1188 // Id: Output only. The key of a field, unique within a label or library. This
1189 // value is autogenerated. Matches the regex: `([a-zA-Z0-9])+`.
1190 Id string `json:"id,omitempty"`
1191 // IntegerOptions: Integer field options.
1192 IntegerOptions *GoogleAppsDriveLabelsV2betaFieldIntegerOptions `json:"integerOptions,omitempty"`
1193 // Lifecycle: Output only. The lifecycle of this field.
1194 Lifecycle *GoogleAppsDriveLabelsV2betaLifecycle `json:"lifecycle,omitempty"`
1195 // LockStatus: Output only. The `LockStatus` of this field.
1196 LockStatus *GoogleAppsDriveLabelsV2betaLockStatus `json:"lockStatus,omitempty"`
1197 // Properties: The basic properties of the field.
1198 Properties *GoogleAppsDriveLabelsV2betaFieldProperties `json:"properties,omitempty"`
1199 // Publisher: Output only. The user who published this field. This value has no
1200 // meaning when the field is not published.
1201 Publisher *GoogleAppsDriveLabelsV2betaUserInfo `json:"publisher,omitempty"`
1202 // QueryKey: Output only. The key to use when constructing Drive search queries
1203 // to find files based on values defined for this field on files. For example,
1204 // "{query_key}` > 2001-01-01".
1205 QueryKey string `json:"queryKey,omitempty"`
1206 // SchemaCapabilities: Output only. The capabilities this user has when editing
1207 // this field.
1208 SchemaCapabilities *GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities `json:"schemaCapabilities,omitempty"`
1209 // SelectionOptions: Selection field options.
1210 SelectionOptions *GoogleAppsDriveLabelsV2betaFieldSelectionOptions `json:"selectionOptions,omitempty"`
1211 // TextOptions: Text field options.
1212 TextOptions *GoogleAppsDriveLabelsV2betaFieldTextOptions `json:"textOptions,omitempty"`
1213 // UpdateTime: Output only. The time this field was updated.
1214 UpdateTime string `json:"updateTime,omitempty"`
1215 // Updater: Output only. The user who modified this field.
1216 Updater *GoogleAppsDriveLabelsV2betaUserInfo `json:"updater,omitempty"`
1217 // UserOptions: User field options.
1218 UserOptions *GoogleAppsDriveLabelsV2betaFieldUserOptions `json:"userOptions,omitempty"`
1219 // ForceSendFields is a list of field names (e.g. "AppliedCapabilities") to
1220 // unconditionally include in API requests. By default, fields with empty or
1221 // default values are omitted from API requests. See
1222 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1223 // details.
1224 ForceSendFields []string `json:"-"`
1225 // NullFields is a list of field names (e.g. "AppliedCapabilities") to include
1226 // in API requests with the JSON null value. By default, fields with empty
1227 // values are omitted from API requests. See
1228 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1229 NullFields []string `json:"-"`
1230 }
1231
1232 func (s GoogleAppsDriveLabelsV2betaField) MarshalJSON() ([]byte, error) {
1233 type NoMethod GoogleAppsDriveLabelsV2betaField
1234 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1235 }
1236
1237 // GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities: The capabilities
1238 // related to this field on applied metadata.
1239 type GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities struct {
1240 // CanRead: Whether the user can read related applied metadata on items.
1241 CanRead bool `json:"canRead,omitempty"`
1242 // CanSearch: Whether the user can search for Drive items referencing this
1243 // field.
1244 CanSearch bool `json:"canSearch,omitempty"`
1245 // CanWrite: Whether the user can set this field on Drive items.
1246 CanWrite bool `json:"canWrite,omitempty"`
1247 // ForceSendFields is a list of field names (e.g. "CanRead") to unconditionally
1248 // include in API requests. By default, fields with empty or default values are
1249 // omitted from API requests. See
1250 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1251 // details.
1252 ForceSendFields []string `json:"-"`
1253 // NullFields is a list of field names (e.g. "CanRead") to include in API
1254 // requests with the JSON null value. By default, fields with empty values are
1255 // omitted from API requests. See
1256 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1257 NullFields []string `json:"-"`
1258 }
1259
1260 func (s GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities) MarshalJSON() ([]byte, error) {
1261 type NoMethod GoogleAppsDriveLabelsV2betaFieldAppliedCapabilities
1262 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1263 }
1264
1265 // GoogleAppsDriveLabelsV2betaFieldDateOptions: Options for the date field
1266 // type.
1267 type GoogleAppsDriveLabelsV2betaFieldDateOptions struct {
1268 // DateFormat: Output only. ICU date format.
1269 DateFormat string `json:"dateFormat,omitempty"`
1270 // DateFormatType: Localized date formatting option. Field values are rendered
1271 // in this format according to their locale.
1272 //
1273 // Possible values:
1274 // "DATE_FORMAT_UNSPECIFIED" - Date format unspecified.
1275 // "LONG_DATE" - Includes full month name. For example, January 12, 1999
1276 // (MMMM d, y)
1277 // "SHORT_DATE" - Short, numeric, representation. For example, 12/13/99
1278 // (M/d/yy)
1279 DateFormatType string `json:"dateFormatType,omitempty"`
1280 // MaxValue: Output only. Maximum valid value (year, month, day).
1281 MaxValue *GoogleTypeDate `json:"maxValue,omitempty"`
1282 // MinValue: Output only. Minimum valid value (year, month, day).
1283 MinValue *GoogleTypeDate `json:"minValue,omitempty"`
1284 // ForceSendFields is a list of field names (e.g. "DateFormat") to
1285 // unconditionally include in API requests. By default, fields with empty or
1286 // default values are omitted from API requests. See
1287 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1288 // details.
1289 ForceSendFields []string `json:"-"`
1290 // NullFields is a list of field names (e.g. "DateFormat") to include in API
1291 // requests with the JSON null value. By default, fields with empty values are
1292 // omitted from API requests. See
1293 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1294 NullFields []string `json:"-"`
1295 }
1296
1297 func (s GoogleAppsDriveLabelsV2betaFieldDateOptions) MarshalJSON() ([]byte, error) {
1298 type NoMethod GoogleAppsDriveLabelsV2betaFieldDateOptions
1299 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1300 }
1301
1302 // GoogleAppsDriveLabelsV2betaFieldDisplayHints: UI display hints for rendering
1303 // a field.
1304 type GoogleAppsDriveLabelsV2betaFieldDisplayHints struct {
1305 // Disabled: Whether the field should be shown in the UI as disabled.
1306 Disabled bool `json:"disabled,omitempty"`
1307 // HiddenInSearch: This field should be hidden in the search menu when
1308 // searching for Drive items.
1309 HiddenInSearch bool `json:"hiddenInSearch,omitempty"`
1310 // Required: Whether the field should be shown as required in the UI.
1311 Required bool `json:"required,omitempty"`
1312 // ShownInApply: This field should be shown in the apply menu when applying
1313 // values to a Drive item.
1314 ShownInApply bool `json:"shownInApply,omitempty"`
1315 // ForceSendFields is a list of field names (e.g. "Disabled") to
1316 // unconditionally include in API requests. By default, fields with empty or
1317 // default values are omitted from API requests. See
1318 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1319 // details.
1320 ForceSendFields []string `json:"-"`
1321 // NullFields is a list of field names (e.g. "Disabled") to include in API
1322 // requests with the JSON null value. By default, fields with empty values are
1323 // omitted from API requests. See
1324 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1325 NullFields []string `json:"-"`
1326 }
1327
1328 func (s GoogleAppsDriveLabelsV2betaFieldDisplayHints) MarshalJSON() ([]byte, error) {
1329 type NoMethod GoogleAppsDriveLabelsV2betaFieldDisplayHints
1330 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1331 }
1332
1333 // GoogleAppsDriveLabelsV2betaFieldIntegerOptions: Options for the Integer
1334 // field type.
1335 type GoogleAppsDriveLabelsV2betaFieldIntegerOptions struct {
1336 // MaxValue: Output only. The maximum valid value for the integer field.
1337 MaxValue int64 `json:"maxValue,omitempty,string"`
1338 // MinValue: Output only. The minimum valid value for the integer field.
1339 MinValue int64 `json:"minValue,omitempty,string"`
1340 // ForceSendFields is a list of field names (e.g. "MaxValue") to
1341 // unconditionally include in API requests. By default, fields with empty or
1342 // default values are omitted from API requests. See
1343 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1344 // details.
1345 ForceSendFields []string `json:"-"`
1346 // NullFields is a list of field names (e.g. "MaxValue") to include in API
1347 // requests with the JSON null value. By default, fields with empty values are
1348 // omitted from API requests. See
1349 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1350 NullFields []string `json:"-"`
1351 }
1352
1353 func (s GoogleAppsDriveLabelsV2betaFieldIntegerOptions) MarshalJSON() ([]byte, error) {
1354 type NoMethod GoogleAppsDriveLabelsV2betaFieldIntegerOptions
1355 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1356 }
1357
1358 // GoogleAppsDriveLabelsV2betaFieldLimits: Field constants governing the
1359 // structure of a field; such as, the maximum title length, minimum and maximum
1360 // field values or length, etc.
1361 type GoogleAppsDriveLabelsV2betaFieldLimits struct {
1362 // DateLimits: Date field limits.
1363 DateLimits *GoogleAppsDriveLabelsV2betaDateLimits `json:"dateLimits,omitempty"`
1364 // IntegerLimits: Integer field limits.
1365 IntegerLimits *GoogleAppsDriveLabelsV2betaIntegerLimits `json:"integerLimits,omitempty"`
1366 // LongTextLimits: Long text field limits.
1367 LongTextLimits *GoogleAppsDriveLabelsV2betaLongTextLimits `json:"longTextLimits,omitempty"`
1368 // MaxDescriptionLength: Limits for field description, also called help text.
1369 MaxDescriptionLength int64 `json:"maxDescriptionLength,omitempty"`
1370 // MaxDisplayNameLength: Limits for field title.
1371 MaxDisplayNameLength int64 `json:"maxDisplayNameLength,omitempty"`
1372 // MaxIdLength: Maximum length for the id.
1373 MaxIdLength int64 `json:"maxIdLength,omitempty"`
1374 // SelectionLimits: Selection field limits.
1375 SelectionLimits *GoogleAppsDriveLabelsV2betaSelectionLimits `json:"selectionLimits,omitempty"`
1376 // TextLimits: The relevant limits for the specified Field.Type. Text field
1377 // limits.
1378 TextLimits *GoogleAppsDriveLabelsV2betaTextLimits `json:"textLimits,omitempty"`
1379 // UserLimits: User field limits.
1380 UserLimits *GoogleAppsDriveLabelsV2betaUserLimits `json:"userLimits,omitempty"`
1381 // ForceSendFields is a list of field names (e.g. "DateLimits") to
1382 // unconditionally include in API requests. By default, fields with empty or
1383 // default values are omitted from API requests. See
1384 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1385 // details.
1386 ForceSendFields []string `json:"-"`
1387 // NullFields is a list of field names (e.g. "DateLimits") to include in API
1388 // requests with the JSON null value. By default, fields with empty values are
1389 // omitted from API requests. See
1390 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1391 NullFields []string `json:"-"`
1392 }
1393
1394 func (s GoogleAppsDriveLabelsV2betaFieldLimits) MarshalJSON() ([]byte, error) {
1395 type NoMethod GoogleAppsDriveLabelsV2betaFieldLimits
1396 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1397 }
1398
1399 // GoogleAppsDriveLabelsV2betaFieldListOptions: Options for a multi-valued
1400 // variant of an associated field type.
1401 type GoogleAppsDriveLabelsV2betaFieldListOptions struct {
1402 // MaxEntries: Maximum number of entries permitted.
1403 MaxEntries int64 `json:"maxEntries,omitempty"`
1404 // ForceSendFields is a list of field names (e.g. "MaxEntries") to
1405 // unconditionally include in API requests. By default, fields with empty or
1406 // default values are omitted from API requests. See
1407 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1408 // details.
1409 ForceSendFields []string `json:"-"`
1410 // NullFields is a list of field names (e.g. "MaxEntries") to include in API
1411 // requests with the JSON null value. By default, fields with empty values are
1412 // omitted from API requests. See
1413 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1414 NullFields []string `json:"-"`
1415 }
1416
1417 func (s GoogleAppsDriveLabelsV2betaFieldListOptions) MarshalJSON() ([]byte, error) {
1418 type NoMethod GoogleAppsDriveLabelsV2betaFieldListOptions
1419 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1420 }
1421
1422 // GoogleAppsDriveLabelsV2betaFieldProperties: The basic properties of the
1423 // field.
1424 type GoogleAppsDriveLabelsV2betaFieldProperties struct {
1425 // DisplayName: Required. The display text to show in the UI identifying this
1426 // field.
1427 DisplayName string `json:"displayName,omitempty"`
1428 // InsertBeforeField: Input only. Insert or move this field before the
1429 // indicated field. If empty, the field is placed at the end of the list.
1430 InsertBeforeField string `json:"insertBeforeField,omitempty"`
1431 // Required: Whether the field should be marked as required.
1432 Required bool `json:"required,omitempty"`
1433 // ForceSendFields is a list of field names (e.g. "DisplayName") to
1434 // unconditionally include in API requests. By default, fields with empty or
1435 // default values are omitted from API requests. See
1436 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1437 // details.
1438 ForceSendFields []string `json:"-"`
1439 // NullFields is a list of field names (e.g. "DisplayName") to include in API
1440 // requests with the JSON null value. By default, fields with empty values are
1441 // omitted from API requests. See
1442 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1443 NullFields []string `json:"-"`
1444 }
1445
1446 func (s GoogleAppsDriveLabelsV2betaFieldProperties) MarshalJSON() ([]byte, error) {
1447 type NoMethod GoogleAppsDriveLabelsV2betaFieldProperties
1448 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1449 }
1450
1451 // GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities: The capabilities related
1452 // to this field when editing the field.
1453 type GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities struct {
1454 // CanDelete: Whether the user can delete this field. The user must have
1455 // permission and the field must be deprecated.
1456 CanDelete bool `json:"canDelete,omitempty"`
1457 // CanDisable: Whether the user can disable this field. The user must have
1458 // permission and this field must not already be disabled.
1459 CanDisable bool `json:"canDisable,omitempty"`
1460 // CanEnable: Whether the user can enable this field. The user must have
1461 // permission and this field must be disabled.
1462 CanEnable bool `json:"canEnable,omitempty"`
1463 // CanUpdate: Whether the user can change this field.
1464 CanUpdate bool `json:"canUpdate,omitempty"`
1465 // ForceSendFields is a list of field names (e.g. "CanDelete") to
1466 // unconditionally include in API requests. By default, fields with empty or
1467 // default values are omitted from API requests. See
1468 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1469 // details.
1470 ForceSendFields []string `json:"-"`
1471 // NullFields is a list of field names (e.g. "CanDelete") to include in API
1472 // requests with the JSON null value. By default, fields with empty values are
1473 // omitted from API requests. See
1474 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1475 NullFields []string `json:"-"`
1476 }
1477
1478 func (s GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities) MarshalJSON() ([]byte, error) {
1479 type NoMethod GoogleAppsDriveLabelsV2betaFieldSchemaCapabilities
1480 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1481 }
1482
1483 // GoogleAppsDriveLabelsV2betaFieldSelectionOptions: Options for the selection
1484 // field type.
1485 type GoogleAppsDriveLabelsV2betaFieldSelectionOptions struct {
1486 // Choices: The options available for this selection field. The list order is
1487 // consistent, and modified with `insert_before_choice`.
1488 Choices []*GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice `json:"choices,omitempty"`
1489 // ListOptions: When specified, indicates this field supports a list of values.
1490 // Once the field is published, this cannot be changed.
1491 ListOptions *GoogleAppsDriveLabelsV2betaFieldListOptions `json:"listOptions,omitempty"`
1492 // ForceSendFields is a list of field names (e.g. "Choices") to unconditionally
1493 // include in API requests. By default, fields with empty or default values are
1494 // omitted from API requests. See
1495 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1496 // details.
1497 ForceSendFields []string `json:"-"`
1498 // NullFields is a list of field names (e.g. "Choices") to include in API
1499 // requests with the JSON null value. By default, fields with empty values are
1500 // omitted from API requests. See
1501 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1502 NullFields []string `json:"-"`
1503 }
1504
1505 func (s GoogleAppsDriveLabelsV2betaFieldSelectionOptions) MarshalJSON() ([]byte, error) {
1506 type NoMethod GoogleAppsDriveLabelsV2betaFieldSelectionOptions
1507 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1508 }
1509
1510 // GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice: Selection field
1511 // choice.
1512 type GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice struct {
1513 // AppliedCapabilities: Output only. The capabilities related to this choice on
1514 // applied metadata.
1515 AppliedCapabilities *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilities `json:"appliedCapabilities,omitempty"`
1516 // CreateTime: Output only. The time this choice was created.
1517 CreateTime string `json:"createTime,omitempty"`
1518 // Creator: Output only. The user who created this choice.
1519 Creator *GoogleAppsDriveLabelsV2betaUserInfo `json:"creator,omitempty"`
1520 // DisableTime: Output only. The time this choice was disabled. This value has
1521 // no meaning when the choice is not disabled.
1522 DisableTime string `json:"disableTime,omitempty"`
1523 // Disabler: Output only. The user who disabled this choice. This value has no
1524 // meaning when the option is not disabled.
1525 Disabler *GoogleAppsDriveLabelsV2betaUserInfo `json:"disabler,omitempty"`
1526 // DisplayHints: Output only. UI display hints for rendering a choice.
1527 DisplayHints *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints `json:"displayHints,omitempty"`
1528 // Id: The unique value of the choice. This ID is autogenerated. Matches the
1529 // regex: `([a-zA-Z0-9_])+`.
1530 Id string `json:"id,omitempty"`
1531 // Lifecycle: Output only. Lifecycle of the choice.
1532 Lifecycle *GoogleAppsDriveLabelsV2betaLifecycle `json:"lifecycle,omitempty"`
1533 // LockStatus: Output only. The `LockStatus` of this choice.
1534 LockStatus *GoogleAppsDriveLabelsV2betaLockStatus `json:"lockStatus,omitempty"`
1535 // Properties: Basic properties of the choice.
1536 Properties *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties `json:"properties,omitempty"`
1537 // PublishTime: Output only. The time this choice was published. This value has
1538 // no meaning when the choice is not published.
1539 PublishTime string `json:"publishTime,omitempty"`
1540 // Publisher: Output only. The user who published this choice. This value has
1541 // no meaning when the choice is not published.
1542 Publisher *GoogleAppsDriveLabelsV2betaUserInfo `json:"publisher,omitempty"`
1543 // SchemaCapabilities: Output only. The capabilities related to this option
1544 // when editing the option.
1545 SchemaCapabilities *GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabilities `json:"schemaCapabilities,omitempty"`
1546 // UpdateTime: Output only. The time this choice was updated last.
1547 UpdateTime string `json:"updateTime,omitempty"`
1548 // Updater: Output only. The user who updated this choice last.
1549 Updater *GoogleAppsDriveLabelsV2betaUserInfo `json:"updater,omitempty"`
1550 // ForceSendFields is a list of field names (e.g. "AppliedCapabilities") to
1551 // unconditionally include in API requests. By default, fields with empty or
1552 // default values are omitted from API requests. See
1553 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1554 // details.
1555 ForceSendFields []string `json:"-"`
1556 // NullFields is a list of field names (e.g. "AppliedCapabilities") to include
1557 // in API requests with the JSON null value. By default, fields with empty
1558 // values are omitted from API requests. See
1559 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1560 NullFields []string `json:"-"`
1561 }
1562
1563 func (s GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice) MarshalJSON() ([]byte, error) {
1564 type NoMethod GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoice
1565 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1566 }
1567
1568 // GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilities:
1569 // The capabilities related to this choice on applied metadata.
1570 type GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilities struct {
1571 // CanRead: Whether the user can read related applied metadata on items.
1572 CanRead bool `json:"canRead,omitempty"`
1573 // CanSearch: Whether the user can use this choice in search queries.
1574 CanSearch bool `json:"canSearch,omitempty"`
1575 // CanSelect: Whether the user can select this choice on an item.
1576 CanSelect bool `json:"canSelect,omitempty"`
1577 // ForceSendFields is a list of field names (e.g. "CanRead") to unconditionally
1578 // include in API requests. By default, fields with empty or default values are
1579 // omitted from API requests. See
1580 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1581 // details.
1582 ForceSendFields []string `json:"-"`
1583 // NullFields is a list of field names (e.g. "CanRead") to include in API
1584 // requests with the JSON null value. By default, fields with empty values are
1585 // omitted from API requests. See
1586 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1587 NullFields []string `json:"-"`
1588 }
1589
1590 func (s GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilities) MarshalJSON() ([]byte, error) {
1591 type NoMethod GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceAppliedCapabilities
1592 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1593 }
1594
1595 // GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints: UI
1596 // display hints for rendering an option.
1597 type GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints struct {
1598 // BadgeColors: The colors to use for the badge. Changed to Google Material
1599 // colors based on the chosen `properties.badge_config.color`.
1600 BadgeColors *GoogleAppsDriveLabelsV2betaBadgeColors `json:"badgeColors,omitempty"`
1601 // BadgePriority: The priority of this badge. Used to compare and sort between
1602 // multiple badges. A lower number means the badge should be shown first. When
1603 // a badging configuration is not present, this will be 0. Otherwise, this will
1604 // be set to `BadgeConfig.priority_override` or the default heuristic which
1605 // prefers creation date of the label, and field and option priority.
1606 BadgePriority int64 `json:"badgePriority,omitempty,string"`
1607 // DarkBadgeColors: The dark-mode color to use for the badge. Changed to Google
1608 // Material colors based on the chosen `properties.badge_config.color`.
1609 DarkBadgeColors *GoogleAppsDriveLabelsV2betaBadgeColors `json:"darkBadgeColors,omitempty"`
1610 // Disabled: Whether the option should be shown in the UI as disabled.
1611 Disabled bool `json:"disabled,omitempty"`
1612 // HiddenInSearch: This option should be hidden in the search menu when
1613 // searching for Drive items.
1614 HiddenInSearch bool `json:"hiddenInSearch,omitempty"`
1615 // ShownInApply: This option should be shown in the apply menu when applying
1616 // values to a Drive item.
1617 ShownInApply bool `json:"shownInApply,omitempty"`
1618 // ForceSendFields is a list of field names (e.g. "BadgeColors") to
1619 // unconditionally include in API requests. By default, fields with empty or
1620 // default values are omitted from API requests. See
1621 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1622 // details.
1623 ForceSendFields []string `json:"-"`
1624 // NullFields is a list of field names (e.g. "BadgeColors") to include in API
1625 // requests with the JSON null value. By default, fields with empty values are
1626 // omitted from API requests. See
1627 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1628 NullFields []string `json:"-"`
1629 }
1630
1631 func (s GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints) MarshalJSON() ([]byte, error) {
1632 type NoMethod GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceDisplayHints
1633 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1634 }
1635
1636 // GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties: Basic
1637 // properties of the choice.
1638 type GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties struct {
1639 // BadgeConfig: The badge configuration for this choice. When set, the label
1640 // that owns this choice is considered a "badged label".
1641 BadgeConfig *GoogleAppsDriveLabelsV2betaBadgeConfig `json:"badgeConfig,omitempty"`
1642 // Description: The description of this label.
1643 Description string `json:"description,omitempty"`
1644 // DisplayName: Required. The display text to show in the UI identifying this
1645 // field.
1646 DisplayName string `json:"displayName,omitempty"`
1647 // InsertBeforeChoice: Input only. Insert or move this choice before the
1648 // indicated choice. If empty, the choice is placed at the end of the list.
1649 InsertBeforeChoice string `json:"insertBeforeChoice,omitempty"`
1650 // ForceSendFields is a list of field names (e.g. "BadgeConfig") to
1651 // unconditionally include in API requests. By default, fields with empty or
1652 // default values are omitted from API requests. See
1653 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1654 // details.
1655 ForceSendFields []string `json:"-"`
1656 // NullFields is a list of field names (e.g. "BadgeConfig") to include in API
1657 // requests with the JSON null value. By default, fields with empty values are
1658 // omitted from API requests. See
1659 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1660 NullFields []string `json:"-"`
1661 }
1662
1663 func (s GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties) MarshalJSON() ([]byte, error) {
1664 type NoMethod GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceProperties
1665 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1666 }
1667
1668 // GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabilities:
1669 // The capabilities related to this choice when editing the choice.
1670 type GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabilities struct {
1671 // CanDelete: Whether the user can delete this choice.
1672 CanDelete bool `json:"canDelete,omitempty"`
1673 // CanDisable: Whether the user can disable this choice.
1674 CanDisable bool `json:"canDisable,omitempty"`
1675 // CanEnable: Whether the user can enable this choice.
1676 CanEnable bool `json:"canEnable,omitempty"`
1677 // CanUpdate: Whether the user can update this choice.
1678 CanUpdate bool `json:"canUpdate,omitempty"`
1679 // ForceSendFields is a list of field names (e.g. "CanDelete") to
1680 // unconditionally include in API requests. By default, fields with empty or
1681 // default values are omitted from API requests. See
1682 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1683 // details.
1684 ForceSendFields []string `json:"-"`
1685 // NullFields is a list of field names (e.g. "CanDelete") to include in API
1686 // requests with the JSON null value. By default, fields with empty values are
1687 // omitted from API requests. See
1688 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1689 NullFields []string `json:"-"`
1690 }
1691
1692 func (s GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabilities) MarshalJSON() ([]byte, error) {
1693 type NoMethod GoogleAppsDriveLabelsV2betaFieldSelectionOptionsChoiceSchemaCapabilities
1694 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1695 }
1696
1697 // GoogleAppsDriveLabelsV2betaFieldTextOptions: Options for the Text field
1698 // type.
1699 type GoogleAppsDriveLabelsV2betaFieldTextOptions struct {
1700 // MaxLength: Output only. The maximum valid length of values for the text
1701 // field.
1702 MaxLength int64 `json:"maxLength,omitempty"`
1703 // MinLength: Output only. The minimum valid length of values for the text
1704 // field.
1705 MinLength int64 `json:"minLength,omitempty"`
1706 // ForceSendFields is a list of field names (e.g. "MaxLength") to
1707 // unconditionally include in API requests. By default, fields with empty or
1708 // default values are omitted from API requests. See
1709 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1710 // details.
1711 ForceSendFields []string `json:"-"`
1712 // NullFields is a list of field names (e.g. "MaxLength") to include in API
1713 // requests with the JSON null value. By default, fields with empty values are
1714 // omitted from API requests. See
1715 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1716 NullFields []string `json:"-"`
1717 }
1718
1719 func (s GoogleAppsDriveLabelsV2betaFieldTextOptions) MarshalJSON() ([]byte, error) {
1720 type NoMethod GoogleAppsDriveLabelsV2betaFieldTextOptions
1721 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1722 }
1723
1724 // GoogleAppsDriveLabelsV2betaFieldUserOptions: Options for the user field
1725 // type.
1726 type GoogleAppsDriveLabelsV2betaFieldUserOptions struct {
1727 // ListOptions: When specified, indicates that this field supports a list of
1728 // values. Once the field is published, this cannot be changed.
1729 ListOptions *GoogleAppsDriveLabelsV2betaFieldListOptions `json:"listOptions,omitempty"`
1730 // ForceSendFields is a list of field names (e.g. "ListOptions") to
1731 // unconditionally include in API requests. By default, fields with empty or
1732 // default values are omitted from API requests. See
1733 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1734 // details.
1735 ForceSendFields []string `json:"-"`
1736 // NullFields is a list of field names (e.g. "ListOptions") to include in API
1737 // requests with the JSON null value. By default, fields with empty values are
1738 // omitted from API requests. See
1739 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1740 NullFields []string `json:"-"`
1741 }
1742
1743 func (s GoogleAppsDriveLabelsV2betaFieldUserOptions) MarshalJSON() ([]byte, error) {
1744 type NoMethod GoogleAppsDriveLabelsV2betaFieldUserOptions
1745 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1746 }
1747
1748 // GoogleAppsDriveLabelsV2betaIntegerLimits: Limits for integer field type.
1749 type GoogleAppsDriveLabelsV2betaIntegerLimits struct {
1750 // MaxValue: Maximum value for an integer field type.
1751 MaxValue int64 `json:"maxValue,omitempty,string"`
1752 // MinValue: Minimum value for an integer field type.
1753 MinValue int64 `json:"minValue,omitempty,string"`
1754 // ForceSendFields is a list of field names (e.g. "MaxValue") to
1755 // unconditionally include in API requests. By default, fields with empty or
1756 // default values are omitted from API requests. See
1757 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1758 // details.
1759 ForceSendFields []string `json:"-"`
1760 // NullFields is a list of field names (e.g. "MaxValue") to include in API
1761 // requests with the JSON null value. By default, fields with empty values are
1762 // omitted from API requests. See
1763 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1764 NullFields []string `json:"-"`
1765 }
1766
1767 func (s GoogleAppsDriveLabelsV2betaIntegerLimits) MarshalJSON() ([]byte, error) {
1768 type NoMethod GoogleAppsDriveLabelsV2betaIntegerLimits
1769 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1770 }
1771
1772 // GoogleAppsDriveLabelsV2betaLabel: A label defines a taxonomy that can be
1773 // applied to Drive items in order to organize and search across items. Labels
1774 // can be simple strings, or can contain fields that describe additional
1775 // metadata that can be further used to organize and search Drive items.
1776 type GoogleAppsDriveLabelsV2betaLabel struct {
1777 // AppliedCapabilities: Output only. The capabilities related to this label on
1778 // applied metadata.
1779 AppliedCapabilities *GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities `json:"appliedCapabilities,omitempty"`
1780 // AppliedLabelPolicy: Output only. Behavior of this label when it's applied to
1781 // Drive items.
1782 AppliedLabelPolicy *GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy `json:"appliedLabelPolicy,omitempty"`
1783 // CreateTime: Output only. The time this label was created.
1784 CreateTime string `json:"createTime,omitempty"`
1785 // Creator: Output only. The user who created this label.
1786 Creator *GoogleAppsDriveLabelsV2betaUserInfo `json:"creator,omitempty"`
1787 // Customer: Output only. The customer this label belongs to. For example:
1788 // `customers/123abc789`.
1789 Customer string `json:"customer,omitempty"`
1790 // DisableTime: Output only. The time this label was disabled. This value has
1791 // no meaning when the label isn't disabled.
1792 DisableTime string `json:"disableTime,omitempty"`
1793 // Disabler: Output only. The user who disabled this label. This value has no
1794 // meaning when the label isn't disabled.
1795 Disabler *GoogleAppsDriveLabelsV2betaUserInfo `json:"disabler,omitempty"`
1796 // DisplayHints: Output only. UI display hints for rendering the label.
1797 DisplayHints *GoogleAppsDriveLabelsV2betaLabelDisplayHints `json:"displayHints,omitempty"`
1798 // EnabledAppSettings: Optional. The `EnabledAppSettings` for this Label.
1799 EnabledAppSettings *GoogleAppsDriveLabelsV2betaLabelEnabledAppSettings `json:"enabledAppSettings,omitempty"`
1800 // Fields: List of fields in descending priority order.
1801 Fields []*GoogleAppsDriveLabelsV2betaField `json:"fields,omitempty"`
1802 // Id: Output only. Globally unique identifier of this label. ID makes up part
1803 // of the label `name`, but unlike `name`, ID is consistent between revisions.
1804 // Matches the regex: `([a-zA-Z0-9])+`.
1805 Id string `json:"id,omitempty"`
1806 // LabelType: Required. The type of label.
1807 //
1808 // Possible values:
1809 // "LABEL_TYPE_UNSPECIFIED" - Unknown label type.
1810 // "SHARED" - Shared labels may be shared with users to apply to Drive items.
1811 // "ADMIN" - Admin-owned label. Only creatable and editable by admins.
1812 // Supports some additional admin-only features.
1813 // "GOOGLE_APP" - A label owned by an internal Google application rather than
1814 // a customer. These labels are read-only.
1815 LabelType string `json:"labelType,omitempty"`
1816 // LearnMoreUri: Custom URL to present to users to allow them to learn more
1817 // about this label and how it should be used.
1818 LearnMoreUri string `json:"learnMoreUri,omitempty"`
1819 // Lifecycle: Output only. The lifecycle state of the label including whether
1820 // it's published, deprecated, and has draft changes.
1821 Lifecycle *GoogleAppsDriveLabelsV2betaLifecycle `json:"lifecycle,omitempty"`
1822 // LockStatus: Output only. The `LockStatus` of this label.
1823 LockStatus *GoogleAppsDriveLabelsV2betaLockStatus `json:"lockStatus,omitempty"`
1824 // Name: Output only. Resource name of the label. Will be in the form of
1825 // either: `labels/{id}` or `labels/{id}@{revision_id}` depending on the
1826 // request. See `id` and `revision_id` below.
1827 Name string `json:"name,omitempty"`
1828 // Properties: Required. The basic properties of the label.
1829 Properties *GoogleAppsDriveLabelsV2betaLabelProperties `json:"properties,omitempty"`
1830 // PublishTime: Output only. The time this label was published. This value has
1831 // no meaning when the label isn't published.
1832 PublishTime string `json:"publishTime,omitempty"`
1833 // Publisher: Output only. The user who published this label. This value has no
1834 // meaning when the label isn't published.>>
1835 Publisher *GoogleAppsDriveLabelsV2betaUserInfo `json:"publisher,omitempty"`
1836 // RevisionCreateTime: Output only. The time this label revision was created.
1837 RevisionCreateTime string `json:"revisionCreateTime,omitempty"`
1838 // RevisionCreator: Output only. The user who created this label revision.
1839 RevisionCreator *GoogleAppsDriveLabelsV2betaUserInfo `json:"revisionCreator,omitempty"`
1840 // RevisionId: Output only. Revision ID of the label. Revision ID might be part
1841 // of the label `name` depending on the request issued. A new revision is
1842 // created whenever revisioned properties of a label are changed. Matches the
1843 // regex: `([a-zA-Z0-9])+`.
1844 RevisionId string `json:"revisionId,omitempty"`
1845 // SchemaCapabilities: Output only. The capabilities the user has on this
1846 // label.
1847 SchemaCapabilities *GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities `json:"schemaCapabilities,omitempty"`
1848
1849 // ServerResponse contains the HTTP response code and headers from the server.
1850 googleapi.ServerResponse `json:"-"`
1851 // ForceSendFields is a list of field names (e.g. "AppliedCapabilities") to
1852 // unconditionally include in API requests. By default, fields with empty or
1853 // default values are omitted from API requests. See
1854 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1855 // details.
1856 ForceSendFields []string `json:"-"`
1857 // NullFields is a list of field names (e.g. "AppliedCapabilities") to include
1858 // in API requests with the JSON null value. By default, fields with empty
1859 // values are omitted from API requests. See
1860 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1861 NullFields []string `json:"-"`
1862 }
1863
1864 func (s GoogleAppsDriveLabelsV2betaLabel) MarshalJSON() ([]byte, error) {
1865 type NoMethod GoogleAppsDriveLabelsV2betaLabel
1866 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1867 }
1868
1869 // GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities: The capabilities a user
1870 // has on this label's applied metadata.
1871 type GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities struct {
1872 // CanApply: Whether the user can apply this label to items.
1873 CanApply bool `json:"canApply,omitempty"`
1874 // CanRead: Whether the user can read applied metadata related to this label.
1875 CanRead bool `json:"canRead,omitempty"`
1876 // CanRemove: Whether the user can remove this label from items.
1877 CanRemove bool `json:"canRemove,omitempty"`
1878 // ForceSendFields is a list of field names (e.g. "CanApply") to
1879 // unconditionally include in API requests. By default, fields with empty or
1880 // default values are omitted from API requests. See
1881 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1882 // details.
1883 ForceSendFields []string `json:"-"`
1884 // NullFields is a list of field names (e.g. "CanApply") to include in API
1885 // requests with the JSON null value. By default, fields with empty values are
1886 // omitted from API requests. See
1887 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1888 NullFields []string `json:"-"`
1889 }
1890
1891 func (s GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities) MarshalJSON() ([]byte, error) {
1892 type NoMethod GoogleAppsDriveLabelsV2betaLabelAppliedCapabilities
1893 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1894 }
1895
1896 // GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy: Behavior of this label
1897 // when it's applied to Drive items.
1898 type GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy struct {
1899 // CopyMode: Indicates how the applied label and field values should be copied
1900 // when a Drive item is copied.
1901 //
1902 // Possible values:
1903 // "COPY_MODE_UNSPECIFIED" - Copy mode unspecified.
1904 // "DO_NOT_COPY" - The applied label and field values aren't copied by
1905 // default when the Drive item it's applied to is copied.
1906 // "ALWAYS_COPY" - The applied label and field values are always copied when
1907 // the Drive item it's applied to is copied. Only admins can use this mode.
1908 // "COPY_APPLIABLE" - The applied label and field values are copied if the
1909 // label is appliable by the user making the copy.
1910 CopyMode string `json:"copyMode,omitempty"`
1911 // ForceSendFields is a list of field names (e.g. "CopyMode") to
1912 // unconditionally include in API requests. By default, fields with empty or
1913 // default values are omitted from API requests. See
1914 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1915 // details.
1916 ForceSendFields []string `json:"-"`
1917 // NullFields is a list of field names (e.g. "CopyMode") to include in API
1918 // requests with the JSON null value. By default, fields with empty values are
1919 // omitted from API requests. See
1920 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1921 NullFields []string `json:"-"`
1922 }
1923
1924 func (s GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy) MarshalJSON() ([]byte, error) {
1925 type NoMethod GoogleAppsDriveLabelsV2betaLabelAppliedLabelPolicy
1926 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1927 }
1928
1929 // GoogleAppsDriveLabelsV2betaLabelDisplayHints: The UI display hints for
1930 // rendering the label.
1931 type GoogleAppsDriveLabelsV2betaLabelDisplayHints struct {
1932 // Disabled: Whether the label should be shown in the UI as disabled.
1933 Disabled bool `json:"disabled,omitempty"`
1934 // HiddenInSearch: This label should be hidden in the search menu when
1935 // searching for Drive items.
1936 HiddenInSearch bool `json:"hiddenInSearch,omitempty"`
1937 // Priority: The order to display labels in a list.
1938 Priority int64 `json:"priority,omitempty,string"`
1939 // ShownInApply: This label should be shown in the apply menu when applying
1940 // values to a Drive item.
1941 ShownInApply bool `json:"shownInApply,omitempty"`
1942 // ForceSendFields is a list of field names (e.g. "Disabled") to
1943 // unconditionally include in API requests. By default, fields with empty or
1944 // default values are omitted from API requests. See
1945 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1946 // details.
1947 ForceSendFields []string `json:"-"`
1948 // NullFields is a list of field names (e.g. "Disabled") to include in API
1949 // requests with the JSON null value. By default, fields with empty values are
1950 // omitted from API requests. See
1951 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1952 NullFields []string `json:"-"`
1953 }
1954
1955 func (s GoogleAppsDriveLabelsV2betaLabelDisplayHints) MarshalJSON() ([]byte, error) {
1956 type NoMethod GoogleAppsDriveLabelsV2betaLabelDisplayHints
1957 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1958 }
1959
1960 // GoogleAppsDriveLabelsV2betaLabelEnabledAppSettings: Describes the Google
1961 // Workspace apps in which the label can be used.
1962 type GoogleAppsDriveLabelsV2betaLabelEnabledAppSettings struct {
1963 // EnabledApps: Optional. The list of apps where the label can be used.
1964 EnabledApps []*GoogleAppsDriveLabelsV2betaLabelEnabledAppSettingsEnabledApp `json:"enabledApps,omitempty"`
1965 // ForceSendFields is a list of field names (e.g. "EnabledApps") to
1966 // unconditionally include in API requests. By default, fields with empty or
1967 // default values are omitted from API requests. See
1968 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1969 // details.
1970 ForceSendFields []string `json:"-"`
1971 // NullFields is a list of field names (e.g. "EnabledApps") to include in API
1972 // requests with the JSON null value. By default, fields with empty values are
1973 // omitted from API requests. See
1974 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1975 NullFields []string `json:"-"`
1976 }
1977
1978 func (s GoogleAppsDriveLabelsV2betaLabelEnabledAppSettings) MarshalJSON() ([]byte, error) {
1979 type NoMethod GoogleAppsDriveLabelsV2betaLabelEnabledAppSettings
1980 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1981 }
1982
1983 // GoogleAppsDriveLabelsV2betaLabelEnabledAppSettingsEnabledApp: An app where
1984 // the label can be used.
1985 type GoogleAppsDriveLabelsV2betaLabelEnabledAppSettingsEnabledApp struct {
1986 // App: Optional. The name of the app.
1987 //
1988 // Possible values:
1989 // "APP_UNSPECIFIED" - Unspecified
1990 // "DRIVE" - Drive
1991 // "GMAIL" - Gmail
1992 App string `json:"app,omitempty"`
1993 // ForceSendFields is a list of field names (e.g. "App") to unconditionally
1994 // include in API requests. By default, fields with empty or default values are
1995 // omitted from API requests. See
1996 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1997 // details.
1998 ForceSendFields []string `json:"-"`
1999 // NullFields is a list of field names (e.g. "App") to include in API requests
2000 // with the JSON null value. By default, fields with empty values are omitted
2001 // from API requests. See
2002 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2003 NullFields []string `json:"-"`
2004 }
2005
2006 func (s GoogleAppsDriveLabelsV2betaLabelEnabledAppSettingsEnabledApp) MarshalJSON() ([]byte, error) {
2007 type NoMethod GoogleAppsDriveLabelsV2betaLabelEnabledAppSettingsEnabledApp
2008 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2009 }
2010
2011 // GoogleAppsDriveLabelsV2betaLabelLimits: Label constraints governing the
2012 // structure of a label; such as, the maximum number of fields allowed and
2013 // maximum length of the label title.
2014 type GoogleAppsDriveLabelsV2betaLabelLimits struct {
2015 // FieldLimits: The limits for fields.
2016 FieldLimits *GoogleAppsDriveLabelsV2betaFieldLimits `json:"fieldLimits,omitempty"`
2017 // MaxDeletedFields: The maximum number of published fields that can be
2018 // deleted.
2019 MaxDeletedFields int64 `json:"maxDeletedFields,omitempty"`
2020 // MaxDescriptionLength: The maximum number of characters allowed for the
2021 // description.
2022 MaxDescriptionLength int64 `json:"maxDescriptionLength,omitempty"`
2023 // MaxDraftRevisions: The maximum number of draft revisions that will be kept
2024 // before deleting old drafts.
2025 MaxDraftRevisions int64 `json:"maxDraftRevisions,omitempty"`
2026 // MaxFields: The maximum number of fields allowed within the label.
2027 MaxFields int64 `json:"maxFields,omitempty"`
2028 // MaxTitleLength: The maximum number of characters allowed for the title.
2029 MaxTitleLength int64 `json:"maxTitleLength,omitempty"`
2030 // Name: Resource name.
2031 Name string `json:"name,omitempty"`
2032
2033 // ServerResponse contains the HTTP response code and headers from the server.
2034 googleapi.ServerResponse `json:"-"`
2035 // ForceSendFields is a list of field names (e.g. "FieldLimits") to
2036 // unconditionally include in API requests. By default, fields with empty or
2037 // default values are omitted from API requests. See
2038 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2039 // details.
2040 ForceSendFields []string `json:"-"`
2041 // NullFields is a list of field names (e.g. "FieldLimits") to include in API
2042 // requests with the JSON null value. By default, fields with empty values are
2043 // omitted from API requests. See
2044 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2045 NullFields []string `json:"-"`
2046 }
2047
2048 func (s GoogleAppsDriveLabelsV2betaLabelLimits) MarshalJSON() ([]byte, error) {
2049 type NoMethod GoogleAppsDriveLabelsV2betaLabelLimits
2050 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2051 }
2052
2053 // GoogleAppsDriveLabelsV2betaLabelLock: A lock that can be applied to a label,
2054 // field, or choice.
2055 type GoogleAppsDriveLabelsV2betaLabelLock struct {
2056 // Capabilities: Output only. The user's capabilities on this label lock.
2057 Capabilities *GoogleAppsDriveLabelsV2betaLabelLockCapabilities `json:"capabilities,omitempty"`
2058 // ChoiceId: The ID of the selection field choice that should be locked. If
2059 // present, `field_id` must also be present.
2060 ChoiceId string `json:"choiceId,omitempty"`
2061 // CreateTime: Output only. The time this label lock was created.
2062 CreateTime string `json:"createTime,omitempty"`
2063 // Creator: Output only. The user whose credentials were used to create the
2064 // label lock. Not present if no user was responsible for creating the label
2065 // lock.
2066 Creator *GoogleAppsDriveLabelsV2betaUserInfo `json:"creator,omitempty"`
2067 // DeleteTime: Output only. A timestamp indicating when this label lock was
2068 // scheduled for deletion. Present only if this label lock is in the `DELETING`
2069 // state.
2070 DeleteTime string `json:"deleteTime,omitempty"`
2071 // FieldId: The ID of the field that should be locked. Empty if the whole label
2072 // should be locked.
2073 FieldId string `json:"fieldId,omitempty"`
2074 // Name: Output only. Resource name of this label lock.
2075 Name string `json:"name,omitempty"`
2076 // State: Output only. This label lock's state.
2077 //
2078 // Possible values:
2079 // "STATE_UNSPECIFIED" - Unknown state.
2080 // "ACTIVE" - The label lock is active and is being enforced by the server.
2081 // "DELETING" - The label lock is being deleted. The label lock will continue
2082 // to be enforced by the server until it has been fully removed.
2083 State string `json:"state,omitempty"`
2084 // ForceSendFields is a list of field names (e.g. "Capabilities") to
2085 // unconditionally include in API requests. By default, fields with empty or
2086 // default values are omitted from API requests. See
2087 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2088 // details.
2089 ForceSendFields []string `json:"-"`
2090 // NullFields is a list of field names (e.g. "Capabilities") to include in API
2091 // requests with the JSON null value. By default, fields with empty values are
2092 // omitted from API requests. See
2093 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2094 NullFields []string `json:"-"`
2095 }
2096
2097 func (s GoogleAppsDriveLabelsV2betaLabelLock) MarshalJSON() ([]byte, error) {
2098 type NoMethod GoogleAppsDriveLabelsV2betaLabelLock
2099 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2100 }
2101
2102 // GoogleAppsDriveLabelsV2betaLabelLockCapabilities: A description of a user's
2103 // capabilities on a label lock.
2104 type GoogleAppsDriveLabelsV2betaLabelLockCapabilities struct {
2105 // CanViewPolicy: True if the user is authorized to view the policy.
2106 CanViewPolicy bool `json:"canViewPolicy,omitempty"`
2107 // ForceSendFields is a list of field names (e.g. "CanViewPolicy") to
2108 // unconditionally include in API requests. By default, fields with empty or
2109 // default values are omitted from API requests. See
2110 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2111 // details.
2112 ForceSendFields []string `json:"-"`
2113 // NullFields is a list of field names (e.g. "CanViewPolicy") to include in API
2114 // requests with the JSON null value. By default, fields with empty values are
2115 // omitted from API requests. See
2116 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2117 NullFields []string `json:"-"`
2118 }
2119
2120 func (s GoogleAppsDriveLabelsV2betaLabelLockCapabilities) MarshalJSON() ([]byte, error) {
2121 type NoMethod GoogleAppsDriveLabelsV2betaLabelLockCapabilities
2122 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2123 }
2124
2125 // GoogleAppsDriveLabelsV2betaLabelPermission: The permission that applies to a
2126 // principal (user, group, audience) on a label.
2127 type GoogleAppsDriveLabelsV2betaLabelPermission struct {
2128 // Audience: Audience to grant a role to. The magic value of
2129 // `audiences/default` may be used to apply the role to the default audience in
2130 // the context of the organization that owns the label.
2131 Audience string `json:"audience,omitempty"`
2132 // Email: Specifies the email address for a user or group principal. Not
2133 // populated for audience principals. User and group permissions may only be
2134 // inserted using an email address. On update requests, if email address is
2135 // specified, no principal should be specified.
2136 Email string `json:"email,omitempty"`
2137 // Group: Group resource name.
2138 Group string `json:"group,omitempty"`
2139 // Name: Resource name of this permission.
2140 Name string `json:"name,omitempty"`
2141 // Person: Person resource name.
2142 Person string `json:"person,omitempty"`
2143 // Role: The role the principal should have.
2144 //
2145 // Possible values:
2146 // "LABEL_ROLE_UNSPECIFIED" - Unknown role.
2147 // "READER" - A reader can read the label and associated metadata applied to
2148 // Drive items.
2149 // "APPLIER" - An applier can write associated metadata on Drive items in
2150 // which they also have write access to. Implies `READER`.
2151 // "ORGANIZER" - An organizer can pin this label in shared drives they manage
2152 // and add new appliers to the label.
2153 // "EDITOR" - Editors can make any update including deleting the label which
2154 // also deletes the associated Drive item metadata. Implies `APPLIER`.
2155 Role string `json:"role,omitempty"`
2156
2157 // ServerResponse contains the HTTP response code and headers from the server.
2158 googleapi.ServerResponse `json:"-"`
2159 // ForceSendFields is a list of field names (e.g. "Audience") to
2160 // unconditionally include in API requests. By default, fields with empty or
2161 // default values are omitted from API requests. See
2162 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2163 // details.
2164 ForceSendFields []string `json:"-"`
2165 // NullFields is a list of field names (e.g. "Audience") to include in API
2166 // requests with the JSON null value. By default, fields with empty values are
2167 // omitted from API requests. See
2168 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2169 NullFields []string `json:"-"`
2170 }
2171
2172 func (s GoogleAppsDriveLabelsV2betaLabelPermission) MarshalJSON() ([]byte, error) {
2173 type NoMethod GoogleAppsDriveLabelsV2betaLabelPermission
2174 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2175 }
2176
2177 // GoogleAppsDriveLabelsV2betaLabelProperties: Basic properties of the label.
2178 type GoogleAppsDriveLabelsV2betaLabelProperties struct {
2179 // Description: The description of the label.
2180 Description string `json:"description,omitempty"`
2181 // Title: Required. Title of the label.
2182 Title string `json:"title,omitempty"`
2183 // ForceSendFields is a list of field names (e.g. "Description") to
2184 // unconditionally include in API requests. By default, fields with empty or
2185 // default values are omitted from API requests. See
2186 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2187 // details.
2188 ForceSendFields []string `json:"-"`
2189 // NullFields is a list of field names (e.g. "Description") to include in API
2190 // requests with the JSON null value. By default, fields with empty values are
2191 // omitted from API requests. See
2192 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2193 NullFields []string `json:"-"`
2194 }
2195
2196 func (s GoogleAppsDriveLabelsV2betaLabelProperties) MarshalJSON() ([]byte, error) {
2197 type NoMethod GoogleAppsDriveLabelsV2betaLabelProperties
2198 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2199 }
2200
2201 // GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities: The capabilities related
2202 // to this label when editing the label.
2203 type GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities struct {
2204 // CanDelete: Whether the user can delete this label. The user must have
2205 // permission and the label must be disabled.
2206 CanDelete bool `json:"canDelete,omitempty"`
2207 // CanDisable: Whether the user can disable this label. The user must have
2208 // permission and this label must not already be disabled.
2209 CanDisable bool `json:"canDisable,omitempty"`
2210 // CanEnable: Whether the user can enable this label. The user must have
2211 // permission and this label must be disabled.
2212 CanEnable bool `json:"canEnable,omitempty"`
2213 // CanUpdate: Whether the user can change this label.
2214 CanUpdate bool `json:"canUpdate,omitempty"`
2215 // ForceSendFields is a list of field names (e.g. "CanDelete") to
2216 // unconditionally include in API requests. By default, fields with empty or
2217 // default values are omitted from API requests. See
2218 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2219 // details.
2220 ForceSendFields []string `json:"-"`
2221 // NullFields is a list of field names (e.g. "CanDelete") to include in API
2222 // requests with the JSON null value. By default, fields with empty values are
2223 // omitted from API requests. See
2224 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2225 NullFields []string `json:"-"`
2226 }
2227
2228 func (s GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities) MarshalJSON() ([]byte, error) {
2229 type NoMethod GoogleAppsDriveLabelsV2betaLabelSchemaCapabilities
2230 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2231 }
2232
2233 // GoogleAppsDriveLabelsV2betaLifecycle: The lifecycle state of an object, such
2234 // as label, field, or choice. For more information, see Label lifecycle
2235 // (https://developers.google.com/workspace/drive/labels/guides/label-lifecycle).
2236 // The lifecycle enforces the following transitions: * `UNPUBLISHED_DRAFT`
2237 // (starting state) * `UNPUBLISHED_DRAFT` -> `PUBLISHED` * `UNPUBLISHED_DRAFT`
2238 // -> (Deleted) * `PUBLISHED` -> `DISABLED` * `DISABLED` -> `PUBLISHED` *
2239 // `DISABLED` -> (Deleted) The published and disabled states have some distinct
2240 // characteristics: * `Published`: Some kinds of changes might be made to an
2241 // object in this state, in which case `has_unpublished_changes` will be true.
2242 // Also, some kinds of changes aren't permitted. Generally, any change that
2243 // would invalidate or cause new restrictions on existing metadata related to
2244 // the label are rejected. * `Disabled`: When disabled, the configured
2245 // `DisabledPolicy` takes effect.
2246 type GoogleAppsDriveLabelsV2betaLifecycle struct {
2247 // DisabledPolicy: The policy that governs how to show a disabled label, field,
2248 // or selection choice.
2249 DisabledPolicy *GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy `json:"disabledPolicy,omitempty"`
2250 // HasUnpublishedChanges: Output only. Whether the object associated with this
2251 // lifecycle has unpublished changes.
2252 HasUnpublishedChanges bool `json:"hasUnpublishedChanges,omitempty"`
2253 // State: Output only. The state of the object associated with this lifecycle.
2254 //
2255 // Possible values:
2256 // "STATE_UNSPECIFIED" - Unknown State.
2257 // "UNPUBLISHED_DRAFT" - The initial state of an object. Once published, the
2258 // object can never return to this state. Once an object is published, certain
2259 // kinds of changes are no longer permitted.
2260 // "PUBLISHED" - The object has been published. The object might have
2261 // unpublished draft changes as indicated by `has_unpublished_changes`.
2262 // "DISABLED" - The object has been published and has since been disabled.
2263 // The object might have unpublished draft changes as indicated by
2264 // `has_unpublished_changes`.
2265 // "DELETED" - The object has been deleted.
2266 State string `json:"state,omitempty"`
2267 // ForceSendFields is a list of field names (e.g. "DisabledPolicy") to
2268 // unconditionally include in API requests. By default, fields with empty or
2269 // default values are omitted from API requests. See
2270 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2271 // details.
2272 ForceSendFields []string `json:"-"`
2273 // NullFields is a list of field names (e.g. "DisabledPolicy") to include in
2274 // API requests with the JSON null value. By default, fields with empty values
2275 // are omitted from API requests. See
2276 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2277 NullFields []string `json:"-"`
2278 }
2279
2280 func (s GoogleAppsDriveLabelsV2betaLifecycle) MarshalJSON() ([]byte, error) {
2281 type NoMethod GoogleAppsDriveLabelsV2betaLifecycle
2282 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2283 }
2284
2285 // GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy: The policy that governs
2286 // how to treat a disabled label, field, or selection choice in different
2287 // contexts.
2288 type GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy struct {
2289 // HideInSearch: Whether to hide this disabled object in the search menu for
2290 // Drive items. * When `false`, the object is generally shown in the UI as
2291 // disabled but it appears in the search results when searching for Drive
2292 // items. * When `true`, the object is generally hidden in the UI when
2293 // searching for Drive items.
2294 HideInSearch bool `json:"hideInSearch,omitempty"`
2295 // ShowInApply: Whether to show this disabled object in the apply menu on Drive
2296 // items. * When `true`, the object is generally shown in the UI as disabled
2297 // and is unselectable. * When `false`, the object is generally hidden in the
2298 // UI.
2299 ShowInApply bool `json:"showInApply,omitempty"`
2300 // ForceSendFields is a list of field names (e.g. "HideInSearch") to
2301 // unconditionally include in API requests. By default, fields with empty or
2302 // default values are omitted from API requests. See
2303 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2304 // details.
2305 ForceSendFields []string `json:"-"`
2306 // NullFields is a list of field names (e.g. "HideInSearch") to include in API
2307 // requests with the JSON null value. By default, fields with empty values are
2308 // omitted from API requests. See
2309 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2310 NullFields []string `json:"-"`
2311 }
2312
2313 func (s GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy) MarshalJSON() ([]byte, error) {
2314 type NoMethod GoogleAppsDriveLabelsV2betaLifecycleDisabledPolicy
2315 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2316 }
2317
2318 // GoogleAppsDriveLabelsV2betaListLabelLocksResponse: The response to a
2319 // `ListLabelLocksRequest`.
2320 type GoogleAppsDriveLabelsV2betaListLabelLocksResponse struct {
2321 // LabelLocks: Label locks.
2322 LabelLocks []*GoogleAppsDriveLabelsV2betaLabelLock `json:"labelLocks,omitempty"`
2323 // NextPageToken: The token of the next page in the response.
2324 NextPageToken string `json:"nextPageToken,omitempty"`
2325
2326 // ServerResponse contains the HTTP response code and headers from the server.
2327 googleapi.ServerResponse `json:"-"`
2328 // ForceSendFields is a list of field names (e.g. "LabelLocks") to
2329 // unconditionally include in API requests. By default, fields with empty or
2330 // default values are omitted from API requests. See
2331 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2332 // details.
2333 ForceSendFields []string `json:"-"`
2334 // NullFields is a list of field names (e.g. "LabelLocks") to include in API
2335 // requests with the JSON null value. By default, fields with empty values are
2336 // omitted from API requests. See
2337 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2338 NullFields []string `json:"-"`
2339 }
2340
2341 func (s GoogleAppsDriveLabelsV2betaListLabelLocksResponse) MarshalJSON() ([]byte, error) {
2342 type NoMethod GoogleAppsDriveLabelsV2betaListLabelLocksResponse
2343 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2344 }
2345
2346 // GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse: Response for
2347 // listing the permissions on a label.
2348 type GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse struct {
2349 // LabelPermissions: Label permissions.
2350 LabelPermissions []*GoogleAppsDriveLabelsV2betaLabelPermission `json:"labelPermissions,omitempty"`
2351 // NextPageToken: The token of the next page in the response.
2352 NextPageToken string `json:"nextPageToken,omitempty"`
2353
2354 // ServerResponse contains the HTTP response code and headers from the server.
2355 googleapi.ServerResponse `json:"-"`
2356 // ForceSendFields is a list of field names (e.g. "LabelPermissions") to
2357 // unconditionally include in API requests. By default, fields with empty or
2358 // default values are omitted from API requests. See
2359 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2360 // details.
2361 ForceSendFields []string `json:"-"`
2362 // NullFields is a list of field names (e.g. "LabelPermissions") to include in
2363 // API requests with the JSON null value. By default, fields with empty values
2364 // are omitted from API requests. See
2365 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2366 NullFields []string `json:"-"`
2367 }
2368
2369 func (s GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse) MarshalJSON() ([]byte, error) {
2370 type NoMethod GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse
2371 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2372 }
2373
2374 // GoogleAppsDriveLabelsV2betaListLabelsResponse: Response for listing labels.
2375 type GoogleAppsDriveLabelsV2betaListLabelsResponse struct {
2376 // Labels: Labels.
2377 Labels []*GoogleAppsDriveLabelsV2betaLabel `json:"labels,omitempty"`
2378 // NextPageToken: The token of the next page in the response.
2379 NextPageToken string `json:"nextPageToken,omitempty"`
2380
2381 // ServerResponse contains the HTTP response code and headers from the server.
2382 googleapi.ServerResponse `json:"-"`
2383 // ForceSendFields is a list of field names (e.g. "Labels") to unconditionally
2384 // include in API requests. By default, fields with empty or default values are
2385 // omitted from API requests. See
2386 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2387 // details.
2388 ForceSendFields []string `json:"-"`
2389 // NullFields is a list of field names (e.g. "Labels") to include in API
2390 // requests with the JSON null value. By default, fields with empty values are
2391 // omitted from API requests. See
2392 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2393 NullFields []string `json:"-"`
2394 }
2395
2396 func (s GoogleAppsDriveLabelsV2betaListLabelsResponse) MarshalJSON() ([]byte, error) {
2397 type NoMethod GoogleAppsDriveLabelsV2betaListLabelsResponse
2398 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2399 }
2400
2401 // GoogleAppsDriveLabelsV2betaListLimits: Limits for list-variant of a field
2402 // type.
2403 type GoogleAppsDriveLabelsV2betaListLimits struct {
2404 // MaxEntries: Maximum number of values allowed for the field type.
2405 MaxEntries int64 `json:"maxEntries,omitempty"`
2406 // ForceSendFields is a list of field names (e.g. "MaxEntries") to
2407 // unconditionally include in API requests. By default, fields with empty or
2408 // default values are omitted from API requests. See
2409 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2410 // details.
2411 ForceSendFields []string `json:"-"`
2412 // NullFields is a list of field names (e.g. "MaxEntries") to include in API
2413 // requests with the JSON null value. By default, fields with empty values are
2414 // omitted from API requests. See
2415 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2416 NullFields []string `json:"-"`
2417 }
2418
2419 func (s GoogleAppsDriveLabelsV2betaListLimits) MarshalJSON() ([]byte, error) {
2420 type NoMethod GoogleAppsDriveLabelsV2betaListLimits
2421 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2422 }
2423
2424 // GoogleAppsDriveLabelsV2betaLockStatus: Contains information about whether a
2425 // label component should be considered locked.
2426 type GoogleAppsDriveLabelsV2betaLockStatus struct {
2427 // Locked: Output only. Indicates whether this label component is the (direct)
2428 // target of a label lock. A label component can be implicitly locked even if
2429 // it's not the direct target of a label lock, in which case this field is set
2430 // to false.
2431 Locked bool `json:"locked,omitempty"`
2432 // ForceSendFields is a list of field names (e.g. "Locked") to unconditionally
2433 // include in API requests. By default, fields with empty or default values are
2434 // omitted from API requests. See
2435 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2436 // details.
2437 ForceSendFields []string `json:"-"`
2438 // NullFields is a list of field names (e.g. "Locked") to include in API
2439 // requests with the JSON null value. By default, fields with empty values are
2440 // omitted from API requests. See
2441 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2442 NullFields []string `json:"-"`
2443 }
2444
2445 func (s GoogleAppsDriveLabelsV2betaLockStatus) MarshalJSON() ([]byte, error) {
2446 type NoMethod GoogleAppsDriveLabelsV2betaLockStatus
2447 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2448 }
2449
2450 // GoogleAppsDriveLabelsV2betaLongTextLimits: Limits for long text field type.
2451 type GoogleAppsDriveLabelsV2betaLongTextLimits struct {
2452 // MaxLength: Maximum length allowed for a long text field type.
2453 MaxLength int64 `json:"maxLength,omitempty"`
2454 // MinLength: Minimum length allowed for a long text field type.
2455 MinLength int64 `json:"minLength,omitempty"`
2456 // ForceSendFields is a list of field names (e.g. "MaxLength") to
2457 // unconditionally include in API requests. By default, fields with empty or
2458 // default values are omitted from API requests. See
2459 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2460 // details.
2461 ForceSendFields []string `json:"-"`
2462 // NullFields is a list of field names (e.g. "MaxLength") to include in API
2463 // requests with the JSON null value. By default, fields with empty values are
2464 // omitted from API requests. See
2465 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2466 NullFields []string `json:"-"`
2467 }
2468
2469 func (s GoogleAppsDriveLabelsV2betaLongTextLimits) MarshalJSON() ([]byte, error) {
2470 type NoMethod GoogleAppsDriveLabelsV2betaLongTextLimits
2471 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2472 }
2473
2474 // GoogleAppsDriveLabelsV2betaPublishLabelRequest: Request to publish a label.
2475 type GoogleAppsDriveLabelsV2betaPublishLabelRequest struct {
2476 // LanguageCode: The BCP-47 language code to use for evaluating localized field
2477 // labels. When not specified, values in the default configured language will
2478 // be used.
2479 LanguageCode string `json:"languageCode,omitempty"`
2480 // UseAdminAccess: Set to `true` in order to use the user's admin credentials.
2481 // The server will verify the user is an admin for the label before allowing
2482 // access.
2483 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
2484 // WriteControl: Provides control over how write requests are executed.
2485 // Defaults to unset, which means the last write wins.
2486 WriteControl *GoogleAppsDriveLabelsV2betaWriteControl `json:"writeControl,omitempty"`
2487 // ForceSendFields is a list of field names (e.g. "LanguageCode") to
2488 // unconditionally include in API requests. By default, fields with empty or
2489 // default values are omitted from API requests. See
2490 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2491 // details.
2492 ForceSendFields []string `json:"-"`
2493 // NullFields is a list of field names (e.g. "LanguageCode") to include in API
2494 // requests with the JSON null value. By default, fields with empty values are
2495 // omitted from API requests. See
2496 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2497 NullFields []string `json:"-"`
2498 }
2499
2500 func (s GoogleAppsDriveLabelsV2betaPublishLabelRequest) MarshalJSON() ([]byte, error) {
2501 type NoMethod GoogleAppsDriveLabelsV2betaPublishLabelRequest
2502 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2503 }
2504
2505 // GoogleAppsDriveLabelsV2betaSelectionLimits: Limits for selection field type.
2506 type GoogleAppsDriveLabelsV2betaSelectionLimits struct {
2507 // ListLimits: Limits for list-variant of a field type.
2508 ListLimits *GoogleAppsDriveLabelsV2betaListLimits `json:"listLimits,omitempty"`
2509 // MaxChoices: Maximum number of choices.
2510 MaxChoices int64 `json:"maxChoices,omitempty"`
2511 // MaxDeletedChoices: Maximum number of deleted choices.
2512 MaxDeletedChoices int64 `json:"maxDeletedChoices,omitempty"`
2513 // MaxDisplayNameLength: Maximum length for display name.
2514 MaxDisplayNameLength int64 `json:"maxDisplayNameLength,omitempty"`
2515 // MaxIdLength: Maximum ID length for a selection option.
2516 MaxIdLength int64 `json:"maxIdLength,omitempty"`
2517 // ForceSendFields is a list of field names (e.g. "ListLimits") to
2518 // unconditionally include in API requests. By default, fields with empty or
2519 // default values are omitted from API requests. See
2520 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2521 // details.
2522 ForceSendFields []string `json:"-"`
2523 // NullFields is a list of field names (e.g. "ListLimits") to include in API
2524 // requests with the JSON null value. By default, fields with empty values are
2525 // omitted from API requests. See
2526 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2527 NullFields []string `json:"-"`
2528 }
2529
2530 func (s GoogleAppsDriveLabelsV2betaSelectionLimits) MarshalJSON() ([]byte, error) {
2531 type NoMethod GoogleAppsDriveLabelsV2betaSelectionLimits
2532 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2533 }
2534
2535 // GoogleAppsDriveLabelsV2betaTextLimits: Limits for text field type.
2536 type GoogleAppsDriveLabelsV2betaTextLimits struct {
2537 // MaxLength: Maximum length allowed for a text field type.
2538 MaxLength int64 `json:"maxLength,omitempty"`
2539 // MinLength: Minimum length allowed for a text field type.
2540 MinLength int64 `json:"minLength,omitempty"`
2541 // ForceSendFields is a list of field names (e.g. "MaxLength") to
2542 // unconditionally include in API requests. By default, fields with empty or
2543 // default values are omitted from API requests. See
2544 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2545 // details.
2546 ForceSendFields []string `json:"-"`
2547 // NullFields is a list of field names (e.g. "MaxLength") to include in API
2548 // requests with the JSON null value. By default, fields with empty values are
2549 // omitted from API requests. See
2550 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2551 NullFields []string `json:"-"`
2552 }
2553
2554 func (s GoogleAppsDriveLabelsV2betaTextLimits) MarshalJSON() ([]byte, error) {
2555 type NoMethod GoogleAppsDriveLabelsV2betaTextLimits
2556 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2557 }
2558
2559 // GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest: Request to update the
2560 // `CopyMode` of the given label. Changes to this policy aren't revisioned,
2561 // don't require publishing, and take effect immediately. \
2562 type GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest struct {
2563 // CopyMode: Required. Indicates how the applied label and field values should
2564 // be copied when a Drive item is copied.
2565 //
2566 // Possible values:
2567 // "COPY_MODE_UNSPECIFIED" - Copy mode unspecified.
2568 // "DO_NOT_COPY" - The applied label and field values aren't copied by
2569 // default when the Drive item it's applied to is copied.
2570 // "ALWAYS_COPY" - The applied label and field values are always copied when
2571 // the Drive item it's applied to is copied. Only admins can use this mode.
2572 // "COPY_APPLIABLE" - The applied label and field values are copied if the
2573 // label is appliable by the user making the copy.
2574 CopyMode string `json:"copyMode,omitempty"`
2575 // LanguageCode: The BCP-47 language code to use for evaluating localized field
2576 // labels. When not specified, values in the default configured language will
2577 // be used.
2578 LanguageCode string `json:"languageCode,omitempty"`
2579 // UseAdminAccess: Set to `true` in order to use the user's admin credentials.
2580 // The server will verify the user is an admin for the label before allowing
2581 // access.
2582 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
2583 // View: When specified, only certain fields belonging to the indicated view
2584 // will be returned.
2585 //
2586 // Possible values:
2587 // "LABEL_VIEW_BASIC" - Implies the field mask:
2588 // `name,id,revision_id,label_type,properties.*`
2589 // "LABEL_VIEW_FULL" - All possible fields.
2590 View string `json:"view,omitempty"`
2591 // ForceSendFields is a list of field names (e.g. "CopyMode") to
2592 // unconditionally include in API requests. By default, fields with empty or
2593 // default values are omitted from API requests. See
2594 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2595 // details.
2596 ForceSendFields []string `json:"-"`
2597 // NullFields is a list of field names (e.g. "CopyMode") to include in API
2598 // requests with the JSON null value. By default, fields with empty values are
2599 // omitted from API requests. See
2600 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2601 NullFields []string `json:"-"`
2602 }
2603
2604 func (s GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest) MarshalJSON() ([]byte, error) {
2605 type NoMethod GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest
2606 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2607 }
2608
2609 // GoogleAppsDriveLabelsV2betaUpdateLabelEnabledAppSettingsRequest: Request to
2610 // update the `EnabledAppSettings` of the given label. This change is not
2611 // revisioned, doesn't require publishing, and takes effect immediately. \
2612 type GoogleAppsDriveLabelsV2betaUpdateLabelEnabledAppSettingsRequest struct {
2613 // EnabledAppSettings: Required. The new `EnabledAppSettings` value for the
2614 // label.
2615 EnabledAppSettings *GoogleAppsDriveLabelsV2betaLabelEnabledAppSettings `json:"enabledAppSettings,omitempty"`
2616 // LanguageCode: Optional. The BCP-47 language code to use for evaluating
2617 // localized field labels. When not specified, values in the default configured
2618 // language will be used.
2619 LanguageCode string `json:"languageCode,omitempty"`
2620 // UseAdminAccess: Optional. Set to `true` in order to use the user's admin
2621 // credentials. The server will verify the user is an admin for the label
2622 // before allowing access.
2623 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
2624 // View: Optional. When specified, only certain fields belonging to the
2625 // indicated view will be returned.
2626 //
2627 // Possible values:
2628 // "LABEL_VIEW_BASIC" - Implies the field mask:
2629 // `name,id,revision_id,label_type,properties.*`
2630 // "LABEL_VIEW_FULL" - All possible fields.
2631 View string `json:"view,omitempty"`
2632 // ForceSendFields is a list of field names (e.g. "EnabledAppSettings") to
2633 // unconditionally include in API requests. By default, fields with empty or
2634 // default values are omitted from API requests. See
2635 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2636 // details.
2637 ForceSendFields []string `json:"-"`
2638 // NullFields is a list of field names (e.g. "EnabledAppSettings") to include
2639 // in API requests with the JSON null value. By default, fields with empty
2640 // values are omitted from API requests. See
2641 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2642 NullFields []string `json:"-"`
2643 }
2644
2645 func (s GoogleAppsDriveLabelsV2betaUpdateLabelEnabledAppSettingsRequest) MarshalJSON() ([]byte, error) {
2646 type NoMethod GoogleAppsDriveLabelsV2betaUpdateLabelEnabledAppSettingsRequest
2647 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2648 }
2649
2650 // GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest: Updates a label
2651 // permission. Permissions affect the label resource as a whole, aren't
2652 // revisioned, and don't require publishing.
2653 type GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest struct {
2654 // LabelPermission: Required. The permission to create or update on the label.
2655 LabelPermission *GoogleAppsDriveLabelsV2betaLabelPermission `json:"labelPermission,omitempty"`
2656 // Parent: Required. The parent label resource name.
2657 Parent string `json:"parent,omitempty"`
2658 // UseAdminAccess: Set to `true` in order to use the user's admin credentials.
2659 // The server will verify the user is an admin for the label before allowing
2660 // access.
2661 UseAdminAccess bool `json:"useAdminAccess,omitempty"`
2662 // ForceSendFields is a list of field names (e.g. "LabelPermission") to
2663 // unconditionally include in API requests. By default, fields with empty or
2664 // default values are omitted from API requests. See
2665 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2666 // details.
2667 ForceSendFields []string `json:"-"`
2668 // NullFields is a list of field names (e.g. "LabelPermission") to include in
2669 // API requests with the JSON null value. By default, fields with empty values
2670 // are omitted from API requests. See
2671 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2672 NullFields []string `json:"-"`
2673 }
2674
2675 func (s GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest) MarshalJSON() ([]byte, error) {
2676 type NoMethod GoogleAppsDriveLabelsV2betaUpdateLabelPermissionRequest
2677 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2678 }
2679
2680 // GoogleAppsDriveLabelsV2betaUserCapabilities: The capabilities of a user.
2681 type GoogleAppsDriveLabelsV2betaUserCapabilities struct {
2682 // CanAccessLabelManager: Output only. Whether the user is allowed access to
2683 // the label manager.
2684 CanAccessLabelManager bool `json:"canAccessLabelManager,omitempty"`
2685 // CanAdministrateLabels: Output only. Whether the user is an administrator for
2686 // the shared labels feature.
2687 CanAdministrateLabels bool `json:"canAdministrateLabels,omitempty"`
2688 // CanCreateAdminLabels: Output only. Whether the user is allowed to create
2689 // admin labels.
2690 CanCreateAdminLabels bool `json:"canCreateAdminLabels,omitempty"`
2691 // CanCreateSharedLabels: Output only. Whether the user is allowed to create
2692 // shared labels.
2693 CanCreateSharedLabels bool `json:"canCreateSharedLabels,omitempty"`
2694 // Name: Output only. Resource name for the user capabilities.
2695 Name string `json:"name,omitempty"`
2696
2697 // ServerResponse contains the HTTP response code and headers from the server.
2698 googleapi.ServerResponse `json:"-"`
2699 // ForceSendFields is a list of field names (e.g. "CanAccessLabelManager") to
2700 // unconditionally include in API requests. By default, fields with empty or
2701 // default values are omitted from API requests. See
2702 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2703 // details.
2704 ForceSendFields []string `json:"-"`
2705 // NullFields is a list of field names (e.g. "CanAccessLabelManager") to
2706 // include in API requests with the JSON null value. By default, fields with
2707 // empty values are omitted from API requests. See
2708 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2709 NullFields []string `json:"-"`
2710 }
2711
2712 func (s GoogleAppsDriveLabelsV2betaUserCapabilities) MarshalJSON() ([]byte, error) {
2713 type NoMethod GoogleAppsDriveLabelsV2betaUserCapabilities
2714 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2715 }
2716
2717 // GoogleAppsDriveLabelsV2betaUserInfo: Information about a user.
2718 type GoogleAppsDriveLabelsV2betaUserInfo struct {
2719 // Person: The identifier for this user that can be used with the People API
2720 // (https://developers.google.com/people) to get more information. For example,
2721 // `people/12345678`.
2722 Person string `json:"person,omitempty"`
2723 // ForceSendFields is a list of field names (e.g. "Person") to unconditionally
2724 // include in API requests. By default, fields with empty or default values are
2725 // omitted from API requests. See
2726 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2727 // details.
2728 ForceSendFields []string `json:"-"`
2729 // NullFields is a list of field names (e.g. "Person") to include in API
2730 // requests with the JSON null value. By default, fields with empty values are
2731 // omitted from API requests. See
2732 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2733 NullFields []string `json:"-"`
2734 }
2735
2736 func (s GoogleAppsDriveLabelsV2betaUserInfo) MarshalJSON() ([]byte, error) {
2737 type NoMethod GoogleAppsDriveLabelsV2betaUserInfo
2738 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2739 }
2740
2741 // GoogleAppsDriveLabelsV2betaUserLimits: Limits for Field.Type.USER.
2742 type GoogleAppsDriveLabelsV2betaUserLimits struct {
2743 // ListLimits: Limits for list-variant of a field type.
2744 ListLimits *GoogleAppsDriveLabelsV2betaListLimits `json:"listLimits,omitempty"`
2745 // ForceSendFields is a list of field names (e.g. "ListLimits") to
2746 // unconditionally include in API requests. By default, fields with empty or
2747 // default values are omitted from API requests. See
2748 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2749 // details.
2750 ForceSendFields []string `json:"-"`
2751 // NullFields is a list of field names (e.g. "ListLimits") to include in API
2752 // requests with the JSON null value. By default, fields with empty values are
2753 // omitted from API requests. See
2754 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2755 NullFields []string `json:"-"`
2756 }
2757
2758 func (s GoogleAppsDriveLabelsV2betaUserLimits) MarshalJSON() ([]byte, error) {
2759 type NoMethod GoogleAppsDriveLabelsV2betaUserLimits
2760 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2761 }
2762
2763 // GoogleAppsDriveLabelsV2betaWriteControl: Provides control over how write
2764 // requests are executed. When not specified, the last write wins.
2765 type GoogleAppsDriveLabelsV2betaWriteControl struct {
2766 // RequiredRevisionId: The revision ID of the label that the write request will
2767 // be applied to. If this isn't the latest revision of the label, the request
2768 // will not be processed and will return a 400 Bad Request error.
2769 RequiredRevisionId string `json:"requiredRevisionId,omitempty"`
2770 // ForceSendFields is a list of field names (e.g. "RequiredRevisionId") to
2771 // unconditionally include in API requests. By default, fields with empty or
2772 // default values are omitted from API requests. See
2773 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2774 // details.
2775 ForceSendFields []string `json:"-"`
2776 // NullFields is a list of field names (e.g. "RequiredRevisionId") to include
2777 // in API requests with the JSON null value. By default, fields with empty
2778 // values are omitted from API requests. See
2779 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2780 NullFields []string `json:"-"`
2781 }
2782
2783 func (s GoogleAppsDriveLabelsV2betaWriteControl) MarshalJSON() ([]byte, error) {
2784 type NoMethod GoogleAppsDriveLabelsV2betaWriteControl
2785 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2786 }
2787
2788 // GoogleProtobufEmpty: A generic empty message that you can re-use to avoid
2789 // defining duplicated empty messages in your APIs. A typical example is to use
2790 // it as the request or the response type of an API method. For instance:
2791 // service Foo { rpc Bar(google.protobuf.Empty) returns
2792 // (google.protobuf.Empty); }
2793 type GoogleProtobufEmpty struct {
2794 // ServerResponse contains the HTTP response code and headers from the server.
2795 googleapi.ServerResponse `json:"-"`
2796 }
2797
2798 // GoogleTypeColor: Represents a color in the RGBA color space. This
2799 // representation is designed for simplicity of conversion to and from color
2800 // representations in various languages over compactness. For example, the
2801 // fields of this representation can be trivially provided to the constructor
2802 // of `java.awt.Color` in Java; it can also be trivially provided to UIColor's
2803 // `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little
2804 // work, it can be easily formatted into a CSS `rgba()` string in JavaScript.
2805 // This reference page doesn't have information about the absolute color space
2806 // that should be used to interpret the RGB value—for example, sRGB, Adobe
2807 // RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB
2808 // color space. When color equality needs to be decided, implementations,
2809 // unless documented otherwise, treat two colors as equal if all their red,
2810 // green, blue, and alpha values each differ by at most `1e-5`. Example (Java):
2811 // import com.google.type.Color; // ... public static java.awt.Color
2812 // fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ?
2813 // protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color(
2814 // protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); }
2815 // public static Color toProto(java.awt.Color color) { float red = (float)
2816 // color.getRed(); float green = (float) color.getGreen(); float blue = (float)
2817 // color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder =
2818 // Color .newBuilder() .setRed(red / denominator) .setGreen(green /
2819 // denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if
2820 // (alpha != 255) { result.setAlpha( FloatValue .newBuilder()
2821 // .setValue(((float) alpha) / denominator) .build()); } return
2822 // resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static
2823 // UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float
2824 // green = [protocolor green]; float blue = [protocolor blue]; FloatValue*
2825 // alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper !=
2826 // nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red
2827 // green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color)
2828 // { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green
2829 // blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc]
2830 // init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue];
2831 // if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; }
2832 // [result autorelease]; return result; } // ... Example (JavaScript): // ...
2833 // var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red ||
2834 // 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue
2835 // || 0.0; var red = Math.floor(redFrac * 255); var green =
2836 // Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if
2837 // (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var
2838 // alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green,
2839 // blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”);
2840 // }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new
2841 // Number((red << 16) | (green << 8) | blue); var hexString =
2842 // rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var
2843 // resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) {
2844 // resultBuilder.push('0'); } resultBuilder.push(hexString); return
2845 // resultBuilder.join(”); }; // ...
2846 type GoogleTypeColor struct {
2847 // Alpha: The fraction of this color that should be applied to the pixel. That
2848 // is, the final pixel color is defined by the equation: `pixel color = alpha *
2849 // (this color) + (1.0 - alpha) * (background color)` This means that a value
2850 // of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a
2851 // completely transparent color. This uses a wrapper message rather than a
2852 // simple float scalar so that it is possible to distinguish between a default
2853 // value and the value being unset. If omitted, this color object is rendered
2854 // as a solid color (as if the alpha value had been explicitly given a value of
2855 // 1.0).
2856 Alpha float64 `json:"alpha,omitempty"`
2857 // Blue: The amount of blue in the color as a value in the interval [0, 1].
2858 Blue float64 `json:"blue,omitempty"`
2859 // Green: The amount of green in the color as a value in the interval [0, 1].
2860 Green float64 `json:"green,omitempty"`
2861 // Red: The amount of red in the color as a value in the interval [0, 1].
2862 Red float64 `json:"red,omitempty"`
2863 // ForceSendFields is a list of field names (e.g. "Alpha") to unconditionally
2864 // include in API requests. By default, fields with empty or default values are
2865 // omitted from API requests. See
2866 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2867 // details.
2868 ForceSendFields []string `json:"-"`
2869 // NullFields is a list of field names (e.g. "Alpha") to include in API
2870 // requests with the JSON null value. By default, fields with empty values are
2871 // omitted from API requests. See
2872 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2873 NullFields []string `json:"-"`
2874 }
2875
2876 func (s GoogleTypeColor) MarshalJSON() ([]byte, error) {
2877 type NoMethod GoogleTypeColor
2878 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2879 }
2880
2881 func (s *GoogleTypeColor) UnmarshalJSON(data []byte) error {
2882 type NoMethod GoogleTypeColor
2883 var s1 struct {
2884 Alpha gensupport.JSONFloat64 `json:"alpha"`
2885 Blue gensupport.JSONFloat64 `json:"blue"`
2886 Green gensupport.JSONFloat64 `json:"green"`
2887 Red gensupport.JSONFloat64 `json:"red"`
2888 *NoMethod
2889 }
2890 s1.NoMethod = (*NoMethod)(s)
2891 if err := json.Unmarshal(data, &s1); err != nil {
2892 return err
2893 }
2894 s.Alpha = float64(s1.Alpha)
2895 s.Blue = float64(s1.Blue)
2896 s.Green = float64(s1.Green)
2897 s.Red = float64(s1.Red)
2898 return nil
2899 }
2900
2901 // GoogleTypeDate: Represents a whole or partial calendar date, such as a
2902 // birthday. The time of day and time zone are either specified elsewhere or
2903 // are insignificant. The date is relative to the Gregorian Calendar. This can
2904 // represent one of the following: * A full date, with non-zero year, month,
2905 // and day values. * A month and day, with a zero year (for example, an
2906 // anniversary). * A year on its own, with a zero month and a zero day. * A
2907 // year and month, with a zero day (for example, a credit card expiration
2908 // date). Related types: * google.type.TimeOfDay * google.type.DateTime *
2909 // google.protobuf.Timestamp
2910 type GoogleTypeDate struct {
2911 // Day: Day of a month. Must be from 1 to 31 and valid for the year and month,
2912 // or 0 to specify a year by itself or a year and month where the day isn't
2913 // significant.
2914 Day int64 `json:"day,omitempty"`
2915 // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without
2916 // a month and day.
2917 Month int64 `json:"month,omitempty"`
2918 // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date
2919 // without a year.
2920 Year int64 `json:"year,omitempty"`
2921 // ForceSendFields is a list of field names (e.g. "Day") to unconditionally
2922 // include in API requests. By default, fields with empty or default values are
2923 // omitted from API requests. See
2924 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2925 // details.
2926 ForceSendFields []string `json:"-"`
2927 // NullFields is a list of field names (e.g. "Day") to include in API requests
2928 // with the JSON null value. By default, fields with empty values are omitted
2929 // from API requests. See
2930 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2931 NullFields []string `json:"-"`
2932 }
2933
2934 func (s GoogleTypeDate) MarshalJSON() ([]byte, error) {
2935 type NoMethod GoogleTypeDate
2936 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2937 }
2938
2939 type LabelsCreateCall struct {
2940 s *Service
2941 googleappsdrivelabelsv2betalabel *GoogleAppsDriveLabelsV2betaLabel
2942 urlParams_ gensupport.URLParams
2943 ctx_ context.Context
2944 header_ http.Header
2945 }
2946
2947 // Create: Creates a label. For more information, see Create and publish a
2948 // label
2949 // (https://developers.google.com/workspace/drive/labels/guides/create-label).
2950 func (r *LabelsService) Create(googleappsdrivelabelsv2betalabel *GoogleAppsDriveLabelsV2betaLabel) *LabelsCreateCall {
2951 c := &LabelsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2952 c.googleappsdrivelabelsv2betalabel = googleappsdrivelabelsv2betalabel
2953 return c
2954 }
2955
2956 // LanguageCode sets the optional parameter "languageCode": The BCP-47 language
2957 // code to use for evaluating localized field labels in response. When not
2958 // specified, values in the default configured language will be used.
2959 func (c *LabelsCreateCall) LanguageCode(languageCode string) *LabelsCreateCall {
2960 c.urlParams_.Set("languageCode", languageCode)
2961 return c
2962 }
2963
2964 // UseAdminAccess sets the optional parameter "useAdminAccess": Set to `true`
2965 // in order to use the user's admin privileges. The server will verify the user
2966 // is an admin before allowing access.
2967 func (c *LabelsCreateCall) UseAdminAccess(useAdminAccess bool) *LabelsCreateCall {
2968 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
2969 return c
2970 }
2971
2972 // Fields allows partial responses to be retrieved. See
2973 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2974 // details.
2975 func (c *LabelsCreateCall) Fields(s ...googleapi.Field) *LabelsCreateCall {
2976 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2977 return c
2978 }
2979
2980 // Context sets the context to be used in this call's Do method.
2981 func (c *LabelsCreateCall) Context(ctx context.Context) *LabelsCreateCall {
2982 c.ctx_ = ctx
2983 return c
2984 }
2985
2986 // Header returns a http.Header that can be modified by the caller to add
2987 // headers to the request.
2988 func (c *LabelsCreateCall) Header() http.Header {
2989 if c.header_ == nil {
2990 c.header_ = make(http.Header)
2991 }
2992 return c.header_
2993 }
2994
2995 func (c *LabelsCreateCall) doRequest(alt string) (*http.Response, error) {
2996 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2997 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betalabel)
2998 if err != nil {
2999 return nil, err
3000 }
3001 c.urlParams_.Set("alt", alt)
3002 c.urlParams_.Set("prettyPrint", "false")
3003 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/labels")
3004 urls += "?" + c.urlParams_.Encode()
3005 req, err := http.NewRequest("POST", urls, body)
3006 if err != nil {
3007 return nil, err
3008 }
3009 req.Header = reqHeaders
3010 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.create", "request", internallog.HTTPRequest(req, body.Bytes()))
3011 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3012 }
3013
3014 // Do executes the "drivelabels.labels.create" call.
3015 // Any non-2xx status code is an error. Response headers are in either
3016 // *GoogleAppsDriveLabelsV2betaLabel.ServerResponse.Header or (if a response
3017 // was returned at all) in error.(*googleapi.Error).Header. Use
3018 // googleapi.IsNotModified to check whether the returned error was because
3019 // http.StatusNotModified was returned.
3020 func (c *LabelsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, error) {
3021 gensupport.SetOptions(c.urlParams_, opts...)
3022 res, err := c.doRequest("json")
3023 if res != nil && res.StatusCode == http.StatusNotModified {
3024 if res.Body != nil {
3025 res.Body.Close()
3026 }
3027 return nil, gensupport.WrapError(&googleapi.Error{
3028 Code: res.StatusCode,
3029 Header: res.Header,
3030 })
3031 }
3032 if err != nil {
3033 return nil, err
3034 }
3035 defer googleapi.CloseBody(res)
3036 if err := googleapi.CheckResponse(res); err != nil {
3037 return nil, gensupport.WrapError(err)
3038 }
3039 ret := &GoogleAppsDriveLabelsV2betaLabel{
3040 ServerResponse: googleapi.ServerResponse{
3041 Header: res.Header,
3042 HTTPStatusCode: res.StatusCode,
3043 },
3044 }
3045 target := &ret
3046 b, err := gensupport.DecodeResponseBytes(target, res)
3047 if err != nil {
3048 return nil, err
3049 }
3050 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.create", "response", internallog.HTTPResponse(res, b))
3051 return ret, nil
3052 }
3053
3054 type LabelsDeleteCall struct {
3055 s *Service
3056 name string
3057 urlParams_ gensupport.URLParams
3058 ctx_ context.Context
3059 header_ http.Header
3060 }
3061
3062 // Delete: Permanently deletes a label and related metadata on Drive items. For
3063 // more information, see Disable, enable, and delete a label
3064 // (https://developers.google.com/workspace/drive/labels/guides/disable-delete-label).
3065 // Once deleted, the label and related Drive item metadata will be deleted.
3066 // Only draft labels and disabled labels may be deleted.
3067 //
3068 // - name: Label resource name.
3069 func (r *LabelsService) Delete(name string) *LabelsDeleteCall {
3070 c := &LabelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3071 c.name = name
3072 return c
3073 }
3074
3075 // UseAdminAccess sets the optional parameter "useAdminAccess": Set to `true`
3076 // in order to use the user's admin credentials. The server will verify the
3077 // user is an admin for the label before allowing access.
3078 func (c *LabelsDeleteCall) UseAdminAccess(useAdminAccess bool) *LabelsDeleteCall {
3079 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
3080 return c
3081 }
3082
3083 // WriteControlRequiredRevisionId sets the optional parameter
3084 // "writeControl.requiredRevisionId": The revision ID of the label that the
3085 // write request will be applied to. If this isn't the latest revision of the
3086 // label, the request will not be processed and will return a 400 Bad Request
3087 // error.
3088 func (c *LabelsDeleteCall) WriteControlRequiredRevisionId(writeControlRequiredRevisionId string) *LabelsDeleteCall {
3089 c.urlParams_.Set("writeControl.requiredRevisionId", writeControlRequiredRevisionId)
3090 return c
3091 }
3092
3093 // Fields allows partial responses to be retrieved. See
3094 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3095 // details.
3096 func (c *LabelsDeleteCall) Fields(s ...googleapi.Field) *LabelsDeleteCall {
3097 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3098 return c
3099 }
3100
3101 // Context sets the context to be used in this call's Do method.
3102 func (c *LabelsDeleteCall) Context(ctx context.Context) *LabelsDeleteCall {
3103 c.ctx_ = ctx
3104 return c
3105 }
3106
3107 // Header returns a http.Header that can be modified by the caller to add
3108 // headers to the request.
3109 func (c *LabelsDeleteCall) Header() http.Header {
3110 if c.header_ == nil {
3111 c.header_ = make(http.Header)
3112 }
3113 return c.header_
3114 }
3115
3116 func (c *LabelsDeleteCall) doRequest(alt string) (*http.Response, error) {
3117 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3118 c.urlParams_.Set("alt", alt)
3119 c.urlParams_.Set("prettyPrint", "false")
3120 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}")
3121 urls += "?" + c.urlParams_.Encode()
3122 req, err := http.NewRequest("DELETE", urls, nil)
3123 if err != nil {
3124 return nil, err
3125 }
3126 req.Header = reqHeaders
3127 googleapi.Expand(req.URL, map[string]string{
3128 "name": c.name,
3129 })
3130 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.delete", "request", internallog.HTTPRequest(req, nil))
3131 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3132 }
3133
3134 // Do executes the "drivelabels.labels.delete" call.
3135 // Any non-2xx status code is an error. Response headers are in either
3136 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
3137 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3138 // check whether the returned error was because http.StatusNotModified was
3139 // returned.
3140 func (c *LabelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
3141 gensupport.SetOptions(c.urlParams_, opts...)
3142 res, err := c.doRequest("json")
3143 if res != nil && res.StatusCode == http.StatusNotModified {
3144 if res.Body != nil {
3145 res.Body.Close()
3146 }
3147 return nil, gensupport.WrapError(&googleapi.Error{
3148 Code: res.StatusCode,
3149 Header: res.Header,
3150 })
3151 }
3152 if err != nil {
3153 return nil, err
3154 }
3155 defer googleapi.CloseBody(res)
3156 if err := googleapi.CheckResponse(res); err != nil {
3157 return nil, gensupport.WrapError(err)
3158 }
3159 ret := &GoogleProtobufEmpty{
3160 ServerResponse: googleapi.ServerResponse{
3161 Header: res.Header,
3162 HTTPStatusCode: res.StatusCode,
3163 },
3164 }
3165 target := &ret
3166 b, err := gensupport.DecodeResponseBytes(target, res)
3167 if err != nil {
3168 return nil, err
3169 }
3170 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.delete", "response", internallog.HTTPResponse(res, b))
3171 return ret, nil
3172 }
3173
3174 type LabelsDeltaCall struct {
3175 s *Service
3176 name string
3177 googleappsdrivelabelsv2betadeltaupdatelabelrequest *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest
3178 urlParams_ gensupport.URLParams
3179 ctx_ context.Context
3180 header_ http.Header
3181 }
3182
3183 // Delta: Updates a single label by applying a set of update requests resulting
3184 // in a new draft revision. For more information, see Update a label
3185 // (https://developers.google.com/workspace/drive/labels/guides/update-label).
3186 // The batch update is all-or-nothing: If any of the update requests are
3187 // invalid, no changes are applied. The resulting draft revision must be
3188 // published before the changes may be used with Drive items.
3189 //
3190 // - name: The resource name of the label to update.
3191 func (r *LabelsService) Delta(name string, googleappsdrivelabelsv2betadeltaupdatelabelrequest *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelRequest) *LabelsDeltaCall {
3192 c := &LabelsDeltaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3193 c.name = name
3194 c.googleappsdrivelabelsv2betadeltaupdatelabelrequest = googleappsdrivelabelsv2betadeltaupdatelabelrequest
3195 return c
3196 }
3197
3198 // Fields allows partial responses to be retrieved. See
3199 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3200 // details.
3201 func (c *LabelsDeltaCall) Fields(s ...googleapi.Field) *LabelsDeltaCall {
3202 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3203 return c
3204 }
3205
3206 // Context sets the context to be used in this call's Do method.
3207 func (c *LabelsDeltaCall) Context(ctx context.Context) *LabelsDeltaCall {
3208 c.ctx_ = ctx
3209 return c
3210 }
3211
3212 // Header returns a http.Header that can be modified by the caller to add
3213 // headers to the request.
3214 func (c *LabelsDeltaCall) Header() http.Header {
3215 if c.header_ == nil {
3216 c.header_ = make(http.Header)
3217 }
3218 return c.header_
3219 }
3220
3221 func (c *LabelsDeltaCall) doRequest(alt string) (*http.Response, error) {
3222 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3223 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betadeltaupdatelabelrequest)
3224 if err != nil {
3225 return nil, err
3226 }
3227 c.urlParams_.Set("alt", alt)
3228 c.urlParams_.Set("prettyPrint", "false")
3229 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:delta")
3230 urls += "?" + c.urlParams_.Encode()
3231 req, err := http.NewRequest("POST", urls, body)
3232 if err != nil {
3233 return nil, err
3234 }
3235 req.Header = reqHeaders
3236 googleapi.Expand(req.URL, map[string]string{
3237 "name": c.name,
3238 })
3239 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.delta", "request", internallog.HTTPRequest(req, body.Bytes()))
3240 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3241 }
3242
3243 // Do executes the "drivelabels.labels.delta" call.
3244 // Any non-2xx status code is an error. Response headers are in either
3245 // *GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse.ServerResponse.Header
3246 // or (if a response was returned at all) in error.(*googleapi.Error).Header.
3247 // Use googleapi.IsNotModified to check whether the returned error was because
3248 // http.StatusNotModified was returned.
3249 func (c *LabelsDeltaCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse, error) {
3250 gensupport.SetOptions(c.urlParams_, opts...)
3251 res, err := c.doRequest("json")
3252 if res != nil && res.StatusCode == http.StatusNotModified {
3253 if res.Body != nil {
3254 res.Body.Close()
3255 }
3256 return nil, gensupport.WrapError(&googleapi.Error{
3257 Code: res.StatusCode,
3258 Header: res.Header,
3259 })
3260 }
3261 if err != nil {
3262 return nil, err
3263 }
3264 defer googleapi.CloseBody(res)
3265 if err := googleapi.CheckResponse(res); err != nil {
3266 return nil, gensupport.WrapError(err)
3267 }
3268 ret := &GoogleAppsDriveLabelsV2betaDeltaUpdateLabelResponse{
3269 ServerResponse: googleapi.ServerResponse{
3270 Header: res.Header,
3271 HTTPStatusCode: res.StatusCode,
3272 },
3273 }
3274 target := &ret
3275 b, err := gensupport.DecodeResponseBytes(target, res)
3276 if err != nil {
3277 return nil, err
3278 }
3279 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.delta", "response", internallog.HTTPResponse(res, b))
3280 return ret, nil
3281 }
3282
3283 type LabelsDisableCall struct {
3284 s *Service
3285 name string
3286 googleappsdrivelabelsv2betadisablelabelrequest *GoogleAppsDriveLabelsV2betaDisableLabelRequest
3287 urlParams_ gensupport.URLParams
3288 ctx_ context.Context
3289 header_ http.Header
3290 }
3291
3292 // Disable: Disable a published label. For more information, see Disable,
3293 // enable, and delete a label
3294 // (https://developers.google.com/workspace/drive/labels/guides/disable-delete-label).
3295 // Disabling a label will result in a new disabled published revision based on
3296 // the current published revision. If there's a draft revision, a new disabled
3297 // draft revision will be created based on the latest draft revision. Older
3298 // draft revisions will be deleted. Once disabled, a label may be deleted with
3299 // `DeleteLabel`.
3300 //
3301 // - name: Label resource name.
3302 func (r *LabelsService) Disable(name string, googleappsdrivelabelsv2betadisablelabelrequest *GoogleAppsDriveLabelsV2betaDisableLabelRequest) *LabelsDisableCall {
3303 c := &LabelsDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3304 c.name = name
3305 c.googleappsdrivelabelsv2betadisablelabelrequest = googleappsdrivelabelsv2betadisablelabelrequest
3306 return c
3307 }
3308
3309 // Fields allows partial responses to be retrieved. See
3310 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3311 // details.
3312 func (c *LabelsDisableCall) Fields(s ...googleapi.Field) *LabelsDisableCall {
3313 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3314 return c
3315 }
3316
3317 // Context sets the context to be used in this call's Do method.
3318 func (c *LabelsDisableCall) Context(ctx context.Context) *LabelsDisableCall {
3319 c.ctx_ = ctx
3320 return c
3321 }
3322
3323 // Header returns a http.Header that can be modified by the caller to add
3324 // headers to the request.
3325 func (c *LabelsDisableCall) Header() http.Header {
3326 if c.header_ == nil {
3327 c.header_ = make(http.Header)
3328 }
3329 return c.header_
3330 }
3331
3332 func (c *LabelsDisableCall) doRequest(alt string) (*http.Response, error) {
3333 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3334 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betadisablelabelrequest)
3335 if err != nil {
3336 return nil, err
3337 }
3338 c.urlParams_.Set("alt", alt)
3339 c.urlParams_.Set("prettyPrint", "false")
3340 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:disable")
3341 urls += "?" + c.urlParams_.Encode()
3342 req, err := http.NewRequest("POST", urls, body)
3343 if err != nil {
3344 return nil, err
3345 }
3346 req.Header = reqHeaders
3347 googleapi.Expand(req.URL, map[string]string{
3348 "name": c.name,
3349 })
3350 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.disable", "request", internallog.HTTPRequest(req, body.Bytes()))
3351 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3352 }
3353
3354 // Do executes the "drivelabels.labels.disable" call.
3355 // Any non-2xx status code is an error. Response headers are in either
3356 // *GoogleAppsDriveLabelsV2betaLabel.ServerResponse.Header or (if a response
3357 // was returned at all) in error.(*googleapi.Error).Header. Use
3358 // googleapi.IsNotModified to check whether the returned error was because
3359 // http.StatusNotModified was returned.
3360 func (c *LabelsDisableCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, error) {
3361 gensupport.SetOptions(c.urlParams_, opts...)
3362 res, err := c.doRequest("json")
3363 if res != nil && res.StatusCode == http.StatusNotModified {
3364 if res.Body != nil {
3365 res.Body.Close()
3366 }
3367 return nil, gensupport.WrapError(&googleapi.Error{
3368 Code: res.StatusCode,
3369 Header: res.Header,
3370 })
3371 }
3372 if err != nil {
3373 return nil, err
3374 }
3375 defer googleapi.CloseBody(res)
3376 if err := googleapi.CheckResponse(res); err != nil {
3377 return nil, gensupport.WrapError(err)
3378 }
3379 ret := &GoogleAppsDriveLabelsV2betaLabel{
3380 ServerResponse: googleapi.ServerResponse{
3381 Header: res.Header,
3382 HTTPStatusCode: res.StatusCode,
3383 },
3384 }
3385 target := &ret
3386 b, err := gensupport.DecodeResponseBytes(target, res)
3387 if err != nil {
3388 return nil, err
3389 }
3390 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.disable", "response", internallog.HTTPResponse(res, b))
3391 return ret, nil
3392 }
3393
3394 type LabelsEnableCall struct {
3395 s *Service
3396 name string
3397 googleappsdrivelabelsv2betaenablelabelrequest *GoogleAppsDriveLabelsV2betaEnableLabelRequest
3398 urlParams_ gensupport.URLParams
3399 ctx_ context.Context
3400 header_ http.Header
3401 }
3402
3403 // Enable: Enable a disabled label and restore it to its published state. For
3404 // more information, see Disable, enable, and delete a label
3405 // (https://developers.google.com/workspace/drive/labels/guides/disable-delete-label).
3406 // This will result in a new published revision based on the current disabled
3407 // published revision. If there's an existing disabled draft revision, a new
3408 // revision will be created based on that draft and will be enabled.
3409 //
3410 // - name: Label resource name.
3411 func (r *LabelsService) Enable(name string, googleappsdrivelabelsv2betaenablelabelrequest *GoogleAppsDriveLabelsV2betaEnableLabelRequest) *LabelsEnableCall {
3412 c := &LabelsEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3413 c.name = name
3414 c.googleappsdrivelabelsv2betaenablelabelrequest = googleappsdrivelabelsv2betaenablelabelrequest
3415 return c
3416 }
3417
3418 // Fields allows partial responses to be retrieved. See
3419 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3420 // details.
3421 func (c *LabelsEnableCall) Fields(s ...googleapi.Field) *LabelsEnableCall {
3422 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3423 return c
3424 }
3425
3426 // Context sets the context to be used in this call's Do method.
3427 func (c *LabelsEnableCall) Context(ctx context.Context) *LabelsEnableCall {
3428 c.ctx_ = ctx
3429 return c
3430 }
3431
3432 // Header returns a http.Header that can be modified by the caller to add
3433 // headers to the request.
3434 func (c *LabelsEnableCall) Header() http.Header {
3435 if c.header_ == nil {
3436 c.header_ = make(http.Header)
3437 }
3438 return c.header_
3439 }
3440
3441 func (c *LabelsEnableCall) doRequest(alt string) (*http.Response, error) {
3442 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3443 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betaenablelabelrequest)
3444 if err != nil {
3445 return nil, err
3446 }
3447 c.urlParams_.Set("alt", alt)
3448 c.urlParams_.Set("prettyPrint", "false")
3449 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:enable")
3450 urls += "?" + c.urlParams_.Encode()
3451 req, err := http.NewRequest("POST", urls, body)
3452 if err != nil {
3453 return nil, err
3454 }
3455 req.Header = reqHeaders
3456 googleapi.Expand(req.URL, map[string]string{
3457 "name": c.name,
3458 })
3459 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.enable", "request", internallog.HTTPRequest(req, body.Bytes()))
3460 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3461 }
3462
3463 // Do executes the "drivelabels.labels.enable" call.
3464 // Any non-2xx status code is an error. Response headers are in either
3465 // *GoogleAppsDriveLabelsV2betaLabel.ServerResponse.Header or (if a response
3466 // was returned at all) in error.(*googleapi.Error).Header. Use
3467 // googleapi.IsNotModified to check whether the returned error was because
3468 // http.StatusNotModified was returned.
3469 func (c *LabelsEnableCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, error) {
3470 gensupport.SetOptions(c.urlParams_, opts...)
3471 res, err := c.doRequest("json")
3472 if res != nil && res.StatusCode == http.StatusNotModified {
3473 if res.Body != nil {
3474 res.Body.Close()
3475 }
3476 return nil, gensupport.WrapError(&googleapi.Error{
3477 Code: res.StatusCode,
3478 Header: res.Header,
3479 })
3480 }
3481 if err != nil {
3482 return nil, err
3483 }
3484 defer googleapi.CloseBody(res)
3485 if err := googleapi.CheckResponse(res); err != nil {
3486 return nil, gensupport.WrapError(err)
3487 }
3488 ret := &GoogleAppsDriveLabelsV2betaLabel{
3489 ServerResponse: googleapi.ServerResponse{
3490 Header: res.Header,
3491 HTTPStatusCode: res.StatusCode,
3492 },
3493 }
3494 target := &ret
3495 b, err := gensupport.DecodeResponseBytes(target, res)
3496 if err != nil {
3497 return nil, err
3498 }
3499 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.enable", "response", internallog.HTTPResponse(res, b))
3500 return ret, nil
3501 }
3502
3503 type LabelsGetCall struct {
3504 s *Service
3505 name string
3506 urlParams_ gensupport.URLParams
3507 ifNoneMatch_ string
3508 ctx_ context.Context
3509 header_ http.Header
3510 }
3511
3512 // Get: Get a label by its resource name. For more information, see Search for
3513 // labels
3514 // (https://developers.google.com/workspace/drive/labels/guides/search-label).
3515 // Resource name may be any of: * `labels/{id}` - See `labels/{id}@latest` *
3516 // `labels/{id}@latest` - Gets the latest revision of the label. *
3517 // `labels/{id}@published` - Gets the current published revision of the label.
3518 // * `labels/{id}@{revision_id}` - Gets the label at the specified revision ID.
3519 //
3520 // - name: Label resource name. May be any of: * `labels/{id}` (equivalent to
3521 // labels/{id}@latest) * `labels/{id}@latest` * `labels/{id}@published` *
3522 // `labels/{id}@{revision_id}`.
3523 func (r *LabelsService) Get(name string) *LabelsGetCall {
3524 c := &LabelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3525 c.name = name
3526 return c
3527 }
3528
3529 // LanguageCode sets the optional parameter "languageCode": The BCP-47 language
3530 // code to use for evaluating localized field labels. When not specified,
3531 // values in the default configured language are used.
3532 func (c *LabelsGetCall) LanguageCode(languageCode string) *LabelsGetCall {
3533 c.urlParams_.Set("languageCode", languageCode)
3534 return c
3535 }
3536
3537 // UseAdminAccess sets the optional parameter "useAdminAccess": Set to `true`
3538 // in order to use the user's admin credentials. The server verifies that the
3539 // user is an admin for the label before allowing access.
3540 func (c *LabelsGetCall) UseAdminAccess(useAdminAccess bool) *LabelsGetCall {
3541 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
3542 return c
3543 }
3544
3545 // View sets the optional parameter "view": When specified, only certain fields
3546 // belonging to the indicated view are returned.
3547 //
3548 // Possible values:
3549 //
3550 // "LABEL_VIEW_BASIC" - Implies the field mask:
3551 //
3552 // `name,id,revision_id,label_type,properties.*`
3553 //
3554 // "LABEL_VIEW_FULL" - All possible fields.
3555 func (c *LabelsGetCall) View(view string) *LabelsGetCall {
3556 c.urlParams_.Set("view", view)
3557 return c
3558 }
3559
3560 // Fields allows partial responses to be retrieved. See
3561 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3562 // details.
3563 func (c *LabelsGetCall) Fields(s ...googleapi.Field) *LabelsGetCall {
3564 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3565 return c
3566 }
3567
3568 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3569 // object's ETag matches the given value. This is useful for getting updates
3570 // only after the object has changed since the last request.
3571 func (c *LabelsGetCall) IfNoneMatch(entityTag string) *LabelsGetCall {
3572 c.ifNoneMatch_ = entityTag
3573 return c
3574 }
3575
3576 // Context sets the context to be used in this call's Do method.
3577 func (c *LabelsGetCall) Context(ctx context.Context) *LabelsGetCall {
3578 c.ctx_ = ctx
3579 return c
3580 }
3581
3582 // Header returns a http.Header that can be modified by the caller to add
3583 // headers to the request.
3584 func (c *LabelsGetCall) Header() http.Header {
3585 if c.header_ == nil {
3586 c.header_ = make(http.Header)
3587 }
3588 return c.header_
3589 }
3590
3591 func (c *LabelsGetCall) doRequest(alt string) (*http.Response, error) {
3592 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3593 if c.ifNoneMatch_ != "" {
3594 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3595 }
3596 c.urlParams_.Set("alt", alt)
3597 c.urlParams_.Set("prettyPrint", "false")
3598 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}")
3599 urls += "?" + c.urlParams_.Encode()
3600 req, err := http.NewRequest("GET", urls, nil)
3601 if err != nil {
3602 return nil, err
3603 }
3604 req.Header = reqHeaders
3605 googleapi.Expand(req.URL, map[string]string{
3606 "name": c.name,
3607 })
3608 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.get", "request", internallog.HTTPRequest(req, nil))
3609 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3610 }
3611
3612 // Do executes the "drivelabels.labels.get" call.
3613 // Any non-2xx status code is an error. Response headers are in either
3614 // *GoogleAppsDriveLabelsV2betaLabel.ServerResponse.Header or (if a response
3615 // was returned at all) in error.(*googleapi.Error).Header. Use
3616 // googleapi.IsNotModified to check whether the returned error was because
3617 // http.StatusNotModified was returned.
3618 func (c *LabelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, error) {
3619 gensupport.SetOptions(c.urlParams_, opts...)
3620 res, err := c.doRequest("json")
3621 if res != nil && res.StatusCode == http.StatusNotModified {
3622 if res.Body != nil {
3623 res.Body.Close()
3624 }
3625 return nil, gensupport.WrapError(&googleapi.Error{
3626 Code: res.StatusCode,
3627 Header: res.Header,
3628 })
3629 }
3630 if err != nil {
3631 return nil, err
3632 }
3633 defer googleapi.CloseBody(res)
3634 if err := googleapi.CheckResponse(res); err != nil {
3635 return nil, gensupport.WrapError(err)
3636 }
3637 ret := &GoogleAppsDriveLabelsV2betaLabel{
3638 ServerResponse: googleapi.ServerResponse{
3639 Header: res.Header,
3640 HTTPStatusCode: res.StatusCode,
3641 },
3642 }
3643 target := &ret
3644 b, err := gensupport.DecodeResponseBytes(target, res)
3645 if err != nil {
3646 return nil, err
3647 }
3648 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.get", "response", internallog.HTTPResponse(res, b))
3649 return ret, nil
3650 }
3651
3652 type LabelsListCall struct {
3653 s *Service
3654 urlParams_ gensupport.URLParams
3655 ifNoneMatch_ string
3656 ctx_ context.Context
3657 header_ http.Header
3658 }
3659
3660 // List: List labels. For more information, see Search for labels
3661 // (https://developers.google.com/workspace/drive/labels/guides/search-label).
3662 func (r *LabelsService) List() *LabelsListCall {
3663 c := &LabelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3664 return c
3665 }
3666
3667 // Customer sets the optional parameter "customer": The customer to scope this
3668 // list request to. For example: `customers/abcd1234`. If unset, will return
3669 // all labels within the current customer.
3670 func (c *LabelsListCall) Customer(customer string) *LabelsListCall {
3671 c.urlParams_.Set("customer", customer)
3672 return c
3673 }
3674
3675 // LanguageCode sets the optional parameter "languageCode": The BCP-47 language
3676 // code to use for evaluating localized field labels. When not specified,
3677 // values in the default configured language are used.
3678 func (c *LabelsListCall) LanguageCode(languageCode string) *LabelsListCall {
3679 c.urlParams_.Set("languageCode", languageCode)
3680 return c
3681 }
3682
3683 // MinimumRole sets the optional parameter "minimumRole": Specifies the level
3684 // of access the user must have on the returned labels. The minimum role a user
3685 // must have on a label. Defaults to `READER`.
3686 //
3687 // Possible values:
3688 //
3689 // "LABEL_ROLE_UNSPECIFIED" - Unknown role.
3690 // "READER" - A reader can read the label and associated metadata applied to
3691 //
3692 // Drive items.
3693 //
3694 // "APPLIER" - An applier can write associated metadata on Drive items in
3695 //
3696 // which they also have write access to. Implies `READER`.
3697 //
3698 // "ORGANIZER" - An organizer can pin this label in shared drives they manage
3699 //
3700 // and add new appliers to the label.
3701 //
3702 // "EDITOR" - Editors can make any update including deleting the label which
3703 //
3704 // also deletes the associated Drive item metadata. Implies `APPLIER`.
3705 func (c *LabelsListCall) MinimumRole(minimumRole string) *LabelsListCall {
3706 c.urlParams_.Set("minimumRole", minimumRole)
3707 return c
3708 }
3709
3710 // PageSize sets the optional parameter "pageSize": Maximum number of labels to
3711 // return per page. Default: 50. Max: 200.
3712 func (c *LabelsListCall) PageSize(pageSize int64) *LabelsListCall {
3713 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3714 return c
3715 }
3716
3717 // PageToken sets the optional parameter "pageToken": The token of the page to
3718 // return.
3719 func (c *LabelsListCall) PageToken(pageToken string) *LabelsListCall {
3720 c.urlParams_.Set("pageToken", pageToken)
3721 return c
3722 }
3723
3724 // PublishedOnly sets the optional parameter "publishedOnly": Whether to
3725 // include only published labels in the results. * When `true`, only the
3726 // current published label revisions are returned. Disabled labels are
3727 // included. Returned label resource names reference the published revision
3728 // (`labels/{id}/{revision_id}`). * When `false`, the current label revisions
3729 // are returned, which might not be published. Returned label resource names
3730 // don't reference a specific revision (`labels/{id}`).
3731 func (c *LabelsListCall) PublishedOnly(publishedOnly bool) *LabelsListCall {
3732 c.urlParams_.Set("publishedOnly", fmt.Sprint(publishedOnly))
3733 return c
3734 }
3735
3736 // UseAdminAccess sets the optional parameter "useAdminAccess": Set to `true`
3737 // in order to use the user's admin credentials. This will return all labels
3738 // within the customer.
3739 func (c *LabelsListCall) UseAdminAccess(useAdminAccess bool) *LabelsListCall {
3740 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
3741 return c
3742 }
3743
3744 // View sets the optional parameter "view": When specified, only certain fields
3745 // belonging to the indicated view are returned.
3746 //
3747 // Possible values:
3748 //
3749 // "LABEL_VIEW_BASIC" - Implies the field mask:
3750 //
3751 // `name,id,revision_id,label_type,properties.*`
3752 //
3753 // "LABEL_VIEW_FULL" - All possible fields.
3754 func (c *LabelsListCall) View(view string) *LabelsListCall {
3755 c.urlParams_.Set("view", view)
3756 return c
3757 }
3758
3759 // Fields allows partial responses to be retrieved. See
3760 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3761 // details.
3762 func (c *LabelsListCall) Fields(s ...googleapi.Field) *LabelsListCall {
3763 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3764 return c
3765 }
3766
3767 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3768 // object's ETag matches the given value. This is useful for getting updates
3769 // only after the object has changed since the last request.
3770 func (c *LabelsListCall) IfNoneMatch(entityTag string) *LabelsListCall {
3771 c.ifNoneMatch_ = entityTag
3772 return c
3773 }
3774
3775 // Context sets the context to be used in this call's Do method.
3776 func (c *LabelsListCall) Context(ctx context.Context) *LabelsListCall {
3777 c.ctx_ = ctx
3778 return c
3779 }
3780
3781 // Header returns a http.Header that can be modified by the caller to add
3782 // headers to the request.
3783 func (c *LabelsListCall) Header() http.Header {
3784 if c.header_ == nil {
3785 c.header_ = make(http.Header)
3786 }
3787 return c.header_
3788 }
3789
3790 func (c *LabelsListCall) doRequest(alt string) (*http.Response, error) {
3791 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3792 if c.ifNoneMatch_ != "" {
3793 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3794 }
3795 c.urlParams_.Set("alt", alt)
3796 c.urlParams_.Set("prettyPrint", "false")
3797 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/labels")
3798 urls += "?" + c.urlParams_.Encode()
3799 req, err := http.NewRequest("GET", urls, nil)
3800 if err != nil {
3801 return nil, err
3802 }
3803 req.Header = reqHeaders
3804 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.list", "request", internallog.HTTPRequest(req, nil))
3805 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3806 }
3807
3808 // Do executes the "drivelabels.labels.list" call.
3809 // Any non-2xx status code is an error. Response headers are in either
3810 // *GoogleAppsDriveLabelsV2betaListLabelsResponse.ServerResponse.Header or (if
3811 // a response was returned at all) in error.(*googleapi.Error).Header. Use
3812 // googleapi.IsNotModified to check whether the returned error was because
3813 // http.StatusNotModified was returned.
3814 func (c *LabelsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaListLabelsResponse, error) {
3815 gensupport.SetOptions(c.urlParams_, opts...)
3816 res, err := c.doRequest("json")
3817 if res != nil && res.StatusCode == http.StatusNotModified {
3818 if res.Body != nil {
3819 res.Body.Close()
3820 }
3821 return nil, gensupport.WrapError(&googleapi.Error{
3822 Code: res.StatusCode,
3823 Header: res.Header,
3824 })
3825 }
3826 if err != nil {
3827 return nil, err
3828 }
3829 defer googleapi.CloseBody(res)
3830 if err := googleapi.CheckResponse(res); err != nil {
3831 return nil, gensupport.WrapError(err)
3832 }
3833 ret := &GoogleAppsDriveLabelsV2betaListLabelsResponse{
3834 ServerResponse: googleapi.ServerResponse{
3835 Header: res.Header,
3836 HTTPStatusCode: res.StatusCode,
3837 },
3838 }
3839 target := &ret
3840 b, err := gensupport.DecodeResponseBytes(target, res)
3841 if err != nil {
3842 return nil, err
3843 }
3844 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.list", "response", internallog.HTTPResponse(res, b))
3845 return ret, nil
3846 }
3847
3848 // Pages invokes f for each page of results.
3849 // A non-nil error returned from f will halt the iteration.
3850 // The provided context supersedes any context provided to the Context method.
3851 func (c *LabelsListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2betaListLabelsResponse) error) error {
3852 c.ctx_ = ctx
3853 defer c.PageToken(c.urlParams_.Get("pageToken"))
3854 for {
3855 x, err := c.Do()
3856 if err != nil {
3857 return err
3858 }
3859 if err := f(x); err != nil {
3860 return err
3861 }
3862 if x.NextPageToken == "" {
3863 return nil
3864 }
3865 c.PageToken(x.NextPageToken)
3866 }
3867 }
3868
3869 type LabelsPublishCall struct {
3870 s *Service
3871 name string
3872 googleappsdrivelabelsv2betapublishlabelrequest *GoogleAppsDriveLabelsV2betaPublishLabelRequest
3873 urlParams_ gensupport.URLParams
3874 ctx_ context.Context
3875 header_ http.Header
3876 }
3877
3878 // Publish: Publish all draft changes to the label. Once published, the label
3879 // may not return to its draft state. For more information, see Create and
3880 // publish a label
3881 // (https://developers.google.com/workspace/drive/labels/guides/create-label).
3882 // Publishing a label will result in a new published revision. All previous
3883 // draft revisions will be deleted. Previous published revisions will be kept
3884 // but are subject to automated deletion as needed. For more information, see
3885 // Label lifecycle
3886 // (https://developers.google.com/workspace/drive/labels/guides/label-lifecycle).
3887 // Once published, some changes are no longer permitted. Generally, any change
3888 // that would invalidate or cause new restrictions on existing metadata related
3889 // to the label will be rejected. For example, the following changes to a label
3890 // will be rejected after the label is published: * The label cannot be
3891 // directly deleted. It must be disabled first, then deleted. *
3892 // `Field.FieldType` cannot be changed. * Changes to field validation options
3893 // cannot reject something that was previously accepted. * Reducing the maximum
3894 // entries.
3895 //
3896 // - name: Label resource name.
3897 func (r *LabelsService) Publish(name string, googleappsdrivelabelsv2betapublishlabelrequest *GoogleAppsDriveLabelsV2betaPublishLabelRequest) *LabelsPublishCall {
3898 c := &LabelsPublishCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3899 c.name = name
3900 c.googleappsdrivelabelsv2betapublishlabelrequest = googleappsdrivelabelsv2betapublishlabelrequest
3901 return c
3902 }
3903
3904 // Fields allows partial responses to be retrieved. See
3905 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3906 // details.
3907 func (c *LabelsPublishCall) Fields(s ...googleapi.Field) *LabelsPublishCall {
3908 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3909 return c
3910 }
3911
3912 // Context sets the context to be used in this call's Do method.
3913 func (c *LabelsPublishCall) Context(ctx context.Context) *LabelsPublishCall {
3914 c.ctx_ = ctx
3915 return c
3916 }
3917
3918 // Header returns a http.Header that can be modified by the caller to add
3919 // headers to the request.
3920 func (c *LabelsPublishCall) Header() http.Header {
3921 if c.header_ == nil {
3922 c.header_ = make(http.Header)
3923 }
3924 return c.header_
3925 }
3926
3927 func (c *LabelsPublishCall) doRequest(alt string) (*http.Response, error) {
3928 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3929 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betapublishlabelrequest)
3930 if err != nil {
3931 return nil, err
3932 }
3933 c.urlParams_.Set("alt", alt)
3934 c.urlParams_.Set("prettyPrint", "false")
3935 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:publish")
3936 urls += "?" + c.urlParams_.Encode()
3937 req, err := http.NewRequest("POST", urls, body)
3938 if err != nil {
3939 return nil, err
3940 }
3941 req.Header = reqHeaders
3942 googleapi.Expand(req.URL, map[string]string{
3943 "name": c.name,
3944 })
3945 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.publish", "request", internallog.HTTPRequest(req, body.Bytes()))
3946 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3947 }
3948
3949 // Do executes the "drivelabels.labels.publish" call.
3950 // Any non-2xx status code is an error. Response headers are in either
3951 // *GoogleAppsDriveLabelsV2betaLabel.ServerResponse.Header or (if a response
3952 // was returned at all) in error.(*googleapi.Error).Header. Use
3953 // googleapi.IsNotModified to check whether the returned error was because
3954 // http.StatusNotModified was returned.
3955 func (c *LabelsPublishCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, error) {
3956 gensupport.SetOptions(c.urlParams_, opts...)
3957 res, err := c.doRequest("json")
3958 if res != nil && res.StatusCode == http.StatusNotModified {
3959 if res.Body != nil {
3960 res.Body.Close()
3961 }
3962 return nil, gensupport.WrapError(&googleapi.Error{
3963 Code: res.StatusCode,
3964 Header: res.Header,
3965 })
3966 }
3967 if err != nil {
3968 return nil, err
3969 }
3970 defer googleapi.CloseBody(res)
3971 if err := googleapi.CheckResponse(res); err != nil {
3972 return nil, gensupport.WrapError(err)
3973 }
3974 ret := &GoogleAppsDriveLabelsV2betaLabel{
3975 ServerResponse: googleapi.ServerResponse{
3976 Header: res.Header,
3977 HTTPStatusCode: res.StatusCode,
3978 },
3979 }
3980 target := &ret
3981 b, err := gensupport.DecodeResponseBytes(target, res)
3982 if err != nil {
3983 return nil, err
3984 }
3985 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.publish", "response", internallog.HTTPResponse(res, b))
3986 return ret, nil
3987 }
3988
3989 type LabelsUpdateLabelCopyModeCall struct {
3990 s *Service
3991 name string
3992 googleappsdrivelabelsv2betaupdatelabelcopymoderequest *GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest
3993 urlParams_ gensupport.URLParams
3994 ctx_ context.Context
3995 header_ http.Header
3996 }
3997
3998 // UpdateLabelCopyMode: Updates a label's `CopyMode`. Changes to this policy
3999 // aren't revisioned, don't require publishing, and take effect immediately.
4000 //
4001 // - name: The resource name of the label to update.
4002 func (r *LabelsService) UpdateLabelCopyMode(name string, googleappsdrivelabelsv2betaupdatelabelcopymoderequest *GoogleAppsDriveLabelsV2betaUpdateLabelCopyModeRequest) *LabelsUpdateLabelCopyModeCall {
4003 c := &LabelsUpdateLabelCopyModeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4004 c.name = name
4005 c.googleappsdrivelabelsv2betaupdatelabelcopymoderequest = googleappsdrivelabelsv2betaupdatelabelcopymoderequest
4006 return c
4007 }
4008
4009 // Fields allows partial responses to be retrieved. See
4010 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4011 // details.
4012 func (c *LabelsUpdateLabelCopyModeCall) Fields(s ...googleapi.Field) *LabelsUpdateLabelCopyModeCall {
4013 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4014 return c
4015 }
4016
4017 // Context sets the context to be used in this call's Do method.
4018 func (c *LabelsUpdateLabelCopyModeCall) Context(ctx context.Context) *LabelsUpdateLabelCopyModeCall {
4019 c.ctx_ = ctx
4020 return c
4021 }
4022
4023 // Header returns a http.Header that can be modified by the caller to add
4024 // headers to the request.
4025 func (c *LabelsUpdateLabelCopyModeCall) Header() http.Header {
4026 if c.header_ == nil {
4027 c.header_ = make(http.Header)
4028 }
4029 return c.header_
4030 }
4031
4032 func (c *LabelsUpdateLabelCopyModeCall) doRequest(alt string) (*http.Response, error) {
4033 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4034 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betaupdatelabelcopymoderequest)
4035 if err != nil {
4036 return nil, err
4037 }
4038 c.urlParams_.Set("alt", alt)
4039 c.urlParams_.Set("prettyPrint", "false")
4040 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:updateLabelCopyMode")
4041 urls += "?" + c.urlParams_.Encode()
4042 req, err := http.NewRequest("POST", urls, body)
4043 if err != nil {
4044 return nil, err
4045 }
4046 req.Header = reqHeaders
4047 googleapi.Expand(req.URL, map[string]string{
4048 "name": c.name,
4049 })
4050 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.updateLabelCopyMode", "request", internallog.HTTPRequest(req, body.Bytes()))
4051 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4052 }
4053
4054 // Do executes the "drivelabels.labels.updateLabelCopyMode" call.
4055 // Any non-2xx status code is an error. Response headers are in either
4056 // *GoogleAppsDriveLabelsV2betaLabel.ServerResponse.Header or (if a response
4057 // was returned at all) in error.(*googleapi.Error).Header. Use
4058 // googleapi.IsNotModified to check whether the returned error was because
4059 // http.StatusNotModified was returned.
4060 func (c *LabelsUpdateLabelCopyModeCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, error) {
4061 gensupport.SetOptions(c.urlParams_, opts...)
4062 res, err := c.doRequest("json")
4063 if res != nil && res.StatusCode == http.StatusNotModified {
4064 if res.Body != nil {
4065 res.Body.Close()
4066 }
4067 return nil, gensupport.WrapError(&googleapi.Error{
4068 Code: res.StatusCode,
4069 Header: res.Header,
4070 })
4071 }
4072 if err != nil {
4073 return nil, err
4074 }
4075 defer googleapi.CloseBody(res)
4076 if err := googleapi.CheckResponse(res); err != nil {
4077 return nil, gensupport.WrapError(err)
4078 }
4079 ret := &GoogleAppsDriveLabelsV2betaLabel{
4080 ServerResponse: googleapi.ServerResponse{
4081 Header: res.Header,
4082 HTTPStatusCode: res.StatusCode,
4083 },
4084 }
4085 target := &ret
4086 b, err := gensupport.DecodeResponseBytes(target, res)
4087 if err != nil {
4088 return nil, err
4089 }
4090 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.updateLabelCopyMode", "response", internallog.HTTPResponse(res, b))
4091 return ret, nil
4092 }
4093
4094 type LabelsUpdateLabelEnabledAppSettingsCall struct {
4095 s *Service
4096 name string
4097 googleappsdrivelabelsv2betaupdatelabelenabledappsettingsrequest *GoogleAppsDriveLabelsV2betaUpdateLabelEnabledAppSettingsRequest
4098 urlParams_ gensupport.URLParams
4099 ctx_ context.Context
4100 header_ http.Header
4101 }
4102
4103 // UpdateLabelEnabledAppSettings: Updates a label's `EnabledAppSettings`.
4104 // Enabling a label in a Google Workspace app allows it to be used in that app.
4105 // This change isn't revisioned, doesn't require publishing, and takes effect
4106 // immediately.
4107 //
4108 // - name: The resource name of the label to update. The resource name of the
4109 // label to update.
4110 func (r *LabelsService) UpdateLabelEnabledAppSettings(name string, googleappsdrivelabelsv2betaupdatelabelenabledappsettingsrequest *GoogleAppsDriveLabelsV2betaUpdateLabelEnabledAppSettingsRequest) *LabelsUpdateLabelEnabledAppSettingsCall {
4111 c := &LabelsUpdateLabelEnabledAppSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4112 c.name = name
4113 c.googleappsdrivelabelsv2betaupdatelabelenabledappsettingsrequest = googleappsdrivelabelsv2betaupdatelabelenabledappsettingsrequest
4114 return c
4115 }
4116
4117 // Fields allows partial responses to be retrieved. See
4118 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4119 // details.
4120 func (c *LabelsUpdateLabelEnabledAppSettingsCall) Fields(s ...googleapi.Field) *LabelsUpdateLabelEnabledAppSettingsCall {
4121 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4122 return c
4123 }
4124
4125 // Context sets the context to be used in this call's Do method.
4126 func (c *LabelsUpdateLabelEnabledAppSettingsCall) Context(ctx context.Context) *LabelsUpdateLabelEnabledAppSettingsCall {
4127 c.ctx_ = ctx
4128 return c
4129 }
4130
4131 // Header returns a http.Header that can be modified by the caller to add
4132 // headers to the request.
4133 func (c *LabelsUpdateLabelEnabledAppSettingsCall) Header() http.Header {
4134 if c.header_ == nil {
4135 c.header_ = make(http.Header)
4136 }
4137 return c.header_
4138 }
4139
4140 func (c *LabelsUpdateLabelEnabledAppSettingsCall) doRequest(alt string) (*http.Response, error) {
4141 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4142 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betaupdatelabelenabledappsettingsrequest)
4143 if err != nil {
4144 return nil, err
4145 }
4146 c.urlParams_.Set("alt", alt)
4147 c.urlParams_.Set("prettyPrint", "false")
4148 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:updateLabelEnabledAppSettings")
4149 urls += "?" + c.urlParams_.Encode()
4150 req, err := http.NewRequest("POST", urls, body)
4151 if err != nil {
4152 return nil, err
4153 }
4154 req.Header = reqHeaders
4155 googleapi.Expand(req.URL, map[string]string{
4156 "name": c.name,
4157 })
4158 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.updateLabelEnabledAppSettings", "request", internallog.HTTPRequest(req, body.Bytes()))
4159 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4160 }
4161
4162 // Do executes the "drivelabels.labels.updateLabelEnabledAppSettings" call.
4163 // Any non-2xx status code is an error. Response headers are in either
4164 // *GoogleAppsDriveLabelsV2betaLabel.ServerResponse.Header or (if a response
4165 // was returned at all) in error.(*googleapi.Error).Header. Use
4166 // googleapi.IsNotModified to check whether the returned error was because
4167 // http.StatusNotModified was returned.
4168 func (c *LabelsUpdateLabelEnabledAppSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabel, error) {
4169 gensupport.SetOptions(c.urlParams_, opts...)
4170 res, err := c.doRequest("json")
4171 if res != nil && res.StatusCode == http.StatusNotModified {
4172 if res.Body != nil {
4173 res.Body.Close()
4174 }
4175 return nil, gensupport.WrapError(&googleapi.Error{
4176 Code: res.StatusCode,
4177 Header: res.Header,
4178 })
4179 }
4180 if err != nil {
4181 return nil, err
4182 }
4183 defer googleapi.CloseBody(res)
4184 if err := googleapi.CheckResponse(res); err != nil {
4185 return nil, gensupport.WrapError(err)
4186 }
4187 ret := &GoogleAppsDriveLabelsV2betaLabel{
4188 ServerResponse: googleapi.ServerResponse{
4189 Header: res.Header,
4190 HTTPStatusCode: res.StatusCode,
4191 },
4192 }
4193 target := &ret
4194 b, err := gensupport.DecodeResponseBytes(target, res)
4195 if err != nil {
4196 return nil, err
4197 }
4198 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.updateLabelEnabledAppSettings", "response", internallog.HTTPResponse(res, b))
4199 return ret, nil
4200 }
4201
4202 type LabelsUpdatePermissionsCall struct {
4203 s *Service
4204 parent string
4205 googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission
4206 urlParams_ gensupport.URLParams
4207 ctx_ context.Context
4208 header_ http.Header
4209 }
4210
4211 // UpdatePermissions: Updates a label's permissions. If a permission for the
4212 // indicated principal doesn't exist, a label permission is created, otherwise
4213 // the existing permission is updated. Permissions affect the label resource as
4214 // a whole, aren't revisioned, and don't require publishing.
4215 //
4216 // - parent: The parent label resource name.
4217 func (r *LabelsService) UpdatePermissions(parent string, googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission) *LabelsUpdatePermissionsCall {
4218 c := &LabelsUpdatePermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4219 c.parent = parent
4220 c.googleappsdrivelabelsv2betalabelpermission = googleappsdrivelabelsv2betalabelpermission
4221 return c
4222 }
4223
4224 // UseAdminAccess sets the optional parameter "useAdminAccess": Set to `true`
4225 // in order to use the user's admin credentials. The server will verify the
4226 // user is an admin for the label before allowing access.
4227 func (c *LabelsUpdatePermissionsCall) UseAdminAccess(useAdminAccess bool) *LabelsUpdatePermissionsCall {
4228 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
4229 return c
4230 }
4231
4232 // Fields allows partial responses to be retrieved. See
4233 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4234 // details.
4235 func (c *LabelsUpdatePermissionsCall) Fields(s ...googleapi.Field) *LabelsUpdatePermissionsCall {
4236 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4237 return c
4238 }
4239
4240 // Context sets the context to be used in this call's Do method.
4241 func (c *LabelsUpdatePermissionsCall) Context(ctx context.Context) *LabelsUpdatePermissionsCall {
4242 c.ctx_ = ctx
4243 return c
4244 }
4245
4246 // Header returns a http.Header that can be modified by the caller to add
4247 // headers to the request.
4248 func (c *LabelsUpdatePermissionsCall) Header() http.Header {
4249 if c.header_ == nil {
4250 c.header_ = make(http.Header)
4251 }
4252 return c.header_
4253 }
4254
4255 func (c *LabelsUpdatePermissionsCall) doRequest(alt string) (*http.Response, error) {
4256 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4257 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betalabelpermission)
4258 if err != nil {
4259 return nil, err
4260 }
4261 c.urlParams_.Set("alt", alt)
4262 c.urlParams_.Set("prettyPrint", "false")
4263 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions")
4264 urls += "?" + c.urlParams_.Encode()
4265 req, err := http.NewRequest("PATCH", urls, body)
4266 if err != nil {
4267 return nil, err
4268 }
4269 req.Header = reqHeaders
4270 googleapi.Expand(req.URL, map[string]string{
4271 "parent": c.parent,
4272 })
4273 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.updatePermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
4274 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4275 }
4276
4277 // Do executes the "drivelabels.labels.updatePermissions" call.
4278 // Any non-2xx status code is an error. Response headers are in either
4279 // *GoogleAppsDriveLabelsV2betaLabelPermission.ServerResponse.Header or (if a
4280 // response was returned at all) in error.(*googleapi.Error).Header. Use
4281 // googleapi.IsNotModified to check whether the returned error was because
4282 // http.StatusNotModified was returned.
4283 func (c *LabelsUpdatePermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelPermission, error) {
4284 gensupport.SetOptions(c.urlParams_, opts...)
4285 res, err := c.doRequest("json")
4286 if res != nil && res.StatusCode == http.StatusNotModified {
4287 if res.Body != nil {
4288 res.Body.Close()
4289 }
4290 return nil, gensupport.WrapError(&googleapi.Error{
4291 Code: res.StatusCode,
4292 Header: res.Header,
4293 })
4294 }
4295 if err != nil {
4296 return nil, err
4297 }
4298 defer googleapi.CloseBody(res)
4299 if err := googleapi.CheckResponse(res); err != nil {
4300 return nil, gensupport.WrapError(err)
4301 }
4302 ret := &GoogleAppsDriveLabelsV2betaLabelPermission{
4303 ServerResponse: googleapi.ServerResponse{
4304 Header: res.Header,
4305 HTTPStatusCode: res.StatusCode,
4306 },
4307 }
4308 target := &ret
4309 b, err := gensupport.DecodeResponseBytes(target, res)
4310 if err != nil {
4311 return nil, err
4312 }
4313 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.updatePermissions", "response", internallog.HTTPResponse(res, b))
4314 return ret, nil
4315 }
4316
4317 type LabelsLocksListCall struct {
4318 s *Service
4319 parent string
4320 urlParams_ gensupport.URLParams
4321 ifNoneMatch_ string
4322 ctx_ context.Context
4323 header_ http.Header
4324 }
4325
4326 // List: Lists the label locks on a label.
4327 //
4328 // - parent: Label on which locks are applied. Format: `labels/{label}`.
4329 func (r *LabelsLocksService) List(parent string) *LabelsLocksListCall {
4330 c := &LabelsLocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4331 c.parent = parent
4332 return c
4333 }
4334
4335 // PageSize sets the optional parameter "pageSize": Maximum number of locks to
4336 // return per page. Default: 100. Max: 200.
4337 func (c *LabelsLocksListCall) PageSize(pageSize int64) *LabelsLocksListCall {
4338 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4339 return c
4340 }
4341
4342 // PageToken sets the optional parameter "pageToken": The token of the page to
4343 // return.
4344 func (c *LabelsLocksListCall) PageToken(pageToken string) *LabelsLocksListCall {
4345 c.urlParams_.Set("pageToken", pageToken)
4346 return c
4347 }
4348
4349 // Fields allows partial responses to be retrieved. See
4350 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4351 // details.
4352 func (c *LabelsLocksListCall) Fields(s ...googleapi.Field) *LabelsLocksListCall {
4353 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4354 return c
4355 }
4356
4357 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4358 // object's ETag matches the given value. This is useful for getting updates
4359 // only after the object has changed since the last request.
4360 func (c *LabelsLocksListCall) IfNoneMatch(entityTag string) *LabelsLocksListCall {
4361 c.ifNoneMatch_ = entityTag
4362 return c
4363 }
4364
4365 // Context sets the context to be used in this call's Do method.
4366 func (c *LabelsLocksListCall) Context(ctx context.Context) *LabelsLocksListCall {
4367 c.ctx_ = ctx
4368 return c
4369 }
4370
4371 // Header returns a http.Header that can be modified by the caller to add
4372 // headers to the request.
4373 func (c *LabelsLocksListCall) Header() http.Header {
4374 if c.header_ == nil {
4375 c.header_ = make(http.Header)
4376 }
4377 return c.header_
4378 }
4379
4380 func (c *LabelsLocksListCall) doRequest(alt string) (*http.Response, error) {
4381 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4382 if c.ifNoneMatch_ != "" {
4383 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4384 }
4385 c.urlParams_.Set("alt", alt)
4386 c.urlParams_.Set("prettyPrint", "false")
4387 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/locks")
4388 urls += "?" + c.urlParams_.Encode()
4389 req, err := http.NewRequest("GET", urls, nil)
4390 if err != nil {
4391 return nil, err
4392 }
4393 req.Header = reqHeaders
4394 googleapi.Expand(req.URL, map[string]string{
4395 "parent": c.parent,
4396 })
4397 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.locks.list", "request", internallog.HTTPRequest(req, nil))
4398 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4399 }
4400
4401 // Do executes the "drivelabels.labels.locks.list" call.
4402 // Any non-2xx status code is an error. Response headers are in either
4403 // *GoogleAppsDriveLabelsV2betaListLabelLocksResponse.ServerResponse.Header or
4404 // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
4405 // googleapi.IsNotModified to check whether the returned error was because
4406 // http.StatusNotModified was returned.
4407 func (c *LabelsLocksListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaListLabelLocksResponse, error) {
4408 gensupport.SetOptions(c.urlParams_, opts...)
4409 res, err := c.doRequest("json")
4410 if res != nil && res.StatusCode == http.StatusNotModified {
4411 if res.Body != nil {
4412 res.Body.Close()
4413 }
4414 return nil, gensupport.WrapError(&googleapi.Error{
4415 Code: res.StatusCode,
4416 Header: res.Header,
4417 })
4418 }
4419 if err != nil {
4420 return nil, err
4421 }
4422 defer googleapi.CloseBody(res)
4423 if err := googleapi.CheckResponse(res); err != nil {
4424 return nil, gensupport.WrapError(err)
4425 }
4426 ret := &GoogleAppsDriveLabelsV2betaListLabelLocksResponse{
4427 ServerResponse: googleapi.ServerResponse{
4428 Header: res.Header,
4429 HTTPStatusCode: res.StatusCode,
4430 },
4431 }
4432 target := &ret
4433 b, err := gensupport.DecodeResponseBytes(target, res)
4434 if err != nil {
4435 return nil, err
4436 }
4437 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.locks.list", "response", internallog.HTTPResponse(res, b))
4438 return ret, nil
4439 }
4440
4441 // Pages invokes f for each page of results.
4442 // A non-nil error returned from f will halt the iteration.
4443 // The provided context supersedes any context provided to the Context method.
4444 func (c *LabelsLocksListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2betaListLabelLocksResponse) error) error {
4445 c.ctx_ = ctx
4446 defer c.PageToken(c.urlParams_.Get("pageToken"))
4447 for {
4448 x, err := c.Do()
4449 if err != nil {
4450 return err
4451 }
4452 if err := f(x); err != nil {
4453 return err
4454 }
4455 if x.NextPageToken == "" {
4456 return nil
4457 }
4458 c.PageToken(x.NextPageToken)
4459 }
4460 }
4461
4462 type LabelsPermissionsBatchDeleteCall struct {
4463 s *Service
4464 parent string
4465 googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest
4466 urlParams_ gensupport.URLParams
4467 ctx_ context.Context
4468 header_ http.Header
4469 }
4470
4471 // BatchDelete: Deletes label permissions. Permissions affect the label
4472 // resource as a whole, aren't revisioned, and don't require publishing.
4473 //
4474 // - parent: The parent label resource name shared by all permissions being
4475 // deleted. Format: `labels/{label}`. If this is set, the parent field in the
4476 // `UpdateLabelPermissionRequest` messages must either be empty or match this
4477 // field.
4478 func (r *LabelsPermissionsService) BatchDelete(parent string, googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest) *LabelsPermissionsBatchDeleteCall {
4479 c := &LabelsPermissionsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4480 c.parent = parent
4481 c.googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest = googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest
4482 return c
4483 }
4484
4485 // Fields allows partial responses to be retrieved. See
4486 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4487 // details.
4488 func (c *LabelsPermissionsBatchDeleteCall) Fields(s ...googleapi.Field) *LabelsPermissionsBatchDeleteCall {
4489 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4490 return c
4491 }
4492
4493 // Context sets the context to be used in this call's Do method.
4494 func (c *LabelsPermissionsBatchDeleteCall) Context(ctx context.Context) *LabelsPermissionsBatchDeleteCall {
4495 c.ctx_ = ctx
4496 return c
4497 }
4498
4499 // Header returns a http.Header that can be modified by the caller to add
4500 // headers to the request.
4501 func (c *LabelsPermissionsBatchDeleteCall) Header() http.Header {
4502 if c.header_ == nil {
4503 c.header_ = make(http.Header)
4504 }
4505 return c.header_
4506 }
4507
4508 func (c *LabelsPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
4509 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4510 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest)
4511 if err != nil {
4512 return nil, err
4513 }
4514 c.urlParams_.Set("alt", alt)
4515 c.urlParams_.Set("prettyPrint", "false")
4516 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions:batchDelete")
4517 urls += "?" + c.urlParams_.Encode()
4518 req, err := http.NewRequest("POST", urls, body)
4519 if err != nil {
4520 return nil, err
4521 }
4522 req.Header = reqHeaders
4523 googleapi.Expand(req.URL, map[string]string{
4524 "parent": c.parent,
4525 })
4526 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.permissions.batchDelete", "request", internallog.HTTPRequest(req, body.Bytes()))
4527 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4528 }
4529
4530 // Do executes the "drivelabels.labels.permissions.batchDelete" call.
4531 // Any non-2xx status code is an error. Response headers are in either
4532 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
4533 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4534 // check whether the returned error was because http.StatusNotModified was
4535 // returned.
4536 func (c *LabelsPermissionsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
4537 gensupport.SetOptions(c.urlParams_, opts...)
4538 res, err := c.doRequest("json")
4539 if res != nil && res.StatusCode == http.StatusNotModified {
4540 if res.Body != nil {
4541 res.Body.Close()
4542 }
4543 return nil, gensupport.WrapError(&googleapi.Error{
4544 Code: res.StatusCode,
4545 Header: res.Header,
4546 })
4547 }
4548 if err != nil {
4549 return nil, err
4550 }
4551 defer googleapi.CloseBody(res)
4552 if err := googleapi.CheckResponse(res); err != nil {
4553 return nil, gensupport.WrapError(err)
4554 }
4555 ret := &GoogleProtobufEmpty{
4556 ServerResponse: googleapi.ServerResponse{
4557 Header: res.Header,
4558 HTTPStatusCode: res.StatusCode,
4559 },
4560 }
4561 target := &ret
4562 b, err := gensupport.DecodeResponseBytes(target, res)
4563 if err != nil {
4564 return nil, err
4565 }
4566 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.permissions.batchDelete", "response", internallog.HTTPResponse(res, b))
4567 return ret, nil
4568 }
4569
4570 type LabelsPermissionsBatchUpdateCall struct {
4571 s *Service
4572 parent string
4573 googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest
4574 urlParams_ gensupport.URLParams
4575 ctx_ context.Context
4576 header_ http.Header
4577 }
4578
4579 // BatchUpdate: Updates label permissions. If a permission for the indicated
4580 // principal doesn't exist, a label permission is created, otherwise the
4581 // existing permission is updated. Permissions affect the label resource as a
4582 // whole, aren't revisioned, and don't require publishing.
4583 //
4584 // - parent: The parent label resource name shared by all permissions being
4585 // updated. Format: `labels/{label}`. If this is set, the parent field in the
4586 // `UpdateLabelPermissionRequest` messages must either be empty or match this
4587 // field.
4588 func (r *LabelsPermissionsService) BatchUpdate(parent string, googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest) *LabelsPermissionsBatchUpdateCall {
4589 c := &LabelsPermissionsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4590 c.parent = parent
4591 c.googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest = googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest
4592 return c
4593 }
4594
4595 // Fields allows partial responses to be retrieved. See
4596 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4597 // details.
4598 func (c *LabelsPermissionsBatchUpdateCall) Fields(s ...googleapi.Field) *LabelsPermissionsBatchUpdateCall {
4599 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4600 return c
4601 }
4602
4603 // Context sets the context to be used in this call's Do method.
4604 func (c *LabelsPermissionsBatchUpdateCall) Context(ctx context.Context) *LabelsPermissionsBatchUpdateCall {
4605 c.ctx_ = ctx
4606 return c
4607 }
4608
4609 // Header returns a http.Header that can be modified by the caller to add
4610 // headers to the request.
4611 func (c *LabelsPermissionsBatchUpdateCall) Header() http.Header {
4612 if c.header_ == nil {
4613 c.header_ = make(http.Header)
4614 }
4615 return c.header_
4616 }
4617
4618 func (c *LabelsPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
4619 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4620 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest)
4621 if err != nil {
4622 return nil, err
4623 }
4624 c.urlParams_.Set("alt", alt)
4625 c.urlParams_.Set("prettyPrint", "false")
4626 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions:batchUpdate")
4627 urls += "?" + c.urlParams_.Encode()
4628 req, err := http.NewRequest("POST", urls, body)
4629 if err != nil {
4630 return nil, err
4631 }
4632 req.Header = reqHeaders
4633 googleapi.Expand(req.URL, map[string]string{
4634 "parent": c.parent,
4635 })
4636 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.permissions.batchUpdate", "request", internallog.HTTPRequest(req, body.Bytes()))
4637 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4638 }
4639
4640 // Do executes the "drivelabels.labels.permissions.batchUpdate" call.
4641 // Any non-2xx status code is an error. Response headers are in either
4642 // *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse.ServerRespons
4643 // e.Header or (if a response was returned at all) in
4644 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4645 // whether the returned error was because http.StatusNotModified was returned.
4646 func (c *LabelsPermissionsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse, error) {
4647 gensupport.SetOptions(c.urlParams_, opts...)
4648 res, err := c.doRequest("json")
4649 if res != nil && res.StatusCode == http.StatusNotModified {
4650 if res.Body != nil {
4651 res.Body.Close()
4652 }
4653 return nil, gensupport.WrapError(&googleapi.Error{
4654 Code: res.StatusCode,
4655 Header: res.Header,
4656 })
4657 }
4658 if err != nil {
4659 return nil, err
4660 }
4661 defer googleapi.CloseBody(res)
4662 if err := googleapi.CheckResponse(res); err != nil {
4663 return nil, gensupport.WrapError(err)
4664 }
4665 ret := &GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse{
4666 ServerResponse: googleapi.ServerResponse{
4667 Header: res.Header,
4668 HTTPStatusCode: res.StatusCode,
4669 },
4670 }
4671 target := &ret
4672 b, err := gensupport.DecodeResponseBytes(target, res)
4673 if err != nil {
4674 return nil, err
4675 }
4676 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.permissions.batchUpdate", "response", internallog.HTTPResponse(res, b))
4677 return ret, nil
4678 }
4679
4680 type LabelsPermissionsCreateCall struct {
4681 s *Service
4682 parent string
4683 googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission
4684 urlParams_ gensupport.URLParams
4685 ctx_ context.Context
4686 header_ http.Header
4687 }
4688
4689 // Create: Updates a label's permissions. If a permission for the indicated
4690 // principal doesn't exist, a label permission is created, otherwise the
4691 // existing permission is updated. Permissions affect the label resource as a
4692 // whole, aren't revisioned, and don't require publishing.
4693 //
4694 // - parent: The parent label resource name on the label permission is created.
4695 // Format: `labels/{label}`.
4696 func (r *LabelsPermissionsService) Create(parent string, googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission) *LabelsPermissionsCreateCall {
4697 c := &LabelsPermissionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4698 c.parent = parent
4699 c.googleappsdrivelabelsv2betalabelpermission = googleappsdrivelabelsv2betalabelpermission
4700 return c
4701 }
4702
4703 // UseAdminAccess sets the optional parameter "useAdminAccess": Set to `true`
4704 // in order to use the user's admin credentials. The server will verify the
4705 // user is an admin for the label before allowing access.
4706 func (c *LabelsPermissionsCreateCall) UseAdminAccess(useAdminAccess bool) *LabelsPermissionsCreateCall {
4707 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
4708 return c
4709 }
4710
4711 // Fields allows partial responses to be retrieved. See
4712 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4713 // details.
4714 func (c *LabelsPermissionsCreateCall) Fields(s ...googleapi.Field) *LabelsPermissionsCreateCall {
4715 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4716 return c
4717 }
4718
4719 // Context sets the context to be used in this call's Do method.
4720 func (c *LabelsPermissionsCreateCall) Context(ctx context.Context) *LabelsPermissionsCreateCall {
4721 c.ctx_ = ctx
4722 return c
4723 }
4724
4725 // Header returns a http.Header that can be modified by the caller to add
4726 // headers to the request.
4727 func (c *LabelsPermissionsCreateCall) Header() http.Header {
4728 if c.header_ == nil {
4729 c.header_ = make(http.Header)
4730 }
4731 return c.header_
4732 }
4733
4734 func (c *LabelsPermissionsCreateCall) doRequest(alt string) (*http.Response, error) {
4735 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4736 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betalabelpermission)
4737 if err != nil {
4738 return nil, err
4739 }
4740 c.urlParams_.Set("alt", alt)
4741 c.urlParams_.Set("prettyPrint", "false")
4742 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions")
4743 urls += "?" + c.urlParams_.Encode()
4744 req, err := http.NewRequest("POST", urls, body)
4745 if err != nil {
4746 return nil, err
4747 }
4748 req.Header = reqHeaders
4749 googleapi.Expand(req.URL, map[string]string{
4750 "parent": c.parent,
4751 })
4752 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.permissions.create", "request", internallog.HTTPRequest(req, body.Bytes()))
4753 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4754 }
4755
4756 // Do executes the "drivelabels.labels.permissions.create" call.
4757 // Any non-2xx status code is an error. Response headers are in either
4758 // *GoogleAppsDriveLabelsV2betaLabelPermission.ServerResponse.Header or (if a
4759 // response was returned at all) in error.(*googleapi.Error).Header. Use
4760 // googleapi.IsNotModified to check whether the returned error was because
4761 // http.StatusNotModified was returned.
4762 func (c *LabelsPermissionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelPermission, error) {
4763 gensupport.SetOptions(c.urlParams_, opts...)
4764 res, err := c.doRequest("json")
4765 if res != nil && res.StatusCode == http.StatusNotModified {
4766 if res.Body != nil {
4767 res.Body.Close()
4768 }
4769 return nil, gensupport.WrapError(&googleapi.Error{
4770 Code: res.StatusCode,
4771 Header: res.Header,
4772 })
4773 }
4774 if err != nil {
4775 return nil, err
4776 }
4777 defer googleapi.CloseBody(res)
4778 if err := googleapi.CheckResponse(res); err != nil {
4779 return nil, gensupport.WrapError(err)
4780 }
4781 ret := &GoogleAppsDriveLabelsV2betaLabelPermission{
4782 ServerResponse: googleapi.ServerResponse{
4783 Header: res.Header,
4784 HTTPStatusCode: res.StatusCode,
4785 },
4786 }
4787 target := &ret
4788 b, err := gensupport.DecodeResponseBytes(target, res)
4789 if err != nil {
4790 return nil, err
4791 }
4792 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.permissions.create", "response", internallog.HTTPResponse(res, b))
4793 return ret, nil
4794 }
4795
4796 type LabelsPermissionsDeleteCall struct {
4797 s *Service
4798 name string
4799 urlParams_ gensupport.URLParams
4800 ctx_ context.Context
4801 header_ http.Header
4802 }
4803
4804 // Delete: Deletes a label's permission. Permissions affect the label resource
4805 // as a whole, aren't revisioned, and don't require publishing.
4806 //
4807 // - name: Label permission resource name.
4808 func (r *LabelsPermissionsService) Delete(name string) *LabelsPermissionsDeleteCall {
4809 c := &LabelsPermissionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4810 c.name = name
4811 return c
4812 }
4813
4814 // UseAdminAccess sets the optional parameter "useAdminAccess": Set to `true`
4815 // in order to use the user's admin credentials. The server will verify the
4816 // user is an admin for the label before allowing access.
4817 func (c *LabelsPermissionsDeleteCall) UseAdminAccess(useAdminAccess bool) *LabelsPermissionsDeleteCall {
4818 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
4819 return c
4820 }
4821
4822 // Fields allows partial responses to be retrieved. See
4823 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4824 // details.
4825 func (c *LabelsPermissionsDeleteCall) Fields(s ...googleapi.Field) *LabelsPermissionsDeleteCall {
4826 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4827 return c
4828 }
4829
4830 // Context sets the context to be used in this call's Do method.
4831 func (c *LabelsPermissionsDeleteCall) Context(ctx context.Context) *LabelsPermissionsDeleteCall {
4832 c.ctx_ = ctx
4833 return c
4834 }
4835
4836 // Header returns a http.Header that can be modified by the caller to add
4837 // headers to the request.
4838 func (c *LabelsPermissionsDeleteCall) Header() http.Header {
4839 if c.header_ == nil {
4840 c.header_ = make(http.Header)
4841 }
4842 return c.header_
4843 }
4844
4845 func (c *LabelsPermissionsDeleteCall) doRequest(alt string) (*http.Response, error) {
4846 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4847 c.urlParams_.Set("alt", alt)
4848 c.urlParams_.Set("prettyPrint", "false")
4849 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}")
4850 urls += "?" + c.urlParams_.Encode()
4851 req, err := http.NewRequest("DELETE", urls, nil)
4852 if err != nil {
4853 return nil, err
4854 }
4855 req.Header = reqHeaders
4856 googleapi.Expand(req.URL, map[string]string{
4857 "name": c.name,
4858 })
4859 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.permissions.delete", "request", internallog.HTTPRequest(req, nil))
4860 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4861 }
4862
4863 // Do executes the "drivelabels.labels.permissions.delete" call.
4864 // Any non-2xx status code is an error. Response headers are in either
4865 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
4866 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4867 // check whether the returned error was because http.StatusNotModified was
4868 // returned.
4869 func (c *LabelsPermissionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
4870 gensupport.SetOptions(c.urlParams_, opts...)
4871 res, err := c.doRequest("json")
4872 if res != nil && res.StatusCode == http.StatusNotModified {
4873 if res.Body != nil {
4874 res.Body.Close()
4875 }
4876 return nil, gensupport.WrapError(&googleapi.Error{
4877 Code: res.StatusCode,
4878 Header: res.Header,
4879 })
4880 }
4881 if err != nil {
4882 return nil, err
4883 }
4884 defer googleapi.CloseBody(res)
4885 if err := googleapi.CheckResponse(res); err != nil {
4886 return nil, gensupport.WrapError(err)
4887 }
4888 ret := &GoogleProtobufEmpty{
4889 ServerResponse: googleapi.ServerResponse{
4890 Header: res.Header,
4891 HTTPStatusCode: res.StatusCode,
4892 },
4893 }
4894 target := &ret
4895 b, err := gensupport.DecodeResponseBytes(target, res)
4896 if err != nil {
4897 return nil, err
4898 }
4899 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.permissions.delete", "response", internallog.HTTPResponse(res, b))
4900 return ret, nil
4901 }
4902
4903 type LabelsPermissionsListCall struct {
4904 s *Service
4905 parent string
4906 urlParams_ gensupport.URLParams
4907 ifNoneMatch_ string
4908 ctx_ context.Context
4909 header_ http.Header
4910 }
4911
4912 // List: Lists a label's permissions.
4913 //
4914 // - parent: The parent label resource name on which label permissions are
4915 // listed. Format: `labels/{label}`.
4916 func (r *LabelsPermissionsService) List(parent string) *LabelsPermissionsListCall {
4917 c := &LabelsPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4918 c.parent = parent
4919 return c
4920 }
4921
4922 // PageSize sets the optional parameter "pageSize": Maximum number of
4923 // permissions to return per page. Default: 50. Max: 200.
4924 func (c *LabelsPermissionsListCall) PageSize(pageSize int64) *LabelsPermissionsListCall {
4925 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4926 return c
4927 }
4928
4929 // PageToken sets the optional parameter "pageToken": The token of the page to
4930 // return.
4931 func (c *LabelsPermissionsListCall) PageToken(pageToken string) *LabelsPermissionsListCall {
4932 c.urlParams_.Set("pageToken", pageToken)
4933 return c
4934 }
4935
4936 // UseAdminAccess sets the optional parameter "useAdminAccess": Set to `true`
4937 // in order to use the user's admin credentials. The server will verify the
4938 // user is an admin for the label before allowing access.
4939 func (c *LabelsPermissionsListCall) UseAdminAccess(useAdminAccess bool) *LabelsPermissionsListCall {
4940 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
4941 return c
4942 }
4943
4944 // Fields allows partial responses to be retrieved. See
4945 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4946 // details.
4947 func (c *LabelsPermissionsListCall) Fields(s ...googleapi.Field) *LabelsPermissionsListCall {
4948 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4949 return c
4950 }
4951
4952 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4953 // object's ETag matches the given value. This is useful for getting updates
4954 // only after the object has changed since the last request.
4955 func (c *LabelsPermissionsListCall) IfNoneMatch(entityTag string) *LabelsPermissionsListCall {
4956 c.ifNoneMatch_ = entityTag
4957 return c
4958 }
4959
4960 // Context sets the context to be used in this call's Do method.
4961 func (c *LabelsPermissionsListCall) Context(ctx context.Context) *LabelsPermissionsListCall {
4962 c.ctx_ = ctx
4963 return c
4964 }
4965
4966 // Header returns a http.Header that can be modified by the caller to add
4967 // headers to the request.
4968 func (c *LabelsPermissionsListCall) Header() http.Header {
4969 if c.header_ == nil {
4970 c.header_ = make(http.Header)
4971 }
4972 return c.header_
4973 }
4974
4975 func (c *LabelsPermissionsListCall) doRequest(alt string) (*http.Response, error) {
4976 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4977 if c.ifNoneMatch_ != "" {
4978 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4979 }
4980 c.urlParams_.Set("alt", alt)
4981 c.urlParams_.Set("prettyPrint", "false")
4982 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions")
4983 urls += "?" + c.urlParams_.Encode()
4984 req, err := http.NewRequest("GET", urls, nil)
4985 if err != nil {
4986 return nil, err
4987 }
4988 req.Header = reqHeaders
4989 googleapi.Expand(req.URL, map[string]string{
4990 "parent": c.parent,
4991 })
4992 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.permissions.list", "request", internallog.HTTPRequest(req, nil))
4993 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4994 }
4995
4996 // Do executes the "drivelabels.labels.permissions.list" call.
4997 // Any non-2xx status code is an error. Response headers are in either
4998 // *GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse.ServerResponse.Heade
4999 // r or (if a response was returned at all) in error.(*googleapi.Error).Header.
5000 // Use googleapi.IsNotModified to check whether the returned error was because
5001 // http.StatusNotModified was returned.
5002 func (c *LabelsPermissionsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse, error) {
5003 gensupport.SetOptions(c.urlParams_, opts...)
5004 res, err := c.doRequest("json")
5005 if res != nil && res.StatusCode == http.StatusNotModified {
5006 if res.Body != nil {
5007 res.Body.Close()
5008 }
5009 return nil, gensupport.WrapError(&googleapi.Error{
5010 Code: res.StatusCode,
5011 Header: res.Header,
5012 })
5013 }
5014 if err != nil {
5015 return nil, err
5016 }
5017 defer googleapi.CloseBody(res)
5018 if err := googleapi.CheckResponse(res); err != nil {
5019 return nil, gensupport.WrapError(err)
5020 }
5021 ret := &GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse{
5022 ServerResponse: googleapi.ServerResponse{
5023 Header: res.Header,
5024 HTTPStatusCode: res.StatusCode,
5025 },
5026 }
5027 target := &ret
5028 b, err := gensupport.DecodeResponseBytes(target, res)
5029 if err != nil {
5030 return nil, err
5031 }
5032 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.permissions.list", "response", internallog.HTTPResponse(res, b))
5033 return ret, nil
5034 }
5035
5036 // Pages invokes f for each page of results.
5037 // A non-nil error returned from f will halt the iteration.
5038 // The provided context supersedes any context provided to the Context method.
5039 func (c *LabelsPermissionsListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse) error) error {
5040 c.ctx_ = ctx
5041 defer c.PageToken(c.urlParams_.Get("pageToken"))
5042 for {
5043 x, err := c.Do()
5044 if err != nil {
5045 return err
5046 }
5047 if err := f(x); err != nil {
5048 return err
5049 }
5050 if x.NextPageToken == "" {
5051 return nil
5052 }
5053 c.PageToken(x.NextPageToken)
5054 }
5055 }
5056
5057 type LabelsRevisionsUpdatePermissionsCall struct {
5058 s *Service
5059 parent string
5060 googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission
5061 urlParams_ gensupport.URLParams
5062 ctx_ context.Context
5063 header_ http.Header
5064 }
5065
5066 // UpdatePermissions: Updates a label's permissions. If a permission for the
5067 // indicated principal doesn't exist, a label permission is created, otherwise
5068 // the existing permission is updated. Permissions affect the label resource as
5069 // a whole, aren't revisioned, and don't require publishing.
5070 //
5071 // - parent: The parent label resource name.
5072 func (r *LabelsRevisionsService) UpdatePermissions(parent string, googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission) *LabelsRevisionsUpdatePermissionsCall {
5073 c := &LabelsRevisionsUpdatePermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5074 c.parent = parent
5075 c.googleappsdrivelabelsv2betalabelpermission = googleappsdrivelabelsv2betalabelpermission
5076 return c
5077 }
5078
5079 // UseAdminAccess sets the optional parameter "useAdminAccess": Set to `true`
5080 // in order to use the user's admin credentials. The server will verify the
5081 // user is an admin for the label before allowing access.
5082 func (c *LabelsRevisionsUpdatePermissionsCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsUpdatePermissionsCall {
5083 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
5084 return c
5085 }
5086
5087 // Fields allows partial responses to be retrieved. See
5088 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5089 // details.
5090 func (c *LabelsRevisionsUpdatePermissionsCall) Fields(s ...googleapi.Field) *LabelsRevisionsUpdatePermissionsCall {
5091 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5092 return c
5093 }
5094
5095 // Context sets the context to be used in this call's Do method.
5096 func (c *LabelsRevisionsUpdatePermissionsCall) Context(ctx context.Context) *LabelsRevisionsUpdatePermissionsCall {
5097 c.ctx_ = ctx
5098 return c
5099 }
5100
5101 // Header returns a http.Header that can be modified by the caller to add
5102 // headers to the request.
5103 func (c *LabelsRevisionsUpdatePermissionsCall) Header() http.Header {
5104 if c.header_ == nil {
5105 c.header_ = make(http.Header)
5106 }
5107 return c.header_
5108 }
5109
5110 func (c *LabelsRevisionsUpdatePermissionsCall) doRequest(alt string) (*http.Response, error) {
5111 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5112 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betalabelpermission)
5113 if err != nil {
5114 return nil, err
5115 }
5116 c.urlParams_.Set("alt", alt)
5117 c.urlParams_.Set("prettyPrint", "false")
5118 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions")
5119 urls += "?" + c.urlParams_.Encode()
5120 req, err := http.NewRequest("PATCH", urls, body)
5121 if err != nil {
5122 return nil, err
5123 }
5124 req.Header = reqHeaders
5125 googleapi.Expand(req.URL, map[string]string{
5126 "parent": c.parent,
5127 })
5128 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.updatePermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
5129 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5130 }
5131
5132 // Do executes the "drivelabels.labels.revisions.updatePermissions" call.
5133 // Any non-2xx status code is an error. Response headers are in either
5134 // *GoogleAppsDriveLabelsV2betaLabelPermission.ServerResponse.Header or (if a
5135 // response was returned at all) in error.(*googleapi.Error).Header. Use
5136 // googleapi.IsNotModified to check whether the returned error was because
5137 // http.StatusNotModified was returned.
5138 func (c *LabelsRevisionsUpdatePermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelPermission, error) {
5139 gensupport.SetOptions(c.urlParams_, opts...)
5140 res, err := c.doRequest("json")
5141 if res != nil && res.StatusCode == http.StatusNotModified {
5142 if res.Body != nil {
5143 res.Body.Close()
5144 }
5145 return nil, gensupport.WrapError(&googleapi.Error{
5146 Code: res.StatusCode,
5147 Header: res.Header,
5148 })
5149 }
5150 if err != nil {
5151 return nil, err
5152 }
5153 defer googleapi.CloseBody(res)
5154 if err := googleapi.CheckResponse(res); err != nil {
5155 return nil, gensupport.WrapError(err)
5156 }
5157 ret := &GoogleAppsDriveLabelsV2betaLabelPermission{
5158 ServerResponse: googleapi.ServerResponse{
5159 Header: res.Header,
5160 HTTPStatusCode: res.StatusCode,
5161 },
5162 }
5163 target := &ret
5164 b, err := gensupport.DecodeResponseBytes(target, res)
5165 if err != nil {
5166 return nil, err
5167 }
5168 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.updatePermissions", "response", internallog.HTTPResponse(res, b))
5169 return ret, nil
5170 }
5171
5172 type LabelsRevisionsLocksListCall struct {
5173 s *Service
5174 parent string
5175 urlParams_ gensupport.URLParams
5176 ifNoneMatch_ string
5177 ctx_ context.Context
5178 header_ http.Header
5179 }
5180
5181 // List: Lists the label locks on a label.
5182 //
5183 // - parent: Label on which locks are applied. Format: `labels/{label}`.
5184 func (r *LabelsRevisionsLocksService) List(parent string) *LabelsRevisionsLocksListCall {
5185 c := &LabelsRevisionsLocksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5186 c.parent = parent
5187 return c
5188 }
5189
5190 // PageSize sets the optional parameter "pageSize": Maximum number of locks to
5191 // return per page. Default: 100. Max: 200.
5192 func (c *LabelsRevisionsLocksListCall) PageSize(pageSize int64) *LabelsRevisionsLocksListCall {
5193 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5194 return c
5195 }
5196
5197 // PageToken sets the optional parameter "pageToken": The token of the page to
5198 // return.
5199 func (c *LabelsRevisionsLocksListCall) PageToken(pageToken string) *LabelsRevisionsLocksListCall {
5200 c.urlParams_.Set("pageToken", pageToken)
5201 return c
5202 }
5203
5204 // Fields allows partial responses to be retrieved. See
5205 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5206 // details.
5207 func (c *LabelsRevisionsLocksListCall) Fields(s ...googleapi.Field) *LabelsRevisionsLocksListCall {
5208 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5209 return c
5210 }
5211
5212 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5213 // object's ETag matches the given value. This is useful for getting updates
5214 // only after the object has changed since the last request.
5215 func (c *LabelsRevisionsLocksListCall) IfNoneMatch(entityTag string) *LabelsRevisionsLocksListCall {
5216 c.ifNoneMatch_ = entityTag
5217 return c
5218 }
5219
5220 // Context sets the context to be used in this call's Do method.
5221 func (c *LabelsRevisionsLocksListCall) Context(ctx context.Context) *LabelsRevisionsLocksListCall {
5222 c.ctx_ = ctx
5223 return c
5224 }
5225
5226 // Header returns a http.Header that can be modified by the caller to add
5227 // headers to the request.
5228 func (c *LabelsRevisionsLocksListCall) Header() http.Header {
5229 if c.header_ == nil {
5230 c.header_ = make(http.Header)
5231 }
5232 return c.header_
5233 }
5234
5235 func (c *LabelsRevisionsLocksListCall) doRequest(alt string) (*http.Response, error) {
5236 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5237 if c.ifNoneMatch_ != "" {
5238 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5239 }
5240 c.urlParams_.Set("alt", alt)
5241 c.urlParams_.Set("prettyPrint", "false")
5242 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/locks")
5243 urls += "?" + c.urlParams_.Encode()
5244 req, err := http.NewRequest("GET", urls, nil)
5245 if err != nil {
5246 return nil, err
5247 }
5248 req.Header = reqHeaders
5249 googleapi.Expand(req.URL, map[string]string{
5250 "parent": c.parent,
5251 })
5252 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.locks.list", "request", internallog.HTTPRequest(req, nil))
5253 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5254 }
5255
5256 // Do executes the "drivelabels.labels.revisions.locks.list" call.
5257 // Any non-2xx status code is an error. Response headers are in either
5258 // *GoogleAppsDriveLabelsV2betaListLabelLocksResponse.ServerResponse.Header or
5259 // (if a response was returned at all) in error.(*googleapi.Error).Header. Use
5260 // googleapi.IsNotModified to check whether the returned error was because
5261 // http.StatusNotModified was returned.
5262 func (c *LabelsRevisionsLocksListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaListLabelLocksResponse, error) {
5263 gensupport.SetOptions(c.urlParams_, opts...)
5264 res, err := c.doRequest("json")
5265 if res != nil && res.StatusCode == http.StatusNotModified {
5266 if res.Body != nil {
5267 res.Body.Close()
5268 }
5269 return nil, gensupport.WrapError(&googleapi.Error{
5270 Code: res.StatusCode,
5271 Header: res.Header,
5272 })
5273 }
5274 if err != nil {
5275 return nil, err
5276 }
5277 defer googleapi.CloseBody(res)
5278 if err := googleapi.CheckResponse(res); err != nil {
5279 return nil, gensupport.WrapError(err)
5280 }
5281 ret := &GoogleAppsDriveLabelsV2betaListLabelLocksResponse{
5282 ServerResponse: googleapi.ServerResponse{
5283 Header: res.Header,
5284 HTTPStatusCode: res.StatusCode,
5285 },
5286 }
5287 target := &ret
5288 b, err := gensupport.DecodeResponseBytes(target, res)
5289 if err != nil {
5290 return nil, err
5291 }
5292 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.locks.list", "response", internallog.HTTPResponse(res, b))
5293 return ret, nil
5294 }
5295
5296 // Pages invokes f for each page of results.
5297 // A non-nil error returned from f will halt the iteration.
5298 // The provided context supersedes any context provided to the Context method.
5299 func (c *LabelsRevisionsLocksListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2betaListLabelLocksResponse) error) error {
5300 c.ctx_ = ctx
5301 defer c.PageToken(c.urlParams_.Get("pageToken"))
5302 for {
5303 x, err := c.Do()
5304 if err != nil {
5305 return err
5306 }
5307 if err := f(x); err != nil {
5308 return err
5309 }
5310 if x.NextPageToken == "" {
5311 return nil
5312 }
5313 c.PageToken(x.NextPageToken)
5314 }
5315 }
5316
5317 type LabelsRevisionsPermissionsBatchDeleteCall struct {
5318 s *Service
5319 parent string
5320 googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest
5321 urlParams_ gensupport.URLParams
5322 ctx_ context.Context
5323 header_ http.Header
5324 }
5325
5326 // BatchDelete: Deletes label permissions. Permissions affect the label
5327 // resource as a whole, aren't revisioned, and don't require publishing.
5328 //
5329 // - parent: The parent label resource name shared by all permissions being
5330 // deleted. Format: `labels/{label}`. If this is set, the parent field in the
5331 // `UpdateLabelPermissionRequest` messages must either be empty or match this
5332 // field.
5333 func (r *LabelsRevisionsPermissionsService) BatchDelete(parent string, googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchDeleteLabelPermissionsRequest) *LabelsRevisionsPermissionsBatchDeleteCall {
5334 c := &LabelsRevisionsPermissionsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5335 c.parent = parent
5336 c.googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest = googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest
5337 return c
5338 }
5339
5340 // Fields allows partial responses to be retrieved. See
5341 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5342 // details.
5343 func (c *LabelsRevisionsPermissionsBatchDeleteCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsBatchDeleteCall {
5344 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5345 return c
5346 }
5347
5348 // Context sets the context to be used in this call's Do method.
5349 func (c *LabelsRevisionsPermissionsBatchDeleteCall) Context(ctx context.Context) *LabelsRevisionsPermissionsBatchDeleteCall {
5350 c.ctx_ = ctx
5351 return c
5352 }
5353
5354 // Header returns a http.Header that can be modified by the caller to add
5355 // headers to the request.
5356 func (c *LabelsRevisionsPermissionsBatchDeleteCall) Header() http.Header {
5357 if c.header_ == nil {
5358 c.header_ = make(http.Header)
5359 }
5360 return c.header_
5361 }
5362
5363 func (c *LabelsRevisionsPermissionsBatchDeleteCall) doRequest(alt string) (*http.Response, error) {
5364 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5365 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betabatchdeletelabelpermissionsrequest)
5366 if err != nil {
5367 return nil, err
5368 }
5369 c.urlParams_.Set("alt", alt)
5370 c.urlParams_.Set("prettyPrint", "false")
5371 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions:batchDelete")
5372 urls += "?" + c.urlParams_.Encode()
5373 req, err := http.NewRequest("POST", urls, body)
5374 if err != nil {
5375 return nil, err
5376 }
5377 req.Header = reqHeaders
5378 googleapi.Expand(req.URL, map[string]string{
5379 "parent": c.parent,
5380 })
5381 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.permissions.batchDelete", "request", internallog.HTTPRequest(req, body.Bytes()))
5382 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5383 }
5384
5385 // Do executes the "drivelabels.labels.revisions.permissions.batchDelete" call.
5386 // Any non-2xx status code is an error. Response headers are in either
5387 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
5388 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5389 // check whether the returned error was because http.StatusNotModified was
5390 // returned.
5391 func (c *LabelsRevisionsPermissionsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
5392 gensupport.SetOptions(c.urlParams_, opts...)
5393 res, err := c.doRequest("json")
5394 if res != nil && res.StatusCode == http.StatusNotModified {
5395 if res.Body != nil {
5396 res.Body.Close()
5397 }
5398 return nil, gensupport.WrapError(&googleapi.Error{
5399 Code: res.StatusCode,
5400 Header: res.Header,
5401 })
5402 }
5403 if err != nil {
5404 return nil, err
5405 }
5406 defer googleapi.CloseBody(res)
5407 if err := googleapi.CheckResponse(res); err != nil {
5408 return nil, gensupport.WrapError(err)
5409 }
5410 ret := &GoogleProtobufEmpty{
5411 ServerResponse: googleapi.ServerResponse{
5412 Header: res.Header,
5413 HTTPStatusCode: res.StatusCode,
5414 },
5415 }
5416 target := &ret
5417 b, err := gensupport.DecodeResponseBytes(target, res)
5418 if err != nil {
5419 return nil, err
5420 }
5421 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.permissions.batchDelete", "response", internallog.HTTPResponse(res, b))
5422 return ret, nil
5423 }
5424
5425 type LabelsRevisionsPermissionsBatchUpdateCall struct {
5426 s *Service
5427 parent string
5428 googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest
5429 urlParams_ gensupport.URLParams
5430 ctx_ context.Context
5431 header_ http.Header
5432 }
5433
5434 // BatchUpdate: Updates label permissions. If a permission for the indicated
5435 // principal doesn't exist, a label permission is created, otherwise the
5436 // existing permission is updated. Permissions affect the label resource as a
5437 // whole, aren't revisioned, and don't require publishing.
5438 //
5439 // - parent: The parent label resource name shared by all permissions being
5440 // updated. Format: `labels/{label}`. If this is set, the parent field in the
5441 // `UpdateLabelPermissionRequest` messages must either be empty or match this
5442 // field.
5443 func (r *LabelsRevisionsPermissionsService) BatchUpdate(parent string, googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsRequest) *LabelsRevisionsPermissionsBatchUpdateCall {
5444 c := &LabelsRevisionsPermissionsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5445 c.parent = parent
5446 c.googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest = googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest
5447 return c
5448 }
5449
5450 // Fields allows partial responses to be retrieved. See
5451 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5452 // details.
5453 func (c *LabelsRevisionsPermissionsBatchUpdateCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsBatchUpdateCall {
5454 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5455 return c
5456 }
5457
5458 // Context sets the context to be used in this call's Do method.
5459 func (c *LabelsRevisionsPermissionsBatchUpdateCall) Context(ctx context.Context) *LabelsRevisionsPermissionsBatchUpdateCall {
5460 c.ctx_ = ctx
5461 return c
5462 }
5463
5464 // Header returns a http.Header that can be modified by the caller to add
5465 // headers to the request.
5466 func (c *LabelsRevisionsPermissionsBatchUpdateCall) Header() http.Header {
5467 if c.header_ == nil {
5468 c.header_ = make(http.Header)
5469 }
5470 return c.header_
5471 }
5472
5473 func (c *LabelsRevisionsPermissionsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
5474 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5475 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betabatchupdatelabelpermissionsrequest)
5476 if err != nil {
5477 return nil, err
5478 }
5479 c.urlParams_.Set("alt", alt)
5480 c.urlParams_.Set("prettyPrint", "false")
5481 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions:batchUpdate")
5482 urls += "?" + c.urlParams_.Encode()
5483 req, err := http.NewRequest("POST", urls, body)
5484 if err != nil {
5485 return nil, err
5486 }
5487 req.Header = reqHeaders
5488 googleapi.Expand(req.URL, map[string]string{
5489 "parent": c.parent,
5490 })
5491 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.permissions.batchUpdate", "request", internallog.HTTPRequest(req, body.Bytes()))
5492 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5493 }
5494
5495 // Do executes the "drivelabels.labels.revisions.permissions.batchUpdate" call.
5496 // Any non-2xx status code is an error. Response headers are in either
5497 // *GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse.ServerRespons
5498 // e.Header or (if a response was returned at all) in
5499 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5500 // whether the returned error was because http.StatusNotModified was returned.
5501 func (c *LabelsRevisionsPermissionsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse, error) {
5502 gensupport.SetOptions(c.urlParams_, opts...)
5503 res, err := c.doRequest("json")
5504 if res != nil && res.StatusCode == http.StatusNotModified {
5505 if res.Body != nil {
5506 res.Body.Close()
5507 }
5508 return nil, gensupport.WrapError(&googleapi.Error{
5509 Code: res.StatusCode,
5510 Header: res.Header,
5511 })
5512 }
5513 if err != nil {
5514 return nil, err
5515 }
5516 defer googleapi.CloseBody(res)
5517 if err := googleapi.CheckResponse(res); err != nil {
5518 return nil, gensupport.WrapError(err)
5519 }
5520 ret := &GoogleAppsDriveLabelsV2betaBatchUpdateLabelPermissionsResponse{
5521 ServerResponse: googleapi.ServerResponse{
5522 Header: res.Header,
5523 HTTPStatusCode: res.StatusCode,
5524 },
5525 }
5526 target := &ret
5527 b, err := gensupport.DecodeResponseBytes(target, res)
5528 if err != nil {
5529 return nil, err
5530 }
5531 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.permissions.batchUpdate", "response", internallog.HTTPResponse(res, b))
5532 return ret, nil
5533 }
5534
5535 type LabelsRevisionsPermissionsCreateCall struct {
5536 s *Service
5537 parent string
5538 googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission
5539 urlParams_ gensupport.URLParams
5540 ctx_ context.Context
5541 header_ http.Header
5542 }
5543
5544 // Create: Updates a label's permissions. If a permission for the indicated
5545 // principal doesn't exist, a label permission is created, otherwise the
5546 // existing permission is updated. Permissions affect the label resource as a
5547 // whole, aren't revisioned, and don't require publishing.
5548 //
5549 // - parent: The parent label resource name on the label permission is created.
5550 // Format: `labels/{label}`.
5551 func (r *LabelsRevisionsPermissionsService) Create(parent string, googleappsdrivelabelsv2betalabelpermission *GoogleAppsDriveLabelsV2betaLabelPermission) *LabelsRevisionsPermissionsCreateCall {
5552 c := &LabelsRevisionsPermissionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5553 c.parent = parent
5554 c.googleappsdrivelabelsv2betalabelpermission = googleappsdrivelabelsv2betalabelpermission
5555 return c
5556 }
5557
5558 // UseAdminAccess sets the optional parameter "useAdminAccess": Set to `true`
5559 // in order to use the user's admin credentials. The server will verify the
5560 // user is an admin for the label before allowing access.
5561 func (c *LabelsRevisionsPermissionsCreateCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsPermissionsCreateCall {
5562 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
5563 return c
5564 }
5565
5566 // Fields allows partial responses to be retrieved. See
5567 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5568 // details.
5569 func (c *LabelsRevisionsPermissionsCreateCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsCreateCall {
5570 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5571 return c
5572 }
5573
5574 // Context sets the context to be used in this call's Do method.
5575 func (c *LabelsRevisionsPermissionsCreateCall) Context(ctx context.Context) *LabelsRevisionsPermissionsCreateCall {
5576 c.ctx_ = ctx
5577 return c
5578 }
5579
5580 // Header returns a http.Header that can be modified by the caller to add
5581 // headers to the request.
5582 func (c *LabelsRevisionsPermissionsCreateCall) Header() http.Header {
5583 if c.header_ == nil {
5584 c.header_ = make(http.Header)
5585 }
5586 return c.header_
5587 }
5588
5589 func (c *LabelsRevisionsPermissionsCreateCall) doRequest(alt string) (*http.Response, error) {
5590 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5591 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleappsdrivelabelsv2betalabelpermission)
5592 if err != nil {
5593 return nil, err
5594 }
5595 c.urlParams_.Set("alt", alt)
5596 c.urlParams_.Set("prettyPrint", "false")
5597 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions")
5598 urls += "?" + c.urlParams_.Encode()
5599 req, err := http.NewRequest("POST", urls, body)
5600 if err != nil {
5601 return nil, err
5602 }
5603 req.Header = reqHeaders
5604 googleapi.Expand(req.URL, map[string]string{
5605 "parent": c.parent,
5606 })
5607 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.permissions.create", "request", internallog.HTTPRequest(req, body.Bytes()))
5608 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5609 }
5610
5611 // Do executes the "drivelabels.labels.revisions.permissions.create" call.
5612 // Any non-2xx status code is an error. Response headers are in either
5613 // *GoogleAppsDriveLabelsV2betaLabelPermission.ServerResponse.Header or (if a
5614 // response was returned at all) in error.(*googleapi.Error).Header. Use
5615 // googleapi.IsNotModified to check whether the returned error was because
5616 // http.StatusNotModified was returned.
5617 func (c *LabelsRevisionsPermissionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelPermission, error) {
5618 gensupport.SetOptions(c.urlParams_, opts...)
5619 res, err := c.doRequest("json")
5620 if res != nil && res.StatusCode == http.StatusNotModified {
5621 if res.Body != nil {
5622 res.Body.Close()
5623 }
5624 return nil, gensupport.WrapError(&googleapi.Error{
5625 Code: res.StatusCode,
5626 Header: res.Header,
5627 })
5628 }
5629 if err != nil {
5630 return nil, err
5631 }
5632 defer googleapi.CloseBody(res)
5633 if err := googleapi.CheckResponse(res); err != nil {
5634 return nil, gensupport.WrapError(err)
5635 }
5636 ret := &GoogleAppsDriveLabelsV2betaLabelPermission{
5637 ServerResponse: googleapi.ServerResponse{
5638 Header: res.Header,
5639 HTTPStatusCode: res.StatusCode,
5640 },
5641 }
5642 target := &ret
5643 b, err := gensupport.DecodeResponseBytes(target, res)
5644 if err != nil {
5645 return nil, err
5646 }
5647 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.permissions.create", "response", internallog.HTTPResponse(res, b))
5648 return ret, nil
5649 }
5650
5651 type LabelsRevisionsPermissionsDeleteCall struct {
5652 s *Service
5653 name string
5654 urlParams_ gensupport.URLParams
5655 ctx_ context.Context
5656 header_ http.Header
5657 }
5658
5659 // Delete: Deletes a label's permission. Permissions affect the label resource
5660 // as a whole, aren't revisioned, and don't require publishing.
5661 //
5662 // - name: Label permission resource name.
5663 func (r *LabelsRevisionsPermissionsService) Delete(name string) *LabelsRevisionsPermissionsDeleteCall {
5664 c := &LabelsRevisionsPermissionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5665 c.name = name
5666 return c
5667 }
5668
5669 // UseAdminAccess sets the optional parameter "useAdminAccess": Set to `true`
5670 // in order to use the user's admin credentials. The server will verify the
5671 // user is an admin for the label before allowing access.
5672 func (c *LabelsRevisionsPermissionsDeleteCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsPermissionsDeleteCall {
5673 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
5674 return c
5675 }
5676
5677 // Fields allows partial responses to be retrieved. See
5678 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5679 // details.
5680 func (c *LabelsRevisionsPermissionsDeleteCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsDeleteCall {
5681 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5682 return c
5683 }
5684
5685 // Context sets the context to be used in this call's Do method.
5686 func (c *LabelsRevisionsPermissionsDeleteCall) Context(ctx context.Context) *LabelsRevisionsPermissionsDeleteCall {
5687 c.ctx_ = ctx
5688 return c
5689 }
5690
5691 // Header returns a http.Header that can be modified by the caller to add
5692 // headers to the request.
5693 func (c *LabelsRevisionsPermissionsDeleteCall) Header() http.Header {
5694 if c.header_ == nil {
5695 c.header_ = make(http.Header)
5696 }
5697 return c.header_
5698 }
5699
5700 func (c *LabelsRevisionsPermissionsDeleteCall) doRequest(alt string) (*http.Response, error) {
5701 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5702 c.urlParams_.Set("alt", alt)
5703 c.urlParams_.Set("prettyPrint", "false")
5704 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}")
5705 urls += "?" + c.urlParams_.Encode()
5706 req, err := http.NewRequest("DELETE", urls, nil)
5707 if err != nil {
5708 return nil, err
5709 }
5710 req.Header = reqHeaders
5711 googleapi.Expand(req.URL, map[string]string{
5712 "name": c.name,
5713 })
5714 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.permissions.delete", "request", internallog.HTTPRequest(req, nil))
5715 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5716 }
5717
5718 // Do executes the "drivelabels.labels.revisions.permissions.delete" call.
5719 // Any non-2xx status code is an error. Response headers are in either
5720 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at
5721 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5722 // check whether the returned error was because http.StatusNotModified was
5723 // returned.
5724 func (c *LabelsRevisionsPermissionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) {
5725 gensupport.SetOptions(c.urlParams_, opts...)
5726 res, err := c.doRequest("json")
5727 if res != nil && res.StatusCode == http.StatusNotModified {
5728 if res.Body != nil {
5729 res.Body.Close()
5730 }
5731 return nil, gensupport.WrapError(&googleapi.Error{
5732 Code: res.StatusCode,
5733 Header: res.Header,
5734 })
5735 }
5736 if err != nil {
5737 return nil, err
5738 }
5739 defer googleapi.CloseBody(res)
5740 if err := googleapi.CheckResponse(res); err != nil {
5741 return nil, gensupport.WrapError(err)
5742 }
5743 ret := &GoogleProtobufEmpty{
5744 ServerResponse: googleapi.ServerResponse{
5745 Header: res.Header,
5746 HTTPStatusCode: res.StatusCode,
5747 },
5748 }
5749 target := &ret
5750 b, err := gensupport.DecodeResponseBytes(target, res)
5751 if err != nil {
5752 return nil, err
5753 }
5754 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.permissions.delete", "response", internallog.HTTPResponse(res, b))
5755 return ret, nil
5756 }
5757
5758 type LabelsRevisionsPermissionsListCall struct {
5759 s *Service
5760 parent string
5761 urlParams_ gensupport.URLParams
5762 ifNoneMatch_ string
5763 ctx_ context.Context
5764 header_ http.Header
5765 }
5766
5767 // List: Lists a label's permissions.
5768 //
5769 // - parent: The parent label resource name on which label permissions are
5770 // listed. Format: `labels/{label}`.
5771 func (r *LabelsRevisionsPermissionsService) List(parent string) *LabelsRevisionsPermissionsListCall {
5772 c := &LabelsRevisionsPermissionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5773 c.parent = parent
5774 return c
5775 }
5776
5777 // PageSize sets the optional parameter "pageSize": Maximum number of
5778 // permissions to return per page. Default: 50. Max: 200.
5779 func (c *LabelsRevisionsPermissionsListCall) PageSize(pageSize int64) *LabelsRevisionsPermissionsListCall {
5780 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5781 return c
5782 }
5783
5784 // PageToken sets the optional parameter "pageToken": The token of the page to
5785 // return.
5786 func (c *LabelsRevisionsPermissionsListCall) PageToken(pageToken string) *LabelsRevisionsPermissionsListCall {
5787 c.urlParams_.Set("pageToken", pageToken)
5788 return c
5789 }
5790
5791 // UseAdminAccess sets the optional parameter "useAdminAccess": Set to `true`
5792 // in order to use the user's admin credentials. The server will verify the
5793 // user is an admin for the label before allowing access.
5794 func (c *LabelsRevisionsPermissionsListCall) UseAdminAccess(useAdminAccess bool) *LabelsRevisionsPermissionsListCall {
5795 c.urlParams_.Set("useAdminAccess", fmt.Sprint(useAdminAccess))
5796 return c
5797 }
5798
5799 // Fields allows partial responses to be retrieved. See
5800 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5801 // details.
5802 func (c *LabelsRevisionsPermissionsListCall) Fields(s ...googleapi.Field) *LabelsRevisionsPermissionsListCall {
5803 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5804 return c
5805 }
5806
5807 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5808 // object's ETag matches the given value. This is useful for getting updates
5809 // only after the object has changed since the last request.
5810 func (c *LabelsRevisionsPermissionsListCall) IfNoneMatch(entityTag string) *LabelsRevisionsPermissionsListCall {
5811 c.ifNoneMatch_ = entityTag
5812 return c
5813 }
5814
5815 // Context sets the context to be used in this call's Do method.
5816 func (c *LabelsRevisionsPermissionsListCall) Context(ctx context.Context) *LabelsRevisionsPermissionsListCall {
5817 c.ctx_ = ctx
5818 return c
5819 }
5820
5821 // Header returns a http.Header that can be modified by the caller to add
5822 // headers to the request.
5823 func (c *LabelsRevisionsPermissionsListCall) Header() http.Header {
5824 if c.header_ == nil {
5825 c.header_ = make(http.Header)
5826 }
5827 return c.header_
5828 }
5829
5830 func (c *LabelsRevisionsPermissionsListCall) doRequest(alt string) (*http.Response, error) {
5831 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5832 if c.ifNoneMatch_ != "" {
5833 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5834 }
5835 c.urlParams_.Set("alt", alt)
5836 c.urlParams_.Set("prettyPrint", "false")
5837 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/permissions")
5838 urls += "?" + c.urlParams_.Encode()
5839 req, err := http.NewRequest("GET", urls, nil)
5840 if err != nil {
5841 return nil, err
5842 }
5843 req.Header = reqHeaders
5844 googleapi.Expand(req.URL, map[string]string{
5845 "parent": c.parent,
5846 })
5847 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.permissions.list", "request", internallog.HTTPRequest(req, nil))
5848 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5849 }
5850
5851 // Do executes the "drivelabels.labels.revisions.permissions.list" call.
5852 // Any non-2xx status code is an error. Response headers are in either
5853 // *GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse.ServerResponse.Heade
5854 // r or (if a response was returned at all) in error.(*googleapi.Error).Header.
5855 // Use googleapi.IsNotModified to check whether the returned error was because
5856 // http.StatusNotModified was returned.
5857 func (c *LabelsRevisionsPermissionsListCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse, error) {
5858 gensupport.SetOptions(c.urlParams_, opts...)
5859 res, err := c.doRequest("json")
5860 if res != nil && res.StatusCode == http.StatusNotModified {
5861 if res.Body != nil {
5862 res.Body.Close()
5863 }
5864 return nil, gensupport.WrapError(&googleapi.Error{
5865 Code: res.StatusCode,
5866 Header: res.Header,
5867 })
5868 }
5869 if err != nil {
5870 return nil, err
5871 }
5872 defer googleapi.CloseBody(res)
5873 if err := googleapi.CheckResponse(res); err != nil {
5874 return nil, gensupport.WrapError(err)
5875 }
5876 ret := &GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse{
5877 ServerResponse: googleapi.ServerResponse{
5878 Header: res.Header,
5879 HTTPStatusCode: res.StatusCode,
5880 },
5881 }
5882 target := &ret
5883 b, err := gensupport.DecodeResponseBytes(target, res)
5884 if err != nil {
5885 return nil, err
5886 }
5887 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.labels.revisions.permissions.list", "response", internallog.HTTPResponse(res, b))
5888 return ret, nil
5889 }
5890
5891 // Pages invokes f for each page of results.
5892 // A non-nil error returned from f will halt the iteration.
5893 // The provided context supersedes any context provided to the Context method.
5894 func (c *LabelsRevisionsPermissionsListCall) Pages(ctx context.Context, f func(*GoogleAppsDriveLabelsV2betaListLabelPermissionsResponse) error) error {
5895 c.ctx_ = ctx
5896 defer c.PageToken(c.urlParams_.Get("pageToken"))
5897 for {
5898 x, err := c.Do()
5899 if err != nil {
5900 return err
5901 }
5902 if err := f(x); err != nil {
5903 return err
5904 }
5905 if x.NextPageToken == "" {
5906 return nil
5907 }
5908 c.PageToken(x.NextPageToken)
5909 }
5910 }
5911
5912 type LimitsGetLabelCall struct {
5913 s *Service
5914 urlParams_ gensupport.URLParams
5915 ifNoneMatch_ string
5916 ctx_ context.Context
5917 header_ http.Header
5918 }
5919
5920 // GetLabel: Get the constraints on the structure of a label; such as, the
5921 // maximum number of fields allowed and maximum length of the label title.
5922 func (r *LimitsService) GetLabel() *LimitsGetLabelCall {
5923 c := &LimitsGetLabelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5924 return c
5925 }
5926
5927 // Name sets the optional parameter "name": Required. Label revision resource
5928 // name must be: "limits/label".
5929 func (c *LimitsGetLabelCall) Name(name string) *LimitsGetLabelCall {
5930 c.urlParams_.Set("name", name)
5931 return c
5932 }
5933
5934 // Fields allows partial responses to be retrieved. See
5935 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5936 // details.
5937 func (c *LimitsGetLabelCall) Fields(s ...googleapi.Field) *LimitsGetLabelCall {
5938 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5939 return c
5940 }
5941
5942 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5943 // object's ETag matches the given value. This is useful for getting updates
5944 // only after the object has changed since the last request.
5945 func (c *LimitsGetLabelCall) IfNoneMatch(entityTag string) *LimitsGetLabelCall {
5946 c.ifNoneMatch_ = entityTag
5947 return c
5948 }
5949
5950 // Context sets the context to be used in this call's Do method.
5951 func (c *LimitsGetLabelCall) Context(ctx context.Context) *LimitsGetLabelCall {
5952 c.ctx_ = ctx
5953 return c
5954 }
5955
5956 // Header returns a http.Header that can be modified by the caller to add
5957 // headers to the request.
5958 func (c *LimitsGetLabelCall) Header() http.Header {
5959 if c.header_ == nil {
5960 c.header_ = make(http.Header)
5961 }
5962 return c.header_
5963 }
5964
5965 func (c *LimitsGetLabelCall) doRequest(alt string) (*http.Response, error) {
5966 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5967 if c.ifNoneMatch_ != "" {
5968 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5969 }
5970 c.urlParams_.Set("alt", alt)
5971 c.urlParams_.Set("prettyPrint", "false")
5972 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/limits/label")
5973 urls += "?" + c.urlParams_.Encode()
5974 req, err := http.NewRequest("GET", urls, nil)
5975 if err != nil {
5976 return nil, err
5977 }
5978 req.Header = reqHeaders
5979 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.limits.getLabel", "request", internallog.HTTPRequest(req, nil))
5980 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5981 }
5982
5983 // Do executes the "drivelabels.limits.getLabel" call.
5984 // Any non-2xx status code is an error. Response headers are in either
5985 // *GoogleAppsDriveLabelsV2betaLabelLimits.ServerResponse.Header or (if a
5986 // response was returned at all) in error.(*googleapi.Error).Header. Use
5987 // googleapi.IsNotModified to check whether the returned error was because
5988 // http.StatusNotModified was returned.
5989 func (c *LimitsGetLabelCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaLabelLimits, error) {
5990 gensupport.SetOptions(c.urlParams_, opts...)
5991 res, err := c.doRequest("json")
5992 if res != nil && res.StatusCode == http.StatusNotModified {
5993 if res.Body != nil {
5994 res.Body.Close()
5995 }
5996 return nil, gensupport.WrapError(&googleapi.Error{
5997 Code: res.StatusCode,
5998 Header: res.Header,
5999 })
6000 }
6001 if err != nil {
6002 return nil, err
6003 }
6004 defer googleapi.CloseBody(res)
6005 if err := googleapi.CheckResponse(res); err != nil {
6006 return nil, gensupport.WrapError(err)
6007 }
6008 ret := &GoogleAppsDriveLabelsV2betaLabelLimits{
6009 ServerResponse: googleapi.ServerResponse{
6010 Header: res.Header,
6011 HTTPStatusCode: res.StatusCode,
6012 },
6013 }
6014 target := &ret
6015 b, err := gensupport.DecodeResponseBytes(target, res)
6016 if err != nil {
6017 return nil, err
6018 }
6019 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.limits.getLabel", "response", internallog.HTTPResponse(res, b))
6020 return ret, nil
6021 }
6022
6023 type UsersGetCapabilitiesCall struct {
6024 s *Service
6025 name string
6026 urlParams_ gensupport.URLParams
6027 ifNoneMatch_ string
6028 ctx_ context.Context
6029 header_ http.Header
6030 }
6031
6032 // GetCapabilities: Gets the user capabilities.
6033 //
6034 // - name: The resource name of the user. Only "users/me/capabilities" is
6035 // supported.
6036 func (r *UsersService) GetCapabilities(name string) *UsersGetCapabilitiesCall {
6037 c := &UsersGetCapabilitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6038 c.name = name
6039 return c
6040 }
6041
6042 // Customer sets the optional parameter "customer": The customer to scope this
6043 // request to. For example: `customers/abcd1234`. If unset, it will return
6044 // settings within the current customer.
6045 func (c *UsersGetCapabilitiesCall) Customer(customer string) *UsersGetCapabilitiesCall {
6046 c.urlParams_.Set("customer", customer)
6047 return c
6048 }
6049
6050 // Fields allows partial responses to be retrieved. See
6051 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6052 // details.
6053 func (c *UsersGetCapabilitiesCall) Fields(s ...googleapi.Field) *UsersGetCapabilitiesCall {
6054 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6055 return c
6056 }
6057
6058 // IfNoneMatch sets an optional parameter which makes the operation fail if the
6059 // object's ETag matches the given value. This is useful for getting updates
6060 // only after the object has changed since the last request.
6061 func (c *UsersGetCapabilitiesCall) IfNoneMatch(entityTag string) *UsersGetCapabilitiesCall {
6062 c.ifNoneMatch_ = entityTag
6063 return c
6064 }
6065
6066 // Context sets the context to be used in this call's Do method.
6067 func (c *UsersGetCapabilitiesCall) Context(ctx context.Context) *UsersGetCapabilitiesCall {
6068 c.ctx_ = ctx
6069 return c
6070 }
6071
6072 // Header returns a http.Header that can be modified by the caller to add
6073 // headers to the request.
6074 func (c *UsersGetCapabilitiesCall) Header() http.Header {
6075 if c.header_ == nil {
6076 c.header_ = make(http.Header)
6077 }
6078 return c.header_
6079 }
6080
6081 func (c *UsersGetCapabilitiesCall) doRequest(alt string) (*http.Response, error) {
6082 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6083 if c.ifNoneMatch_ != "" {
6084 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6085 }
6086 c.urlParams_.Set("alt", alt)
6087 c.urlParams_.Set("prettyPrint", "false")
6088 urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}")
6089 urls += "?" + c.urlParams_.Encode()
6090 req, err := http.NewRequest("GET", urls, nil)
6091 if err != nil {
6092 return nil, err
6093 }
6094 req.Header = reqHeaders
6095 googleapi.Expand(req.URL, map[string]string{
6096 "name": c.name,
6097 })
6098 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "drivelabels.users.getCapabilities", "request", internallog.HTTPRequest(req, nil))
6099 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6100 }
6101
6102 // Do executes the "drivelabels.users.getCapabilities" call.
6103 // Any non-2xx status code is an error. Response headers are in either
6104 // *GoogleAppsDriveLabelsV2betaUserCapabilities.ServerResponse.Header or (if a
6105 // response was returned at all) in error.(*googleapi.Error).Header. Use
6106 // googleapi.IsNotModified to check whether the returned error was because
6107 // http.StatusNotModified was returned.
6108 func (c *UsersGetCapabilitiesCall) Do(opts ...googleapi.CallOption) (*GoogleAppsDriveLabelsV2betaUserCapabilities, error) {
6109 gensupport.SetOptions(c.urlParams_, opts...)
6110 res, err := c.doRequest("json")
6111 if res != nil && res.StatusCode == http.StatusNotModified {
6112 if res.Body != nil {
6113 res.Body.Close()
6114 }
6115 return nil, gensupport.WrapError(&googleapi.Error{
6116 Code: res.StatusCode,
6117 Header: res.Header,
6118 })
6119 }
6120 if err != nil {
6121 return nil, err
6122 }
6123 defer googleapi.CloseBody(res)
6124 if err := googleapi.CheckResponse(res); err != nil {
6125 return nil, gensupport.WrapError(err)
6126 }
6127 ret := &GoogleAppsDriveLabelsV2betaUserCapabilities{
6128 ServerResponse: googleapi.ServerResponse{
6129 Header: res.Header,
6130 HTTPStatusCode: res.StatusCode,
6131 },
6132 }
6133 target := &ret
6134 b, err := gensupport.DecodeResponseBytes(target, res)
6135 if err != nil {
6136 return nil, err
6137 }
6138 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "drivelabels.users.getCapabilities", "response", internallog.HTTPResponse(res, b))
6139 return ret, nil
6140 }