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