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