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 osconfig
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 = "osconfig:v1"
90 const apiName = "osconfig"
91 const apiVersion = "v1"
92 const basePath = "https://osconfig.googleapis.com/"
93 const basePathTemplate = "https://osconfig.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://osconfig.mtls.googleapis.com/"
95
96
97 const (
98
99
100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
101 )
102
103
104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
105 scopesOption := internaloption.WithDefaultScopes(
106 "https://www.googleapis.com/auth/cloud-platform",
107 )
108
109 opts = append([]option.ClientOption{scopesOption}, opts...)
110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
113 opts = append(opts, internaloption.EnableNewAuthLibrary())
114 client, endpoint, err := htransport.NewClient(ctx, opts...)
115 if err != nil {
116 return nil, err
117 }
118 s, err := New(client)
119 if err != nil {
120 return nil, err
121 }
122 if endpoint != "" {
123 s.BasePath = endpoint
124 }
125 return s, nil
126 }
127
128
129
130
131
132
133 func New(client *http.Client) (*Service, error) {
134 if client == nil {
135 return nil, errors.New("client is nil")
136 }
137 s := &Service{client: client, BasePath: basePath}
138 s.Projects = NewProjectsService(s)
139 return s, nil
140 }
141
142 type Service struct {
143 client *http.Client
144 BasePath string
145 UserAgent string
146
147 Projects *ProjectsService
148 }
149
150 func (s *Service) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *Service) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Locations = NewProjectsLocationsService(s)
160 rs.PatchDeployments = NewProjectsPatchDeploymentsService(s)
161 rs.PatchJobs = NewProjectsPatchJobsService(s)
162 return rs
163 }
164
165 type ProjectsService struct {
166 s *Service
167
168 Locations *ProjectsLocationsService
169
170 PatchDeployments *ProjectsPatchDeploymentsService
171
172 PatchJobs *ProjectsPatchJobsService
173 }
174
175 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
176 rs := &ProjectsLocationsService{s: s}
177 rs.Global = NewProjectsLocationsGlobalService(s)
178 rs.Instances = NewProjectsLocationsInstancesService(s)
179 rs.OsPolicyAssignments = NewProjectsLocationsOsPolicyAssignmentsService(s)
180 return rs
181 }
182
183 type ProjectsLocationsService struct {
184 s *Service
185
186 Global *ProjectsLocationsGlobalService
187
188 Instances *ProjectsLocationsInstancesService
189
190 OsPolicyAssignments *ProjectsLocationsOsPolicyAssignmentsService
191 }
192
193 func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService {
194 rs := &ProjectsLocationsGlobalService{s: s}
195 return rs
196 }
197
198 type ProjectsLocationsGlobalService struct {
199 s *Service
200 }
201
202 func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService {
203 rs := &ProjectsLocationsInstancesService{s: s}
204 rs.Inventories = NewProjectsLocationsInstancesInventoriesService(s)
205 rs.OsPolicyAssignments = NewProjectsLocationsInstancesOsPolicyAssignmentsService(s)
206 rs.VulnerabilityReports = NewProjectsLocationsInstancesVulnerabilityReportsService(s)
207 return rs
208 }
209
210 type ProjectsLocationsInstancesService struct {
211 s *Service
212
213 Inventories *ProjectsLocationsInstancesInventoriesService
214
215 OsPolicyAssignments *ProjectsLocationsInstancesOsPolicyAssignmentsService
216
217 VulnerabilityReports *ProjectsLocationsInstancesVulnerabilityReportsService
218 }
219
220 func NewProjectsLocationsInstancesInventoriesService(s *Service) *ProjectsLocationsInstancesInventoriesService {
221 rs := &ProjectsLocationsInstancesInventoriesService{s: s}
222 return rs
223 }
224
225 type ProjectsLocationsInstancesInventoriesService struct {
226 s *Service
227 }
228
229 func NewProjectsLocationsInstancesOsPolicyAssignmentsService(s *Service) *ProjectsLocationsInstancesOsPolicyAssignmentsService {
230 rs := &ProjectsLocationsInstancesOsPolicyAssignmentsService{s: s}
231 rs.Reports = NewProjectsLocationsInstancesOsPolicyAssignmentsReportsService(s)
232 return rs
233 }
234
235 type ProjectsLocationsInstancesOsPolicyAssignmentsService struct {
236 s *Service
237
238 Reports *ProjectsLocationsInstancesOsPolicyAssignmentsReportsService
239 }
240
241 func NewProjectsLocationsInstancesOsPolicyAssignmentsReportsService(s *Service) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsService {
242 rs := &ProjectsLocationsInstancesOsPolicyAssignmentsReportsService{s: s}
243 return rs
244 }
245
246 type ProjectsLocationsInstancesOsPolicyAssignmentsReportsService struct {
247 s *Service
248 }
249
250 func NewProjectsLocationsInstancesVulnerabilityReportsService(s *Service) *ProjectsLocationsInstancesVulnerabilityReportsService {
251 rs := &ProjectsLocationsInstancesVulnerabilityReportsService{s: s}
252 return rs
253 }
254
255 type ProjectsLocationsInstancesVulnerabilityReportsService struct {
256 s *Service
257 }
258
259 func NewProjectsLocationsOsPolicyAssignmentsService(s *Service) *ProjectsLocationsOsPolicyAssignmentsService {
260 rs := &ProjectsLocationsOsPolicyAssignmentsService{s: s}
261 rs.Operations = NewProjectsLocationsOsPolicyAssignmentsOperationsService(s)
262 return rs
263 }
264
265 type ProjectsLocationsOsPolicyAssignmentsService struct {
266 s *Service
267
268 Operations *ProjectsLocationsOsPolicyAssignmentsOperationsService
269 }
270
271 func NewProjectsLocationsOsPolicyAssignmentsOperationsService(s *Service) *ProjectsLocationsOsPolicyAssignmentsOperationsService {
272 rs := &ProjectsLocationsOsPolicyAssignmentsOperationsService{s: s}
273 return rs
274 }
275
276 type ProjectsLocationsOsPolicyAssignmentsOperationsService struct {
277 s *Service
278 }
279
280 func NewProjectsPatchDeploymentsService(s *Service) *ProjectsPatchDeploymentsService {
281 rs := &ProjectsPatchDeploymentsService{s: s}
282 return rs
283 }
284
285 type ProjectsPatchDeploymentsService struct {
286 s *Service
287 }
288
289 func NewProjectsPatchJobsService(s *Service) *ProjectsPatchJobsService {
290 rs := &ProjectsPatchJobsService{s: s}
291 rs.InstanceDetails = NewProjectsPatchJobsInstanceDetailsService(s)
292 return rs
293 }
294
295 type ProjectsPatchJobsService struct {
296 s *Service
297
298 InstanceDetails *ProjectsPatchJobsInstanceDetailsService
299 }
300
301 func NewProjectsPatchJobsInstanceDetailsService(s *Service) *ProjectsPatchJobsInstanceDetailsService {
302 rs := &ProjectsPatchJobsInstanceDetailsService{s: s}
303 return rs
304 }
305
306 type ProjectsPatchJobsInstanceDetailsService struct {
307 s *Service
308 }
309
310
311
312
313 type AptSettings struct {
314
315
316 Excludes []string `json:"excludes,omitempty"`
317
318
319
320
321 ExclusivePackages []string `json:"exclusivePackages,omitempty"`
322
323
324
325
326
327
328
329 Type string `json:"type,omitempty"`
330
331
332
333
334
335 ForceSendFields []string `json:"-"`
336
337
338
339
340 NullFields []string `json:"-"`
341 }
342
343 func (s *AptSettings) MarshalJSON() ([]byte, error) {
344 type NoMethod AptSettings
345 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
346 }
347
348
349
350 type CVSSv3 struct {
351
352
353
354
355
356
357
358
359
360
361
362
363
364 AttackComplexity string `json:"attackComplexity,omitempty"`
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381 AttackVector string `json:"attackVector,omitempty"`
382
383
384
385
386
387
388
389
390
391 AvailabilityImpact string `json:"availabilityImpact,omitempty"`
392
393
394 BaseScore float64 `json:"baseScore,omitempty"`
395
396
397
398
399
400
401
402
403
404 ConfidentialityImpact string `json:"confidentialityImpact,omitempty"`
405
406
407
408 ExploitabilityScore float64 `json:"exploitabilityScore,omitempty"`
409
410
411 ImpactScore float64 `json:"impactScore,omitempty"`
412
413
414
415
416
417
418
419
420 IntegrityImpact string `json:"integrityImpact,omitempty"`
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436 PrivilegesRequired string `json:"privilegesRequired,omitempty"`
437
438
439
440
441
442
443
444
445
446
447 Scope string `json:"scope,omitempty"`
448
449
450
451
452
453
454
455
456
457
458
459 UserInteraction string `json:"userInteraction,omitempty"`
460
461
462
463
464
465 ForceSendFields []string `json:"-"`
466
467
468
469
470 NullFields []string `json:"-"`
471 }
472
473 func (s *CVSSv3) MarshalJSON() ([]byte, error) {
474 type NoMethod CVSSv3
475 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
476 }
477
478 func (s *CVSSv3) UnmarshalJSON(data []byte) error {
479 type NoMethod CVSSv3
480 var s1 struct {
481 BaseScore gensupport.JSONFloat64 `json:"baseScore"`
482 ExploitabilityScore gensupport.JSONFloat64 `json:"exploitabilityScore"`
483 ImpactScore gensupport.JSONFloat64 `json:"impactScore"`
484 *NoMethod
485 }
486 s1.NoMethod = (*NoMethod)(s)
487 if err := json.Unmarshal(data, &s1); err != nil {
488 return err
489 }
490 s.BaseScore = float64(s1.BaseScore)
491 s.ExploitabilityScore = float64(s1.ExploitabilityScore)
492 s.ImpactScore = float64(s1.ImpactScore)
493 return nil
494 }
495
496
497 type CancelOperationRequest struct {
498 }
499
500
501 type CancelPatchJobRequest struct {
502 }
503
504
505
506
507
508
509
510
511
512
513 type Date struct {
514
515
516
517 Day int64 `json:"day,omitempty"`
518
519
520 Month int64 `json:"month,omitempty"`
521
522
523 Year int64 `json:"year,omitempty"`
524
525
526
527
528
529 ForceSendFields []string `json:"-"`
530
531
532
533
534 NullFields []string `json:"-"`
535 }
536
537 func (s *Date) MarshalJSON() ([]byte, error) {
538 type NoMethod Date
539 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
540 }
541
542
543
544
545
546 type Empty struct {
547
548 googleapi.ServerResponse `json:"-"`
549 }
550
551
552 type ExecStep struct {
553
554
555 LinuxExecStepConfig *ExecStepConfig `json:"linuxExecStepConfig,omitempty"`
556
557
558 WindowsExecStepConfig *ExecStepConfig `json:"windowsExecStepConfig,omitempty"`
559
560
561
562
563
564 ForceSendFields []string `json:"-"`
565
566
567
568
569 NullFields []string `json:"-"`
570 }
571
572 func (s *ExecStep) MarshalJSON() ([]byte, error) {
573 type NoMethod ExecStep
574 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
575 }
576
577
578 type ExecStepConfig struct {
579
580
581 AllowedSuccessCodes []int64 `json:"allowedSuccessCodes,omitempty"`
582
583 GcsObject *GcsObject `json:"gcsObject,omitempty"`
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600 Interpreter string `json:"interpreter,omitempty"`
601
602 LocalPath string `json:"localPath,omitempty"`
603
604
605
606
607
608 ForceSendFields []string `json:"-"`
609
610
611
612
613 NullFields []string `json:"-"`
614 }
615
616 func (s *ExecStepConfig) MarshalJSON() ([]byte, error) {
617 type NoMethod ExecStepConfig
618 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
619 }
620
621
622
623 type ExecutePatchJobRequest struct {
624
625
626 Description string `json:"description,omitempty"`
627
628
629 DisplayName string `json:"displayName,omitempty"`
630
631
632 DryRun bool `json:"dryRun,omitempty"`
633
634
635 Duration string `json:"duration,omitempty"`
636
637
638 InstanceFilter *PatchInstanceFilter `json:"instanceFilter,omitempty"`
639
640
641 PatchConfig *PatchConfig `json:"patchConfig,omitempty"`
642
643 Rollout *PatchRollout `json:"rollout,omitempty"`
644
645
646
647
648
649 ForceSendFields []string `json:"-"`
650
651
652
653
654 NullFields []string `json:"-"`
655 }
656
657 func (s *ExecutePatchJobRequest) MarshalJSON() ([]byte, error) {
658 type NoMethod ExecutePatchJobRequest
659 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
660 }
661
662
663
664 type FixedOrPercent struct {
665
666 Fixed int64 `json:"fixed,omitempty"`
667
668
669 Percent int64 `json:"percent,omitempty"`
670
671
672
673
674
675 ForceSendFields []string `json:"-"`
676
677
678
679
680 NullFields []string `json:"-"`
681 }
682
683 func (s *FixedOrPercent) MarshalJSON() ([]byte, error) {
684 type NoMethod FixedOrPercent
685 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
686 }
687
688
689 type GcsObject struct {
690
691 Bucket string `json:"bucket,omitempty"`
692
693
694
695 GenerationNumber int64 `json:"generationNumber,omitempty,string"`
696
697 Object string `json:"object,omitempty"`
698
699
700
701
702
703 ForceSendFields []string `json:"-"`
704
705
706
707
708 NullFields []string `json:"-"`
709 }
710
711 func (s *GcsObject) MarshalJSON() ([]byte, error) {
712 type NoMethod GcsObject
713 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
714 }
715
716
717 type GooSettings struct {
718 }
719
720
721
722
723 type GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata struct {
724
725
726
727
728
729
730
731 ApiMethod string `json:"apiMethod,omitempty"`
732
733
734
735
736 OsPolicyAssignment string `json:"osPolicyAssignment,omitempty"`
737
738 RolloutStartTime string `json:"rolloutStartTime,omitempty"`
739
740
741
742
743
744
745
746
747 RolloutState string `json:"rolloutState,omitempty"`
748
749 RolloutUpdateTime string `json:"rolloutUpdateTime,omitempty"`
750
751
752
753
754
755 ForceSendFields []string `json:"-"`
756
757
758
759
760 NullFields []string `json:"-"`
761 }
762
763 func (s *GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata) MarshalJSON() ([]byte, error) {
764 type NoMethod GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata
765 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
766 }
767
768
769
770
771
772
773 type Inventory struct {
774
775
776
777
778 Items map[string]InventoryItem `json:"items,omitempty"`
779
780
781
782 Name string `json:"name,omitempty"`
783
784 OsInfo *InventoryOsInfo `json:"osInfo,omitempty"`
785
786
787 UpdateTime string `json:"updateTime,omitempty"`
788
789
790 googleapi.ServerResponse `json:"-"`
791
792
793
794
795
796 ForceSendFields []string `json:"-"`
797
798
799
800
801 NullFields []string `json:"-"`
802 }
803
804 func (s *Inventory) MarshalJSON() ([]byte, error) {
805 type NoMethod Inventory
806 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
807 }
808
809
810 type InventoryItem struct {
811
812
813 AvailablePackage *InventorySoftwarePackage `json:"availablePackage,omitempty"`
814
815 CreateTime string `json:"createTime,omitempty"`
816
817 Id string `json:"id,omitempty"`
818
819 InstalledPackage *InventorySoftwarePackage `json:"installedPackage,omitempty"`
820
821
822
823
824
825
826 OriginType string `json:"originType,omitempty"`
827
828
829
830
831
832
833
834
835 Type string `json:"type,omitempty"`
836
837 UpdateTime string `json:"updateTime,omitempty"`
838
839
840
841
842
843 ForceSendFields []string `json:"-"`
844
845
846
847
848 NullFields []string `json:"-"`
849 }
850
851 func (s *InventoryItem) MarshalJSON() ([]byte, error) {
852 type NoMethod InventoryItem
853 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
854 }
855
856
857 type InventoryOsInfo struct {
858
859 Architecture string `json:"architecture,omitempty"`
860
861 Hostname string `json:"hostname,omitempty"`
862
863 KernelRelease string `json:"kernelRelease,omitempty"`
864
865 KernelVersion string `json:"kernelVersion,omitempty"`
866
867
868 LongName string `json:"longName,omitempty"`
869
870
871 OsconfigAgentVersion string `json:"osconfigAgentVersion,omitempty"`
872
873
874 ShortName string `json:"shortName,omitempty"`
875
876 Version string `json:"version,omitempty"`
877
878
879
880
881
882 ForceSendFields []string `json:"-"`
883
884
885
886
887 NullFields []string `json:"-"`
888 }
889
890 func (s *InventoryOsInfo) MarshalJSON() ([]byte, error) {
891 type NoMethod InventoryOsInfo
892 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
893 }
894
895
896
897 type InventorySoftwarePackage struct {
898
899
900 AptPackage *InventoryVersionedPackage `json:"aptPackage,omitempty"`
901
902 CosPackage *InventoryVersionedPackage `json:"cosPackage,omitempty"`
903
904
905 GoogetPackage *InventoryVersionedPackage `json:"googetPackage,omitempty"`
906
907
908
909 QfePackage *InventoryWindowsQuickFixEngineeringPackage `json:"qfePackage,omitempty"`
910
911 WindowsApplication *InventoryWindowsApplication `json:"windowsApplication,omitempty"`
912
913
914
915 WuaPackage *InventoryWindowsUpdatePackage `json:"wuaPackage,omitempty"`
916
917
918 YumPackage *InventoryVersionedPackage `json:"yumPackage,omitempty"`
919
920
921 ZypperPackage *InventoryVersionedPackage `json:"zypperPackage,omitempty"`
922
923
924 ZypperPatch *InventoryZypperPatch `json:"zypperPatch,omitempty"`
925
926
927
928
929
930 ForceSendFields []string `json:"-"`
931
932
933
934
935 NullFields []string `json:"-"`
936 }
937
938 func (s *InventorySoftwarePackage) MarshalJSON() ([]byte, error) {
939 type NoMethod InventorySoftwarePackage
940 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
941 }
942
943
944
945
946 type InventoryVersionedPackage struct {
947
948 Architecture string `json:"architecture,omitempty"`
949
950 PackageName string `json:"packageName,omitempty"`
951
952 Version string `json:"version,omitempty"`
953
954
955
956
957
958 ForceSendFields []string `json:"-"`
959
960
961
962
963 NullFields []string `json:"-"`
964 }
965
966 func (s *InventoryVersionedPackage) MarshalJSON() ([]byte, error) {
967 type NoMethod InventoryVersionedPackage
968 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
969 }
970
971
972
973
974
975 type InventoryWindowsApplication struct {
976
977 DisplayName string `json:"displayName,omitempty"`
978
979 DisplayVersion string `json:"displayVersion,omitempty"`
980
981 HelpLink string `json:"helpLink,omitempty"`
982
983
984
985 InstallDate *Date `json:"installDate,omitempty"`
986
987 Publisher string `json:"publisher,omitempty"`
988
989
990
991
992
993 ForceSendFields []string `json:"-"`
994
995
996
997
998 NullFields []string `json:"-"`
999 }
1000
1001 func (s *InventoryWindowsApplication) MarshalJSON() ([]byte, error) {
1002 type NoMethod InventoryWindowsApplication
1003 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1004 }
1005
1006
1007
1008
1009
1010 type InventoryWindowsQuickFixEngineeringPackage struct {
1011
1012 Caption string `json:"caption,omitempty"`
1013
1014 Description string `json:"description,omitempty"`
1015
1016 HotFixId string `json:"hotFixId,omitempty"`
1017
1018
1019 InstallTime string `json:"installTime,omitempty"`
1020
1021
1022
1023
1024
1025 ForceSendFields []string `json:"-"`
1026
1027
1028
1029
1030 NullFields []string `json:"-"`
1031 }
1032
1033 func (s *InventoryWindowsQuickFixEngineeringPackage) MarshalJSON() ([]byte, error) {
1034 type NoMethod InventoryWindowsQuickFixEngineeringPackage
1035 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1036 }
1037
1038
1039
1040
1041
1042
1043 type InventoryWindowsUpdatePackage struct {
1044
1045 Categories []*InventoryWindowsUpdatePackageWindowsUpdateCategory `json:"categories,omitempty"`
1046
1047 Description string `json:"description,omitempty"`
1048
1049
1050 KbArticleIds []string `json:"kbArticleIds,omitempty"`
1051
1052
1053 LastDeploymentChangeTime string `json:"lastDeploymentChangeTime,omitempty"`
1054
1055
1056 MoreInfoUrls []string `json:"moreInfoUrls,omitempty"`
1057
1058 RevisionNumber int64 `json:"revisionNumber,omitempty"`
1059
1060
1061 SupportUrl string `json:"supportUrl,omitempty"`
1062
1063 Title string `json:"title,omitempty"`
1064
1065
1066 UpdateId string `json:"updateId,omitempty"`
1067
1068
1069
1070
1071
1072 ForceSendFields []string `json:"-"`
1073
1074
1075
1076
1077 NullFields []string `json:"-"`
1078 }
1079
1080 func (s *InventoryWindowsUpdatePackage) MarshalJSON() ([]byte, error) {
1081 type NoMethod InventoryWindowsUpdatePackage
1082 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1083 }
1084
1085
1086
1087 type InventoryWindowsUpdatePackageWindowsUpdateCategory struct {
1088
1089 Id string `json:"id,omitempty"`
1090
1091 Name string `json:"name,omitempty"`
1092
1093
1094
1095
1096
1097 ForceSendFields []string `json:"-"`
1098
1099
1100
1101
1102 NullFields []string `json:"-"`
1103 }
1104
1105 func (s *InventoryWindowsUpdatePackageWindowsUpdateCategory) MarshalJSON() ([]byte, error) {
1106 type NoMethod InventoryWindowsUpdatePackageWindowsUpdateCategory
1107 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1108 }
1109
1110
1111 type InventoryZypperPatch struct {
1112
1113 Category string `json:"category,omitempty"`
1114
1115 PatchName string `json:"patchName,omitempty"`
1116
1117 Severity string `json:"severity,omitempty"`
1118
1119 Summary string `json:"summary,omitempty"`
1120
1121
1122
1123
1124
1125 ForceSendFields []string `json:"-"`
1126
1127
1128
1129
1130 NullFields []string `json:"-"`
1131 }
1132
1133 func (s *InventoryZypperPatch) MarshalJSON() ([]byte, error) {
1134 type NoMethod InventoryZypperPatch
1135 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1136 }
1137
1138
1139
1140 type ListInventoriesResponse struct {
1141
1142 Inventories []*Inventory `json:"inventories,omitempty"`
1143
1144
1145 NextPageToken string `json:"nextPageToken,omitempty"`
1146
1147
1148 googleapi.ServerResponse `json:"-"`
1149
1150
1151
1152
1153
1154 ForceSendFields []string `json:"-"`
1155
1156
1157
1158
1159 NullFields []string `json:"-"`
1160 }
1161
1162 func (s *ListInventoriesResponse) MarshalJSON() ([]byte, error) {
1163 type NoMethod ListInventoriesResponse
1164 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1165 }
1166
1167
1168
1169 type ListOSPolicyAssignmentReportsResponse struct {
1170
1171
1172 NextPageToken string `json:"nextPageToken,omitempty"`
1173
1174 OsPolicyAssignmentReports []*OSPolicyAssignmentReport `json:"osPolicyAssignmentReports,omitempty"`
1175
1176
1177 googleapi.ServerResponse `json:"-"`
1178
1179
1180
1181
1182
1183 ForceSendFields []string `json:"-"`
1184
1185
1186
1187
1188 NullFields []string `json:"-"`
1189 }
1190
1191 func (s *ListOSPolicyAssignmentReportsResponse) MarshalJSON() ([]byte, error) {
1192 type NoMethod ListOSPolicyAssignmentReportsResponse
1193 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1194 }
1195
1196
1197
1198 type ListOSPolicyAssignmentRevisionsResponse struct {
1199
1200
1201 NextPageToken string `json:"nextPageToken,omitempty"`
1202
1203 OsPolicyAssignments []*OSPolicyAssignment `json:"osPolicyAssignments,omitempty"`
1204
1205
1206 googleapi.ServerResponse `json:"-"`
1207
1208
1209
1210
1211
1212 ForceSendFields []string `json:"-"`
1213
1214
1215
1216
1217 NullFields []string `json:"-"`
1218 }
1219
1220 func (s *ListOSPolicyAssignmentRevisionsResponse) MarshalJSON() ([]byte, error) {
1221 type NoMethod ListOSPolicyAssignmentRevisionsResponse
1222 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1223 }
1224
1225
1226
1227 type ListOSPolicyAssignmentsResponse struct {
1228
1229
1230 NextPageToken string `json:"nextPageToken,omitempty"`
1231
1232 OsPolicyAssignments []*OSPolicyAssignment `json:"osPolicyAssignments,omitempty"`
1233
1234
1235 googleapi.ServerResponse `json:"-"`
1236
1237
1238
1239
1240
1241 ForceSendFields []string `json:"-"`
1242
1243
1244
1245
1246 NullFields []string `json:"-"`
1247 }
1248
1249 func (s *ListOSPolicyAssignmentsResponse) MarshalJSON() ([]byte, error) {
1250 type NoMethod ListOSPolicyAssignmentsResponse
1251 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1252 }
1253
1254
1255
1256 type ListPatchDeploymentsResponse struct {
1257
1258
1259 NextPageToken string `json:"nextPageToken,omitempty"`
1260
1261 PatchDeployments []*PatchDeployment `json:"patchDeployments,omitempty"`
1262
1263
1264 googleapi.ServerResponse `json:"-"`
1265
1266
1267
1268
1269
1270 ForceSendFields []string `json:"-"`
1271
1272
1273
1274
1275 NullFields []string `json:"-"`
1276 }
1277
1278 func (s *ListPatchDeploymentsResponse) MarshalJSON() ([]byte, error) {
1279 type NoMethod ListPatchDeploymentsResponse
1280 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1281 }
1282
1283
1284
1285 type ListPatchJobInstanceDetailsResponse struct {
1286
1287
1288 NextPageToken string `json:"nextPageToken,omitempty"`
1289
1290 PatchJobInstanceDetails []*PatchJobInstanceDetails `json:"patchJobInstanceDetails,omitempty"`
1291
1292
1293 googleapi.ServerResponse `json:"-"`
1294
1295
1296
1297
1298
1299 ForceSendFields []string `json:"-"`
1300
1301
1302
1303
1304 NullFields []string `json:"-"`
1305 }
1306
1307 func (s *ListPatchJobInstanceDetailsResponse) MarshalJSON() ([]byte, error) {
1308 type NoMethod ListPatchJobInstanceDetailsResponse
1309 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1310 }
1311
1312
1313 type ListPatchJobsResponse struct {
1314
1315
1316 NextPageToken string `json:"nextPageToken,omitempty"`
1317
1318 PatchJobs []*PatchJob `json:"patchJobs,omitempty"`
1319
1320
1321 googleapi.ServerResponse `json:"-"`
1322
1323
1324
1325
1326
1327 ForceSendFields []string `json:"-"`
1328
1329
1330
1331
1332 NullFields []string `json:"-"`
1333 }
1334
1335 func (s *ListPatchJobsResponse) MarshalJSON() ([]byte, error) {
1336 type NoMethod ListPatchJobsResponse
1337 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1338 }
1339
1340
1341
1342 type ListVulnerabilityReportsResponse struct {
1343
1344
1345 NextPageToken string `json:"nextPageToken,omitempty"`
1346
1347 VulnerabilityReports []*VulnerabilityReport `json:"vulnerabilityReports,omitempty"`
1348
1349
1350 googleapi.ServerResponse `json:"-"`
1351
1352
1353
1354
1355
1356 ForceSendFields []string `json:"-"`
1357
1358
1359
1360
1361 NullFields []string `json:"-"`
1362 }
1363
1364 func (s *ListVulnerabilityReportsResponse) MarshalJSON() ([]byte, error) {
1365 type NoMethod ListVulnerabilityReportsResponse
1366 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1367 }
1368
1369
1370
1371
1372 type MonthlySchedule struct {
1373
1374
1375
1376
1377 MonthDay int64 `json:"monthDay,omitempty"`
1378
1379 WeekDayOfMonth *WeekDayOfMonth `json:"weekDayOfMonth,omitempty"`
1380
1381
1382
1383
1384
1385 ForceSendFields []string `json:"-"`
1386
1387
1388
1389
1390 NullFields []string `json:"-"`
1391 }
1392
1393 func (s *MonthlySchedule) MarshalJSON() ([]byte, error) {
1394 type NoMethod MonthlySchedule
1395 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1396 }
1397
1398
1399 type OSPolicy struct {
1400
1401
1402
1403
1404 AllowNoResourceGroupMatch bool `json:"allowNoResourceGroupMatch,omitempty"`
1405
1406
1407 Description string `json:"description,omitempty"`
1408
1409
1410
1411
1412 Id string `json:"id,omitempty"`
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422 Mode string `json:"mode,omitempty"`
1423
1424
1425
1426
1427
1428
1429 ResourceGroups []*OSPolicyResourceGroup `json:"resourceGroups,omitempty"`
1430
1431
1432
1433
1434
1435 ForceSendFields []string `json:"-"`
1436
1437
1438
1439
1440 NullFields []string `json:"-"`
1441 }
1442
1443 func (s *OSPolicy) MarshalJSON() ([]byte, error) {
1444 type NoMethod OSPolicy
1445 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1446 }
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456 type OSPolicyAssignment struct {
1457
1458
1459
1460
1461 Baseline bool `json:"baseline,omitempty"`
1462
1463
1464 Deleted bool `json:"deleted,omitempty"`
1465
1466
1467 Description string `json:"description,omitempty"`
1468
1469
1470 Etag string `json:"etag,omitempty"`
1471
1472 InstanceFilter *OSPolicyAssignmentInstanceFilter `json:"instanceFilter,omitempty"`
1473
1474
1475
1476
1477 Name string `json:"name,omitempty"`
1478
1479 OsPolicies []*OSPolicy `json:"osPolicies,omitempty"`
1480
1481
1482
1483 Reconciling bool `json:"reconciling,omitempty"`
1484
1485
1486 RevisionCreateTime string `json:"revisionCreateTime,omitempty"`
1487
1488
1489 RevisionId string `json:"revisionId,omitempty"`
1490
1491
1492
1493
1494
1495 Rollout *OSPolicyAssignmentRollout `json:"rollout,omitempty"`
1496
1497
1498
1499
1500
1501
1502
1503
1504 RolloutState string `json:"rolloutState,omitempty"`
1505
1506
1507 Uid string `json:"uid,omitempty"`
1508
1509
1510 googleapi.ServerResponse `json:"-"`
1511
1512
1513
1514
1515
1516 ForceSendFields []string `json:"-"`
1517
1518
1519
1520
1521 NullFields []string `json:"-"`
1522 }
1523
1524 func (s *OSPolicyAssignment) MarshalJSON() ([]byte, error) {
1525 type NoMethod OSPolicyAssignment
1526 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1527 }
1528
1529
1530
1531
1532 type OSPolicyAssignmentInstanceFilter struct {
1533
1534 All bool `json:"all,omitempty"`
1535
1536
1537
1538 ExclusionLabels []*OSPolicyAssignmentLabelSet `json:"exclusionLabels,omitempty"`
1539
1540
1541
1542 InclusionLabels []*OSPolicyAssignmentLabelSet `json:"inclusionLabels,omitempty"`
1543
1544
1545 Inventories []*OSPolicyAssignmentInstanceFilterInventory `json:"inventories,omitempty"`
1546
1547
1548
1549
1550
1551 ForceSendFields []string `json:"-"`
1552
1553
1554
1555
1556 NullFields []string `json:"-"`
1557 }
1558
1559 func (s *OSPolicyAssignmentInstanceFilter) MarshalJSON() ([]byte, error) {
1560 type NoMethod OSPolicyAssignmentInstanceFilter
1561 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1562 }
1563
1564
1565 type OSPolicyAssignmentInstanceFilterInventory struct {
1566
1567 OsShortName string `json:"osShortName,omitempty"`
1568
1569
1570
1571
1572 OsVersion string `json:"osVersion,omitempty"`
1573
1574
1575
1576
1577
1578 ForceSendFields []string `json:"-"`
1579
1580
1581
1582
1583 NullFields []string `json:"-"`
1584 }
1585
1586 func (s *OSPolicyAssignmentInstanceFilterInventory) MarshalJSON() ([]byte, error) {
1587 type NoMethod OSPolicyAssignmentInstanceFilterInventory
1588 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1589 }
1590
1591
1592
1593
1594
1595
1596
1597 type OSPolicyAssignmentLabelSet struct {
1598
1599
1600 Labels map[string]string `json:"labels,omitempty"`
1601
1602
1603
1604
1605
1606 ForceSendFields []string `json:"-"`
1607
1608
1609
1610
1611 NullFields []string `json:"-"`
1612 }
1613
1614 func (s *OSPolicyAssignmentLabelSet) MarshalJSON() ([]byte, error) {
1615 type NoMethod OSPolicyAssignmentLabelSet
1616 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1617 }
1618
1619
1620
1621
1622 type OSPolicyAssignmentOperationMetadata struct {
1623
1624
1625
1626
1627
1628
1629
1630 ApiMethod string `json:"apiMethod,omitempty"`
1631
1632
1633
1634
1635 OsPolicyAssignment string `json:"osPolicyAssignment,omitempty"`
1636
1637 RolloutStartTime string `json:"rolloutStartTime,omitempty"`
1638
1639
1640
1641
1642
1643
1644
1645
1646 RolloutState string `json:"rolloutState,omitempty"`
1647
1648 RolloutUpdateTime string `json:"rolloutUpdateTime,omitempty"`
1649
1650
1651
1652
1653
1654 ForceSendFields []string `json:"-"`
1655
1656
1657
1658
1659 NullFields []string `json:"-"`
1660 }
1661
1662 func (s *OSPolicyAssignmentOperationMetadata) MarshalJSON() ([]byte, error) {
1663 type NoMethod OSPolicyAssignmentOperationMetadata
1664 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1665 }
1666
1667
1668
1669 type OSPolicyAssignmentReport struct {
1670
1671 Instance string `json:"instance,omitempty"`
1672
1673
1674
1675
1676
1677
1678 LastRunId string `json:"lastRunId,omitempty"`
1679
1680
1681
1682 Name string `json:"name,omitempty"`
1683
1684
1685
1686
1687 OsPolicyAssignment string `json:"osPolicyAssignment,omitempty"`
1688
1689
1690 OsPolicyCompliances []*OSPolicyAssignmentReportOSPolicyCompliance `json:"osPolicyCompliances,omitempty"`
1691
1692 UpdateTime string `json:"updateTime,omitempty"`
1693
1694
1695 googleapi.ServerResponse `json:"-"`
1696
1697
1698
1699
1700
1701 ForceSendFields []string `json:"-"`
1702
1703
1704
1705
1706 NullFields []string `json:"-"`
1707 }
1708
1709 func (s *OSPolicyAssignmentReport) MarshalJSON() ([]byte, error) {
1710 type NoMethod OSPolicyAssignmentReport
1711 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1712 }
1713
1714
1715 type OSPolicyAssignmentReportOSPolicyCompliance struct {
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726 ComplianceState string `json:"complianceState,omitempty"`
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744 ComplianceStateReason string `json:"complianceStateReason,omitempty"`
1745
1746 OsPolicyId string `json:"osPolicyId,omitempty"`
1747
1748
1749 OsPolicyResourceCompliances []*OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance `json:"osPolicyResourceCompliances,omitempty"`
1750
1751
1752
1753
1754
1755 ForceSendFields []string `json:"-"`
1756
1757
1758
1759
1760 NullFields []string `json:"-"`
1761 }
1762
1763 func (s *OSPolicyAssignmentReportOSPolicyCompliance) MarshalJSON() ([]byte, error) {
1764 type NoMethod OSPolicyAssignmentReportOSPolicyCompliance
1765 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1766 }
1767
1768
1769
1770 type OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance struct {
1771
1772
1773
1774
1775
1776
1777
1778
1779 ComplianceState string `json:"complianceState,omitempty"`
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790 ComplianceStateReason string `json:"complianceStateReason,omitempty"`
1791
1792
1793 ConfigSteps []*OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep `json:"configSteps,omitempty"`
1794
1795 ExecResourceOutput *OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput `json:"execResourceOutput,omitempty"`
1796
1797 OsPolicyResourceId string `json:"osPolicyResourceId,omitempty"`
1798
1799
1800
1801
1802
1803 ForceSendFields []string `json:"-"`
1804
1805
1806
1807
1808 NullFields []string `json:"-"`
1809 }
1810
1811 func (s *OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance) MarshalJSON() ([]byte, error) {
1812 type NoMethod OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance
1813 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1814 }
1815
1816
1817
1818 type OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput struct {
1819
1820
1821 EnforcementOutput string `json:"enforcementOutput,omitempty"`
1822
1823
1824
1825
1826
1827 ForceSendFields []string `json:"-"`
1828
1829
1830
1831
1832 NullFields []string `json:"-"`
1833 }
1834
1835 func (s *OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput) MarshalJSON() ([]byte, error) {
1836 type NoMethod OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput
1837 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1838 }
1839
1840
1841
1842
1843 type OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep struct {
1844
1845
1846 ErrorMessage string `json:"errorMessage,omitempty"`
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862 Type string `json:"type,omitempty"`
1863
1864
1865
1866
1867
1868 ForceSendFields []string `json:"-"`
1869
1870
1871
1872
1873 NullFields []string `json:"-"`
1874 }
1875
1876 func (s *OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep) MarshalJSON() ([]byte, error) {
1877 type NoMethod OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep
1878 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1879 }
1880
1881
1882
1883 type OSPolicyAssignmentRollout struct {
1884
1885
1886 DisruptionBudget *FixedOrPercent `json:"disruptionBudget,omitempty"`
1887
1888
1889
1890
1891
1892 MinWaitDuration string `json:"minWaitDuration,omitempty"`
1893
1894
1895
1896
1897
1898 ForceSendFields []string `json:"-"`
1899
1900
1901
1902
1903 NullFields []string `json:"-"`
1904 }
1905
1906 func (s *OSPolicyAssignmentRollout) MarshalJSON() ([]byte, error) {
1907 type NoMethod OSPolicyAssignmentRollout
1908 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1909 }
1910
1911
1912
1913 type OSPolicyInventoryFilter struct {
1914
1915 OsShortName string `json:"osShortName,omitempty"`
1916
1917
1918
1919
1920 OsVersion string `json:"osVersion,omitempty"`
1921
1922
1923
1924
1925
1926 ForceSendFields []string `json:"-"`
1927
1928
1929
1930
1931 NullFields []string `json:"-"`
1932 }
1933
1934 func (s *OSPolicyInventoryFilter) MarshalJSON() ([]byte, error) {
1935 type NoMethod OSPolicyInventoryFilter
1936 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1937 }
1938
1939
1940
1941
1942
1943
1944 type OSPolicyResource struct {
1945
1946 Exec *OSPolicyResourceExecResource `json:"exec,omitempty"`
1947
1948 File *OSPolicyResourceFileResource `json:"file,omitempty"`
1949
1950
1951
1952
1953 Id string `json:"id,omitempty"`
1954
1955 Pkg *OSPolicyResourcePackageResource `json:"pkg,omitempty"`
1956
1957 Repository *OSPolicyResourceRepositoryResource `json:"repository,omitempty"`
1958
1959
1960
1961
1962
1963 ForceSendFields []string `json:"-"`
1964
1965
1966
1967
1968 NullFields []string `json:"-"`
1969 }
1970
1971 func (s *OSPolicyResource) MarshalJSON() ([]byte, error) {
1972 type NoMethod OSPolicyResource
1973 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1974 }
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995 type OSPolicyResourceExecResource struct {
1996
1997
1998
1999 Enforce *OSPolicyResourceExecResourceExec `json:"enforce,omitempty"`
2000
2001
2002
2003
2004 Validate *OSPolicyResourceExecResourceExec `json:"validate,omitempty"`
2005
2006
2007
2008
2009
2010 ForceSendFields []string `json:"-"`
2011
2012
2013
2014
2015 NullFields []string `json:"-"`
2016 }
2017
2018 func (s *OSPolicyResourceExecResource) MarshalJSON() ([]byte, error) {
2019 type NoMethod OSPolicyResourceExecResource
2020 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2021 }
2022
2023
2024 type OSPolicyResourceExecResourceExec struct {
2025
2026 Args []string `json:"args,omitempty"`
2027
2028 File *OSPolicyResourceFile `json:"file,omitempty"`
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040 Interpreter string `json:"interpreter,omitempty"`
2041
2042
2043
2044
2045
2046 OutputFilePath string `json:"outputFilePath,omitempty"`
2047
2048 Script string `json:"script,omitempty"`
2049
2050
2051
2052
2053
2054 ForceSendFields []string `json:"-"`
2055
2056
2057
2058
2059 NullFields []string `json:"-"`
2060 }
2061
2062 func (s *OSPolicyResourceExecResourceExec) MarshalJSON() ([]byte, error) {
2063 type NoMethod OSPolicyResourceExecResourceExec
2064 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2065 }
2066
2067
2068 type OSPolicyResourceFile struct {
2069
2070
2071
2072 AllowInsecure bool `json:"allowInsecure,omitempty"`
2073
2074 Gcs *OSPolicyResourceFileGcs `json:"gcs,omitempty"`
2075
2076 LocalPath string `json:"localPath,omitempty"`
2077
2078 Remote *OSPolicyResourceFileRemote `json:"remote,omitempty"`
2079
2080
2081
2082
2083
2084 ForceSendFields []string `json:"-"`
2085
2086
2087
2088
2089 NullFields []string `json:"-"`
2090 }
2091
2092 func (s *OSPolicyResourceFile) MarshalJSON() ([]byte, error) {
2093 type NoMethod OSPolicyResourceFile
2094 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2095 }
2096
2097
2098
2099 type OSPolicyResourceFileGcs struct {
2100
2101 Bucket string `json:"bucket,omitempty"`
2102
2103 Generation int64 `json:"generation,omitempty,string"`
2104
2105 Object string `json:"object,omitempty"`
2106
2107
2108
2109
2110
2111 ForceSendFields []string `json:"-"`
2112
2113
2114
2115
2116 NullFields []string `json:"-"`
2117 }
2118
2119 func (s *OSPolicyResourceFileGcs) MarshalJSON() ([]byte, error) {
2120 type NoMethod OSPolicyResourceFileGcs
2121 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2122 }
2123
2124
2125 type OSPolicyResourceFileRemote struct {
2126
2127 Sha256Checksum string `json:"sha256Checksum,omitempty"`
2128
2129
2130 Uri string `json:"uri,omitempty"`
2131
2132
2133
2134
2135
2136 ForceSendFields []string `json:"-"`
2137
2138
2139
2140
2141 NullFields []string `json:"-"`
2142 }
2143
2144 func (s *OSPolicyResourceFileRemote) MarshalJSON() ([]byte, error) {
2145 type NoMethod OSPolicyResourceFileRemote
2146 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2147 }
2148
2149
2150 type OSPolicyResourceFileResource struct {
2151
2152
2153 Content string `json:"content,omitempty"`
2154
2155 File *OSPolicyResourceFile `json:"file,omitempty"`
2156
2157 Path string `json:"path,omitempty"`
2158
2159
2160
2161
2162
2163
2164
2165
2166 Permissions string `json:"permissions,omitempty"`
2167
2168
2169
2170
2171
2172
2173
2174
2175 State string `json:"state,omitempty"`
2176
2177
2178
2179
2180
2181 ForceSendFields []string `json:"-"`
2182
2183
2184
2185
2186 NullFields []string `json:"-"`
2187 }
2188
2189 func (s *OSPolicyResourceFileResource) MarshalJSON() ([]byte, error) {
2190 type NoMethod OSPolicyResourceFileResource
2191 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2192 }
2193
2194
2195
2196
2197
2198
2199
2200 type OSPolicyResourceGroup struct {
2201
2202
2203
2204
2205
2206
2207
2208
2209 InventoryFilters []*OSPolicyInventoryFilter `json:"inventoryFilters,omitempty"`
2210
2211
2212 Resources []*OSPolicyResource `json:"resources,omitempty"`
2213
2214
2215
2216
2217
2218 ForceSendFields []string `json:"-"`
2219
2220
2221
2222
2223 NullFields []string `json:"-"`
2224 }
2225
2226 func (s *OSPolicyResourceGroup) MarshalJSON() ([]byte, error) {
2227 type NoMethod OSPolicyResourceGroup
2228 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2229 }
2230
2231
2232 type OSPolicyResourcePackageResource struct {
2233
2234 Apt *OSPolicyResourcePackageResourceAPT `json:"apt,omitempty"`
2235
2236 Deb *OSPolicyResourcePackageResourceDeb `json:"deb,omitempty"`
2237
2238
2239
2240
2241
2242
2243
2244
2245 DesiredState string `json:"desiredState,omitempty"`
2246
2247 Googet *OSPolicyResourcePackageResourceGooGet `json:"googet,omitempty"`
2248
2249 Msi *OSPolicyResourcePackageResourceMSI `json:"msi,omitempty"`
2250
2251 Rpm *OSPolicyResourcePackageResourceRPM `json:"rpm,omitempty"`
2252
2253 Yum *OSPolicyResourcePackageResourceYUM `json:"yum,omitempty"`
2254
2255 Zypper *OSPolicyResourcePackageResourceZypper `json:"zypper,omitempty"`
2256
2257
2258
2259
2260
2261 ForceSendFields []string `json:"-"`
2262
2263
2264
2265
2266 NullFields []string `json:"-"`
2267 }
2268
2269 func (s *OSPolicyResourcePackageResource) MarshalJSON() ([]byte, error) {
2270 type NoMethod OSPolicyResourcePackageResource
2271 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2272 }
2273
2274
2275
2276
2277 type OSPolicyResourcePackageResourceAPT struct {
2278
2279 Name string `json:"name,omitempty"`
2280
2281
2282
2283
2284
2285 ForceSendFields []string `json:"-"`
2286
2287
2288
2289
2290 NullFields []string `json:"-"`
2291 }
2292
2293 func (s *OSPolicyResourcePackageResourceAPT) MarshalJSON() ([]byte, error) {
2294 type NoMethod OSPolicyResourcePackageResourceAPT
2295 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2296 }
2297
2298
2299
2300 type OSPolicyResourcePackageResourceDeb struct {
2301
2302
2303
2304 PullDeps bool `json:"pullDeps,omitempty"`
2305
2306 Source *OSPolicyResourceFile `json:"source,omitempty"`
2307
2308
2309
2310
2311
2312 ForceSendFields []string `json:"-"`
2313
2314
2315
2316
2317 NullFields []string `json:"-"`
2318 }
2319
2320 func (s *OSPolicyResourcePackageResourceDeb) MarshalJSON() ([]byte, error) {
2321 type NoMethod OSPolicyResourcePackageResourceDeb
2322 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2323 }
2324
2325
2326
2327
2328 type OSPolicyResourcePackageResourceGooGet struct {
2329
2330 Name string `json:"name,omitempty"`
2331
2332
2333
2334
2335
2336 ForceSendFields []string `json:"-"`
2337
2338
2339
2340
2341 NullFields []string `json:"-"`
2342 }
2343
2344 func (s *OSPolicyResourcePackageResourceGooGet) MarshalJSON() ([]byte, error) {
2345 type NoMethod OSPolicyResourcePackageResourceGooGet
2346 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2347 }
2348
2349
2350
2351 type OSPolicyResourcePackageResourceMSI struct {
2352
2353
2354
2355 Properties []string `json:"properties,omitempty"`
2356
2357 Source *OSPolicyResourceFile `json:"source,omitempty"`
2358
2359
2360
2361
2362
2363 ForceSendFields []string `json:"-"`
2364
2365
2366
2367
2368 NullFields []string `json:"-"`
2369 }
2370
2371 func (s *OSPolicyResourcePackageResourceMSI) MarshalJSON() ([]byte, error) {
2372 type NoMethod OSPolicyResourcePackageResourceMSI
2373 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2374 }
2375
2376
2377
2378 type OSPolicyResourcePackageResourceRPM struct {
2379
2380
2381
2382 PullDeps bool `json:"pullDeps,omitempty"`
2383
2384 Source *OSPolicyResourceFile `json:"source,omitempty"`
2385
2386
2387
2388
2389
2390 ForceSendFields []string `json:"-"`
2391
2392
2393
2394
2395 NullFields []string `json:"-"`
2396 }
2397
2398 func (s *OSPolicyResourcePackageResourceRPM) MarshalJSON() ([]byte, error) {
2399 type NoMethod OSPolicyResourcePackageResourceRPM
2400 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2401 }
2402
2403
2404
2405 type OSPolicyResourcePackageResourceYUM struct {
2406
2407 Name string `json:"name,omitempty"`
2408
2409
2410
2411
2412
2413 ForceSendFields []string `json:"-"`
2414
2415
2416
2417
2418 NullFields []string `json:"-"`
2419 }
2420
2421 func (s *OSPolicyResourcePackageResourceYUM) MarshalJSON() ([]byte, error) {
2422 type NoMethod OSPolicyResourcePackageResourceYUM
2423 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2424 }
2425
2426
2427
2428 type OSPolicyResourcePackageResourceZypper struct {
2429
2430 Name string `json:"name,omitempty"`
2431
2432
2433
2434
2435
2436 ForceSendFields []string `json:"-"`
2437
2438
2439
2440
2441 NullFields []string `json:"-"`
2442 }
2443
2444 func (s *OSPolicyResourcePackageResourceZypper) MarshalJSON() ([]byte, error) {
2445 type NoMethod OSPolicyResourcePackageResourceZypper
2446 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2447 }
2448
2449
2450
2451 type OSPolicyResourceRepositoryResource struct {
2452
2453 Apt *OSPolicyResourceRepositoryResourceAptRepository `json:"apt,omitempty"`
2454
2455 Goo *OSPolicyResourceRepositoryResourceGooRepository `json:"goo,omitempty"`
2456
2457 Yum *OSPolicyResourceRepositoryResourceYumRepository `json:"yum,omitempty"`
2458
2459 Zypper *OSPolicyResourceRepositoryResourceZypperRepository `json:"zypper,omitempty"`
2460
2461
2462
2463
2464
2465 ForceSendFields []string `json:"-"`
2466
2467
2468
2469
2470 NullFields []string `json:"-"`
2471 }
2472
2473 func (s *OSPolicyResourceRepositoryResource) MarshalJSON() ([]byte, error) {
2474 type NoMethod OSPolicyResourceRepositoryResource
2475 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2476 }
2477
2478
2479
2480
2481 type OSPolicyResourceRepositoryResourceAptRepository struct {
2482
2483
2484
2485
2486
2487
2488 ArchiveType string `json:"archiveType,omitempty"`
2489
2490
2491 Components []string `json:"components,omitempty"`
2492
2493 Distribution string `json:"distribution,omitempty"`
2494
2495
2496 GpgKey string `json:"gpgKey,omitempty"`
2497
2498 Uri string `json:"uri,omitempty"`
2499
2500
2501
2502
2503
2504 ForceSendFields []string `json:"-"`
2505
2506
2507
2508
2509 NullFields []string `json:"-"`
2510 }
2511
2512 func (s *OSPolicyResourceRepositoryResourceAptRepository) MarshalJSON() ([]byte, error) {
2513 type NoMethod OSPolicyResourceRepositoryResourceAptRepository
2514 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2515 }
2516
2517
2518
2519
2520 type OSPolicyResourceRepositoryResourceGooRepository struct {
2521
2522 Name string `json:"name,omitempty"`
2523
2524 Url string `json:"url,omitempty"`
2525
2526
2527
2528
2529
2530 ForceSendFields []string `json:"-"`
2531
2532
2533
2534
2535 NullFields []string `json:"-"`
2536 }
2537
2538 func (s *OSPolicyResourceRepositoryResourceGooRepository) MarshalJSON() ([]byte, error) {
2539 type NoMethod OSPolicyResourceRepositoryResourceGooRepository
2540 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2541 }
2542
2543
2544
2545
2546 type OSPolicyResourceRepositoryResourceYumRepository struct {
2547
2548 BaseUrl string `json:"baseUrl,omitempty"`
2549
2550 DisplayName string `json:"displayName,omitempty"`
2551
2552 GpgKeys []string `json:"gpgKeys,omitempty"`
2553
2554
2555
2556
2557 Id string `json:"id,omitempty"`
2558
2559
2560
2561
2562
2563 ForceSendFields []string `json:"-"`
2564
2565
2566
2567
2568 NullFields []string `json:"-"`
2569 }
2570
2571 func (s *OSPolicyResourceRepositoryResourceYumRepository) MarshalJSON() ([]byte, error) {
2572 type NoMethod OSPolicyResourceRepositoryResourceYumRepository
2573 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2574 }
2575
2576
2577
2578
2579 type OSPolicyResourceRepositoryResourceZypperRepository struct {
2580
2581 BaseUrl string `json:"baseUrl,omitempty"`
2582
2583 DisplayName string `json:"displayName,omitempty"`
2584
2585 GpgKeys []string `json:"gpgKeys,omitempty"`
2586
2587
2588
2589
2590 Id string `json:"id,omitempty"`
2591
2592
2593
2594
2595
2596 ForceSendFields []string `json:"-"`
2597
2598
2599
2600
2601 NullFields []string `json:"-"`
2602 }
2603
2604 func (s *OSPolicyResourceRepositoryResourceZypperRepository) MarshalJSON() ([]byte, error) {
2605 type NoMethod OSPolicyResourceRepositoryResourceZypperRepository
2606 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2607 }
2608
2609
2610
2611 type OneTimeSchedule struct {
2612
2613 ExecuteTime string `json:"executeTime,omitempty"`
2614
2615
2616
2617
2618
2619 ForceSendFields []string `json:"-"`
2620
2621
2622
2623
2624 NullFields []string `json:"-"`
2625 }
2626
2627 func (s *OneTimeSchedule) MarshalJSON() ([]byte, error) {
2628 type NoMethod OneTimeSchedule
2629 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2630 }
2631
2632
2633
2634 type Operation struct {
2635
2636
2637
2638 Done bool `json:"done,omitempty"`
2639
2640 Error *Status `json:"error,omitempty"`
2641
2642
2643
2644
2645 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2646
2647
2648
2649 Name string `json:"name,omitempty"`
2650
2651
2652
2653
2654
2655
2656
2657 Response googleapi.RawMessage `json:"response,omitempty"`
2658
2659
2660 googleapi.ServerResponse `json:"-"`
2661
2662
2663
2664
2665
2666 ForceSendFields []string `json:"-"`
2667
2668
2669
2670
2671 NullFields []string `json:"-"`
2672 }
2673
2674 func (s *Operation) MarshalJSON() ([]byte, error) {
2675 type NoMethod Operation
2676 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2677 }
2678
2679
2680
2681 type PatchConfig struct {
2682
2683
2684 Apt *AptSettings `json:"apt,omitempty"`
2685
2686
2687 Goo *GooSettings `json:"goo,omitempty"`
2688
2689
2690 MigInstancesAllowed bool `json:"migInstancesAllowed,omitempty"`
2691
2692 PostStep *ExecStep `json:"postStep,omitempty"`
2693
2694 PreStep *ExecStep `json:"preStep,omitempty"`
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705 RebootConfig string `json:"rebootConfig,omitempty"`
2706
2707
2708 WindowsUpdate *WindowsUpdateSettings `json:"windowsUpdate,omitempty"`
2709
2710
2711 Yum *YumSettings `json:"yum,omitempty"`
2712
2713
2714 Zypper *ZypperSettings `json:"zypper,omitempty"`
2715
2716
2717
2718
2719
2720 ForceSendFields []string `json:"-"`
2721
2722
2723
2724
2725 NullFields []string `json:"-"`
2726 }
2727
2728 func (s *PatchConfig) MarshalJSON() ([]byte, error) {
2729 type NoMethod PatchConfig
2730 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2731 }
2732
2733
2734
2735
2736
2737
2738 type PatchDeployment struct {
2739
2740
2741 CreateTime string `json:"createTime,omitempty"`
2742
2743
2744 Description string `json:"description,omitempty"`
2745
2746
2747 Duration string `json:"duration,omitempty"`
2748
2749 InstanceFilter *PatchInstanceFilter `json:"instanceFilter,omitempty"`
2750
2751
2752
2753 LastExecuteTime string `json:"lastExecuteTime,omitempty"`
2754
2755
2756
2757
2758 Name string `json:"name,omitempty"`
2759
2760 OneTimeSchedule *OneTimeSchedule `json:"oneTimeSchedule,omitempty"`
2761
2762 PatchConfig *PatchConfig `json:"patchConfig,omitempty"`
2763
2764 RecurringSchedule *RecurringSchedule `json:"recurringSchedule,omitempty"`
2765
2766 Rollout *PatchRollout `json:"rollout,omitempty"`
2767
2768
2769
2770
2771
2772
2773
2774
2775 State string `json:"state,omitempty"`
2776
2777
2778 UpdateTime string `json:"updateTime,omitempty"`
2779
2780
2781 googleapi.ServerResponse `json:"-"`
2782
2783
2784
2785
2786
2787 ForceSendFields []string `json:"-"`
2788
2789
2790
2791
2792 NullFields []string `json:"-"`
2793 }
2794
2795 func (s *PatchDeployment) MarshalJSON() ([]byte, error) {
2796 type NoMethod PatchDeployment
2797 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2798 }
2799
2800
2801
2802
2803
2804 type PatchInstanceFilter struct {
2805
2806
2807 All bool `json:"all,omitempty"`
2808
2809
2810 GroupLabels []*PatchInstanceFilterGroupLabel `json:"groupLabels,omitempty"`
2811
2812
2813
2814 InstanceNamePrefixes []string `json:"instanceNamePrefixes,omitempty"`
2815
2816
2817
2818
2819
2820 Instances []string `json:"instances,omitempty"`
2821
2822
2823 Zones []string `json:"zones,omitempty"`
2824
2825
2826
2827
2828
2829 ForceSendFields []string `json:"-"`
2830
2831
2832
2833
2834 NullFields []string `json:"-"`
2835 }
2836
2837 func (s *PatchInstanceFilter) MarshalJSON() ([]byte, error) {
2838 type NoMethod PatchInstanceFilter
2839 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2840 }
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850 type PatchInstanceFilterGroupLabel struct {
2851
2852
2853 Labels map[string]string `json:"labels,omitempty"`
2854
2855
2856
2857
2858
2859 ForceSendFields []string `json:"-"`
2860
2861
2862
2863
2864 NullFields []string `json:"-"`
2865 }
2866
2867 func (s *PatchInstanceFilterGroupLabel) MarshalJSON() ([]byte, error) {
2868 type NoMethod PatchInstanceFilterGroupLabel
2869 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2870 }
2871
2872
2873
2874
2875
2876
2877 type PatchJob struct {
2878
2879 CreateTime string `json:"createTime,omitempty"`
2880
2881
2882 Description string `json:"description,omitempty"`
2883
2884
2885 DisplayName string `json:"displayName,omitempty"`
2886
2887
2888 DryRun bool `json:"dryRun,omitempty"`
2889
2890
2891 Duration string `json:"duration,omitempty"`
2892
2893
2894 ErrorMessage string `json:"errorMessage,omitempty"`
2895
2896 InstanceDetailsSummary *PatchJobInstanceDetailsSummary `json:"instanceDetailsSummary,omitempty"`
2897
2898 InstanceFilter *PatchInstanceFilter `json:"instanceFilter,omitempty"`
2899
2900
2901 Name string `json:"name,omitempty"`
2902
2903 PatchConfig *PatchConfig `json:"patchConfig,omitempty"`
2904
2905
2906 PatchDeployment string `json:"patchDeployment,omitempty"`
2907
2908
2909 PercentComplete float64 `json:"percentComplete,omitempty"`
2910
2911 Rollout *PatchRollout `json:"rollout,omitempty"`
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924 State string `json:"state,omitempty"`
2925
2926 UpdateTime string `json:"updateTime,omitempty"`
2927
2928
2929 googleapi.ServerResponse `json:"-"`
2930
2931
2932
2933
2934
2935 ForceSendFields []string `json:"-"`
2936
2937
2938
2939
2940 NullFields []string `json:"-"`
2941 }
2942
2943 func (s *PatchJob) MarshalJSON() ([]byte, error) {
2944 type NoMethod PatchJob
2945 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2946 }
2947
2948 func (s *PatchJob) UnmarshalJSON(data []byte) error {
2949 type NoMethod PatchJob
2950 var s1 struct {
2951 PercentComplete gensupport.JSONFloat64 `json:"percentComplete"`
2952 *NoMethod
2953 }
2954 s1.NoMethod = (*NoMethod)(s)
2955 if err := json.Unmarshal(data, &s1); err != nil {
2956 return err
2957 }
2958 s.PercentComplete = float64(s1.PercentComplete)
2959 return nil
2960 }
2961
2962
2963
2964
2965
2966 type PatchJobInstanceDetails struct {
2967
2968
2969 AttemptCount int64 `json:"attemptCount,omitempty,string"`
2970
2971 FailureReason string `json:"failureReason,omitempty"`
2972
2973
2974 InstanceSystemId string `json:"instanceSystemId,omitempty"`
2975
2976 Name string `json:"name,omitempty"`
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999 State string `json:"state,omitempty"`
3000
3001
3002
3003
3004
3005 ForceSendFields []string `json:"-"`
3006
3007
3008
3009
3010 NullFields []string `json:"-"`
3011 }
3012
3013 func (s *PatchJobInstanceDetails) MarshalJSON() ([]byte, error) {
3014 type NoMethod PatchJobInstanceDetails
3015 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3016 }
3017
3018
3019
3020
3021
3022 type PatchJobInstanceDetailsSummary struct {
3023
3024
3025 AckedInstanceCount int64 `json:"ackedInstanceCount,omitempty,string"`
3026
3027 ApplyingPatchesInstanceCount int64 `json:"applyingPatchesInstanceCount,omitempty,string"`
3028
3029
3030 DownloadingPatchesInstanceCount int64 `json:"downloadingPatchesInstanceCount,omitempty,string"`
3031
3032 FailedInstanceCount int64 `json:"failedInstanceCount,omitempty,string"`
3033
3034 InactiveInstanceCount int64 `json:"inactiveInstanceCount,omitempty,string"`
3035
3036
3037
3038 NoAgentDetectedInstanceCount int64 `json:"noAgentDetectedInstanceCount,omitempty,string"`
3039
3040 NotifiedInstanceCount int64 `json:"notifiedInstanceCount,omitempty,string"`
3041
3042 PendingInstanceCount int64 `json:"pendingInstanceCount,omitempty,string"`
3043
3044
3045 PostPatchStepInstanceCount int64 `json:"postPatchStepInstanceCount,omitempty,string"`
3046
3047
3048 PrePatchStepInstanceCount int64 `json:"prePatchStepInstanceCount,omitempty,string"`
3049
3050 RebootingInstanceCount int64 `json:"rebootingInstanceCount,omitempty,string"`
3051
3052 StartedInstanceCount int64 `json:"startedInstanceCount,omitempty,string"`
3053
3054
3055 SucceededInstanceCount int64 `json:"succeededInstanceCount,omitempty,string"`
3056
3057
3058 SucceededRebootRequiredInstanceCount int64 `json:"succeededRebootRequiredInstanceCount,omitempty,string"`
3059
3060
3061 TimedOutInstanceCount int64 `json:"timedOutInstanceCount,omitempty,string"`
3062
3063
3064
3065
3066
3067 ForceSendFields []string `json:"-"`
3068
3069
3070
3071
3072 NullFields []string `json:"-"`
3073 }
3074
3075 func (s *PatchJobInstanceDetailsSummary) MarshalJSON() ([]byte, error) {
3076 type NoMethod PatchJobInstanceDetailsSummary
3077 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3078 }
3079
3080
3081
3082 type PatchRollout struct {
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101 DisruptionBudget *FixedOrPercent `json:"disruptionBudget,omitempty"`
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114 Mode string `json:"mode,omitempty"`
3115
3116
3117
3118
3119
3120 ForceSendFields []string `json:"-"`
3121
3122
3123
3124
3125 NullFields []string `json:"-"`
3126 }
3127
3128 func (s *PatchRollout) MarshalJSON() ([]byte, error) {
3129 type NoMethod PatchRollout
3130 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3131 }
3132
3133
3134
3135 type PausePatchDeploymentRequest struct {
3136 }
3137
3138
3139
3140
3141 type ProjectFeatureSettings struct {
3142
3143
3144
3145 Name string `json:"name,omitempty"`
3146
3147
3148
3149
3150
3151
3152
3153 PatchAndConfigFeatureSet string `json:"patchAndConfigFeatureSet,omitempty"`
3154
3155
3156 googleapi.ServerResponse `json:"-"`
3157
3158
3159
3160
3161
3162 ForceSendFields []string `json:"-"`
3163
3164
3165
3166
3167 NullFields []string `json:"-"`
3168 }
3169
3170 func (s *ProjectFeatureSettings) MarshalJSON() ([]byte, error) {
3171 type NoMethod ProjectFeatureSettings
3172 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3173 }
3174
3175
3176 type RecurringSchedule struct {
3177
3178
3179 EndTime string `json:"endTime,omitempty"`
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190 Frequency string `json:"frequency,omitempty"`
3191
3192 LastExecuteTime string `json:"lastExecuteTime,omitempty"`
3193
3194 Monthly *MonthlySchedule `json:"monthly,omitempty"`
3195
3196
3197 NextExecuteTime string `json:"nextExecuteTime,omitempty"`
3198
3199
3200 StartTime string `json:"startTime,omitempty"`
3201
3202 TimeOfDay *TimeOfDay `json:"timeOfDay,omitempty"`
3203
3204
3205 TimeZone *TimeZone `json:"timeZone,omitempty"`
3206
3207 Weekly *WeeklySchedule `json:"weekly,omitempty"`
3208
3209
3210
3211
3212
3213 ForceSendFields []string `json:"-"`
3214
3215
3216
3217
3218 NullFields []string `json:"-"`
3219 }
3220
3221 func (s *RecurringSchedule) MarshalJSON() ([]byte, error) {
3222 type NoMethod RecurringSchedule
3223 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3224 }
3225
3226
3227
3228 type ResumePatchDeploymentRequest struct {
3229 }
3230
3231
3232
3233
3234
3235
3236
3237 type Status struct {
3238
3239 Code int64 `json:"code,omitempty"`
3240
3241
3242 Details []googleapi.RawMessage `json:"details,omitempty"`
3243
3244
3245
3246 Message string `json:"message,omitempty"`
3247
3248
3249
3250
3251
3252 ForceSendFields []string `json:"-"`
3253
3254
3255
3256
3257 NullFields []string `json:"-"`
3258 }
3259
3260 func (s *Status) MarshalJSON() ([]byte, error) {
3261 type NoMethod Status
3262 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3263 }
3264
3265
3266
3267
3268 type TimeOfDay struct {
3269
3270
3271
3272 Hours int64 `json:"hours,omitempty"`
3273
3274 Minutes int64 `json:"minutes,omitempty"`
3275
3276 Nanos int64 `json:"nanos,omitempty"`
3277
3278
3279 Seconds int64 `json:"seconds,omitempty"`
3280
3281
3282
3283
3284
3285 ForceSendFields []string `json:"-"`
3286
3287
3288
3289
3290 NullFields []string `json:"-"`
3291 }
3292
3293 func (s *TimeOfDay) MarshalJSON() ([]byte, error) {
3294 type NoMethod TimeOfDay
3295 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3296 }
3297
3298
3299
3300 type TimeZone struct {
3301
3302 Id string `json:"id,omitempty"`
3303
3304 Version string `json:"version,omitempty"`
3305
3306
3307
3308
3309
3310 ForceSendFields []string `json:"-"`
3311
3312
3313
3314
3315 NullFields []string `json:"-"`
3316 }
3317
3318 func (s *TimeZone) MarshalJSON() ([]byte, error) {
3319 type NoMethod TimeZone
3320 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3321 }
3322
3323
3324
3325
3326
3327 type VulnerabilityReport struct {
3328
3329
3330
3331 Name string `json:"name,omitempty"`
3332
3333
3334 UpdateTime string `json:"updateTime,omitempty"`
3335
3336 Vulnerabilities []*VulnerabilityReportVulnerability `json:"vulnerabilities,omitempty"`
3337
3338
3339 googleapi.ServerResponse `json:"-"`
3340
3341
3342
3343
3344
3345 ForceSendFields []string `json:"-"`
3346
3347
3348
3349
3350 NullFields []string `json:"-"`
3351 }
3352
3353 func (s *VulnerabilityReport) MarshalJSON() ([]byte, error) {
3354 type NoMethod VulnerabilityReport
3355 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3356 }
3357
3358
3359 type VulnerabilityReportVulnerability struct {
3360
3361
3362
3363
3364
3365
3366 AvailableInventoryItemIds []string `json:"availableInventoryItemIds,omitempty"`
3367
3368 CreateTime string `json:"createTime,omitempty"`
3369
3370
3371 Details *VulnerabilityReportVulnerabilityDetails `json:"details,omitempty"`
3372
3373
3374
3375
3376
3377 InstalledInventoryItemIds []string `json:"installedInventoryItemIds,omitempty"`
3378
3379 Items []*VulnerabilityReportVulnerabilityItem `json:"items,omitempty"`
3380
3381 UpdateTime string `json:"updateTime,omitempty"`
3382
3383
3384
3385
3386
3387 ForceSendFields []string `json:"-"`
3388
3389
3390
3391
3392 NullFields []string `json:"-"`
3393 }
3394
3395 func (s *VulnerabilityReportVulnerability) MarshalJSON() ([]byte, error) {
3396 type NoMethod VulnerabilityReportVulnerability
3397 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3398 }
3399
3400
3401
3402
3403 type VulnerabilityReportVulnerabilityDetails struct {
3404
3405
3406 Cve string `json:"cve,omitempty"`
3407
3408
3409
3410 CvssV2Score float64 `json:"cvssV2Score,omitempty"`
3411
3412 CvssV3 *CVSSv3 `json:"cvssV3,omitempty"`
3413
3414
3415 Description string `json:"description,omitempty"`
3416
3417
3418 References []*VulnerabilityReportVulnerabilityDetailsReference `json:"references,omitempty"`
3419
3420 Severity string `json:"severity,omitempty"`
3421
3422
3423
3424
3425
3426 ForceSendFields []string `json:"-"`
3427
3428
3429
3430
3431 NullFields []string `json:"-"`
3432 }
3433
3434 func (s *VulnerabilityReportVulnerabilityDetails) MarshalJSON() ([]byte, error) {
3435 type NoMethod VulnerabilityReportVulnerabilityDetails
3436 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3437 }
3438
3439 func (s *VulnerabilityReportVulnerabilityDetails) UnmarshalJSON(data []byte) error {
3440 type NoMethod VulnerabilityReportVulnerabilityDetails
3441 var s1 struct {
3442 CvssV2Score gensupport.JSONFloat64 `json:"cvssV2Score"`
3443 *NoMethod
3444 }
3445 s1.NoMethod = (*NoMethod)(s)
3446 if err := json.Unmarshal(data, &s1); err != nil {
3447 return err
3448 }
3449 s.CvssV2Score = float64(s1.CvssV2Score)
3450 return nil
3451 }
3452
3453
3454
3455 type VulnerabilityReportVulnerabilityDetailsReference struct {
3456
3457 Source string `json:"source,omitempty"`
3458
3459 Url string `json:"url,omitempty"`
3460
3461
3462
3463
3464
3465 ForceSendFields []string `json:"-"`
3466
3467
3468
3469
3470 NullFields []string `json:"-"`
3471 }
3472
3473 func (s *VulnerabilityReportVulnerabilityDetailsReference) MarshalJSON() ([]byte, error) {
3474 type NoMethod VulnerabilityReportVulnerabilityDetailsReference
3475 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3476 }
3477
3478
3479
3480 type VulnerabilityReportVulnerabilityItem struct {
3481
3482
3483
3484
3485
3486
3487 AvailableInventoryItemId string `json:"availableInventoryItemId,omitempty"`
3488
3489
3490 FixedCpeUri string `json:"fixedCpeUri,omitempty"`
3491
3492
3493
3494
3495
3496 InstalledInventoryItemId string `json:"installedInventoryItemId,omitempty"`
3497
3498
3499 UpstreamFix string `json:"upstreamFix,omitempty"`
3500
3501
3502
3503
3504
3505 ForceSendFields []string `json:"-"`
3506
3507
3508
3509
3510 NullFields []string `json:"-"`
3511 }
3512
3513 func (s *VulnerabilityReportVulnerabilityItem) MarshalJSON() ([]byte, error) {
3514 type NoMethod VulnerabilityReportVulnerabilityItem
3515 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3516 }
3517
3518
3519
3520 type WeekDayOfMonth struct {
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532 DayOfWeek string `json:"dayOfWeek,omitempty"`
3533
3534
3535
3536
3537
3538
3539
3540 DayOffset int64 `json:"dayOffset,omitempty"`
3541
3542
3543 WeekOrdinal int64 `json:"weekOrdinal,omitempty"`
3544
3545
3546
3547
3548
3549 ForceSendFields []string `json:"-"`
3550
3551
3552
3553
3554 NullFields []string `json:"-"`
3555 }
3556
3557 func (s *WeekDayOfMonth) MarshalJSON() ([]byte, error) {
3558 type NoMethod WeekDayOfMonth
3559 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3560 }
3561
3562
3563 type WeeklySchedule struct {
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575 DayOfWeek string `json:"dayOfWeek,omitempty"`
3576
3577
3578
3579
3580
3581 ForceSendFields []string `json:"-"`
3582
3583
3584
3585
3586 NullFields []string `json:"-"`
3587 }
3588
3589 func (s *WeeklySchedule) MarshalJSON() ([]byte, error) {
3590 type NoMethod WeeklySchedule
3591 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3592 }
3593
3594
3595
3596 type WindowsUpdateSettings struct {
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630 Classifications []string `json:"classifications,omitempty"`
3631
3632 Excludes []string `json:"excludes,omitempty"`
3633
3634
3635
3636 ExclusivePatches []string `json:"exclusivePatches,omitempty"`
3637
3638
3639
3640
3641
3642 ForceSendFields []string `json:"-"`
3643
3644
3645
3646
3647 NullFields []string `json:"-"`
3648 }
3649
3650 func (s *WindowsUpdateSettings) MarshalJSON() ([]byte, error) {
3651 type NoMethod WindowsUpdateSettings
3652 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3653 }
3654
3655
3656
3657
3658 type YumSettings struct {
3659
3660
3661 Excludes []string `json:"excludes,omitempty"`
3662
3663
3664
3665
3666 ExclusivePackages []string `json:"exclusivePackages,omitempty"`
3667
3668 Minimal bool `json:"minimal,omitempty"`
3669
3670
3671 Security bool `json:"security,omitempty"`
3672
3673
3674
3675
3676
3677 ForceSendFields []string `json:"-"`
3678
3679
3680
3681
3682 NullFields []string `json:"-"`
3683 }
3684
3685 func (s *YumSettings) MarshalJSON() ([]byte, error) {
3686 type NoMethod YumSettings
3687 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3688 }
3689
3690
3691
3692 type ZypperSettings struct {
3693
3694
3695 Categories []string `json:"categories,omitempty"`
3696
3697 Excludes []string `json:"excludes,omitempty"`
3698
3699
3700
3701 ExclusivePatches []string `json:"exclusivePatches,omitempty"`
3702
3703
3704 Severities []string `json:"severities,omitempty"`
3705
3706 WithOptional bool `json:"withOptional,omitempty"`
3707
3708 WithUpdate bool `json:"withUpdate,omitempty"`
3709
3710
3711
3712
3713
3714 ForceSendFields []string `json:"-"`
3715
3716
3717
3718
3719 NullFields []string `json:"-"`
3720 }
3721
3722 func (s *ZypperSettings) MarshalJSON() ([]byte, error) {
3723 type NoMethod ZypperSettings
3724 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3725 }
3726
3727 type ProjectsLocationsGlobalGetProjectFeatureSettingsCall struct {
3728 s *Service
3729 name string
3730 urlParams_ gensupport.URLParams
3731 ifNoneMatch_ string
3732 ctx_ context.Context
3733 header_ http.Header
3734 }
3735
3736
3737
3738
3739
3740
3741 func (r *ProjectsLocationsGlobalService) GetProjectFeatureSettings(name string) *ProjectsLocationsGlobalGetProjectFeatureSettingsCall {
3742 c := &ProjectsLocationsGlobalGetProjectFeatureSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3743 c.name = name
3744 return c
3745 }
3746
3747
3748
3749
3750 func (c *ProjectsLocationsGlobalGetProjectFeatureSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalGetProjectFeatureSettingsCall {
3751 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3752 return c
3753 }
3754
3755
3756
3757
3758 func (c *ProjectsLocationsGlobalGetProjectFeatureSettingsCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalGetProjectFeatureSettingsCall {
3759 c.ifNoneMatch_ = entityTag
3760 return c
3761 }
3762
3763
3764 func (c *ProjectsLocationsGlobalGetProjectFeatureSettingsCall) Context(ctx context.Context) *ProjectsLocationsGlobalGetProjectFeatureSettingsCall {
3765 c.ctx_ = ctx
3766 return c
3767 }
3768
3769
3770
3771 func (c *ProjectsLocationsGlobalGetProjectFeatureSettingsCall) Header() http.Header {
3772 if c.header_ == nil {
3773 c.header_ = make(http.Header)
3774 }
3775 return c.header_
3776 }
3777
3778 func (c *ProjectsLocationsGlobalGetProjectFeatureSettingsCall) doRequest(alt string) (*http.Response, error) {
3779 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3780 if c.ifNoneMatch_ != "" {
3781 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3782 }
3783 var body io.Reader = nil
3784 c.urlParams_.Set("alt", alt)
3785 c.urlParams_.Set("prettyPrint", "false")
3786 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3787 urls += "?" + c.urlParams_.Encode()
3788 req, err := http.NewRequest("GET", urls, body)
3789 if err != nil {
3790 return nil, err
3791 }
3792 req.Header = reqHeaders
3793 googleapi.Expand(req.URL, map[string]string{
3794 "name": c.name,
3795 })
3796 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3797 }
3798
3799
3800
3801
3802
3803
3804
3805 func (c *ProjectsLocationsGlobalGetProjectFeatureSettingsCall) Do(opts ...googleapi.CallOption) (*ProjectFeatureSettings, error) {
3806 gensupport.SetOptions(c.urlParams_, opts...)
3807 res, err := c.doRequest("json")
3808 if res != nil && res.StatusCode == http.StatusNotModified {
3809 if res.Body != nil {
3810 res.Body.Close()
3811 }
3812 return nil, gensupport.WrapError(&googleapi.Error{
3813 Code: res.StatusCode,
3814 Header: res.Header,
3815 })
3816 }
3817 if err != nil {
3818 return nil, err
3819 }
3820 defer googleapi.CloseBody(res)
3821 if err := googleapi.CheckResponse(res); err != nil {
3822 return nil, gensupport.WrapError(err)
3823 }
3824 ret := &ProjectFeatureSettings{
3825 ServerResponse: googleapi.ServerResponse{
3826 Header: res.Header,
3827 HTTPStatusCode: res.StatusCode,
3828 },
3829 }
3830 target := &ret
3831 if err := gensupport.DecodeResponse(target, res); err != nil {
3832 return nil, err
3833 }
3834 return ret, nil
3835 }
3836
3837 type ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall struct {
3838 s *Service
3839 name string
3840 projectfeaturesettings *ProjectFeatureSettings
3841 urlParams_ gensupport.URLParams
3842 ctx_ context.Context
3843 header_ http.Header
3844 }
3845
3846
3847
3848
3849
3850
3851 func (r *ProjectsLocationsGlobalService) UpdateProjectFeatureSettings(name string, projectfeaturesettings *ProjectFeatureSettings) *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall {
3852 c := &ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3853 c.name = name
3854 c.projectfeaturesettings = projectfeaturesettings
3855 return c
3856 }
3857
3858
3859
3860 func (c *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall {
3861 c.urlParams_.Set("updateMask", updateMask)
3862 return c
3863 }
3864
3865
3866
3867
3868 func (c *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall {
3869 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3870 return c
3871 }
3872
3873
3874 func (c *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall) Context(ctx context.Context) *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall {
3875 c.ctx_ = ctx
3876 return c
3877 }
3878
3879
3880
3881 func (c *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall) Header() http.Header {
3882 if c.header_ == nil {
3883 c.header_ = make(http.Header)
3884 }
3885 return c.header_
3886 }
3887
3888 func (c *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall) doRequest(alt string) (*http.Response, error) {
3889 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3890 var body io.Reader = nil
3891 body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectfeaturesettings)
3892 if err != nil {
3893 return nil, err
3894 }
3895 c.urlParams_.Set("alt", alt)
3896 c.urlParams_.Set("prettyPrint", "false")
3897 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3898 urls += "?" + c.urlParams_.Encode()
3899 req, err := http.NewRequest("PATCH", urls, body)
3900 if err != nil {
3901 return nil, err
3902 }
3903 req.Header = reqHeaders
3904 googleapi.Expand(req.URL, map[string]string{
3905 "name": c.name,
3906 })
3907 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3908 }
3909
3910
3911
3912
3913
3914
3915
3916 func (c *ProjectsLocationsGlobalUpdateProjectFeatureSettingsCall) Do(opts ...googleapi.CallOption) (*ProjectFeatureSettings, error) {
3917 gensupport.SetOptions(c.urlParams_, opts...)
3918 res, err := c.doRequest("json")
3919 if res != nil && res.StatusCode == http.StatusNotModified {
3920 if res.Body != nil {
3921 res.Body.Close()
3922 }
3923 return nil, gensupport.WrapError(&googleapi.Error{
3924 Code: res.StatusCode,
3925 Header: res.Header,
3926 })
3927 }
3928 if err != nil {
3929 return nil, err
3930 }
3931 defer googleapi.CloseBody(res)
3932 if err := googleapi.CheckResponse(res); err != nil {
3933 return nil, gensupport.WrapError(err)
3934 }
3935 ret := &ProjectFeatureSettings{
3936 ServerResponse: googleapi.ServerResponse{
3937 Header: res.Header,
3938 HTTPStatusCode: res.StatusCode,
3939 },
3940 }
3941 target := &ret
3942 if err := gensupport.DecodeResponse(target, res); err != nil {
3943 return nil, err
3944 }
3945 return ret, nil
3946 }
3947
3948 type ProjectsLocationsInstancesInventoriesGetCall struct {
3949 s *Service
3950 name string
3951 urlParams_ gensupport.URLParams
3952 ifNoneMatch_ string
3953 ctx_ context.Context
3954 header_ http.Header
3955 }
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965 func (r *ProjectsLocationsInstancesInventoriesService) Get(name string) *ProjectsLocationsInstancesInventoriesGetCall {
3966 c := &ProjectsLocationsInstancesInventoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3967 c.name = name
3968 return c
3969 }
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983 func (c *ProjectsLocationsInstancesInventoriesGetCall) View(view string) *ProjectsLocationsInstancesInventoriesGetCall {
3984 c.urlParams_.Set("view", view)
3985 return c
3986 }
3987
3988
3989
3990
3991 func (c *ProjectsLocationsInstancesInventoriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesInventoriesGetCall {
3992 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3993 return c
3994 }
3995
3996
3997
3998
3999 func (c *ProjectsLocationsInstancesInventoriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesInventoriesGetCall {
4000 c.ifNoneMatch_ = entityTag
4001 return c
4002 }
4003
4004
4005 func (c *ProjectsLocationsInstancesInventoriesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesInventoriesGetCall {
4006 c.ctx_ = ctx
4007 return c
4008 }
4009
4010
4011
4012 func (c *ProjectsLocationsInstancesInventoriesGetCall) Header() http.Header {
4013 if c.header_ == nil {
4014 c.header_ = make(http.Header)
4015 }
4016 return c.header_
4017 }
4018
4019 func (c *ProjectsLocationsInstancesInventoriesGetCall) doRequest(alt string) (*http.Response, error) {
4020 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4021 if c.ifNoneMatch_ != "" {
4022 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4023 }
4024 var body io.Reader = nil
4025 c.urlParams_.Set("alt", alt)
4026 c.urlParams_.Set("prettyPrint", "false")
4027 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4028 urls += "?" + c.urlParams_.Encode()
4029 req, err := http.NewRequest("GET", urls, body)
4030 if err != nil {
4031 return nil, err
4032 }
4033 req.Header = reqHeaders
4034 googleapi.Expand(req.URL, map[string]string{
4035 "name": c.name,
4036 })
4037 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4038 }
4039
4040
4041
4042
4043
4044
4045 func (c *ProjectsLocationsInstancesInventoriesGetCall) Do(opts ...googleapi.CallOption) (*Inventory, error) {
4046 gensupport.SetOptions(c.urlParams_, opts...)
4047 res, err := c.doRequest("json")
4048 if res != nil && res.StatusCode == http.StatusNotModified {
4049 if res.Body != nil {
4050 res.Body.Close()
4051 }
4052 return nil, gensupport.WrapError(&googleapi.Error{
4053 Code: res.StatusCode,
4054 Header: res.Header,
4055 })
4056 }
4057 if err != nil {
4058 return nil, err
4059 }
4060 defer googleapi.CloseBody(res)
4061 if err := googleapi.CheckResponse(res); err != nil {
4062 return nil, gensupport.WrapError(err)
4063 }
4064 ret := &Inventory{
4065 ServerResponse: googleapi.ServerResponse{
4066 Header: res.Header,
4067 HTTPStatusCode: res.StatusCode,
4068 },
4069 }
4070 target := &ret
4071 if err := gensupport.DecodeResponse(target, res); err != nil {
4072 return nil, err
4073 }
4074 return ret, nil
4075 }
4076
4077 type ProjectsLocationsInstancesInventoriesListCall struct {
4078 s *Service
4079 parent string
4080 urlParams_ gensupport.URLParams
4081 ifNoneMatch_ string
4082 ctx_ context.Context
4083 header_ http.Header
4084 }
4085
4086
4087
4088
4089
4090
4091 func (r *ProjectsLocationsInstancesInventoriesService) List(parent string) *ProjectsLocationsInstancesInventoriesListCall {
4092 c := &ProjectsLocationsInstancesInventoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4093 c.parent = parent
4094 return c
4095 }
4096
4097
4098
4099
4100 func (c *ProjectsLocationsInstancesInventoriesListCall) Filter(filter string) *ProjectsLocationsInstancesInventoriesListCall {
4101 c.urlParams_.Set("filter", filter)
4102 return c
4103 }
4104
4105
4106
4107 func (c *ProjectsLocationsInstancesInventoriesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesInventoriesListCall {
4108 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4109 return c
4110 }
4111
4112
4113
4114
4115 func (c *ProjectsLocationsInstancesInventoriesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesInventoriesListCall {
4116 c.urlParams_.Set("pageToken", pageToken)
4117 return c
4118 }
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132 func (c *ProjectsLocationsInstancesInventoriesListCall) View(view string) *ProjectsLocationsInstancesInventoriesListCall {
4133 c.urlParams_.Set("view", view)
4134 return c
4135 }
4136
4137
4138
4139
4140 func (c *ProjectsLocationsInstancesInventoriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesInventoriesListCall {
4141 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4142 return c
4143 }
4144
4145
4146
4147
4148 func (c *ProjectsLocationsInstancesInventoriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesInventoriesListCall {
4149 c.ifNoneMatch_ = entityTag
4150 return c
4151 }
4152
4153
4154 func (c *ProjectsLocationsInstancesInventoriesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesInventoriesListCall {
4155 c.ctx_ = ctx
4156 return c
4157 }
4158
4159
4160
4161 func (c *ProjectsLocationsInstancesInventoriesListCall) Header() http.Header {
4162 if c.header_ == nil {
4163 c.header_ = make(http.Header)
4164 }
4165 return c.header_
4166 }
4167
4168 func (c *ProjectsLocationsInstancesInventoriesListCall) doRequest(alt string) (*http.Response, error) {
4169 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4170 if c.ifNoneMatch_ != "" {
4171 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4172 }
4173 var body io.Reader = nil
4174 c.urlParams_.Set("alt", alt)
4175 c.urlParams_.Set("prettyPrint", "false")
4176 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/inventories")
4177 urls += "?" + c.urlParams_.Encode()
4178 req, err := http.NewRequest("GET", urls, body)
4179 if err != nil {
4180 return nil, err
4181 }
4182 req.Header = reqHeaders
4183 googleapi.Expand(req.URL, map[string]string{
4184 "parent": c.parent,
4185 })
4186 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4187 }
4188
4189
4190
4191
4192
4193
4194
4195 func (c *ProjectsLocationsInstancesInventoriesListCall) Do(opts ...googleapi.CallOption) (*ListInventoriesResponse, error) {
4196 gensupport.SetOptions(c.urlParams_, opts...)
4197 res, err := c.doRequest("json")
4198 if res != nil && res.StatusCode == http.StatusNotModified {
4199 if res.Body != nil {
4200 res.Body.Close()
4201 }
4202 return nil, gensupport.WrapError(&googleapi.Error{
4203 Code: res.StatusCode,
4204 Header: res.Header,
4205 })
4206 }
4207 if err != nil {
4208 return nil, err
4209 }
4210 defer googleapi.CloseBody(res)
4211 if err := googleapi.CheckResponse(res); err != nil {
4212 return nil, gensupport.WrapError(err)
4213 }
4214 ret := &ListInventoriesResponse{
4215 ServerResponse: googleapi.ServerResponse{
4216 Header: res.Header,
4217 HTTPStatusCode: res.StatusCode,
4218 },
4219 }
4220 target := &ret
4221 if err := gensupport.DecodeResponse(target, res); err != nil {
4222 return nil, err
4223 }
4224 return ret, nil
4225 }
4226
4227
4228
4229
4230 func (c *ProjectsLocationsInstancesInventoriesListCall) Pages(ctx context.Context, f func(*ListInventoriesResponse) error) error {
4231 c.ctx_ = ctx
4232 defer c.PageToken(c.urlParams_.Get("pageToken"))
4233 for {
4234 x, err := c.Do()
4235 if err != nil {
4236 return err
4237 }
4238 if err := f(x); err != nil {
4239 return err
4240 }
4241 if x.NextPageToken == "" {
4242 return nil
4243 }
4244 c.PageToken(x.NextPageToken)
4245 }
4246 }
4247
4248 type ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall struct {
4249 s *Service
4250 name string
4251 urlParams_ gensupport.URLParams
4252 ifNoneMatch_ string
4253 ctx_ context.Context
4254 header_ http.Header
4255 }
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266 func (r *ProjectsLocationsInstancesOsPolicyAssignmentsReportsService) Get(name string) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall {
4267 c := &ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4268 c.name = name
4269 return c
4270 }
4271
4272
4273
4274
4275 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall {
4276 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4277 return c
4278 }
4279
4280
4281
4282
4283 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall {
4284 c.ifNoneMatch_ = entityTag
4285 return c
4286 }
4287
4288
4289 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall {
4290 c.ctx_ = ctx
4291 return c
4292 }
4293
4294
4295
4296 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall) Header() http.Header {
4297 if c.header_ == nil {
4298 c.header_ = make(http.Header)
4299 }
4300 return c.header_
4301 }
4302
4303 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall) doRequest(alt string) (*http.Response, error) {
4304 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4305 if c.ifNoneMatch_ != "" {
4306 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4307 }
4308 var body io.Reader = nil
4309 c.urlParams_.Set("alt", alt)
4310 c.urlParams_.Set("prettyPrint", "false")
4311 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4312 urls += "?" + c.urlParams_.Encode()
4313 req, err := http.NewRequest("GET", urls, body)
4314 if err != nil {
4315 return nil, err
4316 }
4317 req.Header = reqHeaders
4318 googleapi.Expand(req.URL, map[string]string{
4319 "name": c.name,
4320 })
4321 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4322 }
4323
4324
4325
4326
4327
4328
4329
4330 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsGetCall) Do(opts ...googleapi.CallOption) (*OSPolicyAssignmentReport, error) {
4331 gensupport.SetOptions(c.urlParams_, opts...)
4332 res, err := c.doRequest("json")
4333 if res != nil && res.StatusCode == http.StatusNotModified {
4334 if res.Body != nil {
4335 res.Body.Close()
4336 }
4337 return nil, gensupport.WrapError(&googleapi.Error{
4338 Code: res.StatusCode,
4339 Header: res.Header,
4340 })
4341 }
4342 if err != nil {
4343 return nil, err
4344 }
4345 defer googleapi.CloseBody(res)
4346 if err := googleapi.CheckResponse(res); err != nil {
4347 return nil, gensupport.WrapError(err)
4348 }
4349 ret := &OSPolicyAssignmentReport{
4350 ServerResponse: googleapi.ServerResponse{
4351 Header: res.Header,
4352 HTTPStatusCode: res.StatusCode,
4353 },
4354 }
4355 target := &ret
4356 if err := gensupport.DecodeResponse(target, res); err != nil {
4357 return nil, err
4358 }
4359 return ret, nil
4360 }
4361
4362 type ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall struct {
4363 s *Service
4364 parent string
4365 urlParams_ gensupport.URLParams
4366 ifNoneMatch_ string
4367 ctx_ context.Context
4368 header_ http.Header
4369 }
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392 func (r *ProjectsLocationsInstancesOsPolicyAssignmentsReportsService) List(parent string) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
4393 c := &ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4394 c.parent = parent
4395 return c
4396 }
4397
4398
4399
4400
4401 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) Filter(filter string) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
4402 c.urlParams_.Set("filter", filter)
4403 return c
4404 }
4405
4406
4407
4408 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
4409 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4410 return c
4411 }
4412
4413
4414
4415
4416 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) PageToken(pageToken string) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
4417 c.urlParams_.Set("pageToken", pageToken)
4418 return c
4419 }
4420
4421
4422
4423
4424 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
4425 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4426 return c
4427 }
4428
4429
4430
4431
4432 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
4433 c.ifNoneMatch_ = entityTag
4434 return c
4435 }
4436
4437
4438 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) Context(ctx context.Context) *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall {
4439 c.ctx_ = ctx
4440 return c
4441 }
4442
4443
4444
4445 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) Header() http.Header {
4446 if c.header_ == nil {
4447 c.header_ = make(http.Header)
4448 }
4449 return c.header_
4450 }
4451
4452 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) doRequest(alt string) (*http.Response, error) {
4453 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4454 if c.ifNoneMatch_ != "" {
4455 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4456 }
4457 var body io.Reader = nil
4458 c.urlParams_.Set("alt", alt)
4459 c.urlParams_.Set("prettyPrint", "false")
4460 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/reports")
4461 urls += "?" + c.urlParams_.Encode()
4462 req, err := http.NewRequest("GET", urls, body)
4463 if err != nil {
4464 return nil, err
4465 }
4466 req.Header = reqHeaders
4467 googleapi.Expand(req.URL, map[string]string{
4468 "parent": c.parent,
4469 })
4470 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4471 }
4472
4473
4474
4475
4476
4477
4478
4479 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) Do(opts ...googleapi.CallOption) (*ListOSPolicyAssignmentReportsResponse, error) {
4480 gensupport.SetOptions(c.urlParams_, opts...)
4481 res, err := c.doRequest("json")
4482 if res != nil && res.StatusCode == http.StatusNotModified {
4483 if res.Body != nil {
4484 res.Body.Close()
4485 }
4486 return nil, gensupport.WrapError(&googleapi.Error{
4487 Code: res.StatusCode,
4488 Header: res.Header,
4489 })
4490 }
4491 if err != nil {
4492 return nil, err
4493 }
4494 defer googleapi.CloseBody(res)
4495 if err := googleapi.CheckResponse(res); err != nil {
4496 return nil, gensupport.WrapError(err)
4497 }
4498 ret := &ListOSPolicyAssignmentReportsResponse{
4499 ServerResponse: googleapi.ServerResponse{
4500 Header: res.Header,
4501 HTTPStatusCode: res.StatusCode,
4502 },
4503 }
4504 target := &ret
4505 if err := gensupport.DecodeResponse(target, res); err != nil {
4506 return nil, err
4507 }
4508 return ret, nil
4509 }
4510
4511
4512
4513
4514 func (c *ProjectsLocationsInstancesOsPolicyAssignmentsReportsListCall) Pages(ctx context.Context, f func(*ListOSPolicyAssignmentReportsResponse) error) error {
4515 c.ctx_ = ctx
4516 defer c.PageToken(c.urlParams_.Get("pageToken"))
4517 for {
4518 x, err := c.Do()
4519 if err != nil {
4520 return err
4521 }
4522 if err := f(x); err != nil {
4523 return err
4524 }
4525 if x.NextPageToken == "" {
4526 return nil
4527 }
4528 c.PageToken(x.NextPageToken)
4529 }
4530 }
4531
4532 type ProjectsLocationsInstancesVulnerabilityReportsGetCall struct {
4533 s *Service
4534 name string
4535 urlParams_ gensupport.URLParams
4536 ifNoneMatch_ string
4537 ctx_ context.Context
4538 header_ http.Header
4539 }
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549 func (r *ProjectsLocationsInstancesVulnerabilityReportsService) Get(name string) *ProjectsLocationsInstancesVulnerabilityReportsGetCall {
4550 c := &ProjectsLocationsInstancesVulnerabilityReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4551 c.name = name
4552 return c
4553 }
4554
4555
4556
4557
4558 func (c *ProjectsLocationsInstancesVulnerabilityReportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesVulnerabilityReportsGetCall {
4559 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4560 return c
4561 }
4562
4563
4564
4565
4566 func (c *ProjectsLocationsInstancesVulnerabilityReportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesVulnerabilityReportsGetCall {
4567 c.ifNoneMatch_ = entityTag
4568 return c
4569 }
4570
4571
4572 func (c *ProjectsLocationsInstancesVulnerabilityReportsGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesVulnerabilityReportsGetCall {
4573 c.ctx_ = ctx
4574 return c
4575 }
4576
4577
4578
4579 func (c *ProjectsLocationsInstancesVulnerabilityReportsGetCall) Header() http.Header {
4580 if c.header_ == nil {
4581 c.header_ = make(http.Header)
4582 }
4583 return c.header_
4584 }
4585
4586 func (c *ProjectsLocationsInstancesVulnerabilityReportsGetCall) doRequest(alt string) (*http.Response, error) {
4587 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4588 if c.ifNoneMatch_ != "" {
4589 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4590 }
4591 var body io.Reader = nil
4592 c.urlParams_.Set("alt", alt)
4593 c.urlParams_.Set("prettyPrint", "false")
4594 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4595 urls += "?" + c.urlParams_.Encode()
4596 req, err := http.NewRequest("GET", urls, body)
4597 if err != nil {
4598 return nil, err
4599 }
4600 req.Header = reqHeaders
4601 googleapi.Expand(req.URL, map[string]string{
4602 "name": c.name,
4603 })
4604 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4605 }
4606
4607
4608
4609
4610
4611
4612
4613 func (c *ProjectsLocationsInstancesVulnerabilityReportsGetCall) Do(opts ...googleapi.CallOption) (*VulnerabilityReport, error) {
4614 gensupport.SetOptions(c.urlParams_, opts...)
4615 res, err := c.doRequest("json")
4616 if res != nil && res.StatusCode == http.StatusNotModified {
4617 if res.Body != nil {
4618 res.Body.Close()
4619 }
4620 return nil, gensupport.WrapError(&googleapi.Error{
4621 Code: res.StatusCode,
4622 Header: res.Header,
4623 })
4624 }
4625 if err != nil {
4626 return nil, err
4627 }
4628 defer googleapi.CloseBody(res)
4629 if err := googleapi.CheckResponse(res); err != nil {
4630 return nil, gensupport.WrapError(err)
4631 }
4632 ret := &VulnerabilityReport{
4633 ServerResponse: googleapi.ServerResponse{
4634 Header: res.Header,
4635 HTTPStatusCode: res.StatusCode,
4636 },
4637 }
4638 target := &ret
4639 if err := gensupport.DecodeResponse(target, res); err != nil {
4640 return nil, err
4641 }
4642 return ret, nil
4643 }
4644
4645 type ProjectsLocationsInstancesVulnerabilityReportsListCall struct {
4646 s *Service
4647 parent string
4648 urlParams_ gensupport.URLParams
4649 ifNoneMatch_ string
4650 ctx_ context.Context
4651 header_ http.Header
4652 }
4653
4654
4655
4656
4657
4658
4659 func (r *ProjectsLocationsInstancesVulnerabilityReportsService) List(parent string) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
4660 c := &ProjectsLocationsInstancesVulnerabilityReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4661 c.parent = parent
4662 return c
4663 }
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678 func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) Filter(filter string) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
4679 c.urlParams_.Set("filter", filter)
4680 return c
4681 }
4682
4683
4684
4685 func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
4686 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4687 return c
4688 }
4689
4690
4691
4692
4693 func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) PageToken(pageToken string) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
4694 c.urlParams_.Set("pageToken", pageToken)
4695 return c
4696 }
4697
4698
4699
4700
4701 func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
4702 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4703 return c
4704 }
4705
4706
4707
4708
4709 func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
4710 c.ifNoneMatch_ = entityTag
4711 return c
4712 }
4713
4714
4715 func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) Context(ctx context.Context) *ProjectsLocationsInstancesVulnerabilityReportsListCall {
4716 c.ctx_ = ctx
4717 return c
4718 }
4719
4720
4721
4722 func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) Header() http.Header {
4723 if c.header_ == nil {
4724 c.header_ = make(http.Header)
4725 }
4726 return c.header_
4727 }
4728
4729 func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) doRequest(alt string) (*http.Response, error) {
4730 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4731 if c.ifNoneMatch_ != "" {
4732 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4733 }
4734 var body io.Reader = nil
4735 c.urlParams_.Set("alt", alt)
4736 c.urlParams_.Set("prettyPrint", "false")
4737 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/vulnerabilityReports")
4738 urls += "?" + c.urlParams_.Encode()
4739 req, err := http.NewRequest("GET", urls, body)
4740 if err != nil {
4741 return nil, err
4742 }
4743 req.Header = reqHeaders
4744 googleapi.Expand(req.URL, map[string]string{
4745 "parent": c.parent,
4746 })
4747 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4748 }
4749
4750
4751
4752
4753
4754
4755
4756 func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) Do(opts ...googleapi.CallOption) (*ListVulnerabilityReportsResponse, error) {
4757 gensupport.SetOptions(c.urlParams_, opts...)
4758 res, err := c.doRequest("json")
4759 if res != nil && res.StatusCode == http.StatusNotModified {
4760 if res.Body != nil {
4761 res.Body.Close()
4762 }
4763 return nil, gensupport.WrapError(&googleapi.Error{
4764 Code: res.StatusCode,
4765 Header: res.Header,
4766 })
4767 }
4768 if err != nil {
4769 return nil, err
4770 }
4771 defer googleapi.CloseBody(res)
4772 if err := googleapi.CheckResponse(res); err != nil {
4773 return nil, gensupport.WrapError(err)
4774 }
4775 ret := &ListVulnerabilityReportsResponse{
4776 ServerResponse: googleapi.ServerResponse{
4777 Header: res.Header,
4778 HTTPStatusCode: res.StatusCode,
4779 },
4780 }
4781 target := &ret
4782 if err := gensupport.DecodeResponse(target, res); err != nil {
4783 return nil, err
4784 }
4785 return ret, nil
4786 }
4787
4788
4789
4790
4791 func (c *ProjectsLocationsInstancesVulnerabilityReportsListCall) Pages(ctx context.Context, f func(*ListVulnerabilityReportsResponse) error) error {
4792 c.ctx_ = ctx
4793 defer c.PageToken(c.urlParams_.Get("pageToken"))
4794 for {
4795 x, err := c.Do()
4796 if err != nil {
4797 return err
4798 }
4799 if err := f(x); err != nil {
4800 return err
4801 }
4802 if x.NextPageToken == "" {
4803 return nil
4804 }
4805 c.PageToken(x.NextPageToken)
4806 }
4807 }
4808
4809 type ProjectsLocationsOsPolicyAssignmentsCreateCall struct {
4810 s *Service
4811 parent string
4812 ospolicyassignment *OSPolicyAssignment
4813 urlParams_ gensupport.URLParams
4814 ctx_ context.Context
4815 header_ http.Header
4816 }
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828 func (r *ProjectsLocationsOsPolicyAssignmentsService) Create(parent string, ospolicyassignment *OSPolicyAssignment) *ProjectsLocationsOsPolicyAssignmentsCreateCall {
4829 c := &ProjectsLocationsOsPolicyAssignmentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4830 c.parent = parent
4831 c.ospolicyassignment = ospolicyassignment
4832 return c
4833 }
4834
4835
4836
4837
4838
4839
4840 func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) OsPolicyAssignmentId(osPolicyAssignmentId string) *ProjectsLocationsOsPolicyAssignmentsCreateCall {
4841 c.urlParams_.Set("osPolicyAssignmentId", osPolicyAssignmentId)
4842 return c
4843 }
4844
4845
4846
4847
4848 func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) RequestId(requestId string) *ProjectsLocationsOsPolicyAssignmentsCreateCall {
4849 c.urlParams_.Set("requestId", requestId)
4850 return c
4851 }
4852
4853
4854
4855
4856 func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsCreateCall {
4857 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4858 return c
4859 }
4860
4861
4862 func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsCreateCall {
4863 c.ctx_ = ctx
4864 return c
4865 }
4866
4867
4868
4869 func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) Header() http.Header {
4870 if c.header_ == nil {
4871 c.header_ = make(http.Header)
4872 }
4873 return c.header_
4874 }
4875
4876 func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) doRequest(alt string) (*http.Response, error) {
4877 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4878 var body io.Reader = nil
4879 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ospolicyassignment)
4880 if err != nil {
4881 return nil, err
4882 }
4883 c.urlParams_.Set("alt", alt)
4884 c.urlParams_.Set("prettyPrint", "false")
4885 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/osPolicyAssignments")
4886 urls += "?" + c.urlParams_.Encode()
4887 req, err := http.NewRequest("POST", urls, body)
4888 if err != nil {
4889 return nil, err
4890 }
4891 req.Header = reqHeaders
4892 googleapi.Expand(req.URL, map[string]string{
4893 "parent": c.parent,
4894 })
4895 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4896 }
4897
4898
4899
4900
4901
4902
4903 func (c *ProjectsLocationsOsPolicyAssignmentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4904 gensupport.SetOptions(c.urlParams_, opts...)
4905 res, err := c.doRequest("json")
4906 if res != nil && res.StatusCode == http.StatusNotModified {
4907 if res.Body != nil {
4908 res.Body.Close()
4909 }
4910 return nil, gensupport.WrapError(&googleapi.Error{
4911 Code: res.StatusCode,
4912 Header: res.Header,
4913 })
4914 }
4915 if err != nil {
4916 return nil, err
4917 }
4918 defer googleapi.CloseBody(res)
4919 if err := googleapi.CheckResponse(res); err != nil {
4920 return nil, gensupport.WrapError(err)
4921 }
4922 ret := &Operation{
4923 ServerResponse: googleapi.ServerResponse{
4924 Header: res.Header,
4925 HTTPStatusCode: res.StatusCode,
4926 },
4927 }
4928 target := &ret
4929 if err := gensupport.DecodeResponse(target, res); err != nil {
4930 return nil, err
4931 }
4932 return ret, nil
4933 }
4934
4935 type ProjectsLocationsOsPolicyAssignmentsDeleteCall struct {
4936 s *Service
4937 name string
4938 urlParams_ gensupport.URLParams
4939 ctx_ context.Context
4940 header_ http.Header
4941 }
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952 func (r *ProjectsLocationsOsPolicyAssignmentsService) Delete(name string) *ProjectsLocationsOsPolicyAssignmentsDeleteCall {
4953 c := &ProjectsLocationsOsPolicyAssignmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4954 c.name = name
4955 return c
4956 }
4957
4958
4959
4960
4961 func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) RequestId(requestId string) *ProjectsLocationsOsPolicyAssignmentsDeleteCall {
4962 c.urlParams_.Set("requestId", requestId)
4963 return c
4964 }
4965
4966
4967
4968
4969 func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsDeleteCall {
4970 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4971 return c
4972 }
4973
4974
4975 func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsDeleteCall {
4976 c.ctx_ = ctx
4977 return c
4978 }
4979
4980
4981
4982 func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) Header() http.Header {
4983 if c.header_ == nil {
4984 c.header_ = make(http.Header)
4985 }
4986 return c.header_
4987 }
4988
4989 func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) doRequest(alt string) (*http.Response, error) {
4990 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4991 var body io.Reader = nil
4992 c.urlParams_.Set("alt", alt)
4993 c.urlParams_.Set("prettyPrint", "false")
4994 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4995 urls += "?" + c.urlParams_.Encode()
4996 req, err := http.NewRequest("DELETE", urls, body)
4997 if err != nil {
4998 return nil, err
4999 }
5000 req.Header = reqHeaders
5001 googleapi.Expand(req.URL, map[string]string{
5002 "name": c.name,
5003 })
5004 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5005 }
5006
5007
5008
5009
5010
5011
5012 func (c *ProjectsLocationsOsPolicyAssignmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5013 gensupport.SetOptions(c.urlParams_, opts...)
5014 res, err := c.doRequest("json")
5015 if res != nil && res.StatusCode == http.StatusNotModified {
5016 if res.Body != nil {
5017 res.Body.Close()
5018 }
5019 return nil, gensupport.WrapError(&googleapi.Error{
5020 Code: res.StatusCode,
5021 Header: res.Header,
5022 })
5023 }
5024 if err != nil {
5025 return nil, err
5026 }
5027 defer googleapi.CloseBody(res)
5028 if err := googleapi.CheckResponse(res); err != nil {
5029 return nil, gensupport.WrapError(err)
5030 }
5031 ret := &Operation{
5032 ServerResponse: googleapi.ServerResponse{
5033 Header: res.Header,
5034 HTTPStatusCode: res.StatusCode,
5035 },
5036 }
5037 target := &ret
5038 if err := gensupport.DecodeResponse(target, res); err != nil {
5039 return nil, err
5040 }
5041 return ret, nil
5042 }
5043
5044 type ProjectsLocationsOsPolicyAssignmentsGetCall struct {
5045 s *Service
5046 name string
5047 urlParams_ gensupport.URLParams
5048 ifNoneMatch_ string
5049 ctx_ context.Context
5050 header_ http.Header
5051 }
5052
5053
5054
5055
5056
5057
5058
5059
5060 func (r *ProjectsLocationsOsPolicyAssignmentsService) Get(name string) *ProjectsLocationsOsPolicyAssignmentsGetCall {
5061 c := &ProjectsLocationsOsPolicyAssignmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5062 c.name = name
5063 return c
5064 }
5065
5066
5067
5068
5069 func (c *ProjectsLocationsOsPolicyAssignmentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsGetCall {
5070 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5071 return c
5072 }
5073
5074
5075
5076
5077 func (c *ProjectsLocationsOsPolicyAssignmentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOsPolicyAssignmentsGetCall {
5078 c.ifNoneMatch_ = entityTag
5079 return c
5080 }
5081
5082
5083 func (c *ProjectsLocationsOsPolicyAssignmentsGetCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsGetCall {
5084 c.ctx_ = ctx
5085 return c
5086 }
5087
5088
5089
5090 func (c *ProjectsLocationsOsPolicyAssignmentsGetCall) Header() http.Header {
5091 if c.header_ == nil {
5092 c.header_ = make(http.Header)
5093 }
5094 return c.header_
5095 }
5096
5097 func (c *ProjectsLocationsOsPolicyAssignmentsGetCall) doRequest(alt string) (*http.Response, error) {
5098 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5099 if c.ifNoneMatch_ != "" {
5100 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5101 }
5102 var body io.Reader = nil
5103 c.urlParams_.Set("alt", alt)
5104 c.urlParams_.Set("prettyPrint", "false")
5105 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5106 urls += "?" + c.urlParams_.Encode()
5107 req, err := http.NewRequest("GET", urls, body)
5108 if err != nil {
5109 return nil, err
5110 }
5111 req.Header = reqHeaders
5112 googleapi.Expand(req.URL, map[string]string{
5113 "name": c.name,
5114 })
5115 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5116 }
5117
5118
5119
5120
5121
5122
5123
5124 func (c *ProjectsLocationsOsPolicyAssignmentsGetCall) Do(opts ...googleapi.CallOption) (*OSPolicyAssignment, error) {
5125 gensupport.SetOptions(c.urlParams_, opts...)
5126 res, err := c.doRequest("json")
5127 if res != nil && res.StatusCode == http.StatusNotModified {
5128 if res.Body != nil {
5129 res.Body.Close()
5130 }
5131 return nil, gensupport.WrapError(&googleapi.Error{
5132 Code: res.StatusCode,
5133 Header: res.Header,
5134 })
5135 }
5136 if err != nil {
5137 return nil, err
5138 }
5139 defer googleapi.CloseBody(res)
5140 if err := googleapi.CheckResponse(res); err != nil {
5141 return nil, gensupport.WrapError(err)
5142 }
5143 ret := &OSPolicyAssignment{
5144 ServerResponse: googleapi.ServerResponse{
5145 Header: res.Header,
5146 HTTPStatusCode: res.StatusCode,
5147 },
5148 }
5149 target := &ret
5150 if err := gensupport.DecodeResponse(target, res); err != nil {
5151 return nil, err
5152 }
5153 return ret, nil
5154 }
5155
5156 type ProjectsLocationsOsPolicyAssignmentsListCall struct {
5157 s *Service
5158 parent string
5159 urlParams_ gensupport.URLParams
5160 ifNoneMatch_ string
5161 ctx_ context.Context
5162 header_ http.Header
5163 }
5164
5165
5166
5167
5168
5169 func (r *ProjectsLocationsOsPolicyAssignmentsService) List(parent string) *ProjectsLocationsOsPolicyAssignmentsListCall {
5170 c := &ProjectsLocationsOsPolicyAssignmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5171 c.parent = parent
5172 return c
5173 }
5174
5175
5176
5177 func (c *ProjectsLocationsOsPolicyAssignmentsListCall) PageSize(pageSize int64) *ProjectsLocationsOsPolicyAssignmentsListCall {
5178 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5179 return c
5180 }
5181
5182
5183
5184
5185 func (c *ProjectsLocationsOsPolicyAssignmentsListCall) PageToken(pageToken string) *ProjectsLocationsOsPolicyAssignmentsListCall {
5186 c.urlParams_.Set("pageToken", pageToken)
5187 return c
5188 }
5189
5190
5191
5192
5193 func (c *ProjectsLocationsOsPolicyAssignmentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsListCall {
5194 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5195 return c
5196 }
5197
5198
5199
5200
5201 func (c *ProjectsLocationsOsPolicyAssignmentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOsPolicyAssignmentsListCall {
5202 c.ifNoneMatch_ = entityTag
5203 return c
5204 }
5205
5206
5207 func (c *ProjectsLocationsOsPolicyAssignmentsListCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsListCall {
5208 c.ctx_ = ctx
5209 return c
5210 }
5211
5212
5213
5214 func (c *ProjectsLocationsOsPolicyAssignmentsListCall) Header() http.Header {
5215 if c.header_ == nil {
5216 c.header_ = make(http.Header)
5217 }
5218 return c.header_
5219 }
5220
5221 func (c *ProjectsLocationsOsPolicyAssignmentsListCall) doRequest(alt string) (*http.Response, error) {
5222 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5223 if c.ifNoneMatch_ != "" {
5224 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5225 }
5226 var body io.Reader = nil
5227 c.urlParams_.Set("alt", alt)
5228 c.urlParams_.Set("prettyPrint", "false")
5229 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/osPolicyAssignments")
5230 urls += "?" + c.urlParams_.Encode()
5231 req, err := http.NewRequest("GET", urls, body)
5232 if err != nil {
5233 return nil, err
5234 }
5235 req.Header = reqHeaders
5236 googleapi.Expand(req.URL, map[string]string{
5237 "parent": c.parent,
5238 })
5239 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5240 }
5241
5242
5243
5244
5245
5246
5247
5248 func (c *ProjectsLocationsOsPolicyAssignmentsListCall) Do(opts ...googleapi.CallOption) (*ListOSPolicyAssignmentsResponse, error) {
5249 gensupport.SetOptions(c.urlParams_, opts...)
5250 res, err := c.doRequest("json")
5251 if res != nil && res.StatusCode == http.StatusNotModified {
5252 if res.Body != nil {
5253 res.Body.Close()
5254 }
5255 return nil, gensupport.WrapError(&googleapi.Error{
5256 Code: res.StatusCode,
5257 Header: res.Header,
5258 })
5259 }
5260 if err != nil {
5261 return nil, err
5262 }
5263 defer googleapi.CloseBody(res)
5264 if err := googleapi.CheckResponse(res); err != nil {
5265 return nil, gensupport.WrapError(err)
5266 }
5267 ret := &ListOSPolicyAssignmentsResponse{
5268 ServerResponse: googleapi.ServerResponse{
5269 Header: res.Header,
5270 HTTPStatusCode: res.StatusCode,
5271 },
5272 }
5273 target := &ret
5274 if err := gensupport.DecodeResponse(target, res); err != nil {
5275 return nil, err
5276 }
5277 return ret, nil
5278 }
5279
5280
5281
5282
5283 func (c *ProjectsLocationsOsPolicyAssignmentsListCall) Pages(ctx context.Context, f func(*ListOSPolicyAssignmentsResponse) error) error {
5284 c.ctx_ = ctx
5285 defer c.PageToken(c.urlParams_.Get("pageToken"))
5286 for {
5287 x, err := c.Do()
5288 if err != nil {
5289 return err
5290 }
5291 if err := f(x); err != nil {
5292 return err
5293 }
5294 if x.NextPageToken == "" {
5295 return nil
5296 }
5297 c.PageToken(x.NextPageToken)
5298 }
5299 }
5300
5301 type ProjectsLocationsOsPolicyAssignmentsListRevisionsCall struct {
5302 s *Service
5303 name string
5304 urlParams_ gensupport.URLParams
5305 ifNoneMatch_ string
5306 ctx_ context.Context
5307 header_ http.Header
5308 }
5309
5310
5311
5312
5313
5314 func (r *ProjectsLocationsOsPolicyAssignmentsService) ListRevisions(name string) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {
5315 c := &ProjectsLocationsOsPolicyAssignmentsListRevisionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5316 c.name = name
5317 return c
5318 }
5319
5320
5321
5322 func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) PageSize(pageSize int64) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {
5323 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5324 return c
5325 }
5326
5327
5328
5329
5330 func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) PageToken(pageToken string) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {
5331 c.urlParams_.Set("pageToken", pageToken)
5332 return c
5333 }
5334
5335
5336
5337
5338 func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {
5339 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5340 return c
5341 }
5342
5343
5344
5345
5346 func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {
5347 c.ifNoneMatch_ = entityTag
5348 return c
5349 }
5350
5351
5352 func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall {
5353 c.ctx_ = ctx
5354 return c
5355 }
5356
5357
5358
5359 func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) Header() http.Header {
5360 if c.header_ == nil {
5361 c.header_ = make(http.Header)
5362 }
5363 return c.header_
5364 }
5365
5366 func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) doRequest(alt string) (*http.Response, error) {
5367 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5368 if c.ifNoneMatch_ != "" {
5369 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5370 }
5371 var body io.Reader = nil
5372 c.urlParams_.Set("alt", alt)
5373 c.urlParams_.Set("prettyPrint", "false")
5374 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listRevisions")
5375 urls += "?" + c.urlParams_.Encode()
5376 req, err := http.NewRequest("GET", urls, body)
5377 if err != nil {
5378 return nil, err
5379 }
5380 req.Header = reqHeaders
5381 googleapi.Expand(req.URL, map[string]string{
5382 "name": c.name,
5383 })
5384 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5385 }
5386
5387
5388
5389
5390
5391
5392
5393 func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) Do(opts ...googleapi.CallOption) (*ListOSPolicyAssignmentRevisionsResponse, error) {
5394 gensupport.SetOptions(c.urlParams_, opts...)
5395 res, err := c.doRequest("json")
5396 if res != nil && res.StatusCode == http.StatusNotModified {
5397 if res.Body != nil {
5398 res.Body.Close()
5399 }
5400 return nil, gensupport.WrapError(&googleapi.Error{
5401 Code: res.StatusCode,
5402 Header: res.Header,
5403 })
5404 }
5405 if err != nil {
5406 return nil, err
5407 }
5408 defer googleapi.CloseBody(res)
5409 if err := googleapi.CheckResponse(res); err != nil {
5410 return nil, gensupport.WrapError(err)
5411 }
5412 ret := &ListOSPolicyAssignmentRevisionsResponse{
5413 ServerResponse: googleapi.ServerResponse{
5414 Header: res.Header,
5415 HTTPStatusCode: res.StatusCode,
5416 },
5417 }
5418 target := &ret
5419 if err := gensupport.DecodeResponse(target, res); err != nil {
5420 return nil, err
5421 }
5422 return ret, nil
5423 }
5424
5425
5426
5427
5428 func (c *ProjectsLocationsOsPolicyAssignmentsListRevisionsCall) Pages(ctx context.Context, f func(*ListOSPolicyAssignmentRevisionsResponse) error) error {
5429 c.ctx_ = ctx
5430 defer c.PageToken(c.urlParams_.Get("pageToken"))
5431 for {
5432 x, err := c.Do()
5433 if err != nil {
5434 return err
5435 }
5436 if err := f(x); err != nil {
5437 return err
5438 }
5439 if x.NextPageToken == "" {
5440 return nil
5441 }
5442 c.PageToken(x.NextPageToken)
5443 }
5444 }
5445
5446 type ProjectsLocationsOsPolicyAssignmentsPatchCall struct {
5447 s *Service
5448 name string
5449 ospolicyassignment *OSPolicyAssignment
5450 urlParams_ gensupport.URLParams
5451 ctx_ context.Context
5452 header_ http.Header
5453 }
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466 func (r *ProjectsLocationsOsPolicyAssignmentsService) Patch(name string, ospolicyassignment *OSPolicyAssignment) *ProjectsLocationsOsPolicyAssignmentsPatchCall {
5467 c := &ProjectsLocationsOsPolicyAssignmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5468 c.name = name
5469 c.ospolicyassignment = ospolicyassignment
5470 return c
5471 }
5472
5473
5474
5475
5476 func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsOsPolicyAssignmentsPatchCall {
5477 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing))
5478 return c
5479 }
5480
5481
5482
5483
5484 func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) RequestId(requestId string) *ProjectsLocationsOsPolicyAssignmentsPatchCall {
5485 c.urlParams_.Set("requestId", requestId)
5486 return c
5487 }
5488
5489
5490
5491 func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsOsPolicyAssignmentsPatchCall {
5492 c.urlParams_.Set("updateMask", updateMask)
5493 return c
5494 }
5495
5496
5497
5498
5499 func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsPatchCall {
5500 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5501 return c
5502 }
5503
5504
5505 func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsPatchCall {
5506 c.ctx_ = ctx
5507 return c
5508 }
5509
5510
5511
5512 func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) Header() http.Header {
5513 if c.header_ == nil {
5514 c.header_ = make(http.Header)
5515 }
5516 return c.header_
5517 }
5518
5519 func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) doRequest(alt string) (*http.Response, error) {
5520 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5521 var body io.Reader = nil
5522 body, err := googleapi.WithoutDataWrapper.JSONReader(c.ospolicyassignment)
5523 if err != nil {
5524 return nil, err
5525 }
5526 c.urlParams_.Set("alt", alt)
5527 c.urlParams_.Set("prettyPrint", "false")
5528 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5529 urls += "?" + c.urlParams_.Encode()
5530 req, err := http.NewRequest("PATCH", urls, body)
5531 if err != nil {
5532 return nil, err
5533 }
5534 req.Header = reqHeaders
5535 googleapi.Expand(req.URL, map[string]string{
5536 "name": c.name,
5537 })
5538 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5539 }
5540
5541
5542
5543
5544
5545
5546 func (c *ProjectsLocationsOsPolicyAssignmentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5547 gensupport.SetOptions(c.urlParams_, opts...)
5548 res, err := c.doRequest("json")
5549 if res != nil && res.StatusCode == http.StatusNotModified {
5550 if res.Body != nil {
5551 res.Body.Close()
5552 }
5553 return nil, gensupport.WrapError(&googleapi.Error{
5554 Code: res.StatusCode,
5555 Header: res.Header,
5556 })
5557 }
5558 if err != nil {
5559 return nil, err
5560 }
5561 defer googleapi.CloseBody(res)
5562 if err := googleapi.CheckResponse(res); err != nil {
5563 return nil, gensupport.WrapError(err)
5564 }
5565 ret := &Operation{
5566 ServerResponse: googleapi.ServerResponse{
5567 Header: res.Header,
5568 HTTPStatusCode: res.StatusCode,
5569 },
5570 }
5571 target := &ret
5572 if err := gensupport.DecodeResponse(target, res); err != nil {
5573 return nil, err
5574 }
5575 return ret, nil
5576 }
5577
5578 type ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall struct {
5579 s *Service
5580 name string
5581 canceloperationrequest *CancelOperationRequest
5582 urlParams_ gensupport.URLParams
5583 ctx_ context.Context
5584 header_ http.Header
5585 }
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598 func (r *ProjectsLocationsOsPolicyAssignmentsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall {
5599 c := &ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5600 c.name = name
5601 c.canceloperationrequest = canceloperationrequest
5602 return c
5603 }
5604
5605
5606
5607
5608 func (c *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall {
5609 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5610 return c
5611 }
5612
5613
5614 func (c *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall {
5615 c.ctx_ = ctx
5616 return c
5617 }
5618
5619
5620
5621 func (c *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall) Header() http.Header {
5622 if c.header_ == nil {
5623 c.header_ = make(http.Header)
5624 }
5625 return c.header_
5626 }
5627
5628 func (c *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
5629 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5630 var body io.Reader = nil
5631 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
5632 if err != nil {
5633 return nil, err
5634 }
5635 c.urlParams_.Set("alt", alt)
5636 c.urlParams_.Set("prettyPrint", "false")
5637 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
5638 urls += "?" + c.urlParams_.Encode()
5639 req, err := http.NewRequest("POST", urls, body)
5640 if err != nil {
5641 return nil, err
5642 }
5643 req.Header = reqHeaders
5644 googleapi.Expand(req.URL, map[string]string{
5645 "name": c.name,
5646 })
5647 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5648 }
5649
5650
5651
5652
5653
5654
5655 func (c *ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5656 gensupport.SetOptions(c.urlParams_, opts...)
5657 res, err := c.doRequest("json")
5658 if res != nil && res.StatusCode == http.StatusNotModified {
5659 if res.Body != nil {
5660 res.Body.Close()
5661 }
5662 return nil, gensupport.WrapError(&googleapi.Error{
5663 Code: res.StatusCode,
5664 Header: res.Header,
5665 })
5666 }
5667 if err != nil {
5668 return nil, err
5669 }
5670 defer googleapi.CloseBody(res)
5671 if err := googleapi.CheckResponse(res); err != nil {
5672 return nil, gensupport.WrapError(err)
5673 }
5674 ret := &Empty{
5675 ServerResponse: googleapi.ServerResponse{
5676 Header: res.Header,
5677 HTTPStatusCode: res.StatusCode,
5678 },
5679 }
5680 target := &ret
5681 if err := gensupport.DecodeResponse(target, res); err != nil {
5682 return nil, err
5683 }
5684 return ret, nil
5685 }
5686
5687 type ProjectsLocationsOsPolicyAssignmentsOperationsGetCall struct {
5688 s *Service
5689 name string
5690 urlParams_ gensupport.URLParams
5691 ifNoneMatch_ string
5692 ctx_ context.Context
5693 header_ http.Header
5694 }
5695
5696
5697
5698
5699
5700
5701 func (r *ProjectsLocationsOsPolicyAssignmentsOperationsService) Get(name string) *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall {
5702 c := &ProjectsLocationsOsPolicyAssignmentsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5703 c.name = name
5704 return c
5705 }
5706
5707
5708
5709
5710 func (c *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall {
5711 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5712 return c
5713 }
5714
5715
5716
5717
5718 func (c *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall {
5719 c.ifNoneMatch_ = entityTag
5720 return c
5721 }
5722
5723
5724 func (c *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall {
5725 c.ctx_ = ctx
5726 return c
5727 }
5728
5729
5730
5731 func (c *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall) Header() http.Header {
5732 if c.header_ == nil {
5733 c.header_ = make(http.Header)
5734 }
5735 return c.header_
5736 }
5737
5738 func (c *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
5739 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5740 if c.ifNoneMatch_ != "" {
5741 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5742 }
5743 var body io.Reader = nil
5744 c.urlParams_.Set("alt", alt)
5745 c.urlParams_.Set("prettyPrint", "false")
5746 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5747 urls += "?" + c.urlParams_.Encode()
5748 req, err := http.NewRequest("GET", urls, body)
5749 if err != nil {
5750 return nil, err
5751 }
5752 req.Header = reqHeaders
5753 googleapi.Expand(req.URL, map[string]string{
5754 "name": c.name,
5755 })
5756 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5757 }
5758
5759
5760
5761
5762
5763
5764 func (c *ProjectsLocationsOsPolicyAssignmentsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5765 gensupport.SetOptions(c.urlParams_, opts...)
5766 res, err := c.doRequest("json")
5767 if res != nil && res.StatusCode == http.StatusNotModified {
5768 if res.Body != nil {
5769 res.Body.Close()
5770 }
5771 return nil, gensupport.WrapError(&googleapi.Error{
5772 Code: res.StatusCode,
5773 Header: res.Header,
5774 })
5775 }
5776 if err != nil {
5777 return nil, err
5778 }
5779 defer googleapi.CloseBody(res)
5780 if err := googleapi.CheckResponse(res); err != nil {
5781 return nil, gensupport.WrapError(err)
5782 }
5783 ret := &Operation{
5784 ServerResponse: googleapi.ServerResponse{
5785 Header: res.Header,
5786 HTTPStatusCode: res.StatusCode,
5787 },
5788 }
5789 target := &ret
5790 if err := gensupport.DecodeResponse(target, res); err != nil {
5791 return nil, err
5792 }
5793 return ret, nil
5794 }
5795
5796 type ProjectsPatchDeploymentsCreateCall struct {
5797 s *Service
5798 parent string
5799 patchdeployment *PatchDeployment
5800 urlParams_ gensupport.URLParams
5801 ctx_ context.Context
5802 header_ http.Header
5803 }
5804
5805
5806
5807
5808
5809 func (r *ProjectsPatchDeploymentsService) Create(parent string, patchdeployment *PatchDeployment) *ProjectsPatchDeploymentsCreateCall {
5810 c := &ProjectsPatchDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5811 c.parent = parent
5812 c.patchdeployment = patchdeployment
5813 return c
5814 }
5815
5816
5817
5818
5819
5820
5821 func (c *ProjectsPatchDeploymentsCreateCall) PatchDeploymentId(patchDeploymentId string) *ProjectsPatchDeploymentsCreateCall {
5822 c.urlParams_.Set("patchDeploymentId", patchDeploymentId)
5823 return c
5824 }
5825
5826
5827
5828
5829 func (c *ProjectsPatchDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsCreateCall {
5830 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5831 return c
5832 }
5833
5834
5835 func (c *ProjectsPatchDeploymentsCreateCall) Context(ctx context.Context) *ProjectsPatchDeploymentsCreateCall {
5836 c.ctx_ = ctx
5837 return c
5838 }
5839
5840
5841
5842 func (c *ProjectsPatchDeploymentsCreateCall) Header() http.Header {
5843 if c.header_ == nil {
5844 c.header_ = make(http.Header)
5845 }
5846 return c.header_
5847 }
5848
5849 func (c *ProjectsPatchDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) {
5850 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5851 var body io.Reader = nil
5852 body, err := googleapi.WithoutDataWrapper.JSONReader(c.patchdeployment)
5853 if err != nil {
5854 return nil, err
5855 }
5856 c.urlParams_.Set("alt", alt)
5857 c.urlParams_.Set("prettyPrint", "false")
5858 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/patchDeployments")
5859 urls += "?" + c.urlParams_.Encode()
5860 req, err := http.NewRequest("POST", urls, body)
5861 if err != nil {
5862 return nil, err
5863 }
5864 req.Header = reqHeaders
5865 googleapi.Expand(req.URL, map[string]string{
5866 "parent": c.parent,
5867 })
5868 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5869 }
5870
5871
5872
5873
5874
5875
5876
5877 func (c *ProjectsPatchDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*PatchDeployment, error) {
5878 gensupport.SetOptions(c.urlParams_, opts...)
5879 res, err := c.doRequest("json")
5880 if res != nil && res.StatusCode == http.StatusNotModified {
5881 if res.Body != nil {
5882 res.Body.Close()
5883 }
5884 return nil, gensupport.WrapError(&googleapi.Error{
5885 Code: res.StatusCode,
5886 Header: res.Header,
5887 })
5888 }
5889 if err != nil {
5890 return nil, err
5891 }
5892 defer googleapi.CloseBody(res)
5893 if err := googleapi.CheckResponse(res); err != nil {
5894 return nil, gensupport.WrapError(err)
5895 }
5896 ret := &PatchDeployment{
5897 ServerResponse: googleapi.ServerResponse{
5898 Header: res.Header,
5899 HTTPStatusCode: res.StatusCode,
5900 },
5901 }
5902 target := &ret
5903 if err := gensupport.DecodeResponse(target, res); err != nil {
5904 return nil, err
5905 }
5906 return ret, nil
5907 }
5908
5909 type ProjectsPatchDeploymentsDeleteCall struct {
5910 s *Service
5911 name string
5912 urlParams_ gensupport.URLParams
5913 ctx_ context.Context
5914 header_ http.Header
5915 }
5916
5917
5918
5919
5920
5921 func (r *ProjectsPatchDeploymentsService) Delete(name string) *ProjectsPatchDeploymentsDeleteCall {
5922 c := &ProjectsPatchDeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5923 c.name = name
5924 return c
5925 }
5926
5927
5928
5929
5930 func (c *ProjectsPatchDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsDeleteCall {
5931 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5932 return c
5933 }
5934
5935
5936 func (c *ProjectsPatchDeploymentsDeleteCall) Context(ctx context.Context) *ProjectsPatchDeploymentsDeleteCall {
5937 c.ctx_ = ctx
5938 return c
5939 }
5940
5941
5942
5943 func (c *ProjectsPatchDeploymentsDeleteCall) Header() http.Header {
5944 if c.header_ == nil {
5945 c.header_ = make(http.Header)
5946 }
5947 return c.header_
5948 }
5949
5950 func (c *ProjectsPatchDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) {
5951 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5952 var body io.Reader = nil
5953 c.urlParams_.Set("alt", alt)
5954 c.urlParams_.Set("prettyPrint", "false")
5955 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5956 urls += "?" + c.urlParams_.Encode()
5957 req, err := http.NewRequest("DELETE", urls, body)
5958 if err != nil {
5959 return nil, err
5960 }
5961 req.Header = reqHeaders
5962 googleapi.Expand(req.URL, map[string]string{
5963 "name": c.name,
5964 })
5965 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5966 }
5967
5968
5969
5970
5971
5972
5973 func (c *ProjectsPatchDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5974 gensupport.SetOptions(c.urlParams_, opts...)
5975 res, err := c.doRequest("json")
5976 if res != nil && res.StatusCode == http.StatusNotModified {
5977 if res.Body != nil {
5978 res.Body.Close()
5979 }
5980 return nil, gensupport.WrapError(&googleapi.Error{
5981 Code: res.StatusCode,
5982 Header: res.Header,
5983 })
5984 }
5985 if err != nil {
5986 return nil, err
5987 }
5988 defer googleapi.CloseBody(res)
5989 if err := googleapi.CheckResponse(res); err != nil {
5990 return nil, gensupport.WrapError(err)
5991 }
5992 ret := &Empty{
5993 ServerResponse: googleapi.ServerResponse{
5994 Header: res.Header,
5995 HTTPStatusCode: res.StatusCode,
5996 },
5997 }
5998 target := &ret
5999 if err := gensupport.DecodeResponse(target, res); err != nil {
6000 return nil, err
6001 }
6002 return ret, nil
6003 }
6004
6005 type ProjectsPatchDeploymentsGetCall struct {
6006 s *Service
6007 name string
6008 urlParams_ gensupport.URLParams
6009 ifNoneMatch_ string
6010 ctx_ context.Context
6011 header_ http.Header
6012 }
6013
6014
6015
6016
6017
6018 func (r *ProjectsPatchDeploymentsService) Get(name string) *ProjectsPatchDeploymentsGetCall {
6019 c := &ProjectsPatchDeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6020 c.name = name
6021 return c
6022 }
6023
6024
6025
6026
6027 func (c *ProjectsPatchDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsGetCall {
6028 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6029 return c
6030 }
6031
6032
6033
6034
6035 func (c *ProjectsPatchDeploymentsGetCall) IfNoneMatch(entityTag string) *ProjectsPatchDeploymentsGetCall {
6036 c.ifNoneMatch_ = entityTag
6037 return c
6038 }
6039
6040
6041 func (c *ProjectsPatchDeploymentsGetCall) Context(ctx context.Context) *ProjectsPatchDeploymentsGetCall {
6042 c.ctx_ = ctx
6043 return c
6044 }
6045
6046
6047
6048 func (c *ProjectsPatchDeploymentsGetCall) Header() http.Header {
6049 if c.header_ == nil {
6050 c.header_ = make(http.Header)
6051 }
6052 return c.header_
6053 }
6054
6055 func (c *ProjectsPatchDeploymentsGetCall) doRequest(alt string) (*http.Response, error) {
6056 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6057 if c.ifNoneMatch_ != "" {
6058 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6059 }
6060 var body io.Reader = nil
6061 c.urlParams_.Set("alt", alt)
6062 c.urlParams_.Set("prettyPrint", "false")
6063 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6064 urls += "?" + c.urlParams_.Encode()
6065 req, err := http.NewRequest("GET", urls, body)
6066 if err != nil {
6067 return nil, err
6068 }
6069 req.Header = reqHeaders
6070 googleapi.Expand(req.URL, map[string]string{
6071 "name": c.name,
6072 })
6073 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6074 }
6075
6076
6077
6078
6079
6080
6081
6082 func (c *ProjectsPatchDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*PatchDeployment, error) {
6083 gensupport.SetOptions(c.urlParams_, opts...)
6084 res, err := c.doRequest("json")
6085 if res != nil && res.StatusCode == http.StatusNotModified {
6086 if res.Body != nil {
6087 res.Body.Close()
6088 }
6089 return nil, gensupport.WrapError(&googleapi.Error{
6090 Code: res.StatusCode,
6091 Header: res.Header,
6092 })
6093 }
6094 if err != nil {
6095 return nil, err
6096 }
6097 defer googleapi.CloseBody(res)
6098 if err := googleapi.CheckResponse(res); err != nil {
6099 return nil, gensupport.WrapError(err)
6100 }
6101 ret := &PatchDeployment{
6102 ServerResponse: googleapi.ServerResponse{
6103 Header: res.Header,
6104 HTTPStatusCode: res.StatusCode,
6105 },
6106 }
6107 target := &ret
6108 if err := gensupport.DecodeResponse(target, res); err != nil {
6109 return nil, err
6110 }
6111 return ret, nil
6112 }
6113
6114 type ProjectsPatchDeploymentsListCall struct {
6115 s *Service
6116 parent string
6117 urlParams_ gensupport.URLParams
6118 ifNoneMatch_ string
6119 ctx_ context.Context
6120 header_ http.Header
6121 }
6122
6123
6124
6125
6126 func (r *ProjectsPatchDeploymentsService) List(parent string) *ProjectsPatchDeploymentsListCall {
6127 c := &ProjectsPatchDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6128 c.parent = parent
6129 return c
6130 }
6131
6132
6133
6134 func (c *ProjectsPatchDeploymentsListCall) PageSize(pageSize int64) *ProjectsPatchDeploymentsListCall {
6135 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6136 return c
6137 }
6138
6139
6140
6141
6142 func (c *ProjectsPatchDeploymentsListCall) PageToken(pageToken string) *ProjectsPatchDeploymentsListCall {
6143 c.urlParams_.Set("pageToken", pageToken)
6144 return c
6145 }
6146
6147
6148
6149
6150 func (c *ProjectsPatchDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsListCall {
6151 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6152 return c
6153 }
6154
6155
6156
6157
6158 func (c *ProjectsPatchDeploymentsListCall) IfNoneMatch(entityTag string) *ProjectsPatchDeploymentsListCall {
6159 c.ifNoneMatch_ = entityTag
6160 return c
6161 }
6162
6163
6164 func (c *ProjectsPatchDeploymentsListCall) Context(ctx context.Context) *ProjectsPatchDeploymentsListCall {
6165 c.ctx_ = ctx
6166 return c
6167 }
6168
6169
6170
6171 func (c *ProjectsPatchDeploymentsListCall) Header() http.Header {
6172 if c.header_ == nil {
6173 c.header_ = make(http.Header)
6174 }
6175 return c.header_
6176 }
6177
6178 func (c *ProjectsPatchDeploymentsListCall) doRequest(alt string) (*http.Response, error) {
6179 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6180 if c.ifNoneMatch_ != "" {
6181 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6182 }
6183 var body io.Reader = nil
6184 c.urlParams_.Set("alt", alt)
6185 c.urlParams_.Set("prettyPrint", "false")
6186 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/patchDeployments")
6187 urls += "?" + c.urlParams_.Encode()
6188 req, err := http.NewRequest("GET", urls, body)
6189 if err != nil {
6190 return nil, err
6191 }
6192 req.Header = reqHeaders
6193 googleapi.Expand(req.URL, map[string]string{
6194 "parent": c.parent,
6195 })
6196 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6197 }
6198
6199
6200
6201
6202
6203
6204
6205 func (c *ProjectsPatchDeploymentsListCall) Do(opts ...googleapi.CallOption) (*ListPatchDeploymentsResponse, error) {
6206 gensupport.SetOptions(c.urlParams_, opts...)
6207 res, err := c.doRequest("json")
6208 if res != nil && res.StatusCode == http.StatusNotModified {
6209 if res.Body != nil {
6210 res.Body.Close()
6211 }
6212 return nil, gensupport.WrapError(&googleapi.Error{
6213 Code: res.StatusCode,
6214 Header: res.Header,
6215 })
6216 }
6217 if err != nil {
6218 return nil, err
6219 }
6220 defer googleapi.CloseBody(res)
6221 if err := googleapi.CheckResponse(res); err != nil {
6222 return nil, gensupport.WrapError(err)
6223 }
6224 ret := &ListPatchDeploymentsResponse{
6225 ServerResponse: googleapi.ServerResponse{
6226 Header: res.Header,
6227 HTTPStatusCode: res.StatusCode,
6228 },
6229 }
6230 target := &ret
6231 if err := gensupport.DecodeResponse(target, res); err != nil {
6232 return nil, err
6233 }
6234 return ret, nil
6235 }
6236
6237
6238
6239
6240 func (c *ProjectsPatchDeploymentsListCall) Pages(ctx context.Context, f func(*ListPatchDeploymentsResponse) error) error {
6241 c.ctx_ = ctx
6242 defer c.PageToken(c.urlParams_.Get("pageToken"))
6243 for {
6244 x, err := c.Do()
6245 if err != nil {
6246 return err
6247 }
6248 if err := f(x); err != nil {
6249 return err
6250 }
6251 if x.NextPageToken == "" {
6252 return nil
6253 }
6254 c.PageToken(x.NextPageToken)
6255 }
6256 }
6257
6258 type ProjectsPatchDeploymentsPatchCall struct {
6259 s *Service
6260 name string
6261 patchdeployment *PatchDeployment
6262 urlParams_ gensupport.URLParams
6263 ctx_ context.Context
6264 header_ http.Header
6265 }
6266
6267
6268
6269
6270
6271
6272
6273 func (r *ProjectsPatchDeploymentsService) Patch(name string, patchdeployment *PatchDeployment) *ProjectsPatchDeploymentsPatchCall {
6274 c := &ProjectsPatchDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6275 c.name = name
6276 c.patchdeployment = patchdeployment
6277 return c
6278 }
6279
6280
6281
6282 func (c *ProjectsPatchDeploymentsPatchCall) UpdateMask(updateMask string) *ProjectsPatchDeploymentsPatchCall {
6283 c.urlParams_.Set("updateMask", updateMask)
6284 return c
6285 }
6286
6287
6288
6289
6290 func (c *ProjectsPatchDeploymentsPatchCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsPatchCall {
6291 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6292 return c
6293 }
6294
6295
6296 func (c *ProjectsPatchDeploymentsPatchCall) Context(ctx context.Context) *ProjectsPatchDeploymentsPatchCall {
6297 c.ctx_ = ctx
6298 return c
6299 }
6300
6301
6302
6303 func (c *ProjectsPatchDeploymentsPatchCall) Header() http.Header {
6304 if c.header_ == nil {
6305 c.header_ = make(http.Header)
6306 }
6307 return c.header_
6308 }
6309
6310 func (c *ProjectsPatchDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) {
6311 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6312 var body io.Reader = nil
6313 body, err := googleapi.WithoutDataWrapper.JSONReader(c.patchdeployment)
6314 if err != nil {
6315 return nil, err
6316 }
6317 c.urlParams_.Set("alt", alt)
6318 c.urlParams_.Set("prettyPrint", "false")
6319 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6320 urls += "?" + c.urlParams_.Encode()
6321 req, err := http.NewRequest("PATCH", urls, body)
6322 if err != nil {
6323 return nil, err
6324 }
6325 req.Header = reqHeaders
6326 googleapi.Expand(req.URL, map[string]string{
6327 "name": c.name,
6328 })
6329 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6330 }
6331
6332
6333
6334
6335
6336
6337
6338 func (c *ProjectsPatchDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*PatchDeployment, error) {
6339 gensupport.SetOptions(c.urlParams_, opts...)
6340 res, err := c.doRequest("json")
6341 if res != nil && res.StatusCode == http.StatusNotModified {
6342 if res.Body != nil {
6343 res.Body.Close()
6344 }
6345 return nil, gensupport.WrapError(&googleapi.Error{
6346 Code: res.StatusCode,
6347 Header: res.Header,
6348 })
6349 }
6350 if err != nil {
6351 return nil, err
6352 }
6353 defer googleapi.CloseBody(res)
6354 if err := googleapi.CheckResponse(res); err != nil {
6355 return nil, gensupport.WrapError(err)
6356 }
6357 ret := &PatchDeployment{
6358 ServerResponse: googleapi.ServerResponse{
6359 Header: res.Header,
6360 HTTPStatusCode: res.StatusCode,
6361 },
6362 }
6363 target := &ret
6364 if err := gensupport.DecodeResponse(target, res); err != nil {
6365 return nil, err
6366 }
6367 return ret, nil
6368 }
6369
6370 type ProjectsPatchDeploymentsPauseCall struct {
6371 s *Service
6372 name string
6373 pausepatchdeploymentrequest *PausePatchDeploymentRequest
6374 urlParams_ gensupport.URLParams
6375 ctx_ context.Context
6376 header_ http.Header
6377 }
6378
6379
6380
6381
6382
6383
6384 func (r *ProjectsPatchDeploymentsService) Pause(name string, pausepatchdeploymentrequest *PausePatchDeploymentRequest) *ProjectsPatchDeploymentsPauseCall {
6385 c := &ProjectsPatchDeploymentsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6386 c.name = name
6387 c.pausepatchdeploymentrequest = pausepatchdeploymentrequest
6388 return c
6389 }
6390
6391
6392
6393
6394 func (c *ProjectsPatchDeploymentsPauseCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsPauseCall {
6395 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6396 return c
6397 }
6398
6399
6400 func (c *ProjectsPatchDeploymentsPauseCall) Context(ctx context.Context) *ProjectsPatchDeploymentsPauseCall {
6401 c.ctx_ = ctx
6402 return c
6403 }
6404
6405
6406
6407 func (c *ProjectsPatchDeploymentsPauseCall) Header() http.Header {
6408 if c.header_ == nil {
6409 c.header_ = make(http.Header)
6410 }
6411 return c.header_
6412 }
6413
6414 func (c *ProjectsPatchDeploymentsPauseCall) doRequest(alt string) (*http.Response, error) {
6415 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6416 var body io.Reader = nil
6417 body, err := googleapi.WithoutDataWrapper.JSONReader(c.pausepatchdeploymentrequest)
6418 if err != nil {
6419 return nil, err
6420 }
6421 c.urlParams_.Set("alt", alt)
6422 c.urlParams_.Set("prettyPrint", "false")
6423 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:pause")
6424 urls += "?" + c.urlParams_.Encode()
6425 req, err := http.NewRequest("POST", urls, body)
6426 if err != nil {
6427 return nil, err
6428 }
6429 req.Header = reqHeaders
6430 googleapi.Expand(req.URL, map[string]string{
6431 "name": c.name,
6432 })
6433 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6434 }
6435
6436
6437
6438
6439
6440
6441
6442 func (c *ProjectsPatchDeploymentsPauseCall) Do(opts ...googleapi.CallOption) (*PatchDeployment, error) {
6443 gensupport.SetOptions(c.urlParams_, opts...)
6444 res, err := c.doRequest("json")
6445 if res != nil && res.StatusCode == http.StatusNotModified {
6446 if res.Body != nil {
6447 res.Body.Close()
6448 }
6449 return nil, gensupport.WrapError(&googleapi.Error{
6450 Code: res.StatusCode,
6451 Header: res.Header,
6452 })
6453 }
6454 if err != nil {
6455 return nil, err
6456 }
6457 defer googleapi.CloseBody(res)
6458 if err := googleapi.CheckResponse(res); err != nil {
6459 return nil, gensupport.WrapError(err)
6460 }
6461 ret := &PatchDeployment{
6462 ServerResponse: googleapi.ServerResponse{
6463 Header: res.Header,
6464 HTTPStatusCode: res.StatusCode,
6465 },
6466 }
6467 target := &ret
6468 if err := gensupport.DecodeResponse(target, res); err != nil {
6469 return nil, err
6470 }
6471 return ret, nil
6472 }
6473
6474 type ProjectsPatchDeploymentsResumeCall struct {
6475 s *Service
6476 name string
6477 resumepatchdeploymentrequest *ResumePatchDeploymentRequest
6478 urlParams_ gensupport.URLParams
6479 ctx_ context.Context
6480 header_ http.Header
6481 }
6482
6483
6484
6485
6486
6487
6488 func (r *ProjectsPatchDeploymentsService) Resume(name string, resumepatchdeploymentrequest *ResumePatchDeploymentRequest) *ProjectsPatchDeploymentsResumeCall {
6489 c := &ProjectsPatchDeploymentsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6490 c.name = name
6491 c.resumepatchdeploymentrequest = resumepatchdeploymentrequest
6492 return c
6493 }
6494
6495
6496
6497
6498 func (c *ProjectsPatchDeploymentsResumeCall) Fields(s ...googleapi.Field) *ProjectsPatchDeploymentsResumeCall {
6499 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6500 return c
6501 }
6502
6503
6504 func (c *ProjectsPatchDeploymentsResumeCall) Context(ctx context.Context) *ProjectsPatchDeploymentsResumeCall {
6505 c.ctx_ = ctx
6506 return c
6507 }
6508
6509
6510
6511 func (c *ProjectsPatchDeploymentsResumeCall) Header() http.Header {
6512 if c.header_ == nil {
6513 c.header_ = make(http.Header)
6514 }
6515 return c.header_
6516 }
6517
6518 func (c *ProjectsPatchDeploymentsResumeCall) doRequest(alt string) (*http.Response, error) {
6519 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6520 var body io.Reader = nil
6521 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumepatchdeploymentrequest)
6522 if err != nil {
6523 return nil, err
6524 }
6525 c.urlParams_.Set("alt", alt)
6526 c.urlParams_.Set("prettyPrint", "false")
6527 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resume")
6528 urls += "?" + c.urlParams_.Encode()
6529 req, err := http.NewRequest("POST", urls, body)
6530 if err != nil {
6531 return nil, err
6532 }
6533 req.Header = reqHeaders
6534 googleapi.Expand(req.URL, map[string]string{
6535 "name": c.name,
6536 })
6537 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6538 }
6539
6540
6541
6542
6543
6544
6545
6546 func (c *ProjectsPatchDeploymentsResumeCall) Do(opts ...googleapi.CallOption) (*PatchDeployment, error) {
6547 gensupport.SetOptions(c.urlParams_, opts...)
6548 res, err := c.doRequest("json")
6549 if res != nil && res.StatusCode == http.StatusNotModified {
6550 if res.Body != nil {
6551 res.Body.Close()
6552 }
6553 return nil, gensupport.WrapError(&googleapi.Error{
6554 Code: res.StatusCode,
6555 Header: res.Header,
6556 })
6557 }
6558 if err != nil {
6559 return nil, err
6560 }
6561 defer googleapi.CloseBody(res)
6562 if err := googleapi.CheckResponse(res); err != nil {
6563 return nil, gensupport.WrapError(err)
6564 }
6565 ret := &PatchDeployment{
6566 ServerResponse: googleapi.ServerResponse{
6567 Header: res.Header,
6568 HTTPStatusCode: res.StatusCode,
6569 },
6570 }
6571 target := &ret
6572 if err := gensupport.DecodeResponse(target, res); err != nil {
6573 return nil, err
6574 }
6575 return ret, nil
6576 }
6577
6578 type ProjectsPatchJobsCancelCall struct {
6579 s *Service
6580 name string
6581 cancelpatchjobrequest *CancelPatchJobRequest
6582 urlParams_ gensupport.URLParams
6583 ctx_ context.Context
6584 header_ http.Header
6585 }
6586
6587
6588
6589
6590
6591 func (r *ProjectsPatchJobsService) Cancel(name string, cancelpatchjobrequest *CancelPatchJobRequest) *ProjectsPatchJobsCancelCall {
6592 c := &ProjectsPatchJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6593 c.name = name
6594 c.cancelpatchjobrequest = cancelpatchjobrequest
6595 return c
6596 }
6597
6598
6599
6600
6601 func (c *ProjectsPatchJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsPatchJobsCancelCall {
6602 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6603 return c
6604 }
6605
6606
6607 func (c *ProjectsPatchJobsCancelCall) Context(ctx context.Context) *ProjectsPatchJobsCancelCall {
6608 c.ctx_ = ctx
6609 return c
6610 }
6611
6612
6613
6614 func (c *ProjectsPatchJobsCancelCall) Header() http.Header {
6615 if c.header_ == nil {
6616 c.header_ = make(http.Header)
6617 }
6618 return c.header_
6619 }
6620
6621 func (c *ProjectsPatchJobsCancelCall) doRequest(alt string) (*http.Response, error) {
6622 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6623 var body io.Reader = nil
6624 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelpatchjobrequest)
6625 if err != nil {
6626 return nil, err
6627 }
6628 c.urlParams_.Set("alt", alt)
6629 c.urlParams_.Set("prettyPrint", "false")
6630 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
6631 urls += "?" + c.urlParams_.Encode()
6632 req, err := http.NewRequest("POST", urls, body)
6633 if err != nil {
6634 return nil, err
6635 }
6636 req.Header = reqHeaders
6637 googleapi.Expand(req.URL, map[string]string{
6638 "name": c.name,
6639 })
6640 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6641 }
6642
6643
6644
6645
6646
6647
6648 func (c *ProjectsPatchJobsCancelCall) Do(opts ...googleapi.CallOption) (*PatchJob, error) {
6649 gensupport.SetOptions(c.urlParams_, opts...)
6650 res, err := c.doRequest("json")
6651 if res != nil && res.StatusCode == http.StatusNotModified {
6652 if res.Body != nil {
6653 res.Body.Close()
6654 }
6655 return nil, gensupport.WrapError(&googleapi.Error{
6656 Code: res.StatusCode,
6657 Header: res.Header,
6658 })
6659 }
6660 if err != nil {
6661 return nil, err
6662 }
6663 defer googleapi.CloseBody(res)
6664 if err := googleapi.CheckResponse(res); err != nil {
6665 return nil, gensupport.WrapError(err)
6666 }
6667 ret := &PatchJob{
6668 ServerResponse: googleapi.ServerResponse{
6669 Header: res.Header,
6670 HTTPStatusCode: res.StatusCode,
6671 },
6672 }
6673 target := &ret
6674 if err := gensupport.DecodeResponse(target, res); err != nil {
6675 return nil, err
6676 }
6677 return ret, nil
6678 }
6679
6680 type ProjectsPatchJobsExecuteCall struct {
6681 s *Service
6682 parent string
6683 executepatchjobrequest *ExecutePatchJobRequest
6684 urlParams_ gensupport.URLParams
6685 ctx_ context.Context
6686 header_ http.Header
6687 }
6688
6689
6690
6691
6692 func (r *ProjectsPatchJobsService) Execute(parent string, executepatchjobrequest *ExecutePatchJobRequest) *ProjectsPatchJobsExecuteCall {
6693 c := &ProjectsPatchJobsExecuteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6694 c.parent = parent
6695 c.executepatchjobrequest = executepatchjobrequest
6696 return c
6697 }
6698
6699
6700
6701
6702 func (c *ProjectsPatchJobsExecuteCall) Fields(s ...googleapi.Field) *ProjectsPatchJobsExecuteCall {
6703 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6704 return c
6705 }
6706
6707
6708 func (c *ProjectsPatchJobsExecuteCall) Context(ctx context.Context) *ProjectsPatchJobsExecuteCall {
6709 c.ctx_ = ctx
6710 return c
6711 }
6712
6713
6714
6715 func (c *ProjectsPatchJobsExecuteCall) Header() http.Header {
6716 if c.header_ == nil {
6717 c.header_ = make(http.Header)
6718 }
6719 return c.header_
6720 }
6721
6722 func (c *ProjectsPatchJobsExecuteCall) doRequest(alt string) (*http.Response, error) {
6723 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6724 var body io.Reader = nil
6725 body, err := googleapi.WithoutDataWrapper.JSONReader(c.executepatchjobrequest)
6726 if err != nil {
6727 return nil, err
6728 }
6729 c.urlParams_.Set("alt", alt)
6730 c.urlParams_.Set("prettyPrint", "false")
6731 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/patchJobs:execute")
6732 urls += "?" + c.urlParams_.Encode()
6733 req, err := http.NewRequest("POST", urls, body)
6734 if err != nil {
6735 return nil, err
6736 }
6737 req.Header = reqHeaders
6738 googleapi.Expand(req.URL, map[string]string{
6739 "parent": c.parent,
6740 })
6741 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6742 }
6743
6744
6745
6746
6747
6748
6749 func (c *ProjectsPatchJobsExecuteCall) Do(opts ...googleapi.CallOption) (*PatchJob, error) {
6750 gensupport.SetOptions(c.urlParams_, opts...)
6751 res, err := c.doRequest("json")
6752 if res != nil && res.StatusCode == http.StatusNotModified {
6753 if res.Body != nil {
6754 res.Body.Close()
6755 }
6756 return nil, gensupport.WrapError(&googleapi.Error{
6757 Code: res.StatusCode,
6758 Header: res.Header,
6759 })
6760 }
6761 if err != nil {
6762 return nil, err
6763 }
6764 defer googleapi.CloseBody(res)
6765 if err := googleapi.CheckResponse(res); err != nil {
6766 return nil, gensupport.WrapError(err)
6767 }
6768 ret := &PatchJob{
6769 ServerResponse: googleapi.ServerResponse{
6770 Header: res.Header,
6771 HTTPStatusCode: res.StatusCode,
6772 },
6773 }
6774 target := &ret
6775 if err := gensupport.DecodeResponse(target, res); err != nil {
6776 return nil, err
6777 }
6778 return ret, nil
6779 }
6780
6781 type ProjectsPatchJobsGetCall struct {
6782 s *Service
6783 name string
6784 urlParams_ gensupport.URLParams
6785 ifNoneMatch_ string
6786 ctx_ context.Context
6787 header_ http.Header
6788 }
6789
6790
6791
6792
6793
6794 func (r *ProjectsPatchJobsService) Get(name string) *ProjectsPatchJobsGetCall {
6795 c := &ProjectsPatchJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6796 c.name = name
6797 return c
6798 }
6799
6800
6801
6802
6803 func (c *ProjectsPatchJobsGetCall) Fields(s ...googleapi.Field) *ProjectsPatchJobsGetCall {
6804 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6805 return c
6806 }
6807
6808
6809
6810
6811 func (c *ProjectsPatchJobsGetCall) IfNoneMatch(entityTag string) *ProjectsPatchJobsGetCall {
6812 c.ifNoneMatch_ = entityTag
6813 return c
6814 }
6815
6816
6817 func (c *ProjectsPatchJobsGetCall) Context(ctx context.Context) *ProjectsPatchJobsGetCall {
6818 c.ctx_ = ctx
6819 return c
6820 }
6821
6822
6823
6824 func (c *ProjectsPatchJobsGetCall) Header() http.Header {
6825 if c.header_ == nil {
6826 c.header_ = make(http.Header)
6827 }
6828 return c.header_
6829 }
6830
6831 func (c *ProjectsPatchJobsGetCall) doRequest(alt string) (*http.Response, error) {
6832 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6833 if c.ifNoneMatch_ != "" {
6834 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6835 }
6836 var body io.Reader = nil
6837 c.urlParams_.Set("alt", alt)
6838 c.urlParams_.Set("prettyPrint", "false")
6839 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6840 urls += "?" + c.urlParams_.Encode()
6841 req, err := http.NewRequest("GET", urls, body)
6842 if err != nil {
6843 return nil, err
6844 }
6845 req.Header = reqHeaders
6846 googleapi.Expand(req.URL, map[string]string{
6847 "name": c.name,
6848 })
6849 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6850 }
6851
6852
6853
6854
6855
6856
6857 func (c *ProjectsPatchJobsGetCall) Do(opts ...googleapi.CallOption) (*PatchJob, error) {
6858 gensupport.SetOptions(c.urlParams_, opts...)
6859 res, err := c.doRequest("json")
6860 if res != nil && res.StatusCode == http.StatusNotModified {
6861 if res.Body != nil {
6862 res.Body.Close()
6863 }
6864 return nil, gensupport.WrapError(&googleapi.Error{
6865 Code: res.StatusCode,
6866 Header: res.Header,
6867 })
6868 }
6869 if err != nil {
6870 return nil, err
6871 }
6872 defer googleapi.CloseBody(res)
6873 if err := googleapi.CheckResponse(res); err != nil {
6874 return nil, gensupport.WrapError(err)
6875 }
6876 ret := &PatchJob{
6877 ServerResponse: googleapi.ServerResponse{
6878 Header: res.Header,
6879 HTTPStatusCode: res.StatusCode,
6880 },
6881 }
6882 target := &ret
6883 if err := gensupport.DecodeResponse(target, res); err != nil {
6884 return nil, err
6885 }
6886 return ret, nil
6887 }
6888
6889 type ProjectsPatchJobsListCall struct {
6890 s *Service
6891 parent string
6892 urlParams_ gensupport.URLParams
6893 ifNoneMatch_ string
6894 ctx_ context.Context
6895 header_ http.Header
6896 }
6897
6898
6899
6900
6901 func (r *ProjectsPatchJobsService) List(parent string) *ProjectsPatchJobsListCall {
6902 c := &ProjectsPatchJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6903 c.parent = parent
6904 return c
6905 }
6906
6907
6908
6909
6910
6911 func (c *ProjectsPatchJobsListCall) Filter(filter string) *ProjectsPatchJobsListCall {
6912 c.urlParams_.Set("filter", filter)
6913 return c
6914 }
6915
6916
6917
6918 func (c *ProjectsPatchJobsListCall) PageSize(pageSize int64) *ProjectsPatchJobsListCall {
6919 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6920 return c
6921 }
6922
6923
6924
6925
6926 func (c *ProjectsPatchJobsListCall) PageToken(pageToken string) *ProjectsPatchJobsListCall {
6927 c.urlParams_.Set("pageToken", pageToken)
6928 return c
6929 }
6930
6931
6932
6933
6934 func (c *ProjectsPatchJobsListCall) Fields(s ...googleapi.Field) *ProjectsPatchJobsListCall {
6935 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6936 return c
6937 }
6938
6939
6940
6941
6942 func (c *ProjectsPatchJobsListCall) IfNoneMatch(entityTag string) *ProjectsPatchJobsListCall {
6943 c.ifNoneMatch_ = entityTag
6944 return c
6945 }
6946
6947
6948 func (c *ProjectsPatchJobsListCall) Context(ctx context.Context) *ProjectsPatchJobsListCall {
6949 c.ctx_ = ctx
6950 return c
6951 }
6952
6953
6954
6955 func (c *ProjectsPatchJobsListCall) Header() http.Header {
6956 if c.header_ == nil {
6957 c.header_ = make(http.Header)
6958 }
6959 return c.header_
6960 }
6961
6962 func (c *ProjectsPatchJobsListCall) doRequest(alt string) (*http.Response, error) {
6963 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6964 if c.ifNoneMatch_ != "" {
6965 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6966 }
6967 var body io.Reader = nil
6968 c.urlParams_.Set("alt", alt)
6969 c.urlParams_.Set("prettyPrint", "false")
6970 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/patchJobs")
6971 urls += "?" + c.urlParams_.Encode()
6972 req, err := http.NewRequest("GET", urls, body)
6973 if err != nil {
6974 return nil, err
6975 }
6976 req.Header = reqHeaders
6977 googleapi.Expand(req.URL, map[string]string{
6978 "parent": c.parent,
6979 })
6980 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6981 }
6982
6983
6984
6985
6986
6987
6988
6989 func (c *ProjectsPatchJobsListCall) Do(opts ...googleapi.CallOption) (*ListPatchJobsResponse, error) {
6990 gensupport.SetOptions(c.urlParams_, opts...)
6991 res, err := c.doRequest("json")
6992 if res != nil && res.StatusCode == http.StatusNotModified {
6993 if res.Body != nil {
6994 res.Body.Close()
6995 }
6996 return nil, gensupport.WrapError(&googleapi.Error{
6997 Code: res.StatusCode,
6998 Header: res.Header,
6999 })
7000 }
7001 if err != nil {
7002 return nil, err
7003 }
7004 defer googleapi.CloseBody(res)
7005 if err := googleapi.CheckResponse(res); err != nil {
7006 return nil, gensupport.WrapError(err)
7007 }
7008 ret := &ListPatchJobsResponse{
7009 ServerResponse: googleapi.ServerResponse{
7010 Header: res.Header,
7011 HTTPStatusCode: res.StatusCode,
7012 },
7013 }
7014 target := &ret
7015 if err := gensupport.DecodeResponse(target, res); err != nil {
7016 return nil, err
7017 }
7018 return ret, nil
7019 }
7020
7021
7022
7023
7024 func (c *ProjectsPatchJobsListCall) Pages(ctx context.Context, f func(*ListPatchJobsResponse) error) error {
7025 c.ctx_ = ctx
7026 defer c.PageToken(c.urlParams_.Get("pageToken"))
7027 for {
7028 x, err := c.Do()
7029 if err != nil {
7030 return err
7031 }
7032 if err := f(x); err != nil {
7033 return err
7034 }
7035 if x.NextPageToken == "" {
7036 return nil
7037 }
7038 c.PageToken(x.NextPageToken)
7039 }
7040 }
7041
7042 type ProjectsPatchJobsInstanceDetailsListCall struct {
7043 s *Service
7044 parent string
7045 urlParams_ gensupport.URLParams
7046 ifNoneMatch_ string
7047 ctx_ context.Context
7048 header_ http.Header
7049 }
7050
7051
7052
7053
7054
7055 func (r *ProjectsPatchJobsInstanceDetailsService) List(parent string) *ProjectsPatchJobsInstanceDetailsListCall {
7056 c := &ProjectsPatchJobsInstanceDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7057 c.parent = parent
7058 return c
7059 }
7060
7061
7062
7063
7064 func (c *ProjectsPatchJobsInstanceDetailsListCall) Filter(filter string) *ProjectsPatchJobsInstanceDetailsListCall {
7065 c.urlParams_.Set("filter", filter)
7066 return c
7067 }
7068
7069
7070
7071 func (c *ProjectsPatchJobsInstanceDetailsListCall) PageSize(pageSize int64) *ProjectsPatchJobsInstanceDetailsListCall {
7072 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7073 return c
7074 }
7075
7076
7077
7078
7079 func (c *ProjectsPatchJobsInstanceDetailsListCall) PageToken(pageToken string) *ProjectsPatchJobsInstanceDetailsListCall {
7080 c.urlParams_.Set("pageToken", pageToken)
7081 return c
7082 }
7083
7084
7085
7086
7087 func (c *ProjectsPatchJobsInstanceDetailsListCall) Fields(s ...googleapi.Field) *ProjectsPatchJobsInstanceDetailsListCall {
7088 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7089 return c
7090 }
7091
7092
7093
7094
7095 func (c *ProjectsPatchJobsInstanceDetailsListCall) IfNoneMatch(entityTag string) *ProjectsPatchJobsInstanceDetailsListCall {
7096 c.ifNoneMatch_ = entityTag
7097 return c
7098 }
7099
7100
7101 func (c *ProjectsPatchJobsInstanceDetailsListCall) Context(ctx context.Context) *ProjectsPatchJobsInstanceDetailsListCall {
7102 c.ctx_ = ctx
7103 return c
7104 }
7105
7106
7107
7108 func (c *ProjectsPatchJobsInstanceDetailsListCall) Header() http.Header {
7109 if c.header_ == nil {
7110 c.header_ = make(http.Header)
7111 }
7112 return c.header_
7113 }
7114
7115 func (c *ProjectsPatchJobsInstanceDetailsListCall) doRequest(alt string) (*http.Response, error) {
7116 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7117 if c.ifNoneMatch_ != "" {
7118 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7119 }
7120 var body io.Reader = nil
7121 c.urlParams_.Set("alt", alt)
7122 c.urlParams_.Set("prettyPrint", "false")
7123 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instanceDetails")
7124 urls += "?" + c.urlParams_.Encode()
7125 req, err := http.NewRequest("GET", urls, body)
7126 if err != nil {
7127 return nil, err
7128 }
7129 req.Header = reqHeaders
7130 googleapi.Expand(req.URL, map[string]string{
7131 "parent": c.parent,
7132 })
7133 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7134 }
7135
7136
7137
7138
7139
7140
7141
7142 func (c *ProjectsPatchJobsInstanceDetailsListCall) Do(opts ...googleapi.CallOption) (*ListPatchJobInstanceDetailsResponse, error) {
7143 gensupport.SetOptions(c.urlParams_, opts...)
7144 res, err := c.doRequest("json")
7145 if res != nil && res.StatusCode == http.StatusNotModified {
7146 if res.Body != nil {
7147 res.Body.Close()
7148 }
7149 return nil, gensupport.WrapError(&googleapi.Error{
7150 Code: res.StatusCode,
7151 Header: res.Header,
7152 })
7153 }
7154 if err != nil {
7155 return nil, err
7156 }
7157 defer googleapi.CloseBody(res)
7158 if err := googleapi.CheckResponse(res); err != nil {
7159 return nil, gensupport.WrapError(err)
7160 }
7161 ret := &ListPatchJobInstanceDetailsResponse{
7162 ServerResponse: googleapi.ServerResponse{
7163 Header: res.Header,
7164 HTTPStatusCode: res.StatusCode,
7165 },
7166 }
7167 target := &ret
7168 if err := gensupport.DecodeResponse(target, res); err != nil {
7169 return nil, err
7170 }
7171 return ret, nil
7172 }
7173
7174
7175
7176
7177 func (c *ProjectsPatchJobsInstanceDetailsListCall) Pages(ctx context.Context, f func(*ListPatchJobInstanceDetailsResponse) error) error {
7178 c.ctx_ = ctx
7179 defer c.PageToken(c.urlParams_.Get("pageToken"))
7180 for {
7181 x, err := c.Do()
7182 if err != nil {
7183 return err
7184 }
7185 if err := f(x); err != nil {
7186 return err
7187 }
7188 if x.NextPageToken == "" {
7189 return nil
7190 }
7191 c.PageToken(x.NextPageToken)
7192 }
7193 }
7194
View as plain text