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