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 package workloadmanager
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "net/http"
61 "net/url"
62 "strconv"
63 "strings"
64
65 googleapi "google.golang.org/api/googleapi"
66 internal "google.golang.org/api/internal"
67 gensupport "google.golang.org/api/internal/gensupport"
68 option "google.golang.org/api/option"
69 internaloption "google.golang.org/api/option/internaloption"
70 htransport "google.golang.org/api/transport/http"
71 )
72
73
74
75 var _ = bytes.NewBuffer
76 var _ = strconv.Itoa
77 var _ = fmt.Sprintf
78 var _ = json.NewDecoder
79 var _ = io.Copy
80 var _ = url.Parse
81 var _ = gensupport.MarshalJSON
82 var _ = googleapi.Version
83 var _ = errors.New
84 var _ = strings.Replace
85 var _ = context.Canceled
86 var _ = internaloption.WithDefaultEndpoint
87 var _ = internal.Version
88
89 const apiId = "workloadmanager:v1"
90 const apiName = "workloadmanager"
91 const apiVersion = "v1"
92 const basePath = "https://workloadmanager.googleapis.com/"
93 const basePathTemplate = "https://workloadmanager.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://workloadmanager.mtls.googleapis.com/"
95
96
97 const (
98
99
100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
101 )
102
103
104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
105 scopesOption := internaloption.WithDefaultScopes(
106 "https://www.googleapis.com/auth/cloud-platform",
107 )
108
109 opts = append([]option.ClientOption{scopesOption}, opts...)
110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
113 opts = append(opts, internaloption.EnableNewAuthLibrary())
114 client, endpoint, err := htransport.NewClient(ctx, opts...)
115 if err != nil {
116 return nil, err
117 }
118 s, err := New(client)
119 if err != nil {
120 return nil, err
121 }
122 if endpoint != "" {
123 s.BasePath = endpoint
124 }
125 return s, nil
126 }
127
128
129
130
131
132
133 func New(client *http.Client) (*Service, error) {
134 if client == nil {
135 return nil, errors.New("client is nil")
136 }
137 s := &Service{client: client, BasePath: basePath}
138 s.Projects = NewProjectsService(s)
139 return s, nil
140 }
141
142 type Service struct {
143 client *http.Client
144 BasePath string
145 UserAgent string
146
147 Projects *ProjectsService
148 }
149
150 func (s *Service) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *Service) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *Service
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.Evaluations = NewProjectsLocationsEvaluationsService(s)
172 rs.Insights = NewProjectsLocationsInsightsService(s)
173 rs.Operations = NewProjectsLocationsOperationsService(s)
174 rs.Rules = NewProjectsLocationsRulesService(s)
175 return rs
176 }
177
178 type ProjectsLocationsService struct {
179 s *Service
180
181 Evaluations *ProjectsLocationsEvaluationsService
182
183 Insights *ProjectsLocationsInsightsService
184
185 Operations *ProjectsLocationsOperationsService
186
187 Rules *ProjectsLocationsRulesService
188 }
189
190 func NewProjectsLocationsEvaluationsService(s *Service) *ProjectsLocationsEvaluationsService {
191 rs := &ProjectsLocationsEvaluationsService{s: s}
192 rs.Executions = NewProjectsLocationsEvaluationsExecutionsService(s)
193 return rs
194 }
195
196 type ProjectsLocationsEvaluationsService struct {
197 s *Service
198
199 Executions *ProjectsLocationsEvaluationsExecutionsService
200 }
201
202 func NewProjectsLocationsEvaluationsExecutionsService(s *Service) *ProjectsLocationsEvaluationsExecutionsService {
203 rs := &ProjectsLocationsEvaluationsExecutionsService{s: s}
204 rs.Results = NewProjectsLocationsEvaluationsExecutionsResultsService(s)
205 rs.ScannedResources = NewProjectsLocationsEvaluationsExecutionsScannedResourcesService(s)
206 return rs
207 }
208
209 type ProjectsLocationsEvaluationsExecutionsService struct {
210 s *Service
211
212 Results *ProjectsLocationsEvaluationsExecutionsResultsService
213
214 ScannedResources *ProjectsLocationsEvaluationsExecutionsScannedResourcesService
215 }
216
217 func NewProjectsLocationsEvaluationsExecutionsResultsService(s *Service) *ProjectsLocationsEvaluationsExecutionsResultsService {
218 rs := &ProjectsLocationsEvaluationsExecutionsResultsService{s: s}
219 return rs
220 }
221
222 type ProjectsLocationsEvaluationsExecutionsResultsService struct {
223 s *Service
224 }
225
226 func NewProjectsLocationsEvaluationsExecutionsScannedResourcesService(s *Service) *ProjectsLocationsEvaluationsExecutionsScannedResourcesService {
227 rs := &ProjectsLocationsEvaluationsExecutionsScannedResourcesService{s: s}
228 return rs
229 }
230
231 type ProjectsLocationsEvaluationsExecutionsScannedResourcesService struct {
232 s *Service
233 }
234
235 func NewProjectsLocationsInsightsService(s *Service) *ProjectsLocationsInsightsService {
236 rs := &ProjectsLocationsInsightsService{s: s}
237 return rs
238 }
239
240 type ProjectsLocationsInsightsService struct {
241 s *Service
242 }
243
244 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
245 rs := &ProjectsLocationsOperationsService{s: s}
246 return rs
247 }
248
249 type ProjectsLocationsOperationsService struct {
250 s *Service
251 }
252
253 func NewProjectsLocationsRulesService(s *Service) *ProjectsLocationsRulesService {
254 rs := &ProjectsLocationsRulesService{s: s}
255 return rs
256 }
257
258 type ProjectsLocationsRulesService struct {
259 s *Service
260 }
261
262
263
264 type AssetLocation struct {
265
266
267 Expected *IsolationExpectations `json:"expected,omitempty"`
268
269 ExtraParameters []*ExtraParameter `json:"extraParameters,omitempty"`
270
271
272 LocationData []*LocationData `json:"locationData,omitempty"`
273
274
275 ParentAsset []*CloudAsset `json:"parentAsset,omitempty"`
276
277
278
279
280
281 ForceSendFields []string `json:"-"`
282
283
284
285
286 NullFields []string `json:"-"`
287 }
288
289 func (s *AssetLocation) MarshalJSON() ([]byte, error) {
290 type NoMethod AssetLocation
291 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
292 }
293
294
295 type BigQueryDestination struct {
296
297
298 CreateNewResultsTable bool `json:"createNewResultsTable,omitempty"`
299
300 DestinationDataset string `json:"destinationDataset,omitempty"`
301
302
303
304
305
306 ForceSendFields []string `json:"-"`
307
308
309
310
311 NullFields []string `json:"-"`
312 }
313
314 func (s *BigQueryDestination) MarshalJSON() ([]byte, error) {
315 type NoMethod BigQueryDestination
316 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
317 }
318
319
320
321 type BlobstoreLocation struct {
322 PolicyId []string `json:"policyId,omitempty"`
323
324
325
326
327
328 ForceSendFields []string `json:"-"`
329
330
331
332
333 NullFields []string `json:"-"`
334 }
335
336 func (s *BlobstoreLocation) MarshalJSON() ([]byte, error) {
337 type NoMethod BlobstoreLocation
338 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
339 }
340
341
342 type CancelOperationRequest struct {
343 }
344
345 type CloudAsset struct {
346 AssetName string `json:"assetName,omitempty"`
347 AssetType string `json:"assetType,omitempty"`
348
349
350
351
352
353 ForceSendFields []string `json:"-"`
354
355
356
357
358 NullFields []string `json:"-"`
359 }
360
361 func (s *CloudAsset) MarshalJSON() ([]byte, error) {
362 type NoMethod CloudAsset
363 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
364 }
365
366 type CloudAssetComposition struct {
367 ChildAsset []*CloudAsset `json:"childAsset,omitempty"`
368
369
370
371
372
373 ForceSendFields []string `json:"-"`
374
375
376
377
378 NullFields []string `json:"-"`
379 }
380
381 func (s *CloudAssetComposition) MarshalJSON() ([]byte, error) {
382 type NoMethod CloudAssetComposition
383 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
384 }
385
386 type DirectLocationAssignment struct {
387 Location []*LocationAssignment `json:"location,omitempty"`
388
389
390
391
392
393 ForceSendFields []string `json:"-"`
394
395
396
397
398 NullFields []string `json:"-"`
399 }
400
401 func (s *DirectLocationAssignment) MarshalJSON() ([]byte, error) {
402 type NoMethod DirectLocationAssignment
403 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
404 }
405
406
407
408
409
410 type Empty struct {
411
412 googleapi.ServerResponse `json:"-"`
413 }
414
415
416 type Evaluation struct {
417
418 BigQueryDestination *BigQueryDestination `json:"bigQueryDestination,omitempty"`
419
420 CreateTime string `json:"createTime,omitempty"`
421
422 CustomRulesBucket string `json:"customRulesBucket,omitempty"`
423
424 Description string `json:"description,omitempty"`
425
426 Labels map[string]string `json:"labels,omitempty"`
427
428
429 Name string `json:"name,omitempty"`
430
431 ResourceFilter *ResourceFilter `json:"resourceFilter,omitempty"`
432
433 ResourceStatus *ResourceStatus `json:"resourceStatus,omitempty"`
434
435 RuleNames []string `json:"ruleNames,omitempty"`
436
437 RuleVersions []string `json:"ruleVersions,omitempty"`
438
439
440
441 Schedule string `json:"schedule,omitempty"`
442
443 UpdateTime string `json:"updateTime,omitempty"`
444
445
446 googleapi.ServerResponse `json:"-"`
447
448
449
450
451
452 ForceSendFields []string `json:"-"`
453
454
455
456
457 NullFields []string `json:"-"`
458 }
459
460 func (s *Evaluation) MarshalJSON() ([]byte, error) {
461 type NoMethod Evaluation
462 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
463 }
464
465
466 type Execution struct {
467
468 EndTime string `json:"endTime,omitempty"`
469
470 EvaluationId string `json:"evaluationId,omitempty"`
471
472 ExternalDataSources []*ExternalDataSources `json:"externalDataSources,omitempty"`
473
474 InventoryTime string `json:"inventoryTime,omitempty"`
475
476 Labels map[string]string `json:"labels,omitempty"`
477
478
479
480 Name string `json:"name,omitempty"`
481
482
483
484
485
486
487
488 RunType string `json:"runType,omitempty"`
489
490 StartTime string `json:"startTime,omitempty"`
491
492
493
494
495
496
497
498 State string `json:"state,omitempty"`
499
500
501 googleapi.ServerResponse `json:"-"`
502
503
504
505
506
507 ForceSendFields []string `json:"-"`
508
509
510
511
512 NullFields []string `json:"-"`
513 }
514
515 func (s *Execution) MarshalJSON() ([]byte, error) {
516 type NoMethod Execution
517 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
518 }
519
520
521 type ExecutionResult struct {
522
523 DocumentationUrl string `json:"documentationUrl,omitempty"`
524
525 Resource *Resource `json:"resource,omitempty"`
526
527 Rule string `json:"rule,omitempty"`
528
529 Severity string `json:"severity,omitempty"`
530
531 ViolationDetails *ViolationDetails `json:"violationDetails,omitempty"`
532
533 ViolationMessage string `json:"violationMessage,omitempty"`
534
535
536
537
538
539 ForceSendFields []string `json:"-"`
540
541
542
543
544 NullFields []string `json:"-"`
545 }
546
547 func (s *ExecutionResult) MarshalJSON() ([]byte, error) {
548 type NoMethod ExecutionResult
549 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
550 }
551
552
553 type ExternalDataSources struct {
554
555
556 Name string `json:"name,omitempty"`
557
558
559
560
561
562 Type string `json:"type,omitempty"`
563
564
565 Uri string `json:"uri,omitempty"`
566
567
568
569
570
571 ForceSendFields []string `json:"-"`
572
573
574
575
576 NullFields []string `json:"-"`
577 }
578
579 func (s *ExternalDataSources) MarshalJSON() ([]byte, error) {
580 type NoMethod ExternalDataSources
581 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
582 }
583
584
585
586 type ExtraParameter struct {
587
588
589 RegionalMigDistributionPolicy *RegionalMigDistributionPolicy `json:"regionalMigDistributionPolicy,omitempty"`
590
591
592
593
594
595 ForceSendFields []string `json:"-"`
596
597
598
599
600 NullFields []string `json:"-"`
601 }
602
603 func (s *ExtraParameter) MarshalJSON() ([]byte, error) {
604 type NoMethod ExtraParameter
605 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
606 }
607
608
609 type GceInstanceFilter struct {
610
611 ServiceAccounts []string `json:"serviceAccounts,omitempty"`
612
613
614
615
616
617 ForceSendFields []string `json:"-"`
618
619
620
621
622 NullFields []string `json:"-"`
623 }
624
625 func (s *GceInstanceFilter) MarshalJSON() ([]byte, error) {
626 type NoMethod GceInstanceFilter
627 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
628 }
629
630
631 type Insight struct {
632
633 InstanceId string `json:"instanceId,omitempty"`
634
635
636 SapDiscovery *SapDiscovery `json:"sapDiscovery,omitempty"`
637
638 SapValidation *SapValidation `json:"sapValidation,omitempty"`
639
640 SentTime string `json:"sentTime,omitempty"`
641
642
643 SqlserverValidation *SqlserverValidation `json:"sqlserverValidation,omitempty"`
644
645
646
647
648
649 ForceSendFields []string `json:"-"`
650
651
652
653
654 NullFields []string `json:"-"`
655 }
656
657 func (s *Insight) MarshalJSON() ([]byte, error) {
658 type NoMethod Insight
659 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
660 }
661
662 type IsolationExpectations struct {
663
664
665
666
667
668
669 ZiOrgPolicy string `json:"ziOrgPolicy,omitempty"`
670
671
672
673
674
675
676 ZiRegionPolicy string `json:"ziRegionPolicy,omitempty"`
677
678
679
680
681
682 ZiRegionState string `json:"ziRegionState,omitempty"`
683
684
685
686
687
688
689
690
691
692
693 ZoneIsolation string `json:"zoneIsolation,omitempty"`
694
695
696
697
698
699
700
701
702 ZoneSeparation string `json:"zoneSeparation,omitempty"`
703
704
705
706
707
708 ZsOrgPolicy string `json:"zsOrgPolicy,omitempty"`
709
710
711
712
713
714
715 ZsRegionState string `json:"zsRegionState,omitempty"`
716
717
718
719
720
721 ForceSendFields []string `json:"-"`
722
723
724
725
726 NullFields []string `json:"-"`
727 }
728
729 func (s *IsolationExpectations) MarshalJSON() ([]byte, error) {
730 type NoMethod IsolationExpectations
731 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
732 }
733
734
735 type ListEvaluationsResponse struct {
736
737 Evaluations []*Evaluation `json:"evaluations,omitempty"`
738
739
740 NextPageToken string `json:"nextPageToken,omitempty"`
741
742 Unreachable []string `json:"unreachable,omitempty"`
743
744
745 googleapi.ServerResponse `json:"-"`
746
747
748
749
750
751 ForceSendFields []string `json:"-"`
752
753
754
755
756 NullFields []string `json:"-"`
757 }
758
759 func (s *ListEvaluationsResponse) MarshalJSON() ([]byte, error) {
760 type NoMethod ListEvaluationsResponse
761 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
762 }
763
764
765 type ListExecutionResultsResponse struct {
766
767 ExecutionResults []*ExecutionResult `json:"executionResults,omitempty"`
768
769
770 NextPageToken string `json:"nextPageToken,omitempty"`
771
772
773 googleapi.ServerResponse `json:"-"`
774
775
776
777
778
779 ForceSendFields []string `json:"-"`
780
781
782
783
784 NullFields []string `json:"-"`
785 }
786
787 func (s *ListExecutionResultsResponse) MarshalJSON() ([]byte, error) {
788 type NoMethod ListExecutionResultsResponse
789 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
790 }
791
792
793 type ListExecutionsResponse struct {
794
795 Executions []*Execution `json:"executions,omitempty"`
796
797
798 NextPageToken string `json:"nextPageToken,omitempty"`
799
800 Unreachable []string `json:"unreachable,omitempty"`
801
802
803 googleapi.ServerResponse `json:"-"`
804
805
806
807
808
809 ForceSendFields []string `json:"-"`
810
811
812
813
814 NullFields []string `json:"-"`
815 }
816
817 func (s *ListExecutionsResponse) MarshalJSON() ([]byte, error) {
818 type NoMethod ListExecutionsResponse
819 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
820 }
821
822
823 type ListLocationsResponse struct {
824
825
826 Locations []*Location `json:"locations,omitempty"`
827
828 NextPageToken string `json:"nextPageToken,omitempty"`
829
830
831 googleapi.ServerResponse `json:"-"`
832
833
834
835
836
837 ForceSendFields []string `json:"-"`
838
839
840
841
842 NullFields []string `json:"-"`
843 }
844
845 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
846 type NoMethod ListLocationsResponse
847 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
848 }
849
850
851 type ListOperationsResponse struct {
852
853 NextPageToken string `json:"nextPageToken,omitempty"`
854
855
856 Operations []*Operation `json:"operations,omitempty"`
857
858
859 googleapi.ServerResponse `json:"-"`
860
861
862
863
864
865 ForceSendFields []string `json:"-"`
866
867
868
869
870 NullFields []string `json:"-"`
871 }
872
873 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
874 type NoMethod ListOperationsResponse
875 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
876 }
877
878
879 type ListRulesResponse struct {
880
881
882 NextPageToken string `json:"nextPageToken,omitempty"`
883
884 Rules []*Rule `json:"rules,omitempty"`
885
886
887 googleapi.ServerResponse `json:"-"`
888
889
890
891
892
893 ForceSendFields []string `json:"-"`
894
895
896
897
898 NullFields []string `json:"-"`
899 }
900
901 func (s *ListRulesResponse) MarshalJSON() ([]byte, error) {
902 type NoMethod ListRulesResponse
903 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
904 }
905
906
907 type ListScannedResourcesResponse struct {
908
909
910 NextPageToken string `json:"nextPageToken,omitempty"`
911
912 ScannedResources []*ScannedResource `json:"scannedResources,omitempty"`
913
914
915 googleapi.ServerResponse `json:"-"`
916
917
918
919
920
921 ForceSendFields []string `json:"-"`
922
923
924
925
926 NullFields []string `json:"-"`
927 }
928
929 func (s *ListScannedResourcesResponse) MarshalJSON() ([]byte, error) {
930 type NoMethod ListScannedResourcesResponse
931 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
932 }
933
934
935 type Location struct {
936
937
938 DisplayName string `json:"displayName,omitempty"`
939
940
941 Labels map[string]string `json:"labels,omitempty"`
942
943 LocationId string `json:"locationId,omitempty"`
944
945
946 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
947
948
949
950 Name string `json:"name,omitempty"`
951
952
953 googleapi.ServerResponse `json:"-"`
954
955
956
957
958
959 ForceSendFields []string `json:"-"`
960
961
962
963
964 NullFields []string `json:"-"`
965 }
966
967 func (s *Location) MarshalJSON() ([]byte, error) {
968 type NoMethod Location
969 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
970 }
971
972 type LocationAssignment struct {
973 Location string `json:"location,omitempty"`
974
975
976
977
978
979
980
981
982
983
984 LocationType string `json:"locationType,omitempty"`
985
986
987
988
989
990 ForceSendFields []string `json:"-"`
991
992
993
994
995 NullFields []string `json:"-"`
996 }
997
998 func (s *LocationAssignment) MarshalJSON() ([]byte, error) {
999 type NoMethod LocationAssignment
1000 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1001 }
1002
1003 type LocationData struct {
1004 BlobstoreLocation *BlobstoreLocation `json:"blobstoreLocation,omitempty"`
1005 ChildAssetLocation *CloudAssetComposition `json:"childAssetLocation,omitempty"`
1006 DirectLocation *DirectLocationAssignment `json:"directLocation,omitempty"`
1007 GcpProjectProxy *TenantProjectProxy `json:"gcpProjectProxy,omitempty"`
1008 SpannerLocation *SpannerLocation `json:"spannerLocation,omitempty"`
1009
1010
1011
1012
1013
1014 ForceSendFields []string `json:"-"`
1015
1016
1017
1018
1019 NullFields []string `json:"-"`
1020 }
1021
1022 func (s *LocationData) MarshalJSON() ([]byte, error) {
1023 type NoMethod LocationData
1024 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1025 }
1026
1027
1028
1029 type Operation struct {
1030
1031
1032
1033 Done bool `json:"done,omitempty"`
1034
1035 Error *Status `json:"error,omitempty"`
1036
1037
1038
1039
1040 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1041
1042
1043
1044 Name string `json:"name,omitempty"`
1045
1046
1047
1048
1049
1050
1051
1052 Response googleapi.RawMessage `json:"response,omitempty"`
1053
1054
1055 googleapi.ServerResponse `json:"-"`
1056
1057
1058
1059
1060
1061 ForceSendFields []string `json:"-"`
1062
1063
1064
1065
1066 NullFields []string `json:"-"`
1067 }
1068
1069 func (s *Operation) MarshalJSON() ([]byte, error) {
1070 type NoMethod Operation
1071 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1072 }
1073
1074
1075 type OperationMetadata struct {
1076
1077 ApiVersion string `json:"apiVersion,omitempty"`
1078
1079 CreateTime string `json:"createTime,omitempty"`
1080
1081 EndTime string `json:"endTime,omitempty"`
1082
1083
1084
1085
1086 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
1087
1088 StatusMessage string `json:"statusMessage,omitempty"`
1089
1090
1091 Target string `json:"target,omitempty"`
1092
1093 Verb string `json:"verb,omitempty"`
1094
1095
1096
1097
1098
1099 ForceSendFields []string `json:"-"`
1100
1101
1102
1103
1104 NullFields []string `json:"-"`
1105 }
1106
1107 func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
1108 type NoMethod OperationMetadata
1109 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1110 }
1111
1112
1113
1114
1115 type RegionalMigDistributionPolicy struct {
1116
1117
1118 TargetShape int64 `json:"targetShape,omitempty"`
1119
1120 Zones []*ZoneConfiguration `json:"zones,omitempty"`
1121
1122
1123
1124
1125
1126 ForceSendFields []string `json:"-"`
1127
1128
1129
1130
1131 NullFields []string `json:"-"`
1132 }
1133
1134 func (s *RegionalMigDistributionPolicy) MarshalJSON() ([]byte, error) {
1135 type NoMethod RegionalMigDistributionPolicy
1136 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1137 }
1138
1139
1140 type Resource struct {
1141
1142 Name string `json:"name,omitempty"`
1143
1144 ServiceAccount string `json:"serviceAccount,omitempty"`
1145
1146 Type string `json:"type,omitempty"`
1147
1148
1149
1150
1151
1152 ForceSendFields []string `json:"-"`
1153
1154
1155
1156
1157 NullFields []string `json:"-"`
1158 }
1159
1160 func (s *Resource) MarshalJSON() ([]byte, error) {
1161 type NoMethod Resource
1162 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1163 }
1164
1165
1166 type ResourceFilter struct {
1167
1168 GceInstanceFilter *GceInstanceFilter `json:"gceInstanceFilter,omitempty"`
1169
1170 InclusionLabels map[string]string `json:"inclusionLabels,omitempty"`
1171
1172 ResourceIdPatterns []string `json:"resourceIdPatterns,omitempty"`
1173
1174 Scopes []string `json:"scopes,omitempty"`
1175
1176
1177
1178
1179
1180 ForceSendFields []string `json:"-"`
1181
1182
1183
1184
1185 NullFields []string `json:"-"`
1186 }
1187
1188 func (s *ResourceFilter) MarshalJSON() ([]byte, error) {
1189 type NoMethod ResourceFilter
1190 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1191 }
1192
1193
1194 type ResourceStatus struct {
1195
1196
1197 RulesNewerVersions []string `json:"rulesNewerVersions,omitempty"`
1198
1199
1200
1201
1202
1203
1204
1205
1206 State string `json:"state,omitempty"`
1207
1208
1209
1210
1211
1212 ForceSendFields []string `json:"-"`
1213
1214
1215
1216
1217 NullFields []string `json:"-"`
1218 }
1219
1220 func (s *ResourceStatus) MarshalJSON() ([]byte, error) {
1221 type NoMethod ResourceStatus
1222 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1223 }
1224
1225
1226 type Rule struct {
1227
1228 Description string `json:"description,omitempty"`
1229
1230 DisplayName string `json:"displayName,omitempty"`
1231
1232 ErrorMessage string `json:"errorMessage,omitempty"`
1233
1234 Name string `json:"name,omitempty"`
1235
1236 PrimaryCategory string `json:"primaryCategory,omitempty"`
1237
1238 Remediation string `json:"remediation,omitempty"`
1239
1240 RevisionId string `json:"revisionId,omitempty"`
1241
1242 SecondaryCategory string `json:"secondaryCategory,omitempty"`
1243
1244 Severity string `json:"severity,omitempty"`
1245
1246 Tags []string `json:"tags,omitempty"`
1247
1248 Uri string `json:"uri,omitempty"`
1249
1250
1251
1252
1253
1254 ForceSendFields []string `json:"-"`
1255
1256
1257
1258
1259 NullFields []string `json:"-"`
1260 }
1261
1262 func (s *Rule) MarshalJSON() ([]byte, error) {
1263 type NoMethod Rule
1264 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1265 }
1266
1267
1268 type RunEvaluationRequest struct {
1269
1270 Execution *Execution `json:"execution,omitempty"`
1271
1272
1273
1274 ExecutionId string `json:"executionId,omitempty"`
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286 RequestId string `json:"requestId,omitempty"`
1287
1288
1289
1290
1291
1292 ForceSendFields []string `json:"-"`
1293
1294
1295
1296
1297 NullFields []string `json:"-"`
1298 }
1299
1300 func (s *RunEvaluationRequest) MarshalJSON() ([]byte, error) {
1301 type NoMethod RunEvaluationRequest
1302 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1303 }
1304
1305
1306 type SapDiscovery struct {
1307
1308
1309 ApplicationLayer *SapDiscoveryComponent `json:"applicationLayer,omitempty"`
1310
1311 DatabaseLayer *SapDiscoveryComponent `json:"databaseLayer,omitempty"`
1312
1313 Metadata *SapDiscoveryMetadata `json:"metadata,omitempty"`
1314
1315
1316 ProjectNumber string `json:"projectNumber,omitempty"`
1317
1318
1319 SystemId string `json:"systemId,omitempty"`
1320
1321 UpdateTime string `json:"updateTime,omitempty"`
1322
1323 WorkloadProperties *SapDiscoveryWorkloadProperties `json:"workloadProperties,omitempty"`
1324
1325
1326
1327
1328
1329 ForceSendFields []string `json:"-"`
1330
1331
1332
1333
1334 NullFields []string `json:"-"`
1335 }
1336
1337 func (s *SapDiscovery) MarshalJSON() ([]byte, error) {
1338 type NoMethod SapDiscovery
1339 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1340 }
1341
1342
1343 type SapDiscoveryComponent struct {
1344
1345 ApplicationProperties *SapDiscoveryComponentApplicationProperties `json:"applicationProperties,omitempty"`
1346
1347 DatabaseProperties *SapDiscoveryComponentDatabaseProperties `json:"databaseProperties,omitempty"`
1348
1349
1350 HaHosts []string `json:"haHosts,omitempty"`
1351
1352 HostProject string `json:"hostProject,omitempty"`
1353
1354 Resources []*SapDiscoveryResource `json:"resources,omitempty"`
1355
1356
1357 Sid string `json:"sid,omitempty"`
1358
1359
1360
1361
1362
1363
1364 TopologyType string `json:"topologyType,omitempty"`
1365
1366
1367
1368
1369
1370 ForceSendFields []string `json:"-"`
1371
1372
1373
1374
1375 NullFields []string `json:"-"`
1376 }
1377
1378 func (s *SapDiscoveryComponent) MarshalJSON() ([]byte, error) {
1379 type NoMethod SapDiscoveryComponent
1380 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1381 }
1382
1383
1384
1385 type SapDiscoveryComponentApplicationProperties struct {
1386
1387
1388 Abap bool `json:"abap,omitempty"`
1389
1390
1391 AppInstanceNumber string `json:"appInstanceNumber,omitempty"`
1392
1393
1394
1395
1396
1397 ApplicationType string `json:"applicationType,omitempty"`
1398
1399 AscsInstanceNumber string `json:"ascsInstanceNumber,omitempty"`
1400
1401
1402 AscsUri string `json:"ascsUri,omitempty"`
1403
1404 ErsInstanceNumber string `json:"ersInstanceNumber,omitempty"`
1405
1406 KernelVersion string `json:"kernelVersion,omitempty"`
1407
1408
1409 NfsUri string `json:"nfsUri,omitempty"`
1410
1411
1412
1413
1414
1415 ForceSendFields []string `json:"-"`
1416
1417
1418
1419
1420 NullFields []string `json:"-"`
1421 }
1422
1423 func (s *SapDiscoveryComponentApplicationProperties) MarshalJSON() ([]byte, error) {
1424 type NoMethod SapDiscoveryComponentApplicationProperties
1425 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1426 }
1427
1428
1429
1430 type SapDiscoveryComponentDatabaseProperties struct {
1431
1432 DatabaseSid string `json:"databaseSid,omitempty"`
1433
1434
1435
1436
1437
1438
1439
1440 DatabaseType string `json:"databaseType,omitempty"`
1441
1442
1443 DatabaseVersion string `json:"databaseVersion,omitempty"`
1444
1445 InstanceNumber string `json:"instanceNumber,omitempty"`
1446
1447
1448 PrimaryInstanceUri string `json:"primaryInstanceUri,omitempty"`
1449
1450
1451 SharedNfsUri string `json:"sharedNfsUri,omitempty"`
1452
1453
1454
1455
1456
1457 ForceSendFields []string `json:"-"`
1458
1459
1460
1461
1462 NullFields []string `json:"-"`
1463 }
1464
1465 func (s *SapDiscoveryComponentDatabaseProperties) MarshalJSON() ([]byte, error) {
1466 type NoMethod SapDiscoveryComponentDatabaseProperties
1467 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1468 }
1469
1470
1471 type SapDiscoveryMetadata struct {
1472
1473
1474 CustomerRegion string `json:"customerRegion,omitempty"`
1475
1476
1477 DefinedSystem string `json:"definedSystem,omitempty"`
1478
1479 EnvironmentType string `json:"environmentType,omitempty"`
1480
1481 SapProduct string `json:"sapProduct,omitempty"`
1482
1483
1484
1485
1486
1487 ForceSendFields []string `json:"-"`
1488
1489
1490
1491
1492 NullFields []string `json:"-"`
1493 }
1494
1495 func (s *SapDiscoveryMetadata) MarshalJSON() ([]byte, error) {
1496 type NoMethod SapDiscoveryMetadata
1497 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1498 }
1499
1500
1501 type SapDiscoveryResource struct {
1502
1503
1504 InstanceProperties *SapDiscoveryResourceInstanceProperties `json:"instanceProperties,omitempty"`
1505
1506
1507 RelatedResources []string `json:"relatedResources,omitempty"`
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524 ResourceKind string `json:"resourceKind,omitempty"`
1525
1526
1527
1528
1529
1530
1531
1532 ResourceType string `json:"resourceType,omitempty"`
1533
1534
1535 ResourceUri string `json:"resourceUri,omitempty"`
1536
1537
1538 UpdateTime string `json:"updateTime,omitempty"`
1539
1540
1541
1542
1543
1544 ForceSendFields []string `json:"-"`
1545
1546
1547
1548
1549 NullFields []string `json:"-"`
1550 }
1551
1552 func (s *SapDiscoveryResource) MarshalJSON() ([]byte, error) {
1553 type NoMethod SapDiscoveryResource
1554 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1555 }
1556
1557
1558
1559 type SapDiscoveryResourceInstanceProperties struct {
1560
1561 AppInstances []*SapDiscoveryResourceInstancePropertiesAppInstance `json:"appInstances,omitempty"`
1562
1563
1564 ClusterInstances []string `json:"clusterInstances,omitempty"`
1565
1566 InstanceNumber int64 `json:"instanceNumber,omitempty,string"`
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576 InstanceRole string `json:"instanceRole,omitempty"`
1577
1578 VirtualHostname string `json:"virtualHostname,omitempty"`
1579
1580
1581
1582
1583
1584 ForceSendFields []string `json:"-"`
1585
1586
1587
1588
1589 NullFields []string `json:"-"`
1590 }
1591
1592 func (s *SapDiscoveryResourceInstanceProperties) MarshalJSON() ([]byte, error) {
1593 type NoMethod SapDiscoveryResourceInstanceProperties
1594 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1595 }
1596
1597
1598
1599 type SapDiscoveryResourceInstancePropertiesAppInstance struct {
1600
1601 Name string `json:"name,omitempty"`
1602
1603 Number string `json:"number,omitempty"`
1604
1605
1606
1607
1608
1609 ForceSendFields []string `json:"-"`
1610
1611
1612
1613
1614 NullFields []string `json:"-"`
1615 }
1616
1617 func (s *SapDiscoveryResourceInstancePropertiesAppInstance) MarshalJSON() ([]byte, error) {
1618 type NoMethod SapDiscoveryResourceInstancePropertiesAppInstance
1619 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1620 }
1621
1622
1623
1624 type SapDiscoveryWorkloadProperties struct {
1625
1626
1627 ProductVersions []*SapDiscoveryWorkloadPropertiesProductVersion `json:"productVersions,omitempty"`
1628
1629
1630 SoftwareComponentVersions []*SapDiscoveryWorkloadPropertiesSoftwareComponentProperties `json:"softwareComponentVersions,omitempty"`
1631
1632
1633
1634
1635
1636 ForceSendFields []string `json:"-"`
1637
1638
1639
1640
1641 NullFields []string `json:"-"`
1642 }
1643
1644 func (s *SapDiscoveryWorkloadProperties) MarshalJSON() ([]byte, error) {
1645 type NoMethod SapDiscoveryWorkloadProperties
1646 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1647 }
1648
1649
1650 type SapDiscoveryWorkloadPropertiesProductVersion struct {
1651
1652 Name string `json:"name,omitempty"`
1653
1654 Version string `json:"version,omitempty"`
1655
1656
1657
1658
1659
1660 ForceSendFields []string `json:"-"`
1661
1662
1663
1664
1665 NullFields []string `json:"-"`
1666 }
1667
1668 func (s *SapDiscoveryWorkloadPropertiesProductVersion) MarshalJSON() ([]byte, error) {
1669 type NoMethod SapDiscoveryWorkloadPropertiesProductVersion
1670 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1671 }
1672
1673
1674
1675 type SapDiscoveryWorkloadPropertiesSoftwareComponentProperties struct {
1676
1677 ExtVersion string `json:"extVersion,omitempty"`
1678
1679 Name string `json:"name,omitempty"`
1680
1681 Type string `json:"type,omitempty"`
1682
1683 Version string `json:"version,omitempty"`
1684
1685
1686
1687
1688
1689 ForceSendFields []string `json:"-"`
1690
1691
1692
1693
1694 NullFields []string `json:"-"`
1695 }
1696
1697 func (s *SapDiscoveryWorkloadPropertiesSoftwareComponentProperties) MarshalJSON() ([]byte, error) {
1698 type NoMethod SapDiscoveryWorkloadPropertiesSoftwareComponentProperties
1699 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1700 }
1701
1702
1703
1704 type SapValidation struct {
1705
1706
1707 ProjectId string `json:"projectId,omitempty"`
1708
1709 ValidationDetails []*SapValidationValidationDetail `json:"validationDetails,omitempty"`
1710
1711 Zone string `json:"zone,omitempty"`
1712
1713
1714
1715
1716
1717 ForceSendFields []string `json:"-"`
1718
1719
1720
1721
1722 NullFields []string `json:"-"`
1723 }
1724
1725 func (s *SapValidation) MarshalJSON() ([]byte, error) {
1726 type NoMethod SapValidation
1727 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1728 }
1729
1730
1731
1732 type SapValidationValidationDetail struct {
1733
1734 Details map[string]string `json:"details,omitempty"`
1735
1736
1737 IsPresent bool `json:"isPresent,omitempty"`
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760 SapValidationType string `json:"sapValidationType,omitempty"`
1761
1762
1763
1764
1765
1766 ForceSendFields []string `json:"-"`
1767
1768
1769
1770
1771 NullFields []string `json:"-"`
1772 }
1773
1774 func (s *SapValidationValidationDetail) MarshalJSON() ([]byte, error) {
1775 type NoMethod SapValidationValidationDetail
1776 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1777 }
1778
1779
1780 type ScannedResource struct {
1781
1782 Resource string `json:"resource,omitempty"`
1783
1784 Type string `json:"type,omitempty"`
1785
1786
1787
1788
1789
1790 ForceSendFields []string `json:"-"`
1791
1792
1793
1794
1795 NullFields []string `json:"-"`
1796 }
1797
1798 func (s *ScannedResource) MarshalJSON() ([]byte, error) {
1799 type NoMethod ScannedResource
1800 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1801 }
1802
1803 type SpannerLocation struct {
1804 DbName []string `json:"dbName,omitempty"`
1805
1806
1807
1808
1809
1810 ForceSendFields []string `json:"-"`
1811
1812
1813
1814
1815 NullFields []string `json:"-"`
1816 }
1817
1818 func (s *SpannerLocation) MarshalJSON() ([]byte, error) {
1819 type NoMethod SpannerLocation
1820 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1821 }
1822
1823
1824
1825 type SqlserverValidation struct {
1826
1827 AgentVersion string `json:"agentVersion,omitempty"`
1828
1829
1830
1831
1832 Instance string `json:"instance,omitempty"`
1833
1834
1835 ProjectId string `json:"projectId,omitempty"`
1836
1837 ValidationDetails []*SqlserverValidationValidationDetail `json:"validationDetails,omitempty"`
1838
1839
1840
1841
1842
1843 ForceSendFields []string `json:"-"`
1844
1845
1846
1847
1848 NullFields []string `json:"-"`
1849 }
1850
1851 func (s *SqlserverValidation) MarshalJSON() ([]byte, error) {
1852 type NoMethod SqlserverValidation
1853 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1854 }
1855
1856
1857
1858 type SqlserverValidationDetails struct {
1859
1860 Fields map[string]string `json:"fields,omitempty"`
1861
1862
1863
1864
1865
1866 ForceSendFields []string `json:"-"`
1867
1868
1869
1870
1871 NullFields []string `json:"-"`
1872 }
1873
1874 func (s *SqlserverValidationDetails) MarshalJSON() ([]byte, error) {
1875 type NoMethod SqlserverValidationDetails
1876 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1877 }
1878
1879
1880
1881 type SqlserverValidationValidationDetail struct {
1882
1883
1884 Details []*SqlserverValidationDetails `json:"details,omitempty"`
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901 Type string `json:"type,omitempty"`
1902
1903
1904
1905
1906
1907 ForceSendFields []string `json:"-"`
1908
1909
1910
1911
1912 NullFields []string `json:"-"`
1913 }
1914
1915 func (s *SqlserverValidationValidationDetail) MarshalJSON() ([]byte, error) {
1916 type NoMethod SqlserverValidationValidationDetail
1917 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1918 }
1919
1920
1921
1922
1923
1924
1925
1926 type Status struct {
1927
1928 Code int64 `json:"code,omitempty"`
1929
1930
1931 Details []googleapi.RawMessage `json:"details,omitempty"`
1932
1933
1934
1935 Message string `json:"message,omitempty"`
1936
1937
1938
1939
1940
1941 ForceSendFields []string `json:"-"`
1942
1943
1944
1945
1946 NullFields []string `json:"-"`
1947 }
1948
1949 func (s *Status) MarshalJSON() ([]byte, error) {
1950 type NoMethod Status
1951 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1952 }
1953
1954 type TenantProjectProxy struct {
1955 ProjectNumbers []string `json:"projectNumbers,omitempty"`
1956
1957
1958
1959
1960
1961 ForceSendFields []string `json:"-"`
1962
1963
1964
1965
1966 NullFields []string `json:"-"`
1967 }
1968
1969 func (s *TenantProjectProxy) MarshalJSON() ([]byte, error) {
1970 type NoMethod TenantProjectProxy
1971 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1972 }
1973
1974
1975 type ViolationDetails struct {
1976
1977 Asset string `json:"asset,omitempty"`
1978
1979 Observed map[string]string `json:"observed,omitempty"`
1980
1981 ServiceAccount string `json:"serviceAccount,omitempty"`
1982
1983
1984
1985
1986
1987 ForceSendFields []string `json:"-"`
1988
1989
1990
1991
1992 NullFields []string `json:"-"`
1993 }
1994
1995 func (s *ViolationDetails) MarshalJSON() ([]byte, error) {
1996 type NoMethod ViolationDetails
1997 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1998 }
1999
2000
2001 type WriteInsightRequest struct {
2002
2003 AgentVersion string `json:"agentVersion,omitempty"`
2004
2005 Insight *Insight `json:"insight,omitempty"`
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017 RequestId string `json:"requestId,omitempty"`
2018
2019
2020
2021
2022
2023 ForceSendFields []string `json:"-"`
2024
2025
2026
2027
2028 NullFields []string `json:"-"`
2029 }
2030
2031 func (s *WriteInsightRequest) MarshalJSON() ([]byte, error) {
2032 type NoMethod WriteInsightRequest
2033 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2034 }
2035
2036
2037 type WriteInsightResponse struct {
2038
2039 googleapi.ServerResponse `json:"-"`
2040 }
2041
2042 type ZoneConfiguration struct {
2043 Zone string `json:"zone,omitempty"`
2044
2045
2046
2047
2048
2049 ForceSendFields []string `json:"-"`
2050
2051
2052
2053
2054 NullFields []string `json:"-"`
2055 }
2056
2057 func (s *ZoneConfiguration) MarshalJSON() ([]byte, error) {
2058 type NoMethod ZoneConfiguration
2059 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2060 }
2061
2062 type ProjectsLocationsGetCall struct {
2063 s *Service
2064 name string
2065 urlParams_ gensupport.URLParams
2066 ifNoneMatch_ string
2067 ctx_ context.Context
2068 header_ http.Header
2069 }
2070
2071
2072
2073
2074 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
2075 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2076 c.name = name
2077 return c
2078 }
2079
2080
2081
2082
2083 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
2084 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2085 return c
2086 }
2087
2088
2089
2090
2091 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
2092 c.ifNoneMatch_ = entityTag
2093 return c
2094 }
2095
2096
2097 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
2098 c.ctx_ = ctx
2099 return c
2100 }
2101
2102
2103
2104 func (c *ProjectsLocationsGetCall) Header() http.Header {
2105 if c.header_ == nil {
2106 c.header_ = make(http.Header)
2107 }
2108 return c.header_
2109 }
2110
2111 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
2112 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2113 if c.ifNoneMatch_ != "" {
2114 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2115 }
2116 var body io.Reader = nil
2117 c.urlParams_.Set("alt", alt)
2118 c.urlParams_.Set("prettyPrint", "false")
2119 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2120 urls += "?" + c.urlParams_.Encode()
2121 req, err := http.NewRequest("GET", urls, body)
2122 if err != nil {
2123 return nil, err
2124 }
2125 req.Header = reqHeaders
2126 googleapi.Expand(req.URL, map[string]string{
2127 "name": c.name,
2128 })
2129 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2130 }
2131
2132
2133
2134
2135
2136
2137 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
2138 gensupport.SetOptions(c.urlParams_, opts...)
2139 res, err := c.doRequest("json")
2140 if res != nil && res.StatusCode == http.StatusNotModified {
2141 if res.Body != nil {
2142 res.Body.Close()
2143 }
2144 return nil, gensupport.WrapError(&googleapi.Error{
2145 Code: res.StatusCode,
2146 Header: res.Header,
2147 })
2148 }
2149 if err != nil {
2150 return nil, err
2151 }
2152 defer googleapi.CloseBody(res)
2153 if err := googleapi.CheckResponse(res); err != nil {
2154 return nil, gensupport.WrapError(err)
2155 }
2156 ret := &Location{
2157 ServerResponse: googleapi.ServerResponse{
2158 Header: res.Header,
2159 HTTPStatusCode: res.StatusCode,
2160 },
2161 }
2162 target := &ret
2163 if err := gensupport.DecodeResponse(target, res); err != nil {
2164 return nil, err
2165 }
2166 return ret, nil
2167 }
2168
2169 type ProjectsLocationsListCall struct {
2170 s *Service
2171 name string
2172 urlParams_ gensupport.URLParams
2173 ifNoneMatch_ string
2174 ctx_ context.Context
2175 header_ http.Header
2176 }
2177
2178
2179
2180
2181 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
2182 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2183 c.name = name
2184 return c
2185 }
2186
2187
2188
2189
2190
2191 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
2192 c.urlParams_.Set("filter", filter)
2193 return c
2194 }
2195
2196
2197
2198 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
2199 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2200 return c
2201 }
2202
2203
2204
2205
2206 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
2207 c.urlParams_.Set("pageToken", pageToken)
2208 return c
2209 }
2210
2211
2212
2213
2214 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
2215 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2216 return c
2217 }
2218
2219
2220
2221
2222 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
2223 c.ifNoneMatch_ = entityTag
2224 return c
2225 }
2226
2227
2228 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
2229 c.ctx_ = ctx
2230 return c
2231 }
2232
2233
2234
2235 func (c *ProjectsLocationsListCall) Header() http.Header {
2236 if c.header_ == nil {
2237 c.header_ = make(http.Header)
2238 }
2239 return c.header_
2240 }
2241
2242 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
2243 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2244 if c.ifNoneMatch_ != "" {
2245 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2246 }
2247 var body io.Reader = nil
2248 c.urlParams_.Set("alt", alt)
2249 c.urlParams_.Set("prettyPrint", "false")
2250 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
2251 urls += "?" + c.urlParams_.Encode()
2252 req, err := http.NewRequest("GET", urls, body)
2253 if err != nil {
2254 return nil, err
2255 }
2256 req.Header = reqHeaders
2257 googleapi.Expand(req.URL, map[string]string{
2258 "name": c.name,
2259 })
2260 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2261 }
2262
2263
2264
2265
2266
2267
2268
2269 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
2270 gensupport.SetOptions(c.urlParams_, opts...)
2271 res, err := c.doRequest("json")
2272 if res != nil && res.StatusCode == http.StatusNotModified {
2273 if res.Body != nil {
2274 res.Body.Close()
2275 }
2276 return nil, gensupport.WrapError(&googleapi.Error{
2277 Code: res.StatusCode,
2278 Header: res.Header,
2279 })
2280 }
2281 if err != nil {
2282 return nil, err
2283 }
2284 defer googleapi.CloseBody(res)
2285 if err := googleapi.CheckResponse(res); err != nil {
2286 return nil, gensupport.WrapError(err)
2287 }
2288 ret := &ListLocationsResponse{
2289 ServerResponse: googleapi.ServerResponse{
2290 Header: res.Header,
2291 HTTPStatusCode: res.StatusCode,
2292 },
2293 }
2294 target := &ret
2295 if err := gensupport.DecodeResponse(target, res); err != nil {
2296 return nil, err
2297 }
2298 return ret, nil
2299 }
2300
2301
2302
2303
2304 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2305 c.ctx_ = ctx
2306 defer c.PageToken(c.urlParams_.Get("pageToken"))
2307 for {
2308 x, err := c.Do()
2309 if err != nil {
2310 return err
2311 }
2312 if err := f(x); err != nil {
2313 return err
2314 }
2315 if x.NextPageToken == "" {
2316 return nil
2317 }
2318 c.PageToken(x.NextPageToken)
2319 }
2320 }
2321
2322 type ProjectsLocationsEvaluationsCreateCall struct {
2323 s *Service
2324 parent string
2325 evaluation *Evaluation
2326 urlParams_ gensupport.URLParams
2327 ctx_ context.Context
2328 header_ http.Header
2329 }
2330
2331
2332
2333
2334
2335 func (r *ProjectsLocationsEvaluationsService) Create(parent string, evaluation *Evaluation) *ProjectsLocationsEvaluationsCreateCall {
2336 c := &ProjectsLocationsEvaluationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2337 c.parent = parent
2338 c.evaluation = evaluation
2339 return c
2340 }
2341
2342
2343
2344 func (c *ProjectsLocationsEvaluationsCreateCall) EvaluationId(evaluationId string) *ProjectsLocationsEvaluationsCreateCall {
2345 c.urlParams_.Set("evaluationId", evaluationId)
2346 return c
2347 }
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360 func (c *ProjectsLocationsEvaluationsCreateCall) RequestId(requestId string) *ProjectsLocationsEvaluationsCreateCall {
2361 c.urlParams_.Set("requestId", requestId)
2362 return c
2363 }
2364
2365
2366
2367
2368 func (c *ProjectsLocationsEvaluationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsCreateCall {
2369 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2370 return c
2371 }
2372
2373
2374 func (c *ProjectsLocationsEvaluationsCreateCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsCreateCall {
2375 c.ctx_ = ctx
2376 return c
2377 }
2378
2379
2380
2381 func (c *ProjectsLocationsEvaluationsCreateCall) Header() http.Header {
2382 if c.header_ == nil {
2383 c.header_ = make(http.Header)
2384 }
2385 return c.header_
2386 }
2387
2388 func (c *ProjectsLocationsEvaluationsCreateCall) doRequest(alt string) (*http.Response, error) {
2389 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2390 var body io.Reader = nil
2391 body, err := googleapi.WithoutDataWrapper.JSONReader(c.evaluation)
2392 if err != nil {
2393 return nil, err
2394 }
2395 c.urlParams_.Set("alt", alt)
2396 c.urlParams_.Set("prettyPrint", "false")
2397 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations")
2398 urls += "?" + c.urlParams_.Encode()
2399 req, err := http.NewRequest("POST", urls, body)
2400 if err != nil {
2401 return nil, err
2402 }
2403 req.Header = reqHeaders
2404 googleapi.Expand(req.URL, map[string]string{
2405 "parent": c.parent,
2406 })
2407 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2408 }
2409
2410
2411
2412
2413
2414
2415 func (c *ProjectsLocationsEvaluationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2416 gensupport.SetOptions(c.urlParams_, opts...)
2417 res, err := c.doRequest("json")
2418 if res != nil && res.StatusCode == http.StatusNotModified {
2419 if res.Body != nil {
2420 res.Body.Close()
2421 }
2422 return nil, gensupport.WrapError(&googleapi.Error{
2423 Code: res.StatusCode,
2424 Header: res.Header,
2425 })
2426 }
2427 if err != nil {
2428 return nil, err
2429 }
2430 defer googleapi.CloseBody(res)
2431 if err := googleapi.CheckResponse(res); err != nil {
2432 return nil, gensupport.WrapError(err)
2433 }
2434 ret := &Operation{
2435 ServerResponse: googleapi.ServerResponse{
2436 Header: res.Header,
2437 HTTPStatusCode: res.StatusCode,
2438 },
2439 }
2440 target := &ret
2441 if err := gensupport.DecodeResponse(target, res); err != nil {
2442 return nil, err
2443 }
2444 return ret, nil
2445 }
2446
2447 type ProjectsLocationsEvaluationsDeleteCall struct {
2448 s *Service
2449 name string
2450 urlParams_ gensupport.URLParams
2451 ctx_ context.Context
2452 header_ http.Header
2453 }
2454
2455
2456
2457
2458 func (r *ProjectsLocationsEvaluationsService) Delete(name string) *ProjectsLocationsEvaluationsDeleteCall {
2459 c := &ProjectsLocationsEvaluationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2460 c.name = name
2461 return c
2462 }
2463
2464
2465
2466 func (c *ProjectsLocationsEvaluationsDeleteCall) Force(force bool) *ProjectsLocationsEvaluationsDeleteCall {
2467 c.urlParams_.Set("force", fmt.Sprint(force))
2468 return c
2469 }
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482 func (c *ProjectsLocationsEvaluationsDeleteCall) RequestId(requestId string) *ProjectsLocationsEvaluationsDeleteCall {
2483 c.urlParams_.Set("requestId", requestId)
2484 return c
2485 }
2486
2487
2488
2489
2490 func (c *ProjectsLocationsEvaluationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsDeleteCall {
2491 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2492 return c
2493 }
2494
2495
2496 func (c *ProjectsLocationsEvaluationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsDeleteCall {
2497 c.ctx_ = ctx
2498 return c
2499 }
2500
2501
2502
2503 func (c *ProjectsLocationsEvaluationsDeleteCall) Header() http.Header {
2504 if c.header_ == nil {
2505 c.header_ = make(http.Header)
2506 }
2507 return c.header_
2508 }
2509
2510 func (c *ProjectsLocationsEvaluationsDeleteCall) doRequest(alt string) (*http.Response, error) {
2511 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2512 var body io.Reader = nil
2513 c.urlParams_.Set("alt", alt)
2514 c.urlParams_.Set("prettyPrint", "false")
2515 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2516 urls += "?" + c.urlParams_.Encode()
2517 req, err := http.NewRequest("DELETE", urls, body)
2518 if err != nil {
2519 return nil, err
2520 }
2521 req.Header = reqHeaders
2522 googleapi.Expand(req.URL, map[string]string{
2523 "name": c.name,
2524 })
2525 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2526 }
2527
2528
2529
2530
2531
2532
2533 func (c *ProjectsLocationsEvaluationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2534 gensupport.SetOptions(c.urlParams_, opts...)
2535 res, err := c.doRequest("json")
2536 if res != nil && res.StatusCode == http.StatusNotModified {
2537 if res.Body != nil {
2538 res.Body.Close()
2539 }
2540 return nil, gensupport.WrapError(&googleapi.Error{
2541 Code: res.StatusCode,
2542 Header: res.Header,
2543 })
2544 }
2545 if err != nil {
2546 return nil, err
2547 }
2548 defer googleapi.CloseBody(res)
2549 if err := googleapi.CheckResponse(res); err != nil {
2550 return nil, gensupport.WrapError(err)
2551 }
2552 ret := &Operation{
2553 ServerResponse: googleapi.ServerResponse{
2554 Header: res.Header,
2555 HTTPStatusCode: res.StatusCode,
2556 },
2557 }
2558 target := &ret
2559 if err := gensupport.DecodeResponse(target, res); err != nil {
2560 return nil, err
2561 }
2562 return ret, nil
2563 }
2564
2565 type ProjectsLocationsEvaluationsGetCall struct {
2566 s *Service
2567 name string
2568 urlParams_ gensupport.URLParams
2569 ifNoneMatch_ string
2570 ctx_ context.Context
2571 header_ http.Header
2572 }
2573
2574
2575
2576
2577 func (r *ProjectsLocationsEvaluationsService) Get(name string) *ProjectsLocationsEvaluationsGetCall {
2578 c := &ProjectsLocationsEvaluationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2579 c.name = name
2580 return c
2581 }
2582
2583
2584
2585
2586 func (c *ProjectsLocationsEvaluationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsGetCall {
2587 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2588 return c
2589 }
2590
2591
2592
2593
2594 func (c *ProjectsLocationsEvaluationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsGetCall {
2595 c.ifNoneMatch_ = entityTag
2596 return c
2597 }
2598
2599
2600 func (c *ProjectsLocationsEvaluationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsGetCall {
2601 c.ctx_ = ctx
2602 return c
2603 }
2604
2605
2606
2607 func (c *ProjectsLocationsEvaluationsGetCall) Header() http.Header {
2608 if c.header_ == nil {
2609 c.header_ = make(http.Header)
2610 }
2611 return c.header_
2612 }
2613
2614 func (c *ProjectsLocationsEvaluationsGetCall) doRequest(alt string) (*http.Response, error) {
2615 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2616 if c.ifNoneMatch_ != "" {
2617 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2618 }
2619 var body io.Reader = nil
2620 c.urlParams_.Set("alt", alt)
2621 c.urlParams_.Set("prettyPrint", "false")
2622 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2623 urls += "?" + c.urlParams_.Encode()
2624 req, err := http.NewRequest("GET", urls, body)
2625 if err != nil {
2626 return nil, err
2627 }
2628 req.Header = reqHeaders
2629 googleapi.Expand(req.URL, map[string]string{
2630 "name": c.name,
2631 })
2632 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2633 }
2634
2635
2636
2637
2638
2639
2640 func (c *ProjectsLocationsEvaluationsGetCall) Do(opts ...googleapi.CallOption) (*Evaluation, error) {
2641 gensupport.SetOptions(c.urlParams_, opts...)
2642 res, err := c.doRequest("json")
2643 if res != nil && res.StatusCode == http.StatusNotModified {
2644 if res.Body != nil {
2645 res.Body.Close()
2646 }
2647 return nil, gensupport.WrapError(&googleapi.Error{
2648 Code: res.StatusCode,
2649 Header: res.Header,
2650 })
2651 }
2652 if err != nil {
2653 return nil, err
2654 }
2655 defer googleapi.CloseBody(res)
2656 if err := googleapi.CheckResponse(res); err != nil {
2657 return nil, gensupport.WrapError(err)
2658 }
2659 ret := &Evaluation{
2660 ServerResponse: googleapi.ServerResponse{
2661 Header: res.Header,
2662 HTTPStatusCode: res.StatusCode,
2663 },
2664 }
2665 target := &ret
2666 if err := gensupport.DecodeResponse(target, res); err != nil {
2667 return nil, err
2668 }
2669 return ret, nil
2670 }
2671
2672 type ProjectsLocationsEvaluationsListCall struct {
2673 s *Service
2674 parent string
2675 urlParams_ gensupport.URLParams
2676 ifNoneMatch_ string
2677 ctx_ context.Context
2678 header_ http.Header
2679 }
2680
2681
2682
2683
2684 func (r *ProjectsLocationsEvaluationsService) List(parent string) *ProjectsLocationsEvaluationsListCall {
2685 c := &ProjectsLocationsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2686 c.parent = parent
2687 return c
2688 }
2689
2690
2691 func (c *ProjectsLocationsEvaluationsListCall) Filter(filter string) *ProjectsLocationsEvaluationsListCall {
2692 c.urlParams_.Set("filter", filter)
2693 return c
2694 }
2695
2696
2697
2698 func (c *ProjectsLocationsEvaluationsListCall) OrderBy(orderBy string) *ProjectsLocationsEvaluationsListCall {
2699 c.urlParams_.Set("orderBy", orderBy)
2700 return c
2701 }
2702
2703
2704
2705
2706 func (c *ProjectsLocationsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsListCall {
2707 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2708 return c
2709 }
2710
2711
2712
2713 func (c *ProjectsLocationsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsListCall {
2714 c.urlParams_.Set("pageToken", pageToken)
2715 return c
2716 }
2717
2718
2719
2720
2721 func (c *ProjectsLocationsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsListCall {
2722 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2723 return c
2724 }
2725
2726
2727
2728
2729 func (c *ProjectsLocationsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsListCall {
2730 c.ifNoneMatch_ = entityTag
2731 return c
2732 }
2733
2734
2735 func (c *ProjectsLocationsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsListCall {
2736 c.ctx_ = ctx
2737 return c
2738 }
2739
2740
2741
2742 func (c *ProjectsLocationsEvaluationsListCall) Header() http.Header {
2743 if c.header_ == nil {
2744 c.header_ = make(http.Header)
2745 }
2746 return c.header_
2747 }
2748
2749 func (c *ProjectsLocationsEvaluationsListCall) doRequest(alt string) (*http.Response, error) {
2750 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2751 if c.ifNoneMatch_ != "" {
2752 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2753 }
2754 var body io.Reader = nil
2755 c.urlParams_.Set("alt", alt)
2756 c.urlParams_.Set("prettyPrint", "false")
2757 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations")
2758 urls += "?" + c.urlParams_.Encode()
2759 req, err := http.NewRequest("GET", urls, body)
2760 if err != nil {
2761 return nil, err
2762 }
2763 req.Header = reqHeaders
2764 googleapi.Expand(req.URL, map[string]string{
2765 "parent": c.parent,
2766 })
2767 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2768 }
2769
2770
2771
2772
2773
2774
2775
2776 func (c *ProjectsLocationsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*ListEvaluationsResponse, error) {
2777 gensupport.SetOptions(c.urlParams_, opts...)
2778 res, err := c.doRequest("json")
2779 if res != nil && res.StatusCode == http.StatusNotModified {
2780 if res.Body != nil {
2781 res.Body.Close()
2782 }
2783 return nil, gensupport.WrapError(&googleapi.Error{
2784 Code: res.StatusCode,
2785 Header: res.Header,
2786 })
2787 }
2788 if err != nil {
2789 return nil, err
2790 }
2791 defer googleapi.CloseBody(res)
2792 if err := googleapi.CheckResponse(res); err != nil {
2793 return nil, gensupport.WrapError(err)
2794 }
2795 ret := &ListEvaluationsResponse{
2796 ServerResponse: googleapi.ServerResponse{
2797 Header: res.Header,
2798 HTTPStatusCode: res.StatusCode,
2799 },
2800 }
2801 target := &ret
2802 if err := gensupport.DecodeResponse(target, res); err != nil {
2803 return nil, err
2804 }
2805 return ret, nil
2806 }
2807
2808
2809
2810
2811 func (c *ProjectsLocationsEvaluationsListCall) Pages(ctx context.Context, f func(*ListEvaluationsResponse) error) error {
2812 c.ctx_ = ctx
2813 defer c.PageToken(c.urlParams_.Get("pageToken"))
2814 for {
2815 x, err := c.Do()
2816 if err != nil {
2817 return err
2818 }
2819 if err := f(x); err != nil {
2820 return err
2821 }
2822 if x.NextPageToken == "" {
2823 return nil
2824 }
2825 c.PageToken(x.NextPageToken)
2826 }
2827 }
2828
2829 type ProjectsLocationsEvaluationsExecutionsDeleteCall struct {
2830 s *Service
2831 name string
2832 urlParams_ gensupport.URLParams
2833 ctx_ context.Context
2834 header_ http.Header
2835 }
2836
2837
2838
2839
2840 func (r *ProjectsLocationsEvaluationsExecutionsService) Delete(name string) *ProjectsLocationsEvaluationsExecutionsDeleteCall {
2841 c := &ProjectsLocationsEvaluationsExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2842 c.name = name
2843 return c
2844 }
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857 func (c *ProjectsLocationsEvaluationsExecutionsDeleteCall) RequestId(requestId string) *ProjectsLocationsEvaluationsExecutionsDeleteCall {
2858 c.urlParams_.Set("requestId", requestId)
2859 return c
2860 }
2861
2862
2863
2864
2865 func (c *ProjectsLocationsEvaluationsExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsDeleteCall {
2866 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2867 return c
2868 }
2869
2870
2871 func (c *ProjectsLocationsEvaluationsExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsDeleteCall {
2872 c.ctx_ = ctx
2873 return c
2874 }
2875
2876
2877
2878 func (c *ProjectsLocationsEvaluationsExecutionsDeleteCall) Header() http.Header {
2879 if c.header_ == nil {
2880 c.header_ = make(http.Header)
2881 }
2882 return c.header_
2883 }
2884
2885 func (c *ProjectsLocationsEvaluationsExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) {
2886 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2887 var body io.Reader = nil
2888 c.urlParams_.Set("alt", alt)
2889 c.urlParams_.Set("prettyPrint", "false")
2890 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2891 urls += "?" + c.urlParams_.Encode()
2892 req, err := http.NewRequest("DELETE", urls, body)
2893 if err != nil {
2894 return nil, err
2895 }
2896 req.Header = reqHeaders
2897 googleapi.Expand(req.URL, map[string]string{
2898 "name": c.name,
2899 })
2900 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2901 }
2902
2903
2904
2905
2906
2907
2908 func (c *ProjectsLocationsEvaluationsExecutionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2909 gensupport.SetOptions(c.urlParams_, opts...)
2910 res, err := c.doRequest("json")
2911 if res != nil && res.StatusCode == http.StatusNotModified {
2912 if res.Body != nil {
2913 res.Body.Close()
2914 }
2915 return nil, gensupport.WrapError(&googleapi.Error{
2916 Code: res.StatusCode,
2917 Header: res.Header,
2918 })
2919 }
2920 if err != nil {
2921 return nil, err
2922 }
2923 defer googleapi.CloseBody(res)
2924 if err := googleapi.CheckResponse(res); err != nil {
2925 return nil, gensupport.WrapError(err)
2926 }
2927 ret := &Operation{
2928 ServerResponse: googleapi.ServerResponse{
2929 Header: res.Header,
2930 HTTPStatusCode: res.StatusCode,
2931 },
2932 }
2933 target := &ret
2934 if err := gensupport.DecodeResponse(target, res); err != nil {
2935 return nil, err
2936 }
2937 return ret, nil
2938 }
2939
2940 type ProjectsLocationsEvaluationsExecutionsGetCall struct {
2941 s *Service
2942 name string
2943 urlParams_ gensupport.URLParams
2944 ifNoneMatch_ string
2945 ctx_ context.Context
2946 header_ http.Header
2947 }
2948
2949
2950
2951
2952 func (r *ProjectsLocationsEvaluationsExecutionsService) Get(name string) *ProjectsLocationsEvaluationsExecutionsGetCall {
2953 c := &ProjectsLocationsEvaluationsExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2954 c.name = name
2955 return c
2956 }
2957
2958
2959
2960
2961 func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsGetCall {
2962 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2963 return c
2964 }
2965
2966
2967
2968
2969 func (c *ProjectsLocationsEvaluationsExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsExecutionsGetCall {
2970 c.ifNoneMatch_ = entityTag
2971 return c
2972 }
2973
2974
2975 func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsGetCall {
2976 c.ctx_ = ctx
2977 return c
2978 }
2979
2980
2981
2982 func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Header() http.Header {
2983 if c.header_ == nil {
2984 c.header_ = make(http.Header)
2985 }
2986 return c.header_
2987 }
2988
2989 func (c *ProjectsLocationsEvaluationsExecutionsGetCall) doRequest(alt string) (*http.Response, error) {
2990 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2991 if c.ifNoneMatch_ != "" {
2992 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2993 }
2994 var body io.Reader = nil
2995 c.urlParams_.Set("alt", alt)
2996 c.urlParams_.Set("prettyPrint", "false")
2997 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2998 urls += "?" + c.urlParams_.Encode()
2999 req, err := http.NewRequest("GET", urls, body)
3000 if err != nil {
3001 return nil, err
3002 }
3003 req.Header = reqHeaders
3004 googleapi.Expand(req.URL, map[string]string{
3005 "name": c.name,
3006 })
3007 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3008 }
3009
3010
3011
3012
3013
3014
3015 func (c *ProjectsLocationsEvaluationsExecutionsGetCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
3016 gensupport.SetOptions(c.urlParams_, opts...)
3017 res, err := c.doRequest("json")
3018 if res != nil && res.StatusCode == http.StatusNotModified {
3019 if res.Body != nil {
3020 res.Body.Close()
3021 }
3022 return nil, gensupport.WrapError(&googleapi.Error{
3023 Code: res.StatusCode,
3024 Header: res.Header,
3025 })
3026 }
3027 if err != nil {
3028 return nil, err
3029 }
3030 defer googleapi.CloseBody(res)
3031 if err := googleapi.CheckResponse(res); err != nil {
3032 return nil, gensupport.WrapError(err)
3033 }
3034 ret := &Execution{
3035 ServerResponse: googleapi.ServerResponse{
3036 Header: res.Header,
3037 HTTPStatusCode: res.StatusCode,
3038 },
3039 }
3040 target := &ret
3041 if err := gensupport.DecodeResponse(target, res); err != nil {
3042 return nil, err
3043 }
3044 return ret, nil
3045 }
3046
3047 type ProjectsLocationsEvaluationsExecutionsListCall struct {
3048 s *Service
3049 parent string
3050 urlParams_ gensupport.URLParams
3051 ifNoneMatch_ string
3052 ctx_ context.Context
3053 header_ http.Header
3054 }
3055
3056
3057
3058
3059
3060 func (r *ProjectsLocationsEvaluationsExecutionsService) List(parent string) *ProjectsLocationsEvaluationsExecutionsListCall {
3061 c := &ProjectsLocationsEvaluationsExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3062 c.parent = parent
3063 return c
3064 }
3065
3066
3067 func (c *ProjectsLocationsEvaluationsExecutionsListCall) Filter(filter string) *ProjectsLocationsEvaluationsExecutionsListCall {
3068 c.urlParams_.Set("filter", filter)
3069 return c
3070 }
3071
3072
3073
3074 func (c *ProjectsLocationsEvaluationsExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsEvaluationsExecutionsListCall {
3075 c.urlParams_.Set("orderBy", orderBy)
3076 return c
3077 }
3078
3079
3080
3081
3082 func (c *ProjectsLocationsEvaluationsExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsExecutionsListCall {
3083 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3084 return c
3085 }
3086
3087
3088
3089 func (c *ProjectsLocationsEvaluationsExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsExecutionsListCall {
3090 c.urlParams_.Set("pageToken", pageToken)
3091 return c
3092 }
3093
3094
3095
3096
3097 func (c *ProjectsLocationsEvaluationsExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsListCall {
3098 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3099 return c
3100 }
3101
3102
3103
3104
3105 func (c *ProjectsLocationsEvaluationsExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsExecutionsListCall {
3106 c.ifNoneMatch_ = entityTag
3107 return c
3108 }
3109
3110
3111 func (c *ProjectsLocationsEvaluationsExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsListCall {
3112 c.ctx_ = ctx
3113 return c
3114 }
3115
3116
3117
3118 func (c *ProjectsLocationsEvaluationsExecutionsListCall) Header() http.Header {
3119 if c.header_ == nil {
3120 c.header_ = make(http.Header)
3121 }
3122 return c.header_
3123 }
3124
3125 func (c *ProjectsLocationsEvaluationsExecutionsListCall) doRequest(alt string) (*http.Response, error) {
3126 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3127 if c.ifNoneMatch_ != "" {
3128 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3129 }
3130 var body io.Reader = nil
3131 c.urlParams_.Set("alt", alt)
3132 c.urlParams_.Set("prettyPrint", "false")
3133 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions")
3134 urls += "?" + c.urlParams_.Encode()
3135 req, err := http.NewRequest("GET", urls, body)
3136 if err != nil {
3137 return nil, err
3138 }
3139 req.Header = reqHeaders
3140 googleapi.Expand(req.URL, map[string]string{
3141 "parent": c.parent,
3142 })
3143 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3144 }
3145
3146
3147
3148
3149
3150
3151
3152 func (c *ProjectsLocationsEvaluationsExecutionsListCall) Do(opts ...googleapi.CallOption) (*ListExecutionsResponse, error) {
3153 gensupport.SetOptions(c.urlParams_, opts...)
3154 res, err := c.doRequest("json")
3155 if res != nil && res.StatusCode == http.StatusNotModified {
3156 if res.Body != nil {
3157 res.Body.Close()
3158 }
3159 return nil, gensupport.WrapError(&googleapi.Error{
3160 Code: res.StatusCode,
3161 Header: res.Header,
3162 })
3163 }
3164 if err != nil {
3165 return nil, err
3166 }
3167 defer googleapi.CloseBody(res)
3168 if err := googleapi.CheckResponse(res); err != nil {
3169 return nil, gensupport.WrapError(err)
3170 }
3171 ret := &ListExecutionsResponse{
3172 ServerResponse: googleapi.ServerResponse{
3173 Header: res.Header,
3174 HTTPStatusCode: res.StatusCode,
3175 },
3176 }
3177 target := &ret
3178 if err := gensupport.DecodeResponse(target, res); err != nil {
3179 return nil, err
3180 }
3181 return ret, nil
3182 }
3183
3184
3185
3186
3187 func (c *ProjectsLocationsEvaluationsExecutionsListCall) Pages(ctx context.Context, f func(*ListExecutionsResponse) error) error {
3188 c.ctx_ = ctx
3189 defer c.PageToken(c.urlParams_.Get("pageToken"))
3190 for {
3191 x, err := c.Do()
3192 if err != nil {
3193 return err
3194 }
3195 if err := f(x); err != nil {
3196 return err
3197 }
3198 if x.NextPageToken == "" {
3199 return nil
3200 }
3201 c.PageToken(x.NextPageToken)
3202 }
3203 }
3204
3205 type ProjectsLocationsEvaluationsExecutionsRunCall struct {
3206 s *Service
3207 name string
3208 runevaluationrequest *RunEvaluationRequest
3209 urlParams_ gensupport.URLParams
3210 ctx_ context.Context
3211 header_ http.Header
3212 }
3213
3214
3215
3216
3217
3218
3219 func (r *ProjectsLocationsEvaluationsExecutionsService) Run(name string, runevaluationrequest *RunEvaluationRequest) *ProjectsLocationsEvaluationsExecutionsRunCall {
3220 c := &ProjectsLocationsEvaluationsExecutionsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3221 c.name = name
3222 c.runevaluationrequest = runevaluationrequest
3223 return c
3224 }
3225
3226
3227
3228
3229 func (c *ProjectsLocationsEvaluationsExecutionsRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsRunCall {
3230 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3231 return c
3232 }
3233
3234
3235 func (c *ProjectsLocationsEvaluationsExecutionsRunCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsRunCall {
3236 c.ctx_ = ctx
3237 return c
3238 }
3239
3240
3241
3242 func (c *ProjectsLocationsEvaluationsExecutionsRunCall) Header() http.Header {
3243 if c.header_ == nil {
3244 c.header_ = make(http.Header)
3245 }
3246 return c.header_
3247 }
3248
3249 func (c *ProjectsLocationsEvaluationsExecutionsRunCall) doRequest(alt string) (*http.Response, error) {
3250 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3251 var body io.Reader = nil
3252 body, err := googleapi.WithoutDataWrapper.JSONReader(c.runevaluationrequest)
3253 if err != nil {
3254 return nil, err
3255 }
3256 c.urlParams_.Set("alt", alt)
3257 c.urlParams_.Set("prettyPrint", "false")
3258 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/executions:run")
3259 urls += "?" + c.urlParams_.Encode()
3260 req, err := http.NewRequest("POST", urls, body)
3261 if err != nil {
3262 return nil, err
3263 }
3264 req.Header = reqHeaders
3265 googleapi.Expand(req.URL, map[string]string{
3266 "name": c.name,
3267 })
3268 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3269 }
3270
3271
3272
3273
3274
3275
3276 func (c *ProjectsLocationsEvaluationsExecutionsRunCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3277 gensupport.SetOptions(c.urlParams_, opts...)
3278 res, err := c.doRequest("json")
3279 if res != nil && res.StatusCode == http.StatusNotModified {
3280 if res.Body != nil {
3281 res.Body.Close()
3282 }
3283 return nil, gensupport.WrapError(&googleapi.Error{
3284 Code: res.StatusCode,
3285 Header: res.Header,
3286 })
3287 }
3288 if err != nil {
3289 return nil, err
3290 }
3291 defer googleapi.CloseBody(res)
3292 if err := googleapi.CheckResponse(res); err != nil {
3293 return nil, gensupport.WrapError(err)
3294 }
3295 ret := &Operation{
3296 ServerResponse: googleapi.ServerResponse{
3297 Header: res.Header,
3298 HTTPStatusCode: res.StatusCode,
3299 },
3300 }
3301 target := &ret
3302 if err := gensupport.DecodeResponse(target, res); err != nil {
3303 return nil, err
3304 }
3305 return ret, nil
3306 }
3307
3308 type ProjectsLocationsEvaluationsExecutionsResultsListCall struct {
3309 s *Service
3310 parent string
3311 urlParams_ gensupport.URLParams
3312 ifNoneMatch_ string
3313 ctx_ context.Context
3314 header_ http.Header
3315 }
3316
3317
3318
3319
3320
3321 func (r *ProjectsLocationsEvaluationsExecutionsResultsService) List(parent string) *ProjectsLocationsEvaluationsExecutionsResultsListCall {
3322 c := &ProjectsLocationsEvaluationsExecutionsResultsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3323 c.parent = parent
3324 return c
3325 }
3326
3327
3328 func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) Filter(filter string) *ProjectsLocationsEvaluationsExecutionsResultsListCall {
3329 c.urlParams_.Set("filter", filter)
3330 return c
3331 }
3332
3333
3334
3335
3336 func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsExecutionsResultsListCall {
3337 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3338 return c
3339 }
3340
3341
3342
3343 func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsExecutionsResultsListCall {
3344 c.urlParams_.Set("pageToken", pageToken)
3345 return c
3346 }
3347
3348
3349
3350
3351 func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsResultsListCall {
3352 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3353 return c
3354 }
3355
3356
3357
3358
3359 func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsExecutionsResultsListCall {
3360 c.ifNoneMatch_ = entityTag
3361 return c
3362 }
3363
3364
3365 func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsResultsListCall {
3366 c.ctx_ = ctx
3367 return c
3368 }
3369
3370
3371
3372 func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) Header() http.Header {
3373 if c.header_ == nil {
3374 c.header_ = make(http.Header)
3375 }
3376 return c.header_
3377 }
3378
3379 func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) doRequest(alt string) (*http.Response, error) {
3380 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3381 if c.ifNoneMatch_ != "" {
3382 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3383 }
3384 var body io.Reader = nil
3385 c.urlParams_.Set("alt", alt)
3386 c.urlParams_.Set("prettyPrint", "false")
3387 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/results")
3388 urls += "?" + c.urlParams_.Encode()
3389 req, err := http.NewRequest("GET", urls, body)
3390 if err != nil {
3391 return nil, err
3392 }
3393 req.Header = reqHeaders
3394 googleapi.Expand(req.URL, map[string]string{
3395 "parent": c.parent,
3396 })
3397 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3398 }
3399
3400
3401
3402
3403
3404
3405
3406 func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) Do(opts ...googleapi.CallOption) (*ListExecutionResultsResponse, error) {
3407 gensupport.SetOptions(c.urlParams_, opts...)
3408 res, err := c.doRequest("json")
3409 if res != nil && res.StatusCode == http.StatusNotModified {
3410 if res.Body != nil {
3411 res.Body.Close()
3412 }
3413 return nil, gensupport.WrapError(&googleapi.Error{
3414 Code: res.StatusCode,
3415 Header: res.Header,
3416 })
3417 }
3418 if err != nil {
3419 return nil, err
3420 }
3421 defer googleapi.CloseBody(res)
3422 if err := googleapi.CheckResponse(res); err != nil {
3423 return nil, gensupport.WrapError(err)
3424 }
3425 ret := &ListExecutionResultsResponse{
3426 ServerResponse: googleapi.ServerResponse{
3427 Header: res.Header,
3428 HTTPStatusCode: res.StatusCode,
3429 },
3430 }
3431 target := &ret
3432 if err := gensupport.DecodeResponse(target, res); err != nil {
3433 return nil, err
3434 }
3435 return ret, nil
3436 }
3437
3438
3439
3440
3441 func (c *ProjectsLocationsEvaluationsExecutionsResultsListCall) Pages(ctx context.Context, f func(*ListExecutionResultsResponse) error) error {
3442 c.ctx_ = ctx
3443 defer c.PageToken(c.urlParams_.Get("pageToken"))
3444 for {
3445 x, err := c.Do()
3446 if err != nil {
3447 return err
3448 }
3449 if err := f(x); err != nil {
3450 return err
3451 }
3452 if x.NextPageToken == "" {
3453 return nil
3454 }
3455 c.PageToken(x.NextPageToken)
3456 }
3457 }
3458
3459 type ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall struct {
3460 s *Service
3461 parent string
3462 urlParams_ gensupport.URLParams
3463 ifNoneMatch_ string
3464 ctx_ context.Context
3465 header_ http.Header
3466 }
3467
3468
3469
3470
3471 func (r *ProjectsLocationsEvaluationsExecutionsScannedResourcesService) List(parent string) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall {
3472 c := &ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3473 c.parent = parent
3474 return c
3475 }
3476
3477
3478 func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Filter(filter string) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall {
3479 c.urlParams_.Set("filter", filter)
3480 return c
3481 }
3482
3483
3484
3485 func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) OrderBy(orderBy string) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall {
3486 c.urlParams_.Set("orderBy", orderBy)
3487 return c
3488 }
3489
3490
3491
3492
3493 func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) PageSize(pageSize int64) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall {
3494 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3495 return c
3496 }
3497
3498
3499
3500 func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) PageToken(pageToken string) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall {
3501 c.urlParams_.Set("pageToken", pageToken)
3502 return c
3503 }
3504
3505
3506 func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Rule(rule string) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall {
3507 c.urlParams_.Set("rule", rule)
3508 return c
3509 }
3510
3511
3512
3513
3514 func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall {
3515 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3516 return c
3517 }
3518
3519
3520
3521
3522 func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall {
3523 c.ifNoneMatch_ = entityTag
3524 return c
3525 }
3526
3527
3528 func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall {
3529 c.ctx_ = ctx
3530 return c
3531 }
3532
3533
3534
3535 func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Header() http.Header {
3536 if c.header_ == nil {
3537 c.header_ = make(http.Header)
3538 }
3539 return c.header_
3540 }
3541
3542 func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) doRequest(alt string) (*http.Response, error) {
3543 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3544 if c.ifNoneMatch_ != "" {
3545 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3546 }
3547 var body io.Reader = nil
3548 c.urlParams_.Set("alt", alt)
3549 c.urlParams_.Set("prettyPrint", "false")
3550 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/scannedResources")
3551 urls += "?" + c.urlParams_.Encode()
3552 req, err := http.NewRequest("GET", urls, body)
3553 if err != nil {
3554 return nil, err
3555 }
3556 req.Header = reqHeaders
3557 googleapi.Expand(req.URL, map[string]string{
3558 "parent": c.parent,
3559 })
3560 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3561 }
3562
3563
3564
3565
3566
3567
3568
3569 func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Do(opts ...googleapi.CallOption) (*ListScannedResourcesResponse, error) {
3570 gensupport.SetOptions(c.urlParams_, opts...)
3571 res, err := c.doRequest("json")
3572 if res != nil && res.StatusCode == http.StatusNotModified {
3573 if res.Body != nil {
3574 res.Body.Close()
3575 }
3576 return nil, gensupport.WrapError(&googleapi.Error{
3577 Code: res.StatusCode,
3578 Header: res.Header,
3579 })
3580 }
3581 if err != nil {
3582 return nil, err
3583 }
3584 defer googleapi.CloseBody(res)
3585 if err := googleapi.CheckResponse(res); err != nil {
3586 return nil, gensupport.WrapError(err)
3587 }
3588 ret := &ListScannedResourcesResponse{
3589 ServerResponse: googleapi.ServerResponse{
3590 Header: res.Header,
3591 HTTPStatusCode: res.StatusCode,
3592 },
3593 }
3594 target := &ret
3595 if err := gensupport.DecodeResponse(target, res); err != nil {
3596 return nil, err
3597 }
3598 return ret, nil
3599 }
3600
3601
3602
3603
3604 func (c *ProjectsLocationsEvaluationsExecutionsScannedResourcesListCall) Pages(ctx context.Context, f func(*ListScannedResourcesResponse) error) error {
3605 c.ctx_ = ctx
3606 defer c.PageToken(c.urlParams_.Get("pageToken"))
3607 for {
3608 x, err := c.Do()
3609 if err != nil {
3610 return err
3611 }
3612 if err := f(x); err != nil {
3613 return err
3614 }
3615 if x.NextPageToken == "" {
3616 return nil
3617 }
3618 c.PageToken(x.NextPageToken)
3619 }
3620 }
3621
3622 type ProjectsLocationsInsightsWriteInsightCall struct {
3623 s *Service
3624 location string
3625 writeinsightrequest *WriteInsightRequest
3626 urlParams_ gensupport.URLParams
3627 ctx_ context.Context
3628 header_ http.Header
3629 }
3630
3631
3632
3633
3634
3635 func (r *ProjectsLocationsInsightsService) WriteInsight(location string, writeinsightrequest *WriteInsightRequest) *ProjectsLocationsInsightsWriteInsightCall {
3636 c := &ProjectsLocationsInsightsWriteInsightCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3637 c.location = location
3638 c.writeinsightrequest = writeinsightrequest
3639 return c
3640 }
3641
3642
3643
3644
3645 func (c *ProjectsLocationsInsightsWriteInsightCall) Fields(s ...googleapi.Field) *ProjectsLocationsInsightsWriteInsightCall {
3646 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3647 return c
3648 }
3649
3650
3651 func (c *ProjectsLocationsInsightsWriteInsightCall) Context(ctx context.Context) *ProjectsLocationsInsightsWriteInsightCall {
3652 c.ctx_ = ctx
3653 return c
3654 }
3655
3656
3657
3658 func (c *ProjectsLocationsInsightsWriteInsightCall) Header() http.Header {
3659 if c.header_ == nil {
3660 c.header_ = make(http.Header)
3661 }
3662 return c.header_
3663 }
3664
3665 func (c *ProjectsLocationsInsightsWriteInsightCall) doRequest(alt string) (*http.Response, error) {
3666 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3667 var body io.Reader = nil
3668 body, err := googleapi.WithoutDataWrapper.JSONReader(c.writeinsightrequest)
3669 if err != nil {
3670 return nil, err
3671 }
3672 c.urlParams_.Set("alt", alt)
3673 c.urlParams_.Set("prettyPrint", "false")
3674 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}/insights:writeInsight")
3675 urls += "?" + c.urlParams_.Encode()
3676 req, err := http.NewRequest("POST", urls, body)
3677 if err != nil {
3678 return nil, err
3679 }
3680 req.Header = reqHeaders
3681 googleapi.Expand(req.URL, map[string]string{
3682 "location": c.location,
3683 })
3684 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3685 }
3686
3687
3688
3689
3690
3691
3692
3693 func (c *ProjectsLocationsInsightsWriteInsightCall) Do(opts ...googleapi.CallOption) (*WriteInsightResponse, error) {
3694 gensupport.SetOptions(c.urlParams_, opts...)
3695 res, err := c.doRequest("json")
3696 if res != nil && res.StatusCode == http.StatusNotModified {
3697 if res.Body != nil {
3698 res.Body.Close()
3699 }
3700 return nil, gensupport.WrapError(&googleapi.Error{
3701 Code: res.StatusCode,
3702 Header: res.Header,
3703 })
3704 }
3705 if err != nil {
3706 return nil, err
3707 }
3708 defer googleapi.CloseBody(res)
3709 if err := googleapi.CheckResponse(res); err != nil {
3710 return nil, gensupport.WrapError(err)
3711 }
3712 ret := &WriteInsightResponse{
3713 ServerResponse: googleapi.ServerResponse{
3714 Header: res.Header,
3715 HTTPStatusCode: res.StatusCode,
3716 },
3717 }
3718 target := &ret
3719 if err := gensupport.DecodeResponse(target, res); err != nil {
3720 return nil, err
3721 }
3722 return ret, nil
3723 }
3724
3725 type ProjectsLocationsOperationsCancelCall struct {
3726 s *Service
3727 name string
3728 canceloperationrequest *CancelOperationRequest
3729 urlParams_ gensupport.URLParams
3730 ctx_ context.Context
3731 header_ http.Header
3732 }
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
3746 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3747 c.name = name
3748 c.canceloperationrequest = canceloperationrequest
3749 return c
3750 }
3751
3752
3753
3754
3755 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
3756 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3757 return c
3758 }
3759
3760
3761 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
3762 c.ctx_ = ctx
3763 return c
3764 }
3765
3766
3767
3768 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
3769 if c.header_ == nil {
3770 c.header_ = make(http.Header)
3771 }
3772 return c.header_
3773 }
3774
3775 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
3776 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3777 var body io.Reader = nil
3778 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
3779 if err != nil {
3780 return nil, err
3781 }
3782 c.urlParams_.Set("alt", alt)
3783 c.urlParams_.Set("prettyPrint", "false")
3784 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
3785 urls += "?" + c.urlParams_.Encode()
3786 req, err := http.NewRequest("POST", urls, body)
3787 if err != nil {
3788 return nil, err
3789 }
3790 req.Header = reqHeaders
3791 googleapi.Expand(req.URL, map[string]string{
3792 "name": c.name,
3793 })
3794 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3795 }
3796
3797
3798
3799
3800
3801
3802 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3803 gensupport.SetOptions(c.urlParams_, opts...)
3804 res, err := c.doRequest("json")
3805 if res != nil && res.StatusCode == http.StatusNotModified {
3806 if res.Body != nil {
3807 res.Body.Close()
3808 }
3809 return nil, gensupport.WrapError(&googleapi.Error{
3810 Code: res.StatusCode,
3811 Header: res.Header,
3812 })
3813 }
3814 if err != nil {
3815 return nil, err
3816 }
3817 defer googleapi.CloseBody(res)
3818 if err := googleapi.CheckResponse(res); err != nil {
3819 return nil, gensupport.WrapError(err)
3820 }
3821 ret := &Empty{
3822 ServerResponse: googleapi.ServerResponse{
3823 Header: res.Header,
3824 HTTPStatusCode: res.StatusCode,
3825 },
3826 }
3827 target := &ret
3828 if err := gensupport.DecodeResponse(target, res); err != nil {
3829 return nil, err
3830 }
3831 return ret, nil
3832 }
3833
3834 type ProjectsLocationsOperationsDeleteCall struct {
3835 s *Service
3836 name string
3837 urlParams_ gensupport.URLParams
3838 ctx_ context.Context
3839 header_ http.Header
3840 }
3841
3842
3843
3844
3845
3846
3847
3848 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
3849 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3850 c.name = name
3851 return c
3852 }
3853
3854
3855
3856
3857 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
3858 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3859 return c
3860 }
3861
3862
3863 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
3864 c.ctx_ = ctx
3865 return c
3866 }
3867
3868
3869
3870 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
3871 if c.header_ == nil {
3872 c.header_ = make(http.Header)
3873 }
3874 return c.header_
3875 }
3876
3877 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
3878 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3879 var body io.Reader = nil
3880 c.urlParams_.Set("alt", alt)
3881 c.urlParams_.Set("prettyPrint", "false")
3882 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3883 urls += "?" + c.urlParams_.Encode()
3884 req, err := http.NewRequest("DELETE", urls, body)
3885 if err != nil {
3886 return nil, err
3887 }
3888 req.Header = reqHeaders
3889 googleapi.Expand(req.URL, map[string]string{
3890 "name": c.name,
3891 })
3892 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3893 }
3894
3895
3896
3897
3898
3899
3900 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
3901 gensupport.SetOptions(c.urlParams_, opts...)
3902 res, err := c.doRequest("json")
3903 if res != nil && res.StatusCode == http.StatusNotModified {
3904 if res.Body != nil {
3905 res.Body.Close()
3906 }
3907 return nil, gensupport.WrapError(&googleapi.Error{
3908 Code: res.StatusCode,
3909 Header: res.Header,
3910 })
3911 }
3912 if err != nil {
3913 return nil, err
3914 }
3915 defer googleapi.CloseBody(res)
3916 if err := googleapi.CheckResponse(res); err != nil {
3917 return nil, gensupport.WrapError(err)
3918 }
3919 ret := &Empty{
3920 ServerResponse: googleapi.ServerResponse{
3921 Header: res.Header,
3922 HTTPStatusCode: res.StatusCode,
3923 },
3924 }
3925 target := &ret
3926 if err := gensupport.DecodeResponse(target, res); err != nil {
3927 return nil, err
3928 }
3929 return ret, nil
3930 }
3931
3932 type ProjectsLocationsOperationsGetCall struct {
3933 s *Service
3934 name string
3935 urlParams_ gensupport.URLParams
3936 ifNoneMatch_ string
3937 ctx_ context.Context
3938 header_ http.Header
3939 }
3940
3941
3942
3943
3944
3945
3946 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
3947 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3948 c.name = name
3949 return c
3950 }
3951
3952
3953
3954
3955 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
3956 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3957 return c
3958 }
3959
3960
3961
3962
3963 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
3964 c.ifNoneMatch_ = entityTag
3965 return c
3966 }
3967
3968
3969 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
3970 c.ctx_ = ctx
3971 return c
3972 }
3973
3974
3975
3976 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
3977 if c.header_ == nil {
3978 c.header_ = make(http.Header)
3979 }
3980 return c.header_
3981 }
3982
3983 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
3984 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3985 if c.ifNoneMatch_ != "" {
3986 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3987 }
3988 var body io.Reader = nil
3989 c.urlParams_.Set("alt", alt)
3990 c.urlParams_.Set("prettyPrint", "false")
3991 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3992 urls += "?" + c.urlParams_.Encode()
3993 req, err := http.NewRequest("GET", urls, body)
3994 if err != nil {
3995 return nil, err
3996 }
3997 req.Header = reqHeaders
3998 googleapi.Expand(req.URL, map[string]string{
3999 "name": c.name,
4000 })
4001 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4002 }
4003
4004
4005
4006
4007
4008
4009 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4010 gensupport.SetOptions(c.urlParams_, opts...)
4011 res, err := c.doRequest("json")
4012 if res != nil && res.StatusCode == http.StatusNotModified {
4013 if res.Body != nil {
4014 res.Body.Close()
4015 }
4016 return nil, gensupport.WrapError(&googleapi.Error{
4017 Code: res.StatusCode,
4018 Header: res.Header,
4019 })
4020 }
4021 if err != nil {
4022 return nil, err
4023 }
4024 defer googleapi.CloseBody(res)
4025 if err := googleapi.CheckResponse(res); err != nil {
4026 return nil, gensupport.WrapError(err)
4027 }
4028 ret := &Operation{
4029 ServerResponse: googleapi.ServerResponse{
4030 Header: res.Header,
4031 HTTPStatusCode: res.StatusCode,
4032 },
4033 }
4034 target := &ret
4035 if err := gensupport.DecodeResponse(target, res); err != nil {
4036 return nil, err
4037 }
4038 return ret, nil
4039 }
4040
4041 type ProjectsLocationsOperationsListCall struct {
4042 s *Service
4043 name string
4044 urlParams_ gensupport.URLParams
4045 ifNoneMatch_ string
4046 ctx_ context.Context
4047 header_ http.Header
4048 }
4049
4050
4051
4052
4053
4054 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
4055 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4056 c.name = name
4057 return c
4058 }
4059
4060
4061 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
4062 c.urlParams_.Set("filter", filter)
4063 return c
4064 }
4065
4066
4067
4068 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
4069 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4070 return c
4071 }
4072
4073
4074
4075 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
4076 c.urlParams_.Set("pageToken", pageToken)
4077 return c
4078 }
4079
4080
4081
4082
4083 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
4084 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4085 return c
4086 }
4087
4088
4089
4090
4091 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
4092 c.ifNoneMatch_ = entityTag
4093 return c
4094 }
4095
4096
4097 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
4098 c.ctx_ = ctx
4099 return c
4100 }
4101
4102
4103
4104 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
4105 if c.header_ == nil {
4106 c.header_ = make(http.Header)
4107 }
4108 return c.header_
4109 }
4110
4111 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
4112 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4113 if c.ifNoneMatch_ != "" {
4114 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4115 }
4116 var body io.Reader = nil
4117 c.urlParams_.Set("alt", alt)
4118 c.urlParams_.Set("prettyPrint", "false")
4119 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
4120 urls += "?" + c.urlParams_.Encode()
4121 req, err := http.NewRequest("GET", urls, body)
4122 if err != nil {
4123 return nil, err
4124 }
4125 req.Header = reqHeaders
4126 googleapi.Expand(req.URL, map[string]string{
4127 "name": c.name,
4128 })
4129 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4130 }
4131
4132
4133
4134
4135
4136
4137
4138 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
4139 gensupport.SetOptions(c.urlParams_, opts...)
4140 res, err := c.doRequest("json")
4141 if res != nil && res.StatusCode == http.StatusNotModified {
4142 if res.Body != nil {
4143 res.Body.Close()
4144 }
4145 return nil, gensupport.WrapError(&googleapi.Error{
4146 Code: res.StatusCode,
4147 Header: res.Header,
4148 })
4149 }
4150 if err != nil {
4151 return nil, err
4152 }
4153 defer googleapi.CloseBody(res)
4154 if err := googleapi.CheckResponse(res); err != nil {
4155 return nil, gensupport.WrapError(err)
4156 }
4157 ret := &ListOperationsResponse{
4158 ServerResponse: googleapi.ServerResponse{
4159 Header: res.Header,
4160 HTTPStatusCode: res.StatusCode,
4161 },
4162 }
4163 target := &ret
4164 if err := gensupport.DecodeResponse(target, res); err != nil {
4165 return nil, err
4166 }
4167 return ret, nil
4168 }
4169
4170
4171
4172
4173 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
4174 c.ctx_ = ctx
4175 defer c.PageToken(c.urlParams_.Get("pageToken"))
4176 for {
4177 x, err := c.Do()
4178 if err != nil {
4179 return err
4180 }
4181 if err := f(x); err != nil {
4182 return err
4183 }
4184 if x.NextPageToken == "" {
4185 return nil
4186 }
4187 c.PageToken(x.NextPageToken)
4188 }
4189 }
4190
4191 type ProjectsLocationsRulesListCall struct {
4192 s *Service
4193 parent string
4194 urlParams_ gensupport.URLParams
4195 ifNoneMatch_ string
4196 ctx_ context.Context
4197 header_ http.Header
4198 }
4199
4200
4201
4202
4203
4204
4205 func (r *ProjectsLocationsRulesService) List(parent string) *ProjectsLocationsRulesListCall {
4206 c := &ProjectsLocationsRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4207 c.parent = parent
4208 return c
4209 }
4210
4211
4212
4213 func (c *ProjectsLocationsRulesListCall) CustomRulesBucket(customRulesBucket string) *ProjectsLocationsRulesListCall {
4214 c.urlParams_.Set("customRulesBucket", customRulesBucket)
4215 return c
4216 }
4217
4218
4219
4220 func (c *ProjectsLocationsRulesListCall) Filter(filter string) *ProjectsLocationsRulesListCall {
4221 c.urlParams_.Set("filter", filter)
4222 return c
4223 }
4224
4225
4226
4227
4228 func (c *ProjectsLocationsRulesListCall) PageSize(pageSize int64) *ProjectsLocationsRulesListCall {
4229 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4230 return c
4231 }
4232
4233
4234
4235 func (c *ProjectsLocationsRulesListCall) PageToken(pageToken string) *ProjectsLocationsRulesListCall {
4236 c.urlParams_.Set("pageToken", pageToken)
4237 return c
4238 }
4239
4240
4241
4242
4243 func (c *ProjectsLocationsRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRulesListCall {
4244 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4245 return c
4246 }
4247
4248
4249
4250
4251 func (c *ProjectsLocationsRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRulesListCall {
4252 c.ifNoneMatch_ = entityTag
4253 return c
4254 }
4255
4256
4257 func (c *ProjectsLocationsRulesListCall) Context(ctx context.Context) *ProjectsLocationsRulesListCall {
4258 c.ctx_ = ctx
4259 return c
4260 }
4261
4262
4263
4264 func (c *ProjectsLocationsRulesListCall) Header() http.Header {
4265 if c.header_ == nil {
4266 c.header_ = make(http.Header)
4267 }
4268 return c.header_
4269 }
4270
4271 func (c *ProjectsLocationsRulesListCall) doRequest(alt string) (*http.Response, error) {
4272 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4273 if c.ifNoneMatch_ != "" {
4274 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4275 }
4276 var body io.Reader = nil
4277 c.urlParams_.Set("alt", alt)
4278 c.urlParams_.Set("prettyPrint", "false")
4279 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/rules")
4280 urls += "?" + c.urlParams_.Encode()
4281 req, err := http.NewRequest("GET", urls, body)
4282 if err != nil {
4283 return nil, err
4284 }
4285 req.Header = reqHeaders
4286 googleapi.Expand(req.URL, map[string]string{
4287 "parent": c.parent,
4288 })
4289 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4290 }
4291
4292
4293
4294
4295
4296
4297
4298 func (c *ProjectsLocationsRulesListCall) Do(opts ...googleapi.CallOption) (*ListRulesResponse, error) {
4299 gensupport.SetOptions(c.urlParams_, opts...)
4300 res, err := c.doRequest("json")
4301 if res != nil && res.StatusCode == http.StatusNotModified {
4302 if res.Body != nil {
4303 res.Body.Close()
4304 }
4305 return nil, gensupport.WrapError(&googleapi.Error{
4306 Code: res.StatusCode,
4307 Header: res.Header,
4308 })
4309 }
4310 if err != nil {
4311 return nil, err
4312 }
4313 defer googleapi.CloseBody(res)
4314 if err := googleapi.CheckResponse(res); err != nil {
4315 return nil, gensupport.WrapError(err)
4316 }
4317 ret := &ListRulesResponse{
4318 ServerResponse: googleapi.ServerResponse{
4319 Header: res.Header,
4320 HTTPStatusCode: res.StatusCode,
4321 },
4322 }
4323 target := &ret
4324 if err := gensupport.DecodeResponse(target, res); err != nil {
4325 return nil, err
4326 }
4327 return ret, nil
4328 }
4329
4330
4331
4332
4333 func (c *ProjectsLocationsRulesListCall) Pages(ctx context.Context, f func(*ListRulesResponse) error) error {
4334 c.ctx_ = ctx
4335 defer c.PageToken(c.urlParams_.Get("pageToken"))
4336 for {
4337 x, err := c.Do()
4338 if err != nil {
4339 return err
4340 }
4341 if err := f(x); err != nil {
4342 return err
4343 }
4344 if x.NextPageToken == "" {
4345 return nil
4346 }
4347 c.PageToken(x.NextPageToken)
4348 }
4349 }
4350
View as plain text