...

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

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

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

View as plain text