...

Source file src/google.golang.org/api/drivelabels/v2/drivelabels-gen.go

Documentation: google.golang.org/api/drivelabels/v2

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

View as plain text