...

Source file src/google.golang.org/api/vault/v1/vault-gen.go

Documentation: google.golang.org/api/vault/v1

     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 vault provides access to the Google Vault API.
     8  //
     9  // For product documentation, see: https://developers.google.com/vault
    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/vault/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	vaultService, err := vault.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  //	vaultService, err := vault.NewService(ctx, option.WithScopes(vault.EdiscoveryReadonlyScope))
    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  //	vaultService, err := vault.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  //	vaultService, err := vault.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package vault // import "google.golang.org/api/vault/v1"
    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 = "vault:v1"
    95  const apiName = "vault"
    96  const apiVersion = "v1"
    97  const basePath = "https://vault.googleapis.com/"
    98  const basePathTemplate = "https://vault.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://vault.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// Manage your eDiscovery data
   104  	EdiscoveryScope = "https://www.googleapis.com/auth/ediscovery"
   105  
   106  	// View your eDiscovery data
   107  	EdiscoveryReadonlyScope = "https://www.googleapis.com/auth/ediscovery.readonly"
   108  )
   109  
   110  // NewService creates a new Service.
   111  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   112  	scopesOption := internaloption.WithDefaultScopes(
   113  		"https://www.googleapis.com/auth/ediscovery",
   114  		"https://www.googleapis.com/auth/ediscovery.readonly",
   115  	)
   116  	// NOTE: prepend, so we don't override user-specified scopes.
   117  	opts = append([]option.ClientOption{scopesOption}, opts...)
   118  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   119  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   120  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   121  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   122  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   123  	if err != nil {
   124  		return nil, err
   125  	}
   126  	s, err := New(client)
   127  	if err != nil {
   128  		return nil, err
   129  	}
   130  	if endpoint != "" {
   131  		s.BasePath = endpoint
   132  	}
   133  	return s, nil
   134  }
   135  
   136  // New creates a new Service. It uses the provided http.Client for requests.
   137  //
   138  // Deprecated: please use NewService instead.
   139  // To provide a custom HTTP client, use option.WithHTTPClient.
   140  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   141  func New(client *http.Client) (*Service, error) {
   142  	if client == nil {
   143  		return nil, errors.New("client is nil")
   144  	}
   145  	s := &Service{client: client, BasePath: basePath}
   146  	s.Matters = NewMattersService(s)
   147  	s.Operations = NewOperationsService(s)
   148  	return s, nil
   149  }
   150  
   151  type Service struct {
   152  	client    *http.Client
   153  	BasePath  string // API endpoint base URL
   154  	UserAgent string // optional additional User-Agent fragment
   155  
   156  	Matters *MattersService
   157  
   158  	Operations *OperationsService
   159  }
   160  
   161  func (s *Service) userAgent() string {
   162  	if s.UserAgent == "" {
   163  		return googleapi.UserAgent
   164  	}
   165  	return googleapi.UserAgent + " " + s.UserAgent
   166  }
   167  
   168  func NewMattersService(s *Service) *MattersService {
   169  	rs := &MattersService{s: s}
   170  	rs.Exports = NewMattersExportsService(s)
   171  	rs.Holds = NewMattersHoldsService(s)
   172  	rs.SavedQueries = NewMattersSavedQueriesService(s)
   173  	return rs
   174  }
   175  
   176  type MattersService struct {
   177  	s *Service
   178  
   179  	Exports *MattersExportsService
   180  
   181  	Holds *MattersHoldsService
   182  
   183  	SavedQueries *MattersSavedQueriesService
   184  }
   185  
   186  func NewMattersExportsService(s *Service) *MattersExportsService {
   187  	rs := &MattersExportsService{s: s}
   188  	return rs
   189  }
   190  
   191  type MattersExportsService struct {
   192  	s *Service
   193  }
   194  
   195  func NewMattersHoldsService(s *Service) *MattersHoldsService {
   196  	rs := &MattersHoldsService{s: s}
   197  	rs.Accounts = NewMattersHoldsAccountsService(s)
   198  	return rs
   199  }
   200  
   201  type MattersHoldsService struct {
   202  	s *Service
   203  
   204  	Accounts *MattersHoldsAccountsService
   205  }
   206  
   207  func NewMattersHoldsAccountsService(s *Service) *MattersHoldsAccountsService {
   208  	rs := &MattersHoldsAccountsService{s: s}
   209  	return rs
   210  }
   211  
   212  type MattersHoldsAccountsService struct {
   213  	s *Service
   214  }
   215  
   216  func NewMattersSavedQueriesService(s *Service) *MattersSavedQueriesService {
   217  	rs := &MattersSavedQueriesService{s: s}
   218  	return rs
   219  }
   220  
   221  type MattersSavedQueriesService struct {
   222  	s *Service
   223  }
   224  
   225  func NewOperationsService(s *Service) *OperationsService {
   226  	rs := &OperationsService{s: s}
   227  	return rs
   228  }
   229  
   230  type OperationsService struct {
   231  	s *Service
   232  }
   233  
   234  // AccountCount: The results count for each account.
   235  type AccountCount struct {
   236  	// Account: Account owner.
   237  	Account *UserInfo `json:"account,omitempty"`
   238  	// Count: The number of results (messages or files) found for this account.
   239  	Count int64 `json:"count,omitempty,string"`
   240  	// ForceSendFields is a list of field names (e.g. "Account") to unconditionally
   241  	// include in API requests. By default, fields with empty or default values are
   242  	// omitted from API requests. See
   243  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   244  	// details.
   245  	ForceSendFields []string `json:"-"`
   246  	// NullFields is a list of field names (e.g. "Account") to include in API
   247  	// requests with the JSON null value. By default, fields with empty values are
   248  	// omitted from API requests. See
   249  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   250  	NullFields []string `json:"-"`
   251  }
   252  
   253  func (s *AccountCount) MarshalJSON() ([]byte, error) {
   254  	type NoMethod AccountCount
   255  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   256  }
   257  
   258  // AccountCountError: An error that occurred when querying a specific account
   259  type AccountCountError struct {
   260  	// Account: Account owner.
   261  	Account *UserInfo `json:"account,omitempty"`
   262  	// ErrorType: Account query error.
   263  	//
   264  	// Possible values:
   265  	//   "ERROR_TYPE_UNSPECIFIED" - Default.
   266  	//   "WILDCARD_TOO_BROAD" - Permanent - prefix terms expanded to too many query
   267  	// terms.
   268  	//   "TOO_MANY_TERMS" - Permanent - query contains too many terms.
   269  	//   "LOCATION_UNAVAILABLE" - Transient - data in transit between storage
   270  	// replicas, temporarily unavailable.
   271  	//   "UNKNOWN" - Unrecognized error.
   272  	//   "DEADLINE_EXCEEDED" - Deadline exceeded when querying the account.
   273  	ErrorType string `json:"errorType,omitempty"`
   274  	// ForceSendFields is a list of field names (e.g. "Account") to unconditionally
   275  	// include in API requests. By default, fields with empty or default values are
   276  	// omitted from API requests. See
   277  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   278  	// details.
   279  	ForceSendFields []string `json:"-"`
   280  	// NullFields is a list of field names (e.g. "Account") to include in API
   281  	// requests with the JSON null value. By default, fields with empty values are
   282  	// omitted from API requests. See
   283  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   284  	NullFields []string `json:"-"`
   285  }
   286  
   287  func (s *AccountCountError) MarshalJSON() ([]byte, error) {
   288  	type NoMethod AccountCountError
   289  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   290  }
   291  
   292  // AccountInfo: The accounts to search
   293  type AccountInfo struct {
   294  	// Emails: A set of accounts to search.
   295  	Emails []string `json:"emails,omitempty"`
   296  	// ForceSendFields is a list of field names (e.g. "Emails") to unconditionally
   297  	// include in API requests. By default, fields with empty or default values are
   298  	// omitted from API requests. See
   299  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   300  	// details.
   301  	ForceSendFields []string `json:"-"`
   302  	// NullFields is a list of field names (e.g. "Emails") to include in API
   303  	// requests with the JSON null value. By default, fields with empty values are
   304  	// omitted from API requests. See
   305  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   306  	NullFields []string `json:"-"`
   307  }
   308  
   309  func (s *AccountInfo) MarshalJSON() ([]byte, error) {
   310  	type NoMethod AccountInfo
   311  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   312  }
   313  
   314  // AddHeldAccountResult: The status of each account creation, and the
   315  // **HeldAccount**, if successful.
   316  type AddHeldAccountResult struct {
   317  	// Account: Returned when the account was successfully created.
   318  	Account *HeldAccount `json:"account,omitempty"`
   319  	// Status: Reports the request status. If it failed, returns an error message.
   320  	Status *Status `json:"status,omitempty"`
   321  	// ForceSendFields is a list of field names (e.g. "Account") to unconditionally
   322  	// include in API requests. By default, fields with empty or default values are
   323  	// omitted from API requests. See
   324  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   325  	// details.
   326  	ForceSendFields []string `json:"-"`
   327  	// NullFields is a list of field names (e.g. "Account") to include in API
   328  	// requests with the JSON null value. By default, fields with empty values are
   329  	// omitted from API requests. See
   330  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   331  	NullFields []string `json:"-"`
   332  }
   333  
   334  func (s *AddHeldAccountResult) MarshalJSON() ([]byte, error) {
   335  	type NoMethod AddHeldAccountResult
   336  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   337  }
   338  
   339  // AddHeldAccountsRequest: Add a list of accounts to a hold.
   340  type AddHeldAccountsRequest struct {
   341  	// AccountIds: A comma-separated list of the account IDs of the accounts to add
   342  	// to the hold. Specify either **emails** or **account_ids**, but not both.
   343  	AccountIds []string `json:"accountIds,omitempty"`
   344  	// Emails: A comma-separated list of the emails of the accounts to add to the
   345  	// hold. Specify either **emails** or **account_ids**, but not both.
   346  	Emails []string `json:"emails,omitempty"`
   347  	// ForceSendFields is a list of field names (e.g. "AccountIds") to
   348  	// unconditionally include in API requests. By default, fields with empty or
   349  	// default values are omitted from API requests. See
   350  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   351  	// details.
   352  	ForceSendFields []string `json:"-"`
   353  	// NullFields is a list of field names (e.g. "AccountIds") to include in API
   354  	// requests with the JSON null value. By default, fields with empty values are
   355  	// omitted from API requests. See
   356  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   357  	NullFields []string `json:"-"`
   358  }
   359  
   360  func (s *AddHeldAccountsRequest) MarshalJSON() ([]byte, error) {
   361  	type NoMethod AddHeldAccountsRequest
   362  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   363  }
   364  
   365  // AddHeldAccountsResponse: Response for batch create held accounts.
   366  type AddHeldAccountsResponse struct {
   367  	// Responses: The list of responses, in the same order as the batch request.
   368  	Responses []*AddHeldAccountResult `json:"responses,omitempty"`
   369  
   370  	// ServerResponse contains the HTTP response code and headers from the server.
   371  	googleapi.ServerResponse `json:"-"`
   372  	// ForceSendFields is a list of field names (e.g. "Responses") to
   373  	// unconditionally include in API requests. By default, fields with empty or
   374  	// default values are omitted from API requests. See
   375  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   376  	// details.
   377  	ForceSendFields []string `json:"-"`
   378  	// NullFields is a list of field names (e.g. "Responses") to include in API
   379  	// requests with the JSON null value. By default, fields with empty values are
   380  	// omitted from API requests. See
   381  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   382  	NullFields []string `json:"-"`
   383  }
   384  
   385  func (s *AddHeldAccountsResponse) MarshalJSON() ([]byte, error) {
   386  	type NoMethod AddHeldAccountsResponse
   387  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   388  }
   389  
   390  // AddMatterPermissionsRequest: Add an account with the permission specified.
   391  // The role cannot be owner. If an account already has a role in the matter,
   392  // the existing role is overwritten.
   393  type AddMatterPermissionsRequest struct {
   394  	// CcMe: Only relevant if **sendEmails** is **true**. To CC the requestor in
   395  	// the email message, set to **true**. To not CC requestor, set to **false**.
   396  	CcMe bool `json:"ccMe,omitempty"`
   397  	// MatterPermission: The account and its role to add.
   398  	MatterPermission *MatterPermission `json:"matterPermission,omitempty"`
   399  	// SendEmails: To send a notification email to the added account, set to
   400  	// **true**. To not send a notification email, set to **false**.
   401  	SendEmails bool `json:"sendEmails,omitempty"`
   402  	// ForceSendFields is a list of field names (e.g. "CcMe") to unconditionally
   403  	// include in API requests. By default, fields with empty or default values are
   404  	// omitted from API requests. See
   405  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   406  	// details.
   407  	ForceSendFields []string `json:"-"`
   408  	// NullFields is a list of field names (e.g. "CcMe") to include in API requests
   409  	// with the JSON null value. By default, fields with empty values are omitted
   410  	// from API requests. See
   411  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   412  	NullFields []string `json:"-"`
   413  }
   414  
   415  func (s *AddMatterPermissionsRequest) MarshalJSON() ([]byte, error) {
   416  	type NoMethod AddMatterPermissionsRequest
   417  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   418  }
   419  
   420  // CalendarExportOptions: The options for Calendar exports.
   421  type CalendarExportOptions struct {
   422  	// ExportFormat: The file format for exported text messages.
   423  	//
   424  	// Possible values:
   425  	//   "EXPORT_FORMAT_UNSPECIFIED" - No export format specified.
   426  	//   "MBOX" - Export as MBOX. Only available for Gmail, Groups, Hangouts and
   427  	// Voice.
   428  	//   "PST" - Export as PST. Only available for Gmail, Groups, Hangouts, Voice
   429  	// and Calendar.
   430  	//   "ICS" - Export as ICS. Only available for Calendar.
   431  	ExportFormat string `json:"exportFormat,omitempty"`
   432  	// ForceSendFields is a list of field names (e.g. "ExportFormat") to
   433  	// unconditionally include in API requests. By default, fields with empty or
   434  	// default values are omitted from API requests. See
   435  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   436  	// details.
   437  	ForceSendFields []string `json:"-"`
   438  	// NullFields is a list of field names (e.g. "ExportFormat") to include in API
   439  	// requests with the JSON null value. By default, fields with empty values are
   440  	// omitted from API requests. See
   441  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   442  	NullFields []string `json:"-"`
   443  }
   444  
   445  func (s *CalendarExportOptions) MarshalJSON() ([]byte, error) {
   446  	type NoMethod CalendarExportOptions
   447  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   448  }
   449  
   450  // CalendarOptions: Additional options for Calendar search
   451  type CalendarOptions struct {
   452  	// LocationQuery: Matches only those events whose location contains all of the
   453  	// words in the given set. If the string contains quoted phrases, this method
   454  	// only matches those events whose location contain the exact phrase. Entries
   455  	// in the set are considered in "and". Word splitting example: ["New Zealand"]
   456  	// vs ["New","Zealand"] "New Zealand": matched by both "New and better
   457  	// Zealand": only matched by the later
   458  	LocationQuery []string `json:"locationQuery,omitempty"`
   459  	// MinusWords: Matches only those events that do not contain any of the words
   460  	// in the given set in title, description, location, or attendees. Entries in
   461  	// the set are considered in "or".
   462  	MinusWords []string `json:"minusWords,omitempty"`
   463  	// PeopleQuery: Matches only those events whose attendees contain all of the
   464  	// words in the given set. Entries in the set are considered in "and".
   465  	PeopleQuery []string `json:"peopleQuery,omitempty"`
   466  	// ResponseStatuses: Matches only events for which the custodian gave one of
   467  	// these responses. If the set is empty or contains
   468  	// ATTENDEE_RESPONSE_UNSPECIFIED there will be no filtering on responses.
   469  	//
   470  	// Possible values:
   471  	//   "ATTENDEE_RESPONSE_UNSPECIFIED" - Attendee response unspecified. If this
   472  	// is set no filtering on responses will be done, all other attendee responses
   473  	// that are part of the query options are ignored.
   474  	//   "ATTENDEE_RESPONSE_NEEDS_ACTION" - The participant has been invited but
   475  	// has not responded yet.
   476  	//   "ATTENDEE_RESPONSE_ACCEPTED" - The participant plans to attend.
   477  	//   "ATTENDEE_RESPONSE_DECLINED" - The participant does not plan to attend.
   478  	//   "ATTENDEE_RESPONSE_TENTATIVE" - The participant expects to possibly
   479  	// attend.
   480  	ResponseStatuses []string `json:"responseStatuses,omitempty"`
   481  	// VersionDate: Search the current version of the Calendar event, but export
   482  	// the contents of the last version saved before 12:00 AM UTC on the specified
   483  	// date. Enter the date in UTC.
   484  	VersionDate string `json:"versionDate,omitempty"`
   485  	// ForceSendFields is a list of field names (e.g. "LocationQuery") 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. "LocationQuery") 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 *CalendarOptions) MarshalJSON() ([]byte, error) {
   499  	type NoMethod CalendarOptions
   500  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   501  }
   502  
   503  // CancelOperationRequest: The request message for Operations.CancelOperation.
   504  type CancelOperationRequest struct {
   505  }
   506  
   507  // CloseMatterRequest: Close a matter by ID.
   508  type CloseMatterRequest struct {
   509  }
   510  
   511  // CloseMatterResponse: Response to a CloseMatterRequest.
   512  type CloseMatterResponse struct {
   513  	// Matter: The updated matter, with state **CLOSED**.
   514  	Matter *Matter `json:"matter,omitempty"`
   515  
   516  	// ServerResponse contains the HTTP response code and headers from the server.
   517  	googleapi.ServerResponse `json:"-"`
   518  	// ForceSendFields is a list of field names (e.g. "Matter") to unconditionally
   519  	// include in API requests. By default, fields with empty or default values are
   520  	// omitted from API requests. See
   521  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   522  	// details.
   523  	ForceSendFields []string `json:"-"`
   524  	// NullFields is a list of field names (e.g. "Matter") to include in API
   525  	// requests with the JSON null value. By default, fields with empty values are
   526  	// omitted from API requests. See
   527  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   528  	NullFields []string `json:"-"`
   529  }
   530  
   531  func (s *CloseMatterResponse) MarshalJSON() ([]byte, error) {
   532  	type NoMethod CloseMatterResponse
   533  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   534  }
   535  
   536  // CloudStorageFile: The export file in Cloud Storage
   537  type CloudStorageFile struct {
   538  	// BucketName: The name of the Cloud Storage bucket for the export file. You
   539  	// can use this value in the Cloud Storage JSON API
   540  	// (https://cloud.google.com/storage/docs/json_api) or XML API
   541  	// (https://cloud.google.com/storage/docs/xml-api), but not to list the bucket
   542  	// contents. Instead, you can get individual export files
   543  	// (https://cloud.google.com/storage/docs/json_api/v1/objects/get) by object
   544  	// name.
   545  	BucketName string `json:"bucketName,omitempty"`
   546  	// Md5Hash: The md5 hash of the file.
   547  	Md5Hash string `json:"md5Hash,omitempty"`
   548  	// ObjectName: The name of the Cloud Storage object for the export file. You
   549  	// can use this value in the Cloud Storage JSON API
   550  	// (https://cloud.google.com/storage/docs/json_api) or XML API
   551  	// (https://cloud.google.com/storage/docs/xml-api).
   552  	ObjectName string `json:"objectName,omitempty"`
   553  	// Size: The export file size.
   554  	Size int64 `json:"size,omitempty,string"`
   555  	// ForceSendFields is a list of field names (e.g. "BucketName") to
   556  	// unconditionally include in API requests. By default, fields with empty or
   557  	// default values are omitted from API requests. See
   558  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   559  	// details.
   560  	ForceSendFields []string `json:"-"`
   561  	// NullFields is a list of field names (e.g. "BucketName") to include in API
   562  	// requests with the JSON null value. By default, fields with empty values are
   563  	// omitted from API requests. See
   564  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   565  	NullFields []string `json:"-"`
   566  }
   567  
   568  func (s *CloudStorageFile) MarshalJSON() ([]byte, error) {
   569  	type NoMethod CloudStorageFile
   570  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   571  }
   572  
   573  // CloudStorageSink: Export sink for Cloud Storage files.
   574  type CloudStorageSink struct {
   575  	// Files: Output only. The exported files in Cloud Storage.
   576  	Files []*CloudStorageFile `json:"files,omitempty"`
   577  	// ForceSendFields is a list of field names (e.g. "Files") to unconditionally
   578  	// include in API requests. By default, fields with empty or default values are
   579  	// omitted from API requests. See
   580  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   581  	// details.
   582  	ForceSendFields []string `json:"-"`
   583  	// NullFields is a list of field names (e.g. "Files") to include in API
   584  	// requests with the JSON null value. By default, fields with empty values are
   585  	// omitted from API requests. See
   586  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   587  	NullFields []string `json:"-"`
   588  }
   589  
   590  func (s *CloudStorageSink) MarshalJSON() ([]byte, error) {
   591  	type NoMethod CloudStorageSink
   592  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   593  }
   594  
   595  // CorpusQuery: Service-specific options for holds.
   596  type CorpusQuery struct {
   597  	// DriveQuery: Service-specific options for Drive holds. If set, **CorpusType**
   598  	// must be **DRIVE**.
   599  	DriveQuery *HeldDriveQuery `json:"driveQuery,omitempty"`
   600  	// GroupsQuery: Service-specific options for Groups holds. If set,
   601  	// **CorpusType** must be **GROUPS**.
   602  	GroupsQuery *HeldGroupsQuery `json:"groupsQuery,omitempty"`
   603  	// HangoutsChatQuery: Service-specific options for Chat holds. If set,
   604  	// **CorpusType** must be **HANGOUTS_CHAT**.
   605  	HangoutsChatQuery *HeldHangoutsChatQuery `json:"hangoutsChatQuery,omitempty"`
   606  	// MailQuery: Service-specific options for Gmail holds. If set, **CorpusType**
   607  	// must be **MAIL**.
   608  	MailQuery *HeldMailQuery `json:"mailQuery,omitempty"`
   609  	// VoiceQuery: Service-specific options for Voice holds. If set, **CorpusType**
   610  	// must be **VOICE**.
   611  	VoiceQuery *HeldVoiceQuery `json:"voiceQuery,omitempty"`
   612  	// ForceSendFields is a list of field names (e.g. "DriveQuery") to
   613  	// unconditionally include in API requests. By default, fields with empty or
   614  	// default values are omitted from API requests. See
   615  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   616  	// details.
   617  	ForceSendFields []string `json:"-"`
   618  	// NullFields is a list of field names (e.g. "DriveQuery") to include in API
   619  	// requests with the JSON null value. By default, fields with empty values are
   620  	// omitted from API requests. See
   621  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   622  	NullFields []string `json:"-"`
   623  }
   624  
   625  func (s *CorpusQuery) MarshalJSON() ([]byte, error) {
   626  	type NoMethod CorpusQuery
   627  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   628  }
   629  
   630  // CountArtifactsMetadata: Long running operation metadata for CountArtifacts.
   631  type CountArtifactsMetadata struct {
   632  	// EndTime: End time of count operation. Available when operation is done.
   633  	EndTime string `json:"endTime,omitempty"`
   634  	// MatterId: The matter ID of the associated matter.
   635  	MatterId string `json:"matterId,omitempty"`
   636  	// Query: The search query from the request.
   637  	Query *Query `json:"query,omitempty"`
   638  	// StartTime: Creation time of count operation.
   639  	StartTime string `json:"startTime,omitempty"`
   640  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
   641  	// include in API requests. By default, fields with empty or default values are
   642  	// omitted from API requests. See
   643  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   644  	// details.
   645  	ForceSendFields []string `json:"-"`
   646  	// NullFields is a list of field names (e.g. "EndTime") to include in API
   647  	// requests with the JSON null value. By default, fields with empty values are
   648  	// omitted from API requests. See
   649  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   650  	NullFields []string `json:"-"`
   651  }
   652  
   653  func (s *CountArtifactsMetadata) MarshalJSON() ([]byte, error) {
   654  	type NoMethod CountArtifactsMetadata
   655  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   656  }
   657  
   658  // CountArtifactsRequest: Count artifacts request.
   659  type CountArtifactsRequest struct {
   660  	// Query: The search query.
   661  	Query *Query `json:"query,omitempty"`
   662  	// View: Sets the granularity of the count results.
   663  	//
   664  	// Possible values:
   665  	//   "COUNT_RESULT_VIEW_UNSPECIFIED" - Default. Same as **TOTAL_COUNT**.
   666  	//   "TOTAL_COUNT" - Response includes counts of the total accounts, queried
   667  	// accounts, matching accounts, non-queryable accounts, and queried account
   668  	// errors.
   669  	//   "ALL" - Response includes the same details as **TOTAL_COUNT**, plus
   670  	// additional account breakdown.
   671  	View string `json:"view,omitempty"`
   672  	// ForceSendFields is a list of field names (e.g. "Query") to unconditionally
   673  	// include in API requests. By default, fields with empty or default values are
   674  	// omitted from API requests. See
   675  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   676  	// details.
   677  	ForceSendFields []string `json:"-"`
   678  	// NullFields is a list of field names (e.g. "Query") to include in API
   679  	// requests with the JSON null value. By default, fields with empty values are
   680  	// omitted from API requests. See
   681  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   682  	NullFields []string `json:"-"`
   683  }
   684  
   685  func (s *CountArtifactsRequest) MarshalJSON() ([]byte, error) {
   686  	type NoMethod CountArtifactsRequest
   687  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   688  }
   689  
   690  // CountArtifactsResponse: Definition of the response for method
   691  // CountArtifacts.
   692  type CountArtifactsResponse struct {
   693  	// GroupsCountResult: Count metrics for Groups.
   694  	GroupsCountResult *GroupsCountResult `json:"groupsCountResult,omitempty"`
   695  	// MailCountResult: Count metrics for Gmail and classic Hangouts.
   696  	MailCountResult *MailCountResult `json:"mailCountResult,omitempty"`
   697  	// TotalCount: Total count of messages.
   698  	TotalCount int64 `json:"totalCount,omitempty,string"`
   699  	// ForceSendFields is a list of field names (e.g. "GroupsCountResult") to
   700  	// unconditionally include in API requests. By default, fields with empty or
   701  	// default values are omitted from API requests. See
   702  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   703  	// details.
   704  	ForceSendFields []string `json:"-"`
   705  	// NullFields is a list of field names (e.g. "GroupsCountResult") to include in
   706  	// API requests with the JSON null value. By default, fields with empty values
   707  	// are omitted from API requests. See
   708  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   709  	NullFields []string `json:"-"`
   710  }
   711  
   712  func (s *CountArtifactsResponse) MarshalJSON() ([]byte, error) {
   713  	type NoMethod CountArtifactsResponse
   714  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   715  }
   716  
   717  // DriveExportOptions: Options for Drive exports.
   718  type DriveExportOptions struct {
   719  	// IncludeAccessInfo: To include access level information for users with
   720  	// indirect access (https://support.google.com/vault/answer/6099459#metadata)
   721  	// to files, set to **true**.
   722  	IncludeAccessInfo bool `json:"includeAccessInfo,omitempty"`
   723  	// ForceSendFields is a list of field names (e.g. "IncludeAccessInfo") to
   724  	// unconditionally include in API requests. By default, fields with empty or
   725  	// default values are omitted from API requests. See
   726  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   727  	// details.
   728  	ForceSendFields []string `json:"-"`
   729  	// NullFields is a list of field names (e.g. "IncludeAccessInfo") to include in
   730  	// API requests with the JSON null value. By default, fields with empty values
   731  	// are omitted from API requests. See
   732  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   733  	NullFields []string `json:"-"`
   734  }
   735  
   736  func (s *DriveExportOptions) MarshalJSON() ([]byte, error) {
   737  	type NoMethod DriveExportOptions
   738  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   739  }
   740  
   741  // DriveOptions: Additional options for Drive search
   742  type DriveOptions struct {
   743  	// ClientSideEncryptedOption: Set whether the results include only content
   744  	// encrypted with Google Workspace Client-side encryption
   745  	// (https://support.google.com/a?p=cse_ov) content, only unencrypted content,
   746  	// or both. Defaults to both. Currently supported for Drive.
   747  	//
   748  	// Possible values:
   749  	//   "CLIENT_SIDE_ENCRYPTED_OPTION_UNSPECIFIED" - Encryption status
   750  	// unspecified. Results include both client-side encrypted and non-encrypted
   751  	// content.
   752  	//   "CLIENT_SIDE_ENCRYPTED_OPTION_ANY" - Include both client-side encrypted
   753  	// and unencrypted content in results.
   754  	//   "CLIENT_SIDE_ENCRYPTED_OPTION_ENCRYPTED" - Include client-side encrypted
   755  	// content only.
   756  	//   "CLIENT_SIDE_ENCRYPTED_OPTION_UNENCRYPTED" - Include unencrypted content
   757  	// only.
   758  	ClientSideEncryptedOption string `json:"clientSideEncryptedOption,omitempty"`
   759  	// IncludeSharedDrives: Set to **true** to include shared drives.
   760  	IncludeSharedDrives bool `json:"includeSharedDrives,omitempty"`
   761  	// IncludeTeamDrives: Set to true to include Team Drive.
   762  	IncludeTeamDrives bool `json:"includeTeamDrives,omitempty"`
   763  	// VersionDate: Search the current version of the Drive file, but export the
   764  	// contents of the last version saved before 12:00 AM UTC on the specified
   765  	// date. Enter the date in UTC.
   766  	VersionDate string `json:"versionDate,omitempty"`
   767  	// ForceSendFields is a list of field names (e.g. "ClientSideEncryptedOption")
   768  	// to unconditionally include in API requests. By default, fields with empty or
   769  	// default values are omitted from API requests. See
   770  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   771  	// details.
   772  	ForceSendFields []string `json:"-"`
   773  	// NullFields is a list of field names (e.g. "ClientSideEncryptedOption") to
   774  	// include in API requests with the JSON null value. By default, fields with
   775  	// empty values are omitted from API requests. See
   776  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   777  	NullFields []string `json:"-"`
   778  }
   779  
   780  func (s *DriveOptions) MarshalJSON() ([]byte, error) {
   781  	type NoMethod DriveOptions
   782  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   783  }
   784  
   785  // Empty: A generic empty message that you can re-use to avoid defining
   786  // duplicated empty messages in your APIs. A typical example is to use it as
   787  // the request or the response type of an API method. For instance: service Foo
   788  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   789  type Empty struct {
   790  	// ServerResponse contains the HTTP response code and headers from the server.
   791  	googleapi.ServerResponse `json:"-"`
   792  }
   793  
   794  // Export: An export. To work with Vault resources, the account must have the
   795  // required Vault privileges (https://support.google.com/vault/answer/2799699)
   796  // and access to the matter. To access a matter, the account must have created
   797  // the matter, have the matter shared with them, or have the **View All
   798  // Matters** privilege.
   799  type Export struct {
   800  	// CloudStorageSink: Output only. The sink for export files in Cloud Storage.
   801  	CloudStorageSink *CloudStorageSink `json:"cloudStorageSink,omitempty"`
   802  	// CreateTime: Output only. The time when the export was created.
   803  	CreateTime string `json:"createTime,omitempty"`
   804  	// ExportOptions: Additional export options.
   805  	ExportOptions *ExportOptions `json:"exportOptions,omitempty"`
   806  	// Id: Output only. The generated export ID.
   807  	Id string `json:"id,omitempty"`
   808  	// MatterId: Output only. The matter ID.
   809  	MatterId string `json:"matterId,omitempty"`
   810  	// Name: The export name. Don't use special characters (~!$'(),;@:/?) in the
   811  	// name, they can prevent you from downloading exports.
   812  	Name string `json:"name,omitempty"`
   813  	// ParentExportId: Output only. Identifies the parent export that spawned this
   814  	// child export. This is only set on child exports.
   815  	ParentExportId string `json:"parentExportId,omitempty"`
   816  	// Query: The query parameters used to create the export.
   817  	Query *Query `json:"query,omitempty"`
   818  	// Requester: Output only. The requester of the export.
   819  	Requester *UserInfo `json:"requester,omitempty"`
   820  	// Stats: Output only. Details about the export progress and size.
   821  	Stats *ExportStats `json:"stats,omitempty"`
   822  	// Status: Output only. The status of the export.
   823  	//
   824  	// Possible values:
   825  	//   "EXPORT_STATUS_UNSPECIFIED" - The status is unspecified.
   826  	//   "COMPLETED" - The export completed.
   827  	//   "FAILED" - The export failed.
   828  	//   "IN_PROGRESS" - The export is in progress.
   829  	Status string `json:"status,omitempty"`
   830  
   831  	// ServerResponse contains the HTTP response code and headers from the server.
   832  	googleapi.ServerResponse `json:"-"`
   833  	// ForceSendFields is a list of field names (e.g. "CloudStorageSink") to
   834  	// unconditionally include in API requests. By default, fields with empty or
   835  	// default values are omitted from API requests. See
   836  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   837  	// details.
   838  	ForceSendFields []string `json:"-"`
   839  	// NullFields is a list of field names (e.g. "CloudStorageSink") to include in
   840  	// API requests with the JSON null value. By default, fields with empty values
   841  	// are omitted from API requests. See
   842  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   843  	NullFields []string `json:"-"`
   844  }
   845  
   846  func (s *Export) MarshalJSON() ([]byte, error) {
   847  	type NoMethod Export
   848  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   849  }
   850  
   851  // ExportOptions: Additional options for exports
   852  type ExportOptions struct {
   853  	// CalendarOptions: Option available for Calendar export.
   854  	CalendarOptions *CalendarExportOptions `json:"calendarOptions,omitempty"`
   855  	// DriveOptions: Options for Drive exports.
   856  	DriveOptions *DriveExportOptions `json:"driveOptions,omitempty"`
   857  	// GroupsOptions: Options for Groups exports.
   858  	GroupsOptions *GroupsExportOptions `json:"groupsOptions,omitempty"`
   859  	// HangoutsChatOptions: Options for Chat exports.
   860  	HangoutsChatOptions *HangoutsChatExportOptions `json:"hangoutsChatOptions,omitempty"`
   861  	// MailOptions: Options for Gmail exports.
   862  	MailOptions *MailExportOptions `json:"mailOptions,omitempty"`
   863  	// Region: The requested data region for the export.
   864  	//
   865  	// Possible values:
   866  	//   "EXPORT_REGION_UNSPECIFIED" - The region is unspecified. Defaults to ANY.
   867  	//   "ANY" - Any region.
   868  	//   "US" - United States region.
   869  	//   "EUROPE" - Europe region.
   870  	Region string `json:"region,omitempty"`
   871  	// VoiceOptions: Options for Voice exports.
   872  	VoiceOptions *VoiceExportOptions `json:"voiceOptions,omitempty"`
   873  	// ForceSendFields is a list of field names (e.g. "CalendarOptions") to
   874  	// unconditionally include in API requests. By default, fields with empty or
   875  	// default values are omitted from API requests. See
   876  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   877  	// details.
   878  	ForceSendFields []string `json:"-"`
   879  	// NullFields is a list of field names (e.g. "CalendarOptions") to include in
   880  	// API requests with the JSON null value. By default, fields with empty values
   881  	// are omitted from API requests. See
   882  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   883  	NullFields []string `json:"-"`
   884  }
   885  
   886  func (s *ExportOptions) MarshalJSON() ([]byte, error) {
   887  	type NoMethod ExportOptions
   888  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   889  }
   890  
   891  // ExportStats: Progress information for an export.
   892  type ExportStats struct {
   893  	// ExportedArtifactCount: The number of messages or files already processed for
   894  	// export.
   895  	ExportedArtifactCount int64 `json:"exportedArtifactCount,omitempty,string"`
   896  	// SizeInBytes: The size of export in bytes.
   897  	SizeInBytes int64 `json:"sizeInBytes,omitempty,string"`
   898  	// TotalArtifactCount: The number of messages or files to be exported.
   899  	TotalArtifactCount int64 `json:"totalArtifactCount,omitempty,string"`
   900  	// ForceSendFields is a list of field names (e.g. "ExportedArtifactCount") to
   901  	// unconditionally include in API requests. By default, fields with empty or
   902  	// default values are omitted from API requests. See
   903  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   904  	// details.
   905  	ForceSendFields []string `json:"-"`
   906  	// NullFields is a list of field names (e.g. "ExportedArtifactCount") to
   907  	// include in API requests with the JSON null value. By default, fields with
   908  	// empty values are omitted from API requests. See
   909  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   910  	NullFields []string `json:"-"`
   911  }
   912  
   913  func (s *ExportStats) MarshalJSON() ([]byte, error) {
   914  	type NoMethod ExportStats
   915  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   916  }
   917  
   918  // GroupsCountResult: Groups specific count metrics.
   919  type GroupsCountResult struct {
   920  	// AccountCountErrors: Error occurred when querying these accounts.
   921  	AccountCountErrors []*AccountCountError `json:"accountCountErrors,omitempty"`
   922  	// AccountCounts: Subtotal count per matching account that have more than zero
   923  	// messages.
   924  	AccountCounts []*AccountCount `json:"accountCounts,omitempty"`
   925  	// MatchingAccountsCount: Total number of accounts that can be queried and have
   926  	// more than zero messages.
   927  	MatchingAccountsCount int64 `json:"matchingAccountsCount,omitempty,string"`
   928  	// NonQueryableAccounts: When **DataScope** is **HELD_DATA**, these accounts in
   929  	// the request are not queried because they are not on hold. For other data
   930  	// scope, this field is not set.
   931  	NonQueryableAccounts []string `json:"nonQueryableAccounts,omitempty"`
   932  	// QueriedAccountsCount: Total number of accounts involved in this count
   933  	// operation.
   934  	QueriedAccountsCount int64 `json:"queriedAccountsCount,omitempty,string"`
   935  	// ForceSendFields is a list of field names (e.g. "AccountCountErrors") to
   936  	// unconditionally include in API requests. By default, fields with empty or
   937  	// default values are omitted from API requests. See
   938  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   939  	// details.
   940  	ForceSendFields []string `json:"-"`
   941  	// NullFields is a list of field names (e.g. "AccountCountErrors") to include
   942  	// in API requests with the JSON null value. By default, fields with empty
   943  	// values are omitted from API requests. See
   944  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   945  	NullFields []string `json:"-"`
   946  }
   947  
   948  func (s *GroupsCountResult) MarshalJSON() ([]byte, error) {
   949  	type NoMethod GroupsCountResult
   950  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   951  }
   952  
   953  // GroupsExportOptions: Options for Groups exports.
   954  type GroupsExportOptions struct {
   955  	// ExportFormat: The file format for exported messages.
   956  	//
   957  	// Possible values:
   958  	//   "EXPORT_FORMAT_UNSPECIFIED" - No export format specified.
   959  	//   "MBOX" - Export as MBOX. Only available for Gmail, Groups, Hangouts and
   960  	// Voice.
   961  	//   "PST" - Export as PST. Only available for Gmail, Groups, Hangouts, Voice
   962  	// and Calendar.
   963  	//   "ICS" - Export as ICS. Only available for Calendar.
   964  	ExportFormat string `json:"exportFormat,omitempty"`
   965  	// ForceSendFields is a list of field names (e.g. "ExportFormat") to
   966  	// unconditionally include in API requests. By default, fields with empty or
   967  	// default values are omitted from API requests. See
   968  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   969  	// details.
   970  	ForceSendFields []string `json:"-"`
   971  	// NullFields is a list of field names (e.g. "ExportFormat") to include in API
   972  	// requests with the JSON null value. By default, fields with empty values are
   973  	// omitted from API requests. See
   974  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   975  	NullFields []string `json:"-"`
   976  }
   977  
   978  func (s *GroupsExportOptions) MarshalJSON() ([]byte, error) {
   979  	type NoMethod GroupsExportOptions
   980  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   981  }
   982  
   983  // HangoutsChatExportOptions: Options for Chat exports.
   984  type HangoutsChatExportOptions struct {
   985  	// ExportFormat: The file format for exported messages.
   986  	//
   987  	// Possible values:
   988  	//   "EXPORT_FORMAT_UNSPECIFIED" - No export format specified.
   989  	//   "MBOX" - Export as MBOX. Only available for Gmail, Groups, Hangouts and
   990  	// Voice.
   991  	//   "PST" - Export as PST. Only available for Gmail, Groups, Hangouts, Voice
   992  	// and Calendar.
   993  	//   "ICS" - Export as ICS. Only available for Calendar.
   994  	ExportFormat string `json:"exportFormat,omitempty"`
   995  	// ForceSendFields is a list of field names (e.g. "ExportFormat") to
   996  	// unconditionally include in API requests. By default, fields with empty or
   997  	// default values are omitted from API requests. See
   998  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   999  	// details.
  1000  	ForceSendFields []string `json:"-"`
  1001  	// NullFields is a list of field names (e.g. "ExportFormat") to include in API
  1002  	// requests with the JSON null value. By default, fields with empty values are
  1003  	// omitted from API requests. See
  1004  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1005  	NullFields []string `json:"-"`
  1006  }
  1007  
  1008  func (s *HangoutsChatExportOptions) MarshalJSON() ([]byte, error) {
  1009  	type NoMethod HangoutsChatExportOptions
  1010  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1011  }
  1012  
  1013  // HangoutsChatInfo: The Chat spaces to search
  1014  type HangoutsChatInfo struct {
  1015  	// RoomId: A list of Chat spaces IDs, as provided by the Chat API
  1016  	// (https://developers.google.com/chat). There is a limit of exporting from 500
  1017  	// Chat spaces per request.
  1018  	RoomId []string `json:"roomId,omitempty"`
  1019  	// ForceSendFields is a list of field names (e.g. "RoomId") to unconditionally
  1020  	// include in API requests. By default, fields with empty or default values are
  1021  	// omitted from API requests. See
  1022  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1023  	// details.
  1024  	ForceSendFields []string `json:"-"`
  1025  	// NullFields is a list of field names (e.g. "RoomId") to include in API
  1026  	// requests with the JSON null value. By default, fields with empty values are
  1027  	// omitted from API requests. See
  1028  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1029  	NullFields []string `json:"-"`
  1030  }
  1031  
  1032  func (s *HangoutsChatInfo) MarshalJSON() ([]byte, error) {
  1033  	type NoMethod HangoutsChatInfo
  1034  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1035  }
  1036  
  1037  // HangoutsChatOptions: Additional options for Google Chat search
  1038  type HangoutsChatOptions struct {
  1039  	// IncludeRooms: For searches by account or organizational unit, set to
  1040  	// **true** to include rooms.
  1041  	IncludeRooms bool `json:"includeRooms,omitempty"`
  1042  	// ForceSendFields is a list of field names (e.g. "IncludeRooms") 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. "IncludeRooms") 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 *HangoutsChatOptions) MarshalJSON() ([]byte, error) {
  1056  	type NoMethod HangoutsChatOptions
  1057  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1058  }
  1059  
  1060  // HeldAccount: An account covered by a hold. This structure is immutable. It
  1061  // can be an individual account or a Google Group, depending on the service. To
  1062  // work with Vault resources, the account must have the [required Vault
  1063  // privileges] (https://support.google.com/vault/answer/2799699) and access to
  1064  // the matter. To access a matter, the account must have created the matter,
  1065  // have the matter shared with them, or have the **View All Matters**
  1066  // privilege.
  1067  type HeldAccount struct {
  1068  	// AccountId: The account ID, as provided by the Admin SDK
  1069  	// (https://developers.google.com/admin-sdk/).
  1070  	AccountId string `json:"accountId,omitempty"`
  1071  	// Email: The primary email address of the account. If used as an input, this
  1072  	// takes precedence over **accountId**.
  1073  	Email string `json:"email,omitempty"`
  1074  	// FirstName: Output only. The first name of the account holder.
  1075  	FirstName string `json:"firstName,omitempty"`
  1076  	// HoldTime: Output only. When the account was put on hold.
  1077  	HoldTime string `json:"holdTime,omitempty"`
  1078  	// LastName: Output only. The last name of the account holder.
  1079  	LastName string `json:"lastName,omitempty"`
  1080  
  1081  	// ServerResponse contains the HTTP response code and headers from the server.
  1082  	googleapi.ServerResponse `json:"-"`
  1083  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  1084  	// unconditionally include in API requests. By default, fields with empty or
  1085  	// default values are omitted from API requests. See
  1086  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1087  	// details.
  1088  	ForceSendFields []string `json:"-"`
  1089  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  1090  	// requests with the JSON null value. By default, fields with empty values are
  1091  	// omitted from API requests. See
  1092  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1093  	NullFields []string `json:"-"`
  1094  }
  1095  
  1096  func (s *HeldAccount) MarshalJSON() ([]byte, error) {
  1097  	type NoMethod HeldAccount
  1098  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1099  }
  1100  
  1101  // HeldDriveQuery: Options for Drive holds.
  1102  type HeldDriveQuery struct {
  1103  	// IncludeSharedDriveFiles: To include files in shared drives in the hold, set
  1104  	// to **true**.
  1105  	IncludeSharedDriveFiles bool `json:"includeSharedDriveFiles,omitempty"`
  1106  	// IncludeTeamDriveFiles: To include files in Team Drives in the hold, set to
  1107  	// **true**.
  1108  	IncludeTeamDriveFiles bool `json:"includeTeamDriveFiles,omitempty"`
  1109  	// ForceSendFields is a list of field names (e.g. "IncludeSharedDriveFiles") to
  1110  	// unconditionally include in API requests. By default, fields with empty or
  1111  	// default values are omitted from API requests. See
  1112  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1113  	// details.
  1114  	ForceSendFields []string `json:"-"`
  1115  	// NullFields is a list of field names (e.g. "IncludeSharedDriveFiles") to
  1116  	// include in API requests with the JSON null value. By default, fields with
  1117  	// empty values are omitted from API requests. See
  1118  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1119  	NullFields []string `json:"-"`
  1120  }
  1121  
  1122  func (s *HeldDriveQuery) MarshalJSON() ([]byte, error) {
  1123  	type NoMethod HeldDriveQuery
  1124  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1125  }
  1126  
  1127  // HeldGroupsQuery: Query options for group holds.
  1128  type HeldGroupsQuery struct {
  1129  	// EndTime: The end time for the query. Specify in GMT. The value is rounded to
  1130  	// 12 AM on the specified date.
  1131  	EndTime string `json:"endTime,omitempty"`
  1132  	// StartTime: The start time for the query. Specify in GMT. The value is
  1133  	// rounded to 12 AM on the specified date.
  1134  	StartTime string `json:"startTime,omitempty"`
  1135  	// Terms: The search operators
  1136  	// (https://support.google.com/vault/answer/2474474) used to refine the
  1137  	// messages covered by the hold.
  1138  	Terms string `json:"terms,omitempty"`
  1139  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  1140  	// include in API requests. By default, fields with empty or default values are
  1141  	// omitted from API requests. See
  1142  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1143  	// details.
  1144  	ForceSendFields []string `json:"-"`
  1145  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  1146  	// requests with the JSON null value. By default, fields with empty values are
  1147  	// omitted from API requests. See
  1148  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1149  	NullFields []string `json:"-"`
  1150  }
  1151  
  1152  func (s *HeldGroupsQuery) MarshalJSON() ([]byte, error) {
  1153  	type NoMethod HeldGroupsQuery
  1154  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1155  }
  1156  
  1157  // HeldHangoutsChatQuery: Options for Chat holds.
  1158  type HeldHangoutsChatQuery struct {
  1159  	// IncludeRooms: To include messages in Chat spaces the user was a member of,
  1160  	// set to **true**.
  1161  	IncludeRooms bool `json:"includeRooms,omitempty"`
  1162  	// ForceSendFields is a list of field names (e.g. "IncludeRooms") to
  1163  	// unconditionally include in API requests. By default, fields with empty or
  1164  	// default values are omitted from API requests. See
  1165  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1166  	// details.
  1167  	ForceSendFields []string `json:"-"`
  1168  	// NullFields is a list of field names (e.g. "IncludeRooms") to include in API
  1169  	// requests with the JSON null value. By default, fields with empty values are
  1170  	// omitted from API requests. See
  1171  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1172  	NullFields []string `json:"-"`
  1173  }
  1174  
  1175  func (s *HeldHangoutsChatQuery) MarshalJSON() ([]byte, error) {
  1176  	type NoMethod HeldHangoutsChatQuery
  1177  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1178  }
  1179  
  1180  // HeldMailQuery: Query options for Gmail holds.
  1181  type HeldMailQuery struct {
  1182  	// EndTime: The end time for the query. Specify in GMT. The value is rounded to
  1183  	// 12 AM on the specified date.
  1184  	EndTime string `json:"endTime,omitempty"`
  1185  	// StartTime: The start time for the query. Specify in GMT. The value is
  1186  	// rounded to 12 AM on the specified date.
  1187  	StartTime string `json:"startTime,omitempty"`
  1188  	// Terms: The search operators
  1189  	// (https://support.google.com/vault/answer/2474474) used to refine the
  1190  	// messages covered by the hold.
  1191  	Terms string `json:"terms,omitempty"`
  1192  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  1193  	// include in API requests. By default, fields with empty or default values are
  1194  	// omitted from API requests. See
  1195  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1196  	// details.
  1197  	ForceSendFields []string `json:"-"`
  1198  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  1199  	// requests with the JSON null value. By default, fields with empty values are
  1200  	// omitted from API requests. See
  1201  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1202  	NullFields []string `json:"-"`
  1203  }
  1204  
  1205  func (s *HeldMailQuery) MarshalJSON() ([]byte, error) {
  1206  	type NoMethod HeldMailQuery
  1207  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1208  }
  1209  
  1210  // HeldOrgUnit: The organizational unit covered by a hold. This structure is
  1211  // immutable.
  1212  type HeldOrgUnit struct {
  1213  	// HoldTime: When the organizational unit was put on hold. This property is
  1214  	// immutable.
  1215  	HoldTime string `json:"holdTime,omitempty"`
  1216  	// OrgUnitId: The organizational unit's immutable ID as provided by the Admin
  1217  	// SDK (https://developers.google.com/admin-sdk/).
  1218  	OrgUnitId string `json:"orgUnitId,omitempty"`
  1219  	// ForceSendFields is a list of field names (e.g. "HoldTime") to
  1220  	// unconditionally include in API requests. By default, fields with empty or
  1221  	// default values are omitted from API requests. See
  1222  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1223  	// details.
  1224  	ForceSendFields []string `json:"-"`
  1225  	// NullFields is a list of field names (e.g. "HoldTime") to include in API
  1226  	// requests with the JSON null value. By default, fields with empty values are
  1227  	// omitted from API requests. See
  1228  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1229  	NullFields []string `json:"-"`
  1230  }
  1231  
  1232  func (s *HeldOrgUnit) MarshalJSON() ([]byte, error) {
  1233  	type NoMethod HeldOrgUnit
  1234  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1235  }
  1236  
  1237  // HeldVoiceQuery: Options for Voice holds.
  1238  type HeldVoiceQuery struct {
  1239  	// CoveredData: A list of data types covered by the hold. Should be non-empty.
  1240  	// Order does not matter and duplicates are ignored.
  1241  	//
  1242  	// Possible values:
  1243  	//   "COVERED_DATA_UNSPECIFIED" - Covered data unspecified.
  1244  	//   "TEXT_MESSAGES" - Voice text messages.
  1245  	//   "VOICEMAILS" - Voicemails and their transcripts.
  1246  	//   "CALL_LOGS" - Call logs.
  1247  	CoveredData []string `json:"coveredData,omitempty"`
  1248  	// ForceSendFields is a list of field names (e.g. "CoveredData") to
  1249  	// unconditionally include in API requests. By default, fields with empty or
  1250  	// default values are omitted from API requests. See
  1251  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1252  	// details.
  1253  	ForceSendFields []string `json:"-"`
  1254  	// NullFields is a list of field names (e.g. "CoveredData") to include in API
  1255  	// requests with the JSON null value. By default, fields with empty values are
  1256  	// omitted from API requests. See
  1257  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1258  	NullFields []string `json:"-"`
  1259  }
  1260  
  1261  func (s *HeldVoiceQuery) MarshalJSON() ([]byte, error) {
  1262  	type NoMethod HeldVoiceQuery
  1263  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1264  }
  1265  
  1266  // Hold: A hold. A hold prevents the specified Google Workspace service from
  1267  // purging data for specific accounts or all members of an organizational unit.
  1268  // To work with Vault resources, the account must have the [required Vault
  1269  // privileges] (https://support.google.com/vault/answer/2799699) and access to
  1270  // the matter. To access a matter, the account must have created the matter,
  1271  // have the matter shared with them, or have the **View All Matters**
  1272  // privilege.
  1273  type Hold struct {
  1274  	// Accounts: If set, the hold applies to the specified accounts and **orgUnit**
  1275  	// must be empty.
  1276  	Accounts []*HeldAccount `json:"accounts,omitempty"`
  1277  	// Corpus: The service to be searched.
  1278  	//
  1279  	// Possible values:
  1280  	//   "CORPUS_TYPE_UNSPECIFIED" - No service specified.
  1281  	//   "DRIVE" - Drive, including Meet and Sites.
  1282  	//   "MAIL" - For search, Gmail and classic Hangouts. For holds, Gmail only.
  1283  	//   "GROUPS" - Groups.
  1284  	//   "HANGOUTS_CHAT" - For export, Google Chat only. For holds, Google Chat and
  1285  	// classic Hangouts.
  1286  	//   "VOICE" - Google Voice.
  1287  	//   "CALENDAR" - Calendar.
  1288  	Corpus string `json:"corpus,omitempty"`
  1289  	// HoldId: The unique immutable ID of the hold. Assigned during creation.
  1290  	HoldId string `json:"holdId,omitempty"`
  1291  	// Name: The name of the hold.
  1292  	Name string `json:"name,omitempty"`
  1293  	// OrgUnit: If set, the hold applies to all members of the organizational unit
  1294  	// and **accounts** must be empty. This property is mutable. For Groups holds,
  1295  	// set **accounts**.
  1296  	OrgUnit *HeldOrgUnit `json:"orgUnit,omitempty"`
  1297  	// Query: Service-specific options. If set, **CorpusQuery** must match
  1298  	// **CorpusType**.
  1299  	Query *CorpusQuery `json:"query,omitempty"`
  1300  	// UpdateTime: The last time this hold was modified.
  1301  	UpdateTime string `json:"updateTime,omitempty"`
  1302  
  1303  	// ServerResponse contains the HTTP response code and headers from the server.
  1304  	googleapi.ServerResponse `json:"-"`
  1305  	// ForceSendFields is a list of field names (e.g. "Accounts") to
  1306  	// unconditionally include in API requests. By default, fields with empty or
  1307  	// default values are omitted from API requests. See
  1308  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1309  	// details.
  1310  	ForceSendFields []string `json:"-"`
  1311  	// NullFields is a list of field names (e.g. "Accounts") to include in API
  1312  	// requests with the JSON null value. By default, fields with empty values are
  1313  	// omitted from API requests. See
  1314  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1315  	NullFields []string `json:"-"`
  1316  }
  1317  
  1318  func (s *Hold) MarshalJSON() ([]byte, error) {
  1319  	type NoMethod Hold
  1320  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1321  }
  1322  
  1323  // ListExportsResponse: The exports for a matter.
  1324  type ListExportsResponse struct {
  1325  	// Exports: The list of exports.
  1326  	Exports []*Export `json:"exports,omitempty"`
  1327  	// NextPageToken: Page token to retrieve the next page of results in the list.
  1328  	NextPageToken string `json:"nextPageToken,omitempty"`
  1329  
  1330  	// ServerResponse contains the HTTP response code and headers from the server.
  1331  	googleapi.ServerResponse `json:"-"`
  1332  	// ForceSendFields is a list of field names (e.g. "Exports") to unconditionally
  1333  	// include in API requests. By default, fields with empty or default values are
  1334  	// omitted from API requests. See
  1335  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1336  	// details.
  1337  	ForceSendFields []string `json:"-"`
  1338  	// NullFields is a list of field names (e.g. "Exports") to include in API
  1339  	// requests with the JSON null value. By default, fields with empty values are
  1340  	// omitted from API requests. See
  1341  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1342  	NullFields []string `json:"-"`
  1343  }
  1344  
  1345  func (s *ListExportsResponse) MarshalJSON() ([]byte, error) {
  1346  	type NoMethod ListExportsResponse
  1347  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1348  }
  1349  
  1350  // ListHeldAccountsResponse: Returns a list of the accounts covered by a hold.
  1351  type ListHeldAccountsResponse struct {
  1352  	// Accounts: The held accounts on a hold.
  1353  	Accounts []*HeldAccount `json:"accounts,omitempty"`
  1354  
  1355  	// ServerResponse contains the HTTP response code and headers from the server.
  1356  	googleapi.ServerResponse `json:"-"`
  1357  	// ForceSendFields is a list of field names (e.g. "Accounts") to
  1358  	// unconditionally include in API requests. By default, fields with empty or
  1359  	// default values are omitted from API requests. See
  1360  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1361  	// details.
  1362  	ForceSendFields []string `json:"-"`
  1363  	// NullFields is a list of field names (e.g. "Accounts") to include in API
  1364  	// requests with the JSON null value. By default, fields with empty values are
  1365  	// omitted from API requests. See
  1366  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1367  	NullFields []string `json:"-"`
  1368  }
  1369  
  1370  func (s *ListHeldAccountsResponse) MarshalJSON() ([]byte, error) {
  1371  	type NoMethod ListHeldAccountsResponse
  1372  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1373  }
  1374  
  1375  // ListHoldsResponse: The holds for a matter.
  1376  type ListHoldsResponse struct {
  1377  	// Holds: The list of holds.
  1378  	Holds []*Hold `json:"holds,omitempty"`
  1379  	// NextPageToken: Page token to retrieve the next page of results in the list.
  1380  	// If this is empty, then there are no more holds to list.
  1381  	NextPageToken string `json:"nextPageToken,omitempty"`
  1382  
  1383  	// ServerResponse contains the HTTP response code and headers from the server.
  1384  	googleapi.ServerResponse `json:"-"`
  1385  	// ForceSendFields is a list of field names (e.g. "Holds") to unconditionally
  1386  	// include in API requests. By default, fields with empty or default values are
  1387  	// omitted from API requests. See
  1388  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1389  	// details.
  1390  	ForceSendFields []string `json:"-"`
  1391  	// NullFields is a list of field names (e.g. "Holds") to include in API
  1392  	// requests with the JSON null value. By default, fields with empty values are
  1393  	// omitted from API requests. See
  1394  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1395  	NullFields []string `json:"-"`
  1396  }
  1397  
  1398  func (s *ListHoldsResponse) MarshalJSON() ([]byte, error) {
  1399  	type NoMethod ListHoldsResponse
  1400  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1401  }
  1402  
  1403  // ListMattersResponse: Provides the list of matters.
  1404  type ListMattersResponse struct {
  1405  	// Matters: List of matters.
  1406  	Matters []*Matter `json:"matters,omitempty"`
  1407  	// NextPageToken: Page token to retrieve the next page of results in the list.
  1408  	NextPageToken string `json:"nextPageToken,omitempty"`
  1409  
  1410  	// ServerResponse contains the HTTP response code and headers from the server.
  1411  	googleapi.ServerResponse `json:"-"`
  1412  	// ForceSendFields is a list of field names (e.g. "Matters") to unconditionally
  1413  	// include in API requests. By default, fields with empty or default values are
  1414  	// omitted from API requests. See
  1415  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1416  	// details.
  1417  	ForceSendFields []string `json:"-"`
  1418  	// NullFields is a list of field names (e.g. "Matters") to include in API
  1419  	// requests with the JSON null value. By default, fields with empty values are
  1420  	// omitted from API requests. See
  1421  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1422  	NullFields []string `json:"-"`
  1423  }
  1424  
  1425  func (s *ListMattersResponse) MarshalJSON() ([]byte, error) {
  1426  	type NoMethod ListMattersResponse
  1427  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1428  }
  1429  
  1430  // ListOperationsResponse: The response message for Operations.ListOperations.
  1431  type ListOperationsResponse struct {
  1432  	// NextPageToken: The standard List next-page token.
  1433  	NextPageToken string `json:"nextPageToken,omitempty"`
  1434  	// Operations: A list of operations that matches the specified filter in the
  1435  	// request.
  1436  	Operations []*Operation `json:"operations,omitempty"`
  1437  
  1438  	// ServerResponse contains the HTTP response code and headers from the server.
  1439  	googleapi.ServerResponse `json:"-"`
  1440  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1441  	// unconditionally include in API requests. By default, fields with empty or
  1442  	// default values are omitted from API requests. See
  1443  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1444  	// details.
  1445  	ForceSendFields []string `json:"-"`
  1446  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1447  	// requests with the JSON null value. By default, fields with empty values are
  1448  	// omitted from API requests. See
  1449  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1450  	NullFields []string `json:"-"`
  1451  }
  1452  
  1453  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1454  	type NoMethod ListOperationsResponse
  1455  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1456  }
  1457  
  1458  // ListSavedQueriesResponse: Definition of the response for method
  1459  // ListSaveQuery.
  1460  type ListSavedQueriesResponse struct {
  1461  	// NextPageToken: Page token to retrieve the next page of results in the list.
  1462  	// If this is empty, then there are no more saved queries to list.
  1463  	NextPageToken string `json:"nextPageToken,omitempty"`
  1464  	// SavedQueries: List of saved queries.
  1465  	SavedQueries []*SavedQuery `json:"savedQueries,omitempty"`
  1466  
  1467  	// ServerResponse contains the HTTP response code and headers from the server.
  1468  	googleapi.ServerResponse `json:"-"`
  1469  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1470  	// unconditionally include in API requests. By default, fields with empty or
  1471  	// default values are omitted from API requests. See
  1472  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1473  	// details.
  1474  	ForceSendFields []string `json:"-"`
  1475  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1476  	// requests with the JSON null value. By default, fields with empty values are
  1477  	// omitted from API requests. See
  1478  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1479  	NullFields []string `json:"-"`
  1480  }
  1481  
  1482  func (s *ListSavedQueriesResponse) MarshalJSON() ([]byte, error) {
  1483  	type NoMethod ListSavedQueriesResponse
  1484  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1485  }
  1486  
  1487  // MailCountResult: Gmail and classic Hangouts-specific count metrics.
  1488  type MailCountResult struct {
  1489  	// AccountCountErrors: Errors occurred when querying these accounts.
  1490  	AccountCountErrors []*AccountCountError `json:"accountCountErrors,omitempty"`
  1491  	// AccountCounts: Subtotal count per matching account that have more than zero
  1492  	// messages.
  1493  	AccountCounts []*AccountCount `json:"accountCounts,omitempty"`
  1494  	// MatchingAccountsCount: Total number of accounts that can be queried and have
  1495  	// more than zero messages.
  1496  	MatchingAccountsCount int64 `json:"matchingAccountsCount,omitempty,string"`
  1497  	// NonQueryableAccounts: When **DataScope** is **HELD_DATA** and when account
  1498  	// emails are passed in explicitly, the list of accounts in the request that
  1499  	// are not queried because they are not on hold in the matter. For other data
  1500  	// scopes, this field is not set.
  1501  	NonQueryableAccounts []string `json:"nonQueryableAccounts,omitempty"`
  1502  	// QueriedAccountsCount: Total number of accounts involved in this count
  1503  	// operation.
  1504  	QueriedAccountsCount int64 `json:"queriedAccountsCount,omitempty,string"`
  1505  	// ForceSendFields is a list of field names (e.g. "AccountCountErrors") to
  1506  	// unconditionally include in API requests. By default, fields with empty or
  1507  	// default values are omitted from API requests. See
  1508  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1509  	// details.
  1510  	ForceSendFields []string `json:"-"`
  1511  	// NullFields is a list of field names (e.g. "AccountCountErrors") to include
  1512  	// in API requests with the JSON null value. By default, fields with empty
  1513  	// values are omitted from API requests. See
  1514  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1515  	NullFields []string `json:"-"`
  1516  }
  1517  
  1518  func (s *MailCountResult) MarshalJSON() ([]byte, error) {
  1519  	type NoMethod MailCountResult
  1520  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1521  }
  1522  
  1523  // MailExportOptions: Options for Gmail exports.
  1524  type MailExportOptions struct {
  1525  	// ExportFormat: The file format for exported messages.
  1526  	//
  1527  	// Possible values:
  1528  	//   "EXPORT_FORMAT_UNSPECIFIED" - No export format specified.
  1529  	//   "MBOX" - Export as MBOX. Only available for Gmail, Groups, Hangouts and
  1530  	// Voice.
  1531  	//   "PST" - Export as PST. Only available for Gmail, Groups, Hangouts, Voice
  1532  	// and Calendar.
  1533  	//   "ICS" - Export as ICS. Only available for Calendar.
  1534  	ExportFormat string `json:"exportFormat,omitempty"`
  1535  	// ExportLinkedDriveFiles: Optional. To enable exporting linked Drive files,
  1536  	// set to **true**.
  1537  	ExportLinkedDriveFiles bool `json:"exportLinkedDriveFiles,omitempty"`
  1538  	// ShowConfidentialModeContent: To export confidential mode content, set to
  1539  	// **true**.
  1540  	ShowConfidentialModeContent bool `json:"showConfidentialModeContent,omitempty"`
  1541  	// UseNewExport: To use the new export system, set to **true**.
  1542  	UseNewExport bool `json:"useNewExport,omitempty"`
  1543  	// ForceSendFields is a list of field names (e.g. "ExportFormat") to
  1544  	// unconditionally include in API requests. By default, fields with empty or
  1545  	// default values are omitted from API requests. See
  1546  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1547  	// details.
  1548  	ForceSendFields []string `json:"-"`
  1549  	// NullFields is a list of field names (e.g. "ExportFormat") to include in API
  1550  	// requests with the JSON null value. By default, fields with empty values are
  1551  	// omitted from API requests. See
  1552  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1553  	NullFields []string `json:"-"`
  1554  }
  1555  
  1556  func (s *MailExportOptions) MarshalJSON() ([]byte, error) {
  1557  	type NoMethod MailExportOptions
  1558  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1559  }
  1560  
  1561  // MailOptions: Additional options for Gmail search
  1562  type MailOptions struct {
  1563  	// ClientSideEncryptedOption: Specifies whether the results should include
  1564  	// encrypted content, unencrypted content, or both. Defaults to including both.
  1565  	//
  1566  	// Possible values:
  1567  	//   "CLIENT_SIDE_ENCRYPTED_OPTION_UNSPECIFIED" - Encryption status
  1568  	// unspecified. Results include both client-side encrypted and non-encrypted
  1569  	// content.
  1570  	//   "CLIENT_SIDE_ENCRYPTED_OPTION_ANY" - Include both client-side encrypted
  1571  	// and unencrypted content in results.
  1572  	//   "CLIENT_SIDE_ENCRYPTED_OPTION_ENCRYPTED" - Include client-side encrypted
  1573  	// content only.
  1574  	//   "CLIENT_SIDE_ENCRYPTED_OPTION_UNENCRYPTED" - Include unencrypted content
  1575  	// only.
  1576  	ClientSideEncryptedOption string `json:"clientSideEncryptedOption,omitempty"`
  1577  	// ExcludeDrafts: Set to **true** to exclude drafts.
  1578  	ExcludeDrafts bool `json:"excludeDrafts,omitempty"`
  1579  	// ForceSendFields is a list of field names (e.g. "ClientSideEncryptedOption")
  1580  	// to unconditionally include in API requests. By default, fields with empty or
  1581  	// default values are omitted from API requests. See
  1582  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1583  	// details.
  1584  	ForceSendFields []string `json:"-"`
  1585  	// NullFields is a list of field names (e.g. "ClientSideEncryptedOption") to
  1586  	// include in API requests with the JSON null value. By default, fields with
  1587  	// empty values are omitted from API requests. See
  1588  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1589  	NullFields []string `json:"-"`
  1590  }
  1591  
  1592  func (s *MailOptions) MarshalJSON() ([]byte, error) {
  1593  	type NoMethod MailOptions
  1594  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1595  }
  1596  
  1597  // Matter: Represents a matter. To work with Vault resources, the account must
  1598  // have the [required Vault privileges]
  1599  // (https://support.google.com/vault/answer/2799699) and access to the matter.
  1600  // To access a matter, the account must have created the matter, have the
  1601  // matter shared with them, or have the **View All Matters** privilege.
  1602  type Matter struct {
  1603  	// Description: An optional description for the matter.
  1604  	Description string `json:"description,omitempty"`
  1605  	// MatterId: The matter ID, which is generated by the server. Leave blank when
  1606  	// creating a matter.
  1607  	MatterId string `json:"matterId,omitempty"`
  1608  	// MatterPermissions: Lists the users and their permission for the matter.
  1609  	// Currently there is no programmer defined limit on the number of permissions
  1610  	// a matter can have.
  1611  	MatterPermissions []*MatterPermission `json:"matterPermissions,omitempty"`
  1612  	// Name: The name of the matter.
  1613  	Name string `json:"name,omitempty"`
  1614  	// State: The state of the matter.
  1615  	//
  1616  	// Possible values:
  1617  	//   "STATE_UNSPECIFIED" - The matter has no specified state.
  1618  	//   "OPEN" - The matter is open.
  1619  	//   "CLOSED" - The matter is closed.
  1620  	//   "DELETED" - The matter is deleted.
  1621  	State string `json:"state,omitempty"`
  1622  
  1623  	// ServerResponse contains the HTTP response code and headers from the server.
  1624  	googleapi.ServerResponse `json:"-"`
  1625  	// ForceSendFields is a list of field names (e.g. "Description") to
  1626  	// unconditionally include in API requests. By default, fields with empty or
  1627  	// default values are omitted from API requests. See
  1628  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1629  	// details.
  1630  	ForceSendFields []string `json:"-"`
  1631  	// NullFields is a list of field names (e.g. "Description") to include in API
  1632  	// requests with the JSON null value. By default, fields with empty values are
  1633  	// omitted from API requests. See
  1634  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1635  	NullFields []string `json:"-"`
  1636  }
  1637  
  1638  func (s *Matter) MarshalJSON() ([]byte, error) {
  1639  	type NoMethod Matter
  1640  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1641  }
  1642  
  1643  // MatterPermission: Users can be matter owners or collaborators. Each matter
  1644  // has only one owner. All others users who can access the matter are
  1645  // collaborators. When an account is purged, its corresponding MatterPermission
  1646  // resources cease to exist.
  1647  type MatterPermission struct {
  1648  	// AccountId: The account ID, as provided by the Admin SDK
  1649  	// (https://developers.google.com/admin-sdk/).
  1650  	AccountId string `json:"accountId,omitempty"`
  1651  	// Role: The user's role for the matter.
  1652  	//
  1653  	// Possible values:
  1654  	//   "ROLE_UNSPECIFIED" - No role assigned.
  1655  	//   "COLLABORATOR" - A collaborator on the matter.
  1656  	//   "OWNER" - The owner of the matter.
  1657  	Role string `json:"role,omitempty"`
  1658  
  1659  	// ServerResponse contains the HTTP response code and headers from the server.
  1660  	googleapi.ServerResponse `json:"-"`
  1661  	// ForceSendFields is a list of field names (e.g. "AccountId") to
  1662  	// unconditionally include in API requests. By default, fields with empty or
  1663  	// default values are omitted from API requests. See
  1664  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1665  	// details.
  1666  	ForceSendFields []string `json:"-"`
  1667  	// NullFields is a list of field names (e.g. "AccountId") to include in API
  1668  	// requests with the JSON null value. By default, fields with empty values are
  1669  	// omitted from API requests. See
  1670  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1671  	NullFields []string `json:"-"`
  1672  }
  1673  
  1674  func (s *MatterPermission) MarshalJSON() ([]byte, error) {
  1675  	type NoMethod MatterPermission
  1676  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1677  }
  1678  
  1679  // Operation: This resource represents a long-running operation that is the
  1680  // result of a network API call.
  1681  type Operation struct {
  1682  	// Done: If the value is `false`, it means the operation is still in progress.
  1683  	// If `true`, the operation is completed, and either `error` or `response` is
  1684  	// available.
  1685  	Done bool `json:"done,omitempty"`
  1686  	// Error: The error result of the operation in case of failure or cancellation.
  1687  	Error *Status `json:"error,omitempty"`
  1688  	// Metadata: Service-specific metadata associated with the operation. It
  1689  	// typically contains progress information and common metadata such as create
  1690  	// time. Some services might not provide such metadata. Any method that returns
  1691  	// a long-running operation should document the metadata type, if any.
  1692  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1693  	// Name: The server-assigned name, which is only unique within the same service
  1694  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1695  	// should be a resource name ending with `operations/{unique_id}`.
  1696  	Name string `json:"name,omitempty"`
  1697  	// Response: The normal, successful response of the operation. If the original
  1698  	// method returns no data on success, such as `Delete`, the response is
  1699  	// `google.protobuf.Empty`. If the original method is standard
  1700  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1701  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1702  	// original method name. For example, if the original method name is
  1703  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1704  	Response googleapi.RawMessage `json:"response,omitempty"`
  1705  
  1706  	// ServerResponse contains the HTTP response code and headers from the server.
  1707  	googleapi.ServerResponse `json:"-"`
  1708  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1709  	// include in API requests. By default, fields with empty or default values are
  1710  	// omitted from API requests. See
  1711  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1712  	// details.
  1713  	ForceSendFields []string `json:"-"`
  1714  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1715  	// with the JSON null value. By default, fields with empty values are omitted
  1716  	// from API requests. See
  1717  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1718  	NullFields []string `json:"-"`
  1719  }
  1720  
  1721  func (s *Operation) MarshalJSON() ([]byte, error) {
  1722  	type NoMethod Operation
  1723  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1724  }
  1725  
  1726  // OrgUnitInfo: The organizational unit to search
  1727  type OrgUnitInfo struct {
  1728  	// OrgUnitId: The name of the organizational unit to search, as provided by the
  1729  	// Admin SDK Directory API
  1730  	// (https://developers.google.com/admin-sdk/directory/).
  1731  	OrgUnitId string `json:"orgUnitId,omitempty"`
  1732  	// ForceSendFields is a list of field names (e.g. "OrgUnitId") to
  1733  	// unconditionally include in API requests. By default, fields with empty or
  1734  	// default values are omitted from API requests. See
  1735  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1736  	// details.
  1737  	ForceSendFields []string `json:"-"`
  1738  	// NullFields is a list of field names (e.g. "OrgUnitId") to include in API
  1739  	// requests with the JSON null value. By default, fields with empty values are
  1740  	// omitted from API requests. See
  1741  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1742  	NullFields []string `json:"-"`
  1743  }
  1744  
  1745  func (s *OrgUnitInfo) MarshalJSON() ([]byte, error) {
  1746  	type NoMethod OrgUnitInfo
  1747  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1748  }
  1749  
  1750  // Query: The query definition used for search and export.
  1751  type Query struct {
  1752  	// AccountInfo: Required when **SearchMethod** is **ACCOUNT**.
  1753  	AccountInfo *AccountInfo `json:"accountInfo,omitempty"`
  1754  	// CalendarOptions: Set Calendar search-specific options.
  1755  	CalendarOptions *CalendarOptions `json:"calendarOptions,omitempty"`
  1756  	// Corpus: The Google Workspace service to search.
  1757  	//
  1758  	// Possible values:
  1759  	//   "CORPUS_TYPE_UNSPECIFIED" - No service specified.
  1760  	//   "DRIVE" - Drive, including Meet and Sites.
  1761  	//   "MAIL" - For search, Gmail and classic Hangouts. For holds, Gmail only.
  1762  	//   "GROUPS" - Groups.
  1763  	//   "HANGOUTS_CHAT" - For export, Google Chat only. For holds, Google Chat and
  1764  	// classic Hangouts.
  1765  	//   "VOICE" - Google Voice.
  1766  	//   "CALENDAR" - Calendar.
  1767  	Corpus string `json:"corpus,omitempty"`
  1768  	// DataScope: The data source to search.
  1769  	//
  1770  	// Possible values:
  1771  	//   "DATA_SCOPE_UNSPECIFIED" - No data source specified.
  1772  	//   "ALL_DATA" - All available data.
  1773  	//   "HELD_DATA" - Only data on hold.
  1774  	//   "UNPROCESSED_DATA" - Only data not yet processed by Vault. (Gmail and
  1775  	// Groups only)
  1776  	DataScope string `json:"dataScope,omitempty"`
  1777  	// DriveOptions: Set Drive search-specific options.
  1778  	DriveOptions *DriveOptions `json:"driveOptions,omitempty"`
  1779  	// EndTime: The end time for the search query. Specify in GMT. The value is
  1780  	// rounded to 12 AM on the specified date.
  1781  	EndTime string `json:"endTime,omitempty"`
  1782  	// HangoutsChatInfo: Required when **SearchMethod** is **ROOM**. (read-only)
  1783  	HangoutsChatInfo *HangoutsChatInfo `json:"hangoutsChatInfo,omitempty"`
  1784  	// HangoutsChatOptions: Set Chat search-specific options. (read-only)
  1785  	HangoutsChatOptions *HangoutsChatOptions `json:"hangoutsChatOptions,omitempty"`
  1786  	// MailOptions: Set Gmail search-specific options.
  1787  	MailOptions *MailOptions `json:"mailOptions,omitempty"`
  1788  	// Method: The entity to search. This field replaces **searchMethod** to
  1789  	// support shared drives. When **searchMethod** is **TEAM_DRIVE**, the response
  1790  	// of this field is **SHARED_DRIVE**.
  1791  	//
  1792  	// Possible values:
  1793  	//   "SEARCH_METHOD_UNSPECIFIED" - A search method must be specified or else it
  1794  	// is rejected.
  1795  	//   "ACCOUNT" - Search the data of the accounts specified in
  1796  	// [AccountInfo](https://developers.google.com/vault/reference/rest/v1/Query#acc
  1797  	// ountinfo).
  1798  	//   "ORG_UNIT" - Search the data of all accounts in the organizational unit
  1799  	// specified in
  1800  	// [OrgUnitInfo](https://developers.google.com/vault/reference/rest/v1/Query#org
  1801  	// unitinfo).
  1802  	//   "TEAM_DRIVE" - Search the data in the Team Drive specified in
  1803  	// **team_drive_info**.
  1804  	//   "ENTIRE_ORG" - Search the data of all accounts in the organization.
  1805  	// Supported only for Gmail. When specified, you don't need to specify
  1806  	// **AccountInfo** or **OrgUnitInfo**.
  1807  	//   "ROOM" - Search messages in the Chat spaces specified in
  1808  	// [HangoutsChatInfo](https://developers.google.com/vault/reference/rest/v1/Quer
  1809  	// y#hangoutschatinfo).
  1810  	//   "SITES_URL" - Search for sites by the published site URLs specified in
  1811  	// [SitesUrlInfo](https://developers.google.com/vault/reference/rest/v1/Query#si
  1812  	// tesurlinfo).
  1813  	//   "SHARED_DRIVE" - Search the files in the shared drives specified in
  1814  	// [SharedDriveInfo](https://developers.google.com/vault/reference/rest/v1/Query
  1815  	// #shareddriveinfo).
  1816  	Method string `json:"method,omitempty"`
  1817  	// OrgUnitInfo: Required when **SearchMethod** is **ORG_UNIT**.
  1818  	OrgUnitInfo *OrgUnitInfo `json:"orgUnitInfo,omitempty"`
  1819  	// SearchMethod: The search method to use.
  1820  	//
  1821  	// Possible values:
  1822  	//   "SEARCH_METHOD_UNSPECIFIED" - A search method must be specified or else it
  1823  	// is rejected.
  1824  	//   "ACCOUNT" - Search the data of the accounts specified in
  1825  	// [AccountInfo](https://developers.google.com/vault/reference/rest/v1/Query#acc
  1826  	// ountinfo).
  1827  	//   "ORG_UNIT" - Search the data of all accounts in the organizational unit
  1828  	// specified in
  1829  	// [OrgUnitInfo](https://developers.google.com/vault/reference/rest/v1/Query#org
  1830  	// unitinfo).
  1831  	//   "TEAM_DRIVE" - Search the data in the Team Drive specified in
  1832  	// **team_drive_info**.
  1833  	//   "ENTIRE_ORG" - Search the data of all accounts in the organization.
  1834  	// Supported only for Gmail. When specified, you don't need to specify
  1835  	// **AccountInfo** or **OrgUnitInfo**.
  1836  	//   "ROOM" - Search messages in the Chat spaces specified in
  1837  	// [HangoutsChatInfo](https://developers.google.com/vault/reference/rest/v1/Quer
  1838  	// y#hangoutschatinfo).
  1839  	//   "SITES_URL" - Search for sites by the published site URLs specified in
  1840  	// [SitesUrlInfo](https://developers.google.com/vault/reference/rest/v1/Query#si
  1841  	// tesurlinfo).
  1842  	//   "SHARED_DRIVE" - Search the files in the shared drives specified in
  1843  	// [SharedDriveInfo](https://developers.google.com/vault/reference/rest/v1/Query
  1844  	// #shareddriveinfo).
  1845  	SearchMethod string `json:"searchMethod,omitempty"`
  1846  	// SharedDriveInfo: Required when **SearchMethod** is **SHARED_DRIVE**.
  1847  	SharedDriveInfo *SharedDriveInfo `json:"sharedDriveInfo,omitempty"`
  1848  	// SitesUrlInfo: Required when **SearchMethod** is **SITES_URL**.
  1849  	SitesUrlInfo *SitesUrlInfo `json:"sitesUrlInfo,omitempty"`
  1850  	// StartTime: The start time for the search query. Specify in GMT. The value is
  1851  	// rounded to 12 AM on the specified date.
  1852  	StartTime string `json:"startTime,omitempty"`
  1853  	// TeamDriveInfo: Required when **SearchMethod** is **TEAM_DRIVE**.
  1854  	TeamDriveInfo *TeamDriveInfo `json:"teamDriveInfo,omitempty"`
  1855  	// Terms: Service-specific search operators
  1856  	// (https://support.google.com/vault/answer/2474474) to filter search results.
  1857  	Terms string `json:"terms,omitempty"`
  1858  	// TimeZone: The time zone name. It should be an IANA TZ name, such as
  1859  	// "America/Los_Angeles". For a list of time zone names, see Time Zone
  1860  	// (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For more
  1861  	// information about how Vault uses time zones, see the Vault help center
  1862  	// (https://support.google.com/vault/answer/6092995#time).
  1863  	TimeZone string `json:"timeZone,omitempty"`
  1864  	// VoiceOptions: Set Voice search-specific options.
  1865  	VoiceOptions *VoiceOptions `json:"voiceOptions,omitempty"`
  1866  	// ForceSendFields is a list of field names (e.g. "AccountInfo") to
  1867  	// unconditionally include in API requests. By default, fields with empty or
  1868  	// default values are omitted from API requests. See
  1869  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1870  	// details.
  1871  	ForceSendFields []string `json:"-"`
  1872  	// NullFields is a list of field names (e.g. "AccountInfo") to include in API
  1873  	// requests with the JSON null value. By default, fields with empty values are
  1874  	// omitted from API requests. See
  1875  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1876  	NullFields []string `json:"-"`
  1877  }
  1878  
  1879  func (s *Query) MarshalJSON() ([]byte, error) {
  1880  	type NoMethod Query
  1881  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1882  }
  1883  
  1884  // RemoveHeldAccountsRequest: Remove a list of accounts from a hold.
  1885  type RemoveHeldAccountsRequest struct {
  1886  	// AccountIds: The account IDs of the accounts to remove from the hold.
  1887  	AccountIds []string `json:"accountIds,omitempty"`
  1888  	// ForceSendFields is a list of field names (e.g. "AccountIds") to
  1889  	// unconditionally include in API requests. By default, fields with empty or
  1890  	// default values are omitted from API requests. See
  1891  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1892  	// details.
  1893  	ForceSendFields []string `json:"-"`
  1894  	// NullFields is a list of field names (e.g. "AccountIds") to include in API
  1895  	// requests with the JSON null value. By default, fields with empty values are
  1896  	// omitted from API requests. See
  1897  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1898  	NullFields []string `json:"-"`
  1899  }
  1900  
  1901  func (s *RemoveHeldAccountsRequest) MarshalJSON() ([]byte, error) {
  1902  	type NoMethod RemoveHeldAccountsRequest
  1903  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1904  }
  1905  
  1906  // RemoveHeldAccountsResponse: Response for batch delete held accounts.
  1907  type RemoveHeldAccountsResponse struct {
  1908  	// Statuses: A list of statuses for the deleted accounts. Results have the same
  1909  	// order as the request.
  1910  	Statuses []*Status `json:"statuses,omitempty"`
  1911  
  1912  	// ServerResponse contains the HTTP response code and headers from the server.
  1913  	googleapi.ServerResponse `json:"-"`
  1914  	// ForceSendFields is a list of field names (e.g. "Statuses") to
  1915  	// unconditionally include in API requests. By default, fields with empty or
  1916  	// default values are omitted from API requests. See
  1917  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1918  	// details.
  1919  	ForceSendFields []string `json:"-"`
  1920  	// NullFields is a list of field names (e.g. "Statuses") to include in API
  1921  	// requests with the JSON null value. By default, fields with empty values are
  1922  	// omitted from API requests. See
  1923  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1924  	NullFields []string `json:"-"`
  1925  }
  1926  
  1927  func (s *RemoveHeldAccountsResponse) MarshalJSON() ([]byte, error) {
  1928  	type NoMethod RemoveHeldAccountsResponse
  1929  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1930  }
  1931  
  1932  // RemoveMatterPermissionsRequest: Remove an account as a matter collaborator.
  1933  type RemoveMatterPermissionsRequest struct {
  1934  	// AccountId: The account ID.
  1935  	AccountId string `json:"accountId,omitempty"`
  1936  	// ForceSendFields is a list of field names (e.g. "AccountId") 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. "AccountId") 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 *RemoveMatterPermissionsRequest) MarshalJSON() ([]byte, error) {
  1950  	type NoMethod RemoveMatterPermissionsRequest
  1951  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1952  }
  1953  
  1954  // ReopenMatterRequest: Reopen a matter by ID.
  1955  type ReopenMatterRequest struct {
  1956  }
  1957  
  1958  // ReopenMatterResponse: Response to a ReopenMatterRequest.
  1959  type ReopenMatterResponse struct {
  1960  	// Matter: The updated matter, with state **OPEN**.
  1961  	Matter *Matter `json:"matter,omitempty"`
  1962  
  1963  	// ServerResponse contains the HTTP response code and headers from the server.
  1964  	googleapi.ServerResponse `json:"-"`
  1965  	// ForceSendFields is a list of field names (e.g. "Matter") to unconditionally
  1966  	// include in API requests. By default, fields with empty or default values are
  1967  	// omitted from API requests. See
  1968  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1969  	// details.
  1970  	ForceSendFields []string `json:"-"`
  1971  	// NullFields is a list of field names (e.g. "Matter") to include in API
  1972  	// requests with the JSON null value. By default, fields with empty values are
  1973  	// omitted from API requests. See
  1974  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1975  	NullFields []string `json:"-"`
  1976  }
  1977  
  1978  func (s *ReopenMatterResponse) MarshalJSON() ([]byte, error) {
  1979  	type NoMethod ReopenMatterResponse
  1980  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1981  }
  1982  
  1983  // SavedQuery: The definition of a saved query. To work with Vault resources,
  1984  // the account must have the required Vault privileges
  1985  // (https://support.google.com/vault/answer/2799699) and access to the matter.
  1986  // To access a matter, the account must have created the matter, have the
  1987  // matter shared with them, or have the **View All Matters** privilege.
  1988  type SavedQuery struct {
  1989  	// CreateTime: Output only. The server-generated timestamp when the saved query
  1990  	// was created.
  1991  	CreateTime string `json:"createTime,omitempty"`
  1992  	// DisplayName: The name of the saved query.
  1993  	DisplayName string `json:"displayName,omitempty"`
  1994  	// MatterId: Output only. The matter ID of the matter the saved query is saved
  1995  	// in. The server does not use this field during create and always uses matter
  1996  	// ID in the URL.
  1997  	MatterId string `json:"matterId,omitempty"`
  1998  	// Query: The search parameters of the saved query.
  1999  	Query *Query `json:"query,omitempty"`
  2000  	// SavedQueryId: A unique identifier for the saved query.
  2001  	SavedQueryId string `json:"savedQueryId,omitempty"`
  2002  
  2003  	// ServerResponse contains the HTTP response code and headers from the server.
  2004  	googleapi.ServerResponse `json:"-"`
  2005  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2006  	// unconditionally include in API requests. By default, fields with empty or
  2007  	// default values are omitted from API requests. See
  2008  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2009  	// details.
  2010  	ForceSendFields []string `json:"-"`
  2011  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2012  	// requests with the JSON null value. By default, fields with empty values are
  2013  	// omitted from API requests. See
  2014  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2015  	NullFields []string `json:"-"`
  2016  }
  2017  
  2018  func (s *SavedQuery) MarshalJSON() ([]byte, error) {
  2019  	type NoMethod SavedQuery
  2020  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2021  }
  2022  
  2023  // SharedDriveInfo: The shared drives to search
  2024  type SharedDriveInfo struct {
  2025  	// SharedDriveIds: A list of shared drive IDs, as provided by the Drive API
  2026  	// (https://developers.google.com/drive).
  2027  	SharedDriveIds []string `json:"sharedDriveIds,omitempty"`
  2028  	// ForceSendFields is a list of field names (e.g. "SharedDriveIds") to
  2029  	// unconditionally include in API requests. By default, fields with empty or
  2030  	// default values are omitted from API requests. See
  2031  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2032  	// details.
  2033  	ForceSendFields []string `json:"-"`
  2034  	// NullFields is a list of field names (e.g. "SharedDriveIds") to include in
  2035  	// API requests with the JSON null value. By default, fields with empty values
  2036  	// are omitted from API requests. See
  2037  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2038  	NullFields []string `json:"-"`
  2039  }
  2040  
  2041  func (s *SharedDriveInfo) MarshalJSON() ([]byte, error) {
  2042  	type NoMethod SharedDriveInfo
  2043  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2044  }
  2045  
  2046  // SitesUrlInfo: The published site URLs of new Google Sites to search
  2047  type SitesUrlInfo struct {
  2048  	// Urls: A list of published site URLs.
  2049  	Urls []string `json:"urls,omitempty"`
  2050  	// ForceSendFields is a list of field names (e.g. "Urls") to unconditionally
  2051  	// include in API requests. By default, fields with empty or default values are
  2052  	// 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. "Urls") to include in API requests
  2057  	// with the JSON null value. By default, fields with empty values are omitted
  2058  	// 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 *SitesUrlInfo) MarshalJSON() ([]byte, error) {
  2064  	type NoMethod SitesUrlInfo
  2065  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2066  }
  2067  
  2068  // Status: The `Status` type defines a logical error model that is suitable for
  2069  // different programming environments, including REST APIs and RPC APIs. It is
  2070  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  2071  // pieces of data: error code, error message, and error details. You can find
  2072  // out more about this error model and how to work with it in the API Design
  2073  // Guide (https://cloud.google.com/apis/design/errors).
  2074  type Status struct {
  2075  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2076  	Code int64 `json:"code,omitempty"`
  2077  	// Details: A list of messages that carry the error details. There is a common
  2078  	// set of message types for APIs to use.
  2079  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2080  	// Message: A developer-facing error message, which should be in English. Any
  2081  	// user-facing error message should be localized and sent in the
  2082  	// google.rpc.Status.details field, or localized by the client.
  2083  	Message string `json:"message,omitempty"`
  2084  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2085  	// include in API requests. By default, fields with empty or default values are
  2086  	// omitted from API requests. See
  2087  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2088  	// details.
  2089  	ForceSendFields []string `json:"-"`
  2090  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2091  	// with the JSON null value. By default, fields with empty values are omitted
  2092  	// from API requests. See
  2093  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2094  	NullFields []string `json:"-"`
  2095  }
  2096  
  2097  func (s *Status) MarshalJSON() ([]byte, error) {
  2098  	type NoMethod Status
  2099  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2100  }
  2101  
  2102  // TeamDriveInfo: Team Drives to search
  2103  type TeamDriveInfo struct {
  2104  	// TeamDriveIds: List of Team Drive IDs, as provided by the Drive API
  2105  	// (https://developers.google.com/drive).
  2106  	TeamDriveIds []string `json:"teamDriveIds,omitempty"`
  2107  	// ForceSendFields is a list of field names (e.g. "TeamDriveIds") to
  2108  	// unconditionally include in API requests. By default, fields with empty or
  2109  	// default values are omitted from API requests. See
  2110  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2111  	// details.
  2112  	ForceSendFields []string `json:"-"`
  2113  	// NullFields is a list of field names (e.g. "TeamDriveIds") to include in API
  2114  	// requests with the JSON null value. By default, fields with empty values are
  2115  	// omitted from API requests. See
  2116  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2117  	NullFields []string `json:"-"`
  2118  }
  2119  
  2120  func (s *TeamDriveInfo) MarshalJSON() ([]byte, error) {
  2121  	type NoMethod TeamDriveInfo
  2122  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2123  }
  2124  
  2125  // UndeleteMatterRequest: Undelete a matter by ID.
  2126  type UndeleteMatterRequest struct {
  2127  }
  2128  
  2129  // UserInfo: User's information.
  2130  type UserInfo struct {
  2131  	// DisplayName: The displayed name of the user.
  2132  	DisplayName string `json:"displayName,omitempty"`
  2133  	// Email: The email address of the user.
  2134  	Email string `json:"email,omitempty"`
  2135  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  2136  	// unconditionally include in API requests. By default, fields with empty or
  2137  	// default values are omitted from API requests. See
  2138  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2139  	// details.
  2140  	ForceSendFields []string `json:"-"`
  2141  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  2142  	// requests with the JSON null value. By default, fields with empty values are
  2143  	// omitted from API requests. See
  2144  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2145  	NullFields []string `json:"-"`
  2146  }
  2147  
  2148  func (s *UserInfo) MarshalJSON() ([]byte, error) {
  2149  	type NoMethod UserInfo
  2150  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2151  }
  2152  
  2153  // VoiceExportOptions: The options for Voice exports.
  2154  type VoiceExportOptions struct {
  2155  	// ExportFormat: The file format for exported text messages.
  2156  	//
  2157  	// Possible values:
  2158  	//   "EXPORT_FORMAT_UNSPECIFIED" - No export format specified.
  2159  	//   "MBOX" - Export as MBOX. Only available for Gmail, Groups, Hangouts and
  2160  	// Voice.
  2161  	//   "PST" - Export as PST. Only available for Gmail, Groups, Hangouts, Voice
  2162  	// and Calendar.
  2163  	//   "ICS" - Export as ICS. Only available for Calendar.
  2164  	ExportFormat string `json:"exportFormat,omitempty"`
  2165  	// ForceSendFields is a list of field names (e.g. "ExportFormat") to
  2166  	// unconditionally include in API requests. By default, fields with empty or
  2167  	// default values are omitted from API requests. See
  2168  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2169  	// details.
  2170  	ForceSendFields []string `json:"-"`
  2171  	// NullFields is a list of field names (e.g. "ExportFormat") to include in API
  2172  	// requests with the JSON null value. By default, fields with empty values are
  2173  	// omitted from API requests. See
  2174  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2175  	NullFields []string `json:"-"`
  2176  }
  2177  
  2178  func (s *VoiceExportOptions) MarshalJSON() ([]byte, error) {
  2179  	type NoMethod VoiceExportOptions
  2180  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2181  }
  2182  
  2183  // VoiceOptions: Additional options for Voice search
  2184  type VoiceOptions struct {
  2185  	// CoveredData: Datatypes to search
  2186  	//
  2187  	// Possible values:
  2188  	//   "COVERED_DATA_UNSPECIFIED" - Covered data unspecified.
  2189  	//   "TEXT_MESSAGES" - Voice text messages.
  2190  	//   "VOICEMAILS" - Voicemails and their transcripts.
  2191  	//   "CALL_LOGS" - Call logs.
  2192  	CoveredData []string `json:"coveredData,omitempty"`
  2193  	// ForceSendFields is a list of field names (e.g. "CoveredData") to
  2194  	// unconditionally include in API requests. By default, fields with empty or
  2195  	// default values are omitted from API requests. See
  2196  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2197  	// details.
  2198  	ForceSendFields []string `json:"-"`
  2199  	// NullFields is a list of field names (e.g. "CoveredData") to include in API
  2200  	// requests with the JSON null value. By default, fields with empty values are
  2201  	// omitted from API requests. See
  2202  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2203  	NullFields []string `json:"-"`
  2204  }
  2205  
  2206  func (s *VoiceOptions) MarshalJSON() ([]byte, error) {
  2207  	type NoMethod VoiceOptions
  2208  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2209  }
  2210  
  2211  type MattersAddPermissionsCall struct {
  2212  	s                           *Service
  2213  	matterId                    string
  2214  	addmatterpermissionsrequest *AddMatterPermissionsRequest
  2215  	urlParams_                  gensupport.URLParams
  2216  	ctx_                        context.Context
  2217  	header_                     http.Header
  2218  }
  2219  
  2220  // AddPermissions: Adds an account as a matter collaborator.
  2221  //
  2222  // - matterId: The matter ID.
  2223  func (r *MattersService) AddPermissions(matterId string, addmatterpermissionsrequest *AddMatterPermissionsRequest) *MattersAddPermissionsCall {
  2224  	c := &MattersAddPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2225  	c.matterId = matterId
  2226  	c.addmatterpermissionsrequest = addmatterpermissionsrequest
  2227  	return c
  2228  }
  2229  
  2230  // Fields allows partial responses to be retrieved. See
  2231  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2232  // details.
  2233  func (c *MattersAddPermissionsCall) Fields(s ...googleapi.Field) *MattersAddPermissionsCall {
  2234  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2235  	return c
  2236  }
  2237  
  2238  // Context sets the context to be used in this call's Do method.
  2239  func (c *MattersAddPermissionsCall) Context(ctx context.Context) *MattersAddPermissionsCall {
  2240  	c.ctx_ = ctx
  2241  	return c
  2242  }
  2243  
  2244  // Header returns a http.Header that can be modified by the caller to add
  2245  // headers to the request.
  2246  func (c *MattersAddPermissionsCall) Header() http.Header {
  2247  	if c.header_ == nil {
  2248  		c.header_ = make(http.Header)
  2249  	}
  2250  	return c.header_
  2251  }
  2252  
  2253  func (c *MattersAddPermissionsCall) doRequest(alt string) (*http.Response, error) {
  2254  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2255  	var body io.Reader = nil
  2256  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addmatterpermissionsrequest)
  2257  	if err != nil {
  2258  		return nil, err
  2259  	}
  2260  	c.urlParams_.Set("alt", alt)
  2261  	c.urlParams_.Set("prettyPrint", "false")
  2262  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}:addPermissions")
  2263  	urls += "?" + c.urlParams_.Encode()
  2264  	req, err := http.NewRequest("POST", urls, body)
  2265  	if err != nil {
  2266  		return nil, err
  2267  	}
  2268  	req.Header = reqHeaders
  2269  	googleapi.Expand(req.URL, map[string]string{
  2270  		"matterId": c.matterId,
  2271  	})
  2272  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2273  }
  2274  
  2275  // Do executes the "vault.matters.addPermissions" call.
  2276  // Any non-2xx status code is an error. Response headers are in either
  2277  // *MatterPermission.ServerResponse.Header or (if a response was returned at
  2278  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2279  // check whether the returned error was because http.StatusNotModified was
  2280  // returned.
  2281  func (c *MattersAddPermissionsCall) Do(opts ...googleapi.CallOption) (*MatterPermission, error) {
  2282  	gensupport.SetOptions(c.urlParams_, opts...)
  2283  	res, err := c.doRequest("json")
  2284  	if res != nil && res.StatusCode == http.StatusNotModified {
  2285  		if res.Body != nil {
  2286  			res.Body.Close()
  2287  		}
  2288  		return nil, gensupport.WrapError(&googleapi.Error{
  2289  			Code:   res.StatusCode,
  2290  			Header: res.Header,
  2291  		})
  2292  	}
  2293  	if err != nil {
  2294  		return nil, err
  2295  	}
  2296  	defer googleapi.CloseBody(res)
  2297  	if err := googleapi.CheckResponse(res); err != nil {
  2298  		return nil, gensupport.WrapError(err)
  2299  	}
  2300  	ret := &MatterPermission{
  2301  		ServerResponse: googleapi.ServerResponse{
  2302  			Header:         res.Header,
  2303  			HTTPStatusCode: res.StatusCode,
  2304  		},
  2305  	}
  2306  	target := &ret
  2307  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2308  		return nil, err
  2309  	}
  2310  	return ret, nil
  2311  }
  2312  
  2313  type MattersCloseCall struct {
  2314  	s                  *Service
  2315  	matterId           string
  2316  	closematterrequest *CloseMatterRequest
  2317  	urlParams_         gensupport.URLParams
  2318  	ctx_               context.Context
  2319  	header_            http.Header
  2320  }
  2321  
  2322  // Close: Closes the specified matter. Returns the matter with updated state.
  2323  //
  2324  // - matterId: The matter ID.
  2325  func (r *MattersService) Close(matterId string, closematterrequest *CloseMatterRequest) *MattersCloseCall {
  2326  	c := &MattersCloseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2327  	c.matterId = matterId
  2328  	c.closematterrequest = closematterrequest
  2329  	return c
  2330  }
  2331  
  2332  // Fields allows partial responses to be retrieved. See
  2333  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2334  // details.
  2335  func (c *MattersCloseCall) Fields(s ...googleapi.Field) *MattersCloseCall {
  2336  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2337  	return c
  2338  }
  2339  
  2340  // Context sets the context to be used in this call's Do method.
  2341  func (c *MattersCloseCall) Context(ctx context.Context) *MattersCloseCall {
  2342  	c.ctx_ = ctx
  2343  	return c
  2344  }
  2345  
  2346  // Header returns a http.Header that can be modified by the caller to add
  2347  // headers to the request.
  2348  func (c *MattersCloseCall) Header() http.Header {
  2349  	if c.header_ == nil {
  2350  		c.header_ = make(http.Header)
  2351  	}
  2352  	return c.header_
  2353  }
  2354  
  2355  func (c *MattersCloseCall) doRequest(alt string) (*http.Response, error) {
  2356  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2357  	var body io.Reader = nil
  2358  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.closematterrequest)
  2359  	if err != nil {
  2360  		return nil, err
  2361  	}
  2362  	c.urlParams_.Set("alt", alt)
  2363  	c.urlParams_.Set("prettyPrint", "false")
  2364  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}:close")
  2365  	urls += "?" + c.urlParams_.Encode()
  2366  	req, err := http.NewRequest("POST", urls, body)
  2367  	if err != nil {
  2368  		return nil, err
  2369  	}
  2370  	req.Header = reqHeaders
  2371  	googleapi.Expand(req.URL, map[string]string{
  2372  		"matterId": c.matterId,
  2373  	})
  2374  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2375  }
  2376  
  2377  // Do executes the "vault.matters.close" call.
  2378  // Any non-2xx status code is an error. Response headers are in either
  2379  // *CloseMatterResponse.ServerResponse.Header or (if a response was returned at
  2380  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2381  // check whether the returned error was because http.StatusNotModified was
  2382  // returned.
  2383  func (c *MattersCloseCall) Do(opts ...googleapi.CallOption) (*CloseMatterResponse, error) {
  2384  	gensupport.SetOptions(c.urlParams_, opts...)
  2385  	res, err := c.doRequest("json")
  2386  	if res != nil && res.StatusCode == http.StatusNotModified {
  2387  		if res.Body != nil {
  2388  			res.Body.Close()
  2389  		}
  2390  		return nil, gensupport.WrapError(&googleapi.Error{
  2391  			Code:   res.StatusCode,
  2392  			Header: res.Header,
  2393  		})
  2394  	}
  2395  	if err != nil {
  2396  		return nil, err
  2397  	}
  2398  	defer googleapi.CloseBody(res)
  2399  	if err := googleapi.CheckResponse(res); err != nil {
  2400  		return nil, gensupport.WrapError(err)
  2401  	}
  2402  	ret := &CloseMatterResponse{
  2403  		ServerResponse: googleapi.ServerResponse{
  2404  			Header:         res.Header,
  2405  			HTTPStatusCode: res.StatusCode,
  2406  		},
  2407  	}
  2408  	target := &ret
  2409  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2410  		return nil, err
  2411  	}
  2412  	return ret, nil
  2413  }
  2414  
  2415  type MattersCountCall struct {
  2416  	s                     *Service
  2417  	matterId              string
  2418  	countartifactsrequest *CountArtifactsRequest
  2419  	urlParams_            gensupport.URLParams
  2420  	ctx_                  context.Context
  2421  	header_               http.Header
  2422  }
  2423  
  2424  // Count: Counts the accounts processed by the specified query.
  2425  //
  2426  // - matterId: The matter ID.
  2427  func (r *MattersService) Count(matterId string, countartifactsrequest *CountArtifactsRequest) *MattersCountCall {
  2428  	c := &MattersCountCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2429  	c.matterId = matterId
  2430  	c.countartifactsrequest = countartifactsrequest
  2431  	return c
  2432  }
  2433  
  2434  // Fields allows partial responses to be retrieved. See
  2435  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2436  // details.
  2437  func (c *MattersCountCall) Fields(s ...googleapi.Field) *MattersCountCall {
  2438  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2439  	return c
  2440  }
  2441  
  2442  // Context sets the context to be used in this call's Do method.
  2443  func (c *MattersCountCall) Context(ctx context.Context) *MattersCountCall {
  2444  	c.ctx_ = ctx
  2445  	return c
  2446  }
  2447  
  2448  // Header returns a http.Header that can be modified by the caller to add
  2449  // headers to the request.
  2450  func (c *MattersCountCall) Header() http.Header {
  2451  	if c.header_ == nil {
  2452  		c.header_ = make(http.Header)
  2453  	}
  2454  	return c.header_
  2455  }
  2456  
  2457  func (c *MattersCountCall) doRequest(alt string) (*http.Response, error) {
  2458  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2459  	var body io.Reader = nil
  2460  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.countartifactsrequest)
  2461  	if err != nil {
  2462  		return nil, err
  2463  	}
  2464  	c.urlParams_.Set("alt", alt)
  2465  	c.urlParams_.Set("prettyPrint", "false")
  2466  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}:count")
  2467  	urls += "?" + c.urlParams_.Encode()
  2468  	req, err := http.NewRequest("POST", urls, body)
  2469  	if err != nil {
  2470  		return nil, err
  2471  	}
  2472  	req.Header = reqHeaders
  2473  	googleapi.Expand(req.URL, map[string]string{
  2474  		"matterId": c.matterId,
  2475  	})
  2476  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2477  }
  2478  
  2479  // Do executes the "vault.matters.count" call.
  2480  // Any non-2xx status code is an error. Response headers are in either
  2481  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2482  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2483  // whether the returned error was because http.StatusNotModified was returned.
  2484  func (c *MattersCountCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2485  	gensupport.SetOptions(c.urlParams_, opts...)
  2486  	res, err := c.doRequest("json")
  2487  	if res != nil && res.StatusCode == http.StatusNotModified {
  2488  		if res.Body != nil {
  2489  			res.Body.Close()
  2490  		}
  2491  		return nil, gensupport.WrapError(&googleapi.Error{
  2492  			Code:   res.StatusCode,
  2493  			Header: res.Header,
  2494  		})
  2495  	}
  2496  	if err != nil {
  2497  		return nil, err
  2498  	}
  2499  	defer googleapi.CloseBody(res)
  2500  	if err := googleapi.CheckResponse(res); err != nil {
  2501  		return nil, gensupport.WrapError(err)
  2502  	}
  2503  	ret := &Operation{
  2504  		ServerResponse: googleapi.ServerResponse{
  2505  			Header:         res.Header,
  2506  			HTTPStatusCode: res.StatusCode,
  2507  		},
  2508  	}
  2509  	target := &ret
  2510  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2511  		return nil, err
  2512  	}
  2513  	return ret, nil
  2514  }
  2515  
  2516  type MattersCreateCall struct {
  2517  	s          *Service
  2518  	matter     *Matter
  2519  	urlParams_ gensupport.URLParams
  2520  	ctx_       context.Context
  2521  	header_    http.Header
  2522  }
  2523  
  2524  // Create: Creates a matter with the given name and description. The initial
  2525  // state is open, and the owner is the method caller. Returns the created
  2526  // matter with default view.
  2527  func (r *MattersService) Create(matter *Matter) *MattersCreateCall {
  2528  	c := &MattersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2529  	c.matter = matter
  2530  	return c
  2531  }
  2532  
  2533  // Fields allows partial responses to be retrieved. See
  2534  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2535  // details.
  2536  func (c *MattersCreateCall) Fields(s ...googleapi.Field) *MattersCreateCall {
  2537  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2538  	return c
  2539  }
  2540  
  2541  // Context sets the context to be used in this call's Do method.
  2542  func (c *MattersCreateCall) Context(ctx context.Context) *MattersCreateCall {
  2543  	c.ctx_ = ctx
  2544  	return c
  2545  }
  2546  
  2547  // Header returns a http.Header that can be modified by the caller to add
  2548  // headers to the request.
  2549  func (c *MattersCreateCall) Header() http.Header {
  2550  	if c.header_ == nil {
  2551  		c.header_ = make(http.Header)
  2552  	}
  2553  	return c.header_
  2554  }
  2555  
  2556  func (c *MattersCreateCall) doRequest(alt string) (*http.Response, error) {
  2557  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2558  	var body io.Reader = nil
  2559  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.matter)
  2560  	if err != nil {
  2561  		return nil, err
  2562  	}
  2563  	c.urlParams_.Set("alt", alt)
  2564  	c.urlParams_.Set("prettyPrint", "false")
  2565  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters")
  2566  	urls += "?" + c.urlParams_.Encode()
  2567  	req, err := http.NewRequest("POST", urls, body)
  2568  	if err != nil {
  2569  		return nil, err
  2570  	}
  2571  	req.Header = reqHeaders
  2572  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2573  }
  2574  
  2575  // Do executes the "vault.matters.create" call.
  2576  // Any non-2xx status code is an error. Response headers are in either
  2577  // *Matter.ServerResponse.Header or (if a response was returned at all) in
  2578  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2579  // whether the returned error was because http.StatusNotModified was returned.
  2580  func (c *MattersCreateCall) Do(opts ...googleapi.CallOption) (*Matter, error) {
  2581  	gensupport.SetOptions(c.urlParams_, opts...)
  2582  	res, err := c.doRequest("json")
  2583  	if res != nil && res.StatusCode == http.StatusNotModified {
  2584  		if res.Body != nil {
  2585  			res.Body.Close()
  2586  		}
  2587  		return nil, gensupport.WrapError(&googleapi.Error{
  2588  			Code:   res.StatusCode,
  2589  			Header: res.Header,
  2590  		})
  2591  	}
  2592  	if err != nil {
  2593  		return nil, err
  2594  	}
  2595  	defer googleapi.CloseBody(res)
  2596  	if err := googleapi.CheckResponse(res); err != nil {
  2597  		return nil, gensupport.WrapError(err)
  2598  	}
  2599  	ret := &Matter{
  2600  		ServerResponse: googleapi.ServerResponse{
  2601  			Header:         res.Header,
  2602  			HTTPStatusCode: res.StatusCode,
  2603  		},
  2604  	}
  2605  	target := &ret
  2606  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2607  		return nil, err
  2608  	}
  2609  	return ret, nil
  2610  }
  2611  
  2612  type MattersDeleteCall struct {
  2613  	s          *Service
  2614  	matterId   string
  2615  	urlParams_ gensupport.URLParams
  2616  	ctx_       context.Context
  2617  	header_    http.Header
  2618  }
  2619  
  2620  // Delete: Deletes the specified matter. Returns the matter with updated state.
  2621  //
  2622  // - matterId: The matter ID.
  2623  func (r *MattersService) Delete(matterId string) *MattersDeleteCall {
  2624  	c := &MattersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2625  	c.matterId = matterId
  2626  	return c
  2627  }
  2628  
  2629  // Fields allows partial responses to be retrieved. See
  2630  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2631  // details.
  2632  func (c *MattersDeleteCall) Fields(s ...googleapi.Field) *MattersDeleteCall {
  2633  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2634  	return c
  2635  }
  2636  
  2637  // Context sets the context to be used in this call's Do method.
  2638  func (c *MattersDeleteCall) Context(ctx context.Context) *MattersDeleteCall {
  2639  	c.ctx_ = ctx
  2640  	return c
  2641  }
  2642  
  2643  // Header returns a http.Header that can be modified by the caller to add
  2644  // headers to the request.
  2645  func (c *MattersDeleteCall) Header() http.Header {
  2646  	if c.header_ == nil {
  2647  		c.header_ = make(http.Header)
  2648  	}
  2649  	return c.header_
  2650  }
  2651  
  2652  func (c *MattersDeleteCall) doRequest(alt string) (*http.Response, error) {
  2653  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2654  	var body io.Reader = nil
  2655  	c.urlParams_.Set("alt", alt)
  2656  	c.urlParams_.Set("prettyPrint", "false")
  2657  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}")
  2658  	urls += "?" + c.urlParams_.Encode()
  2659  	req, err := http.NewRequest("DELETE", urls, body)
  2660  	if err != nil {
  2661  		return nil, err
  2662  	}
  2663  	req.Header = reqHeaders
  2664  	googleapi.Expand(req.URL, map[string]string{
  2665  		"matterId": c.matterId,
  2666  	})
  2667  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2668  }
  2669  
  2670  // Do executes the "vault.matters.delete" call.
  2671  // Any non-2xx status code is an error. Response headers are in either
  2672  // *Matter.ServerResponse.Header or (if a response was returned at all) in
  2673  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2674  // whether the returned error was because http.StatusNotModified was returned.
  2675  func (c *MattersDeleteCall) Do(opts ...googleapi.CallOption) (*Matter, error) {
  2676  	gensupport.SetOptions(c.urlParams_, opts...)
  2677  	res, err := c.doRequest("json")
  2678  	if res != nil && res.StatusCode == http.StatusNotModified {
  2679  		if res.Body != nil {
  2680  			res.Body.Close()
  2681  		}
  2682  		return nil, gensupport.WrapError(&googleapi.Error{
  2683  			Code:   res.StatusCode,
  2684  			Header: res.Header,
  2685  		})
  2686  	}
  2687  	if err != nil {
  2688  		return nil, err
  2689  	}
  2690  	defer googleapi.CloseBody(res)
  2691  	if err := googleapi.CheckResponse(res); err != nil {
  2692  		return nil, gensupport.WrapError(err)
  2693  	}
  2694  	ret := &Matter{
  2695  		ServerResponse: googleapi.ServerResponse{
  2696  			Header:         res.Header,
  2697  			HTTPStatusCode: res.StatusCode,
  2698  		},
  2699  	}
  2700  	target := &ret
  2701  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2702  		return nil, err
  2703  	}
  2704  	return ret, nil
  2705  }
  2706  
  2707  type MattersGetCall struct {
  2708  	s            *Service
  2709  	matterId     string
  2710  	urlParams_   gensupport.URLParams
  2711  	ifNoneMatch_ string
  2712  	ctx_         context.Context
  2713  	header_      http.Header
  2714  }
  2715  
  2716  // Get: Gets the specified matter.
  2717  //
  2718  // - matterId: The matter ID.
  2719  func (r *MattersService) Get(matterId string) *MattersGetCall {
  2720  	c := &MattersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2721  	c.matterId = matterId
  2722  	return c
  2723  }
  2724  
  2725  // View sets the optional parameter "view": Specifies how much information
  2726  // about the matter to return in the response.
  2727  //
  2728  // Possible values:
  2729  //
  2730  //	"VIEW_UNSPECIFIED" - The amount of detail is unspecified. Same as
  2731  //
  2732  // **BASIC**.
  2733  //
  2734  //	"BASIC" - Returns the matter ID, name, description, and state. Default
  2735  //
  2736  // choice.
  2737  //
  2738  //	"FULL" - Returns the basic details and a list of matter owners and
  2739  //
  2740  // collaborators (see
  2741  // [MatterPermissions](https://developers.google.com/vault/reference/rest/v1/mat
  2742  // ters#matterpermission)).
  2743  func (c *MattersGetCall) View(view string) *MattersGetCall {
  2744  	c.urlParams_.Set("view", view)
  2745  	return c
  2746  }
  2747  
  2748  // Fields allows partial responses to be retrieved. See
  2749  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2750  // details.
  2751  func (c *MattersGetCall) Fields(s ...googleapi.Field) *MattersGetCall {
  2752  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2753  	return c
  2754  }
  2755  
  2756  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2757  // object's ETag matches the given value. This is useful for getting updates
  2758  // only after the object has changed since the last request.
  2759  func (c *MattersGetCall) IfNoneMatch(entityTag string) *MattersGetCall {
  2760  	c.ifNoneMatch_ = entityTag
  2761  	return c
  2762  }
  2763  
  2764  // Context sets the context to be used in this call's Do method.
  2765  func (c *MattersGetCall) Context(ctx context.Context) *MattersGetCall {
  2766  	c.ctx_ = ctx
  2767  	return c
  2768  }
  2769  
  2770  // Header returns a http.Header that can be modified by the caller to add
  2771  // headers to the request.
  2772  func (c *MattersGetCall) Header() http.Header {
  2773  	if c.header_ == nil {
  2774  		c.header_ = make(http.Header)
  2775  	}
  2776  	return c.header_
  2777  }
  2778  
  2779  func (c *MattersGetCall) doRequest(alt string) (*http.Response, error) {
  2780  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2781  	if c.ifNoneMatch_ != "" {
  2782  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2783  	}
  2784  	var body io.Reader = nil
  2785  	c.urlParams_.Set("alt", alt)
  2786  	c.urlParams_.Set("prettyPrint", "false")
  2787  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}")
  2788  	urls += "?" + c.urlParams_.Encode()
  2789  	req, err := http.NewRequest("GET", urls, body)
  2790  	if err != nil {
  2791  		return nil, err
  2792  	}
  2793  	req.Header = reqHeaders
  2794  	googleapi.Expand(req.URL, map[string]string{
  2795  		"matterId": c.matterId,
  2796  	})
  2797  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2798  }
  2799  
  2800  // Do executes the "vault.matters.get" call.
  2801  // Any non-2xx status code is an error. Response headers are in either
  2802  // *Matter.ServerResponse.Header or (if a response was returned at all) in
  2803  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2804  // whether the returned error was because http.StatusNotModified was returned.
  2805  func (c *MattersGetCall) Do(opts ...googleapi.CallOption) (*Matter, error) {
  2806  	gensupport.SetOptions(c.urlParams_, opts...)
  2807  	res, err := c.doRequest("json")
  2808  	if res != nil && res.StatusCode == http.StatusNotModified {
  2809  		if res.Body != nil {
  2810  			res.Body.Close()
  2811  		}
  2812  		return nil, gensupport.WrapError(&googleapi.Error{
  2813  			Code:   res.StatusCode,
  2814  			Header: res.Header,
  2815  		})
  2816  	}
  2817  	if err != nil {
  2818  		return nil, err
  2819  	}
  2820  	defer googleapi.CloseBody(res)
  2821  	if err := googleapi.CheckResponse(res); err != nil {
  2822  		return nil, gensupport.WrapError(err)
  2823  	}
  2824  	ret := &Matter{
  2825  		ServerResponse: googleapi.ServerResponse{
  2826  			Header:         res.Header,
  2827  			HTTPStatusCode: res.StatusCode,
  2828  		},
  2829  	}
  2830  	target := &ret
  2831  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2832  		return nil, err
  2833  	}
  2834  	return ret, nil
  2835  }
  2836  
  2837  type MattersListCall struct {
  2838  	s            *Service
  2839  	urlParams_   gensupport.URLParams
  2840  	ifNoneMatch_ string
  2841  	ctx_         context.Context
  2842  	header_      http.Header
  2843  }
  2844  
  2845  // List: Lists matters the requestor has access to.
  2846  func (r *MattersService) List() *MattersListCall {
  2847  	c := &MattersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2848  	return c
  2849  }
  2850  
  2851  // PageSize sets the optional parameter "pageSize": The number of matters to
  2852  // return in the response. Default and maximum are 100.
  2853  func (c *MattersListCall) PageSize(pageSize int64) *MattersListCall {
  2854  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2855  	return c
  2856  }
  2857  
  2858  // PageToken sets the optional parameter "pageToken": The pagination token as
  2859  // returned in the response.
  2860  func (c *MattersListCall) PageToken(pageToken string) *MattersListCall {
  2861  	c.urlParams_.Set("pageToken", pageToken)
  2862  	return c
  2863  }
  2864  
  2865  // State sets the optional parameter "state": If set, lists only matters with
  2866  // the specified state. The default lists matters of all states.
  2867  //
  2868  // Possible values:
  2869  //
  2870  //	"STATE_UNSPECIFIED" - The matter has no specified state.
  2871  //	"OPEN" - The matter is open.
  2872  //	"CLOSED" - The matter is closed.
  2873  //	"DELETED" - The matter is deleted.
  2874  func (c *MattersListCall) State(state string) *MattersListCall {
  2875  	c.urlParams_.Set("state", state)
  2876  	return c
  2877  }
  2878  
  2879  // View sets the optional parameter "view": Specifies how much information
  2880  // about the matter to return in response.
  2881  //
  2882  // Possible values:
  2883  //
  2884  //	"VIEW_UNSPECIFIED" - The amount of detail is unspecified. Same as
  2885  //
  2886  // **BASIC**.
  2887  //
  2888  //	"BASIC" - Returns the matter ID, name, description, and state. Default
  2889  //
  2890  // choice.
  2891  //
  2892  //	"FULL" - Returns the basic details and a list of matter owners and
  2893  //
  2894  // collaborators (see
  2895  // [MatterPermissions](https://developers.google.com/vault/reference/rest/v1/mat
  2896  // ters#matterpermission)).
  2897  func (c *MattersListCall) View(view string) *MattersListCall {
  2898  	c.urlParams_.Set("view", view)
  2899  	return c
  2900  }
  2901  
  2902  // Fields allows partial responses to be retrieved. See
  2903  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2904  // details.
  2905  func (c *MattersListCall) Fields(s ...googleapi.Field) *MattersListCall {
  2906  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2907  	return c
  2908  }
  2909  
  2910  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2911  // object's ETag matches the given value. This is useful for getting updates
  2912  // only after the object has changed since the last request.
  2913  func (c *MattersListCall) IfNoneMatch(entityTag string) *MattersListCall {
  2914  	c.ifNoneMatch_ = entityTag
  2915  	return c
  2916  }
  2917  
  2918  // Context sets the context to be used in this call's Do method.
  2919  func (c *MattersListCall) Context(ctx context.Context) *MattersListCall {
  2920  	c.ctx_ = ctx
  2921  	return c
  2922  }
  2923  
  2924  // Header returns a http.Header that can be modified by the caller to add
  2925  // headers to the request.
  2926  func (c *MattersListCall) Header() http.Header {
  2927  	if c.header_ == nil {
  2928  		c.header_ = make(http.Header)
  2929  	}
  2930  	return c.header_
  2931  }
  2932  
  2933  func (c *MattersListCall) doRequest(alt string) (*http.Response, error) {
  2934  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2935  	if c.ifNoneMatch_ != "" {
  2936  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2937  	}
  2938  	var body io.Reader = nil
  2939  	c.urlParams_.Set("alt", alt)
  2940  	c.urlParams_.Set("prettyPrint", "false")
  2941  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters")
  2942  	urls += "?" + c.urlParams_.Encode()
  2943  	req, err := http.NewRequest("GET", urls, body)
  2944  	if err != nil {
  2945  		return nil, err
  2946  	}
  2947  	req.Header = reqHeaders
  2948  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2949  }
  2950  
  2951  // Do executes the "vault.matters.list" call.
  2952  // Any non-2xx status code is an error. Response headers are in either
  2953  // *ListMattersResponse.ServerResponse.Header or (if a response was returned at
  2954  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2955  // check whether the returned error was because http.StatusNotModified was
  2956  // returned.
  2957  func (c *MattersListCall) Do(opts ...googleapi.CallOption) (*ListMattersResponse, error) {
  2958  	gensupport.SetOptions(c.urlParams_, opts...)
  2959  	res, err := c.doRequest("json")
  2960  	if res != nil && res.StatusCode == http.StatusNotModified {
  2961  		if res.Body != nil {
  2962  			res.Body.Close()
  2963  		}
  2964  		return nil, gensupport.WrapError(&googleapi.Error{
  2965  			Code:   res.StatusCode,
  2966  			Header: res.Header,
  2967  		})
  2968  	}
  2969  	if err != nil {
  2970  		return nil, err
  2971  	}
  2972  	defer googleapi.CloseBody(res)
  2973  	if err := googleapi.CheckResponse(res); err != nil {
  2974  		return nil, gensupport.WrapError(err)
  2975  	}
  2976  	ret := &ListMattersResponse{
  2977  		ServerResponse: googleapi.ServerResponse{
  2978  			Header:         res.Header,
  2979  			HTTPStatusCode: res.StatusCode,
  2980  		},
  2981  	}
  2982  	target := &ret
  2983  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2984  		return nil, err
  2985  	}
  2986  	return ret, nil
  2987  }
  2988  
  2989  // Pages invokes f for each page of results.
  2990  // A non-nil error returned from f will halt the iteration.
  2991  // The provided context supersedes any context provided to the Context method.
  2992  func (c *MattersListCall) Pages(ctx context.Context, f func(*ListMattersResponse) error) error {
  2993  	c.ctx_ = ctx
  2994  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2995  	for {
  2996  		x, err := c.Do()
  2997  		if err != nil {
  2998  			return err
  2999  		}
  3000  		if err := f(x); err != nil {
  3001  			return err
  3002  		}
  3003  		if x.NextPageToken == "" {
  3004  			return nil
  3005  		}
  3006  		c.PageToken(x.NextPageToken)
  3007  	}
  3008  }
  3009  
  3010  type MattersRemovePermissionsCall struct {
  3011  	s                              *Service
  3012  	matterId                       string
  3013  	removematterpermissionsrequest *RemoveMatterPermissionsRequest
  3014  	urlParams_                     gensupport.URLParams
  3015  	ctx_                           context.Context
  3016  	header_                        http.Header
  3017  }
  3018  
  3019  // RemovePermissions: Removes an account as a matter collaborator.
  3020  //
  3021  // - matterId: The matter ID.
  3022  func (r *MattersService) RemovePermissions(matterId string, removematterpermissionsrequest *RemoveMatterPermissionsRequest) *MattersRemovePermissionsCall {
  3023  	c := &MattersRemovePermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3024  	c.matterId = matterId
  3025  	c.removematterpermissionsrequest = removematterpermissionsrequest
  3026  	return c
  3027  }
  3028  
  3029  // Fields allows partial responses to be retrieved. See
  3030  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3031  // details.
  3032  func (c *MattersRemovePermissionsCall) Fields(s ...googleapi.Field) *MattersRemovePermissionsCall {
  3033  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3034  	return c
  3035  }
  3036  
  3037  // Context sets the context to be used in this call's Do method.
  3038  func (c *MattersRemovePermissionsCall) Context(ctx context.Context) *MattersRemovePermissionsCall {
  3039  	c.ctx_ = ctx
  3040  	return c
  3041  }
  3042  
  3043  // Header returns a http.Header that can be modified by the caller to add
  3044  // headers to the request.
  3045  func (c *MattersRemovePermissionsCall) Header() http.Header {
  3046  	if c.header_ == nil {
  3047  		c.header_ = make(http.Header)
  3048  	}
  3049  	return c.header_
  3050  }
  3051  
  3052  func (c *MattersRemovePermissionsCall) doRequest(alt string) (*http.Response, error) {
  3053  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3054  	var body io.Reader = nil
  3055  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.removematterpermissionsrequest)
  3056  	if err != nil {
  3057  		return nil, err
  3058  	}
  3059  	c.urlParams_.Set("alt", alt)
  3060  	c.urlParams_.Set("prettyPrint", "false")
  3061  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}:removePermissions")
  3062  	urls += "?" + c.urlParams_.Encode()
  3063  	req, err := http.NewRequest("POST", urls, body)
  3064  	if err != nil {
  3065  		return nil, err
  3066  	}
  3067  	req.Header = reqHeaders
  3068  	googleapi.Expand(req.URL, map[string]string{
  3069  		"matterId": c.matterId,
  3070  	})
  3071  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3072  }
  3073  
  3074  // Do executes the "vault.matters.removePermissions" call.
  3075  // Any non-2xx status code is an error. Response headers are in either
  3076  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3077  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3078  // whether the returned error was because http.StatusNotModified was returned.
  3079  func (c *MattersRemovePermissionsCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3080  	gensupport.SetOptions(c.urlParams_, opts...)
  3081  	res, err := c.doRequest("json")
  3082  	if res != nil && res.StatusCode == http.StatusNotModified {
  3083  		if res.Body != nil {
  3084  			res.Body.Close()
  3085  		}
  3086  		return nil, gensupport.WrapError(&googleapi.Error{
  3087  			Code:   res.StatusCode,
  3088  			Header: res.Header,
  3089  		})
  3090  	}
  3091  	if err != nil {
  3092  		return nil, err
  3093  	}
  3094  	defer googleapi.CloseBody(res)
  3095  	if err := googleapi.CheckResponse(res); err != nil {
  3096  		return nil, gensupport.WrapError(err)
  3097  	}
  3098  	ret := &Empty{
  3099  		ServerResponse: googleapi.ServerResponse{
  3100  			Header:         res.Header,
  3101  			HTTPStatusCode: res.StatusCode,
  3102  		},
  3103  	}
  3104  	target := &ret
  3105  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3106  		return nil, err
  3107  	}
  3108  	return ret, nil
  3109  }
  3110  
  3111  type MattersReopenCall struct {
  3112  	s                   *Service
  3113  	matterId            string
  3114  	reopenmatterrequest *ReopenMatterRequest
  3115  	urlParams_          gensupport.URLParams
  3116  	ctx_                context.Context
  3117  	header_             http.Header
  3118  }
  3119  
  3120  // Reopen: Reopens the specified matter. Returns the matter with updated state.
  3121  //
  3122  // - matterId: The matter ID.
  3123  func (r *MattersService) Reopen(matterId string, reopenmatterrequest *ReopenMatterRequest) *MattersReopenCall {
  3124  	c := &MattersReopenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3125  	c.matterId = matterId
  3126  	c.reopenmatterrequest = reopenmatterrequest
  3127  	return c
  3128  }
  3129  
  3130  // Fields allows partial responses to be retrieved. See
  3131  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3132  // details.
  3133  func (c *MattersReopenCall) Fields(s ...googleapi.Field) *MattersReopenCall {
  3134  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3135  	return c
  3136  }
  3137  
  3138  // Context sets the context to be used in this call's Do method.
  3139  func (c *MattersReopenCall) Context(ctx context.Context) *MattersReopenCall {
  3140  	c.ctx_ = ctx
  3141  	return c
  3142  }
  3143  
  3144  // Header returns a http.Header that can be modified by the caller to add
  3145  // headers to the request.
  3146  func (c *MattersReopenCall) Header() http.Header {
  3147  	if c.header_ == nil {
  3148  		c.header_ = make(http.Header)
  3149  	}
  3150  	return c.header_
  3151  }
  3152  
  3153  func (c *MattersReopenCall) doRequest(alt string) (*http.Response, error) {
  3154  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3155  	var body io.Reader = nil
  3156  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.reopenmatterrequest)
  3157  	if err != nil {
  3158  		return nil, err
  3159  	}
  3160  	c.urlParams_.Set("alt", alt)
  3161  	c.urlParams_.Set("prettyPrint", "false")
  3162  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}:reopen")
  3163  	urls += "?" + c.urlParams_.Encode()
  3164  	req, err := http.NewRequest("POST", urls, body)
  3165  	if err != nil {
  3166  		return nil, err
  3167  	}
  3168  	req.Header = reqHeaders
  3169  	googleapi.Expand(req.URL, map[string]string{
  3170  		"matterId": c.matterId,
  3171  	})
  3172  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3173  }
  3174  
  3175  // Do executes the "vault.matters.reopen" call.
  3176  // Any non-2xx status code is an error. Response headers are in either
  3177  // *ReopenMatterResponse.ServerResponse.Header or (if a response was returned
  3178  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3179  // check whether the returned error was because http.StatusNotModified was
  3180  // returned.
  3181  func (c *MattersReopenCall) Do(opts ...googleapi.CallOption) (*ReopenMatterResponse, error) {
  3182  	gensupport.SetOptions(c.urlParams_, opts...)
  3183  	res, err := c.doRequest("json")
  3184  	if res != nil && res.StatusCode == http.StatusNotModified {
  3185  		if res.Body != nil {
  3186  			res.Body.Close()
  3187  		}
  3188  		return nil, gensupport.WrapError(&googleapi.Error{
  3189  			Code:   res.StatusCode,
  3190  			Header: res.Header,
  3191  		})
  3192  	}
  3193  	if err != nil {
  3194  		return nil, err
  3195  	}
  3196  	defer googleapi.CloseBody(res)
  3197  	if err := googleapi.CheckResponse(res); err != nil {
  3198  		return nil, gensupport.WrapError(err)
  3199  	}
  3200  	ret := &ReopenMatterResponse{
  3201  		ServerResponse: googleapi.ServerResponse{
  3202  			Header:         res.Header,
  3203  			HTTPStatusCode: res.StatusCode,
  3204  		},
  3205  	}
  3206  	target := &ret
  3207  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3208  		return nil, err
  3209  	}
  3210  	return ret, nil
  3211  }
  3212  
  3213  type MattersUndeleteCall struct {
  3214  	s                     *Service
  3215  	matterId              string
  3216  	undeletematterrequest *UndeleteMatterRequest
  3217  	urlParams_            gensupport.URLParams
  3218  	ctx_                  context.Context
  3219  	header_               http.Header
  3220  }
  3221  
  3222  // Undelete: Undeletes the specified matter. Returns the matter with updated
  3223  // state.
  3224  //
  3225  // - matterId: The matter ID.
  3226  func (r *MattersService) Undelete(matterId string, undeletematterrequest *UndeleteMatterRequest) *MattersUndeleteCall {
  3227  	c := &MattersUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3228  	c.matterId = matterId
  3229  	c.undeletematterrequest = undeletematterrequest
  3230  	return c
  3231  }
  3232  
  3233  // Fields allows partial responses to be retrieved. See
  3234  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3235  // details.
  3236  func (c *MattersUndeleteCall) Fields(s ...googleapi.Field) *MattersUndeleteCall {
  3237  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3238  	return c
  3239  }
  3240  
  3241  // Context sets the context to be used in this call's Do method.
  3242  func (c *MattersUndeleteCall) Context(ctx context.Context) *MattersUndeleteCall {
  3243  	c.ctx_ = ctx
  3244  	return c
  3245  }
  3246  
  3247  // Header returns a http.Header that can be modified by the caller to add
  3248  // headers to the request.
  3249  func (c *MattersUndeleteCall) Header() http.Header {
  3250  	if c.header_ == nil {
  3251  		c.header_ = make(http.Header)
  3252  	}
  3253  	return c.header_
  3254  }
  3255  
  3256  func (c *MattersUndeleteCall) doRequest(alt string) (*http.Response, error) {
  3257  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3258  	var body io.Reader = nil
  3259  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletematterrequest)
  3260  	if err != nil {
  3261  		return nil, err
  3262  	}
  3263  	c.urlParams_.Set("alt", alt)
  3264  	c.urlParams_.Set("prettyPrint", "false")
  3265  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}:undelete")
  3266  	urls += "?" + c.urlParams_.Encode()
  3267  	req, err := http.NewRequest("POST", urls, body)
  3268  	if err != nil {
  3269  		return nil, err
  3270  	}
  3271  	req.Header = reqHeaders
  3272  	googleapi.Expand(req.URL, map[string]string{
  3273  		"matterId": c.matterId,
  3274  	})
  3275  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3276  }
  3277  
  3278  // Do executes the "vault.matters.undelete" call.
  3279  // Any non-2xx status code is an error. Response headers are in either
  3280  // *Matter.ServerResponse.Header or (if a response was returned at all) in
  3281  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3282  // whether the returned error was because http.StatusNotModified was returned.
  3283  func (c *MattersUndeleteCall) Do(opts ...googleapi.CallOption) (*Matter, error) {
  3284  	gensupport.SetOptions(c.urlParams_, opts...)
  3285  	res, err := c.doRequest("json")
  3286  	if res != nil && res.StatusCode == http.StatusNotModified {
  3287  		if res.Body != nil {
  3288  			res.Body.Close()
  3289  		}
  3290  		return nil, gensupport.WrapError(&googleapi.Error{
  3291  			Code:   res.StatusCode,
  3292  			Header: res.Header,
  3293  		})
  3294  	}
  3295  	if err != nil {
  3296  		return nil, err
  3297  	}
  3298  	defer googleapi.CloseBody(res)
  3299  	if err := googleapi.CheckResponse(res); err != nil {
  3300  		return nil, gensupport.WrapError(err)
  3301  	}
  3302  	ret := &Matter{
  3303  		ServerResponse: googleapi.ServerResponse{
  3304  			Header:         res.Header,
  3305  			HTTPStatusCode: res.StatusCode,
  3306  		},
  3307  	}
  3308  	target := &ret
  3309  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3310  		return nil, err
  3311  	}
  3312  	return ret, nil
  3313  }
  3314  
  3315  type MattersUpdateCall struct {
  3316  	s          *Service
  3317  	matterId   string
  3318  	matter     *Matter
  3319  	urlParams_ gensupport.URLParams
  3320  	ctx_       context.Context
  3321  	header_    http.Header
  3322  }
  3323  
  3324  // Update: Updates the specified matter. This updates only the name and
  3325  // description of the matter, identified by matter ID. Changes to any other
  3326  // fields are ignored. Returns the default view of the matter.
  3327  //
  3328  // - matterId: The matter ID.
  3329  func (r *MattersService) Update(matterId string, matter *Matter) *MattersUpdateCall {
  3330  	c := &MattersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3331  	c.matterId = matterId
  3332  	c.matter = matter
  3333  	return c
  3334  }
  3335  
  3336  // Fields allows partial responses to be retrieved. See
  3337  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3338  // details.
  3339  func (c *MattersUpdateCall) Fields(s ...googleapi.Field) *MattersUpdateCall {
  3340  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3341  	return c
  3342  }
  3343  
  3344  // Context sets the context to be used in this call's Do method.
  3345  func (c *MattersUpdateCall) Context(ctx context.Context) *MattersUpdateCall {
  3346  	c.ctx_ = ctx
  3347  	return c
  3348  }
  3349  
  3350  // Header returns a http.Header that can be modified by the caller to add
  3351  // headers to the request.
  3352  func (c *MattersUpdateCall) Header() http.Header {
  3353  	if c.header_ == nil {
  3354  		c.header_ = make(http.Header)
  3355  	}
  3356  	return c.header_
  3357  }
  3358  
  3359  func (c *MattersUpdateCall) doRequest(alt string) (*http.Response, error) {
  3360  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3361  	var body io.Reader = nil
  3362  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.matter)
  3363  	if err != nil {
  3364  		return nil, err
  3365  	}
  3366  	c.urlParams_.Set("alt", alt)
  3367  	c.urlParams_.Set("prettyPrint", "false")
  3368  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}")
  3369  	urls += "?" + c.urlParams_.Encode()
  3370  	req, err := http.NewRequest("PUT", urls, body)
  3371  	if err != nil {
  3372  		return nil, err
  3373  	}
  3374  	req.Header = reqHeaders
  3375  	googleapi.Expand(req.URL, map[string]string{
  3376  		"matterId": c.matterId,
  3377  	})
  3378  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3379  }
  3380  
  3381  // Do executes the "vault.matters.update" call.
  3382  // Any non-2xx status code is an error. Response headers are in either
  3383  // *Matter.ServerResponse.Header or (if a response was returned at all) in
  3384  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3385  // whether the returned error was because http.StatusNotModified was returned.
  3386  func (c *MattersUpdateCall) Do(opts ...googleapi.CallOption) (*Matter, error) {
  3387  	gensupport.SetOptions(c.urlParams_, opts...)
  3388  	res, err := c.doRequest("json")
  3389  	if res != nil && res.StatusCode == http.StatusNotModified {
  3390  		if res.Body != nil {
  3391  			res.Body.Close()
  3392  		}
  3393  		return nil, gensupport.WrapError(&googleapi.Error{
  3394  			Code:   res.StatusCode,
  3395  			Header: res.Header,
  3396  		})
  3397  	}
  3398  	if err != nil {
  3399  		return nil, err
  3400  	}
  3401  	defer googleapi.CloseBody(res)
  3402  	if err := googleapi.CheckResponse(res); err != nil {
  3403  		return nil, gensupport.WrapError(err)
  3404  	}
  3405  	ret := &Matter{
  3406  		ServerResponse: googleapi.ServerResponse{
  3407  			Header:         res.Header,
  3408  			HTTPStatusCode: res.StatusCode,
  3409  		},
  3410  	}
  3411  	target := &ret
  3412  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3413  		return nil, err
  3414  	}
  3415  	return ret, nil
  3416  }
  3417  
  3418  type MattersExportsCreateCall struct {
  3419  	s          *Service
  3420  	matterId   string
  3421  	export     *Export
  3422  	urlParams_ gensupport.URLParams
  3423  	ctx_       context.Context
  3424  	header_    http.Header
  3425  }
  3426  
  3427  // Create: Creates an export.
  3428  //
  3429  // - matterId: The matter ID.
  3430  func (r *MattersExportsService) Create(matterId string, export *Export) *MattersExportsCreateCall {
  3431  	c := &MattersExportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3432  	c.matterId = matterId
  3433  	c.export = export
  3434  	return c
  3435  }
  3436  
  3437  // Fields allows partial responses to be retrieved. See
  3438  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3439  // details.
  3440  func (c *MattersExportsCreateCall) Fields(s ...googleapi.Field) *MattersExportsCreateCall {
  3441  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3442  	return c
  3443  }
  3444  
  3445  // Context sets the context to be used in this call's Do method.
  3446  func (c *MattersExportsCreateCall) Context(ctx context.Context) *MattersExportsCreateCall {
  3447  	c.ctx_ = ctx
  3448  	return c
  3449  }
  3450  
  3451  // Header returns a http.Header that can be modified by the caller to add
  3452  // headers to the request.
  3453  func (c *MattersExportsCreateCall) Header() http.Header {
  3454  	if c.header_ == nil {
  3455  		c.header_ = make(http.Header)
  3456  	}
  3457  	return c.header_
  3458  }
  3459  
  3460  func (c *MattersExportsCreateCall) doRequest(alt string) (*http.Response, error) {
  3461  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3462  	var body io.Reader = nil
  3463  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.export)
  3464  	if err != nil {
  3465  		return nil, err
  3466  	}
  3467  	c.urlParams_.Set("alt", alt)
  3468  	c.urlParams_.Set("prettyPrint", "false")
  3469  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/exports")
  3470  	urls += "?" + c.urlParams_.Encode()
  3471  	req, err := http.NewRequest("POST", urls, body)
  3472  	if err != nil {
  3473  		return nil, err
  3474  	}
  3475  	req.Header = reqHeaders
  3476  	googleapi.Expand(req.URL, map[string]string{
  3477  		"matterId": c.matterId,
  3478  	})
  3479  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3480  }
  3481  
  3482  // Do executes the "vault.matters.exports.create" call.
  3483  // Any non-2xx status code is an error. Response headers are in either
  3484  // *Export.ServerResponse.Header or (if a response was returned at all) in
  3485  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3486  // whether the returned error was because http.StatusNotModified was returned.
  3487  func (c *MattersExportsCreateCall) Do(opts ...googleapi.CallOption) (*Export, error) {
  3488  	gensupport.SetOptions(c.urlParams_, opts...)
  3489  	res, err := c.doRequest("json")
  3490  	if res != nil && res.StatusCode == http.StatusNotModified {
  3491  		if res.Body != nil {
  3492  			res.Body.Close()
  3493  		}
  3494  		return nil, gensupport.WrapError(&googleapi.Error{
  3495  			Code:   res.StatusCode,
  3496  			Header: res.Header,
  3497  		})
  3498  	}
  3499  	if err != nil {
  3500  		return nil, err
  3501  	}
  3502  	defer googleapi.CloseBody(res)
  3503  	if err := googleapi.CheckResponse(res); err != nil {
  3504  		return nil, gensupport.WrapError(err)
  3505  	}
  3506  	ret := &Export{
  3507  		ServerResponse: googleapi.ServerResponse{
  3508  			Header:         res.Header,
  3509  			HTTPStatusCode: res.StatusCode,
  3510  		},
  3511  	}
  3512  	target := &ret
  3513  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3514  		return nil, err
  3515  	}
  3516  	return ret, nil
  3517  }
  3518  
  3519  type MattersExportsDeleteCall struct {
  3520  	s          *Service
  3521  	matterId   string
  3522  	exportId   string
  3523  	urlParams_ gensupport.URLParams
  3524  	ctx_       context.Context
  3525  	header_    http.Header
  3526  }
  3527  
  3528  // Delete: Deletes an export.
  3529  //
  3530  // - exportId: The export ID.
  3531  // - matterId: The matter ID.
  3532  func (r *MattersExportsService) Delete(matterId string, exportId string) *MattersExportsDeleteCall {
  3533  	c := &MattersExportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3534  	c.matterId = matterId
  3535  	c.exportId = exportId
  3536  	return c
  3537  }
  3538  
  3539  // Fields allows partial responses to be retrieved. See
  3540  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3541  // details.
  3542  func (c *MattersExportsDeleteCall) Fields(s ...googleapi.Field) *MattersExportsDeleteCall {
  3543  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3544  	return c
  3545  }
  3546  
  3547  // Context sets the context to be used in this call's Do method.
  3548  func (c *MattersExportsDeleteCall) Context(ctx context.Context) *MattersExportsDeleteCall {
  3549  	c.ctx_ = ctx
  3550  	return c
  3551  }
  3552  
  3553  // Header returns a http.Header that can be modified by the caller to add
  3554  // headers to the request.
  3555  func (c *MattersExportsDeleteCall) Header() http.Header {
  3556  	if c.header_ == nil {
  3557  		c.header_ = make(http.Header)
  3558  	}
  3559  	return c.header_
  3560  }
  3561  
  3562  func (c *MattersExportsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3563  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3564  	var body io.Reader = nil
  3565  	c.urlParams_.Set("alt", alt)
  3566  	c.urlParams_.Set("prettyPrint", "false")
  3567  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/exports/{exportId}")
  3568  	urls += "?" + c.urlParams_.Encode()
  3569  	req, err := http.NewRequest("DELETE", urls, body)
  3570  	if err != nil {
  3571  		return nil, err
  3572  	}
  3573  	req.Header = reqHeaders
  3574  	googleapi.Expand(req.URL, map[string]string{
  3575  		"matterId": c.matterId,
  3576  		"exportId": c.exportId,
  3577  	})
  3578  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3579  }
  3580  
  3581  // Do executes the "vault.matters.exports.delete" call.
  3582  // Any non-2xx status code is an error. Response headers are in either
  3583  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3584  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3585  // whether the returned error was because http.StatusNotModified was returned.
  3586  func (c *MattersExportsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3587  	gensupport.SetOptions(c.urlParams_, opts...)
  3588  	res, err := c.doRequest("json")
  3589  	if res != nil && res.StatusCode == http.StatusNotModified {
  3590  		if res.Body != nil {
  3591  			res.Body.Close()
  3592  		}
  3593  		return nil, gensupport.WrapError(&googleapi.Error{
  3594  			Code:   res.StatusCode,
  3595  			Header: res.Header,
  3596  		})
  3597  	}
  3598  	if err != nil {
  3599  		return nil, err
  3600  	}
  3601  	defer googleapi.CloseBody(res)
  3602  	if err := googleapi.CheckResponse(res); err != nil {
  3603  		return nil, gensupport.WrapError(err)
  3604  	}
  3605  	ret := &Empty{
  3606  		ServerResponse: googleapi.ServerResponse{
  3607  			Header:         res.Header,
  3608  			HTTPStatusCode: res.StatusCode,
  3609  		},
  3610  	}
  3611  	target := &ret
  3612  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3613  		return nil, err
  3614  	}
  3615  	return ret, nil
  3616  }
  3617  
  3618  type MattersExportsGetCall struct {
  3619  	s            *Service
  3620  	matterId     string
  3621  	exportId     string
  3622  	urlParams_   gensupport.URLParams
  3623  	ifNoneMatch_ string
  3624  	ctx_         context.Context
  3625  	header_      http.Header
  3626  }
  3627  
  3628  // Get: Gets an export.
  3629  //
  3630  // - exportId: The export ID.
  3631  // - matterId: The matter ID.
  3632  func (r *MattersExportsService) Get(matterId string, exportId string) *MattersExportsGetCall {
  3633  	c := &MattersExportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3634  	c.matterId = matterId
  3635  	c.exportId = exportId
  3636  	return c
  3637  }
  3638  
  3639  // Fields allows partial responses to be retrieved. See
  3640  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3641  // details.
  3642  func (c *MattersExportsGetCall) Fields(s ...googleapi.Field) *MattersExportsGetCall {
  3643  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3644  	return c
  3645  }
  3646  
  3647  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3648  // object's ETag matches the given value. This is useful for getting updates
  3649  // only after the object has changed since the last request.
  3650  func (c *MattersExportsGetCall) IfNoneMatch(entityTag string) *MattersExportsGetCall {
  3651  	c.ifNoneMatch_ = entityTag
  3652  	return c
  3653  }
  3654  
  3655  // Context sets the context to be used in this call's Do method.
  3656  func (c *MattersExportsGetCall) Context(ctx context.Context) *MattersExportsGetCall {
  3657  	c.ctx_ = ctx
  3658  	return c
  3659  }
  3660  
  3661  // Header returns a http.Header that can be modified by the caller to add
  3662  // headers to the request.
  3663  func (c *MattersExportsGetCall) Header() http.Header {
  3664  	if c.header_ == nil {
  3665  		c.header_ = make(http.Header)
  3666  	}
  3667  	return c.header_
  3668  }
  3669  
  3670  func (c *MattersExportsGetCall) doRequest(alt string) (*http.Response, error) {
  3671  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3672  	if c.ifNoneMatch_ != "" {
  3673  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3674  	}
  3675  	var body io.Reader = nil
  3676  	c.urlParams_.Set("alt", alt)
  3677  	c.urlParams_.Set("prettyPrint", "false")
  3678  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/exports/{exportId}")
  3679  	urls += "?" + c.urlParams_.Encode()
  3680  	req, err := http.NewRequest("GET", urls, body)
  3681  	if err != nil {
  3682  		return nil, err
  3683  	}
  3684  	req.Header = reqHeaders
  3685  	googleapi.Expand(req.URL, map[string]string{
  3686  		"matterId": c.matterId,
  3687  		"exportId": c.exportId,
  3688  	})
  3689  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3690  }
  3691  
  3692  // Do executes the "vault.matters.exports.get" call.
  3693  // Any non-2xx status code is an error. Response headers are in either
  3694  // *Export.ServerResponse.Header or (if a response was returned at all) in
  3695  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3696  // whether the returned error was because http.StatusNotModified was returned.
  3697  func (c *MattersExportsGetCall) Do(opts ...googleapi.CallOption) (*Export, error) {
  3698  	gensupport.SetOptions(c.urlParams_, opts...)
  3699  	res, err := c.doRequest("json")
  3700  	if res != nil && res.StatusCode == http.StatusNotModified {
  3701  		if res.Body != nil {
  3702  			res.Body.Close()
  3703  		}
  3704  		return nil, gensupport.WrapError(&googleapi.Error{
  3705  			Code:   res.StatusCode,
  3706  			Header: res.Header,
  3707  		})
  3708  	}
  3709  	if err != nil {
  3710  		return nil, err
  3711  	}
  3712  	defer googleapi.CloseBody(res)
  3713  	if err := googleapi.CheckResponse(res); err != nil {
  3714  		return nil, gensupport.WrapError(err)
  3715  	}
  3716  	ret := &Export{
  3717  		ServerResponse: googleapi.ServerResponse{
  3718  			Header:         res.Header,
  3719  			HTTPStatusCode: res.StatusCode,
  3720  		},
  3721  	}
  3722  	target := &ret
  3723  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3724  		return nil, err
  3725  	}
  3726  	return ret, nil
  3727  }
  3728  
  3729  type MattersExportsListCall struct {
  3730  	s            *Service
  3731  	matterId     string
  3732  	urlParams_   gensupport.URLParams
  3733  	ifNoneMatch_ string
  3734  	ctx_         context.Context
  3735  	header_      http.Header
  3736  }
  3737  
  3738  // List: Lists details about the exports in the specified matter.
  3739  //
  3740  // - matterId: The matter ID.
  3741  func (r *MattersExportsService) List(matterId string) *MattersExportsListCall {
  3742  	c := &MattersExportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3743  	c.matterId = matterId
  3744  	return c
  3745  }
  3746  
  3747  // PageSize sets the optional parameter "pageSize": The number of exports to
  3748  // return in the response.
  3749  func (c *MattersExportsListCall) PageSize(pageSize int64) *MattersExportsListCall {
  3750  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3751  	return c
  3752  }
  3753  
  3754  // PageToken sets the optional parameter "pageToken": The pagination token as
  3755  // returned in the response.
  3756  func (c *MattersExportsListCall) PageToken(pageToken string) *MattersExportsListCall {
  3757  	c.urlParams_.Set("pageToken", pageToken)
  3758  	return c
  3759  }
  3760  
  3761  // Fields allows partial responses to be retrieved. See
  3762  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3763  // details.
  3764  func (c *MattersExportsListCall) Fields(s ...googleapi.Field) *MattersExportsListCall {
  3765  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3766  	return c
  3767  }
  3768  
  3769  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3770  // object's ETag matches the given value. This is useful for getting updates
  3771  // only after the object has changed since the last request.
  3772  func (c *MattersExportsListCall) IfNoneMatch(entityTag string) *MattersExportsListCall {
  3773  	c.ifNoneMatch_ = entityTag
  3774  	return c
  3775  }
  3776  
  3777  // Context sets the context to be used in this call's Do method.
  3778  func (c *MattersExportsListCall) Context(ctx context.Context) *MattersExportsListCall {
  3779  	c.ctx_ = ctx
  3780  	return c
  3781  }
  3782  
  3783  // Header returns a http.Header that can be modified by the caller to add
  3784  // headers to the request.
  3785  func (c *MattersExportsListCall) Header() http.Header {
  3786  	if c.header_ == nil {
  3787  		c.header_ = make(http.Header)
  3788  	}
  3789  	return c.header_
  3790  }
  3791  
  3792  func (c *MattersExportsListCall) doRequest(alt string) (*http.Response, error) {
  3793  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3794  	if c.ifNoneMatch_ != "" {
  3795  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3796  	}
  3797  	var body io.Reader = nil
  3798  	c.urlParams_.Set("alt", alt)
  3799  	c.urlParams_.Set("prettyPrint", "false")
  3800  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/exports")
  3801  	urls += "?" + c.urlParams_.Encode()
  3802  	req, err := http.NewRequest("GET", urls, body)
  3803  	if err != nil {
  3804  		return nil, err
  3805  	}
  3806  	req.Header = reqHeaders
  3807  	googleapi.Expand(req.URL, map[string]string{
  3808  		"matterId": c.matterId,
  3809  	})
  3810  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3811  }
  3812  
  3813  // Do executes the "vault.matters.exports.list" call.
  3814  // Any non-2xx status code is an error. Response headers are in either
  3815  // *ListExportsResponse.ServerResponse.Header or (if a response was returned at
  3816  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3817  // check whether the returned error was because http.StatusNotModified was
  3818  // returned.
  3819  func (c *MattersExportsListCall) Do(opts ...googleapi.CallOption) (*ListExportsResponse, error) {
  3820  	gensupport.SetOptions(c.urlParams_, opts...)
  3821  	res, err := c.doRequest("json")
  3822  	if res != nil && res.StatusCode == http.StatusNotModified {
  3823  		if res.Body != nil {
  3824  			res.Body.Close()
  3825  		}
  3826  		return nil, gensupport.WrapError(&googleapi.Error{
  3827  			Code:   res.StatusCode,
  3828  			Header: res.Header,
  3829  		})
  3830  	}
  3831  	if err != nil {
  3832  		return nil, err
  3833  	}
  3834  	defer googleapi.CloseBody(res)
  3835  	if err := googleapi.CheckResponse(res); err != nil {
  3836  		return nil, gensupport.WrapError(err)
  3837  	}
  3838  	ret := &ListExportsResponse{
  3839  		ServerResponse: googleapi.ServerResponse{
  3840  			Header:         res.Header,
  3841  			HTTPStatusCode: res.StatusCode,
  3842  		},
  3843  	}
  3844  	target := &ret
  3845  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3846  		return nil, err
  3847  	}
  3848  	return ret, nil
  3849  }
  3850  
  3851  // Pages invokes f for each page of results.
  3852  // A non-nil error returned from f will halt the iteration.
  3853  // The provided context supersedes any context provided to the Context method.
  3854  func (c *MattersExportsListCall) Pages(ctx context.Context, f func(*ListExportsResponse) error) error {
  3855  	c.ctx_ = ctx
  3856  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3857  	for {
  3858  		x, err := c.Do()
  3859  		if err != nil {
  3860  			return err
  3861  		}
  3862  		if err := f(x); err != nil {
  3863  			return err
  3864  		}
  3865  		if x.NextPageToken == "" {
  3866  			return nil
  3867  		}
  3868  		c.PageToken(x.NextPageToken)
  3869  	}
  3870  }
  3871  
  3872  type MattersHoldsAddHeldAccountsCall struct {
  3873  	s                      *Service
  3874  	matterId               string
  3875  	holdId                 string
  3876  	addheldaccountsrequest *AddHeldAccountsRequest
  3877  	urlParams_             gensupport.URLParams
  3878  	ctx_                   context.Context
  3879  	header_                http.Header
  3880  }
  3881  
  3882  // AddHeldAccounts: Adds accounts to a hold. Returns a list of accounts that
  3883  // have been successfully added. Accounts can be added only to an existing
  3884  // account-based hold.
  3885  //
  3886  // - holdId: The hold ID.
  3887  // - matterId: The matter ID.
  3888  func (r *MattersHoldsService) AddHeldAccounts(matterId string, holdId string, addheldaccountsrequest *AddHeldAccountsRequest) *MattersHoldsAddHeldAccountsCall {
  3889  	c := &MattersHoldsAddHeldAccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3890  	c.matterId = matterId
  3891  	c.holdId = holdId
  3892  	c.addheldaccountsrequest = addheldaccountsrequest
  3893  	return c
  3894  }
  3895  
  3896  // Fields allows partial responses to be retrieved. See
  3897  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3898  // details.
  3899  func (c *MattersHoldsAddHeldAccountsCall) Fields(s ...googleapi.Field) *MattersHoldsAddHeldAccountsCall {
  3900  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3901  	return c
  3902  }
  3903  
  3904  // Context sets the context to be used in this call's Do method.
  3905  func (c *MattersHoldsAddHeldAccountsCall) Context(ctx context.Context) *MattersHoldsAddHeldAccountsCall {
  3906  	c.ctx_ = ctx
  3907  	return c
  3908  }
  3909  
  3910  // Header returns a http.Header that can be modified by the caller to add
  3911  // headers to the request.
  3912  func (c *MattersHoldsAddHeldAccountsCall) Header() http.Header {
  3913  	if c.header_ == nil {
  3914  		c.header_ = make(http.Header)
  3915  	}
  3916  	return c.header_
  3917  }
  3918  
  3919  func (c *MattersHoldsAddHeldAccountsCall) doRequest(alt string) (*http.Response, error) {
  3920  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3921  	var body io.Reader = nil
  3922  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addheldaccountsrequest)
  3923  	if err != nil {
  3924  		return nil, err
  3925  	}
  3926  	c.urlParams_.Set("alt", alt)
  3927  	c.urlParams_.Set("prettyPrint", "false")
  3928  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}:addHeldAccounts")
  3929  	urls += "?" + c.urlParams_.Encode()
  3930  	req, err := http.NewRequest("POST", urls, body)
  3931  	if err != nil {
  3932  		return nil, err
  3933  	}
  3934  	req.Header = reqHeaders
  3935  	googleapi.Expand(req.URL, map[string]string{
  3936  		"matterId": c.matterId,
  3937  		"holdId":   c.holdId,
  3938  	})
  3939  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3940  }
  3941  
  3942  // Do executes the "vault.matters.holds.addHeldAccounts" call.
  3943  // Any non-2xx status code is an error. Response headers are in either
  3944  // *AddHeldAccountsResponse.ServerResponse.Header or (if a response was
  3945  // returned at all) in error.(*googleapi.Error).Header. Use
  3946  // googleapi.IsNotModified to check whether the returned error was because
  3947  // http.StatusNotModified was returned.
  3948  func (c *MattersHoldsAddHeldAccountsCall) Do(opts ...googleapi.CallOption) (*AddHeldAccountsResponse, error) {
  3949  	gensupport.SetOptions(c.urlParams_, opts...)
  3950  	res, err := c.doRequest("json")
  3951  	if res != nil && res.StatusCode == http.StatusNotModified {
  3952  		if res.Body != nil {
  3953  			res.Body.Close()
  3954  		}
  3955  		return nil, gensupport.WrapError(&googleapi.Error{
  3956  			Code:   res.StatusCode,
  3957  			Header: res.Header,
  3958  		})
  3959  	}
  3960  	if err != nil {
  3961  		return nil, err
  3962  	}
  3963  	defer googleapi.CloseBody(res)
  3964  	if err := googleapi.CheckResponse(res); err != nil {
  3965  		return nil, gensupport.WrapError(err)
  3966  	}
  3967  	ret := &AddHeldAccountsResponse{
  3968  		ServerResponse: googleapi.ServerResponse{
  3969  			Header:         res.Header,
  3970  			HTTPStatusCode: res.StatusCode,
  3971  		},
  3972  	}
  3973  	target := &ret
  3974  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3975  		return nil, err
  3976  	}
  3977  	return ret, nil
  3978  }
  3979  
  3980  type MattersHoldsCreateCall struct {
  3981  	s          *Service
  3982  	matterId   string
  3983  	hold       *Hold
  3984  	urlParams_ gensupport.URLParams
  3985  	ctx_       context.Context
  3986  	header_    http.Header
  3987  }
  3988  
  3989  // Create: Creates a hold in the specified matter.
  3990  //
  3991  // - matterId: The matter ID.
  3992  func (r *MattersHoldsService) Create(matterId string, hold *Hold) *MattersHoldsCreateCall {
  3993  	c := &MattersHoldsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3994  	c.matterId = matterId
  3995  	c.hold = hold
  3996  	return c
  3997  }
  3998  
  3999  // Fields allows partial responses to be retrieved. See
  4000  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4001  // details.
  4002  func (c *MattersHoldsCreateCall) Fields(s ...googleapi.Field) *MattersHoldsCreateCall {
  4003  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4004  	return c
  4005  }
  4006  
  4007  // Context sets the context to be used in this call's Do method.
  4008  func (c *MattersHoldsCreateCall) Context(ctx context.Context) *MattersHoldsCreateCall {
  4009  	c.ctx_ = ctx
  4010  	return c
  4011  }
  4012  
  4013  // Header returns a http.Header that can be modified by the caller to add
  4014  // headers to the request.
  4015  func (c *MattersHoldsCreateCall) Header() http.Header {
  4016  	if c.header_ == nil {
  4017  		c.header_ = make(http.Header)
  4018  	}
  4019  	return c.header_
  4020  }
  4021  
  4022  func (c *MattersHoldsCreateCall) doRequest(alt string) (*http.Response, error) {
  4023  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4024  	var body io.Reader = nil
  4025  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.hold)
  4026  	if err != nil {
  4027  		return nil, err
  4028  	}
  4029  	c.urlParams_.Set("alt", alt)
  4030  	c.urlParams_.Set("prettyPrint", "false")
  4031  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds")
  4032  	urls += "?" + c.urlParams_.Encode()
  4033  	req, err := http.NewRequest("POST", urls, body)
  4034  	if err != nil {
  4035  		return nil, err
  4036  	}
  4037  	req.Header = reqHeaders
  4038  	googleapi.Expand(req.URL, map[string]string{
  4039  		"matterId": c.matterId,
  4040  	})
  4041  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4042  }
  4043  
  4044  // Do executes the "vault.matters.holds.create" call.
  4045  // Any non-2xx status code is an error. Response headers are in either
  4046  // *Hold.ServerResponse.Header or (if a response was returned at all) in
  4047  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4048  // whether the returned error was because http.StatusNotModified was returned.
  4049  func (c *MattersHoldsCreateCall) Do(opts ...googleapi.CallOption) (*Hold, error) {
  4050  	gensupport.SetOptions(c.urlParams_, opts...)
  4051  	res, err := c.doRequest("json")
  4052  	if res != nil && res.StatusCode == http.StatusNotModified {
  4053  		if res.Body != nil {
  4054  			res.Body.Close()
  4055  		}
  4056  		return nil, gensupport.WrapError(&googleapi.Error{
  4057  			Code:   res.StatusCode,
  4058  			Header: res.Header,
  4059  		})
  4060  	}
  4061  	if err != nil {
  4062  		return nil, err
  4063  	}
  4064  	defer googleapi.CloseBody(res)
  4065  	if err := googleapi.CheckResponse(res); err != nil {
  4066  		return nil, gensupport.WrapError(err)
  4067  	}
  4068  	ret := &Hold{
  4069  		ServerResponse: googleapi.ServerResponse{
  4070  			Header:         res.Header,
  4071  			HTTPStatusCode: res.StatusCode,
  4072  		},
  4073  	}
  4074  	target := &ret
  4075  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4076  		return nil, err
  4077  	}
  4078  	return ret, nil
  4079  }
  4080  
  4081  type MattersHoldsDeleteCall struct {
  4082  	s          *Service
  4083  	matterId   string
  4084  	holdId     string
  4085  	urlParams_ gensupport.URLParams
  4086  	ctx_       context.Context
  4087  	header_    http.Header
  4088  }
  4089  
  4090  // Delete: Removes the specified hold and releases the accounts or
  4091  // organizational unit covered by the hold. If the data is not preserved by
  4092  // another hold or retention rule, it might be purged.
  4093  //
  4094  // - holdId: The hold ID.
  4095  // - matterId: The matter ID.
  4096  func (r *MattersHoldsService) Delete(matterId string, holdId string) *MattersHoldsDeleteCall {
  4097  	c := &MattersHoldsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4098  	c.matterId = matterId
  4099  	c.holdId = holdId
  4100  	return c
  4101  }
  4102  
  4103  // Fields allows partial responses to be retrieved. See
  4104  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4105  // details.
  4106  func (c *MattersHoldsDeleteCall) Fields(s ...googleapi.Field) *MattersHoldsDeleteCall {
  4107  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4108  	return c
  4109  }
  4110  
  4111  // Context sets the context to be used in this call's Do method.
  4112  func (c *MattersHoldsDeleteCall) Context(ctx context.Context) *MattersHoldsDeleteCall {
  4113  	c.ctx_ = ctx
  4114  	return c
  4115  }
  4116  
  4117  // Header returns a http.Header that can be modified by the caller to add
  4118  // headers to the request.
  4119  func (c *MattersHoldsDeleteCall) Header() http.Header {
  4120  	if c.header_ == nil {
  4121  		c.header_ = make(http.Header)
  4122  	}
  4123  	return c.header_
  4124  }
  4125  
  4126  func (c *MattersHoldsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4127  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4128  	var body io.Reader = nil
  4129  	c.urlParams_.Set("alt", alt)
  4130  	c.urlParams_.Set("prettyPrint", "false")
  4131  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}")
  4132  	urls += "?" + c.urlParams_.Encode()
  4133  	req, err := http.NewRequest("DELETE", urls, body)
  4134  	if err != nil {
  4135  		return nil, err
  4136  	}
  4137  	req.Header = reqHeaders
  4138  	googleapi.Expand(req.URL, map[string]string{
  4139  		"matterId": c.matterId,
  4140  		"holdId":   c.holdId,
  4141  	})
  4142  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4143  }
  4144  
  4145  // Do executes the "vault.matters.holds.delete" call.
  4146  // Any non-2xx status code is an error. Response headers are in either
  4147  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4148  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4149  // whether the returned error was because http.StatusNotModified was returned.
  4150  func (c *MattersHoldsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4151  	gensupport.SetOptions(c.urlParams_, opts...)
  4152  	res, err := c.doRequest("json")
  4153  	if res != nil && res.StatusCode == http.StatusNotModified {
  4154  		if res.Body != nil {
  4155  			res.Body.Close()
  4156  		}
  4157  		return nil, gensupport.WrapError(&googleapi.Error{
  4158  			Code:   res.StatusCode,
  4159  			Header: res.Header,
  4160  		})
  4161  	}
  4162  	if err != nil {
  4163  		return nil, err
  4164  	}
  4165  	defer googleapi.CloseBody(res)
  4166  	if err := googleapi.CheckResponse(res); err != nil {
  4167  		return nil, gensupport.WrapError(err)
  4168  	}
  4169  	ret := &Empty{
  4170  		ServerResponse: googleapi.ServerResponse{
  4171  			Header:         res.Header,
  4172  			HTTPStatusCode: res.StatusCode,
  4173  		},
  4174  	}
  4175  	target := &ret
  4176  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4177  		return nil, err
  4178  	}
  4179  	return ret, nil
  4180  }
  4181  
  4182  type MattersHoldsGetCall struct {
  4183  	s            *Service
  4184  	matterId     string
  4185  	holdId       string
  4186  	urlParams_   gensupport.URLParams
  4187  	ifNoneMatch_ string
  4188  	ctx_         context.Context
  4189  	header_      http.Header
  4190  }
  4191  
  4192  // Get: Gets the specified hold.
  4193  //
  4194  // - holdId: The hold ID.
  4195  // - matterId: The matter ID.
  4196  func (r *MattersHoldsService) Get(matterId string, holdId string) *MattersHoldsGetCall {
  4197  	c := &MattersHoldsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4198  	c.matterId = matterId
  4199  	c.holdId = holdId
  4200  	return c
  4201  }
  4202  
  4203  // View sets the optional parameter "view": The amount of detail to return for
  4204  // a hold.
  4205  //
  4206  // Possible values:
  4207  //
  4208  //	"HOLD_VIEW_UNSPECIFIED" - Not specified. Defaults to **FULL_HOLD**.
  4209  //	"BASIC_HOLD" - Returns the hold ID, name, update time, service, and query.
  4210  //	"FULL_HOLD" - Returns all details of **BASIC_HOLD** and the entities the
  4211  //
  4212  // hold applies to, such as accounts or organizational unit.
  4213  func (c *MattersHoldsGetCall) View(view string) *MattersHoldsGetCall {
  4214  	c.urlParams_.Set("view", view)
  4215  	return c
  4216  }
  4217  
  4218  // Fields allows partial responses to be retrieved. See
  4219  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4220  // details.
  4221  func (c *MattersHoldsGetCall) Fields(s ...googleapi.Field) *MattersHoldsGetCall {
  4222  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4223  	return c
  4224  }
  4225  
  4226  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4227  // object's ETag matches the given value. This is useful for getting updates
  4228  // only after the object has changed since the last request.
  4229  func (c *MattersHoldsGetCall) IfNoneMatch(entityTag string) *MattersHoldsGetCall {
  4230  	c.ifNoneMatch_ = entityTag
  4231  	return c
  4232  }
  4233  
  4234  // Context sets the context to be used in this call's Do method.
  4235  func (c *MattersHoldsGetCall) Context(ctx context.Context) *MattersHoldsGetCall {
  4236  	c.ctx_ = ctx
  4237  	return c
  4238  }
  4239  
  4240  // Header returns a http.Header that can be modified by the caller to add
  4241  // headers to the request.
  4242  func (c *MattersHoldsGetCall) Header() http.Header {
  4243  	if c.header_ == nil {
  4244  		c.header_ = make(http.Header)
  4245  	}
  4246  	return c.header_
  4247  }
  4248  
  4249  func (c *MattersHoldsGetCall) doRequest(alt string) (*http.Response, error) {
  4250  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4251  	if c.ifNoneMatch_ != "" {
  4252  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4253  	}
  4254  	var body io.Reader = nil
  4255  	c.urlParams_.Set("alt", alt)
  4256  	c.urlParams_.Set("prettyPrint", "false")
  4257  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}")
  4258  	urls += "?" + c.urlParams_.Encode()
  4259  	req, err := http.NewRequest("GET", urls, body)
  4260  	if err != nil {
  4261  		return nil, err
  4262  	}
  4263  	req.Header = reqHeaders
  4264  	googleapi.Expand(req.URL, map[string]string{
  4265  		"matterId": c.matterId,
  4266  		"holdId":   c.holdId,
  4267  	})
  4268  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4269  }
  4270  
  4271  // Do executes the "vault.matters.holds.get" call.
  4272  // Any non-2xx status code is an error. Response headers are in either
  4273  // *Hold.ServerResponse.Header or (if a response was returned at all) in
  4274  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4275  // whether the returned error was because http.StatusNotModified was returned.
  4276  func (c *MattersHoldsGetCall) Do(opts ...googleapi.CallOption) (*Hold, error) {
  4277  	gensupport.SetOptions(c.urlParams_, opts...)
  4278  	res, err := c.doRequest("json")
  4279  	if res != nil && res.StatusCode == http.StatusNotModified {
  4280  		if res.Body != nil {
  4281  			res.Body.Close()
  4282  		}
  4283  		return nil, gensupport.WrapError(&googleapi.Error{
  4284  			Code:   res.StatusCode,
  4285  			Header: res.Header,
  4286  		})
  4287  	}
  4288  	if err != nil {
  4289  		return nil, err
  4290  	}
  4291  	defer googleapi.CloseBody(res)
  4292  	if err := googleapi.CheckResponse(res); err != nil {
  4293  		return nil, gensupport.WrapError(err)
  4294  	}
  4295  	ret := &Hold{
  4296  		ServerResponse: googleapi.ServerResponse{
  4297  			Header:         res.Header,
  4298  			HTTPStatusCode: res.StatusCode,
  4299  		},
  4300  	}
  4301  	target := &ret
  4302  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4303  		return nil, err
  4304  	}
  4305  	return ret, nil
  4306  }
  4307  
  4308  type MattersHoldsListCall struct {
  4309  	s            *Service
  4310  	matterId     string
  4311  	urlParams_   gensupport.URLParams
  4312  	ifNoneMatch_ string
  4313  	ctx_         context.Context
  4314  	header_      http.Header
  4315  }
  4316  
  4317  // List: Lists the holds in a matter.
  4318  //
  4319  // - matterId: The matter ID.
  4320  func (r *MattersHoldsService) List(matterId string) *MattersHoldsListCall {
  4321  	c := &MattersHoldsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4322  	c.matterId = matterId
  4323  	return c
  4324  }
  4325  
  4326  // PageSize sets the optional parameter "pageSize": The number of holds to
  4327  // return in the response, between 0 and 100 inclusive. Leaving this empty, or
  4328  // as 0, is the same as **page_size** = 100.
  4329  func (c *MattersHoldsListCall) PageSize(pageSize int64) *MattersHoldsListCall {
  4330  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4331  	return c
  4332  }
  4333  
  4334  // PageToken sets the optional parameter "pageToken": The pagination token as
  4335  // returned in the response. An empty token means start from the beginning.
  4336  func (c *MattersHoldsListCall) PageToken(pageToken string) *MattersHoldsListCall {
  4337  	c.urlParams_.Set("pageToken", pageToken)
  4338  	return c
  4339  }
  4340  
  4341  // View sets the optional parameter "view": The amount of detail to return for
  4342  // a hold.
  4343  //
  4344  // Possible values:
  4345  //
  4346  //	"HOLD_VIEW_UNSPECIFIED" - Not specified. Defaults to **FULL_HOLD**.
  4347  //	"BASIC_HOLD" - Returns the hold ID, name, update time, service, and query.
  4348  //	"FULL_HOLD" - Returns all details of **BASIC_HOLD** and the entities the
  4349  //
  4350  // hold applies to, such as accounts or organizational unit.
  4351  func (c *MattersHoldsListCall) View(view string) *MattersHoldsListCall {
  4352  	c.urlParams_.Set("view", view)
  4353  	return c
  4354  }
  4355  
  4356  // Fields allows partial responses to be retrieved. See
  4357  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4358  // details.
  4359  func (c *MattersHoldsListCall) Fields(s ...googleapi.Field) *MattersHoldsListCall {
  4360  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4361  	return c
  4362  }
  4363  
  4364  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4365  // object's ETag matches the given value. This is useful for getting updates
  4366  // only after the object has changed since the last request.
  4367  func (c *MattersHoldsListCall) IfNoneMatch(entityTag string) *MattersHoldsListCall {
  4368  	c.ifNoneMatch_ = entityTag
  4369  	return c
  4370  }
  4371  
  4372  // Context sets the context to be used in this call's Do method.
  4373  func (c *MattersHoldsListCall) Context(ctx context.Context) *MattersHoldsListCall {
  4374  	c.ctx_ = ctx
  4375  	return c
  4376  }
  4377  
  4378  // Header returns a http.Header that can be modified by the caller to add
  4379  // headers to the request.
  4380  func (c *MattersHoldsListCall) Header() http.Header {
  4381  	if c.header_ == nil {
  4382  		c.header_ = make(http.Header)
  4383  	}
  4384  	return c.header_
  4385  }
  4386  
  4387  func (c *MattersHoldsListCall) doRequest(alt string) (*http.Response, error) {
  4388  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4389  	if c.ifNoneMatch_ != "" {
  4390  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4391  	}
  4392  	var body io.Reader = nil
  4393  	c.urlParams_.Set("alt", alt)
  4394  	c.urlParams_.Set("prettyPrint", "false")
  4395  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds")
  4396  	urls += "?" + c.urlParams_.Encode()
  4397  	req, err := http.NewRequest("GET", urls, body)
  4398  	if err != nil {
  4399  		return nil, err
  4400  	}
  4401  	req.Header = reqHeaders
  4402  	googleapi.Expand(req.URL, map[string]string{
  4403  		"matterId": c.matterId,
  4404  	})
  4405  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4406  }
  4407  
  4408  // Do executes the "vault.matters.holds.list" call.
  4409  // Any non-2xx status code is an error. Response headers are in either
  4410  // *ListHoldsResponse.ServerResponse.Header or (if a response was returned at
  4411  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4412  // check whether the returned error was because http.StatusNotModified was
  4413  // returned.
  4414  func (c *MattersHoldsListCall) Do(opts ...googleapi.CallOption) (*ListHoldsResponse, error) {
  4415  	gensupport.SetOptions(c.urlParams_, opts...)
  4416  	res, err := c.doRequest("json")
  4417  	if res != nil && res.StatusCode == http.StatusNotModified {
  4418  		if res.Body != nil {
  4419  			res.Body.Close()
  4420  		}
  4421  		return nil, gensupport.WrapError(&googleapi.Error{
  4422  			Code:   res.StatusCode,
  4423  			Header: res.Header,
  4424  		})
  4425  	}
  4426  	if err != nil {
  4427  		return nil, err
  4428  	}
  4429  	defer googleapi.CloseBody(res)
  4430  	if err := googleapi.CheckResponse(res); err != nil {
  4431  		return nil, gensupport.WrapError(err)
  4432  	}
  4433  	ret := &ListHoldsResponse{
  4434  		ServerResponse: googleapi.ServerResponse{
  4435  			Header:         res.Header,
  4436  			HTTPStatusCode: res.StatusCode,
  4437  		},
  4438  	}
  4439  	target := &ret
  4440  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4441  		return nil, err
  4442  	}
  4443  	return ret, nil
  4444  }
  4445  
  4446  // Pages invokes f for each page of results.
  4447  // A non-nil error returned from f will halt the iteration.
  4448  // The provided context supersedes any context provided to the Context method.
  4449  func (c *MattersHoldsListCall) Pages(ctx context.Context, f func(*ListHoldsResponse) error) error {
  4450  	c.ctx_ = ctx
  4451  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4452  	for {
  4453  		x, err := c.Do()
  4454  		if err != nil {
  4455  			return err
  4456  		}
  4457  		if err := f(x); err != nil {
  4458  			return err
  4459  		}
  4460  		if x.NextPageToken == "" {
  4461  			return nil
  4462  		}
  4463  		c.PageToken(x.NextPageToken)
  4464  	}
  4465  }
  4466  
  4467  type MattersHoldsRemoveHeldAccountsCall struct {
  4468  	s                         *Service
  4469  	matterId                  string
  4470  	holdId                    string
  4471  	removeheldaccountsrequest *RemoveHeldAccountsRequest
  4472  	urlParams_                gensupport.URLParams
  4473  	ctx_                      context.Context
  4474  	header_                   http.Header
  4475  }
  4476  
  4477  // RemoveHeldAccounts: Removes the specified accounts from a hold. Returns a
  4478  // list of statuses in the same order as the request.
  4479  //
  4480  // - holdId: The hold ID.
  4481  // - matterId: The matter ID.
  4482  func (r *MattersHoldsService) RemoveHeldAccounts(matterId string, holdId string, removeheldaccountsrequest *RemoveHeldAccountsRequest) *MattersHoldsRemoveHeldAccountsCall {
  4483  	c := &MattersHoldsRemoveHeldAccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4484  	c.matterId = matterId
  4485  	c.holdId = holdId
  4486  	c.removeheldaccountsrequest = removeheldaccountsrequest
  4487  	return c
  4488  }
  4489  
  4490  // Fields allows partial responses to be retrieved. See
  4491  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4492  // details.
  4493  func (c *MattersHoldsRemoveHeldAccountsCall) Fields(s ...googleapi.Field) *MattersHoldsRemoveHeldAccountsCall {
  4494  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4495  	return c
  4496  }
  4497  
  4498  // Context sets the context to be used in this call's Do method.
  4499  func (c *MattersHoldsRemoveHeldAccountsCall) Context(ctx context.Context) *MattersHoldsRemoveHeldAccountsCall {
  4500  	c.ctx_ = ctx
  4501  	return c
  4502  }
  4503  
  4504  // Header returns a http.Header that can be modified by the caller to add
  4505  // headers to the request.
  4506  func (c *MattersHoldsRemoveHeldAccountsCall) Header() http.Header {
  4507  	if c.header_ == nil {
  4508  		c.header_ = make(http.Header)
  4509  	}
  4510  	return c.header_
  4511  }
  4512  
  4513  func (c *MattersHoldsRemoveHeldAccountsCall) doRequest(alt string) (*http.Response, error) {
  4514  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4515  	var body io.Reader = nil
  4516  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.removeheldaccountsrequest)
  4517  	if err != nil {
  4518  		return nil, err
  4519  	}
  4520  	c.urlParams_.Set("alt", alt)
  4521  	c.urlParams_.Set("prettyPrint", "false")
  4522  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}:removeHeldAccounts")
  4523  	urls += "?" + c.urlParams_.Encode()
  4524  	req, err := http.NewRequest("POST", urls, body)
  4525  	if err != nil {
  4526  		return nil, err
  4527  	}
  4528  	req.Header = reqHeaders
  4529  	googleapi.Expand(req.URL, map[string]string{
  4530  		"matterId": c.matterId,
  4531  		"holdId":   c.holdId,
  4532  	})
  4533  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4534  }
  4535  
  4536  // Do executes the "vault.matters.holds.removeHeldAccounts" call.
  4537  // Any non-2xx status code is an error. Response headers are in either
  4538  // *RemoveHeldAccountsResponse.ServerResponse.Header or (if a response was
  4539  // returned at all) in error.(*googleapi.Error).Header. Use
  4540  // googleapi.IsNotModified to check whether the returned error was because
  4541  // http.StatusNotModified was returned.
  4542  func (c *MattersHoldsRemoveHeldAccountsCall) Do(opts ...googleapi.CallOption) (*RemoveHeldAccountsResponse, error) {
  4543  	gensupport.SetOptions(c.urlParams_, opts...)
  4544  	res, err := c.doRequest("json")
  4545  	if res != nil && res.StatusCode == http.StatusNotModified {
  4546  		if res.Body != nil {
  4547  			res.Body.Close()
  4548  		}
  4549  		return nil, gensupport.WrapError(&googleapi.Error{
  4550  			Code:   res.StatusCode,
  4551  			Header: res.Header,
  4552  		})
  4553  	}
  4554  	if err != nil {
  4555  		return nil, err
  4556  	}
  4557  	defer googleapi.CloseBody(res)
  4558  	if err := googleapi.CheckResponse(res); err != nil {
  4559  		return nil, gensupport.WrapError(err)
  4560  	}
  4561  	ret := &RemoveHeldAccountsResponse{
  4562  		ServerResponse: googleapi.ServerResponse{
  4563  			Header:         res.Header,
  4564  			HTTPStatusCode: res.StatusCode,
  4565  		},
  4566  	}
  4567  	target := &ret
  4568  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4569  		return nil, err
  4570  	}
  4571  	return ret, nil
  4572  }
  4573  
  4574  type MattersHoldsUpdateCall struct {
  4575  	s          *Service
  4576  	matterId   string
  4577  	holdId     string
  4578  	hold       *Hold
  4579  	urlParams_ gensupport.URLParams
  4580  	ctx_       context.Context
  4581  	header_    http.Header
  4582  }
  4583  
  4584  // Update: Updates the scope (organizational unit or accounts) and query
  4585  // parameters of a hold. You cannot add accounts to a hold that covers an
  4586  // organizational unit, nor can you add organizational units to a hold that
  4587  // covers individual accounts. If you try, the unsupported values are ignored.
  4588  //
  4589  // - holdId: The ID of the hold.
  4590  // - matterId: The matter ID.
  4591  func (r *MattersHoldsService) Update(matterId string, holdId string, hold *Hold) *MattersHoldsUpdateCall {
  4592  	c := &MattersHoldsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4593  	c.matterId = matterId
  4594  	c.holdId = holdId
  4595  	c.hold = hold
  4596  	return c
  4597  }
  4598  
  4599  // Fields allows partial responses to be retrieved. See
  4600  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4601  // details.
  4602  func (c *MattersHoldsUpdateCall) Fields(s ...googleapi.Field) *MattersHoldsUpdateCall {
  4603  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4604  	return c
  4605  }
  4606  
  4607  // Context sets the context to be used in this call's Do method.
  4608  func (c *MattersHoldsUpdateCall) Context(ctx context.Context) *MattersHoldsUpdateCall {
  4609  	c.ctx_ = ctx
  4610  	return c
  4611  }
  4612  
  4613  // Header returns a http.Header that can be modified by the caller to add
  4614  // headers to the request.
  4615  func (c *MattersHoldsUpdateCall) Header() http.Header {
  4616  	if c.header_ == nil {
  4617  		c.header_ = make(http.Header)
  4618  	}
  4619  	return c.header_
  4620  }
  4621  
  4622  func (c *MattersHoldsUpdateCall) doRequest(alt string) (*http.Response, error) {
  4623  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4624  	var body io.Reader = nil
  4625  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.hold)
  4626  	if err != nil {
  4627  		return nil, err
  4628  	}
  4629  	c.urlParams_.Set("alt", alt)
  4630  	c.urlParams_.Set("prettyPrint", "false")
  4631  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}")
  4632  	urls += "?" + c.urlParams_.Encode()
  4633  	req, err := http.NewRequest("PUT", urls, body)
  4634  	if err != nil {
  4635  		return nil, err
  4636  	}
  4637  	req.Header = reqHeaders
  4638  	googleapi.Expand(req.URL, map[string]string{
  4639  		"matterId": c.matterId,
  4640  		"holdId":   c.holdId,
  4641  	})
  4642  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4643  }
  4644  
  4645  // Do executes the "vault.matters.holds.update" call.
  4646  // Any non-2xx status code is an error. Response headers are in either
  4647  // *Hold.ServerResponse.Header or (if a response was returned at all) in
  4648  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4649  // whether the returned error was because http.StatusNotModified was returned.
  4650  func (c *MattersHoldsUpdateCall) Do(opts ...googleapi.CallOption) (*Hold, error) {
  4651  	gensupport.SetOptions(c.urlParams_, opts...)
  4652  	res, err := c.doRequest("json")
  4653  	if res != nil && res.StatusCode == http.StatusNotModified {
  4654  		if res.Body != nil {
  4655  			res.Body.Close()
  4656  		}
  4657  		return nil, gensupport.WrapError(&googleapi.Error{
  4658  			Code:   res.StatusCode,
  4659  			Header: res.Header,
  4660  		})
  4661  	}
  4662  	if err != nil {
  4663  		return nil, err
  4664  	}
  4665  	defer googleapi.CloseBody(res)
  4666  	if err := googleapi.CheckResponse(res); err != nil {
  4667  		return nil, gensupport.WrapError(err)
  4668  	}
  4669  	ret := &Hold{
  4670  		ServerResponse: googleapi.ServerResponse{
  4671  			Header:         res.Header,
  4672  			HTTPStatusCode: res.StatusCode,
  4673  		},
  4674  	}
  4675  	target := &ret
  4676  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4677  		return nil, err
  4678  	}
  4679  	return ret, nil
  4680  }
  4681  
  4682  type MattersHoldsAccountsCreateCall struct {
  4683  	s           *Service
  4684  	matterId    string
  4685  	holdId      string
  4686  	heldaccount *HeldAccount
  4687  	urlParams_  gensupport.URLParams
  4688  	ctx_        context.Context
  4689  	header_     http.Header
  4690  }
  4691  
  4692  // Create: Adds an account to a hold. Accounts can be added only to a hold that
  4693  // does not have an organizational unit set. If you try to add an account to an
  4694  // organizational unit-based hold, an error is returned.
  4695  //
  4696  // - holdId: The hold ID.
  4697  // - matterId: The matter ID.
  4698  func (r *MattersHoldsAccountsService) Create(matterId string, holdId string, heldaccount *HeldAccount) *MattersHoldsAccountsCreateCall {
  4699  	c := &MattersHoldsAccountsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4700  	c.matterId = matterId
  4701  	c.holdId = holdId
  4702  	c.heldaccount = heldaccount
  4703  	return c
  4704  }
  4705  
  4706  // Fields allows partial responses to be retrieved. See
  4707  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4708  // details.
  4709  func (c *MattersHoldsAccountsCreateCall) Fields(s ...googleapi.Field) *MattersHoldsAccountsCreateCall {
  4710  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4711  	return c
  4712  }
  4713  
  4714  // Context sets the context to be used in this call's Do method.
  4715  func (c *MattersHoldsAccountsCreateCall) Context(ctx context.Context) *MattersHoldsAccountsCreateCall {
  4716  	c.ctx_ = ctx
  4717  	return c
  4718  }
  4719  
  4720  // Header returns a http.Header that can be modified by the caller to add
  4721  // headers to the request.
  4722  func (c *MattersHoldsAccountsCreateCall) Header() http.Header {
  4723  	if c.header_ == nil {
  4724  		c.header_ = make(http.Header)
  4725  	}
  4726  	return c.header_
  4727  }
  4728  
  4729  func (c *MattersHoldsAccountsCreateCall) doRequest(alt string) (*http.Response, error) {
  4730  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4731  	var body io.Reader = nil
  4732  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.heldaccount)
  4733  	if err != nil {
  4734  		return nil, err
  4735  	}
  4736  	c.urlParams_.Set("alt", alt)
  4737  	c.urlParams_.Set("prettyPrint", "false")
  4738  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}/accounts")
  4739  	urls += "?" + c.urlParams_.Encode()
  4740  	req, err := http.NewRequest("POST", urls, body)
  4741  	if err != nil {
  4742  		return nil, err
  4743  	}
  4744  	req.Header = reqHeaders
  4745  	googleapi.Expand(req.URL, map[string]string{
  4746  		"matterId": c.matterId,
  4747  		"holdId":   c.holdId,
  4748  	})
  4749  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4750  }
  4751  
  4752  // Do executes the "vault.matters.holds.accounts.create" call.
  4753  // Any non-2xx status code is an error. Response headers are in either
  4754  // *HeldAccount.ServerResponse.Header or (if a response was returned at all) in
  4755  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4756  // whether the returned error was because http.StatusNotModified was returned.
  4757  func (c *MattersHoldsAccountsCreateCall) Do(opts ...googleapi.CallOption) (*HeldAccount, error) {
  4758  	gensupport.SetOptions(c.urlParams_, opts...)
  4759  	res, err := c.doRequest("json")
  4760  	if res != nil && res.StatusCode == http.StatusNotModified {
  4761  		if res.Body != nil {
  4762  			res.Body.Close()
  4763  		}
  4764  		return nil, gensupport.WrapError(&googleapi.Error{
  4765  			Code:   res.StatusCode,
  4766  			Header: res.Header,
  4767  		})
  4768  	}
  4769  	if err != nil {
  4770  		return nil, err
  4771  	}
  4772  	defer googleapi.CloseBody(res)
  4773  	if err := googleapi.CheckResponse(res); err != nil {
  4774  		return nil, gensupport.WrapError(err)
  4775  	}
  4776  	ret := &HeldAccount{
  4777  		ServerResponse: googleapi.ServerResponse{
  4778  			Header:         res.Header,
  4779  			HTTPStatusCode: res.StatusCode,
  4780  		},
  4781  	}
  4782  	target := &ret
  4783  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4784  		return nil, err
  4785  	}
  4786  	return ret, nil
  4787  }
  4788  
  4789  type MattersHoldsAccountsDeleteCall struct {
  4790  	s          *Service
  4791  	matterId   string
  4792  	holdId     string
  4793  	accountId  string
  4794  	urlParams_ gensupport.URLParams
  4795  	ctx_       context.Context
  4796  	header_    http.Header
  4797  }
  4798  
  4799  // Delete: Removes an account from a hold.
  4800  //
  4801  // - accountId: The ID of the account to remove from the hold.
  4802  // - holdId: The hold ID.
  4803  // - matterId: The matter ID.
  4804  func (r *MattersHoldsAccountsService) Delete(matterId string, holdId string, accountId string) *MattersHoldsAccountsDeleteCall {
  4805  	c := &MattersHoldsAccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4806  	c.matterId = matterId
  4807  	c.holdId = holdId
  4808  	c.accountId = accountId
  4809  	return c
  4810  }
  4811  
  4812  // Fields allows partial responses to be retrieved. See
  4813  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4814  // details.
  4815  func (c *MattersHoldsAccountsDeleteCall) Fields(s ...googleapi.Field) *MattersHoldsAccountsDeleteCall {
  4816  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4817  	return c
  4818  }
  4819  
  4820  // Context sets the context to be used in this call's Do method.
  4821  func (c *MattersHoldsAccountsDeleteCall) Context(ctx context.Context) *MattersHoldsAccountsDeleteCall {
  4822  	c.ctx_ = ctx
  4823  	return c
  4824  }
  4825  
  4826  // Header returns a http.Header that can be modified by the caller to add
  4827  // headers to the request.
  4828  func (c *MattersHoldsAccountsDeleteCall) Header() http.Header {
  4829  	if c.header_ == nil {
  4830  		c.header_ = make(http.Header)
  4831  	}
  4832  	return c.header_
  4833  }
  4834  
  4835  func (c *MattersHoldsAccountsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4836  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4837  	var body io.Reader = nil
  4838  	c.urlParams_.Set("alt", alt)
  4839  	c.urlParams_.Set("prettyPrint", "false")
  4840  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}")
  4841  	urls += "?" + c.urlParams_.Encode()
  4842  	req, err := http.NewRequest("DELETE", urls, body)
  4843  	if err != nil {
  4844  		return nil, err
  4845  	}
  4846  	req.Header = reqHeaders
  4847  	googleapi.Expand(req.URL, map[string]string{
  4848  		"matterId":  c.matterId,
  4849  		"holdId":    c.holdId,
  4850  		"accountId": c.accountId,
  4851  	})
  4852  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4853  }
  4854  
  4855  // Do executes the "vault.matters.holds.accounts.delete" call.
  4856  // Any non-2xx status code is an error. Response headers are in either
  4857  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4858  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4859  // whether the returned error was because http.StatusNotModified was returned.
  4860  func (c *MattersHoldsAccountsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4861  	gensupport.SetOptions(c.urlParams_, opts...)
  4862  	res, err := c.doRequest("json")
  4863  	if res != nil && res.StatusCode == http.StatusNotModified {
  4864  		if res.Body != nil {
  4865  			res.Body.Close()
  4866  		}
  4867  		return nil, gensupport.WrapError(&googleapi.Error{
  4868  			Code:   res.StatusCode,
  4869  			Header: res.Header,
  4870  		})
  4871  	}
  4872  	if err != nil {
  4873  		return nil, err
  4874  	}
  4875  	defer googleapi.CloseBody(res)
  4876  	if err := googleapi.CheckResponse(res); err != nil {
  4877  		return nil, gensupport.WrapError(err)
  4878  	}
  4879  	ret := &Empty{
  4880  		ServerResponse: googleapi.ServerResponse{
  4881  			Header:         res.Header,
  4882  			HTTPStatusCode: res.StatusCode,
  4883  		},
  4884  	}
  4885  	target := &ret
  4886  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4887  		return nil, err
  4888  	}
  4889  	return ret, nil
  4890  }
  4891  
  4892  type MattersHoldsAccountsListCall struct {
  4893  	s            *Service
  4894  	matterId     string
  4895  	holdId       string
  4896  	urlParams_   gensupport.URLParams
  4897  	ifNoneMatch_ string
  4898  	ctx_         context.Context
  4899  	header_      http.Header
  4900  }
  4901  
  4902  // List: Lists the accounts covered by a hold. This can list only
  4903  // individually-specified accounts covered by the hold. If the hold covers an
  4904  // organizational unit, use the Admin SDK
  4905  // (https://developers.google.com/admin-sdk/). to list the members of the
  4906  // organizational unit on hold.
  4907  //
  4908  // - holdId: The hold ID.
  4909  // - matterId: The matter ID.
  4910  func (r *MattersHoldsAccountsService) List(matterId string, holdId string) *MattersHoldsAccountsListCall {
  4911  	c := &MattersHoldsAccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4912  	c.matterId = matterId
  4913  	c.holdId = holdId
  4914  	return c
  4915  }
  4916  
  4917  // Fields allows partial responses to be retrieved. See
  4918  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4919  // details.
  4920  func (c *MattersHoldsAccountsListCall) Fields(s ...googleapi.Field) *MattersHoldsAccountsListCall {
  4921  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4922  	return c
  4923  }
  4924  
  4925  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4926  // object's ETag matches the given value. This is useful for getting updates
  4927  // only after the object has changed since the last request.
  4928  func (c *MattersHoldsAccountsListCall) IfNoneMatch(entityTag string) *MattersHoldsAccountsListCall {
  4929  	c.ifNoneMatch_ = entityTag
  4930  	return c
  4931  }
  4932  
  4933  // Context sets the context to be used in this call's Do method.
  4934  func (c *MattersHoldsAccountsListCall) Context(ctx context.Context) *MattersHoldsAccountsListCall {
  4935  	c.ctx_ = ctx
  4936  	return c
  4937  }
  4938  
  4939  // Header returns a http.Header that can be modified by the caller to add
  4940  // headers to the request.
  4941  func (c *MattersHoldsAccountsListCall) Header() http.Header {
  4942  	if c.header_ == nil {
  4943  		c.header_ = make(http.Header)
  4944  	}
  4945  	return c.header_
  4946  }
  4947  
  4948  func (c *MattersHoldsAccountsListCall) doRequest(alt string) (*http.Response, error) {
  4949  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4950  	if c.ifNoneMatch_ != "" {
  4951  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4952  	}
  4953  	var body io.Reader = nil
  4954  	c.urlParams_.Set("alt", alt)
  4955  	c.urlParams_.Set("prettyPrint", "false")
  4956  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/holds/{holdId}/accounts")
  4957  	urls += "?" + c.urlParams_.Encode()
  4958  	req, err := http.NewRequest("GET", urls, body)
  4959  	if err != nil {
  4960  		return nil, err
  4961  	}
  4962  	req.Header = reqHeaders
  4963  	googleapi.Expand(req.URL, map[string]string{
  4964  		"matterId": c.matterId,
  4965  		"holdId":   c.holdId,
  4966  	})
  4967  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4968  }
  4969  
  4970  // Do executes the "vault.matters.holds.accounts.list" call.
  4971  // Any non-2xx status code is an error. Response headers are in either
  4972  // *ListHeldAccountsResponse.ServerResponse.Header or (if a response was
  4973  // returned at all) in error.(*googleapi.Error).Header. Use
  4974  // googleapi.IsNotModified to check whether the returned error was because
  4975  // http.StatusNotModified was returned.
  4976  func (c *MattersHoldsAccountsListCall) Do(opts ...googleapi.CallOption) (*ListHeldAccountsResponse, error) {
  4977  	gensupport.SetOptions(c.urlParams_, opts...)
  4978  	res, err := c.doRequest("json")
  4979  	if res != nil && res.StatusCode == http.StatusNotModified {
  4980  		if res.Body != nil {
  4981  			res.Body.Close()
  4982  		}
  4983  		return nil, gensupport.WrapError(&googleapi.Error{
  4984  			Code:   res.StatusCode,
  4985  			Header: res.Header,
  4986  		})
  4987  	}
  4988  	if err != nil {
  4989  		return nil, err
  4990  	}
  4991  	defer googleapi.CloseBody(res)
  4992  	if err := googleapi.CheckResponse(res); err != nil {
  4993  		return nil, gensupport.WrapError(err)
  4994  	}
  4995  	ret := &ListHeldAccountsResponse{
  4996  		ServerResponse: googleapi.ServerResponse{
  4997  			Header:         res.Header,
  4998  			HTTPStatusCode: res.StatusCode,
  4999  		},
  5000  	}
  5001  	target := &ret
  5002  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5003  		return nil, err
  5004  	}
  5005  	return ret, nil
  5006  }
  5007  
  5008  type MattersSavedQueriesCreateCall struct {
  5009  	s          *Service
  5010  	matterId   string
  5011  	savedquery *SavedQuery
  5012  	urlParams_ gensupport.URLParams
  5013  	ctx_       context.Context
  5014  	header_    http.Header
  5015  }
  5016  
  5017  // Create: Creates a saved query.
  5018  //
  5019  // - matterId: The ID of the matter to create the saved query in.
  5020  func (r *MattersSavedQueriesService) Create(matterId string, savedquery *SavedQuery) *MattersSavedQueriesCreateCall {
  5021  	c := &MattersSavedQueriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5022  	c.matterId = matterId
  5023  	c.savedquery = savedquery
  5024  	return c
  5025  }
  5026  
  5027  // Fields allows partial responses to be retrieved. See
  5028  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5029  // details.
  5030  func (c *MattersSavedQueriesCreateCall) Fields(s ...googleapi.Field) *MattersSavedQueriesCreateCall {
  5031  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5032  	return c
  5033  }
  5034  
  5035  // Context sets the context to be used in this call's Do method.
  5036  func (c *MattersSavedQueriesCreateCall) Context(ctx context.Context) *MattersSavedQueriesCreateCall {
  5037  	c.ctx_ = ctx
  5038  	return c
  5039  }
  5040  
  5041  // Header returns a http.Header that can be modified by the caller to add
  5042  // headers to the request.
  5043  func (c *MattersSavedQueriesCreateCall) Header() http.Header {
  5044  	if c.header_ == nil {
  5045  		c.header_ = make(http.Header)
  5046  	}
  5047  	return c.header_
  5048  }
  5049  
  5050  func (c *MattersSavedQueriesCreateCall) doRequest(alt string) (*http.Response, error) {
  5051  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5052  	var body io.Reader = nil
  5053  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.savedquery)
  5054  	if err != nil {
  5055  		return nil, err
  5056  	}
  5057  	c.urlParams_.Set("alt", alt)
  5058  	c.urlParams_.Set("prettyPrint", "false")
  5059  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/savedQueries")
  5060  	urls += "?" + c.urlParams_.Encode()
  5061  	req, err := http.NewRequest("POST", urls, body)
  5062  	if err != nil {
  5063  		return nil, err
  5064  	}
  5065  	req.Header = reqHeaders
  5066  	googleapi.Expand(req.URL, map[string]string{
  5067  		"matterId": c.matterId,
  5068  	})
  5069  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5070  }
  5071  
  5072  // Do executes the "vault.matters.savedQueries.create" call.
  5073  // Any non-2xx status code is an error. Response headers are in either
  5074  // *SavedQuery.ServerResponse.Header or (if a response was returned at all) in
  5075  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5076  // whether the returned error was because http.StatusNotModified was returned.
  5077  func (c *MattersSavedQueriesCreateCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) {
  5078  	gensupport.SetOptions(c.urlParams_, opts...)
  5079  	res, err := c.doRequest("json")
  5080  	if res != nil && res.StatusCode == http.StatusNotModified {
  5081  		if res.Body != nil {
  5082  			res.Body.Close()
  5083  		}
  5084  		return nil, gensupport.WrapError(&googleapi.Error{
  5085  			Code:   res.StatusCode,
  5086  			Header: res.Header,
  5087  		})
  5088  	}
  5089  	if err != nil {
  5090  		return nil, err
  5091  	}
  5092  	defer googleapi.CloseBody(res)
  5093  	if err := googleapi.CheckResponse(res); err != nil {
  5094  		return nil, gensupport.WrapError(err)
  5095  	}
  5096  	ret := &SavedQuery{
  5097  		ServerResponse: googleapi.ServerResponse{
  5098  			Header:         res.Header,
  5099  			HTTPStatusCode: res.StatusCode,
  5100  		},
  5101  	}
  5102  	target := &ret
  5103  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5104  		return nil, err
  5105  	}
  5106  	return ret, nil
  5107  }
  5108  
  5109  type MattersSavedQueriesDeleteCall struct {
  5110  	s            *Service
  5111  	matterId     string
  5112  	savedQueryId string
  5113  	urlParams_   gensupport.URLParams
  5114  	ctx_         context.Context
  5115  	header_      http.Header
  5116  }
  5117  
  5118  // Delete: Deletes the specified saved query.
  5119  //
  5120  // - matterId: The ID of the matter to delete the saved query from.
  5121  // - savedQueryId: ID of the saved query to delete.
  5122  func (r *MattersSavedQueriesService) Delete(matterId string, savedQueryId string) *MattersSavedQueriesDeleteCall {
  5123  	c := &MattersSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5124  	c.matterId = matterId
  5125  	c.savedQueryId = savedQueryId
  5126  	return c
  5127  }
  5128  
  5129  // Fields allows partial responses to be retrieved. See
  5130  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5131  // details.
  5132  func (c *MattersSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *MattersSavedQueriesDeleteCall {
  5133  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5134  	return c
  5135  }
  5136  
  5137  // Context sets the context to be used in this call's Do method.
  5138  func (c *MattersSavedQueriesDeleteCall) Context(ctx context.Context) *MattersSavedQueriesDeleteCall {
  5139  	c.ctx_ = ctx
  5140  	return c
  5141  }
  5142  
  5143  // Header returns a http.Header that can be modified by the caller to add
  5144  // headers to the request.
  5145  func (c *MattersSavedQueriesDeleteCall) Header() http.Header {
  5146  	if c.header_ == nil {
  5147  		c.header_ = make(http.Header)
  5148  	}
  5149  	return c.header_
  5150  }
  5151  
  5152  func (c *MattersSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5153  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5154  	var body io.Reader = nil
  5155  	c.urlParams_.Set("alt", alt)
  5156  	c.urlParams_.Set("prettyPrint", "false")
  5157  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/savedQueries/{savedQueryId}")
  5158  	urls += "?" + c.urlParams_.Encode()
  5159  	req, err := http.NewRequest("DELETE", urls, body)
  5160  	if err != nil {
  5161  		return nil, err
  5162  	}
  5163  	req.Header = reqHeaders
  5164  	googleapi.Expand(req.URL, map[string]string{
  5165  		"matterId":     c.matterId,
  5166  		"savedQueryId": c.savedQueryId,
  5167  	})
  5168  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5169  }
  5170  
  5171  // Do executes the "vault.matters.savedQueries.delete" call.
  5172  // Any non-2xx status code is an error. Response headers are in either
  5173  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5174  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5175  // whether the returned error was because http.StatusNotModified was returned.
  5176  func (c *MattersSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5177  	gensupport.SetOptions(c.urlParams_, opts...)
  5178  	res, err := c.doRequest("json")
  5179  	if res != nil && res.StatusCode == http.StatusNotModified {
  5180  		if res.Body != nil {
  5181  			res.Body.Close()
  5182  		}
  5183  		return nil, gensupport.WrapError(&googleapi.Error{
  5184  			Code:   res.StatusCode,
  5185  			Header: res.Header,
  5186  		})
  5187  	}
  5188  	if err != nil {
  5189  		return nil, err
  5190  	}
  5191  	defer googleapi.CloseBody(res)
  5192  	if err := googleapi.CheckResponse(res); err != nil {
  5193  		return nil, gensupport.WrapError(err)
  5194  	}
  5195  	ret := &Empty{
  5196  		ServerResponse: googleapi.ServerResponse{
  5197  			Header:         res.Header,
  5198  			HTTPStatusCode: res.StatusCode,
  5199  		},
  5200  	}
  5201  	target := &ret
  5202  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5203  		return nil, err
  5204  	}
  5205  	return ret, nil
  5206  }
  5207  
  5208  type MattersSavedQueriesGetCall struct {
  5209  	s            *Service
  5210  	matterId     string
  5211  	savedQueryId string
  5212  	urlParams_   gensupport.URLParams
  5213  	ifNoneMatch_ string
  5214  	ctx_         context.Context
  5215  	header_      http.Header
  5216  }
  5217  
  5218  // Get: Retrieves the specified saved query.
  5219  //
  5220  // - matterId: The ID of the matter to get the saved query from.
  5221  // - savedQueryId: ID of the saved query to retrieve.
  5222  func (r *MattersSavedQueriesService) Get(matterId string, savedQueryId string) *MattersSavedQueriesGetCall {
  5223  	c := &MattersSavedQueriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5224  	c.matterId = matterId
  5225  	c.savedQueryId = savedQueryId
  5226  	return c
  5227  }
  5228  
  5229  // Fields allows partial responses to be retrieved. See
  5230  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5231  // details.
  5232  func (c *MattersSavedQueriesGetCall) Fields(s ...googleapi.Field) *MattersSavedQueriesGetCall {
  5233  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5234  	return c
  5235  }
  5236  
  5237  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5238  // object's ETag matches the given value. This is useful for getting updates
  5239  // only after the object has changed since the last request.
  5240  func (c *MattersSavedQueriesGetCall) IfNoneMatch(entityTag string) *MattersSavedQueriesGetCall {
  5241  	c.ifNoneMatch_ = entityTag
  5242  	return c
  5243  }
  5244  
  5245  // Context sets the context to be used in this call's Do method.
  5246  func (c *MattersSavedQueriesGetCall) Context(ctx context.Context) *MattersSavedQueriesGetCall {
  5247  	c.ctx_ = ctx
  5248  	return c
  5249  }
  5250  
  5251  // Header returns a http.Header that can be modified by the caller to add
  5252  // headers to the request.
  5253  func (c *MattersSavedQueriesGetCall) Header() http.Header {
  5254  	if c.header_ == nil {
  5255  		c.header_ = make(http.Header)
  5256  	}
  5257  	return c.header_
  5258  }
  5259  
  5260  func (c *MattersSavedQueriesGetCall) doRequest(alt string) (*http.Response, error) {
  5261  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5262  	if c.ifNoneMatch_ != "" {
  5263  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5264  	}
  5265  	var body io.Reader = nil
  5266  	c.urlParams_.Set("alt", alt)
  5267  	c.urlParams_.Set("prettyPrint", "false")
  5268  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/savedQueries/{savedQueryId}")
  5269  	urls += "?" + c.urlParams_.Encode()
  5270  	req, err := http.NewRequest("GET", urls, body)
  5271  	if err != nil {
  5272  		return nil, err
  5273  	}
  5274  	req.Header = reqHeaders
  5275  	googleapi.Expand(req.URL, map[string]string{
  5276  		"matterId":     c.matterId,
  5277  		"savedQueryId": c.savedQueryId,
  5278  	})
  5279  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5280  }
  5281  
  5282  // Do executes the "vault.matters.savedQueries.get" call.
  5283  // Any non-2xx status code is an error. Response headers are in either
  5284  // *SavedQuery.ServerResponse.Header or (if a response was returned at all) in
  5285  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5286  // whether the returned error was because http.StatusNotModified was returned.
  5287  func (c *MattersSavedQueriesGetCall) Do(opts ...googleapi.CallOption) (*SavedQuery, error) {
  5288  	gensupport.SetOptions(c.urlParams_, opts...)
  5289  	res, err := c.doRequest("json")
  5290  	if res != nil && res.StatusCode == http.StatusNotModified {
  5291  		if res.Body != nil {
  5292  			res.Body.Close()
  5293  		}
  5294  		return nil, gensupport.WrapError(&googleapi.Error{
  5295  			Code:   res.StatusCode,
  5296  			Header: res.Header,
  5297  		})
  5298  	}
  5299  	if err != nil {
  5300  		return nil, err
  5301  	}
  5302  	defer googleapi.CloseBody(res)
  5303  	if err := googleapi.CheckResponse(res); err != nil {
  5304  		return nil, gensupport.WrapError(err)
  5305  	}
  5306  	ret := &SavedQuery{
  5307  		ServerResponse: googleapi.ServerResponse{
  5308  			Header:         res.Header,
  5309  			HTTPStatusCode: res.StatusCode,
  5310  		},
  5311  	}
  5312  	target := &ret
  5313  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5314  		return nil, err
  5315  	}
  5316  	return ret, nil
  5317  }
  5318  
  5319  type MattersSavedQueriesListCall struct {
  5320  	s            *Service
  5321  	matterId     string
  5322  	urlParams_   gensupport.URLParams
  5323  	ifNoneMatch_ string
  5324  	ctx_         context.Context
  5325  	header_      http.Header
  5326  }
  5327  
  5328  // List: Lists the saved queries in a matter.
  5329  //
  5330  // - matterId: The ID of the matter to get the saved queries for.
  5331  func (r *MattersSavedQueriesService) List(matterId string) *MattersSavedQueriesListCall {
  5332  	c := &MattersSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5333  	c.matterId = matterId
  5334  	return c
  5335  }
  5336  
  5337  // PageSize sets the optional parameter "pageSize": The maximum number of saved
  5338  // queries to return.
  5339  func (c *MattersSavedQueriesListCall) PageSize(pageSize int64) *MattersSavedQueriesListCall {
  5340  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5341  	return c
  5342  }
  5343  
  5344  // PageToken sets the optional parameter "pageToken": The pagination token as
  5345  // returned in the previous response. An empty token means start from the
  5346  // beginning.
  5347  func (c *MattersSavedQueriesListCall) PageToken(pageToken string) *MattersSavedQueriesListCall {
  5348  	c.urlParams_.Set("pageToken", pageToken)
  5349  	return c
  5350  }
  5351  
  5352  // Fields allows partial responses to be retrieved. See
  5353  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5354  // details.
  5355  func (c *MattersSavedQueriesListCall) Fields(s ...googleapi.Field) *MattersSavedQueriesListCall {
  5356  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5357  	return c
  5358  }
  5359  
  5360  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5361  // object's ETag matches the given value. This is useful for getting updates
  5362  // only after the object has changed since the last request.
  5363  func (c *MattersSavedQueriesListCall) IfNoneMatch(entityTag string) *MattersSavedQueriesListCall {
  5364  	c.ifNoneMatch_ = entityTag
  5365  	return c
  5366  }
  5367  
  5368  // Context sets the context to be used in this call's Do method.
  5369  func (c *MattersSavedQueriesListCall) Context(ctx context.Context) *MattersSavedQueriesListCall {
  5370  	c.ctx_ = ctx
  5371  	return c
  5372  }
  5373  
  5374  // Header returns a http.Header that can be modified by the caller to add
  5375  // headers to the request.
  5376  func (c *MattersSavedQueriesListCall) Header() http.Header {
  5377  	if c.header_ == nil {
  5378  		c.header_ = make(http.Header)
  5379  	}
  5380  	return c.header_
  5381  }
  5382  
  5383  func (c *MattersSavedQueriesListCall) doRequest(alt string) (*http.Response, error) {
  5384  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5385  	if c.ifNoneMatch_ != "" {
  5386  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5387  	}
  5388  	var body io.Reader = nil
  5389  	c.urlParams_.Set("alt", alt)
  5390  	c.urlParams_.Set("prettyPrint", "false")
  5391  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/matters/{matterId}/savedQueries")
  5392  	urls += "?" + c.urlParams_.Encode()
  5393  	req, err := http.NewRequest("GET", urls, body)
  5394  	if err != nil {
  5395  		return nil, err
  5396  	}
  5397  	req.Header = reqHeaders
  5398  	googleapi.Expand(req.URL, map[string]string{
  5399  		"matterId": c.matterId,
  5400  	})
  5401  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5402  }
  5403  
  5404  // Do executes the "vault.matters.savedQueries.list" call.
  5405  // Any non-2xx status code is an error. Response headers are in either
  5406  // *ListSavedQueriesResponse.ServerResponse.Header or (if a response was
  5407  // returned at all) in error.(*googleapi.Error).Header. Use
  5408  // googleapi.IsNotModified to check whether the returned error was because
  5409  // http.StatusNotModified was returned.
  5410  func (c *MattersSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*ListSavedQueriesResponse, error) {
  5411  	gensupport.SetOptions(c.urlParams_, opts...)
  5412  	res, err := c.doRequest("json")
  5413  	if res != nil && res.StatusCode == http.StatusNotModified {
  5414  		if res.Body != nil {
  5415  			res.Body.Close()
  5416  		}
  5417  		return nil, gensupport.WrapError(&googleapi.Error{
  5418  			Code:   res.StatusCode,
  5419  			Header: res.Header,
  5420  		})
  5421  	}
  5422  	if err != nil {
  5423  		return nil, err
  5424  	}
  5425  	defer googleapi.CloseBody(res)
  5426  	if err := googleapi.CheckResponse(res); err != nil {
  5427  		return nil, gensupport.WrapError(err)
  5428  	}
  5429  	ret := &ListSavedQueriesResponse{
  5430  		ServerResponse: googleapi.ServerResponse{
  5431  			Header:         res.Header,
  5432  			HTTPStatusCode: res.StatusCode,
  5433  		},
  5434  	}
  5435  	target := &ret
  5436  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5437  		return nil, err
  5438  	}
  5439  	return ret, nil
  5440  }
  5441  
  5442  // Pages invokes f for each page of results.
  5443  // A non-nil error returned from f will halt the iteration.
  5444  // The provided context supersedes any context provided to the Context method.
  5445  func (c *MattersSavedQueriesListCall) Pages(ctx context.Context, f func(*ListSavedQueriesResponse) error) error {
  5446  	c.ctx_ = ctx
  5447  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5448  	for {
  5449  		x, err := c.Do()
  5450  		if err != nil {
  5451  			return err
  5452  		}
  5453  		if err := f(x); err != nil {
  5454  			return err
  5455  		}
  5456  		if x.NextPageToken == "" {
  5457  			return nil
  5458  		}
  5459  		c.PageToken(x.NextPageToken)
  5460  	}
  5461  }
  5462  
  5463  type OperationsCancelCall struct {
  5464  	s                      *Service
  5465  	name                   string
  5466  	canceloperationrequest *CancelOperationRequest
  5467  	urlParams_             gensupport.URLParams
  5468  	ctx_                   context.Context
  5469  	header_                http.Header
  5470  }
  5471  
  5472  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  5473  // server makes a best effort to cancel the operation, but success is not
  5474  // guaranteed. If the server doesn't support this method, it returns
  5475  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  5476  // other methods to check whether the cancellation succeeded or whether the
  5477  // operation completed despite cancellation. On successful cancellation, the
  5478  // operation is not deleted; instead, it becomes an operation with an
  5479  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  5480  // `Code.CANCELLED`.
  5481  //
  5482  // - name: The name of the operation resource to be cancelled.
  5483  func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall {
  5484  	c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5485  	c.name = name
  5486  	c.canceloperationrequest = canceloperationrequest
  5487  	return c
  5488  }
  5489  
  5490  // Fields allows partial responses to be retrieved. See
  5491  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5492  // details.
  5493  func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
  5494  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5495  	return c
  5496  }
  5497  
  5498  // Context sets the context to be used in this call's Do method.
  5499  func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
  5500  	c.ctx_ = ctx
  5501  	return c
  5502  }
  5503  
  5504  // Header returns a http.Header that can be modified by the caller to add
  5505  // headers to the request.
  5506  func (c *OperationsCancelCall) Header() http.Header {
  5507  	if c.header_ == nil {
  5508  		c.header_ = make(http.Header)
  5509  	}
  5510  	return c.header_
  5511  }
  5512  
  5513  func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  5514  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5515  	var body io.Reader = nil
  5516  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  5517  	if err != nil {
  5518  		return nil, err
  5519  	}
  5520  	c.urlParams_.Set("alt", alt)
  5521  	c.urlParams_.Set("prettyPrint", "false")
  5522  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  5523  	urls += "?" + c.urlParams_.Encode()
  5524  	req, err := http.NewRequest("POST", urls, body)
  5525  	if err != nil {
  5526  		return nil, err
  5527  	}
  5528  	req.Header = reqHeaders
  5529  	googleapi.Expand(req.URL, map[string]string{
  5530  		"name": c.name,
  5531  	})
  5532  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5533  }
  5534  
  5535  // Do executes the "vault.operations.cancel" call.
  5536  // Any non-2xx status code is an error. Response headers are in either
  5537  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5538  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5539  // whether the returned error was because http.StatusNotModified was returned.
  5540  func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5541  	gensupport.SetOptions(c.urlParams_, opts...)
  5542  	res, err := c.doRequest("json")
  5543  	if res != nil && res.StatusCode == http.StatusNotModified {
  5544  		if res.Body != nil {
  5545  			res.Body.Close()
  5546  		}
  5547  		return nil, gensupport.WrapError(&googleapi.Error{
  5548  			Code:   res.StatusCode,
  5549  			Header: res.Header,
  5550  		})
  5551  	}
  5552  	if err != nil {
  5553  		return nil, err
  5554  	}
  5555  	defer googleapi.CloseBody(res)
  5556  	if err := googleapi.CheckResponse(res); err != nil {
  5557  		return nil, gensupport.WrapError(err)
  5558  	}
  5559  	ret := &Empty{
  5560  		ServerResponse: googleapi.ServerResponse{
  5561  			Header:         res.Header,
  5562  			HTTPStatusCode: res.StatusCode,
  5563  		},
  5564  	}
  5565  	target := &ret
  5566  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5567  		return nil, err
  5568  	}
  5569  	return ret, nil
  5570  }
  5571  
  5572  type OperationsDeleteCall struct {
  5573  	s          *Service
  5574  	name       string
  5575  	urlParams_ gensupport.URLParams
  5576  	ctx_       context.Context
  5577  	header_    http.Header
  5578  }
  5579  
  5580  // Delete: Deletes a long-running operation. This method indicates that the
  5581  // client is no longer interested in the operation result. It does not cancel
  5582  // the operation. If the server doesn't support this method, it returns
  5583  // `google.rpc.Code.UNIMPLEMENTED`.
  5584  //
  5585  // - name: The name of the operation resource to be deleted.
  5586  func (r *OperationsService) Delete(name string) *OperationsDeleteCall {
  5587  	c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5588  	c.name = name
  5589  	return c
  5590  }
  5591  
  5592  // Fields allows partial responses to be retrieved. See
  5593  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5594  // details.
  5595  func (c *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall {
  5596  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5597  	return c
  5598  }
  5599  
  5600  // Context sets the context to be used in this call's Do method.
  5601  func (c *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall {
  5602  	c.ctx_ = ctx
  5603  	return c
  5604  }
  5605  
  5606  // Header returns a http.Header that can be modified by the caller to add
  5607  // headers to the request.
  5608  func (c *OperationsDeleteCall) Header() http.Header {
  5609  	if c.header_ == nil {
  5610  		c.header_ = make(http.Header)
  5611  	}
  5612  	return c.header_
  5613  }
  5614  
  5615  func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5616  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5617  	var body io.Reader = nil
  5618  	c.urlParams_.Set("alt", alt)
  5619  	c.urlParams_.Set("prettyPrint", "false")
  5620  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5621  	urls += "?" + c.urlParams_.Encode()
  5622  	req, err := http.NewRequest("DELETE", urls, body)
  5623  	if err != nil {
  5624  		return nil, err
  5625  	}
  5626  	req.Header = reqHeaders
  5627  	googleapi.Expand(req.URL, map[string]string{
  5628  		"name": c.name,
  5629  	})
  5630  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5631  }
  5632  
  5633  // Do executes the "vault.operations.delete" call.
  5634  // Any non-2xx status code is an error. Response headers are in either
  5635  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5636  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5637  // whether the returned error was because http.StatusNotModified was returned.
  5638  func (c *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5639  	gensupport.SetOptions(c.urlParams_, opts...)
  5640  	res, err := c.doRequest("json")
  5641  	if res != nil && res.StatusCode == http.StatusNotModified {
  5642  		if res.Body != nil {
  5643  			res.Body.Close()
  5644  		}
  5645  		return nil, gensupport.WrapError(&googleapi.Error{
  5646  			Code:   res.StatusCode,
  5647  			Header: res.Header,
  5648  		})
  5649  	}
  5650  	if err != nil {
  5651  		return nil, err
  5652  	}
  5653  	defer googleapi.CloseBody(res)
  5654  	if err := googleapi.CheckResponse(res); err != nil {
  5655  		return nil, gensupport.WrapError(err)
  5656  	}
  5657  	ret := &Empty{
  5658  		ServerResponse: googleapi.ServerResponse{
  5659  			Header:         res.Header,
  5660  			HTTPStatusCode: res.StatusCode,
  5661  		},
  5662  	}
  5663  	target := &ret
  5664  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5665  		return nil, err
  5666  	}
  5667  	return ret, nil
  5668  }
  5669  
  5670  type OperationsGetCall struct {
  5671  	s            *Service
  5672  	name         string
  5673  	urlParams_   gensupport.URLParams
  5674  	ifNoneMatch_ string
  5675  	ctx_         context.Context
  5676  	header_      http.Header
  5677  }
  5678  
  5679  // Get: Gets the latest state of a long-running operation. Clients can use this
  5680  // method to poll the operation result at intervals as recommended by the API
  5681  // service.
  5682  //
  5683  // - name: The name of the operation resource.
  5684  func (r *OperationsService) Get(name string) *OperationsGetCall {
  5685  	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5686  	c.name = name
  5687  	return c
  5688  }
  5689  
  5690  // Fields allows partial responses to be retrieved. See
  5691  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5692  // details.
  5693  func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
  5694  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5695  	return c
  5696  }
  5697  
  5698  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5699  // object's ETag matches the given value. This is useful for getting updates
  5700  // only after the object has changed since the last request.
  5701  func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
  5702  	c.ifNoneMatch_ = entityTag
  5703  	return c
  5704  }
  5705  
  5706  // Context sets the context to be used in this call's Do method.
  5707  func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
  5708  	c.ctx_ = ctx
  5709  	return c
  5710  }
  5711  
  5712  // Header returns a http.Header that can be modified by the caller to add
  5713  // headers to the request.
  5714  func (c *OperationsGetCall) Header() http.Header {
  5715  	if c.header_ == nil {
  5716  		c.header_ = make(http.Header)
  5717  	}
  5718  	return c.header_
  5719  }
  5720  
  5721  func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
  5722  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5723  	if c.ifNoneMatch_ != "" {
  5724  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5725  	}
  5726  	var body io.Reader = nil
  5727  	c.urlParams_.Set("alt", alt)
  5728  	c.urlParams_.Set("prettyPrint", "false")
  5729  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5730  	urls += "?" + c.urlParams_.Encode()
  5731  	req, err := http.NewRequest("GET", urls, body)
  5732  	if err != nil {
  5733  		return nil, err
  5734  	}
  5735  	req.Header = reqHeaders
  5736  	googleapi.Expand(req.URL, map[string]string{
  5737  		"name": c.name,
  5738  	})
  5739  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5740  }
  5741  
  5742  // Do executes the "vault.operations.get" call.
  5743  // Any non-2xx status code is an error. Response headers are in either
  5744  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5745  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5746  // whether the returned error was because http.StatusNotModified was returned.
  5747  func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5748  	gensupport.SetOptions(c.urlParams_, opts...)
  5749  	res, err := c.doRequest("json")
  5750  	if res != nil && res.StatusCode == http.StatusNotModified {
  5751  		if res.Body != nil {
  5752  			res.Body.Close()
  5753  		}
  5754  		return nil, gensupport.WrapError(&googleapi.Error{
  5755  			Code:   res.StatusCode,
  5756  			Header: res.Header,
  5757  		})
  5758  	}
  5759  	if err != nil {
  5760  		return nil, err
  5761  	}
  5762  	defer googleapi.CloseBody(res)
  5763  	if err := googleapi.CheckResponse(res); err != nil {
  5764  		return nil, gensupport.WrapError(err)
  5765  	}
  5766  	ret := &Operation{
  5767  		ServerResponse: googleapi.ServerResponse{
  5768  			Header:         res.Header,
  5769  			HTTPStatusCode: res.StatusCode,
  5770  		},
  5771  	}
  5772  	target := &ret
  5773  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5774  		return nil, err
  5775  	}
  5776  	return ret, nil
  5777  }
  5778  
  5779  type OperationsListCall struct {
  5780  	s            *Service
  5781  	name         string
  5782  	urlParams_   gensupport.URLParams
  5783  	ifNoneMatch_ string
  5784  	ctx_         context.Context
  5785  	header_      http.Header
  5786  }
  5787  
  5788  // List: Lists operations that match the specified filter in the request. If
  5789  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  5790  //
  5791  // - name: The name of the operation's parent resource.
  5792  func (r *OperationsService) List(name string) *OperationsListCall {
  5793  	c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5794  	c.name = name
  5795  	return c
  5796  }
  5797  
  5798  // Filter sets the optional parameter "filter": The standard list filter.
  5799  func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
  5800  	c.urlParams_.Set("filter", filter)
  5801  	return c
  5802  }
  5803  
  5804  // PageSize sets the optional parameter "pageSize": The standard list page
  5805  // size.
  5806  func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall {
  5807  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5808  	return c
  5809  }
  5810  
  5811  // PageToken sets the optional parameter "pageToken": The standard list page
  5812  // token.
  5813  func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
  5814  	c.urlParams_.Set("pageToken", pageToken)
  5815  	return c
  5816  }
  5817  
  5818  // Fields allows partial responses to be retrieved. See
  5819  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5820  // details.
  5821  func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
  5822  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5823  	return c
  5824  }
  5825  
  5826  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5827  // object's ETag matches the given value. This is useful for getting updates
  5828  // only after the object has changed since the last request.
  5829  func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
  5830  	c.ifNoneMatch_ = entityTag
  5831  	return c
  5832  }
  5833  
  5834  // Context sets the context to be used in this call's Do method.
  5835  func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
  5836  	c.ctx_ = ctx
  5837  	return c
  5838  }
  5839  
  5840  // Header returns a http.Header that can be modified by the caller to add
  5841  // headers to the request.
  5842  func (c *OperationsListCall) Header() http.Header {
  5843  	if c.header_ == nil {
  5844  		c.header_ = make(http.Header)
  5845  	}
  5846  	return c.header_
  5847  }
  5848  
  5849  func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
  5850  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5851  	if c.ifNoneMatch_ != "" {
  5852  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5853  	}
  5854  	var body io.Reader = nil
  5855  	c.urlParams_.Set("alt", alt)
  5856  	c.urlParams_.Set("prettyPrint", "false")
  5857  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5858  	urls += "?" + c.urlParams_.Encode()
  5859  	req, err := http.NewRequest("GET", urls, body)
  5860  	if err != nil {
  5861  		return nil, err
  5862  	}
  5863  	req.Header = reqHeaders
  5864  	googleapi.Expand(req.URL, map[string]string{
  5865  		"name": c.name,
  5866  	})
  5867  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5868  }
  5869  
  5870  // Do executes the "vault.operations.list" call.
  5871  // Any non-2xx status code is an error. Response headers are in either
  5872  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  5873  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5874  // check whether the returned error was because http.StatusNotModified was
  5875  // returned.
  5876  func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  5877  	gensupport.SetOptions(c.urlParams_, opts...)
  5878  	res, err := c.doRequest("json")
  5879  	if res != nil && res.StatusCode == http.StatusNotModified {
  5880  		if res.Body != nil {
  5881  			res.Body.Close()
  5882  		}
  5883  		return nil, gensupport.WrapError(&googleapi.Error{
  5884  			Code:   res.StatusCode,
  5885  			Header: res.Header,
  5886  		})
  5887  	}
  5888  	if err != nil {
  5889  		return nil, err
  5890  	}
  5891  	defer googleapi.CloseBody(res)
  5892  	if err := googleapi.CheckResponse(res); err != nil {
  5893  		return nil, gensupport.WrapError(err)
  5894  	}
  5895  	ret := &ListOperationsResponse{
  5896  		ServerResponse: googleapi.ServerResponse{
  5897  			Header:         res.Header,
  5898  			HTTPStatusCode: res.StatusCode,
  5899  		},
  5900  	}
  5901  	target := &ret
  5902  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5903  		return nil, err
  5904  	}
  5905  	return ret, nil
  5906  }
  5907  
  5908  // Pages invokes f for each page of results.
  5909  // A non-nil error returned from f will halt the iteration.
  5910  // The provided context supersedes any context provided to the Context method.
  5911  func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  5912  	c.ctx_ = ctx
  5913  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5914  	for {
  5915  		x, err := c.Do()
  5916  		if err != nil {
  5917  			return err
  5918  		}
  5919  		if err := f(x); err != nil {
  5920  			return err
  5921  		}
  5922  		if x.NextPageToken == "" {
  5923  			return nil
  5924  		}
  5925  		c.PageToken(x.NextPageToken)
  5926  	}
  5927  }
  5928  

View as plain text