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