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 vmmigration
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 = "vmmigration:v1"
90 const apiName = "vmmigration"
91 const apiVersion = "v1"
92 const basePath = "https://vmmigration.googleapis.com/"
93 const basePathTemplate = "https://vmmigration.UNIVERSE_DOMAIN/"
94 const mtlsBasePath = "https://vmmigration.mtls.googleapis.com/"
95
96
97 const (
98
99
100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
101 )
102
103
104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
105 scopesOption := internaloption.WithDefaultScopes(
106 "https://www.googleapis.com/auth/cloud-platform",
107 )
108
109 opts = append([]option.ClientOption{scopesOption}, opts...)
110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
113 opts = append(opts, internaloption.EnableNewAuthLibrary())
114 client, endpoint, err := htransport.NewClient(ctx, opts...)
115 if err != nil {
116 return nil, err
117 }
118 s, err := New(client)
119 if err != nil {
120 return nil, err
121 }
122 if endpoint != "" {
123 s.BasePath = endpoint
124 }
125 return s, nil
126 }
127
128
129
130
131
132
133 func New(client *http.Client) (*Service, error) {
134 if client == nil {
135 return nil, errors.New("client is nil")
136 }
137 s := &Service{client: client, BasePath: basePath}
138 s.Projects = NewProjectsService(s)
139 return s, nil
140 }
141
142 type Service struct {
143 client *http.Client
144 BasePath string
145 UserAgent string
146
147 Projects *ProjectsService
148 }
149
150 func (s *Service) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *Service) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *Service
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.Groups = NewProjectsLocationsGroupsService(s)
172 rs.ImageImports = NewProjectsLocationsImageImportsService(s)
173 rs.Operations = NewProjectsLocationsOperationsService(s)
174 rs.Sources = NewProjectsLocationsSourcesService(s)
175 rs.TargetProjects = NewProjectsLocationsTargetProjectsService(s)
176 return rs
177 }
178
179 type ProjectsLocationsService struct {
180 s *Service
181
182 Groups *ProjectsLocationsGroupsService
183
184 ImageImports *ProjectsLocationsImageImportsService
185
186 Operations *ProjectsLocationsOperationsService
187
188 Sources *ProjectsLocationsSourcesService
189
190 TargetProjects *ProjectsLocationsTargetProjectsService
191 }
192
193 func NewProjectsLocationsGroupsService(s *Service) *ProjectsLocationsGroupsService {
194 rs := &ProjectsLocationsGroupsService{s: s}
195 return rs
196 }
197
198 type ProjectsLocationsGroupsService struct {
199 s *Service
200 }
201
202 func NewProjectsLocationsImageImportsService(s *Service) *ProjectsLocationsImageImportsService {
203 rs := &ProjectsLocationsImageImportsService{s: s}
204 rs.ImageImportJobs = NewProjectsLocationsImageImportsImageImportJobsService(s)
205 return rs
206 }
207
208 type ProjectsLocationsImageImportsService struct {
209 s *Service
210
211 ImageImportJobs *ProjectsLocationsImageImportsImageImportJobsService
212 }
213
214 func NewProjectsLocationsImageImportsImageImportJobsService(s *Service) *ProjectsLocationsImageImportsImageImportJobsService {
215 rs := &ProjectsLocationsImageImportsImageImportJobsService{s: s}
216 return rs
217 }
218
219 type ProjectsLocationsImageImportsImageImportJobsService struct {
220 s *Service
221 }
222
223 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
224 rs := &ProjectsLocationsOperationsService{s: s}
225 return rs
226 }
227
228 type ProjectsLocationsOperationsService struct {
229 s *Service
230 }
231
232 func NewProjectsLocationsSourcesService(s *Service) *ProjectsLocationsSourcesService {
233 rs := &ProjectsLocationsSourcesService{s: s}
234 rs.DatacenterConnectors = NewProjectsLocationsSourcesDatacenterConnectorsService(s)
235 rs.MigratingVms = NewProjectsLocationsSourcesMigratingVmsService(s)
236 rs.UtilizationReports = NewProjectsLocationsSourcesUtilizationReportsService(s)
237 return rs
238 }
239
240 type ProjectsLocationsSourcesService struct {
241 s *Service
242
243 DatacenterConnectors *ProjectsLocationsSourcesDatacenterConnectorsService
244
245 MigratingVms *ProjectsLocationsSourcesMigratingVmsService
246
247 UtilizationReports *ProjectsLocationsSourcesUtilizationReportsService
248 }
249
250 func NewProjectsLocationsSourcesDatacenterConnectorsService(s *Service) *ProjectsLocationsSourcesDatacenterConnectorsService {
251 rs := &ProjectsLocationsSourcesDatacenterConnectorsService{s: s}
252 return rs
253 }
254
255 type ProjectsLocationsSourcesDatacenterConnectorsService struct {
256 s *Service
257 }
258
259 func NewProjectsLocationsSourcesMigratingVmsService(s *Service) *ProjectsLocationsSourcesMigratingVmsService {
260 rs := &ProjectsLocationsSourcesMigratingVmsService{s: s}
261 rs.CloneJobs = NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s)
262 rs.CutoverJobs = NewProjectsLocationsSourcesMigratingVmsCutoverJobsService(s)
263 rs.ReplicationCycles = NewProjectsLocationsSourcesMigratingVmsReplicationCyclesService(s)
264 return rs
265 }
266
267 type ProjectsLocationsSourcesMigratingVmsService struct {
268 s *Service
269
270 CloneJobs *ProjectsLocationsSourcesMigratingVmsCloneJobsService
271
272 CutoverJobs *ProjectsLocationsSourcesMigratingVmsCutoverJobsService
273
274 ReplicationCycles *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService
275 }
276
277 func NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s *Service) *ProjectsLocationsSourcesMigratingVmsCloneJobsService {
278 rs := &ProjectsLocationsSourcesMigratingVmsCloneJobsService{s: s}
279 return rs
280 }
281
282 type ProjectsLocationsSourcesMigratingVmsCloneJobsService struct {
283 s *Service
284 }
285
286 func NewProjectsLocationsSourcesMigratingVmsCutoverJobsService(s *Service) *ProjectsLocationsSourcesMigratingVmsCutoverJobsService {
287 rs := &ProjectsLocationsSourcesMigratingVmsCutoverJobsService{s: s}
288 return rs
289 }
290
291 type ProjectsLocationsSourcesMigratingVmsCutoverJobsService struct {
292 s *Service
293 }
294
295 func NewProjectsLocationsSourcesMigratingVmsReplicationCyclesService(s *Service) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService {
296 rs := &ProjectsLocationsSourcesMigratingVmsReplicationCyclesService{s: s}
297 return rs
298 }
299
300 type ProjectsLocationsSourcesMigratingVmsReplicationCyclesService struct {
301 s *Service
302 }
303
304 func NewProjectsLocationsSourcesUtilizationReportsService(s *Service) *ProjectsLocationsSourcesUtilizationReportsService {
305 rs := &ProjectsLocationsSourcesUtilizationReportsService{s: s}
306 return rs
307 }
308
309 type ProjectsLocationsSourcesUtilizationReportsService struct {
310 s *Service
311 }
312
313 func NewProjectsLocationsTargetProjectsService(s *Service) *ProjectsLocationsTargetProjectsService {
314 rs := &ProjectsLocationsTargetProjectsService{s: s}
315 return rs
316 }
317
318 type ProjectsLocationsTargetProjectsService struct {
319 s *Service
320 }
321
322
323
324 type AccessKeyCredentials struct {
325
326 AccessKeyId string `json:"accessKeyId,omitempty"`
327
328 SecretAccessKey string `json:"secretAccessKey,omitempty"`
329
330
331 SessionToken string `json:"sessionToken,omitempty"`
332
333
334
335
336
337 ForceSendFields []string `json:"-"`
338
339
340
341
342 NullFields []string `json:"-"`
343 }
344
345 func (s *AccessKeyCredentials) MarshalJSON() ([]byte, error) {
346 type NoMethod AccessKeyCredentials
347 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
348 }
349
350
351 type AdaptingOSStep struct {
352 }
353
354
355 type AddGroupMigrationRequest struct {
356
357 MigratingVm string `json:"migratingVm,omitempty"`
358
359
360
361
362
363 ForceSendFields []string `json:"-"`
364
365
366
367
368 NullFields []string `json:"-"`
369 }
370
371 func (s *AddGroupMigrationRequest) MarshalJSON() ([]byte, error) {
372 type NoMethod AddGroupMigrationRequest
373 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
374 }
375
376
377 type ApplianceVersion struct {
378
379
380 Critical bool `json:"critical,omitempty"`
381
382 ReleaseNotesUri string `json:"releaseNotesUri,omitempty"`
383
384 Uri string `json:"uri,omitempty"`
385
386 Version string `json:"version,omitempty"`
387
388
389
390
391
392 ForceSendFields []string `json:"-"`
393
394
395
396
397 NullFields []string `json:"-"`
398 }
399
400 func (s *ApplianceVersion) MarshalJSON() ([]byte, error) {
401 type NoMethod ApplianceVersion
402 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
403 }
404
405
406
407 type AppliedLicense struct {
408
409 OsLicense string `json:"osLicense,omitempty"`
410
411
412
413
414
415
416
417 Type string `json:"type,omitempty"`
418
419
420
421
422
423 ForceSendFields []string `json:"-"`
424
425
426
427
428 NullFields []string `json:"-"`
429 }
430
431 func (s *AppliedLicense) MarshalJSON() ([]byte, error) {
432 type NoMethod AppliedLicense
433 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
434 }
435
436
437
438 type AvailableUpdates struct {
439
440
441 InPlaceUpdate *ApplianceVersion `json:"inPlaceUpdate,omitempty"`
442
443
444
445 NewDeployableAppliance *ApplianceVersion `json:"newDeployableAppliance,omitempty"`
446
447
448
449
450
451 ForceSendFields []string `json:"-"`
452
453
454
455
456 NullFields []string `json:"-"`
457 }
458
459 func (s *AvailableUpdates) MarshalJSON() ([]byte, error) {
460 type NoMethod AvailableUpdates
461 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
462 }
463
464
465 type AwsDiskDetails struct {
466
467 DiskNumber int64 `json:"diskNumber,omitempty"`
468
469 SizeGb int64 `json:"sizeGb,omitempty,string"`
470
471 VolumeId string `json:"volumeId,omitempty"`
472
473
474
475
476
477 ForceSendFields []string `json:"-"`
478
479
480
481
482 NullFields []string `json:"-"`
483 }
484
485 func (s *AwsDiskDetails) MarshalJSON() ([]byte, error) {
486 type NoMethod AwsDiskDetails
487 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
488 }
489
490
491 type AwsSecurityGroup struct {
492
493 Id string `json:"id,omitempty"`
494
495 Name string `json:"name,omitempty"`
496
497
498
499
500
501 ForceSendFields []string `json:"-"`
502
503
504
505
506 NullFields []string `json:"-"`
507 }
508
509 func (s *AwsSecurityGroup) MarshalJSON() ([]byte, error) {
510 type NoMethod AwsSecurityGroup
511 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
512 }
513
514
515
516 type AwsSourceDetails struct {
517
518 AccessKeyCreds *AccessKeyCredentials `json:"accessKeyCreds,omitempty"`
519
520
521 AwsRegion string `json:"awsRegion,omitempty"`
522
523
524 Error *Status `json:"error,omitempty"`
525
526
527 InventorySecurityGroupNames []string `json:"inventorySecurityGroupNames,omitempty"`
528
529
530 InventoryTagList []*Tag `json:"inventoryTagList,omitempty"`
531
532
533
534
535 MigrationResourcesUserTags map[string]string `json:"migrationResourcesUserTags,omitempty"`
536
537
538 PublicIp string `json:"publicIp,omitempty"`
539
540
541
542
543
544
545
546
547
548
549 State string `json:"state,omitempty"`
550
551
552
553
554
555 ForceSendFields []string `json:"-"`
556
557
558
559
560 NullFields []string `json:"-"`
561 }
562
563 func (s *AwsSourceDetails) MarshalJSON() ([]byte, error) {
564 type NoMethod AwsSourceDetails
565 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
566 }
567
568
569 type AwsSourceVmDetails struct {
570
571 CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"`
572
573 Disks []*AwsDiskDetails `json:"disks,omitempty"`
574
575
576
577
578
579
580 Firmware string `json:"firmware,omitempty"`
581
582
583 VmCapabilitiesInfo *VmCapabilities `json:"vmCapabilitiesInfo,omitempty"`
584
585
586
587
588
589 ForceSendFields []string `json:"-"`
590
591
592
593
594 NullFields []string `json:"-"`
595 }
596
597 func (s *AwsSourceVmDetails) MarshalJSON() ([]byte, error) {
598 type NoMethod AwsSourceVmDetails
599 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
600 }
601
602
603 type AwsVmDetails struct {
604
605
606
607
608
609
610
611
612 Architecture string `json:"architecture,omitempty"`
613
614
615
616
617
618
619 BootOption string `json:"bootOption,omitempty"`
620
621 CommittedStorageMb int64 `json:"committedStorageMb,omitempty,string"`
622
623 CpuCount int64 `json:"cpuCount,omitempty"`
624
625 DiskCount int64 `json:"diskCount,omitempty"`
626
627
628 DisplayName string `json:"displayName,omitempty"`
629
630 InstanceType string `json:"instanceType,omitempty"`
631
632 MemoryMb int64 `json:"memoryMb,omitempty"`
633
634 OsDescription string `json:"osDescription,omitempty"`
635
636
637
638
639
640
641
642
643
644
645 PowerState string `json:"powerState,omitempty"`
646
647 SecurityGroups []*AwsSecurityGroup `json:"securityGroups,omitempty"`
648
649
650 SourceDescription string `json:"sourceDescription,omitempty"`
651
652 SourceId string `json:"sourceId,omitempty"`
653
654 Tags map[string]string `json:"tags,omitempty"`
655
656
657
658
659
660
661 VirtualizationType string `json:"virtualizationType,omitempty"`
662
663 VmId string `json:"vmId,omitempty"`
664
665 VpcId string `json:"vpcId,omitempty"`
666
667 Zone string `json:"zone,omitempty"`
668
669
670
671
672
673 ForceSendFields []string `json:"-"`
674
675
676
677
678 NullFields []string `json:"-"`
679 }
680
681 func (s *AwsVmDetails) MarshalJSON() ([]byte, error) {
682 type NoMethod AwsVmDetails
683 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
684 }
685
686
687 type AwsVmsDetails struct {
688
689 Details []*AwsVmDetails `json:"details,omitempty"`
690
691
692
693
694
695 ForceSendFields []string `json:"-"`
696
697
698
699
700 NullFields []string `json:"-"`
701 }
702
703 func (s *AwsVmsDetails) MarshalJSON() ([]byte, error) {
704 type NoMethod AwsVmsDetails
705 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
706 }
707
708
709 type AzureDiskDetails struct {
710
711 DiskId string `json:"diskId,omitempty"`
712
713 DiskNumber int64 `json:"diskNumber,omitempty"`
714
715 SizeGb int64 `json:"sizeGb,omitempty,string"`
716
717
718
719
720
721 ForceSendFields []string `json:"-"`
722
723
724
725
726 NullFields []string `json:"-"`
727 }
728
729 func (s *AzureDiskDetails) MarshalJSON() ([]byte, error) {
730 type NoMethod AzureDiskDetails
731 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
732 }
733
734
735
736 type AzureSourceDetails struct {
737
738
739 AzureLocation string `json:"azureLocation,omitempty"`
740
741 ClientSecretCreds *ClientSecretCredentials `json:"clientSecretCreds,omitempty"`
742
743
744 Error *Status `json:"error,omitempty"`
745
746
747
748
749 MigrationResourcesUserTags map[string]string `json:"migrationResourcesUserTags,omitempty"`
750
751
752 ResourceGroupId string `json:"resourceGroupId,omitempty"`
753
754
755
756
757
758
759
760
761
762
763 State string `json:"state,omitempty"`
764
765 SubscriptionId string `json:"subscriptionId,omitempty"`
766
767
768
769
770
771 ForceSendFields []string `json:"-"`
772
773
774
775
776 NullFields []string `json:"-"`
777 }
778
779 func (s *AzureSourceDetails) MarshalJSON() ([]byte, error) {
780 type NoMethod AzureSourceDetails
781 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
782 }
783
784
785 type AzureSourceVmDetails struct {
786
787 CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"`
788
789 Disks []*AzureDiskDetails `json:"disks,omitempty"`
790
791
792
793
794
795
796 Firmware string `json:"firmware,omitempty"`
797
798
799 VmCapabilitiesInfo *VmCapabilities `json:"vmCapabilitiesInfo,omitempty"`
800
801
802
803
804
805 ForceSendFields []string `json:"-"`
806
807
808
809
810 NullFields []string `json:"-"`
811 }
812
813 func (s *AzureSourceVmDetails) MarshalJSON() ([]byte, error) {
814 type NoMethod AzureSourceVmDetails
815 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
816 }
817
818
819 type AzureVmDetails struct {
820
821
822
823
824
825
826 BootOption string `json:"bootOption,omitempty"`
827
828 CommittedStorageMb int64 `json:"committedStorageMb,omitempty,string"`
829
830 ComputerName string `json:"computerName,omitempty"`
831
832 CpuCount int64 `json:"cpuCount,omitempty"`
833
834 DiskCount int64 `json:"diskCount,omitempty"`
835
836 Disks []*Disk `json:"disks,omitempty"`
837
838 MemoryMb int64 `json:"memoryMb,omitempty"`
839
840 OsDescription *OSDescription `json:"osDescription,omitempty"`
841
842 OsDisk *OSDisk `json:"osDisk,omitempty"`
843
844
845
846
847
848
849
850
851
852
853
854 PowerState string `json:"powerState,omitempty"`
855
856 Tags map[string]string `json:"tags,omitempty"`
857
858 VmId string `json:"vmId,omitempty"`
859
860 VmSize string `json:"vmSize,omitempty"`
861
862
863
864
865
866 ForceSendFields []string `json:"-"`
867
868
869
870
871 NullFields []string `json:"-"`
872 }
873
874 func (s *AzureVmDetails) MarshalJSON() ([]byte, error) {
875 type NoMethod AzureVmDetails
876 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
877 }
878
879
880 type AzureVmsDetails struct {
881
882 Details []*AzureVmDetails `json:"details,omitempty"`
883
884
885
886
887
888 ForceSendFields []string `json:"-"`
889
890
891
892
893 NullFields []string `json:"-"`
894 }
895
896 func (s *AzureVmsDetails) MarshalJSON() ([]byte, error) {
897 type NoMethod AzureVmsDetails
898 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
899 }
900
901
902
903 type BootDiskDefaults struct {
904
905
906
907
908
909
910 DeviceName string `json:"deviceName,omitempty"`
911
912 DiskName string `json:"diskName,omitempty"`
913
914
915
916
917
918
919
920
921
922 DiskType string `json:"diskType,omitempty"`
923
924 Encryption *Encryption `json:"encryption,omitempty"`
925
926 Image *DiskImageDefaults `json:"image,omitempty"`
927
928
929
930
931
932 ForceSendFields []string `json:"-"`
933
934
935
936
937 NullFields []string `json:"-"`
938 }
939
940 func (s *BootDiskDefaults) MarshalJSON() ([]byte, error) {
941 type NoMethod BootDiskDefaults
942 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
943 }
944
945
946 type CancelCloneJobRequest struct {
947 }
948
949
950 type CancelCutoverJobRequest struct {
951 }
952
953
954
955 type CancelImageImportJobRequest struct {
956 }
957
958
959 type CancelOperationRequest struct {
960 }
961
962
963
964 type ClientSecretCredentials struct {
965
966 ClientId string `json:"clientId,omitempty"`
967
968 ClientSecret string `json:"clientSecret,omitempty"`
969
970 TenantId string `json:"tenantId,omitempty"`
971
972
973
974
975
976 ForceSendFields []string `json:"-"`
977
978
979
980
981 NullFields []string `json:"-"`
982 }
983
984 func (s *ClientSecretCredentials) MarshalJSON() ([]byte, error) {
985 type NoMethod ClientSecretCredentials
986 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
987 }
988
989
990
991
992
993
994
995
996
997
998 type CloneJob struct {
999
1000
1001 ComputeEngineDisksTargetDetails *ComputeEngineDisksTargetDetails `json:"computeEngineDisksTargetDetails,omitempty"`
1002
1003
1004 ComputeEngineTargetDetails *ComputeEngineTargetDetails `json:"computeEngineTargetDetails,omitempty"`
1005
1006
1007 CreateTime string `json:"createTime,omitempty"`
1008
1009 EndTime string `json:"endTime,omitempty"`
1010
1011
1012 Error *Status `json:"error,omitempty"`
1013
1014 Name string `json:"name,omitempty"`
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028 State string `json:"state,omitempty"`
1029
1030 StateTime string `json:"stateTime,omitempty"`
1031
1032 Steps []*CloneStep `json:"steps,omitempty"`
1033
1034
1035 googleapi.ServerResponse `json:"-"`
1036
1037
1038
1039
1040
1041
1042 ForceSendFields []string `json:"-"`
1043
1044
1045
1046
1047 NullFields []string `json:"-"`
1048 }
1049
1050 func (s *CloneJob) MarshalJSON() ([]byte, error) {
1051 type NoMethod CloneJob
1052 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1053 }
1054
1055
1056 type CloneStep struct {
1057
1058 AdaptingOs *AdaptingOSStep `json:"adaptingOs,omitempty"`
1059
1060 EndTime string `json:"endTime,omitempty"`
1061
1062 InstantiatingMigratedVm *InstantiatingMigratedVMStep `json:"instantiatingMigratedVm,omitempty"`
1063
1064 PreparingVmDisks *PreparingVMDisksStep `json:"preparingVmDisks,omitempty"`
1065
1066 StartTime string `json:"startTime,omitempty"`
1067
1068
1069
1070
1071
1072 ForceSendFields []string `json:"-"`
1073
1074
1075
1076
1077 NullFields []string `json:"-"`
1078 }
1079
1080 func (s *CloneStep) MarshalJSON() ([]byte, error) {
1081 type NoMethod CloneStep
1082 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1083 }
1084
1085
1086
1087
1088 type ComputeEngineDisksTargetDefaults struct {
1089
1090 Disks []*PersistentDiskDefaults `json:"disks,omitempty"`
1091
1092 DisksTargetDefaults *DisksMigrationDisksTargetDefaults `json:"disksTargetDefaults,omitempty"`
1093
1094
1095
1096 TargetProject string `json:"targetProject,omitempty"`
1097
1098 VmTargetDefaults *DisksMigrationVmTargetDefaults `json:"vmTargetDefaults,omitempty"`
1099
1100 Zone string `json:"zone,omitempty"`
1101
1102
1103
1104
1105
1106 ForceSendFields []string `json:"-"`
1107
1108
1109
1110
1111 NullFields []string `json:"-"`
1112 }
1113
1114 func (s *ComputeEngineDisksTargetDefaults) MarshalJSON() ([]byte, error) {
1115 type NoMethod ComputeEngineDisksTargetDefaults
1116 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1117 }
1118
1119
1120
1121 type ComputeEngineDisksTargetDetails struct {
1122
1123 Disks []*PersistentDisk `json:"disks,omitempty"`
1124
1125 DisksTargetDetails *DisksMigrationDisksTargetDetails `json:"disksTargetDetails,omitempty"`
1126
1127 VmTargetDetails *DisksMigrationVmTargetDetails `json:"vmTargetDetails,omitempty"`
1128
1129
1130
1131
1132
1133 ForceSendFields []string `json:"-"`
1134
1135
1136
1137
1138 NullFields []string `json:"-"`
1139 }
1140
1141 func (s *ComputeEngineDisksTargetDetails) MarshalJSON() ([]byte, error) {
1142 type NoMethod ComputeEngineDisksTargetDetails
1143 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1144 }
1145
1146
1147
1148 type ComputeEngineTargetDefaults struct {
1149
1150 AdditionalLicenses []string `json:"additionalLicenses,omitempty"`
1151
1152
1153 AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"`
1154
1155
1156
1157
1158
1159
1160 BootOption string `json:"bootOption,omitempty"`
1161
1162
1163 ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"`
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173 DiskType string `json:"diskType,omitempty"`
1174
1175 Encryption *Encryption `json:"encryption,omitempty"`
1176
1177 Hostname string `json:"hostname,omitempty"`
1178
1179 Labels map[string]string `json:"labels,omitempty"`
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189 LicenseType string `json:"licenseType,omitempty"`
1190
1191 MachineType string `json:"machineType,omitempty"`
1192
1193 MachineTypeSeries string `json:"machineTypeSeries,omitempty"`
1194
1195 Metadata map[string]string `json:"metadata,omitempty"`
1196
1197 NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
1198
1199 NetworkTags []string `json:"networkTags,omitempty"`
1200
1201
1202 SecureBoot bool `json:"secureBoot,omitempty"`
1203
1204 ServiceAccount string `json:"serviceAccount,omitempty"`
1205
1206
1207 TargetProject string `json:"targetProject,omitempty"`
1208
1209 VmName string `json:"vmName,omitempty"`
1210
1211 Zone string `json:"zone,omitempty"`
1212
1213
1214
1215
1216
1217 ForceSendFields []string `json:"-"`
1218
1219
1220
1221
1222 NullFields []string `json:"-"`
1223 }
1224
1225 func (s *ComputeEngineTargetDefaults) MarshalJSON() ([]byte, error) {
1226 type NoMethod ComputeEngineTargetDefaults
1227 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1228 }
1229
1230
1231
1232 type ComputeEngineTargetDetails struct {
1233
1234 AdditionalLicenses []string `json:"additionalLicenses,omitempty"`
1235
1236 AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"`
1237
1238
1239
1240
1241
1242
1243 BootOption string `json:"bootOption,omitempty"`
1244
1245
1246 ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"`
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256 DiskType string `json:"diskType,omitempty"`
1257
1258 Encryption *Encryption `json:"encryption,omitempty"`
1259
1260 Hostname string `json:"hostname,omitempty"`
1261
1262 Labels map[string]string `json:"labels,omitempty"`
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272 LicenseType string `json:"licenseType,omitempty"`
1273
1274 MachineType string `json:"machineType,omitempty"`
1275
1276 MachineTypeSeries string `json:"machineTypeSeries,omitempty"`
1277
1278 Metadata map[string]string `json:"metadata,omitempty"`
1279
1280 NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
1281
1282 NetworkTags []string `json:"networkTags,omitempty"`
1283
1284 Project string `json:"project,omitempty"`
1285
1286
1287 SecureBoot bool `json:"secureBoot,omitempty"`
1288
1289 ServiceAccount string `json:"serviceAccount,omitempty"`
1290
1291 VmName string `json:"vmName,omitempty"`
1292
1293 Zone string `json:"zone,omitempty"`
1294
1295
1296
1297
1298
1299 ForceSendFields []string `json:"-"`
1300
1301
1302
1303
1304 NullFields []string `json:"-"`
1305 }
1306
1307 func (s *ComputeEngineTargetDetails) MarshalJSON() ([]byte, error) {
1308 type NoMethod ComputeEngineTargetDetails
1309 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1310 }
1311
1312
1313
1314 type ComputeScheduling struct {
1315
1316
1317
1318 MinNodeCpus int64 `json:"minNodeCpus,omitempty"`
1319
1320
1321 NodeAffinities []*SchedulingNodeAffinity `json:"nodeAffinities,omitempty"`
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331 OnHostMaintenance string `json:"onHostMaintenance,omitempty"`
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346 RestartType string `json:"restartType,omitempty"`
1347
1348
1349
1350
1351
1352 ForceSendFields []string `json:"-"`
1353
1354
1355
1356
1357 NullFields []string `json:"-"`
1358 }
1359
1360 func (s *ComputeScheduling) MarshalJSON() ([]byte, error) {
1361 type NoMethod ComputeScheduling
1362 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1363 }
1364
1365
1366 type CreatingImageStep struct {
1367 }
1368
1369
1370
1371 type CutoverForecast struct {
1372
1373
1374 EstimatedCutoverJobDuration string `json:"estimatedCutoverJobDuration,omitempty"`
1375
1376
1377
1378
1379
1380 ForceSendFields []string `json:"-"`
1381
1382
1383
1384
1385 NullFields []string `json:"-"`
1386 }
1387
1388 func (s *CutoverForecast) MarshalJSON() ([]byte, error) {
1389 type NoMethod CutoverForecast
1390 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1391 }
1392
1393
1394
1395
1396 type CutoverJob struct {
1397
1398
1399 ComputeEngineDisksTargetDetails *ComputeEngineDisksTargetDetails `json:"computeEngineDisksTargetDetails,omitempty"`
1400
1401
1402 ComputeEngineTargetDetails *ComputeEngineTargetDetails `json:"computeEngineTargetDetails,omitempty"`
1403
1404
1405 CreateTime string `json:"createTime,omitempty"`
1406
1407 EndTime string `json:"endTime,omitempty"`
1408
1409
1410 Error *Status `json:"error,omitempty"`
1411
1412 Name string `json:"name,omitempty"`
1413
1414
1415 ProgressPercent int64 `json:"progressPercent,omitempty"`
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429 State string `json:"state,omitempty"`
1430
1431
1432 StateMessage string `json:"stateMessage,omitempty"`
1433
1434 StateTime string `json:"stateTime,omitempty"`
1435
1436 Steps []*CutoverStep `json:"steps,omitempty"`
1437
1438
1439 googleapi.ServerResponse `json:"-"`
1440
1441
1442
1443
1444
1445
1446 ForceSendFields []string `json:"-"`
1447
1448
1449
1450
1451 NullFields []string `json:"-"`
1452 }
1453
1454 func (s *CutoverJob) MarshalJSON() ([]byte, error) {
1455 type NoMethod CutoverJob
1456 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1457 }
1458
1459
1460 type CutoverStep struct {
1461
1462 EndTime string `json:"endTime,omitempty"`
1463
1464 FinalSync *ReplicationCycle `json:"finalSync,omitempty"`
1465
1466 InstantiatingMigratedVm *InstantiatingMigratedVMStep `json:"instantiatingMigratedVm,omitempty"`
1467
1468 PreparingVmDisks *PreparingVMDisksStep `json:"preparingVmDisks,omitempty"`
1469
1470 PreviousReplicationCycle *ReplicationCycle `json:"previousReplicationCycle,omitempty"`
1471
1472 ShuttingDownSourceVm *ShuttingDownSourceVMStep `json:"shuttingDownSourceVm,omitempty"`
1473
1474 StartTime string `json:"startTime,omitempty"`
1475
1476
1477
1478
1479
1480 ForceSendFields []string `json:"-"`
1481
1482
1483
1484
1485 NullFields []string `json:"-"`
1486 }
1487
1488 func (s *CutoverStep) MarshalJSON() ([]byte, error) {
1489 type NoMethod CutoverStep
1490 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1491 }
1492
1493
1494 type CycleStep struct {
1495
1496 EndTime string `json:"endTime,omitempty"`
1497
1498 InitializingReplication *InitializingReplicationStep `json:"initializingReplication,omitempty"`
1499
1500 PostProcessing *PostProcessingStep `json:"postProcessing,omitempty"`
1501
1502 Replicating *ReplicatingStep `json:"replicating,omitempty"`
1503
1504 StartTime string `json:"startTime,omitempty"`
1505
1506
1507
1508
1509
1510 ForceSendFields []string `json:"-"`
1511
1512
1513
1514
1515 NullFields []string `json:"-"`
1516 }
1517
1518 func (s *CycleStep) MarshalJSON() ([]byte, error) {
1519 type NoMethod CycleStep
1520 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1521 }
1522
1523
1524
1525 type DataDiskImageImport struct {
1526 }
1527
1528
1529
1530
1531
1532 type DatacenterConnector struct {
1533
1534
1535
1536 ApplianceInfrastructureVersion string `json:"applianceInfrastructureVersion,omitempty"`
1537
1538
1539
1540 ApplianceSoftwareVersion string `json:"applianceSoftwareVersion,omitempty"`
1541
1542
1543 AvailableVersions *AvailableUpdates `json:"availableVersions,omitempty"`
1544
1545
1546 Bucket string `json:"bucket,omitempty"`
1547
1548
1549 CreateTime string `json:"createTime,omitempty"`
1550
1551
1552 Error *Status `json:"error,omitempty"`
1553
1554 Name string `json:"name,omitempty"`
1555
1556
1557
1558 RegistrationId string `json:"registrationId,omitempty"`
1559
1560
1561 ServiceAccount string `json:"serviceAccount,omitempty"`
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574 State string `json:"state,omitempty"`
1575
1576 StateTime string `json:"stateTime,omitempty"`
1577
1578
1579 UpdateTime string `json:"updateTime,omitempty"`
1580
1581
1582 UpgradeStatus *UpgradeStatus `json:"upgradeStatus,omitempty"`
1583
1584
1585 Version string `json:"version,omitempty"`
1586
1587
1588 googleapi.ServerResponse `json:"-"`
1589
1590
1591
1592
1593
1594
1595 ForceSendFields []string `json:"-"`
1596
1597
1598
1599
1600 NullFields []string `json:"-"`
1601 }
1602
1603 func (s *DatacenterConnector) MarshalJSON() ([]byte, error) {
1604 type NoMethod DatacenterConnector
1605 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1606 }
1607
1608
1609 type Disk struct {
1610
1611 Lun int64 `json:"lun,omitempty"`
1612
1613 Name string `json:"name,omitempty"`
1614
1615 SizeGb int64 `json:"sizeGb,omitempty"`
1616
1617
1618
1619
1620
1621 ForceSendFields []string `json:"-"`
1622
1623
1624
1625
1626 NullFields []string `json:"-"`
1627 }
1628
1629 func (s *Disk) MarshalJSON() ([]byte, error) {
1630 type NoMethod Disk
1631 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1632 }
1633
1634
1635
1636 type DiskImageDefaults struct {
1637
1638 SourceImage string `json:"sourceImage,omitempty"`
1639
1640
1641
1642
1643
1644 ForceSendFields []string `json:"-"`
1645
1646
1647
1648
1649 NullFields []string `json:"-"`
1650 }
1651
1652 func (s *DiskImageDefaults) MarshalJSON() ([]byte, error) {
1653 type NoMethod DiskImageDefaults
1654 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1655 }
1656
1657
1658
1659 type DiskImageTargetDetails struct {
1660
1661 AdditionalLicenses []string `json:"additionalLicenses,omitempty"`
1662
1663 DataDiskImageImport *DataDiskImageImport `json:"dataDiskImageImport,omitempty"`
1664
1665 Description string `json:"description,omitempty"`
1666
1667 Encryption *Encryption `json:"encryption,omitempty"`
1668
1669
1670 FamilyName string `json:"familyName,omitempty"`
1671
1672 ImageName string `json:"imageName,omitempty"`
1673
1674 Labels map[string]string `json:"labels,omitempty"`
1675
1676
1677 OsAdaptationParameters *ImageImportOsAdaptationParameters `json:"osAdaptationParameters,omitempty"`
1678
1679
1680
1681 SingleRegionStorage bool `json:"singleRegionStorage,omitempty"`
1682
1683
1684 TargetProject string `json:"targetProject,omitempty"`
1685
1686
1687
1688
1689
1690 ForceSendFields []string `json:"-"`
1691
1692
1693
1694
1695 NullFields []string `json:"-"`
1696 }
1697
1698 func (s *DiskImageTargetDetails) MarshalJSON() ([]byte, error) {
1699 type NoMethod DiskImageTargetDetails
1700 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1701 }
1702
1703
1704 type DisksMigrationDisksTargetDefaults struct {
1705 }
1706
1707
1708 type DisksMigrationDisksTargetDetails struct {
1709 }
1710
1711
1712
1713 type DisksMigrationVmTargetDefaults struct {
1714
1715 AdditionalLicenses []string `json:"additionalLicenses,omitempty"`
1716
1717 BootDiskDefaults *BootDiskDefaults `json:"bootDiskDefaults,omitempty"`
1718
1719
1720 ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"`
1721
1722 Encryption *Encryption `json:"encryption,omitempty"`
1723
1724 Hostname string `json:"hostname,omitempty"`
1725
1726 Labels map[string]string `json:"labels,omitempty"`
1727
1728 MachineType string `json:"machineType,omitempty"`
1729
1730
1731 MachineTypeSeries string `json:"machineTypeSeries,omitempty"`
1732
1733 Metadata map[string]string `json:"metadata,omitempty"`
1734
1735 NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
1736
1737 NetworkTags []string `json:"networkTags,omitempty"`
1738
1739
1740 SecureBoot bool `json:"secureBoot,omitempty"`
1741
1742 ServiceAccount string `json:"serviceAccount,omitempty"`
1743
1744 VmName string `json:"vmName,omitempty"`
1745
1746
1747
1748
1749
1750 ForceSendFields []string `json:"-"`
1751
1752
1753
1754
1755 NullFields []string `json:"-"`
1756 }
1757
1758 func (s *DisksMigrationVmTargetDefaults) MarshalJSON() ([]byte, error) {
1759 type NoMethod DisksMigrationVmTargetDefaults
1760 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1761 }
1762
1763
1764
1765 type DisksMigrationVmTargetDetails struct {
1766
1767 VmUri string `json:"vmUri,omitempty"`
1768
1769
1770
1771
1772
1773 ForceSendFields []string `json:"-"`
1774
1775
1776
1777
1778 NullFields []string `json:"-"`
1779 }
1780
1781 func (s *DisksMigrationVmTargetDetails) MarshalJSON() ([]byte, error) {
1782 type NoMethod DisksMigrationVmTargetDetails
1783 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1784 }
1785
1786
1787
1788
1789
1790 type Empty struct {
1791
1792 googleapi.ServerResponse `json:"-"`
1793 }
1794
1795
1796
1797 type Encryption struct {
1798
1799
1800 KmsKey string `json:"kmsKey,omitempty"`
1801
1802
1803
1804
1805
1806 ForceSendFields []string `json:"-"`
1807
1808
1809
1810
1811 NullFields []string `json:"-"`
1812 }
1813
1814 func (s *Encryption) MarshalJSON() ([]byte, error) {
1815 type NoMethod Encryption
1816 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1817 }
1818
1819
1820 type FetchInventoryResponse struct {
1821
1822 AwsVms *AwsVmsDetails `json:"awsVms,omitempty"`
1823
1824 AzureVms *AzureVmsDetails `json:"azureVms,omitempty"`
1825
1826
1827
1828 NextPageToken string `json:"nextPageToken,omitempty"`
1829
1830
1831 UpdateTime string `json:"updateTime,omitempty"`
1832
1833 VmwareVms *VmwareVmsDetails `json:"vmwareVms,omitempty"`
1834
1835
1836 googleapi.ServerResponse `json:"-"`
1837
1838
1839
1840
1841
1842 ForceSendFields []string `json:"-"`
1843
1844
1845
1846
1847 NullFields []string `json:"-"`
1848 }
1849
1850 func (s *FetchInventoryResponse) MarshalJSON() ([]byte, error) {
1851 type NoMethod FetchInventoryResponse
1852 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1853 }
1854
1855
1856 type FinalizeMigrationRequest struct {
1857 }
1858
1859
1860
1861 type Group struct {
1862
1863 CreateTime string `json:"createTime,omitempty"`
1864
1865 Description string `json:"description,omitempty"`
1866
1867
1868 DisplayName string `json:"displayName,omitempty"`
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878 MigrationTargetType string `json:"migrationTargetType,omitempty"`
1879
1880 Name string `json:"name,omitempty"`
1881
1882 UpdateTime string `json:"updateTime,omitempty"`
1883
1884
1885 googleapi.ServerResponse `json:"-"`
1886
1887
1888
1889
1890
1891 ForceSendFields []string `json:"-"`
1892
1893
1894
1895
1896 NullFields []string `json:"-"`
1897 }
1898
1899 func (s *Group) MarshalJSON() ([]byte, error) {
1900 type NoMethod Group
1901 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1902 }
1903
1904
1905
1906 type ImageImport struct {
1907
1908
1909 CloudStorageUri string `json:"cloudStorageUri,omitempty"`
1910
1911 CreateTime string `json:"createTime,omitempty"`
1912
1913
1914 DiskImageTargetDefaults *DiskImageTargetDetails `json:"diskImageTargetDefaults,omitempty"`
1915
1916
1917 Encryption *Encryption `json:"encryption,omitempty"`
1918
1919 Name string `json:"name,omitempty"`
1920
1921
1922
1923 RecentImageImportJobs []*ImageImportJob `json:"recentImageImportJobs,omitempty"`
1924
1925
1926 googleapi.ServerResponse `json:"-"`
1927
1928
1929
1930
1931
1932 ForceSendFields []string `json:"-"`
1933
1934
1935
1936
1937 NullFields []string `json:"-"`
1938 }
1939
1940 func (s *ImageImport) MarshalJSON() ([]byte, error) {
1941 type NoMethod ImageImport
1942 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
1943 }
1944
1945
1946
1947 type ImageImportJob struct {
1948
1949
1950 CloudStorageUri string `json:"cloudStorageUri,omitempty"`
1951
1952
1953 CreateTime string `json:"createTime,omitempty"`
1954
1955
1956 CreatedResources []string `json:"createdResources,omitempty"`
1957
1958
1959 DiskImageTargetDetails *DiskImageTargetDetails `json:"diskImageTargetDetails,omitempty"`
1960
1961 EndTime string `json:"endTime,omitempty"`
1962
1963
1964 Errors []*Status `json:"errors,omitempty"`
1965
1966 Name string `json:"name,omitempty"`
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977 State string `json:"state,omitempty"`
1978
1979 Steps []*ImageImportStep `json:"steps,omitempty"`
1980
1981 Warnings []*MigrationWarning `json:"warnings,omitempty"`
1982
1983
1984 googleapi.ServerResponse `json:"-"`
1985
1986
1987
1988
1989
1990 ForceSendFields []string `json:"-"`
1991
1992
1993
1994
1995 NullFields []string `json:"-"`
1996 }
1997
1998 func (s *ImageImportJob) MarshalJSON() ([]byte, error) {
1999 type NoMethod ImageImportJob
2000 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2001 }
2002
2003
2004
2005 type ImageImportOsAdaptationParameters struct {
2006
2007
2008
2009
2010
2011 Generalize bool `json:"generalize,omitempty"`
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022 LicenseType string `json:"licenseType,omitempty"`
2023
2024
2025
2026
2027
2028 ForceSendFields []string `json:"-"`
2029
2030
2031
2032
2033 NullFields []string `json:"-"`
2034 }
2035
2036 func (s *ImageImportOsAdaptationParameters) MarshalJSON() ([]byte, error) {
2037 type NoMethod ImageImportOsAdaptationParameters
2038 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2039 }
2040
2041
2042
2043 type ImageImportStep struct {
2044
2045 AdaptingOs *AdaptingOSStep `json:"adaptingOs,omitempty"`
2046
2047 CreatingImage *CreatingImageStep `json:"creatingImage,omitempty"`
2048
2049 EndTime string `json:"endTime,omitempty"`
2050
2051 Initializing *InitializingImageImportStep `json:"initializing,omitempty"`
2052
2053 LoadingSourceFiles *LoadingImageSourceFilesStep `json:"loadingSourceFiles,omitempty"`
2054
2055 StartTime string `json:"startTime,omitempty"`
2056
2057
2058
2059
2060
2061 ForceSendFields []string `json:"-"`
2062
2063
2064
2065
2066 NullFields []string `json:"-"`
2067 }
2068
2069 func (s *ImageImportStep) MarshalJSON() ([]byte, error) {
2070 type NoMethod ImageImportStep
2071 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2072 }
2073
2074
2075
2076 type InitializingImageImportStep struct {
2077 }
2078
2079
2080
2081 type InitializingReplicationStep struct {
2082 }
2083
2084
2085
2086 type InstantiatingMigratedVMStep struct {
2087 }
2088
2089
2090 type Link struct {
2091
2092 Description string `json:"description,omitempty"`
2093
2094 Url string `json:"url,omitempty"`
2095
2096
2097
2098
2099
2100 ForceSendFields []string `json:"-"`
2101
2102
2103
2104
2105 NullFields []string `json:"-"`
2106 }
2107
2108 func (s *Link) MarshalJSON() ([]byte, error) {
2109 type NoMethod Link
2110 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2111 }
2112
2113
2114 type ListCloneJobsResponse struct {
2115
2116 CloneJobs []*CloneJob `json:"cloneJobs,omitempty"`
2117
2118
2119
2120 NextPageToken string `json:"nextPageToken,omitempty"`
2121
2122 Unreachable []string `json:"unreachable,omitempty"`
2123
2124
2125 googleapi.ServerResponse `json:"-"`
2126
2127
2128
2129
2130
2131 ForceSendFields []string `json:"-"`
2132
2133
2134
2135
2136 NullFields []string `json:"-"`
2137 }
2138
2139 func (s *ListCloneJobsResponse) MarshalJSON() ([]byte, error) {
2140 type NoMethod ListCloneJobsResponse
2141 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2142 }
2143
2144
2145 type ListCutoverJobsResponse struct {
2146
2147 CutoverJobs []*CutoverJob `json:"cutoverJobs,omitempty"`
2148
2149
2150
2151 NextPageToken string `json:"nextPageToken,omitempty"`
2152
2153 Unreachable []string `json:"unreachable,omitempty"`
2154
2155
2156 googleapi.ServerResponse `json:"-"`
2157
2158
2159
2160
2161
2162 ForceSendFields []string `json:"-"`
2163
2164
2165
2166
2167 NullFields []string `json:"-"`
2168 }
2169
2170 func (s *ListCutoverJobsResponse) MarshalJSON() ([]byte, error) {
2171 type NoMethod ListCutoverJobsResponse
2172 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2173 }
2174
2175
2176
2177 type ListDatacenterConnectorsResponse struct {
2178
2179 DatacenterConnectors []*DatacenterConnector `json:"datacenterConnectors,omitempty"`
2180
2181
2182
2183 NextPageToken string `json:"nextPageToken,omitempty"`
2184
2185 Unreachable []string `json:"unreachable,omitempty"`
2186
2187
2188 googleapi.ServerResponse `json:"-"`
2189
2190
2191
2192
2193
2194 ForceSendFields []string `json:"-"`
2195
2196
2197
2198
2199 NullFields []string `json:"-"`
2200 }
2201
2202 func (s *ListDatacenterConnectorsResponse) MarshalJSON() ([]byte, error) {
2203 type NoMethod ListDatacenterConnectorsResponse
2204 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2205 }
2206
2207
2208 type ListGroupsResponse struct {
2209
2210 Groups []*Group `json:"groups,omitempty"`
2211
2212
2213
2214 NextPageToken string `json:"nextPageToken,omitempty"`
2215
2216 Unreachable []string `json:"unreachable,omitempty"`
2217
2218
2219 googleapi.ServerResponse `json:"-"`
2220
2221
2222
2223
2224
2225 ForceSendFields []string `json:"-"`
2226
2227
2228
2229
2230 NullFields []string `json:"-"`
2231 }
2232
2233 func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) {
2234 type NoMethod ListGroupsResponse
2235 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2236 }
2237
2238
2239
2240 type ListImageImportJobsResponse struct {
2241
2242 ImageImportJobs []*ImageImportJob `json:"imageImportJobs,omitempty"`
2243
2244
2245
2246 NextPageToken string `json:"nextPageToken,omitempty"`
2247
2248 Unreachable []string `json:"unreachable,omitempty"`
2249
2250
2251 googleapi.ServerResponse `json:"-"`
2252
2253
2254
2255
2256
2257 ForceSendFields []string `json:"-"`
2258
2259
2260
2261
2262 NullFields []string `json:"-"`
2263 }
2264
2265 func (s *ListImageImportJobsResponse) MarshalJSON() ([]byte, error) {
2266 type NoMethod ListImageImportJobsResponse
2267 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2268 }
2269
2270
2271 type ListImageImportsResponse struct {
2272
2273 ImageImports []*ImageImport `json:"imageImports,omitempty"`
2274
2275
2276
2277 NextPageToken string `json:"nextPageToken,omitempty"`
2278
2279 Unreachable []string `json:"unreachable,omitempty"`
2280
2281
2282 googleapi.ServerResponse `json:"-"`
2283
2284
2285
2286
2287
2288 ForceSendFields []string `json:"-"`
2289
2290
2291
2292
2293 NullFields []string `json:"-"`
2294 }
2295
2296 func (s *ListImageImportsResponse) MarshalJSON() ([]byte, error) {
2297 type NoMethod ListImageImportsResponse
2298 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2299 }
2300
2301
2302 type ListLocationsResponse struct {
2303
2304
2305 Locations []*Location `json:"locations,omitempty"`
2306
2307 NextPageToken string `json:"nextPageToken,omitempty"`
2308
2309
2310 googleapi.ServerResponse `json:"-"`
2311
2312
2313
2314
2315
2316 ForceSendFields []string `json:"-"`
2317
2318
2319
2320
2321 NullFields []string `json:"-"`
2322 }
2323
2324 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
2325 type NoMethod ListLocationsResponse
2326 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2327 }
2328
2329
2330 type ListMigratingVmsResponse struct {
2331
2332 MigratingVms []*MigratingVm `json:"migratingVms,omitempty"`
2333
2334
2335
2336 NextPageToken string `json:"nextPageToken,omitempty"`
2337
2338 Unreachable []string `json:"unreachable,omitempty"`
2339
2340
2341 googleapi.ServerResponse `json:"-"`
2342
2343
2344
2345
2346
2347 ForceSendFields []string `json:"-"`
2348
2349
2350
2351
2352 NullFields []string `json:"-"`
2353 }
2354
2355 func (s *ListMigratingVmsResponse) MarshalJSON() ([]byte, error) {
2356 type NoMethod ListMigratingVmsResponse
2357 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2358 }
2359
2360
2361 type ListOperationsResponse struct {
2362
2363 NextPageToken string `json:"nextPageToken,omitempty"`
2364
2365
2366 Operations []*Operation `json:"operations,omitempty"`
2367
2368
2369 googleapi.ServerResponse `json:"-"`
2370
2371
2372
2373
2374
2375 ForceSendFields []string `json:"-"`
2376
2377
2378
2379
2380 NullFields []string `json:"-"`
2381 }
2382
2383 func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
2384 type NoMethod ListOperationsResponse
2385 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2386 }
2387
2388
2389
2390 type ListReplicationCyclesResponse struct {
2391
2392
2393
2394 NextPageToken string `json:"nextPageToken,omitempty"`
2395
2396 ReplicationCycles []*ReplicationCycle `json:"replicationCycles,omitempty"`
2397
2398 Unreachable []string `json:"unreachable,omitempty"`
2399
2400
2401 googleapi.ServerResponse `json:"-"`
2402
2403
2404
2405
2406
2407 ForceSendFields []string `json:"-"`
2408
2409
2410
2411
2412 NullFields []string `json:"-"`
2413 }
2414
2415 func (s *ListReplicationCyclesResponse) MarshalJSON() ([]byte, error) {
2416 type NoMethod ListReplicationCyclesResponse
2417 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2418 }
2419
2420
2421 type ListSourcesResponse struct {
2422
2423
2424
2425 NextPageToken string `json:"nextPageToken,omitempty"`
2426
2427 Sources []*Source `json:"sources,omitempty"`
2428
2429 Unreachable []string `json:"unreachable,omitempty"`
2430
2431
2432 googleapi.ServerResponse `json:"-"`
2433
2434
2435
2436
2437
2438 ForceSendFields []string `json:"-"`
2439
2440
2441
2442
2443 NullFields []string `json:"-"`
2444 }
2445
2446 func (s *ListSourcesResponse) MarshalJSON() ([]byte, error) {
2447 type NoMethod ListSourcesResponse
2448 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2449 }
2450
2451
2452 type ListTargetProjectsResponse struct {
2453
2454
2455
2456 NextPageToken string `json:"nextPageToken,omitempty"`
2457
2458 TargetProjects []*TargetProject `json:"targetProjects,omitempty"`
2459
2460 Unreachable []string `json:"unreachable,omitempty"`
2461
2462
2463 googleapi.ServerResponse `json:"-"`
2464
2465
2466
2467
2468
2469 ForceSendFields []string `json:"-"`
2470
2471
2472
2473
2474 NullFields []string `json:"-"`
2475 }
2476
2477 func (s *ListTargetProjectsResponse) MarshalJSON() ([]byte, error) {
2478 type NoMethod ListTargetProjectsResponse
2479 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2480 }
2481
2482
2483
2484 type ListUtilizationReportsResponse struct {
2485
2486
2487
2488 NextPageToken string `json:"nextPageToken,omitempty"`
2489
2490 Unreachable []string `json:"unreachable,omitempty"`
2491
2492 UtilizationReports []*UtilizationReport `json:"utilizationReports,omitempty"`
2493
2494
2495 googleapi.ServerResponse `json:"-"`
2496
2497
2498
2499
2500
2501 ForceSendFields []string `json:"-"`
2502
2503
2504
2505
2506 NullFields []string `json:"-"`
2507 }
2508
2509 func (s *ListUtilizationReportsResponse) MarshalJSON() ([]byte, error) {
2510 type NoMethod ListUtilizationReportsResponse
2511 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2512 }
2513
2514
2515
2516 type LoadingImageSourceFilesStep struct {
2517 }
2518
2519
2520
2521 type LocalizedMessage struct {
2522
2523
2524
2525 Locale string `json:"locale,omitempty"`
2526
2527 Message string `json:"message,omitempty"`
2528
2529
2530
2531
2532
2533 ForceSendFields []string `json:"-"`
2534
2535
2536
2537
2538 NullFields []string `json:"-"`
2539 }
2540
2541 func (s *LocalizedMessage) MarshalJSON() ([]byte, error) {
2542 type NoMethod LocalizedMessage
2543 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2544 }
2545
2546
2547 type Location struct {
2548
2549
2550 DisplayName string `json:"displayName,omitempty"`
2551
2552
2553 Labels map[string]string `json:"labels,omitempty"`
2554
2555 LocationId string `json:"locationId,omitempty"`
2556
2557
2558 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2559
2560
2561
2562 Name string `json:"name,omitempty"`
2563
2564
2565 googleapi.ServerResponse `json:"-"`
2566
2567
2568
2569
2570
2571 ForceSendFields []string `json:"-"`
2572
2573
2574
2575
2576 NullFields []string `json:"-"`
2577 }
2578
2579 func (s *Location) MarshalJSON() ([]byte, error) {
2580 type NoMethod Location
2581 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2582 }
2583
2584
2585
2586 type MigratingVm struct {
2587
2588 AwsSourceVmDetails *AwsSourceVmDetails `json:"awsSourceVmDetails,omitempty"`
2589
2590 AzureSourceVmDetails *AzureSourceVmDetails `json:"azureSourceVmDetails,omitempty"`
2591
2592
2593 ComputeEngineDisksTargetDefaults *ComputeEngineDisksTargetDefaults `json:"computeEngineDisksTargetDefaults,omitempty"`
2594
2595 ComputeEngineTargetDefaults *ComputeEngineTargetDefaults `json:"computeEngineTargetDefaults,omitempty"`
2596
2597
2598 CreateTime string `json:"createTime,omitempty"`
2599
2600
2601 CurrentSyncInfo *ReplicationCycle `json:"currentSyncInfo,omitempty"`
2602
2603
2604 CutoverForecast *CutoverForecast `json:"cutoverForecast,omitempty"`
2605
2606 Description string `json:"description,omitempty"`
2607
2608 DisplayName string `json:"displayName,omitempty"`
2609
2610
2611 Error *Status `json:"error,omitempty"`
2612
2613
2614 Group string `json:"group,omitempty"`
2615
2616 Labels map[string]string `json:"labels,omitempty"`
2617
2618
2619
2620
2621 LastReplicationCycle *ReplicationCycle `json:"lastReplicationCycle,omitempty"`
2622
2623
2624 LastSync *ReplicationSync `json:"lastSync,omitempty"`
2625
2626 Name string `json:"name,omitempty"`
2627
2628 Policy *SchedulePolicy `json:"policy,omitempty"`
2629
2630
2631
2632
2633
2634 RecentCloneJobs []*CloneJob `json:"recentCloneJobs,omitempty"`
2635
2636
2637
2638
2639
2640 RecentCutoverJobs []*CutoverJob `json:"recentCutoverJobs,omitempty"`
2641
2642
2643
2644 SourceVmId string `json:"sourceVmId,omitempty"`
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668 State string `json:"state,omitempty"`
2669
2670 StateTime string `json:"stateTime,omitempty"`
2671
2672
2673 UpdateTime string `json:"updateTime,omitempty"`
2674
2675 VmwareSourceVmDetails *VmwareSourceVmDetails `json:"vmwareSourceVmDetails,omitempty"`
2676
2677
2678 googleapi.ServerResponse `json:"-"`
2679
2680
2681
2682
2683
2684 ForceSendFields []string `json:"-"`
2685
2686
2687
2688
2689 NullFields []string `json:"-"`
2690 }
2691
2692 func (s *MigratingVm) MarshalJSON() ([]byte, error) {
2693 type NoMethod MigratingVm
2694 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2695 }
2696
2697
2698
2699
2700 type MigrationError struct {
2701
2702 ActionItem *LocalizedMessage `json:"actionItem,omitempty"`
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727 Code string `json:"code,omitempty"`
2728
2729 ErrorMessage *LocalizedMessage `json:"errorMessage,omitempty"`
2730
2731 ErrorTime string `json:"errorTime,omitempty"`
2732
2733
2734 HelpLinks []*Link `json:"helpLinks,omitempty"`
2735
2736
2737
2738
2739
2740 ForceSendFields []string `json:"-"`
2741
2742
2743
2744
2745 NullFields []string `json:"-"`
2746 }
2747
2748 func (s *MigrationError) MarshalJSON() ([]byte, error) {
2749 type NoMethod MigrationError
2750 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2751 }
2752
2753
2754
2755
2756 type MigrationWarning struct {
2757
2758 ActionItem *LocalizedMessage `json:"actionItem,omitempty"`
2759
2760
2761
2762
2763
2764 Code string `json:"code,omitempty"`
2765
2766
2767 HelpLinks []*Link `json:"helpLinks,omitempty"`
2768
2769 WarningMessage *LocalizedMessage `json:"warningMessage,omitempty"`
2770
2771 WarningTime string `json:"warningTime,omitempty"`
2772
2773
2774
2775
2776
2777 ForceSendFields []string `json:"-"`
2778
2779
2780
2781
2782 NullFields []string `json:"-"`
2783 }
2784
2785 func (s *MigrationWarning) MarshalJSON() ([]byte, error) {
2786 type NoMethod MigrationWarning
2787 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2788 }
2789
2790
2791 type NetworkInterface struct {
2792
2793 ExternalIp string `json:"externalIp,omitempty"`
2794
2795
2796 InternalIp string `json:"internalIp,omitempty"`
2797
2798 Network string `json:"network,omitempty"`
2799
2800 Subnetwork string `json:"subnetwork,omitempty"`
2801
2802
2803
2804
2805
2806 ForceSendFields []string `json:"-"`
2807
2808
2809
2810
2811 NullFields []string `json:"-"`
2812 }
2813
2814 func (s *NetworkInterface) MarshalJSON() ([]byte, error) {
2815 type NoMethod NetworkInterface
2816 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2817 }
2818
2819
2820
2821 type OSDescription struct {
2822
2823 Offer string `json:"offer,omitempty"`
2824
2825 Plan string `json:"plan,omitempty"`
2826
2827 Publisher string `json:"publisher,omitempty"`
2828
2829 Type string `json:"type,omitempty"`
2830
2831
2832
2833
2834
2835 ForceSendFields []string `json:"-"`
2836
2837
2838
2839
2840 NullFields []string `json:"-"`
2841 }
2842
2843 func (s *OSDescription) MarshalJSON() ([]byte, error) {
2844 type NoMethod OSDescription
2845 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2846 }
2847
2848
2849 type OSDisk struct {
2850
2851 Name string `json:"name,omitempty"`
2852
2853 SizeGb int64 `json:"sizeGb,omitempty"`
2854
2855 Type string `json:"type,omitempty"`
2856
2857
2858
2859
2860
2861 ForceSendFields []string `json:"-"`
2862
2863
2864
2865
2866 NullFields []string `json:"-"`
2867 }
2868
2869 func (s *OSDisk) MarshalJSON() ([]byte, error) {
2870 type NoMethod OSDisk
2871 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2872 }
2873
2874
2875
2876 type Operation struct {
2877
2878
2879
2880 Done bool `json:"done,omitempty"`
2881
2882 Error *Status `json:"error,omitempty"`
2883
2884
2885
2886
2887 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2888
2889
2890
2891 Name string `json:"name,omitempty"`
2892
2893
2894
2895
2896
2897
2898
2899 Response googleapi.RawMessage `json:"response,omitempty"`
2900
2901
2902 googleapi.ServerResponse `json:"-"`
2903
2904
2905
2906
2907
2908 ForceSendFields []string `json:"-"`
2909
2910
2911
2912
2913 NullFields []string `json:"-"`
2914 }
2915
2916 func (s *Operation) MarshalJSON() ([]byte, error) {
2917 type NoMethod Operation
2918 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2919 }
2920
2921
2922 type OperationMetadata struct {
2923
2924 ApiVersion string `json:"apiVersion,omitempty"`
2925
2926 CreateTime string `json:"createTime,omitempty"`
2927
2928 EndTime string `json:"endTime,omitempty"`
2929
2930
2931
2932
2933 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
2934
2935 StatusMessage string `json:"statusMessage,omitempty"`
2936
2937
2938 Target string `json:"target,omitempty"`
2939
2940 Verb string `json:"verb,omitempty"`
2941
2942
2943
2944
2945
2946 ForceSendFields []string `json:"-"`
2947
2948
2949
2950
2951 NullFields []string `json:"-"`
2952 }
2953
2954 func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
2955 type NoMethod OperationMetadata
2956 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2957 }
2958
2959
2960 type PauseMigrationRequest struct {
2961 }
2962
2963
2964 type PersistentDisk struct {
2965
2966 DiskUri string `json:"diskUri,omitempty"`
2967
2968 SourceDiskNumber int64 `json:"sourceDiskNumber,omitempty"`
2969
2970
2971
2972
2973
2974 ForceSendFields []string `json:"-"`
2975
2976
2977
2978
2979 NullFields []string `json:"-"`
2980 }
2981
2982 func (s *PersistentDisk) MarshalJSON() ([]byte, error) {
2983 type NoMethod PersistentDisk
2984 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
2985 }
2986
2987
2988 type PersistentDiskDefaults struct {
2989
2990 AdditionalLabels map[string]string `json:"additionalLabels,omitempty"`
2991
2992 DiskName string `json:"diskName,omitempty"`
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002 DiskType string `json:"diskType,omitempty"`
3003
3004 Encryption *Encryption `json:"encryption,omitempty"`
3005
3006 SourceDiskNumber int64 `json:"sourceDiskNumber,omitempty"`
3007
3008
3009 VmAttachmentDetails *VmAttachmentDetails `json:"vmAttachmentDetails,omitempty"`
3010
3011
3012
3013
3014
3015 ForceSendFields []string `json:"-"`
3016
3017
3018
3019
3020 NullFields []string `json:"-"`
3021 }
3022
3023 func (s *PersistentDiskDefaults) MarshalJSON() ([]byte, error) {
3024 type NoMethod PersistentDiskDefaults
3025 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3026 }
3027
3028
3029 type PostProcessingStep struct {
3030 }
3031
3032
3033 type PreparingVMDisksStep struct {
3034 }
3035
3036
3037 type RemoveGroupMigrationRequest struct {
3038
3039 MigratingVm string `json:"migratingVm,omitempty"`
3040
3041
3042
3043
3044
3045 ForceSendFields []string `json:"-"`
3046
3047
3048
3049
3050 NullFields []string `json:"-"`
3051 }
3052
3053 func (s *RemoveGroupMigrationRequest) MarshalJSON() ([]byte, error) {
3054 type NoMethod RemoveGroupMigrationRequest
3055 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3056 }
3057
3058
3059 type ReplicatingStep struct {
3060
3061
3062 LastThirtyMinutesAverageBytesPerSecond int64 `json:"lastThirtyMinutesAverageBytesPerSecond,omitempty,string"`
3063
3064
3065 LastTwoMinutesAverageBytesPerSecond int64 `json:"lastTwoMinutesAverageBytesPerSecond,omitempty,string"`
3066
3067 ReplicatedBytes int64 `json:"replicatedBytes,omitempty,string"`
3068
3069 TotalBytes int64 `json:"totalBytes,omitempty,string"`
3070
3071
3072
3073
3074
3075
3076 ForceSendFields []string `json:"-"`
3077
3078
3079
3080
3081
3082 NullFields []string `json:"-"`
3083 }
3084
3085 func (s *ReplicatingStep) MarshalJSON() ([]byte, error) {
3086 type NoMethod ReplicatingStep
3087 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3088 }
3089
3090
3091
3092 type ReplicationCycle struct {
3093
3094 CycleNumber int64 `json:"cycleNumber,omitempty"`
3095
3096 EndTime string `json:"endTime,omitempty"`
3097
3098 Error *Status `json:"error,omitempty"`
3099
3100 Name string `json:"name,omitempty"`
3101
3102
3103
3104 ProgressPercent int64 `json:"progressPercent,omitempty"`
3105
3106 StartTime string `json:"startTime,omitempty"`
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116 State string `json:"state,omitempty"`
3117
3118 Steps []*CycleStep `json:"steps,omitempty"`
3119
3120
3121 TotalPauseDuration string `json:"totalPauseDuration,omitempty"`
3122
3123 Warnings []*MigrationWarning `json:"warnings,omitempty"`
3124
3125
3126 googleapi.ServerResponse `json:"-"`
3127
3128
3129
3130
3131
3132 ForceSendFields []string `json:"-"`
3133
3134
3135
3136
3137 NullFields []string `json:"-"`
3138 }
3139
3140 func (s *ReplicationCycle) MarshalJSON() ([]byte, error) {
3141 type NoMethod ReplicationCycle
3142 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3143 }
3144
3145
3146
3147 type ReplicationSync struct {
3148
3149
3150 LastSyncTime string `json:"lastSyncTime,omitempty"`
3151
3152
3153
3154
3155
3156 ForceSendFields []string `json:"-"`
3157
3158
3159
3160
3161 NullFields []string `json:"-"`
3162 }
3163
3164 func (s *ReplicationSync) MarshalJSON() ([]byte, error) {
3165 type NoMethod ReplicationSync
3166 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3167 }
3168
3169
3170 type ResumeMigrationRequest struct {
3171 }
3172
3173
3174 type SchedulePolicy struct {
3175
3176 IdleDuration string `json:"idleDuration,omitempty"`
3177
3178
3179
3180
3181 SkipOsAdaptation bool `json:"skipOsAdaptation,omitempty"`
3182
3183
3184
3185
3186
3187 ForceSendFields []string `json:"-"`
3188
3189
3190
3191
3192 NullFields []string `json:"-"`
3193 }
3194
3195 func (s *SchedulePolicy) MarshalJSON() ([]byte, error) {
3196 type NoMethod SchedulePolicy
3197 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3198 }
3199
3200
3201
3202
3203 type SchedulingNodeAffinity struct {
3204
3205 Key string `json:"key,omitempty"`
3206
3207
3208
3209
3210
3211
3212
3213
3214 Operator string `json:"operator,omitempty"`
3215
3216 Values []string `json:"values,omitempty"`
3217
3218
3219
3220
3221
3222 ForceSendFields []string `json:"-"`
3223
3224
3225
3226
3227 NullFields []string `json:"-"`
3228 }
3229
3230 func (s *SchedulingNodeAffinity) MarshalJSON() ([]byte, error) {
3231 type NoMethod SchedulingNodeAffinity
3232 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3233 }
3234
3235
3236
3237 type ShuttingDownSourceVMStep struct {
3238 }
3239
3240
3241
3242 type Source struct {
3243
3244 Aws *AwsSourceDetails `json:"aws,omitempty"`
3245
3246 Azure *AzureSourceDetails `json:"azure,omitempty"`
3247
3248 CreateTime string `json:"createTime,omitempty"`
3249
3250 Description string `json:"description,omitempty"`
3251
3252
3253 Encryption *Encryption `json:"encryption,omitempty"`
3254
3255 Labels map[string]string `json:"labels,omitempty"`
3256
3257 Name string `json:"name,omitempty"`
3258
3259 UpdateTime string `json:"updateTime,omitempty"`
3260
3261 Vmware *VmwareSourceDetails `json:"vmware,omitempty"`
3262
3263
3264 googleapi.ServerResponse `json:"-"`
3265
3266
3267
3268
3269
3270 ForceSendFields []string `json:"-"`
3271
3272
3273
3274
3275 NullFields []string `json:"-"`
3276 }
3277
3278 func (s *Source) MarshalJSON() ([]byte, error) {
3279 type NoMethod Source
3280 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3281 }
3282
3283
3284 type StartMigrationRequest struct {
3285 }
3286
3287
3288
3289
3290
3291
3292
3293 type Status struct {
3294
3295 Code int64 `json:"code,omitempty"`
3296
3297
3298 Details []googleapi.RawMessage `json:"details,omitempty"`
3299
3300
3301
3302 Message string `json:"message,omitempty"`
3303
3304
3305
3306
3307
3308 ForceSendFields []string `json:"-"`
3309
3310
3311
3312
3313 NullFields []string `json:"-"`
3314 }
3315
3316 func (s *Status) MarshalJSON() ([]byte, error) {
3317 type NoMethod Status
3318 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3319 }
3320
3321
3322 type Tag struct {
3323
3324 Key string `json:"key,omitempty"`
3325
3326 Value string `json:"value,omitempty"`
3327
3328
3329
3330
3331
3332 ForceSendFields []string `json:"-"`
3333
3334
3335
3336
3337 NullFields []string `json:"-"`
3338 }
3339
3340 func (s *Tag) MarshalJSON() ([]byte, error) {
3341 type NoMethod Tag
3342 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3343 }
3344
3345
3346
3347 type TargetProject struct {
3348
3349
3350 CreateTime string `json:"createTime,omitempty"`
3351
3352 Description string `json:"description,omitempty"`
3353
3354 Name string `json:"name,omitempty"`
3355
3356 Project string `json:"project,omitempty"`
3357
3358
3359 UpdateTime string `json:"updateTime,omitempty"`
3360
3361
3362 googleapi.ServerResponse `json:"-"`
3363
3364
3365
3366
3367
3368 ForceSendFields []string `json:"-"`
3369
3370
3371
3372
3373 NullFields []string `json:"-"`
3374 }
3375
3376 func (s *TargetProject) MarshalJSON() ([]byte, error) {
3377 type NoMethod TargetProject
3378 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3379 }
3380
3381
3382 type UpgradeApplianceRequest struct {
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394 RequestId string `json:"requestId,omitempty"`
3395
3396
3397
3398
3399
3400 ForceSendFields []string `json:"-"`
3401
3402
3403
3404
3405 NullFields []string `json:"-"`
3406 }
3407
3408 func (s *UpgradeApplianceRequest) MarshalJSON() ([]byte, error) {
3409 type NoMethod UpgradeApplianceRequest
3410 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3411 }
3412
3413
3414
3415 type UpgradeStatus struct {
3416
3417
3418 Error *Status `json:"error,omitempty"`
3419
3420 PreviousVersion string `json:"previousVersion,omitempty"`
3421
3422 StartTime string `json:"startTime,omitempty"`
3423
3424
3425
3426
3427
3428
3429
3430 State string `json:"state,omitempty"`
3431
3432 Version string `json:"version,omitempty"`
3433
3434
3435
3436
3437
3438 ForceSendFields []string `json:"-"`
3439
3440
3441
3442
3443 NullFields []string `json:"-"`
3444 }
3445
3446 func (s *UpgradeStatus) MarshalJSON() ([]byte, error) {
3447 type NoMethod UpgradeStatus
3448 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3449 }
3450
3451
3452
3453 type UtilizationReport struct {
3454
3455
3456 CreateTime string `json:"createTime,omitempty"`
3457
3458 DisplayName string `json:"displayName,omitempty"`
3459
3460
3461 Error *Status `json:"error,omitempty"`
3462
3463
3464
3465
3466 FrameEndTime string `json:"frameEndTime,omitempty"`
3467
3468 Name string `json:"name,omitempty"`
3469
3470
3471
3472
3473
3474
3475
3476 State string `json:"state,omitempty"`
3477
3478 StateTime string `json:"stateTime,omitempty"`
3479
3480
3481
3482
3483
3484
3485
3486
3487 TimeFrame string `json:"timeFrame,omitempty"`
3488
3489 VmCount int64 `json:"vmCount,omitempty"`
3490
3491
3492
3493 Vms []*VmUtilizationInfo `json:"vms,omitempty"`
3494
3495
3496 googleapi.ServerResponse `json:"-"`
3497
3498
3499
3500
3501
3502 ForceSendFields []string `json:"-"`
3503
3504
3505
3506
3507 NullFields []string `json:"-"`
3508 }
3509
3510 func (s *UtilizationReport) MarshalJSON() ([]byte, error) {
3511 type NoMethod UtilizationReport
3512 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3513 }
3514
3515
3516 type VmAttachmentDetails struct {
3517
3518
3519
3520
3521
3522
3523 DeviceName string `json:"deviceName,omitempty"`
3524
3525
3526
3527
3528
3529 ForceSendFields []string `json:"-"`
3530
3531
3532
3533
3534 NullFields []string `json:"-"`
3535 }
3536
3537 func (s *VmAttachmentDetails) MarshalJSON() ([]byte, error) {
3538 type NoMethod VmAttachmentDetails
3539 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3540 }
3541
3542
3543
3544 type VmCapabilities struct {
3545
3546
3547 LastOsCapabilitiesUpdateTime string `json:"lastOsCapabilitiesUpdateTime,omitempty"`
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558 OsCapabilities []string `json:"osCapabilities,omitempty"`
3559
3560
3561
3562
3563
3564 ForceSendFields []string `json:"-"`
3565
3566
3567
3568
3569 NullFields []string `json:"-"`
3570 }
3571
3572 func (s *VmCapabilities) MarshalJSON() ([]byte, error) {
3573 type NoMethod VmCapabilities
3574 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3575 }
3576
3577
3578 type VmUtilizationInfo struct {
3579
3580 Utilization *VmUtilizationMetrics `json:"utilization,omitempty"`
3581
3582 VmId string `json:"vmId,omitempty"`
3583
3584 VmwareVmDetails *VmwareVmDetails `json:"vmwareVmDetails,omitempty"`
3585
3586
3587
3588
3589
3590 ForceSendFields []string `json:"-"`
3591
3592
3593
3594
3595 NullFields []string `json:"-"`
3596 }
3597
3598 func (s *VmUtilizationInfo) MarshalJSON() ([]byte, error) {
3599 type NoMethod VmUtilizationInfo
3600 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3601 }
3602
3603
3604 type VmUtilizationMetrics struct {
3605
3606 CpuAveragePercent int64 `json:"cpuAveragePercent,omitempty"`
3607
3608 CpuMaxPercent int64 `json:"cpuMaxPercent,omitempty"`
3609
3610 DiskIoRateAverageKbps int64 `json:"diskIoRateAverageKbps,omitempty,string"`
3611
3612 DiskIoRateMaxKbps int64 `json:"diskIoRateMaxKbps,omitempty,string"`
3613
3614 MemoryAveragePercent int64 `json:"memoryAveragePercent,omitempty"`
3615
3616 MemoryMaxPercent int64 `json:"memoryMaxPercent,omitempty"`
3617
3618
3619 NetworkThroughputAverageKbps int64 `json:"networkThroughputAverageKbps,omitempty,string"`
3620
3621
3622 NetworkThroughputMaxKbps int64 `json:"networkThroughputMaxKbps,omitempty,string"`
3623
3624
3625
3626
3627
3628 ForceSendFields []string `json:"-"`
3629
3630
3631
3632
3633 NullFields []string `json:"-"`
3634 }
3635
3636 func (s *VmUtilizationMetrics) MarshalJSON() ([]byte, error) {
3637 type NoMethod VmUtilizationMetrics
3638 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3639 }
3640
3641
3642 type VmwareDiskDetails struct {
3643
3644 DiskNumber int64 `json:"diskNumber,omitempty"`
3645
3646 Label string `json:"label,omitempty"`
3647
3648 SizeGb int64 `json:"sizeGb,omitempty,string"`
3649
3650
3651
3652
3653
3654 ForceSendFields []string `json:"-"`
3655
3656
3657
3658
3659 NullFields []string `json:"-"`
3660 }
3661
3662 func (s *VmwareDiskDetails) MarshalJSON() ([]byte, error) {
3663 type NoMethod VmwareDiskDetails
3664 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3665 }
3666
3667
3668
3669 type VmwareSourceDetails struct {
3670
3671
3672 Password string `json:"password,omitempty"`
3673
3674 ResolvedVcenterHost string `json:"resolvedVcenterHost,omitempty"`
3675
3676 Thumbprint string `json:"thumbprint,omitempty"`
3677
3678 Username string `json:"username,omitempty"`
3679
3680 VcenterIp string `json:"vcenterIp,omitempty"`
3681
3682
3683
3684
3685
3686 ForceSendFields []string `json:"-"`
3687
3688
3689
3690
3691 NullFields []string `json:"-"`
3692 }
3693
3694 func (s *VmwareSourceDetails) MarshalJSON() ([]byte, error) {
3695 type NoMethod VmwareSourceDetails
3696 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3697 }
3698
3699
3700 type VmwareSourceVmDetails struct {
3701
3702 CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"`
3703
3704 Disks []*VmwareDiskDetails `json:"disks,omitempty"`
3705
3706
3707
3708
3709
3710
3711 Firmware string `json:"firmware,omitempty"`
3712
3713
3714 VmCapabilitiesInfo *VmCapabilities `json:"vmCapabilitiesInfo,omitempty"`
3715
3716
3717
3718
3719
3720 ForceSendFields []string `json:"-"`
3721
3722
3723
3724
3725 NullFields []string `json:"-"`
3726 }
3727
3728 func (s *VmwareSourceVmDetails) MarshalJSON() ([]byte, error) {
3729 type NoMethod VmwareSourceVmDetails
3730 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3731 }
3732
3733
3734 type VmwareVmDetails struct {
3735
3736
3737
3738
3739
3740
3741 BootOption string `json:"bootOption,omitempty"`
3742
3743 CommittedStorageMb int64 `json:"committedStorageMb,omitempty,string"`
3744
3745 CpuCount int64 `json:"cpuCount,omitempty"`
3746
3747
3748 DatacenterDescription string `json:"datacenterDescription,omitempty"`
3749
3750 DatacenterId string `json:"datacenterId,omitempty"`
3751
3752 DiskCount int64 `json:"diskCount,omitempty"`
3753
3754
3755 DisplayName string `json:"displayName,omitempty"`
3756
3757
3758
3759 GuestDescription string `json:"guestDescription,omitempty"`
3760
3761 MemoryMb int64 `json:"memoryMb,omitempty"`
3762
3763
3764
3765
3766
3767
3768
3769
3770 PowerState string `json:"powerState,omitempty"`
3771
3772 Uuid string `json:"uuid,omitempty"`
3773
3774
3775 VmId string `json:"vmId,omitempty"`
3776
3777
3778
3779
3780
3781 ForceSendFields []string `json:"-"`
3782
3783
3784
3785
3786 NullFields []string `json:"-"`
3787 }
3788
3789 func (s *VmwareVmDetails) MarshalJSON() ([]byte, error) {
3790 type NoMethod VmwareVmDetails
3791 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3792 }
3793
3794
3795 type VmwareVmsDetails struct {
3796
3797 Details []*VmwareVmDetails `json:"details,omitempty"`
3798
3799
3800
3801
3802
3803 ForceSendFields []string `json:"-"`
3804
3805
3806
3807
3808 NullFields []string `json:"-"`
3809 }
3810
3811 func (s *VmwareVmsDetails) MarshalJSON() ([]byte, error) {
3812 type NoMethod VmwareVmsDetails
3813 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
3814 }
3815
3816 type ProjectsLocationsGetCall struct {
3817 s *Service
3818 name string
3819 urlParams_ gensupport.URLParams
3820 ifNoneMatch_ string
3821 ctx_ context.Context
3822 header_ http.Header
3823 }
3824
3825
3826
3827
3828 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
3829 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3830 c.name = name
3831 return c
3832 }
3833
3834
3835
3836
3837 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
3838 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3839 return c
3840 }
3841
3842
3843
3844
3845 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
3846 c.ifNoneMatch_ = entityTag
3847 return c
3848 }
3849
3850
3851 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
3852 c.ctx_ = ctx
3853 return c
3854 }
3855
3856
3857
3858 func (c *ProjectsLocationsGetCall) Header() http.Header {
3859 if c.header_ == nil {
3860 c.header_ = make(http.Header)
3861 }
3862 return c.header_
3863 }
3864
3865 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
3866 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3867 if c.ifNoneMatch_ != "" {
3868 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3869 }
3870 var body io.Reader = nil
3871 c.urlParams_.Set("alt", alt)
3872 c.urlParams_.Set("prettyPrint", "false")
3873 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3874 urls += "?" + c.urlParams_.Encode()
3875 req, err := http.NewRequest("GET", urls, body)
3876 if err != nil {
3877 return nil, err
3878 }
3879 req.Header = reqHeaders
3880 googleapi.Expand(req.URL, map[string]string{
3881 "name": c.name,
3882 })
3883 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3884 }
3885
3886
3887
3888
3889
3890
3891 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
3892 gensupport.SetOptions(c.urlParams_, opts...)
3893 res, err := c.doRequest("json")
3894 if res != nil && res.StatusCode == http.StatusNotModified {
3895 if res.Body != nil {
3896 res.Body.Close()
3897 }
3898 return nil, gensupport.WrapError(&googleapi.Error{
3899 Code: res.StatusCode,
3900 Header: res.Header,
3901 })
3902 }
3903 if err != nil {
3904 return nil, err
3905 }
3906 defer googleapi.CloseBody(res)
3907 if err := googleapi.CheckResponse(res); err != nil {
3908 return nil, gensupport.WrapError(err)
3909 }
3910 ret := &Location{
3911 ServerResponse: googleapi.ServerResponse{
3912 Header: res.Header,
3913 HTTPStatusCode: res.StatusCode,
3914 },
3915 }
3916 target := &ret
3917 if err := gensupport.DecodeResponse(target, res); err != nil {
3918 return nil, err
3919 }
3920 return ret, nil
3921 }
3922
3923 type ProjectsLocationsListCall struct {
3924 s *Service
3925 name string
3926 urlParams_ gensupport.URLParams
3927 ifNoneMatch_ string
3928 ctx_ context.Context
3929 header_ http.Header
3930 }
3931
3932
3933
3934
3935 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
3936 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3937 c.name = name
3938 return c
3939 }
3940
3941
3942
3943
3944
3945 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
3946 c.urlParams_.Set("filter", filter)
3947 return c
3948 }
3949
3950
3951
3952 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
3953 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3954 return c
3955 }
3956
3957
3958
3959
3960 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
3961 c.urlParams_.Set("pageToken", pageToken)
3962 return c
3963 }
3964
3965
3966
3967
3968 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
3969 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3970 return c
3971 }
3972
3973
3974
3975
3976 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
3977 c.ifNoneMatch_ = entityTag
3978 return c
3979 }
3980
3981
3982 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
3983 c.ctx_ = ctx
3984 return c
3985 }
3986
3987
3988
3989 func (c *ProjectsLocationsListCall) Header() http.Header {
3990 if c.header_ == nil {
3991 c.header_ = make(http.Header)
3992 }
3993 return c.header_
3994 }
3995
3996 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
3997 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3998 if c.ifNoneMatch_ != "" {
3999 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4000 }
4001 var body io.Reader = nil
4002 c.urlParams_.Set("alt", alt)
4003 c.urlParams_.Set("prettyPrint", "false")
4004 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
4005 urls += "?" + c.urlParams_.Encode()
4006 req, err := http.NewRequest("GET", urls, body)
4007 if err != nil {
4008 return nil, err
4009 }
4010 req.Header = reqHeaders
4011 googleapi.Expand(req.URL, map[string]string{
4012 "name": c.name,
4013 })
4014 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4015 }
4016
4017
4018
4019
4020
4021
4022
4023 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
4024 gensupport.SetOptions(c.urlParams_, opts...)
4025 res, err := c.doRequest("json")
4026 if res != nil && res.StatusCode == http.StatusNotModified {
4027 if res.Body != nil {
4028 res.Body.Close()
4029 }
4030 return nil, gensupport.WrapError(&googleapi.Error{
4031 Code: res.StatusCode,
4032 Header: res.Header,
4033 })
4034 }
4035 if err != nil {
4036 return nil, err
4037 }
4038 defer googleapi.CloseBody(res)
4039 if err := googleapi.CheckResponse(res); err != nil {
4040 return nil, gensupport.WrapError(err)
4041 }
4042 ret := &ListLocationsResponse{
4043 ServerResponse: googleapi.ServerResponse{
4044 Header: res.Header,
4045 HTTPStatusCode: res.StatusCode,
4046 },
4047 }
4048 target := &ret
4049 if err := gensupport.DecodeResponse(target, res); err != nil {
4050 return nil, err
4051 }
4052 return ret, nil
4053 }
4054
4055
4056
4057
4058 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
4059 c.ctx_ = ctx
4060 defer c.PageToken(c.urlParams_.Get("pageToken"))
4061 for {
4062 x, err := c.Do()
4063 if err != nil {
4064 return err
4065 }
4066 if err := f(x); err != nil {
4067 return err
4068 }
4069 if x.NextPageToken == "" {
4070 return nil
4071 }
4072 c.PageToken(x.NextPageToken)
4073 }
4074 }
4075
4076 type ProjectsLocationsGroupsAddGroupMigrationCall struct {
4077 s *Service
4078 group string
4079 addgroupmigrationrequest *AddGroupMigrationRequest
4080 urlParams_ gensupport.URLParams
4081 ctx_ context.Context
4082 header_ http.Header
4083 }
4084
4085
4086
4087
4088 func (r *ProjectsLocationsGroupsService) AddGroupMigration(group string, addgroupmigrationrequest *AddGroupMigrationRequest) *ProjectsLocationsGroupsAddGroupMigrationCall {
4089 c := &ProjectsLocationsGroupsAddGroupMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4090 c.group = group
4091 c.addgroupmigrationrequest = addgroupmigrationrequest
4092 return c
4093 }
4094
4095
4096
4097
4098 func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsAddGroupMigrationCall {
4099 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4100 return c
4101 }
4102
4103
4104 func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Context(ctx context.Context) *ProjectsLocationsGroupsAddGroupMigrationCall {
4105 c.ctx_ = ctx
4106 return c
4107 }
4108
4109
4110
4111 func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Header() http.Header {
4112 if c.header_ == nil {
4113 c.header_ = make(http.Header)
4114 }
4115 return c.header_
4116 }
4117
4118 func (c *ProjectsLocationsGroupsAddGroupMigrationCall) doRequest(alt string) (*http.Response, error) {
4119 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4120 var body io.Reader = nil
4121 body, err := googleapi.WithoutDataWrapper.JSONReader(c.addgroupmigrationrequest)
4122 if err != nil {
4123 return nil, err
4124 }
4125 c.urlParams_.Set("alt", alt)
4126 c.urlParams_.Set("prettyPrint", "false")
4127 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+group}:addGroupMigration")
4128 urls += "?" + c.urlParams_.Encode()
4129 req, err := http.NewRequest("POST", urls, body)
4130 if err != nil {
4131 return nil, err
4132 }
4133 req.Header = reqHeaders
4134 googleapi.Expand(req.URL, map[string]string{
4135 "group": c.group,
4136 })
4137 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4138 }
4139
4140
4141
4142
4143
4144
4145 func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4146 gensupport.SetOptions(c.urlParams_, opts...)
4147 res, err := c.doRequest("json")
4148 if res != nil && res.StatusCode == http.StatusNotModified {
4149 if res.Body != nil {
4150 res.Body.Close()
4151 }
4152 return nil, gensupport.WrapError(&googleapi.Error{
4153 Code: res.StatusCode,
4154 Header: res.Header,
4155 })
4156 }
4157 if err != nil {
4158 return nil, err
4159 }
4160 defer googleapi.CloseBody(res)
4161 if err := googleapi.CheckResponse(res); err != nil {
4162 return nil, gensupport.WrapError(err)
4163 }
4164 ret := &Operation{
4165 ServerResponse: googleapi.ServerResponse{
4166 Header: res.Header,
4167 HTTPStatusCode: res.StatusCode,
4168 },
4169 }
4170 target := &ret
4171 if err := gensupport.DecodeResponse(target, res); err != nil {
4172 return nil, err
4173 }
4174 return ret, nil
4175 }
4176
4177 type ProjectsLocationsGroupsCreateCall struct {
4178 s *Service
4179 parent string
4180 group *Group
4181 urlParams_ gensupport.URLParams
4182 ctx_ context.Context
4183 header_ http.Header
4184 }
4185
4186
4187
4188
4189 func (r *ProjectsLocationsGroupsService) Create(parent string, group *Group) *ProjectsLocationsGroupsCreateCall {
4190 c := &ProjectsLocationsGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4191 c.parent = parent
4192 c.group = group
4193 return c
4194 }
4195
4196
4197
4198 func (c *ProjectsLocationsGroupsCreateCall) GroupId(groupId string) *ProjectsLocationsGroupsCreateCall {
4199 c.urlParams_.Set("groupId", groupId)
4200 return c
4201 }
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214 func (c *ProjectsLocationsGroupsCreateCall) RequestId(requestId string) *ProjectsLocationsGroupsCreateCall {
4215 c.urlParams_.Set("requestId", requestId)
4216 return c
4217 }
4218
4219
4220
4221
4222 func (c *ProjectsLocationsGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsCreateCall {
4223 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4224 return c
4225 }
4226
4227
4228 func (c *ProjectsLocationsGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsGroupsCreateCall {
4229 c.ctx_ = ctx
4230 return c
4231 }
4232
4233
4234
4235 func (c *ProjectsLocationsGroupsCreateCall) Header() http.Header {
4236 if c.header_ == nil {
4237 c.header_ = make(http.Header)
4238 }
4239 return c.header_
4240 }
4241
4242 func (c *ProjectsLocationsGroupsCreateCall) doRequest(alt string) (*http.Response, error) {
4243 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4244 var body io.Reader = nil
4245 body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
4246 if err != nil {
4247 return nil, err
4248 }
4249 c.urlParams_.Set("alt", alt)
4250 c.urlParams_.Set("prettyPrint", "false")
4251 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/groups")
4252 urls += "?" + c.urlParams_.Encode()
4253 req, err := http.NewRequest("POST", urls, body)
4254 if err != nil {
4255 return nil, err
4256 }
4257 req.Header = reqHeaders
4258 googleapi.Expand(req.URL, map[string]string{
4259 "parent": c.parent,
4260 })
4261 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4262 }
4263
4264
4265
4266
4267
4268
4269 func (c *ProjectsLocationsGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4270 gensupport.SetOptions(c.urlParams_, opts...)
4271 res, err := c.doRequest("json")
4272 if res != nil && res.StatusCode == http.StatusNotModified {
4273 if res.Body != nil {
4274 res.Body.Close()
4275 }
4276 return nil, gensupport.WrapError(&googleapi.Error{
4277 Code: res.StatusCode,
4278 Header: res.Header,
4279 })
4280 }
4281 if err != nil {
4282 return nil, err
4283 }
4284 defer googleapi.CloseBody(res)
4285 if err := googleapi.CheckResponse(res); err != nil {
4286 return nil, gensupport.WrapError(err)
4287 }
4288 ret := &Operation{
4289 ServerResponse: googleapi.ServerResponse{
4290 Header: res.Header,
4291 HTTPStatusCode: res.StatusCode,
4292 },
4293 }
4294 target := &ret
4295 if err := gensupport.DecodeResponse(target, res); err != nil {
4296 return nil, err
4297 }
4298 return ret, nil
4299 }
4300
4301 type ProjectsLocationsGroupsDeleteCall struct {
4302 s *Service
4303 name string
4304 urlParams_ gensupport.URLParams
4305 ctx_ context.Context
4306 header_ http.Header
4307 }
4308
4309
4310
4311
4312 func (r *ProjectsLocationsGroupsService) Delete(name string) *ProjectsLocationsGroupsDeleteCall {
4313 c := &ProjectsLocationsGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4314 c.name = name
4315 return c
4316 }
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329 func (c *ProjectsLocationsGroupsDeleteCall) RequestId(requestId string) *ProjectsLocationsGroupsDeleteCall {
4330 c.urlParams_.Set("requestId", requestId)
4331 return c
4332 }
4333
4334
4335
4336
4337 func (c *ProjectsLocationsGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsDeleteCall {
4338 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4339 return c
4340 }
4341
4342
4343 func (c *ProjectsLocationsGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGroupsDeleteCall {
4344 c.ctx_ = ctx
4345 return c
4346 }
4347
4348
4349
4350 func (c *ProjectsLocationsGroupsDeleteCall) Header() http.Header {
4351 if c.header_ == nil {
4352 c.header_ = make(http.Header)
4353 }
4354 return c.header_
4355 }
4356
4357 func (c *ProjectsLocationsGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
4358 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4359 var body io.Reader = nil
4360 c.urlParams_.Set("alt", alt)
4361 c.urlParams_.Set("prettyPrint", "false")
4362 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4363 urls += "?" + c.urlParams_.Encode()
4364 req, err := http.NewRequest("DELETE", urls, body)
4365 if err != nil {
4366 return nil, err
4367 }
4368 req.Header = reqHeaders
4369 googleapi.Expand(req.URL, map[string]string{
4370 "name": c.name,
4371 })
4372 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4373 }
4374
4375
4376
4377
4378
4379
4380 func (c *ProjectsLocationsGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4381 gensupport.SetOptions(c.urlParams_, opts...)
4382 res, err := c.doRequest("json")
4383 if res != nil && res.StatusCode == http.StatusNotModified {
4384 if res.Body != nil {
4385 res.Body.Close()
4386 }
4387 return nil, gensupport.WrapError(&googleapi.Error{
4388 Code: res.StatusCode,
4389 Header: res.Header,
4390 })
4391 }
4392 if err != nil {
4393 return nil, err
4394 }
4395 defer googleapi.CloseBody(res)
4396 if err := googleapi.CheckResponse(res); err != nil {
4397 return nil, gensupport.WrapError(err)
4398 }
4399 ret := &Operation{
4400 ServerResponse: googleapi.ServerResponse{
4401 Header: res.Header,
4402 HTTPStatusCode: res.StatusCode,
4403 },
4404 }
4405 target := &ret
4406 if err := gensupport.DecodeResponse(target, res); err != nil {
4407 return nil, err
4408 }
4409 return ret, nil
4410 }
4411
4412 type ProjectsLocationsGroupsGetCall struct {
4413 s *Service
4414 name string
4415 urlParams_ gensupport.URLParams
4416 ifNoneMatch_ string
4417 ctx_ context.Context
4418 header_ http.Header
4419 }
4420
4421
4422
4423
4424 func (r *ProjectsLocationsGroupsService) Get(name string) *ProjectsLocationsGroupsGetCall {
4425 c := &ProjectsLocationsGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4426 c.name = name
4427 return c
4428 }
4429
4430
4431
4432
4433 func (c *ProjectsLocationsGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsGetCall {
4434 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4435 return c
4436 }
4437
4438
4439
4440
4441 func (c *ProjectsLocationsGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGroupsGetCall {
4442 c.ifNoneMatch_ = entityTag
4443 return c
4444 }
4445
4446
4447 func (c *ProjectsLocationsGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsGroupsGetCall {
4448 c.ctx_ = ctx
4449 return c
4450 }
4451
4452
4453
4454 func (c *ProjectsLocationsGroupsGetCall) Header() http.Header {
4455 if c.header_ == nil {
4456 c.header_ = make(http.Header)
4457 }
4458 return c.header_
4459 }
4460
4461 func (c *ProjectsLocationsGroupsGetCall) doRequest(alt string) (*http.Response, error) {
4462 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4463 if c.ifNoneMatch_ != "" {
4464 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4465 }
4466 var body io.Reader = nil
4467 c.urlParams_.Set("alt", alt)
4468 c.urlParams_.Set("prettyPrint", "false")
4469 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4470 urls += "?" + c.urlParams_.Encode()
4471 req, err := http.NewRequest("GET", urls, body)
4472 if err != nil {
4473 return nil, err
4474 }
4475 req.Header = reqHeaders
4476 googleapi.Expand(req.URL, map[string]string{
4477 "name": c.name,
4478 })
4479 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4480 }
4481
4482
4483
4484
4485
4486
4487 func (c *ProjectsLocationsGroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) {
4488 gensupport.SetOptions(c.urlParams_, opts...)
4489 res, err := c.doRequest("json")
4490 if res != nil && res.StatusCode == http.StatusNotModified {
4491 if res.Body != nil {
4492 res.Body.Close()
4493 }
4494 return nil, gensupport.WrapError(&googleapi.Error{
4495 Code: res.StatusCode,
4496 Header: res.Header,
4497 })
4498 }
4499 if err != nil {
4500 return nil, err
4501 }
4502 defer googleapi.CloseBody(res)
4503 if err := googleapi.CheckResponse(res); err != nil {
4504 return nil, gensupport.WrapError(err)
4505 }
4506 ret := &Group{
4507 ServerResponse: googleapi.ServerResponse{
4508 Header: res.Header,
4509 HTTPStatusCode: res.StatusCode,
4510 },
4511 }
4512 target := &ret
4513 if err := gensupport.DecodeResponse(target, res); err != nil {
4514 return nil, err
4515 }
4516 return ret, nil
4517 }
4518
4519 type ProjectsLocationsGroupsListCall struct {
4520 s *Service
4521 parent string
4522 urlParams_ gensupport.URLParams
4523 ifNoneMatch_ string
4524 ctx_ context.Context
4525 header_ http.Header
4526 }
4527
4528
4529
4530
4531 func (r *ProjectsLocationsGroupsService) List(parent string) *ProjectsLocationsGroupsListCall {
4532 c := &ProjectsLocationsGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4533 c.parent = parent
4534 return c
4535 }
4536
4537
4538 func (c *ProjectsLocationsGroupsListCall) Filter(filter string) *ProjectsLocationsGroupsListCall {
4539 c.urlParams_.Set("filter", filter)
4540 return c
4541 }
4542
4543
4544
4545 func (c *ProjectsLocationsGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsGroupsListCall {
4546 c.urlParams_.Set("orderBy", orderBy)
4547 return c
4548 }
4549
4550
4551
4552
4553
4554 func (c *ProjectsLocationsGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsGroupsListCall {
4555 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4556 return c
4557 }
4558
4559
4560
4561
4562
4563 func (c *ProjectsLocationsGroupsListCall) PageToken(pageToken string) *ProjectsLocationsGroupsListCall {
4564 c.urlParams_.Set("pageToken", pageToken)
4565 return c
4566 }
4567
4568
4569
4570
4571 func (c *ProjectsLocationsGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsListCall {
4572 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4573 return c
4574 }
4575
4576
4577
4578
4579 func (c *ProjectsLocationsGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGroupsListCall {
4580 c.ifNoneMatch_ = entityTag
4581 return c
4582 }
4583
4584
4585 func (c *ProjectsLocationsGroupsListCall) Context(ctx context.Context) *ProjectsLocationsGroupsListCall {
4586 c.ctx_ = ctx
4587 return c
4588 }
4589
4590
4591
4592 func (c *ProjectsLocationsGroupsListCall) Header() http.Header {
4593 if c.header_ == nil {
4594 c.header_ = make(http.Header)
4595 }
4596 return c.header_
4597 }
4598
4599 func (c *ProjectsLocationsGroupsListCall) doRequest(alt string) (*http.Response, error) {
4600 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4601 if c.ifNoneMatch_ != "" {
4602 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4603 }
4604 var body io.Reader = nil
4605 c.urlParams_.Set("alt", alt)
4606 c.urlParams_.Set("prettyPrint", "false")
4607 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/groups")
4608 urls += "?" + c.urlParams_.Encode()
4609 req, err := http.NewRequest("GET", urls, body)
4610 if err != nil {
4611 return nil, err
4612 }
4613 req.Header = reqHeaders
4614 googleapi.Expand(req.URL, map[string]string{
4615 "parent": c.parent,
4616 })
4617 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4618 }
4619
4620
4621
4622
4623
4624
4625
4626 func (c *ProjectsLocationsGroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsResponse, error) {
4627 gensupport.SetOptions(c.urlParams_, opts...)
4628 res, err := c.doRequest("json")
4629 if res != nil && res.StatusCode == http.StatusNotModified {
4630 if res.Body != nil {
4631 res.Body.Close()
4632 }
4633 return nil, gensupport.WrapError(&googleapi.Error{
4634 Code: res.StatusCode,
4635 Header: res.Header,
4636 })
4637 }
4638 if err != nil {
4639 return nil, err
4640 }
4641 defer googleapi.CloseBody(res)
4642 if err := googleapi.CheckResponse(res); err != nil {
4643 return nil, gensupport.WrapError(err)
4644 }
4645 ret := &ListGroupsResponse{
4646 ServerResponse: googleapi.ServerResponse{
4647 Header: res.Header,
4648 HTTPStatusCode: res.StatusCode,
4649 },
4650 }
4651 target := &ret
4652 if err := gensupport.DecodeResponse(target, res); err != nil {
4653 return nil, err
4654 }
4655 return ret, nil
4656 }
4657
4658
4659
4660
4661 func (c *ProjectsLocationsGroupsListCall) Pages(ctx context.Context, f func(*ListGroupsResponse) error) error {
4662 c.ctx_ = ctx
4663 defer c.PageToken(c.urlParams_.Get("pageToken"))
4664 for {
4665 x, err := c.Do()
4666 if err != nil {
4667 return err
4668 }
4669 if err := f(x); err != nil {
4670 return err
4671 }
4672 if x.NextPageToken == "" {
4673 return nil
4674 }
4675 c.PageToken(x.NextPageToken)
4676 }
4677 }
4678
4679 type ProjectsLocationsGroupsPatchCall struct {
4680 s *Service
4681 name string
4682 group *Group
4683 urlParams_ gensupport.URLParams
4684 ctx_ context.Context
4685 header_ http.Header
4686 }
4687
4688
4689
4690
4691 func (r *ProjectsLocationsGroupsService) Patch(name string, group *Group) *ProjectsLocationsGroupsPatchCall {
4692 c := &ProjectsLocationsGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4693 c.name = name
4694 c.group = group
4695 return c
4696 }
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709 func (c *ProjectsLocationsGroupsPatchCall) RequestId(requestId string) *ProjectsLocationsGroupsPatchCall {
4710 c.urlParams_.Set("requestId", requestId)
4711 return c
4712 }
4713
4714
4715
4716
4717
4718
4719 func (c *ProjectsLocationsGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGroupsPatchCall {
4720 c.urlParams_.Set("updateMask", updateMask)
4721 return c
4722 }
4723
4724
4725
4726
4727 func (c *ProjectsLocationsGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsPatchCall {
4728 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4729 return c
4730 }
4731
4732
4733 func (c *ProjectsLocationsGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsGroupsPatchCall {
4734 c.ctx_ = ctx
4735 return c
4736 }
4737
4738
4739
4740 func (c *ProjectsLocationsGroupsPatchCall) Header() http.Header {
4741 if c.header_ == nil {
4742 c.header_ = make(http.Header)
4743 }
4744 return c.header_
4745 }
4746
4747 func (c *ProjectsLocationsGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
4748 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4749 var body io.Reader = nil
4750 body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
4751 if err != nil {
4752 return nil, err
4753 }
4754 c.urlParams_.Set("alt", alt)
4755 c.urlParams_.Set("prettyPrint", "false")
4756 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4757 urls += "?" + c.urlParams_.Encode()
4758 req, err := http.NewRequest("PATCH", urls, body)
4759 if err != nil {
4760 return nil, err
4761 }
4762 req.Header = reqHeaders
4763 googleapi.Expand(req.URL, map[string]string{
4764 "name": c.name,
4765 })
4766 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4767 }
4768
4769
4770
4771
4772
4773
4774 func (c *ProjectsLocationsGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4775 gensupport.SetOptions(c.urlParams_, opts...)
4776 res, err := c.doRequest("json")
4777 if res != nil && res.StatusCode == http.StatusNotModified {
4778 if res.Body != nil {
4779 res.Body.Close()
4780 }
4781 return nil, gensupport.WrapError(&googleapi.Error{
4782 Code: res.StatusCode,
4783 Header: res.Header,
4784 })
4785 }
4786 if err != nil {
4787 return nil, err
4788 }
4789 defer googleapi.CloseBody(res)
4790 if err := googleapi.CheckResponse(res); err != nil {
4791 return nil, gensupport.WrapError(err)
4792 }
4793 ret := &Operation{
4794 ServerResponse: googleapi.ServerResponse{
4795 Header: res.Header,
4796 HTTPStatusCode: res.StatusCode,
4797 },
4798 }
4799 target := &ret
4800 if err := gensupport.DecodeResponse(target, res); err != nil {
4801 return nil, err
4802 }
4803 return ret, nil
4804 }
4805
4806 type ProjectsLocationsGroupsRemoveGroupMigrationCall struct {
4807 s *Service
4808 group string
4809 removegroupmigrationrequest *RemoveGroupMigrationRequest
4810 urlParams_ gensupport.URLParams
4811 ctx_ context.Context
4812 header_ http.Header
4813 }
4814
4815
4816
4817
4818 func (r *ProjectsLocationsGroupsService) RemoveGroupMigration(group string, removegroupmigrationrequest *RemoveGroupMigrationRequest) *ProjectsLocationsGroupsRemoveGroupMigrationCall {
4819 c := &ProjectsLocationsGroupsRemoveGroupMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4820 c.group = group
4821 c.removegroupmigrationrequest = removegroupmigrationrequest
4822 return c
4823 }
4824
4825
4826
4827
4828 func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsRemoveGroupMigrationCall {
4829 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4830 return c
4831 }
4832
4833
4834 func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Context(ctx context.Context) *ProjectsLocationsGroupsRemoveGroupMigrationCall {
4835 c.ctx_ = ctx
4836 return c
4837 }
4838
4839
4840
4841 func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Header() http.Header {
4842 if c.header_ == nil {
4843 c.header_ = make(http.Header)
4844 }
4845 return c.header_
4846 }
4847
4848 func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) doRequest(alt string) (*http.Response, error) {
4849 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4850 var body io.Reader = nil
4851 body, err := googleapi.WithoutDataWrapper.JSONReader(c.removegroupmigrationrequest)
4852 if err != nil {
4853 return nil, err
4854 }
4855 c.urlParams_.Set("alt", alt)
4856 c.urlParams_.Set("prettyPrint", "false")
4857 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+group}:removeGroupMigration")
4858 urls += "?" + c.urlParams_.Encode()
4859 req, err := http.NewRequest("POST", urls, body)
4860 if err != nil {
4861 return nil, err
4862 }
4863 req.Header = reqHeaders
4864 googleapi.Expand(req.URL, map[string]string{
4865 "group": c.group,
4866 })
4867 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4868 }
4869
4870
4871
4872
4873
4874
4875 func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4876 gensupport.SetOptions(c.urlParams_, opts...)
4877 res, err := c.doRequest("json")
4878 if res != nil && res.StatusCode == http.StatusNotModified {
4879 if res.Body != nil {
4880 res.Body.Close()
4881 }
4882 return nil, gensupport.WrapError(&googleapi.Error{
4883 Code: res.StatusCode,
4884 Header: res.Header,
4885 })
4886 }
4887 if err != nil {
4888 return nil, err
4889 }
4890 defer googleapi.CloseBody(res)
4891 if err := googleapi.CheckResponse(res); err != nil {
4892 return nil, gensupport.WrapError(err)
4893 }
4894 ret := &Operation{
4895 ServerResponse: googleapi.ServerResponse{
4896 Header: res.Header,
4897 HTTPStatusCode: res.StatusCode,
4898 },
4899 }
4900 target := &ret
4901 if err := gensupport.DecodeResponse(target, res); err != nil {
4902 return nil, err
4903 }
4904 return ret, nil
4905 }
4906
4907 type ProjectsLocationsImageImportsCreateCall struct {
4908 s *Service
4909 parent string
4910 imageimport *ImageImport
4911 urlParams_ gensupport.URLParams
4912 ctx_ context.Context
4913 header_ http.Header
4914 }
4915
4916
4917
4918
4919 func (r *ProjectsLocationsImageImportsService) Create(parent string, imageimport *ImageImport) *ProjectsLocationsImageImportsCreateCall {
4920 c := &ProjectsLocationsImageImportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4921 c.parent = parent
4922 c.imageimport = imageimport
4923 return c
4924 }
4925
4926
4927
4928
4929
4930 func (c *ProjectsLocationsImageImportsCreateCall) ImageImportId(imageImportId string) *ProjectsLocationsImageImportsCreateCall {
4931 c.urlParams_.Set("imageImportId", imageImportId)
4932 return c
4933 }
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946 func (c *ProjectsLocationsImageImportsCreateCall) RequestId(requestId string) *ProjectsLocationsImageImportsCreateCall {
4947 c.urlParams_.Set("requestId", requestId)
4948 return c
4949 }
4950
4951
4952
4953
4954 func (c *ProjectsLocationsImageImportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsCreateCall {
4955 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4956 return c
4957 }
4958
4959
4960 func (c *ProjectsLocationsImageImportsCreateCall) Context(ctx context.Context) *ProjectsLocationsImageImportsCreateCall {
4961 c.ctx_ = ctx
4962 return c
4963 }
4964
4965
4966
4967 func (c *ProjectsLocationsImageImportsCreateCall) Header() http.Header {
4968 if c.header_ == nil {
4969 c.header_ = make(http.Header)
4970 }
4971 return c.header_
4972 }
4973
4974 func (c *ProjectsLocationsImageImportsCreateCall) doRequest(alt string) (*http.Response, error) {
4975 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4976 var body io.Reader = nil
4977 body, err := googleapi.WithoutDataWrapper.JSONReader(c.imageimport)
4978 if err != nil {
4979 return nil, err
4980 }
4981 c.urlParams_.Set("alt", alt)
4982 c.urlParams_.Set("prettyPrint", "false")
4983 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/imageImports")
4984 urls += "?" + c.urlParams_.Encode()
4985 req, err := http.NewRequest("POST", urls, body)
4986 if err != nil {
4987 return nil, err
4988 }
4989 req.Header = reqHeaders
4990 googleapi.Expand(req.URL, map[string]string{
4991 "parent": c.parent,
4992 })
4993 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4994 }
4995
4996
4997
4998
4999
5000
5001 func (c *ProjectsLocationsImageImportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5002 gensupport.SetOptions(c.urlParams_, opts...)
5003 res, err := c.doRequest("json")
5004 if res != nil && res.StatusCode == http.StatusNotModified {
5005 if res.Body != nil {
5006 res.Body.Close()
5007 }
5008 return nil, gensupport.WrapError(&googleapi.Error{
5009 Code: res.StatusCode,
5010 Header: res.Header,
5011 })
5012 }
5013 if err != nil {
5014 return nil, err
5015 }
5016 defer googleapi.CloseBody(res)
5017 if err := googleapi.CheckResponse(res); err != nil {
5018 return nil, gensupport.WrapError(err)
5019 }
5020 ret := &Operation{
5021 ServerResponse: googleapi.ServerResponse{
5022 Header: res.Header,
5023 HTTPStatusCode: res.StatusCode,
5024 },
5025 }
5026 target := &ret
5027 if err := gensupport.DecodeResponse(target, res); err != nil {
5028 return nil, err
5029 }
5030 return ret, nil
5031 }
5032
5033 type ProjectsLocationsImageImportsDeleteCall struct {
5034 s *Service
5035 name string
5036 urlParams_ gensupport.URLParams
5037 ctx_ context.Context
5038 header_ http.Header
5039 }
5040
5041
5042
5043
5044 func (r *ProjectsLocationsImageImportsService) Delete(name string) *ProjectsLocationsImageImportsDeleteCall {
5045 c := &ProjectsLocationsImageImportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5046 c.name = name
5047 return c
5048 }
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061 func (c *ProjectsLocationsImageImportsDeleteCall) RequestId(requestId string) *ProjectsLocationsImageImportsDeleteCall {
5062 c.urlParams_.Set("requestId", requestId)
5063 return c
5064 }
5065
5066
5067
5068
5069 func (c *ProjectsLocationsImageImportsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsDeleteCall {
5070 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5071 return c
5072 }
5073
5074
5075 func (c *ProjectsLocationsImageImportsDeleteCall) Context(ctx context.Context) *ProjectsLocationsImageImportsDeleteCall {
5076 c.ctx_ = ctx
5077 return c
5078 }
5079
5080
5081
5082 func (c *ProjectsLocationsImageImportsDeleteCall) Header() http.Header {
5083 if c.header_ == nil {
5084 c.header_ = make(http.Header)
5085 }
5086 return c.header_
5087 }
5088
5089 func (c *ProjectsLocationsImageImportsDeleteCall) doRequest(alt string) (*http.Response, error) {
5090 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5091 var body io.Reader = nil
5092 c.urlParams_.Set("alt", alt)
5093 c.urlParams_.Set("prettyPrint", "false")
5094 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5095 urls += "?" + c.urlParams_.Encode()
5096 req, err := http.NewRequest("DELETE", urls, body)
5097 if err != nil {
5098 return nil, err
5099 }
5100 req.Header = reqHeaders
5101 googleapi.Expand(req.URL, map[string]string{
5102 "name": c.name,
5103 })
5104 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5105 }
5106
5107
5108
5109
5110
5111
5112 func (c *ProjectsLocationsImageImportsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5113 gensupport.SetOptions(c.urlParams_, opts...)
5114 res, err := c.doRequest("json")
5115 if res != nil && res.StatusCode == http.StatusNotModified {
5116 if res.Body != nil {
5117 res.Body.Close()
5118 }
5119 return nil, gensupport.WrapError(&googleapi.Error{
5120 Code: res.StatusCode,
5121 Header: res.Header,
5122 })
5123 }
5124 if err != nil {
5125 return nil, err
5126 }
5127 defer googleapi.CloseBody(res)
5128 if err := googleapi.CheckResponse(res); err != nil {
5129 return nil, gensupport.WrapError(err)
5130 }
5131 ret := &Operation{
5132 ServerResponse: googleapi.ServerResponse{
5133 Header: res.Header,
5134 HTTPStatusCode: res.StatusCode,
5135 },
5136 }
5137 target := &ret
5138 if err := gensupport.DecodeResponse(target, res); err != nil {
5139 return nil, err
5140 }
5141 return ret, nil
5142 }
5143
5144 type ProjectsLocationsImageImportsGetCall struct {
5145 s *Service
5146 name string
5147 urlParams_ gensupport.URLParams
5148 ifNoneMatch_ string
5149 ctx_ context.Context
5150 header_ http.Header
5151 }
5152
5153
5154
5155
5156 func (r *ProjectsLocationsImageImportsService) Get(name string) *ProjectsLocationsImageImportsGetCall {
5157 c := &ProjectsLocationsImageImportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5158 c.name = name
5159 return c
5160 }
5161
5162
5163
5164
5165 func (c *ProjectsLocationsImageImportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsGetCall {
5166 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5167 return c
5168 }
5169
5170
5171
5172
5173 func (c *ProjectsLocationsImageImportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsGetCall {
5174 c.ifNoneMatch_ = entityTag
5175 return c
5176 }
5177
5178
5179 func (c *ProjectsLocationsImageImportsGetCall) Context(ctx context.Context) *ProjectsLocationsImageImportsGetCall {
5180 c.ctx_ = ctx
5181 return c
5182 }
5183
5184
5185
5186 func (c *ProjectsLocationsImageImportsGetCall) Header() http.Header {
5187 if c.header_ == nil {
5188 c.header_ = make(http.Header)
5189 }
5190 return c.header_
5191 }
5192
5193 func (c *ProjectsLocationsImageImportsGetCall) doRequest(alt string) (*http.Response, error) {
5194 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5195 if c.ifNoneMatch_ != "" {
5196 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5197 }
5198 var body io.Reader = nil
5199 c.urlParams_.Set("alt", alt)
5200 c.urlParams_.Set("prettyPrint", "false")
5201 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5202 urls += "?" + c.urlParams_.Encode()
5203 req, err := http.NewRequest("GET", urls, body)
5204 if err != nil {
5205 return nil, err
5206 }
5207 req.Header = reqHeaders
5208 googleapi.Expand(req.URL, map[string]string{
5209 "name": c.name,
5210 })
5211 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5212 }
5213
5214
5215
5216
5217
5218
5219 func (c *ProjectsLocationsImageImportsGetCall) Do(opts ...googleapi.CallOption) (*ImageImport, error) {
5220 gensupport.SetOptions(c.urlParams_, opts...)
5221 res, err := c.doRequest("json")
5222 if res != nil && res.StatusCode == http.StatusNotModified {
5223 if res.Body != nil {
5224 res.Body.Close()
5225 }
5226 return nil, gensupport.WrapError(&googleapi.Error{
5227 Code: res.StatusCode,
5228 Header: res.Header,
5229 })
5230 }
5231 if err != nil {
5232 return nil, err
5233 }
5234 defer googleapi.CloseBody(res)
5235 if err := googleapi.CheckResponse(res); err != nil {
5236 return nil, gensupport.WrapError(err)
5237 }
5238 ret := &ImageImport{
5239 ServerResponse: googleapi.ServerResponse{
5240 Header: res.Header,
5241 HTTPStatusCode: res.StatusCode,
5242 },
5243 }
5244 target := &ret
5245 if err := gensupport.DecodeResponse(target, res); err != nil {
5246 return nil, err
5247 }
5248 return ret, nil
5249 }
5250
5251 type ProjectsLocationsImageImportsListCall struct {
5252 s *Service
5253 parent string
5254 urlParams_ gensupport.URLParams
5255 ifNoneMatch_ string
5256 ctx_ context.Context
5257 header_ http.Header
5258 }
5259
5260
5261
5262
5263 func (r *ProjectsLocationsImageImportsService) List(parent string) *ProjectsLocationsImageImportsListCall {
5264 c := &ProjectsLocationsImageImportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5265 c.parent = parent
5266 return c
5267 }
5268
5269
5270
5271 func (c *ProjectsLocationsImageImportsListCall) Filter(filter string) *ProjectsLocationsImageImportsListCall {
5272 c.urlParams_.Set("filter", filter)
5273 return c
5274 }
5275
5276
5277
5278
5279 func (c *ProjectsLocationsImageImportsListCall) OrderBy(orderBy string) *ProjectsLocationsImageImportsListCall {
5280 c.urlParams_.Set("orderBy", orderBy)
5281 return c
5282 }
5283
5284
5285
5286
5287
5288 func (c *ProjectsLocationsImageImportsListCall) PageSize(pageSize int64) *ProjectsLocationsImageImportsListCall {
5289 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5290 return c
5291 }
5292
5293
5294
5295
5296
5297 func (c *ProjectsLocationsImageImportsListCall) PageToken(pageToken string) *ProjectsLocationsImageImportsListCall {
5298 c.urlParams_.Set("pageToken", pageToken)
5299 return c
5300 }
5301
5302
5303
5304
5305 func (c *ProjectsLocationsImageImportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsListCall {
5306 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5307 return c
5308 }
5309
5310
5311
5312
5313 func (c *ProjectsLocationsImageImportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsListCall {
5314 c.ifNoneMatch_ = entityTag
5315 return c
5316 }
5317
5318
5319 func (c *ProjectsLocationsImageImportsListCall) Context(ctx context.Context) *ProjectsLocationsImageImportsListCall {
5320 c.ctx_ = ctx
5321 return c
5322 }
5323
5324
5325
5326 func (c *ProjectsLocationsImageImportsListCall) Header() http.Header {
5327 if c.header_ == nil {
5328 c.header_ = make(http.Header)
5329 }
5330 return c.header_
5331 }
5332
5333 func (c *ProjectsLocationsImageImportsListCall) doRequest(alt string) (*http.Response, error) {
5334 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5335 if c.ifNoneMatch_ != "" {
5336 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5337 }
5338 var body io.Reader = nil
5339 c.urlParams_.Set("alt", alt)
5340 c.urlParams_.Set("prettyPrint", "false")
5341 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/imageImports")
5342 urls += "?" + c.urlParams_.Encode()
5343 req, err := http.NewRequest("GET", urls, body)
5344 if err != nil {
5345 return nil, err
5346 }
5347 req.Header = reqHeaders
5348 googleapi.Expand(req.URL, map[string]string{
5349 "parent": c.parent,
5350 })
5351 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5352 }
5353
5354
5355
5356
5357
5358
5359
5360 func (c *ProjectsLocationsImageImportsListCall) Do(opts ...googleapi.CallOption) (*ListImageImportsResponse, error) {
5361 gensupport.SetOptions(c.urlParams_, opts...)
5362 res, err := c.doRequest("json")
5363 if res != nil && res.StatusCode == http.StatusNotModified {
5364 if res.Body != nil {
5365 res.Body.Close()
5366 }
5367 return nil, gensupport.WrapError(&googleapi.Error{
5368 Code: res.StatusCode,
5369 Header: res.Header,
5370 })
5371 }
5372 if err != nil {
5373 return nil, err
5374 }
5375 defer googleapi.CloseBody(res)
5376 if err := googleapi.CheckResponse(res); err != nil {
5377 return nil, gensupport.WrapError(err)
5378 }
5379 ret := &ListImageImportsResponse{
5380 ServerResponse: googleapi.ServerResponse{
5381 Header: res.Header,
5382 HTTPStatusCode: res.StatusCode,
5383 },
5384 }
5385 target := &ret
5386 if err := gensupport.DecodeResponse(target, res); err != nil {
5387 return nil, err
5388 }
5389 return ret, nil
5390 }
5391
5392
5393
5394
5395 func (c *ProjectsLocationsImageImportsListCall) Pages(ctx context.Context, f func(*ListImageImportsResponse) error) error {
5396 c.ctx_ = ctx
5397 defer c.PageToken(c.urlParams_.Get("pageToken"))
5398 for {
5399 x, err := c.Do()
5400 if err != nil {
5401 return err
5402 }
5403 if err := f(x); err != nil {
5404 return err
5405 }
5406 if x.NextPageToken == "" {
5407 return nil
5408 }
5409 c.PageToken(x.NextPageToken)
5410 }
5411 }
5412
5413 type ProjectsLocationsImageImportsImageImportJobsCancelCall struct {
5414 s *Service
5415 name string
5416 cancelimageimportjobrequest *CancelImageImportJobRequest
5417 urlParams_ gensupport.URLParams
5418 ctx_ context.Context
5419 header_ http.Header
5420 }
5421
5422
5423
5424
5425 func (r *ProjectsLocationsImageImportsImageImportJobsService) Cancel(name string, cancelimageimportjobrequest *CancelImageImportJobRequest) *ProjectsLocationsImageImportsImageImportJobsCancelCall {
5426 c := &ProjectsLocationsImageImportsImageImportJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5427 c.name = name
5428 c.cancelimageimportjobrequest = cancelimageimportjobrequest
5429 return c
5430 }
5431
5432
5433
5434
5435 func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsImageImportJobsCancelCall {
5436 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5437 return c
5438 }
5439
5440
5441 func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsImageImportsImageImportJobsCancelCall {
5442 c.ctx_ = ctx
5443 return c
5444 }
5445
5446
5447
5448 func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) Header() http.Header {
5449 if c.header_ == nil {
5450 c.header_ = make(http.Header)
5451 }
5452 return c.header_
5453 }
5454
5455 func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) doRequest(alt string) (*http.Response, error) {
5456 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5457 var body io.Reader = nil
5458 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelimageimportjobrequest)
5459 if err != nil {
5460 return nil, err
5461 }
5462 c.urlParams_.Set("alt", alt)
5463 c.urlParams_.Set("prettyPrint", "false")
5464 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
5465 urls += "?" + c.urlParams_.Encode()
5466 req, err := http.NewRequest("POST", urls, body)
5467 if err != nil {
5468 return nil, err
5469 }
5470 req.Header = reqHeaders
5471 googleapi.Expand(req.URL, map[string]string{
5472 "name": c.name,
5473 })
5474 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5475 }
5476
5477
5478
5479
5480
5481
5482 func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5483 gensupport.SetOptions(c.urlParams_, opts...)
5484 res, err := c.doRequest("json")
5485 if res != nil && res.StatusCode == http.StatusNotModified {
5486 if res.Body != nil {
5487 res.Body.Close()
5488 }
5489 return nil, gensupport.WrapError(&googleapi.Error{
5490 Code: res.StatusCode,
5491 Header: res.Header,
5492 })
5493 }
5494 if err != nil {
5495 return nil, err
5496 }
5497 defer googleapi.CloseBody(res)
5498 if err := googleapi.CheckResponse(res); err != nil {
5499 return nil, gensupport.WrapError(err)
5500 }
5501 ret := &Operation{
5502 ServerResponse: googleapi.ServerResponse{
5503 Header: res.Header,
5504 HTTPStatusCode: res.StatusCode,
5505 },
5506 }
5507 target := &ret
5508 if err := gensupport.DecodeResponse(target, res); err != nil {
5509 return nil, err
5510 }
5511 return ret, nil
5512 }
5513
5514 type ProjectsLocationsImageImportsImageImportJobsGetCall struct {
5515 s *Service
5516 name string
5517 urlParams_ gensupport.URLParams
5518 ifNoneMatch_ string
5519 ctx_ context.Context
5520 header_ http.Header
5521 }
5522
5523
5524
5525
5526 func (r *ProjectsLocationsImageImportsImageImportJobsService) Get(name string) *ProjectsLocationsImageImportsImageImportJobsGetCall {
5527 c := &ProjectsLocationsImageImportsImageImportJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5528 c.name = name
5529 return c
5530 }
5531
5532
5533
5534
5535 func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsImageImportJobsGetCall {
5536 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5537 return c
5538 }
5539
5540
5541
5542
5543 func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsImageImportJobsGetCall {
5544 c.ifNoneMatch_ = entityTag
5545 return c
5546 }
5547
5548
5549 func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) Context(ctx context.Context) *ProjectsLocationsImageImportsImageImportJobsGetCall {
5550 c.ctx_ = ctx
5551 return c
5552 }
5553
5554
5555
5556 func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) Header() http.Header {
5557 if c.header_ == nil {
5558 c.header_ = make(http.Header)
5559 }
5560 return c.header_
5561 }
5562
5563 func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) doRequest(alt string) (*http.Response, error) {
5564 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5565 if c.ifNoneMatch_ != "" {
5566 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5567 }
5568 var body io.Reader = nil
5569 c.urlParams_.Set("alt", alt)
5570 c.urlParams_.Set("prettyPrint", "false")
5571 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5572 urls += "?" + c.urlParams_.Encode()
5573 req, err := http.NewRequest("GET", urls, body)
5574 if err != nil {
5575 return nil, err
5576 }
5577 req.Header = reqHeaders
5578 googleapi.Expand(req.URL, map[string]string{
5579 "name": c.name,
5580 })
5581 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5582 }
5583
5584
5585
5586
5587
5588
5589 func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) Do(opts ...googleapi.CallOption) (*ImageImportJob, error) {
5590 gensupport.SetOptions(c.urlParams_, opts...)
5591 res, err := c.doRequest("json")
5592 if res != nil && res.StatusCode == http.StatusNotModified {
5593 if res.Body != nil {
5594 res.Body.Close()
5595 }
5596 return nil, gensupport.WrapError(&googleapi.Error{
5597 Code: res.StatusCode,
5598 Header: res.Header,
5599 })
5600 }
5601 if err != nil {
5602 return nil, err
5603 }
5604 defer googleapi.CloseBody(res)
5605 if err := googleapi.CheckResponse(res); err != nil {
5606 return nil, gensupport.WrapError(err)
5607 }
5608 ret := &ImageImportJob{
5609 ServerResponse: googleapi.ServerResponse{
5610 Header: res.Header,
5611 HTTPStatusCode: res.StatusCode,
5612 },
5613 }
5614 target := &ret
5615 if err := gensupport.DecodeResponse(target, res); err != nil {
5616 return nil, err
5617 }
5618 return ret, nil
5619 }
5620
5621 type ProjectsLocationsImageImportsImageImportJobsListCall struct {
5622 s *Service
5623 parent string
5624 urlParams_ gensupport.URLParams
5625 ifNoneMatch_ string
5626 ctx_ context.Context
5627 header_ http.Header
5628 }
5629
5630
5631
5632
5633 func (r *ProjectsLocationsImageImportsImageImportJobsService) List(parent string) *ProjectsLocationsImageImportsImageImportJobsListCall {
5634 c := &ProjectsLocationsImageImportsImageImportJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5635 c.parent = parent
5636 return c
5637 }
5638
5639
5640
5641 func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Filter(filter string) *ProjectsLocationsImageImportsImageImportJobsListCall {
5642 c.urlParams_.Set("filter", filter)
5643 return c
5644 }
5645
5646
5647
5648
5649 func (c *ProjectsLocationsImageImportsImageImportJobsListCall) OrderBy(orderBy string) *ProjectsLocationsImageImportsImageImportJobsListCall {
5650 c.urlParams_.Set("orderBy", orderBy)
5651 return c
5652 }
5653
5654
5655
5656
5657
5658 func (c *ProjectsLocationsImageImportsImageImportJobsListCall) PageSize(pageSize int64) *ProjectsLocationsImageImportsImageImportJobsListCall {
5659 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5660 return c
5661 }
5662
5663
5664
5665
5666
5667 func (c *ProjectsLocationsImageImportsImageImportJobsListCall) PageToken(pageToken string) *ProjectsLocationsImageImportsImageImportJobsListCall {
5668 c.urlParams_.Set("pageToken", pageToken)
5669 return c
5670 }
5671
5672
5673
5674
5675 func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsImageImportJobsListCall {
5676 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5677 return c
5678 }
5679
5680
5681
5682
5683 func (c *ProjectsLocationsImageImportsImageImportJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsImageImportJobsListCall {
5684 c.ifNoneMatch_ = entityTag
5685 return c
5686 }
5687
5688
5689 func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Context(ctx context.Context) *ProjectsLocationsImageImportsImageImportJobsListCall {
5690 c.ctx_ = ctx
5691 return c
5692 }
5693
5694
5695
5696 func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Header() http.Header {
5697 if c.header_ == nil {
5698 c.header_ = make(http.Header)
5699 }
5700 return c.header_
5701 }
5702
5703 func (c *ProjectsLocationsImageImportsImageImportJobsListCall) doRequest(alt string) (*http.Response, error) {
5704 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5705 if c.ifNoneMatch_ != "" {
5706 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5707 }
5708 var body io.Reader = nil
5709 c.urlParams_.Set("alt", alt)
5710 c.urlParams_.Set("prettyPrint", "false")
5711 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/imageImportJobs")
5712 urls += "?" + c.urlParams_.Encode()
5713 req, err := http.NewRequest("GET", urls, body)
5714 if err != nil {
5715 return nil, err
5716 }
5717 req.Header = reqHeaders
5718 googleapi.Expand(req.URL, map[string]string{
5719 "parent": c.parent,
5720 })
5721 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5722 }
5723
5724
5725
5726
5727
5728
5729
5730 func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Do(opts ...googleapi.CallOption) (*ListImageImportJobsResponse, error) {
5731 gensupport.SetOptions(c.urlParams_, opts...)
5732 res, err := c.doRequest("json")
5733 if res != nil && res.StatusCode == http.StatusNotModified {
5734 if res.Body != nil {
5735 res.Body.Close()
5736 }
5737 return nil, gensupport.WrapError(&googleapi.Error{
5738 Code: res.StatusCode,
5739 Header: res.Header,
5740 })
5741 }
5742 if err != nil {
5743 return nil, err
5744 }
5745 defer googleapi.CloseBody(res)
5746 if err := googleapi.CheckResponse(res); err != nil {
5747 return nil, gensupport.WrapError(err)
5748 }
5749 ret := &ListImageImportJobsResponse{
5750 ServerResponse: googleapi.ServerResponse{
5751 Header: res.Header,
5752 HTTPStatusCode: res.StatusCode,
5753 },
5754 }
5755 target := &ret
5756 if err := gensupport.DecodeResponse(target, res); err != nil {
5757 return nil, err
5758 }
5759 return ret, nil
5760 }
5761
5762
5763
5764
5765 func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Pages(ctx context.Context, f func(*ListImageImportJobsResponse) error) error {
5766 c.ctx_ = ctx
5767 defer c.PageToken(c.urlParams_.Get("pageToken"))
5768 for {
5769 x, err := c.Do()
5770 if err != nil {
5771 return err
5772 }
5773 if err := f(x); err != nil {
5774 return err
5775 }
5776 if x.NextPageToken == "" {
5777 return nil
5778 }
5779 c.PageToken(x.NextPageToken)
5780 }
5781 }
5782
5783 type ProjectsLocationsOperationsCancelCall struct {
5784 s *Service
5785 name string
5786 canceloperationrequest *CancelOperationRequest
5787 urlParams_ gensupport.URLParams
5788 ctx_ context.Context
5789 header_ http.Header
5790 }
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
5804 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5805 c.name = name
5806 c.canceloperationrequest = canceloperationrequest
5807 return c
5808 }
5809
5810
5811
5812
5813 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
5814 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5815 return c
5816 }
5817
5818
5819 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
5820 c.ctx_ = ctx
5821 return c
5822 }
5823
5824
5825
5826 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
5827 if c.header_ == nil {
5828 c.header_ = make(http.Header)
5829 }
5830 return c.header_
5831 }
5832
5833 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
5834 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5835 var body io.Reader = nil
5836 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
5837 if err != nil {
5838 return nil, err
5839 }
5840 c.urlParams_.Set("alt", alt)
5841 c.urlParams_.Set("prettyPrint", "false")
5842 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
5843 urls += "?" + c.urlParams_.Encode()
5844 req, err := http.NewRequest("POST", urls, body)
5845 if err != nil {
5846 return nil, err
5847 }
5848 req.Header = reqHeaders
5849 googleapi.Expand(req.URL, map[string]string{
5850 "name": c.name,
5851 })
5852 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5853 }
5854
5855
5856
5857
5858
5859
5860 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5861 gensupport.SetOptions(c.urlParams_, opts...)
5862 res, err := c.doRequest("json")
5863 if res != nil && res.StatusCode == http.StatusNotModified {
5864 if res.Body != nil {
5865 res.Body.Close()
5866 }
5867 return nil, gensupport.WrapError(&googleapi.Error{
5868 Code: res.StatusCode,
5869 Header: res.Header,
5870 })
5871 }
5872 if err != nil {
5873 return nil, err
5874 }
5875 defer googleapi.CloseBody(res)
5876 if err := googleapi.CheckResponse(res); err != nil {
5877 return nil, gensupport.WrapError(err)
5878 }
5879 ret := &Empty{
5880 ServerResponse: googleapi.ServerResponse{
5881 Header: res.Header,
5882 HTTPStatusCode: res.StatusCode,
5883 },
5884 }
5885 target := &ret
5886 if err := gensupport.DecodeResponse(target, res); err != nil {
5887 return nil, err
5888 }
5889 return ret, nil
5890 }
5891
5892 type ProjectsLocationsOperationsDeleteCall struct {
5893 s *Service
5894 name string
5895 urlParams_ gensupport.URLParams
5896 ctx_ context.Context
5897 header_ http.Header
5898 }
5899
5900
5901
5902
5903
5904
5905
5906 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
5907 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5908 c.name = name
5909 return c
5910 }
5911
5912
5913
5914
5915 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
5916 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5917 return c
5918 }
5919
5920
5921 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
5922 c.ctx_ = ctx
5923 return c
5924 }
5925
5926
5927
5928 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
5929 if c.header_ == nil {
5930 c.header_ = make(http.Header)
5931 }
5932 return c.header_
5933 }
5934
5935 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
5936 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5937 var body io.Reader = nil
5938 c.urlParams_.Set("alt", alt)
5939 c.urlParams_.Set("prettyPrint", "false")
5940 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5941 urls += "?" + c.urlParams_.Encode()
5942 req, err := http.NewRequest("DELETE", urls, body)
5943 if err != nil {
5944 return nil, err
5945 }
5946 req.Header = reqHeaders
5947 googleapi.Expand(req.URL, map[string]string{
5948 "name": c.name,
5949 })
5950 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5951 }
5952
5953
5954
5955
5956
5957
5958 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5959 gensupport.SetOptions(c.urlParams_, opts...)
5960 res, err := c.doRequest("json")
5961 if res != nil && res.StatusCode == http.StatusNotModified {
5962 if res.Body != nil {
5963 res.Body.Close()
5964 }
5965 return nil, gensupport.WrapError(&googleapi.Error{
5966 Code: res.StatusCode,
5967 Header: res.Header,
5968 })
5969 }
5970 if err != nil {
5971 return nil, err
5972 }
5973 defer googleapi.CloseBody(res)
5974 if err := googleapi.CheckResponse(res); err != nil {
5975 return nil, gensupport.WrapError(err)
5976 }
5977 ret := &Empty{
5978 ServerResponse: googleapi.ServerResponse{
5979 Header: res.Header,
5980 HTTPStatusCode: res.StatusCode,
5981 },
5982 }
5983 target := &ret
5984 if err := gensupport.DecodeResponse(target, res); err != nil {
5985 return nil, err
5986 }
5987 return ret, nil
5988 }
5989
5990 type ProjectsLocationsOperationsGetCall struct {
5991 s *Service
5992 name string
5993 urlParams_ gensupport.URLParams
5994 ifNoneMatch_ string
5995 ctx_ context.Context
5996 header_ http.Header
5997 }
5998
5999
6000
6001
6002
6003
6004 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
6005 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6006 c.name = name
6007 return c
6008 }
6009
6010
6011
6012
6013 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
6014 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6015 return c
6016 }
6017
6018
6019
6020
6021 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
6022 c.ifNoneMatch_ = entityTag
6023 return c
6024 }
6025
6026
6027 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
6028 c.ctx_ = ctx
6029 return c
6030 }
6031
6032
6033
6034 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
6035 if c.header_ == nil {
6036 c.header_ = make(http.Header)
6037 }
6038 return c.header_
6039 }
6040
6041 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
6042 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6043 if c.ifNoneMatch_ != "" {
6044 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6045 }
6046 var body io.Reader = nil
6047 c.urlParams_.Set("alt", alt)
6048 c.urlParams_.Set("prettyPrint", "false")
6049 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6050 urls += "?" + c.urlParams_.Encode()
6051 req, err := http.NewRequest("GET", urls, body)
6052 if err != nil {
6053 return nil, err
6054 }
6055 req.Header = reqHeaders
6056 googleapi.Expand(req.URL, map[string]string{
6057 "name": c.name,
6058 })
6059 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6060 }
6061
6062
6063
6064
6065
6066
6067 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6068 gensupport.SetOptions(c.urlParams_, opts...)
6069 res, err := c.doRequest("json")
6070 if res != nil && res.StatusCode == http.StatusNotModified {
6071 if res.Body != nil {
6072 res.Body.Close()
6073 }
6074 return nil, gensupport.WrapError(&googleapi.Error{
6075 Code: res.StatusCode,
6076 Header: res.Header,
6077 })
6078 }
6079 if err != nil {
6080 return nil, err
6081 }
6082 defer googleapi.CloseBody(res)
6083 if err := googleapi.CheckResponse(res); err != nil {
6084 return nil, gensupport.WrapError(err)
6085 }
6086 ret := &Operation{
6087 ServerResponse: googleapi.ServerResponse{
6088 Header: res.Header,
6089 HTTPStatusCode: res.StatusCode,
6090 },
6091 }
6092 target := &ret
6093 if err := gensupport.DecodeResponse(target, res); err != nil {
6094 return nil, err
6095 }
6096 return ret, nil
6097 }
6098
6099 type ProjectsLocationsOperationsListCall struct {
6100 s *Service
6101 name string
6102 urlParams_ gensupport.URLParams
6103 ifNoneMatch_ string
6104 ctx_ context.Context
6105 header_ http.Header
6106 }
6107
6108
6109
6110
6111
6112 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
6113 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6114 c.name = name
6115 return c
6116 }
6117
6118
6119 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
6120 c.urlParams_.Set("filter", filter)
6121 return c
6122 }
6123
6124
6125
6126 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
6127 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6128 return c
6129 }
6130
6131
6132
6133 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
6134 c.urlParams_.Set("pageToken", pageToken)
6135 return c
6136 }
6137
6138
6139
6140
6141 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
6142 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6143 return c
6144 }
6145
6146
6147
6148
6149 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
6150 c.ifNoneMatch_ = entityTag
6151 return c
6152 }
6153
6154
6155 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
6156 c.ctx_ = ctx
6157 return c
6158 }
6159
6160
6161
6162 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
6163 if c.header_ == nil {
6164 c.header_ = make(http.Header)
6165 }
6166 return c.header_
6167 }
6168
6169 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
6170 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6171 if c.ifNoneMatch_ != "" {
6172 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6173 }
6174 var body io.Reader = nil
6175 c.urlParams_.Set("alt", alt)
6176 c.urlParams_.Set("prettyPrint", "false")
6177 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
6178 urls += "?" + c.urlParams_.Encode()
6179 req, err := http.NewRequest("GET", urls, body)
6180 if err != nil {
6181 return nil, err
6182 }
6183 req.Header = reqHeaders
6184 googleapi.Expand(req.URL, map[string]string{
6185 "name": c.name,
6186 })
6187 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6188 }
6189
6190
6191
6192
6193
6194
6195
6196 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
6197 gensupport.SetOptions(c.urlParams_, opts...)
6198 res, err := c.doRequest("json")
6199 if res != nil && res.StatusCode == http.StatusNotModified {
6200 if res.Body != nil {
6201 res.Body.Close()
6202 }
6203 return nil, gensupport.WrapError(&googleapi.Error{
6204 Code: res.StatusCode,
6205 Header: res.Header,
6206 })
6207 }
6208 if err != nil {
6209 return nil, err
6210 }
6211 defer googleapi.CloseBody(res)
6212 if err := googleapi.CheckResponse(res); err != nil {
6213 return nil, gensupport.WrapError(err)
6214 }
6215 ret := &ListOperationsResponse{
6216 ServerResponse: googleapi.ServerResponse{
6217 Header: res.Header,
6218 HTTPStatusCode: res.StatusCode,
6219 },
6220 }
6221 target := &ret
6222 if err := gensupport.DecodeResponse(target, res); err != nil {
6223 return nil, err
6224 }
6225 return ret, nil
6226 }
6227
6228
6229
6230
6231 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
6232 c.ctx_ = ctx
6233 defer c.PageToken(c.urlParams_.Get("pageToken"))
6234 for {
6235 x, err := c.Do()
6236 if err != nil {
6237 return err
6238 }
6239 if err := f(x); err != nil {
6240 return err
6241 }
6242 if x.NextPageToken == "" {
6243 return nil
6244 }
6245 c.PageToken(x.NextPageToken)
6246 }
6247 }
6248
6249 type ProjectsLocationsSourcesCreateCall struct {
6250 s *Service
6251 parent string
6252 source *Source
6253 urlParams_ gensupport.URLParams
6254 ctx_ context.Context
6255 header_ http.Header
6256 }
6257
6258
6259
6260
6261 func (r *ProjectsLocationsSourcesService) Create(parent string, source *Source) *ProjectsLocationsSourcesCreateCall {
6262 c := &ProjectsLocationsSourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6263 c.parent = parent
6264 c.source = source
6265 return c
6266 }
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279 func (c *ProjectsLocationsSourcesCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesCreateCall {
6280 c.urlParams_.Set("requestId", requestId)
6281 return c
6282 }
6283
6284
6285
6286 func (c *ProjectsLocationsSourcesCreateCall) SourceId(sourceId string) *ProjectsLocationsSourcesCreateCall {
6287 c.urlParams_.Set("sourceId", sourceId)
6288 return c
6289 }
6290
6291
6292
6293
6294 func (c *ProjectsLocationsSourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesCreateCall {
6295 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6296 return c
6297 }
6298
6299
6300 func (c *ProjectsLocationsSourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesCreateCall {
6301 c.ctx_ = ctx
6302 return c
6303 }
6304
6305
6306
6307 func (c *ProjectsLocationsSourcesCreateCall) Header() http.Header {
6308 if c.header_ == nil {
6309 c.header_ = make(http.Header)
6310 }
6311 return c.header_
6312 }
6313
6314 func (c *ProjectsLocationsSourcesCreateCall) doRequest(alt string) (*http.Response, error) {
6315 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6316 var body io.Reader = nil
6317 body, err := googleapi.WithoutDataWrapper.JSONReader(c.source)
6318 if err != nil {
6319 return nil, err
6320 }
6321 c.urlParams_.Set("alt", alt)
6322 c.urlParams_.Set("prettyPrint", "false")
6323 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sources")
6324 urls += "?" + c.urlParams_.Encode()
6325 req, err := http.NewRequest("POST", urls, body)
6326 if err != nil {
6327 return nil, err
6328 }
6329 req.Header = reqHeaders
6330 googleapi.Expand(req.URL, map[string]string{
6331 "parent": c.parent,
6332 })
6333 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6334 }
6335
6336
6337
6338
6339
6340
6341 func (c *ProjectsLocationsSourcesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6342 gensupport.SetOptions(c.urlParams_, opts...)
6343 res, err := c.doRequest("json")
6344 if res != nil && res.StatusCode == http.StatusNotModified {
6345 if res.Body != nil {
6346 res.Body.Close()
6347 }
6348 return nil, gensupport.WrapError(&googleapi.Error{
6349 Code: res.StatusCode,
6350 Header: res.Header,
6351 })
6352 }
6353 if err != nil {
6354 return nil, err
6355 }
6356 defer googleapi.CloseBody(res)
6357 if err := googleapi.CheckResponse(res); err != nil {
6358 return nil, gensupport.WrapError(err)
6359 }
6360 ret := &Operation{
6361 ServerResponse: googleapi.ServerResponse{
6362 Header: res.Header,
6363 HTTPStatusCode: res.StatusCode,
6364 },
6365 }
6366 target := &ret
6367 if err := gensupport.DecodeResponse(target, res); err != nil {
6368 return nil, err
6369 }
6370 return ret, nil
6371 }
6372
6373 type ProjectsLocationsSourcesDeleteCall struct {
6374 s *Service
6375 name string
6376 urlParams_ gensupport.URLParams
6377 ctx_ context.Context
6378 header_ http.Header
6379 }
6380
6381
6382
6383
6384 func (r *ProjectsLocationsSourcesService) Delete(name string) *ProjectsLocationsSourcesDeleteCall {
6385 c := &ProjectsLocationsSourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6386 c.name = name
6387 return c
6388 }
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401 func (c *ProjectsLocationsSourcesDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesDeleteCall {
6402 c.urlParams_.Set("requestId", requestId)
6403 return c
6404 }
6405
6406
6407
6408
6409 func (c *ProjectsLocationsSourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDeleteCall {
6410 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6411 return c
6412 }
6413
6414
6415 func (c *ProjectsLocationsSourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesDeleteCall {
6416 c.ctx_ = ctx
6417 return c
6418 }
6419
6420
6421
6422 func (c *ProjectsLocationsSourcesDeleteCall) Header() http.Header {
6423 if c.header_ == nil {
6424 c.header_ = make(http.Header)
6425 }
6426 return c.header_
6427 }
6428
6429 func (c *ProjectsLocationsSourcesDeleteCall) doRequest(alt string) (*http.Response, error) {
6430 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6431 var body io.Reader = nil
6432 c.urlParams_.Set("alt", alt)
6433 c.urlParams_.Set("prettyPrint", "false")
6434 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6435 urls += "?" + c.urlParams_.Encode()
6436 req, err := http.NewRequest("DELETE", urls, body)
6437 if err != nil {
6438 return nil, err
6439 }
6440 req.Header = reqHeaders
6441 googleapi.Expand(req.URL, map[string]string{
6442 "name": c.name,
6443 })
6444 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6445 }
6446
6447
6448
6449
6450
6451
6452 func (c *ProjectsLocationsSourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6453 gensupport.SetOptions(c.urlParams_, opts...)
6454 res, err := c.doRequest("json")
6455 if res != nil && res.StatusCode == http.StatusNotModified {
6456 if res.Body != nil {
6457 res.Body.Close()
6458 }
6459 return nil, gensupport.WrapError(&googleapi.Error{
6460 Code: res.StatusCode,
6461 Header: res.Header,
6462 })
6463 }
6464 if err != nil {
6465 return nil, err
6466 }
6467 defer googleapi.CloseBody(res)
6468 if err := googleapi.CheckResponse(res); err != nil {
6469 return nil, gensupport.WrapError(err)
6470 }
6471 ret := &Operation{
6472 ServerResponse: googleapi.ServerResponse{
6473 Header: res.Header,
6474 HTTPStatusCode: res.StatusCode,
6475 },
6476 }
6477 target := &ret
6478 if err := gensupport.DecodeResponse(target, res); err != nil {
6479 return nil, err
6480 }
6481 return ret, nil
6482 }
6483
6484 type ProjectsLocationsSourcesFetchInventoryCall struct {
6485 s *Service
6486 source string
6487 urlParams_ gensupport.URLParams
6488 ifNoneMatch_ string
6489 ctx_ context.Context
6490 header_ http.Header
6491 }
6492
6493
6494
6495
6496
6497
6498
6499
6500 func (r *ProjectsLocationsSourcesService) FetchInventory(source string) *ProjectsLocationsSourcesFetchInventoryCall {
6501 c := &ProjectsLocationsSourcesFetchInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6502 c.source = source
6503 return c
6504 }
6505
6506
6507
6508
6509 func (c *ProjectsLocationsSourcesFetchInventoryCall) ForceRefresh(forceRefresh bool) *ProjectsLocationsSourcesFetchInventoryCall {
6510 c.urlParams_.Set("forceRefresh", fmt.Sprint(forceRefresh))
6511 return c
6512 }
6513
6514
6515
6516
6517
6518
6519 func (c *ProjectsLocationsSourcesFetchInventoryCall) PageSize(pageSize int64) *ProjectsLocationsSourcesFetchInventoryCall {
6520 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6521 return c
6522 }
6523
6524
6525
6526
6527
6528 func (c *ProjectsLocationsSourcesFetchInventoryCall) PageToken(pageToken string) *ProjectsLocationsSourcesFetchInventoryCall {
6529 c.urlParams_.Set("pageToken", pageToken)
6530 return c
6531 }
6532
6533
6534
6535
6536 func (c *ProjectsLocationsSourcesFetchInventoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesFetchInventoryCall {
6537 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6538 return c
6539 }
6540
6541
6542
6543
6544 func (c *ProjectsLocationsSourcesFetchInventoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesFetchInventoryCall {
6545 c.ifNoneMatch_ = entityTag
6546 return c
6547 }
6548
6549
6550 func (c *ProjectsLocationsSourcesFetchInventoryCall) Context(ctx context.Context) *ProjectsLocationsSourcesFetchInventoryCall {
6551 c.ctx_ = ctx
6552 return c
6553 }
6554
6555
6556
6557 func (c *ProjectsLocationsSourcesFetchInventoryCall) Header() http.Header {
6558 if c.header_ == nil {
6559 c.header_ = make(http.Header)
6560 }
6561 return c.header_
6562 }
6563
6564 func (c *ProjectsLocationsSourcesFetchInventoryCall) doRequest(alt string) (*http.Response, error) {
6565 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6566 if c.ifNoneMatch_ != "" {
6567 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6568 }
6569 var body io.Reader = nil
6570 c.urlParams_.Set("alt", alt)
6571 c.urlParams_.Set("prettyPrint", "false")
6572 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+source}:fetchInventory")
6573 urls += "?" + c.urlParams_.Encode()
6574 req, err := http.NewRequest("GET", urls, body)
6575 if err != nil {
6576 return nil, err
6577 }
6578 req.Header = reqHeaders
6579 googleapi.Expand(req.URL, map[string]string{
6580 "source": c.source,
6581 })
6582 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6583 }
6584
6585
6586
6587
6588
6589
6590
6591 func (c *ProjectsLocationsSourcesFetchInventoryCall) Do(opts ...googleapi.CallOption) (*FetchInventoryResponse, error) {
6592 gensupport.SetOptions(c.urlParams_, opts...)
6593 res, err := c.doRequest("json")
6594 if res != nil && res.StatusCode == http.StatusNotModified {
6595 if res.Body != nil {
6596 res.Body.Close()
6597 }
6598 return nil, gensupport.WrapError(&googleapi.Error{
6599 Code: res.StatusCode,
6600 Header: res.Header,
6601 })
6602 }
6603 if err != nil {
6604 return nil, err
6605 }
6606 defer googleapi.CloseBody(res)
6607 if err := googleapi.CheckResponse(res); err != nil {
6608 return nil, gensupport.WrapError(err)
6609 }
6610 ret := &FetchInventoryResponse{
6611 ServerResponse: googleapi.ServerResponse{
6612 Header: res.Header,
6613 HTTPStatusCode: res.StatusCode,
6614 },
6615 }
6616 target := &ret
6617 if err := gensupport.DecodeResponse(target, res); err != nil {
6618 return nil, err
6619 }
6620 return ret, nil
6621 }
6622
6623
6624
6625
6626 func (c *ProjectsLocationsSourcesFetchInventoryCall) Pages(ctx context.Context, f func(*FetchInventoryResponse) error) error {
6627 c.ctx_ = ctx
6628 defer c.PageToken(c.urlParams_.Get("pageToken"))
6629 for {
6630 x, err := c.Do()
6631 if err != nil {
6632 return err
6633 }
6634 if err := f(x); err != nil {
6635 return err
6636 }
6637 if x.NextPageToken == "" {
6638 return nil
6639 }
6640 c.PageToken(x.NextPageToken)
6641 }
6642 }
6643
6644 type ProjectsLocationsSourcesGetCall struct {
6645 s *Service
6646 name string
6647 urlParams_ gensupport.URLParams
6648 ifNoneMatch_ string
6649 ctx_ context.Context
6650 header_ http.Header
6651 }
6652
6653
6654
6655
6656 func (r *ProjectsLocationsSourcesService) Get(name string) *ProjectsLocationsSourcesGetCall {
6657 c := &ProjectsLocationsSourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6658 c.name = name
6659 return c
6660 }
6661
6662
6663
6664
6665 func (c *ProjectsLocationsSourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesGetCall {
6666 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6667 return c
6668 }
6669
6670
6671
6672
6673 func (c *ProjectsLocationsSourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesGetCall {
6674 c.ifNoneMatch_ = entityTag
6675 return c
6676 }
6677
6678
6679 func (c *ProjectsLocationsSourcesGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesGetCall {
6680 c.ctx_ = ctx
6681 return c
6682 }
6683
6684
6685
6686 func (c *ProjectsLocationsSourcesGetCall) Header() http.Header {
6687 if c.header_ == nil {
6688 c.header_ = make(http.Header)
6689 }
6690 return c.header_
6691 }
6692
6693 func (c *ProjectsLocationsSourcesGetCall) doRequest(alt string) (*http.Response, error) {
6694 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
6695 if c.ifNoneMatch_ != "" {
6696 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6697 }
6698 var body io.Reader = nil
6699 c.urlParams_.Set("alt", alt)
6700 c.urlParams_.Set("prettyPrint", "false")
6701 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6702 urls += "?" + c.urlParams_.Encode()
6703 req, err := http.NewRequest("GET", urls, body)
6704 if err != nil {
6705 return nil, err
6706 }
6707 req.Header = reqHeaders
6708 googleapi.Expand(req.URL, map[string]string{
6709 "name": c.name,
6710 })
6711 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6712 }
6713
6714
6715
6716
6717
6718
6719 func (c *ProjectsLocationsSourcesGetCall) Do(opts ...googleapi.CallOption) (*Source, error) {
6720 gensupport.SetOptions(c.urlParams_, opts...)
6721 res, err := c.doRequest("json")
6722 if res != nil && res.StatusCode == http.StatusNotModified {
6723 if res.Body != nil {
6724 res.Body.Close()
6725 }
6726 return nil, gensupport.WrapError(&googleapi.Error{
6727 Code: res.StatusCode,
6728 Header: res.Header,
6729 })
6730 }
6731 if err != nil {
6732 return nil, err
6733 }
6734 defer googleapi.CloseBody(res)
6735 if err := googleapi.CheckResponse(res); err != nil {
6736 return nil, gensupport.WrapError(err)
6737 }
6738 ret := &Source{
6739 ServerResponse: googleapi.ServerResponse{
6740 Header: res.Header,
6741 HTTPStatusCode: res.StatusCode,
6742 },
6743 }
6744 target := &ret
6745 if err := gensupport.DecodeResponse(target, res); err != nil {
6746 return nil, err
6747 }
6748 return ret, nil
6749 }
6750
6751 type ProjectsLocationsSourcesListCall struct {
6752 s *Service
6753 parent string
6754 urlParams_ gensupport.URLParams
6755 ifNoneMatch_ string
6756 ctx_ context.Context
6757 header_ http.Header
6758 }
6759
6760
6761
6762
6763 func (r *ProjectsLocationsSourcesService) List(parent string) *ProjectsLocationsSourcesListCall {
6764 c := &ProjectsLocationsSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6765 c.parent = parent
6766 return c
6767 }
6768
6769
6770 func (c *ProjectsLocationsSourcesListCall) Filter(filter string) *ProjectsLocationsSourcesListCall {
6771 c.urlParams_.Set("filter", filter)
6772 return c
6773 }
6774
6775
6776
6777 func (c *ProjectsLocationsSourcesListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesListCall {
6778 c.urlParams_.Set("orderBy", orderBy)
6779 return c
6780 }
6781
6782
6783
6784
6785
6786 func (c *ProjectsLocationsSourcesListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesListCall {
6787 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6788 return c
6789 }
6790
6791
6792
6793
6794
6795 func (c *ProjectsLocationsSourcesListCall) PageToken(pageToken string) *ProjectsLocationsSourcesListCall {
6796 c.urlParams_.Set("pageToken", pageToken)
6797 return c
6798 }
6799
6800
6801
6802
6803 func (c *ProjectsLocationsSourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesListCall {
6804 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6805 return c
6806 }
6807
6808
6809
6810
6811 func (c *ProjectsLocationsSourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesListCall {
6812 c.ifNoneMatch_ = entityTag
6813 return c
6814 }
6815
6816
6817 func (c *ProjectsLocationsSourcesListCall) Context(ctx context.Context) *ProjectsLocationsSourcesListCall {
6818 c.ctx_ = ctx
6819 return c
6820 }
6821
6822
6823
6824 func (c *ProjectsLocationsSourcesListCall) Header() http.Header {
6825 if c.header_ == nil {
6826 c.header_ = make(http.Header)
6827 }
6828 return c.header_
6829 }
6830
6831 func (c *ProjectsLocationsSourcesListCall) 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/{+parent}/sources")
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 "parent": c.parent,
6848 })
6849 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6850 }
6851
6852
6853
6854
6855
6856
6857
6858 func (c *ProjectsLocationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesResponse, error) {
6859 gensupport.SetOptions(c.urlParams_, opts...)
6860 res, err := c.doRequest("json")
6861 if res != nil && res.StatusCode == http.StatusNotModified {
6862 if res.Body != nil {
6863 res.Body.Close()
6864 }
6865 return nil, gensupport.WrapError(&googleapi.Error{
6866 Code: res.StatusCode,
6867 Header: res.Header,
6868 })
6869 }
6870 if err != nil {
6871 return nil, err
6872 }
6873 defer googleapi.CloseBody(res)
6874 if err := googleapi.CheckResponse(res); err != nil {
6875 return nil, gensupport.WrapError(err)
6876 }
6877 ret := &ListSourcesResponse{
6878 ServerResponse: googleapi.ServerResponse{
6879 Header: res.Header,
6880 HTTPStatusCode: res.StatusCode,
6881 },
6882 }
6883 target := &ret
6884 if err := gensupport.DecodeResponse(target, res); err != nil {
6885 return nil, err
6886 }
6887 return ret, nil
6888 }
6889
6890
6891
6892
6893 func (c *ProjectsLocationsSourcesListCall) Pages(ctx context.Context, f func(*ListSourcesResponse) error) error {
6894 c.ctx_ = ctx
6895 defer c.PageToken(c.urlParams_.Get("pageToken"))
6896 for {
6897 x, err := c.Do()
6898 if err != nil {
6899 return err
6900 }
6901 if err := f(x); err != nil {
6902 return err
6903 }
6904 if x.NextPageToken == "" {
6905 return nil
6906 }
6907 c.PageToken(x.NextPageToken)
6908 }
6909 }
6910
6911 type ProjectsLocationsSourcesPatchCall struct {
6912 s *Service
6913 name string
6914 source *Source
6915 urlParams_ gensupport.URLParams
6916 ctx_ context.Context
6917 header_ http.Header
6918 }
6919
6920
6921
6922
6923 func (r *ProjectsLocationsSourcesService) Patch(name string, source *Source) *ProjectsLocationsSourcesPatchCall {
6924 c := &ProjectsLocationsSourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6925 c.name = name
6926 c.source = source
6927 return c
6928 }
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941 func (c *ProjectsLocationsSourcesPatchCall) RequestId(requestId string) *ProjectsLocationsSourcesPatchCall {
6942 c.urlParams_.Set("requestId", requestId)
6943 return c
6944 }
6945
6946
6947
6948
6949
6950
6951 func (c *ProjectsLocationsSourcesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSourcesPatchCall {
6952 c.urlParams_.Set("updateMask", updateMask)
6953 return c
6954 }
6955
6956
6957
6958
6959 func (c *ProjectsLocationsSourcesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesPatchCall {
6960 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6961 return c
6962 }
6963
6964
6965 func (c *ProjectsLocationsSourcesPatchCall) Context(ctx context.Context) *ProjectsLocationsSourcesPatchCall {
6966 c.ctx_ = ctx
6967 return c
6968 }
6969
6970
6971
6972 func (c *ProjectsLocationsSourcesPatchCall) Header() http.Header {
6973 if c.header_ == nil {
6974 c.header_ = make(http.Header)
6975 }
6976 return c.header_
6977 }
6978
6979 func (c *ProjectsLocationsSourcesPatchCall) doRequest(alt string) (*http.Response, error) {
6980 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6981 var body io.Reader = nil
6982 body, err := googleapi.WithoutDataWrapper.JSONReader(c.source)
6983 if err != nil {
6984 return nil, err
6985 }
6986 c.urlParams_.Set("alt", alt)
6987 c.urlParams_.Set("prettyPrint", "false")
6988 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6989 urls += "?" + c.urlParams_.Encode()
6990 req, err := http.NewRequest("PATCH", urls, body)
6991 if err != nil {
6992 return nil, err
6993 }
6994 req.Header = reqHeaders
6995 googleapi.Expand(req.URL, map[string]string{
6996 "name": c.name,
6997 })
6998 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6999 }
7000
7001
7002
7003
7004
7005
7006 func (c *ProjectsLocationsSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7007 gensupport.SetOptions(c.urlParams_, opts...)
7008 res, err := c.doRequest("json")
7009 if res != nil && res.StatusCode == http.StatusNotModified {
7010 if res.Body != nil {
7011 res.Body.Close()
7012 }
7013 return nil, gensupport.WrapError(&googleapi.Error{
7014 Code: res.StatusCode,
7015 Header: res.Header,
7016 })
7017 }
7018 if err != nil {
7019 return nil, err
7020 }
7021 defer googleapi.CloseBody(res)
7022 if err := googleapi.CheckResponse(res); err != nil {
7023 return nil, gensupport.WrapError(err)
7024 }
7025 ret := &Operation{
7026 ServerResponse: googleapi.ServerResponse{
7027 Header: res.Header,
7028 HTTPStatusCode: res.StatusCode,
7029 },
7030 }
7031 target := &ret
7032 if err := gensupport.DecodeResponse(target, res); err != nil {
7033 return nil, err
7034 }
7035 return ret, nil
7036 }
7037
7038 type ProjectsLocationsSourcesDatacenterConnectorsCreateCall struct {
7039 s *Service
7040 parent string
7041 datacenterconnector *DatacenterConnector
7042 urlParams_ gensupport.URLParams
7043 ctx_ context.Context
7044 header_ http.Header
7045 }
7046
7047
7048
7049
7050
7051
7052 func (r *ProjectsLocationsSourcesDatacenterConnectorsService) Create(parent string, datacenterconnector *DatacenterConnector) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
7053 c := &ProjectsLocationsSourcesDatacenterConnectorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7054 c.parent = parent
7055 c.datacenterconnector = datacenterconnector
7056 return c
7057 }
7058
7059
7060
7061 func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) DatacenterConnectorId(datacenterConnectorId string) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
7062 c.urlParams_.Set("datacenterConnectorId", datacenterConnectorId)
7063 return c
7064 }
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077 func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
7078 c.urlParams_.Set("requestId", requestId)
7079 return c
7080 }
7081
7082
7083
7084
7085 func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
7086 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7087 return c
7088 }
7089
7090
7091 func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
7092 c.ctx_ = ctx
7093 return c
7094 }
7095
7096
7097
7098 func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Header() http.Header {
7099 if c.header_ == nil {
7100 c.header_ = make(http.Header)
7101 }
7102 return c.header_
7103 }
7104
7105 func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) doRequest(alt string) (*http.Response, error) {
7106 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7107 var body io.Reader = nil
7108 body, err := googleapi.WithoutDataWrapper.JSONReader(c.datacenterconnector)
7109 if err != nil {
7110 return nil, err
7111 }
7112 c.urlParams_.Set("alt", alt)
7113 c.urlParams_.Set("prettyPrint", "false")
7114 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datacenterConnectors")
7115 urls += "?" + c.urlParams_.Encode()
7116 req, err := http.NewRequest("POST", urls, body)
7117 if err != nil {
7118 return nil, err
7119 }
7120 req.Header = reqHeaders
7121 googleapi.Expand(req.URL, map[string]string{
7122 "parent": c.parent,
7123 })
7124 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7125 }
7126
7127
7128
7129
7130
7131
7132 func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7133 gensupport.SetOptions(c.urlParams_, opts...)
7134 res, err := c.doRequest("json")
7135 if res != nil && res.StatusCode == http.StatusNotModified {
7136 if res.Body != nil {
7137 res.Body.Close()
7138 }
7139 return nil, gensupport.WrapError(&googleapi.Error{
7140 Code: res.StatusCode,
7141 Header: res.Header,
7142 })
7143 }
7144 if err != nil {
7145 return nil, err
7146 }
7147 defer googleapi.CloseBody(res)
7148 if err := googleapi.CheckResponse(res); err != nil {
7149 return nil, gensupport.WrapError(err)
7150 }
7151 ret := &Operation{
7152 ServerResponse: googleapi.ServerResponse{
7153 Header: res.Header,
7154 HTTPStatusCode: res.StatusCode,
7155 },
7156 }
7157 target := &ret
7158 if err := gensupport.DecodeResponse(target, res); err != nil {
7159 return nil, err
7160 }
7161 return ret, nil
7162 }
7163
7164 type ProjectsLocationsSourcesDatacenterConnectorsDeleteCall struct {
7165 s *Service
7166 name string
7167 urlParams_ gensupport.URLParams
7168 ctx_ context.Context
7169 header_ http.Header
7170 }
7171
7172
7173
7174
7175 func (r *ProjectsLocationsSourcesDatacenterConnectorsService) Delete(name string) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
7176 c := &ProjectsLocationsSourcesDatacenterConnectorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7177 c.name = name
7178 return c
7179 }
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192 func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
7193 c.urlParams_.Set("requestId", requestId)
7194 return c
7195 }
7196
7197
7198
7199
7200 func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
7201 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7202 return c
7203 }
7204
7205
7206 func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
7207 c.ctx_ = ctx
7208 return c
7209 }
7210
7211
7212
7213 func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Header() http.Header {
7214 if c.header_ == nil {
7215 c.header_ = make(http.Header)
7216 }
7217 return c.header_
7218 }
7219
7220 func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) doRequest(alt string) (*http.Response, error) {
7221 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7222 var body io.Reader = nil
7223 c.urlParams_.Set("alt", alt)
7224 c.urlParams_.Set("prettyPrint", "false")
7225 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7226 urls += "?" + c.urlParams_.Encode()
7227 req, err := http.NewRequest("DELETE", urls, body)
7228 if err != nil {
7229 return nil, err
7230 }
7231 req.Header = reqHeaders
7232 googleapi.Expand(req.URL, map[string]string{
7233 "name": c.name,
7234 })
7235 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7236 }
7237
7238
7239
7240
7241
7242
7243 func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7244 gensupport.SetOptions(c.urlParams_, opts...)
7245 res, err := c.doRequest("json")
7246 if res != nil && res.StatusCode == http.StatusNotModified {
7247 if res.Body != nil {
7248 res.Body.Close()
7249 }
7250 return nil, gensupport.WrapError(&googleapi.Error{
7251 Code: res.StatusCode,
7252 Header: res.Header,
7253 })
7254 }
7255 if err != nil {
7256 return nil, err
7257 }
7258 defer googleapi.CloseBody(res)
7259 if err := googleapi.CheckResponse(res); err != nil {
7260 return nil, gensupport.WrapError(err)
7261 }
7262 ret := &Operation{
7263 ServerResponse: googleapi.ServerResponse{
7264 Header: res.Header,
7265 HTTPStatusCode: res.StatusCode,
7266 },
7267 }
7268 target := &ret
7269 if err := gensupport.DecodeResponse(target, res); err != nil {
7270 return nil, err
7271 }
7272 return ret, nil
7273 }
7274
7275 type ProjectsLocationsSourcesDatacenterConnectorsGetCall struct {
7276 s *Service
7277 name string
7278 urlParams_ gensupport.URLParams
7279 ifNoneMatch_ string
7280 ctx_ context.Context
7281 header_ http.Header
7282 }
7283
7284
7285
7286
7287 func (r *ProjectsLocationsSourcesDatacenterConnectorsService) Get(name string) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
7288 c := &ProjectsLocationsSourcesDatacenterConnectorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7289 c.name = name
7290 return c
7291 }
7292
7293
7294
7295
7296 func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
7297 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7298 return c
7299 }
7300
7301
7302
7303
7304 func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
7305 c.ifNoneMatch_ = entityTag
7306 return c
7307 }
7308
7309
7310 func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
7311 c.ctx_ = ctx
7312 return c
7313 }
7314
7315
7316
7317 func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Header() http.Header {
7318 if c.header_ == nil {
7319 c.header_ = make(http.Header)
7320 }
7321 return c.header_
7322 }
7323
7324 func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) doRequest(alt string) (*http.Response, error) {
7325 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7326 if c.ifNoneMatch_ != "" {
7327 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7328 }
7329 var body io.Reader = nil
7330 c.urlParams_.Set("alt", alt)
7331 c.urlParams_.Set("prettyPrint", "false")
7332 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7333 urls += "?" + c.urlParams_.Encode()
7334 req, err := http.NewRequest("GET", urls, body)
7335 if err != nil {
7336 return nil, err
7337 }
7338 req.Header = reqHeaders
7339 googleapi.Expand(req.URL, map[string]string{
7340 "name": c.name,
7341 })
7342 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7343 }
7344
7345
7346
7347
7348
7349
7350
7351 func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Do(opts ...googleapi.CallOption) (*DatacenterConnector, error) {
7352 gensupport.SetOptions(c.urlParams_, opts...)
7353 res, err := c.doRequest("json")
7354 if res != nil && res.StatusCode == http.StatusNotModified {
7355 if res.Body != nil {
7356 res.Body.Close()
7357 }
7358 return nil, gensupport.WrapError(&googleapi.Error{
7359 Code: res.StatusCode,
7360 Header: res.Header,
7361 })
7362 }
7363 if err != nil {
7364 return nil, err
7365 }
7366 defer googleapi.CloseBody(res)
7367 if err := googleapi.CheckResponse(res); err != nil {
7368 return nil, gensupport.WrapError(err)
7369 }
7370 ret := &DatacenterConnector{
7371 ServerResponse: googleapi.ServerResponse{
7372 Header: res.Header,
7373 HTTPStatusCode: res.StatusCode,
7374 },
7375 }
7376 target := &ret
7377 if err := gensupport.DecodeResponse(target, res); err != nil {
7378 return nil, err
7379 }
7380 return ret, nil
7381 }
7382
7383 type ProjectsLocationsSourcesDatacenterConnectorsListCall struct {
7384 s *Service
7385 parent string
7386 urlParams_ gensupport.URLParams
7387 ifNoneMatch_ string
7388 ctx_ context.Context
7389 header_ http.Header
7390 }
7391
7392
7393
7394
7395 func (r *ProjectsLocationsSourcesDatacenterConnectorsService) List(parent string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
7396 c := &ProjectsLocationsSourcesDatacenterConnectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7397 c.parent = parent
7398 return c
7399 }
7400
7401
7402 func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Filter(filter string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
7403 c.urlParams_.Set("filter", filter)
7404 return c
7405 }
7406
7407
7408
7409 func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
7410 c.urlParams_.Set("orderBy", orderBy)
7411 return c
7412 }
7413
7414
7415
7416
7417
7418 func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
7419 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7420 return c
7421 }
7422
7423
7424
7425
7426
7427
7428 func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
7429 c.urlParams_.Set("pageToken", pageToken)
7430 return c
7431 }
7432
7433
7434
7435
7436 func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
7437 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7438 return c
7439 }
7440
7441
7442
7443
7444 func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
7445 c.ifNoneMatch_ = entityTag
7446 return c
7447 }
7448
7449
7450 func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
7451 c.ctx_ = ctx
7452 return c
7453 }
7454
7455
7456
7457 func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Header() http.Header {
7458 if c.header_ == nil {
7459 c.header_ = make(http.Header)
7460 }
7461 return c.header_
7462 }
7463
7464 func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) doRequest(alt string) (*http.Response, error) {
7465 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7466 if c.ifNoneMatch_ != "" {
7467 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7468 }
7469 var body io.Reader = nil
7470 c.urlParams_.Set("alt", alt)
7471 c.urlParams_.Set("prettyPrint", "false")
7472 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datacenterConnectors")
7473 urls += "?" + c.urlParams_.Encode()
7474 req, err := http.NewRequest("GET", urls, body)
7475 if err != nil {
7476 return nil, err
7477 }
7478 req.Header = reqHeaders
7479 googleapi.Expand(req.URL, map[string]string{
7480 "parent": c.parent,
7481 })
7482 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7483 }
7484
7485
7486
7487
7488
7489
7490
7491 func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Do(opts ...googleapi.CallOption) (*ListDatacenterConnectorsResponse, error) {
7492 gensupport.SetOptions(c.urlParams_, opts...)
7493 res, err := c.doRequest("json")
7494 if res != nil && res.StatusCode == http.StatusNotModified {
7495 if res.Body != nil {
7496 res.Body.Close()
7497 }
7498 return nil, gensupport.WrapError(&googleapi.Error{
7499 Code: res.StatusCode,
7500 Header: res.Header,
7501 })
7502 }
7503 if err != nil {
7504 return nil, err
7505 }
7506 defer googleapi.CloseBody(res)
7507 if err := googleapi.CheckResponse(res); err != nil {
7508 return nil, gensupport.WrapError(err)
7509 }
7510 ret := &ListDatacenterConnectorsResponse{
7511 ServerResponse: googleapi.ServerResponse{
7512 Header: res.Header,
7513 HTTPStatusCode: res.StatusCode,
7514 },
7515 }
7516 target := &ret
7517 if err := gensupport.DecodeResponse(target, res); err != nil {
7518 return nil, err
7519 }
7520 return ret, nil
7521 }
7522
7523
7524
7525
7526 func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Pages(ctx context.Context, f func(*ListDatacenterConnectorsResponse) error) error {
7527 c.ctx_ = ctx
7528 defer c.PageToken(c.urlParams_.Get("pageToken"))
7529 for {
7530 x, err := c.Do()
7531 if err != nil {
7532 return err
7533 }
7534 if err := f(x); err != nil {
7535 return err
7536 }
7537 if x.NextPageToken == "" {
7538 return nil
7539 }
7540 c.PageToken(x.NextPageToken)
7541 }
7542 }
7543
7544 type ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall struct {
7545 s *Service
7546 datacenterConnector string
7547 upgradeappliancerequest *UpgradeApplianceRequest
7548 urlParams_ gensupport.URLParams
7549 ctx_ context.Context
7550 header_ http.Header
7551 }
7552
7553
7554
7555
7556
7557 func (r *ProjectsLocationsSourcesDatacenterConnectorsService) UpgradeAppliance(datacenterConnector string, upgradeappliancerequest *UpgradeApplianceRequest) *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall {
7558 c := &ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7559 c.datacenterConnector = datacenterConnector
7560 c.upgradeappliancerequest = upgradeappliancerequest
7561 return c
7562 }
7563
7564
7565
7566
7567 func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall {
7568 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7569 return c
7570 }
7571
7572
7573 func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall {
7574 c.ctx_ = ctx
7575 return c
7576 }
7577
7578
7579
7580 func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) Header() http.Header {
7581 if c.header_ == nil {
7582 c.header_ = make(http.Header)
7583 }
7584 return c.header_
7585 }
7586
7587 func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) doRequest(alt string) (*http.Response, error) {
7588 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7589 var body io.Reader = nil
7590 body, err := googleapi.WithoutDataWrapper.JSONReader(c.upgradeappliancerequest)
7591 if err != nil {
7592 return nil, err
7593 }
7594 c.urlParams_.Set("alt", alt)
7595 c.urlParams_.Set("prettyPrint", "false")
7596 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+datacenterConnector}:upgradeAppliance")
7597 urls += "?" + c.urlParams_.Encode()
7598 req, err := http.NewRequest("POST", urls, body)
7599 if err != nil {
7600 return nil, err
7601 }
7602 req.Header = reqHeaders
7603 googleapi.Expand(req.URL, map[string]string{
7604 "datacenterConnector": c.datacenterConnector,
7605 })
7606 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7607 }
7608
7609
7610
7611
7612
7613
7614 func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7615 gensupport.SetOptions(c.urlParams_, opts...)
7616 res, err := c.doRequest("json")
7617 if res != nil && res.StatusCode == http.StatusNotModified {
7618 if res.Body != nil {
7619 res.Body.Close()
7620 }
7621 return nil, gensupport.WrapError(&googleapi.Error{
7622 Code: res.StatusCode,
7623 Header: res.Header,
7624 })
7625 }
7626 if err != nil {
7627 return nil, err
7628 }
7629 defer googleapi.CloseBody(res)
7630 if err := googleapi.CheckResponse(res); err != nil {
7631 return nil, gensupport.WrapError(err)
7632 }
7633 ret := &Operation{
7634 ServerResponse: googleapi.ServerResponse{
7635 Header: res.Header,
7636 HTTPStatusCode: res.StatusCode,
7637 },
7638 }
7639 target := &ret
7640 if err := gensupport.DecodeResponse(target, res); err != nil {
7641 return nil, err
7642 }
7643 return ret, nil
7644 }
7645
7646 type ProjectsLocationsSourcesMigratingVmsCreateCall struct {
7647 s *Service
7648 parent string
7649 migratingvm *MigratingVm
7650 urlParams_ gensupport.URLParams
7651 ctx_ context.Context
7652 header_ http.Header
7653 }
7654
7655
7656
7657
7658 func (r *ProjectsLocationsSourcesMigratingVmsService) Create(parent string, migratingvm *MigratingVm) *ProjectsLocationsSourcesMigratingVmsCreateCall {
7659 c := &ProjectsLocationsSourcesMigratingVmsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7660 c.parent = parent
7661 c.migratingvm = migratingvm
7662 return c
7663 }
7664
7665
7666
7667 func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) MigratingVmId(migratingVmId string) *ProjectsLocationsSourcesMigratingVmsCreateCall {
7668 c.urlParams_.Set("migratingVmId", migratingVmId)
7669 return c
7670 }
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683 func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsCreateCall {
7684 c.urlParams_.Set("requestId", requestId)
7685 return c
7686 }
7687
7688
7689
7690
7691 func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCreateCall {
7692 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7693 return c
7694 }
7695
7696
7697 func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCreateCall {
7698 c.ctx_ = ctx
7699 return c
7700 }
7701
7702
7703
7704 func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Header() http.Header {
7705 if c.header_ == nil {
7706 c.header_ = make(http.Header)
7707 }
7708 return c.header_
7709 }
7710
7711 func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) doRequest(alt string) (*http.Response, error) {
7712 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7713 var body io.Reader = nil
7714 body, err := googleapi.WithoutDataWrapper.JSONReader(c.migratingvm)
7715 if err != nil {
7716 return nil, err
7717 }
7718 c.urlParams_.Set("alt", alt)
7719 c.urlParams_.Set("prettyPrint", "false")
7720 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratingVms")
7721 urls += "?" + c.urlParams_.Encode()
7722 req, err := http.NewRequest("POST", urls, body)
7723 if err != nil {
7724 return nil, err
7725 }
7726 req.Header = reqHeaders
7727 googleapi.Expand(req.URL, map[string]string{
7728 "parent": c.parent,
7729 })
7730 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7731 }
7732
7733
7734
7735
7736
7737
7738 func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7739 gensupport.SetOptions(c.urlParams_, opts...)
7740 res, err := c.doRequest("json")
7741 if res != nil && res.StatusCode == http.StatusNotModified {
7742 if res.Body != nil {
7743 res.Body.Close()
7744 }
7745 return nil, gensupport.WrapError(&googleapi.Error{
7746 Code: res.StatusCode,
7747 Header: res.Header,
7748 })
7749 }
7750 if err != nil {
7751 return nil, err
7752 }
7753 defer googleapi.CloseBody(res)
7754 if err := googleapi.CheckResponse(res); err != nil {
7755 return nil, gensupport.WrapError(err)
7756 }
7757 ret := &Operation{
7758 ServerResponse: googleapi.ServerResponse{
7759 Header: res.Header,
7760 HTTPStatusCode: res.StatusCode,
7761 },
7762 }
7763 target := &ret
7764 if err := gensupport.DecodeResponse(target, res); err != nil {
7765 return nil, err
7766 }
7767 return ret, nil
7768 }
7769
7770 type ProjectsLocationsSourcesMigratingVmsDeleteCall struct {
7771 s *Service
7772 name string
7773 urlParams_ gensupport.URLParams
7774 ctx_ context.Context
7775 header_ http.Header
7776 }
7777
7778
7779
7780
7781 func (r *ProjectsLocationsSourcesMigratingVmsService) Delete(name string) *ProjectsLocationsSourcesMigratingVmsDeleteCall {
7782 c := &ProjectsLocationsSourcesMigratingVmsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7783 c.name = name
7784 return c
7785 }
7786
7787
7788
7789
7790 func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsDeleteCall {
7791 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7792 return c
7793 }
7794
7795
7796 func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsDeleteCall {
7797 c.ctx_ = ctx
7798 return c
7799 }
7800
7801
7802
7803 func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Header() http.Header {
7804 if c.header_ == nil {
7805 c.header_ = make(http.Header)
7806 }
7807 return c.header_
7808 }
7809
7810 func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) doRequest(alt string) (*http.Response, error) {
7811 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7812 var body io.Reader = nil
7813 c.urlParams_.Set("alt", alt)
7814 c.urlParams_.Set("prettyPrint", "false")
7815 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7816 urls += "?" + c.urlParams_.Encode()
7817 req, err := http.NewRequest("DELETE", urls, body)
7818 if err != nil {
7819 return nil, err
7820 }
7821 req.Header = reqHeaders
7822 googleapi.Expand(req.URL, map[string]string{
7823 "name": c.name,
7824 })
7825 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7826 }
7827
7828
7829
7830
7831
7832
7833 func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7834 gensupport.SetOptions(c.urlParams_, opts...)
7835 res, err := c.doRequest("json")
7836 if res != nil && res.StatusCode == http.StatusNotModified {
7837 if res.Body != nil {
7838 res.Body.Close()
7839 }
7840 return nil, gensupport.WrapError(&googleapi.Error{
7841 Code: res.StatusCode,
7842 Header: res.Header,
7843 })
7844 }
7845 if err != nil {
7846 return nil, err
7847 }
7848 defer googleapi.CloseBody(res)
7849 if err := googleapi.CheckResponse(res); err != nil {
7850 return nil, gensupport.WrapError(err)
7851 }
7852 ret := &Operation{
7853 ServerResponse: googleapi.ServerResponse{
7854 Header: res.Header,
7855 HTTPStatusCode: res.StatusCode,
7856 },
7857 }
7858 target := &ret
7859 if err := gensupport.DecodeResponse(target, res); err != nil {
7860 return nil, err
7861 }
7862 return ret, nil
7863 }
7864
7865 type ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall struct {
7866 s *Service
7867 migratingVm string
7868 finalizemigrationrequest *FinalizeMigrationRequest
7869 urlParams_ gensupport.URLParams
7870 ctx_ context.Context
7871 header_ http.Header
7872 }
7873
7874
7875
7876
7877
7878
7879 func (r *ProjectsLocationsSourcesMigratingVmsService) FinalizeMigration(migratingVm string, finalizemigrationrequest *FinalizeMigrationRequest) *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall {
7880 c := &ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7881 c.migratingVm = migratingVm
7882 c.finalizemigrationrequest = finalizemigrationrequest
7883 return c
7884 }
7885
7886
7887
7888
7889 func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall {
7890 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7891 return c
7892 }
7893
7894
7895 func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall {
7896 c.ctx_ = ctx
7897 return c
7898 }
7899
7900
7901
7902 func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Header() http.Header {
7903 if c.header_ == nil {
7904 c.header_ = make(http.Header)
7905 }
7906 return c.header_
7907 }
7908
7909 func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) doRequest(alt string) (*http.Response, error) {
7910 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7911 var body io.Reader = nil
7912 body, err := googleapi.WithoutDataWrapper.JSONReader(c.finalizemigrationrequest)
7913 if err != nil {
7914 return nil, err
7915 }
7916 c.urlParams_.Set("alt", alt)
7917 c.urlParams_.Set("prettyPrint", "false")
7918 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migratingVm}:finalizeMigration")
7919 urls += "?" + c.urlParams_.Encode()
7920 req, err := http.NewRequest("POST", urls, body)
7921 if err != nil {
7922 return nil, err
7923 }
7924 req.Header = reqHeaders
7925 googleapi.Expand(req.URL, map[string]string{
7926 "migratingVm": c.migratingVm,
7927 })
7928 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7929 }
7930
7931
7932
7933
7934
7935
7936 func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7937 gensupport.SetOptions(c.urlParams_, opts...)
7938 res, err := c.doRequest("json")
7939 if res != nil && res.StatusCode == http.StatusNotModified {
7940 if res.Body != nil {
7941 res.Body.Close()
7942 }
7943 return nil, gensupport.WrapError(&googleapi.Error{
7944 Code: res.StatusCode,
7945 Header: res.Header,
7946 })
7947 }
7948 if err != nil {
7949 return nil, err
7950 }
7951 defer googleapi.CloseBody(res)
7952 if err := googleapi.CheckResponse(res); err != nil {
7953 return nil, gensupport.WrapError(err)
7954 }
7955 ret := &Operation{
7956 ServerResponse: googleapi.ServerResponse{
7957 Header: res.Header,
7958 HTTPStatusCode: res.StatusCode,
7959 },
7960 }
7961 target := &ret
7962 if err := gensupport.DecodeResponse(target, res); err != nil {
7963 return nil, err
7964 }
7965 return ret, nil
7966 }
7967
7968 type ProjectsLocationsSourcesMigratingVmsGetCall struct {
7969 s *Service
7970 name string
7971 urlParams_ gensupport.URLParams
7972 ifNoneMatch_ string
7973 ctx_ context.Context
7974 header_ http.Header
7975 }
7976
7977
7978
7979
7980 func (r *ProjectsLocationsSourcesMigratingVmsService) Get(name string) *ProjectsLocationsSourcesMigratingVmsGetCall {
7981 c := &ProjectsLocationsSourcesMigratingVmsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7982 c.name = name
7983 return c
7984 }
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000 func (c *ProjectsLocationsSourcesMigratingVmsGetCall) View(view string) *ProjectsLocationsSourcesMigratingVmsGetCall {
8001 c.urlParams_.Set("view", view)
8002 return c
8003 }
8004
8005
8006
8007
8008 func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsGetCall {
8009 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8010 return c
8011 }
8012
8013
8014
8015
8016 func (c *ProjectsLocationsSourcesMigratingVmsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsGetCall {
8017 c.ifNoneMatch_ = entityTag
8018 return c
8019 }
8020
8021
8022 func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsGetCall {
8023 c.ctx_ = ctx
8024 return c
8025 }
8026
8027
8028
8029 func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Header() http.Header {
8030 if c.header_ == nil {
8031 c.header_ = make(http.Header)
8032 }
8033 return c.header_
8034 }
8035
8036 func (c *ProjectsLocationsSourcesMigratingVmsGetCall) doRequest(alt string) (*http.Response, error) {
8037 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8038 if c.ifNoneMatch_ != "" {
8039 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8040 }
8041 var body io.Reader = nil
8042 c.urlParams_.Set("alt", alt)
8043 c.urlParams_.Set("prettyPrint", "false")
8044 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8045 urls += "?" + c.urlParams_.Encode()
8046 req, err := http.NewRequest("GET", urls, body)
8047 if err != nil {
8048 return nil, err
8049 }
8050 req.Header = reqHeaders
8051 googleapi.Expand(req.URL, map[string]string{
8052 "name": c.name,
8053 })
8054 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8055 }
8056
8057
8058
8059
8060
8061
8062 func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Do(opts ...googleapi.CallOption) (*MigratingVm, error) {
8063 gensupport.SetOptions(c.urlParams_, opts...)
8064 res, err := c.doRequest("json")
8065 if res != nil && res.StatusCode == http.StatusNotModified {
8066 if res.Body != nil {
8067 res.Body.Close()
8068 }
8069 return nil, gensupport.WrapError(&googleapi.Error{
8070 Code: res.StatusCode,
8071 Header: res.Header,
8072 })
8073 }
8074 if err != nil {
8075 return nil, err
8076 }
8077 defer googleapi.CloseBody(res)
8078 if err := googleapi.CheckResponse(res); err != nil {
8079 return nil, gensupport.WrapError(err)
8080 }
8081 ret := &MigratingVm{
8082 ServerResponse: googleapi.ServerResponse{
8083 Header: res.Header,
8084 HTTPStatusCode: res.StatusCode,
8085 },
8086 }
8087 target := &ret
8088 if err := gensupport.DecodeResponse(target, res); err != nil {
8089 return nil, err
8090 }
8091 return ret, nil
8092 }
8093
8094 type ProjectsLocationsSourcesMigratingVmsListCall struct {
8095 s *Service
8096 parent string
8097 urlParams_ gensupport.URLParams
8098 ifNoneMatch_ string
8099 ctx_ context.Context
8100 header_ http.Header
8101 }
8102
8103
8104
8105
8106 func (r *ProjectsLocationsSourcesMigratingVmsService) List(parent string) *ProjectsLocationsSourcesMigratingVmsListCall {
8107 c := &ProjectsLocationsSourcesMigratingVmsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8108 c.parent = parent
8109 return c
8110 }
8111
8112
8113 func (c *ProjectsLocationsSourcesMigratingVmsListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsListCall {
8114 c.urlParams_.Set("filter", filter)
8115 return c
8116 }
8117
8118
8119
8120 func (c *ProjectsLocationsSourcesMigratingVmsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsListCall {
8121 c.urlParams_.Set("orderBy", orderBy)
8122 return c
8123 }
8124
8125
8126
8127
8128
8129 func (c *ProjectsLocationsSourcesMigratingVmsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsListCall {
8130 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8131 return c
8132 }
8133
8134
8135
8136
8137
8138 func (c *ProjectsLocationsSourcesMigratingVmsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsListCall {
8139 c.urlParams_.Set("pageToken", pageToken)
8140 return c
8141 }
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157 func (c *ProjectsLocationsSourcesMigratingVmsListCall) View(view string) *ProjectsLocationsSourcesMigratingVmsListCall {
8158 c.urlParams_.Set("view", view)
8159 return c
8160 }
8161
8162
8163
8164
8165 func (c *ProjectsLocationsSourcesMigratingVmsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsListCall {
8166 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8167 return c
8168 }
8169
8170
8171
8172
8173 func (c *ProjectsLocationsSourcesMigratingVmsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsListCall {
8174 c.ifNoneMatch_ = entityTag
8175 return c
8176 }
8177
8178
8179 func (c *ProjectsLocationsSourcesMigratingVmsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsListCall {
8180 c.ctx_ = ctx
8181 return c
8182 }
8183
8184
8185
8186 func (c *ProjectsLocationsSourcesMigratingVmsListCall) Header() http.Header {
8187 if c.header_ == nil {
8188 c.header_ = make(http.Header)
8189 }
8190 return c.header_
8191 }
8192
8193 func (c *ProjectsLocationsSourcesMigratingVmsListCall) doRequest(alt string) (*http.Response, error) {
8194 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8195 if c.ifNoneMatch_ != "" {
8196 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8197 }
8198 var body io.Reader = nil
8199 c.urlParams_.Set("alt", alt)
8200 c.urlParams_.Set("prettyPrint", "false")
8201 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratingVms")
8202 urls += "?" + c.urlParams_.Encode()
8203 req, err := http.NewRequest("GET", urls, body)
8204 if err != nil {
8205 return nil, err
8206 }
8207 req.Header = reqHeaders
8208 googleapi.Expand(req.URL, map[string]string{
8209 "parent": c.parent,
8210 })
8211 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8212 }
8213
8214
8215
8216
8217
8218
8219
8220 func (c *ProjectsLocationsSourcesMigratingVmsListCall) Do(opts ...googleapi.CallOption) (*ListMigratingVmsResponse, error) {
8221 gensupport.SetOptions(c.urlParams_, opts...)
8222 res, err := c.doRequest("json")
8223 if res != nil && res.StatusCode == http.StatusNotModified {
8224 if res.Body != nil {
8225 res.Body.Close()
8226 }
8227 return nil, gensupport.WrapError(&googleapi.Error{
8228 Code: res.StatusCode,
8229 Header: res.Header,
8230 })
8231 }
8232 if err != nil {
8233 return nil, err
8234 }
8235 defer googleapi.CloseBody(res)
8236 if err := googleapi.CheckResponse(res); err != nil {
8237 return nil, gensupport.WrapError(err)
8238 }
8239 ret := &ListMigratingVmsResponse{
8240 ServerResponse: googleapi.ServerResponse{
8241 Header: res.Header,
8242 HTTPStatusCode: res.StatusCode,
8243 },
8244 }
8245 target := &ret
8246 if err := gensupport.DecodeResponse(target, res); err != nil {
8247 return nil, err
8248 }
8249 return ret, nil
8250 }
8251
8252
8253
8254
8255 func (c *ProjectsLocationsSourcesMigratingVmsListCall) Pages(ctx context.Context, f func(*ListMigratingVmsResponse) error) error {
8256 c.ctx_ = ctx
8257 defer c.PageToken(c.urlParams_.Get("pageToken"))
8258 for {
8259 x, err := c.Do()
8260 if err != nil {
8261 return err
8262 }
8263 if err := f(x); err != nil {
8264 return err
8265 }
8266 if x.NextPageToken == "" {
8267 return nil
8268 }
8269 c.PageToken(x.NextPageToken)
8270 }
8271 }
8272
8273 type ProjectsLocationsSourcesMigratingVmsPatchCall struct {
8274 s *Service
8275 nameid string
8276 migratingvm *MigratingVm
8277 urlParams_ gensupport.URLParams
8278 ctx_ context.Context
8279 header_ http.Header
8280 }
8281
8282
8283
8284
8285 func (r *ProjectsLocationsSourcesMigratingVmsService) Patch(nameid string, migratingvm *MigratingVm) *ProjectsLocationsSourcesMigratingVmsPatchCall {
8286 c := &ProjectsLocationsSourcesMigratingVmsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8287 c.nameid = nameid
8288 c.migratingvm = migratingvm
8289 return c
8290 }
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303 func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsPatchCall {
8304 c.urlParams_.Set("requestId", requestId)
8305 return c
8306 }
8307
8308
8309
8310
8311
8312
8313
8314 func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSourcesMigratingVmsPatchCall {
8315 c.urlParams_.Set("updateMask", updateMask)
8316 return c
8317 }
8318
8319
8320
8321
8322 func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsPatchCall {
8323 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8324 return c
8325 }
8326
8327
8328 func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsPatchCall {
8329 c.ctx_ = ctx
8330 return c
8331 }
8332
8333
8334
8335 func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Header() http.Header {
8336 if c.header_ == nil {
8337 c.header_ = make(http.Header)
8338 }
8339 return c.header_
8340 }
8341
8342 func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) doRequest(alt string) (*http.Response, error) {
8343 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8344 var body io.Reader = nil
8345 body, err := googleapi.WithoutDataWrapper.JSONReader(c.migratingvm)
8346 if err != nil {
8347 return nil, err
8348 }
8349 c.urlParams_.Set("alt", alt)
8350 c.urlParams_.Set("prettyPrint", "false")
8351 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8352 urls += "?" + c.urlParams_.Encode()
8353 req, err := http.NewRequest("PATCH", urls, body)
8354 if err != nil {
8355 return nil, err
8356 }
8357 req.Header = reqHeaders
8358 googleapi.Expand(req.URL, map[string]string{
8359 "name": c.nameid,
8360 })
8361 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8362 }
8363
8364
8365
8366
8367
8368
8369 func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8370 gensupport.SetOptions(c.urlParams_, opts...)
8371 res, err := c.doRequest("json")
8372 if res != nil && res.StatusCode == http.StatusNotModified {
8373 if res.Body != nil {
8374 res.Body.Close()
8375 }
8376 return nil, gensupport.WrapError(&googleapi.Error{
8377 Code: res.StatusCode,
8378 Header: res.Header,
8379 })
8380 }
8381 if err != nil {
8382 return nil, err
8383 }
8384 defer googleapi.CloseBody(res)
8385 if err := googleapi.CheckResponse(res); err != nil {
8386 return nil, gensupport.WrapError(err)
8387 }
8388 ret := &Operation{
8389 ServerResponse: googleapi.ServerResponse{
8390 Header: res.Header,
8391 HTTPStatusCode: res.StatusCode,
8392 },
8393 }
8394 target := &ret
8395 if err := gensupport.DecodeResponse(target, res); err != nil {
8396 return nil, err
8397 }
8398 return ret, nil
8399 }
8400
8401 type ProjectsLocationsSourcesMigratingVmsPauseMigrationCall struct {
8402 s *Service
8403 migratingVm string
8404 pausemigrationrequest *PauseMigrationRequest
8405 urlParams_ gensupport.URLParams
8406 ctx_ context.Context
8407 header_ http.Header
8408 }
8409
8410
8411
8412
8413
8414
8415 func (r *ProjectsLocationsSourcesMigratingVmsService) PauseMigration(migratingVm string, pausemigrationrequest *PauseMigrationRequest) *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall {
8416 c := &ProjectsLocationsSourcesMigratingVmsPauseMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8417 c.migratingVm = migratingVm
8418 c.pausemigrationrequest = pausemigrationrequest
8419 return c
8420 }
8421
8422
8423
8424
8425 func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall {
8426 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8427 return c
8428 }
8429
8430
8431 func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall {
8432 c.ctx_ = ctx
8433 return c
8434 }
8435
8436
8437
8438 func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Header() http.Header {
8439 if c.header_ == nil {
8440 c.header_ = make(http.Header)
8441 }
8442 return c.header_
8443 }
8444
8445 func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) doRequest(alt string) (*http.Response, error) {
8446 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8447 var body io.Reader = nil
8448 body, err := googleapi.WithoutDataWrapper.JSONReader(c.pausemigrationrequest)
8449 if err != nil {
8450 return nil, err
8451 }
8452 c.urlParams_.Set("alt", alt)
8453 c.urlParams_.Set("prettyPrint", "false")
8454 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migratingVm}:pauseMigration")
8455 urls += "?" + c.urlParams_.Encode()
8456 req, err := http.NewRequest("POST", urls, body)
8457 if err != nil {
8458 return nil, err
8459 }
8460 req.Header = reqHeaders
8461 googleapi.Expand(req.URL, map[string]string{
8462 "migratingVm": c.migratingVm,
8463 })
8464 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8465 }
8466
8467
8468
8469
8470
8471
8472 func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8473 gensupport.SetOptions(c.urlParams_, opts...)
8474 res, err := c.doRequest("json")
8475 if res != nil && res.StatusCode == http.StatusNotModified {
8476 if res.Body != nil {
8477 res.Body.Close()
8478 }
8479 return nil, gensupport.WrapError(&googleapi.Error{
8480 Code: res.StatusCode,
8481 Header: res.Header,
8482 })
8483 }
8484 if err != nil {
8485 return nil, err
8486 }
8487 defer googleapi.CloseBody(res)
8488 if err := googleapi.CheckResponse(res); err != nil {
8489 return nil, gensupport.WrapError(err)
8490 }
8491 ret := &Operation{
8492 ServerResponse: googleapi.ServerResponse{
8493 Header: res.Header,
8494 HTTPStatusCode: res.StatusCode,
8495 },
8496 }
8497 target := &ret
8498 if err := gensupport.DecodeResponse(target, res); err != nil {
8499 return nil, err
8500 }
8501 return ret, nil
8502 }
8503
8504 type ProjectsLocationsSourcesMigratingVmsResumeMigrationCall struct {
8505 s *Service
8506 migratingVm string
8507 resumemigrationrequest *ResumeMigrationRequest
8508 urlParams_ gensupport.URLParams
8509 ctx_ context.Context
8510 header_ http.Header
8511 }
8512
8513
8514
8515
8516
8517
8518
8519 func (r *ProjectsLocationsSourcesMigratingVmsService) ResumeMigration(migratingVm string, resumemigrationrequest *ResumeMigrationRequest) *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall {
8520 c := &ProjectsLocationsSourcesMigratingVmsResumeMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8521 c.migratingVm = migratingVm
8522 c.resumemigrationrequest = resumemigrationrequest
8523 return c
8524 }
8525
8526
8527
8528
8529 func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall {
8530 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8531 return c
8532 }
8533
8534
8535 func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall {
8536 c.ctx_ = ctx
8537 return c
8538 }
8539
8540
8541
8542 func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Header() http.Header {
8543 if c.header_ == nil {
8544 c.header_ = make(http.Header)
8545 }
8546 return c.header_
8547 }
8548
8549 func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) doRequest(alt string) (*http.Response, error) {
8550 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8551 var body io.Reader = nil
8552 body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumemigrationrequest)
8553 if err != nil {
8554 return nil, err
8555 }
8556 c.urlParams_.Set("alt", alt)
8557 c.urlParams_.Set("prettyPrint", "false")
8558 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migratingVm}:resumeMigration")
8559 urls += "?" + c.urlParams_.Encode()
8560 req, err := http.NewRequest("POST", urls, body)
8561 if err != nil {
8562 return nil, err
8563 }
8564 req.Header = reqHeaders
8565 googleapi.Expand(req.URL, map[string]string{
8566 "migratingVm": c.migratingVm,
8567 })
8568 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8569 }
8570
8571
8572
8573
8574
8575
8576 func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8577 gensupport.SetOptions(c.urlParams_, opts...)
8578 res, err := c.doRequest("json")
8579 if res != nil && res.StatusCode == http.StatusNotModified {
8580 if res.Body != nil {
8581 res.Body.Close()
8582 }
8583 return nil, gensupport.WrapError(&googleapi.Error{
8584 Code: res.StatusCode,
8585 Header: res.Header,
8586 })
8587 }
8588 if err != nil {
8589 return nil, err
8590 }
8591 defer googleapi.CloseBody(res)
8592 if err := googleapi.CheckResponse(res); err != nil {
8593 return nil, gensupport.WrapError(err)
8594 }
8595 ret := &Operation{
8596 ServerResponse: googleapi.ServerResponse{
8597 Header: res.Header,
8598 HTTPStatusCode: res.StatusCode,
8599 },
8600 }
8601 target := &ret
8602 if err := gensupport.DecodeResponse(target, res); err != nil {
8603 return nil, err
8604 }
8605 return ret, nil
8606 }
8607
8608 type ProjectsLocationsSourcesMigratingVmsStartMigrationCall struct {
8609 s *Service
8610 migratingVm string
8611 startmigrationrequest *StartMigrationRequest
8612 urlParams_ gensupport.URLParams
8613 ctx_ context.Context
8614 header_ http.Header
8615 }
8616
8617
8618
8619
8620
8621 func (r *ProjectsLocationsSourcesMigratingVmsService) StartMigration(migratingVm string, startmigrationrequest *StartMigrationRequest) *ProjectsLocationsSourcesMigratingVmsStartMigrationCall {
8622 c := &ProjectsLocationsSourcesMigratingVmsStartMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8623 c.migratingVm = migratingVm
8624 c.startmigrationrequest = startmigrationrequest
8625 return c
8626 }
8627
8628
8629
8630
8631 func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsStartMigrationCall {
8632 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8633 return c
8634 }
8635
8636
8637 func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsStartMigrationCall {
8638 c.ctx_ = ctx
8639 return c
8640 }
8641
8642
8643
8644 func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Header() http.Header {
8645 if c.header_ == nil {
8646 c.header_ = make(http.Header)
8647 }
8648 return c.header_
8649 }
8650
8651 func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) doRequest(alt string) (*http.Response, error) {
8652 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8653 var body io.Reader = nil
8654 body, err := googleapi.WithoutDataWrapper.JSONReader(c.startmigrationrequest)
8655 if err != nil {
8656 return nil, err
8657 }
8658 c.urlParams_.Set("alt", alt)
8659 c.urlParams_.Set("prettyPrint", "false")
8660 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migratingVm}:startMigration")
8661 urls += "?" + c.urlParams_.Encode()
8662 req, err := http.NewRequest("POST", urls, body)
8663 if err != nil {
8664 return nil, err
8665 }
8666 req.Header = reqHeaders
8667 googleapi.Expand(req.URL, map[string]string{
8668 "migratingVm": c.migratingVm,
8669 })
8670 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8671 }
8672
8673
8674
8675
8676
8677
8678 func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8679 gensupport.SetOptions(c.urlParams_, opts...)
8680 res, err := c.doRequest("json")
8681 if res != nil && res.StatusCode == http.StatusNotModified {
8682 if res.Body != nil {
8683 res.Body.Close()
8684 }
8685 return nil, gensupport.WrapError(&googleapi.Error{
8686 Code: res.StatusCode,
8687 Header: res.Header,
8688 })
8689 }
8690 if err != nil {
8691 return nil, err
8692 }
8693 defer googleapi.CloseBody(res)
8694 if err := googleapi.CheckResponse(res); err != nil {
8695 return nil, gensupport.WrapError(err)
8696 }
8697 ret := &Operation{
8698 ServerResponse: googleapi.ServerResponse{
8699 Header: res.Header,
8700 HTTPStatusCode: res.StatusCode,
8701 },
8702 }
8703 target := &ret
8704 if err := gensupport.DecodeResponse(target, res); err != nil {
8705 return nil, err
8706 }
8707 return ret, nil
8708 }
8709
8710 type ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall struct {
8711 s *Service
8712 name string
8713 cancelclonejobrequest *CancelCloneJobRequest
8714 urlParams_ gensupport.URLParams
8715 ctx_ context.Context
8716 header_ http.Header
8717 }
8718
8719
8720
8721
8722 func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) Cancel(name string, cancelclonejobrequest *CancelCloneJobRequest) *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall {
8723 c := &ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8724 c.name = name
8725 c.cancelclonejobrequest = cancelclonejobrequest
8726 return c
8727 }
8728
8729
8730
8731
8732 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall {
8733 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8734 return c
8735 }
8736
8737
8738 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall {
8739 c.ctx_ = ctx
8740 return c
8741 }
8742
8743
8744
8745 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Header() http.Header {
8746 if c.header_ == nil {
8747 c.header_ = make(http.Header)
8748 }
8749 return c.header_
8750 }
8751
8752 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) doRequest(alt string) (*http.Response, error) {
8753 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8754 var body io.Reader = nil
8755 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelclonejobrequest)
8756 if err != nil {
8757 return nil, err
8758 }
8759 c.urlParams_.Set("alt", alt)
8760 c.urlParams_.Set("prettyPrint", "false")
8761 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
8762 urls += "?" + c.urlParams_.Encode()
8763 req, err := http.NewRequest("POST", urls, body)
8764 if err != nil {
8765 return nil, err
8766 }
8767 req.Header = reqHeaders
8768 googleapi.Expand(req.URL, map[string]string{
8769 "name": c.name,
8770 })
8771 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8772 }
8773
8774
8775
8776
8777
8778
8779 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8780 gensupport.SetOptions(c.urlParams_, opts...)
8781 res, err := c.doRequest("json")
8782 if res != nil && res.StatusCode == http.StatusNotModified {
8783 if res.Body != nil {
8784 res.Body.Close()
8785 }
8786 return nil, gensupport.WrapError(&googleapi.Error{
8787 Code: res.StatusCode,
8788 Header: res.Header,
8789 })
8790 }
8791 if err != nil {
8792 return nil, err
8793 }
8794 defer googleapi.CloseBody(res)
8795 if err := googleapi.CheckResponse(res); err != nil {
8796 return nil, gensupport.WrapError(err)
8797 }
8798 ret := &Operation{
8799 ServerResponse: googleapi.ServerResponse{
8800 Header: res.Header,
8801 HTTPStatusCode: res.StatusCode,
8802 },
8803 }
8804 target := &ret
8805 if err := gensupport.DecodeResponse(target, res); err != nil {
8806 return nil, err
8807 }
8808 return ret, nil
8809 }
8810
8811 type ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall struct {
8812 s *Service
8813 parent string
8814 clonejob *CloneJob
8815 urlParams_ gensupport.URLParams
8816 ctx_ context.Context
8817 header_ http.Header
8818 }
8819
8820
8821
8822
8823 func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) Create(parent string, clonejob *CloneJob) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8824 c := &ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8825 c.parent = parent
8826 c.clonejob = clonejob
8827 return c
8828 }
8829
8830
8831
8832 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) CloneJobId(cloneJobId string) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8833 c.urlParams_.Set("cloneJobId", cloneJobId)
8834 return c
8835 }
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8849 c.urlParams_.Set("requestId", requestId)
8850 return c
8851 }
8852
8853
8854
8855
8856 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8857 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8858 return c
8859 }
8860
8861
8862 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8863 c.ctx_ = ctx
8864 return c
8865 }
8866
8867
8868
8869 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Header() http.Header {
8870 if c.header_ == nil {
8871 c.header_ = make(http.Header)
8872 }
8873 return c.header_
8874 }
8875
8876 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) doRequest(alt string) (*http.Response, error) {
8877 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8878 var body io.Reader = nil
8879 body, err := googleapi.WithoutDataWrapper.JSONReader(c.clonejob)
8880 if err != nil {
8881 return nil, err
8882 }
8883 c.urlParams_.Set("alt", alt)
8884 c.urlParams_.Set("prettyPrint", "false")
8885 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cloneJobs")
8886 urls += "?" + c.urlParams_.Encode()
8887 req, err := http.NewRequest("POST", urls, body)
8888 if err != nil {
8889 return nil, err
8890 }
8891 req.Header = reqHeaders
8892 googleapi.Expand(req.URL, map[string]string{
8893 "parent": c.parent,
8894 })
8895 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8896 }
8897
8898
8899
8900
8901
8902
8903 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8904 gensupport.SetOptions(c.urlParams_, opts...)
8905 res, err := c.doRequest("json")
8906 if res != nil && res.StatusCode == http.StatusNotModified {
8907 if res.Body != nil {
8908 res.Body.Close()
8909 }
8910 return nil, gensupport.WrapError(&googleapi.Error{
8911 Code: res.StatusCode,
8912 Header: res.Header,
8913 })
8914 }
8915 if err != nil {
8916 return nil, err
8917 }
8918 defer googleapi.CloseBody(res)
8919 if err := googleapi.CheckResponse(res); err != nil {
8920 return nil, gensupport.WrapError(err)
8921 }
8922 ret := &Operation{
8923 ServerResponse: googleapi.ServerResponse{
8924 Header: res.Header,
8925 HTTPStatusCode: res.StatusCode,
8926 },
8927 }
8928 target := &ret
8929 if err := gensupport.DecodeResponse(target, res); err != nil {
8930 return nil, err
8931 }
8932 return ret, nil
8933 }
8934
8935 type ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall struct {
8936 s *Service
8937 name string
8938 urlParams_ gensupport.URLParams
8939 ifNoneMatch_ string
8940 ctx_ context.Context
8941 header_ http.Header
8942 }
8943
8944
8945
8946
8947 func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) Get(name string) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
8948 c := &ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8949 c.name = name
8950 return c
8951 }
8952
8953
8954
8955
8956 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
8957 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8958 return c
8959 }
8960
8961
8962
8963
8964 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
8965 c.ifNoneMatch_ = entityTag
8966 return c
8967 }
8968
8969
8970 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
8971 c.ctx_ = ctx
8972 return c
8973 }
8974
8975
8976
8977 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Header() http.Header {
8978 if c.header_ == nil {
8979 c.header_ = make(http.Header)
8980 }
8981 return c.header_
8982 }
8983
8984 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) doRequest(alt string) (*http.Response, error) {
8985 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8986 if c.ifNoneMatch_ != "" {
8987 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8988 }
8989 var body io.Reader = nil
8990 c.urlParams_.Set("alt", alt)
8991 c.urlParams_.Set("prettyPrint", "false")
8992 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8993 urls += "?" + c.urlParams_.Encode()
8994 req, err := http.NewRequest("GET", urls, body)
8995 if err != nil {
8996 return nil, err
8997 }
8998 req.Header = reqHeaders
8999 googleapi.Expand(req.URL, map[string]string{
9000 "name": c.name,
9001 })
9002 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9003 }
9004
9005
9006
9007
9008
9009
9010 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Do(opts ...googleapi.CallOption) (*CloneJob, error) {
9011 gensupport.SetOptions(c.urlParams_, opts...)
9012 res, err := c.doRequest("json")
9013 if res != nil && res.StatusCode == http.StatusNotModified {
9014 if res.Body != nil {
9015 res.Body.Close()
9016 }
9017 return nil, gensupport.WrapError(&googleapi.Error{
9018 Code: res.StatusCode,
9019 Header: res.Header,
9020 })
9021 }
9022 if err != nil {
9023 return nil, err
9024 }
9025 defer googleapi.CloseBody(res)
9026 if err := googleapi.CheckResponse(res); err != nil {
9027 return nil, gensupport.WrapError(err)
9028 }
9029 ret := &CloneJob{
9030 ServerResponse: googleapi.ServerResponse{
9031 Header: res.Header,
9032 HTTPStatusCode: res.StatusCode,
9033 },
9034 }
9035 target := &ret
9036 if err := gensupport.DecodeResponse(target, res); err != nil {
9037 return nil, err
9038 }
9039 return ret, nil
9040 }
9041
9042 type ProjectsLocationsSourcesMigratingVmsCloneJobsListCall struct {
9043 s *Service
9044 parent string
9045 urlParams_ gensupport.URLParams
9046 ifNoneMatch_ string
9047 ctx_ context.Context
9048 header_ http.Header
9049 }
9050
9051
9052
9053
9054
9055 func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) List(parent string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
9056 c := &ProjectsLocationsSourcesMigratingVmsCloneJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9057 c.parent = parent
9058 return c
9059 }
9060
9061
9062 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
9063 c.urlParams_.Set("filter", filter)
9064 return c
9065 }
9066
9067
9068
9069 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
9070 c.urlParams_.Set("orderBy", orderBy)
9071 return c
9072 }
9073
9074
9075
9076
9077
9078 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
9079 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9080 return c
9081 }
9082
9083
9084
9085
9086
9087 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
9088 c.urlParams_.Set("pageToken", pageToken)
9089 return c
9090 }
9091
9092
9093
9094
9095 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
9096 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9097 return c
9098 }
9099
9100
9101
9102
9103 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
9104 c.ifNoneMatch_ = entityTag
9105 return c
9106 }
9107
9108
9109 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
9110 c.ctx_ = ctx
9111 return c
9112 }
9113
9114
9115
9116 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Header() http.Header {
9117 if c.header_ == nil {
9118 c.header_ = make(http.Header)
9119 }
9120 return c.header_
9121 }
9122
9123 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) doRequest(alt string) (*http.Response, error) {
9124 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9125 if c.ifNoneMatch_ != "" {
9126 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9127 }
9128 var body io.Reader = nil
9129 c.urlParams_.Set("alt", alt)
9130 c.urlParams_.Set("prettyPrint", "false")
9131 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cloneJobs")
9132 urls += "?" + c.urlParams_.Encode()
9133 req, err := http.NewRequest("GET", urls, body)
9134 if err != nil {
9135 return nil, err
9136 }
9137 req.Header = reqHeaders
9138 googleapi.Expand(req.URL, map[string]string{
9139 "parent": c.parent,
9140 })
9141 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9142 }
9143
9144
9145
9146
9147
9148
9149
9150 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Do(opts ...googleapi.CallOption) (*ListCloneJobsResponse, error) {
9151 gensupport.SetOptions(c.urlParams_, opts...)
9152 res, err := c.doRequest("json")
9153 if res != nil && res.StatusCode == http.StatusNotModified {
9154 if res.Body != nil {
9155 res.Body.Close()
9156 }
9157 return nil, gensupport.WrapError(&googleapi.Error{
9158 Code: res.StatusCode,
9159 Header: res.Header,
9160 })
9161 }
9162 if err != nil {
9163 return nil, err
9164 }
9165 defer googleapi.CloseBody(res)
9166 if err := googleapi.CheckResponse(res); err != nil {
9167 return nil, gensupport.WrapError(err)
9168 }
9169 ret := &ListCloneJobsResponse{
9170 ServerResponse: googleapi.ServerResponse{
9171 Header: res.Header,
9172 HTTPStatusCode: res.StatusCode,
9173 },
9174 }
9175 target := &ret
9176 if err := gensupport.DecodeResponse(target, res); err != nil {
9177 return nil, err
9178 }
9179 return ret, nil
9180 }
9181
9182
9183
9184
9185 func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Pages(ctx context.Context, f func(*ListCloneJobsResponse) error) error {
9186 c.ctx_ = ctx
9187 defer c.PageToken(c.urlParams_.Get("pageToken"))
9188 for {
9189 x, err := c.Do()
9190 if err != nil {
9191 return err
9192 }
9193 if err := f(x); err != nil {
9194 return err
9195 }
9196 if x.NextPageToken == "" {
9197 return nil
9198 }
9199 c.PageToken(x.NextPageToken)
9200 }
9201 }
9202
9203 type ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall struct {
9204 s *Service
9205 name string
9206 cancelcutoverjobrequest *CancelCutoverJobRequest
9207 urlParams_ gensupport.URLParams
9208 ctx_ context.Context
9209 header_ http.Header
9210 }
9211
9212
9213
9214
9215 func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) Cancel(name string, cancelcutoverjobrequest *CancelCutoverJobRequest) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall {
9216 c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9217 c.name = name
9218 c.cancelcutoverjobrequest = cancelcutoverjobrequest
9219 return c
9220 }
9221
9222
9223
9224
9225 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall {
9226 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9227 return c
9228 }
9229
9230
9231 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall {
9232 c.ctx_ = ctx
9233 return c
9234 }
9235
9236
9237
9238 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Header() http.Header {
9239 if c.header_ == nil {
9240 c.header_ = make(http.Header)
9241 }
9242 return c.header_
9243 }
9244
9245 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) doRequest(alt string) (*http.Response, error) {
9246 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9247 var body io.Reader = nil
9248 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelcutoverjobrequest)
9249 if err != nil {
9250 return nil, err
9251 }
9252 c.urlParams_.Set("alt", alt)
9253 c.urlParams_.Set("prettyPrint", "false")
9254 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
9255 urls += "?" + c.urlParams_.Encode()
9256 req, err := http.NewRequest("POST", urls, body)
9257 if err != nil {
9258 return nil, err
9259 }
9260 req.Header = reqHeaders
9261 googleapi.Expand(req.URL, map[string]string{
9262 "name": c.name,
9263 })
9264 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9265 }
9266
9267
9268
9269
9270
9271
9272 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9273 gensupport.SetOptions(c.urlParams_, opts...)
9274 res, err := c.doRequest("json")
9275 if res != nil && res.StatusCode == http.StatusNotModified {
9276 if res.Body != nil {
9277 res.Body.Close()
9278 }
9279 return nil, gensupport.WrapError(&googleapi.Error{
9280 Code: res.StatusCode,
9281 Header: res.Header,
9282 })
9283 }
9284 if err != nil {
9285 return nil, err
9286 }
9287 defer googleapi.CloseBody(res)
9288 if err := googleapi.CheckResponse(res); err != nil {
9289 return nil, gensupport.WrapError(err)
9290 }
9291 ret := &Operation{
9292 ServerResponse: googleapi.ServerResponse{
9293 Header: res.Header,
9294 HTTPStatusCode: res.StatusCode,
9295 },
9296 }
9297 target := &ret
9298 if err := gensupport.DecodeResponse(target, res); err != nil {
9299 return nil, err
9300 }
9301 return ret, nil
9302 }
9303
9304 type ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall struct {
9305 s *Service
9306 parent string
9307 cutoverjob *CutoverJob
9308 urlParams_ gensupport.URLParams
9309 ctx_ context.Context
9310 header_ http.Header
9311 }
9312
9313
9314
9315
9316
9317 func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) Create(parent string, cutoverjob *CutoverJob) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
9318 c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9319 c.parent = parent
9320 c.cutoverjob = cutoverjob
9321 return c
9322 }
9323
9324
9325
9326 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) CutoverJobId(cutoverJobId string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
9327 c.urlParams_.Set("cutoverJobId", cutoverJobId)
9328 return c
9329 }
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
9343 c.urlParams_.Set("requestId", requestId)
9344 return c
9345 }
9346
9347
9348
9349
9350 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
9351 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9352 return c
9353 }
9354
9355
9356 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
9357 c.ctx_ = ctx
9358 return c
9359 }
9360
9361
9362
9363 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Header() http.Header {
9364 if c.header_ == nil {
9365 c.header_ = make(http.Header)
9366 }
9367 return c.header_
9368 }
9369
9370 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) doRequest(alt string) (*http.Response, error) {
9371 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
9372 var body io.Reader = nil
9373 body, err := googleapi.WithoutDataWrapper.JSONReader(c.cutoverjob)
9374 if err != nil {
9375 return nil, err
9376 }
9377 c.urlParams_.Set("alt", alt)
9378 c.urlParams_.Set("prettyPrint", "false")
9379 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cutoverJobs")
9380 urls += "?" + c.urlParams_.Encode()
9381 req, err := http.NewRequest("POST", urls, body)
9382 if err != nil {
9383 return nil, err
9384 }
9385 req.Header = reqHeaders
9386 googleapi.Expand(req.URL, map[string]string{
9387 "parent": c.parent,
9388 })
9389 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9390 }
9391
9392
9393
9394
9395
9396
9397 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9398 gensupport.SetOptions(c.urlParams_, opts...)
9399 res, err := c.doRequest("json")
9400 if res != nil && res.StatusCode == http.StatusNotModified {
9401 if res.Body != nil {
9402 res.Body.Close()
9403 }
9404 return nil, gensupport.WrapError(&googleapi.Error{
9405 Code: res.StatusCode,
9406 Header: res.Header,
9407 })
9408 }
9409 if err != nil {
9410 return nil, err
9411 }
9412 defer googleapi.CloseBody(res)
9413 if err := googleapi.CheckResponse(res); err != nil {
9414 return nil, gensupport.WrapError(err)
9415 }
9416 ret := &Operation{
9417 ServerResponse: googleapi.ServerResponse{
9418 Header: res.Header,
9419 HTTPStatusCode: res.StatusCode,
9420 },
9421 }
9422 target := &ret
9423 if err := gensupport.DecodeResponse(target, res); err != nil {
9424 return nil, err
9425 }
9426 return ret, nil
9427 }
9428
9429 type ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall struct {
9430 s *Service
9431 name string
9432 urlParams_ gensupport.URLParams
9433 ifNoneMatch_ string
9434 ctx_ context.Context
9435 header_ http.Header
9436 }
9437
9438
9439
9440
9441 func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) Get(name string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
9442 c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9443 c.name = name
9444 return c
9445 }
9446
9447
9448
9449
9450 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
9451 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9452 return c
9453 }
9454
9455
9456
9457
9458 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
9459 c.ifNoneMatch_ = entityTag
9460 return c
9461 }
9462
9463
9464 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
9465 c.ctx_ = ctx
9466 return c
9467 }
9468
9469
9470
9471 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Header() http.Header {
9472 if c.header_ == nil {
9473 c.header_ = make(http.Header)
9474 }
9475 return c.header_
9476 }
9477
9478 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) doRequest(alt string) (*http.Response, error) {
9479 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9480 if c.ifNoneMatch_ != "" {
9481 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9482 }
9483 var body io.Reader = nil
9484 c.urlParams_.Set("alt", alt)
9485 c.urlParams_.Set("prettyPrint", "false")
9486 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9487 urls += "?" + c.urlParams_.Encode()
9488 req, err := http.NewRequest("GET", urls, body)
9489 if err != nil {
9490 return nil, err
9491 }
9492 req.Header = reqHeaders
9493 googleapi.Expand(req.URL, map[string]string{
9494 "name": c.name,
9495 })
9496 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9497 }
9498
9499
9500
9501
9502
9503
9504 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Do(opts ...googleapi.CallOption) (*CutoverJob, error) {
9505 gensupport.SetOptions(c.urlParams_, opts...)
9506 res, err := c.doRequest("json")
9507 if res != nil && res.StatusCode == http.StatusNotModified {
9508 if res.Body != nil {
9509 res.Body.Close()
9510 }
9511 return nil, gensupport.WrapError(&googleapi.Error{
9512 Code: res.StatusCode,
9513 Header: res.Header,
9514 })
9515 }
9516 if err != nil {
9517 return nil, err
9518 }
9519 defer googleapi.CloseBody(res)
9520 if err := googleapi.CheckResponse(res); err != nil {
9521 return nil, gensupport.WrapError(err)
9522 }
9523 ret := &CutoverJob{
9524 ServerResponse: googleapi.ServerResponse{
9525 Header: res.Header,
9526 HTTPStatusCode: res.StatusCode,
9527 },
9528 }
9529 target := &ret
9530 if err := gensupport.DecodeResponse(target, res); err != nil {
9531 return nil, err
9532 }
9533 return ret, nil
9534 }
9535
9536 type ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall struct {
9537 s *Service
9538 parent string
9539 urlParams_ gensupport.URLParams
9540 ifNoneMatch_ string
9541 ctx_ context.Context
9542 header_ http.Header
9543 }
9544
9545
9546
9547
9548
9549 func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) List(parent string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9550 c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9551 c.parent = parent
9552 return c
9553 }
9554
9555
9556 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9557 c.urlParams_.Set("filter", filter)
9558 return c
9559 }
9560
9561
9562
9563 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9564 c.urlParams_.Set("orderBy", orderBy)
9565 return c
9566 }
9567
9568
9569
9570
9571
9572 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9573 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9574 return c
9575 }
9576
9577
9578
9579
9580
9581 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9582 c.urlParams_.Set("pageToken", pageToken)
9583 return c
9584 }
9585
9586
9587
9588
9589 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9590 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9591 return c
9592 }
9593
9594
9595
9596
9597 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9598 c.ifNoneMatch_ = entityTag
9599 return c
9600 }
9601
9602
9603 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9604 c.ctx_ = ctx
9605 return c
9606 }
9607
9608
9609
9610 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Header() http.Header {
9611 if c.header_ == nil {
9612 c.header_ = make(http.Header)
9613 }
9614 return c.header_
9615 }
9616
9617 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) doRequest(alt string) (*http.Response, error) {
9618 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9619 if c.ifNoneMatch_ != "" {
9620 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9621 }
9622 var body io.Reader = nil
9623 c.urlParams_.Set("alt", alt)
9624 c.urlParams_.Set("prettyPrint", "false")
9625 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cutoverJobs")
9626 urls += "?" + c.urlParams_.Encode()
9627 req, err := http.NewRequest("GET", urls, body)
9628 if err != nil {
9629 return nil, err
9630 }
9631 req.Header = reqHeaders
9632 googleapi.Expand(req.URL, map[string]string{
9633 "parent": c.parent,
9634 })
9635 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9636 }
9637
9638
9639
9640
9641
9642
9643
9644 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Do(opts ...googleapi.CallOption) (*ListCutoverJobsResponse, error) {
9645 gensupport.SetOptions(c.urlParams_, opts...)
9646 res, err := c.doRequest("json")
9647 if res != nil && res.StatusCode == http.StatusNotModified {
9648 if res.Body != nil {
9649 res.Body.Close()
9650 }
9651 return nil, gensupport.WrapError(&googleapi.Error{
9652 Code: res.StatusCode,
9653 Header: res.Header,
9654 })
9655 }
9656 if err != nil {
9657 return nil, err
9658 }
9659 defer googleapi.CloseBody(res)
9660 if err := googleapi.CheckResponse(res); err != nil {
9661 return nil, gensupport.WrapError(err)
9662 }
9663 ret := &ListCutoverJobsResponse{
9664 ServerResponse: googleapi.ServerResponse{
9665 Header: res.Header,
9666 HTTPStatusCode: res.StatusCode,
9667 },
9668 }
9669 target := &ret
9670 if err := gensupport.DecodeResponse(target, res); err != nil {
9671 return nil, err
9672 }
9673 return ret, nil
9674 }
9675
9676
9677
9678
9679 func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Pages(ctx context.Context, f func(*ListCutoverJobsResponse) error) error {
9680 c.ctx_ = ctx
9681 defer c.PageToken(c.urlParams_.Get("pageToken"))
9682 for {
9683 x, err := c.Do()
9684 if err != nil {
9685 return err
9686 }
9687 if err := f(x); err != nil {
9688 return err
9689 }
9690 if x.NextPageToken == "" {
9691 return nil
9692 }
9693 c.PageToken(x.NextPageToken)
9694 }
9695 }
9696
9697 type ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall struct {
9698 s *Service
9699 name string
9700 urlParams_ gensupport.URLParams
9701 ifNoneMatch_ string
9702 ctx_ context.Context
9703 header_ http.Header
9704 }
9705
9706
9707
9708
9709 func (r *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService) Get(name string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall {
9710 c := &ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9711 c.name = name
9712 return c
9713 }
9714
9715
9716
9717
9718 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall {
9719 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9720 return c
9721 }
9722
9723
9724
9725
9726 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall {
9727 c.ifNoneMatch_ = entityTag
9728 return c
9729 }
9730
9731
9732 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall {
9733 c.ctx_ = ctx
9734 return c
9735 }
9736
9737
9738
9739 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Header() http.Header {
9740 if c.header_ == nil {
9741 c.header_ = make(http.Header)
9742 }
9743 return c.header_
9744 }
9745
9746 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) doRequest(alt string) (*http.Response, error) {
9747 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9748 if c.ifNoneMatch_ != "" {
9749 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9750 }
9751 var body io.Reader = nil
9752 c.urlParams_.Set("alt", alt)
9753 c.urlParams_.Set("prettyPrint", "false")
9754 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9755 urls += "?" + c.urlParams_.Encode()
9756 req, err := http.NewRequest("GET", urls, body)
9757 if err != nil {
9758 return nil, err
9759 }
9760 req.Header = reqHeaders
9761 googleapi.Expand(req.URL, map[string]string{
9762 "name": c.name,
9763 })
9764 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9765 }
9766
9767
9768
9769
9770
9771
9772
9773 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Do(opts ...googleapi.CallOption) (*ReplicationCycle, error) {
9774 gensupport.SetOptions(c.urlParams_, opts...)
9775 res, err := c.doRequest("json")
9776 if res != nil && res.StatusCode == http.StatusNotModified {
9777 if res.Body != nil {
9778 res.Body.Close()
9779 }
9780 return nil, gensupport.WrapError(&googleapi.Error{
9781 Code: res.StatusCode,
9782 Header: res.Header,
9783 })
9784 }
9785 if err != nil {
9786 return nil, err
9787 }
9788 defer googleapi.CloseBody(res)
9789 if err := googleapi.CheckResponse(res); err != nil {
9790 return nil, gensupport.WrapError(err)
9791 }
9792 ret := &ReplicationCycle{
9793 ServerResponse: googleapi.ServerResponse{
9794 Header: res.Header,
9795 HTTPStatusCode: res.StatusCode,
9796 },
9797 }
9798 target := &ret
9799 if err := gensupport.DecodeResponse(target, res); err != nil {
9800 return nil, err
9801 }
9802 return ret, nil
9803 }
9804
9805 type ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall struct {
9806 s *Service
9807 parent string
9808 urlParams_ gensupport.URLParams
9809 ifNoneMatch_ string
9810 ctx_ context.Context
9811 header_ http.Header
9812 }
9813
9814
9815
9816
9817 func (r *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService) List(parent string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
9818 c := &ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9819 c.parent = parent
9820 return c
9821 }
9822
9823
9824 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
9825 c.urlParams_.Set("filter", filter)
9826 return c
9827 }
9828
9829
9830
9831 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
9832 c.urlParams_.Set("orderBy", orderBy)
9833 return c
9834 }
9835
9836
9837
9838
9839
9840 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
9841 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9842 return c
9843 }
9844
9845
9846
9847
9848
9849 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
9850 c.urlParams_.Set("pageToken", pageToken)
9851 return c
9852 }
9853
9854
9855
9856
9857 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
9858 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9859 return c
9860 }
9861
9862
9863
9864
9865 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
9866 c.ifNoneMatch_ = entityTag
9867 return c
9868 }
9869
9870
9871 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
9872 c.ctx_ = ctx
9873 return c
9874 }
9875
9876
9877
9878 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Header() http.Header {
9879 if c.header_ == nil {
9880 c.header_ = make(http.Header)
9881 }
9882 return c.header_
9883 }
9884
9885 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) doRequest(alt string) (*http.Response, error) {
9886 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9887 if c.ifNoneMatch_ != "" {
9888 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9889 }
9890 var body io.Reader = nil
9891 c.urlParams_.Set("alt", alt)
9892 c.urlParams_.Set("prettyPrint", "false")
9893 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replicationCycles")
9894 urls += "?" + c.urlParams_.Encode()
9895 req, err := http.NewRequest("GET", urls, body)
9896 if err != nil {
9897 return nil, err
9898 }
9899 req.Header = reqHeaders
9900 googleapi.Expand(req.URL, map[string]string{
9901 "parent": c.parent,
9902 })
9903 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9904 }
9905
9906
9907
9908
9909
9910
9911
9912 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Do(opts ...googleapi.CallOption) (*ListReplicationCyclesResponse, error) {
9913 gensupport.SetOptions(c.urlParams_, opts...)
9914 res, err := c.doRequest("json")
9915 if res != nil && res.StatusCode == http.StatusNotModified {
9916 if res.Body != nil {
9917 res.Body.Close()
9918 }
9919 return nil, gensupport.WrapError(&googleapi.Error{
9920 Code: res.StatusCode,
9921 Header: res.Header,
9922 })
9923 }
9924 if err != nil {
9925 return nil, err
9926 }
9927 defer googleapi.CloseBody(res)
9928 if err := googleapi.CheckResponse(res); err != nil {
9929 return nil, gensupport.WrapError(err)
9930 }
9931 ret := &ListReplicationCyclesResponse{
9932 ServerResponse: googleapi.ServerResponse{
9933 Header: res.Header,
9934 HTTPStatusCode: res.StatusCode,
9935 },
9936 }
9937 target := &ret
9938 if err := gensupport.DecodeResponse(target, res); err != nil {
9939 return nil, err
9940 }
9941 return ret, nil
9942 }
9943
9944
9945
9946
9947 func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Pages(ctx context.Context, f func(*ListReplicationCyclesResponse) error) error {
9948 c.ctx_ = ctx
9949 defer c.PageToken(c.urlParams_.Get("pageToken"))
9950 for {
9951 x, err := c.Do()
9952 if err != nil {
9953 return err
9954 }
9955 if err := f(x); err != nil {
9956 return err
9957 }
9958 if x.NextPageToken == "" {
9959 return nil
9960 }
9961 c.PageToken(x.NextPageToken)
9962 }
9963 }
9964
9965 type ProjectsLocationsSourcesUtilizationReportsCreateCall struct {
9966 s *Service
9967 parent string
9968 utilizationreport *UtilizationReport
9969 urlParams_ gensupport.URLParams
9970 ctx_ context.Context
9971 header_ http.Header
9972 }
9973
9974
9975
9976
9977 func (r *ProjectsLocationsSourcesUtilizationReportsService) Create(parent string, utilizationreport *UtilizationReport) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
9978 c := &ProjectsLocationsSourcesUtilizationReportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9979 c.parent = parent
9980 c.utilizationreport = utilizationreport
9981 return c
9982 }
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995 func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
9996 c.urlParams_.Set("requestId", requestId)
9997 return c
9998 }
9999
10000
10001
10002
10003
10004
10005 func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) UtilizationReportId(utilizationReportId string) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
10006 c.urlParams_.Set("utilizationReportId", utilizationReportId)
10007 return c
10008 }
10009
10010
10011
10012
10013 func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
10014 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10015 return c
10016 }
10017
10018
10019 func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
10020 c.ctx_ = ctx
10021 return c
10022 }
10023
10024
10025
10026 func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Header() http.Header {
10027 if c.header_ == nil {
10028 c.header_ = make(http.Header)
10029 }
10030 return c.header_
10031 }
10032
10033 func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) doRequest(alt string) (*http.Response, error) {
10034 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10035 var body io.Reader = nil
10036 body, err := googleapi.WithoutDataWrapper.JSONReader(c.utilizationreport)
10037 if err != nil {
10038 return nil, err
10039 }
10040 c.urlParams_.Set("alt", alt)
10041 c.urlParams_.Set("prettyPrint", "false")
10042 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/utilizationReports")
10043 urls += "?" + c.urlParams_.Encode()
10044 req, err := http.NewRequest("POST", urls, body)
10045 if err != nil {
10046 return nil, err
10047 }
10048 req.Header = reqHeaders
10049 googleapi.Expand(req.URL, map[string]string{
10050 "parent": c.parent,
10051 })
10052 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10053 }
10054
10055
10056
10057
10058
10059
10060 func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10061 gensupport.SetOptions(c.urlParams_, opts...)
10062 res, err := c.doRequest("json")
10063 if res != nil && res.StatusCode == http.StatusNotModified {
10064 if res.Body != nil {
10065 res.Body.Close()
10066 }
10067 return nil, gensupport.WrapError(&googleapi.Error{
10068 Code: res.StatusCode,
10069 Header: res.Header,
10070 })
10071 }
10072 if err != nil {
10073 return nil, err
10074 }
10075 defer googleapi.CloseBody(res)
10076 if err := googleapi.CheckResponse(res); err != nil {
10077 return nil, gensupport.WrapError(err)
10078 }
10079 ret := &Operation{
10080 ServerResponse: googleapi.ServerResponse{
10081 Header: res.Header,
10082 HTTPStatusCode: res.StatusCode,
10083 },
10084 }
10085 target := &ret
10086 if err := gensupport.DecodeResponse(target, res); err != nil {
10087 return nil, err
10088 }
10089 return ret, nil
10090 }
10091
10092 type ProjectsLocationsSourcesUtilizationReportsDeleteCall struct {
10093 s *Service
10094 name string
10095 urlParams_ gensupport.URLParams
10096 ctx_ context.Context
10097 header_ http.Header
10098 }
10099
10100
10101
10102
10103 func (r *ProjectsLocationsSourcesUtilizationReportsService) Delete(name string) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
10104 c := &ProjectsLocationsSourcesUtilizationReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10105 c.name = name
10106 return c
10107 }
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120 func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
10121 c.urlParams_.Set("requestId", requestId)
10122 return c
10123 }
10124
10125
10126
10127
10128 func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
10129 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10130 return c
10131 }
10132
10133
10134 func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
10135 c.ctx_ = ctx
10136 return c
10137 }
10138
10139
10140
10141 func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Header() http.Header {
10142 if c.header_ == nil {
10143 c.header_ = make(http.Header)
10144 }
10145 return c.header_
10146 }
10147
10148 func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
10149 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10150 var body io.Reader = nil
10151 c.urlParams_.Set("alt", alt)
10152 c.urlParams_.Set("prettyPrint", "false")
10153 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10154 urls += "?" + c.urlParams_.Encode()
10155 req, err := http.NewRequest("DELETE", urls, body)
10156 if err != nil {
10157 return nil, err
10158 }
10159 req.Header = reqHeaders
10160 googleapi.Expand(req.URL, map[string]string{
10161 "name": c.name,
10162 })
10163 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10164 }
10165
10166
10167
10168
10169
10170
10171 func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10172 gensupport.SetOptions(c.urlParams_, opts...)
10173 res, err := c.doRequest("json")
10174 if res != nil && res.StatusCode == http.StatusNotModified {
10175 if res.Body != nil {
10176 res.Body.Close()
10177 }
10178 return nil, gensupport.WrapError(&googleapi.Error{
10179 Code: res.StatusCode,
10180 Header: res.Header,
10181 })
10182 }
10183 if err != nil {
10184 return nil, err
10185 }
10186 defer googleapi.CloseBody(res)
10187 if err := googleapi.CheckResponse(res); err != nil {
10188 return nil, gensupport.WrapError(err)
10189 }
10190 ret := &Operation{
10191 ServerResponse: googleapi.ServerResponse{
10192 Header: res.Header,
10193 HTTPStatusCode: res.StatusCode,
10194 },
10195 }
10196 target := &ret
10197 if err := gensupport.DecodeResponse(target, res); err != nil {
10198 return nil, err
10199 }
10200 return ret, nil
10201 }
10202
10203 type ProjectsLocationsSourcesUtilizationReportsGetCall struct {
10204 s *Service
10205 name string
10206 urlParams_ gensupport.URLParams
10207 ifNoneMatch_ string
10208 ctx_ context.Context
10209 header_ http.Header
10210 }
10211
10212
10213
10214
10215 func (r *ProjectsLocationsSourcesUtilizationReportsService) Get(name string) *ProjectsLocationsSourcesUtilizationReportsGetCall {
10216 c := &ProjectsLocationsSourcesUtilizationReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10217 c.name = name
10218 return c
10219 }
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236 func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) View(view string) *ProjectsLocationsSourcesUtilizationReportsGetCall {
10237 c.urlParams_.Set("view", view)
10238 return c
10239 }
10240
10241
10242
10243
10244 func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsGetCall {
10245 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10246 return c
10247 }
10248
10249
10250
10251
10252 func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesUtilizationReportsGetCall {
10253 c.ifNoneMatch_ = entityTag
10254 return c
10255 }
10256
10257
10258 func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsGetCall {
10259 c.ctx_ = ctx
10260 return c
10261 }
10262
10263
10264
10265 func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Header() http.Header {
10266 if c.header_ == nil {
10267 c.header_ = make(http.Header)
10268 }
10269 return c.header_
10270 }
10271
10272 func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) doRequest(alt string) (*http.Response, error) {
10273 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10274 if c.ifNoneMatch_ != "" {
10275 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10276 }
10277 var body io.Reader = nil
10278 c.urlParams_.Set("alt", alt)
10279 c.urlParams_.Set("prettyPrint", "false")
10280 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10281 urls += "?" + c.urlParams_.Encode()
10282 req, err := http.NewRequest("GET", urls, body)
10283 if err != nil {
10284 return nil, err
10285 }
10286 req.Header = reqHeaders
10287 googleapi.Expand(req.URL, map[string]string{
10288 "name": c.name,
10289 })
10290 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10291 }
10292
10293
10294
10295
10296
10297
10298
10299 func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Do(opts ...googleapi.CallOption) (*UtilizationReport, error) {
10300 gensupport.SetOptions(c.urlParams_, opts...)
10301 res, err := c.doRequest("json")
10302 if res != nil && res.StatusCode == http.StatusNotModified {
10303 if res.Body != nil {
10304 res.Body.Close()
10305 }
10306 return nil, gensupport.WrapError(&googleapi.Error{
10307 Code: res.StatusCode,
10308 Header: res.Header,
10309 })
10310 }
10311 if err != nil {
10312 return nil, err
10313 }
10314 defer googleapi.CloseBody(res)
10315 if err := googleapi.CheckResponse(res); err != nil {
10316 return nil, gensupport.WrapError(err)
10317 }
10318 ret := &UtilizationReport{
10319 ServerResponse: googleapi.ServerResponse{
10320 Header: res.Header,
10321 HTTPStatusCode: res.StatusCode,
10322 },
10323 }
10324 target := &ret
10325 if err := gensupport.DecodeResponse(target, res); err != nil {
10326 return nil, err
10327 }
10328 return ret, nil
10329 }
10330
10331 type ProjectsLocationsSourcesUtilizationReportsListCall struct {
10332 s *Service
10333 parent string
10334 urlParams_ gensupport.URLParams
10335 ifNoneMatch_ string
10336 ctx_ context.Context
10337 header_ http.Header
10338 }
10339
10340
10341
10342
10343 func (r *ProjectsLocationsSourcesUtilizationReportsService) List(parent string) *ProjectsLocationsSourcesUtilizationReportsListCall {
10344 c := &ProjectsLocationsSourcesUtilizationReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10345 c.parent = parent
10346 return c
10347 }
10348
10349
10350 func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Filter(filter string) *ProjectsLocationsSourcesUtilizationReportsListCall {
10351 c.urlParams_.Set("filter", filter)
10352 return c
10353 }
10354
10355
10356
10357 func (c *ProjectsLocationsSourcesUtilizationReportsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesUtilizationReportsListCall {
10358 c.urlParams_.Set("orderBy", orderBy)
10359 return c
10360 }
10361
10362
10363
10364
10365
10366 func (c *ProjectsLocationsSourcesUtilizationReportsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesUtilizationReportsListCall {
10367 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10368 return c
10369 }
10370
10371
10372
10373
10374
10375
10376 func (c *ProjectsLocationsSourcesUtilizationReportsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesUtilizationReportsListCall {
10377 c.urlParams_.Set("pageToken", pageToken)
10378 return c
10379 }
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396 func (c *ProjectsLocationsSourcesUtilizationReportsListCall) View(view string) *ProjectsLocationsSourcesUtilizationReportsListCall {
10397 c.urlParams_.Set("view", view)
10398 return c
10399 }
10400
10401
10402
10403
10404 func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsListCall {
10405 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10406 return c
10407 }
10408
10409
10410
10411
10412 func (c *ProjectsLocationsSourcesUtilizationReportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesUtilizationReportsListCall {
10413 c.ifNoneMatch_ = entityTag
10414 return c
10415 }
10416
10417
10418 func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsListCall {
10419 c.ctx_ = ctx
10420 return c
10421 }
10422
10423
10424
10425 func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Header() http.Header {
10426 if c.header_ == nil {
10427 c.header_ = make(http.Header)
10428 }
10429 return c.header_
10430 }
10431
10432 func (c *ProjectsLocationsSourcesUtilizationReportsListCall) doRequest(alt string) (*http.Response, error) {
10433 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10434 if c.ifNoneMatch_ != "" {
10435 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10436 }
10437 var body io.Reader = nil
10438 c.urlParams_.Set("alt", alt)
10439 c.urlParams_.Set("prettyPrint", "false")
10440 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/utilizationReports")
10441 urls += "?" + c.urlParams_.Encode()
10442 req, err := http.NewRequest("GET", urls, body)
10443 if err != nil {
10444 return nil, err
10445 }
10446 req.Header = reqHeaders
10447 googleapi.Expand(req.URL, map[string]string{
10448 "parent": c.parent,
10449 })
10450 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10451 }
10452
10453
10454
10455
10456
10457
10458
10459 func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Do(opts ...googleapi.CallOption) (*ListUtilizationReportsResponse, error) {
10460 gensupport.SetOptions(c.urlParams_, opts...)
10461 res, err := c.doRequest("json")
10462 if res != nil && res.StatusCode == http.StatusNotModified {
10463 if res.Body != nil {
10464 res.Body.Close()
10465 }
10466 return nil, gensupport.WrapError(&googleapi.Error{
10467 Code: res.StatusCode,
10468 Header: res.Header,
10469 })
10470 }
10471 if err != nil {
10472 return nil, err
10473 }
10474 defer googleapi.CloseBody(res)
10475 if err := googleapi.CheckResponse(res); err != nil {
10476 return nil, gensupport.WrapError(err)
10477 }
10478 ret := &ListUtilizationReportsResponse{
10479 ServerResponse: googleapi.ServerResponse{
10480 Header: res.Header,
10481 HTTPStatusCode: res.StatusCode,
10482 },
10483 }
10484 target := &ret
10485 if err := gensupport.DecodeResponse(target, res); err != nil {
10486 return nil, err
10487 }
10488 return ret, nil
10489 }
10490
10491
10492
10493
10494 func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Pages(ctx context.Context, f func(*ListUtilizationReportsResponse) error) error {
10495 c.ctx_ = ctx
10496 defer c.PageToken(c.urlParams_.Get("pageToken"))
10497 for {
10498 x, err := c.Do()
10499 if err != nil {
10500 return err
10501 }
10502 if err := f(x); err != nil {
10503 return err
10504 }
10505 if x.NextPageToken == "" {
10506 return nil
10507 }
10508 c.PageToken(x.NextPageToken)
10509 }
10510 }
10511
10512 type ProjectsLocationsTargetProjectsCreateCall struct {
10513 s *Service
10514 parent string
10515 targetproject *TargetProject
10516 urlParams_ gensupport.URLParams
10517 ctx_ context.Context
10518 header_ http.Header
10519 }
10520
10521
10522
10523
10524
10525
10526 func (r *ProjectsLocationsTargetProjectsService) Create(parent string, targetproject *TargetProject) *ProjectsLocationsTargetProjectsCreateCall {
10527 c := &ProjectsLocationsTargetProjectsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10528 c.parent = parent
10529 c.targetproject = targetproject
10530 return c
10531 }
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544 func (c *ProjectsLocationsTargetProjectsCreateCall) RequestId(requestId string) *ProjectsLocationsTargetProjectsCreateCall {
10545 c.urlParams_.Set("requestId", requestId)
10546 return c
10547 }
10548
10549
10550
10551 func (c *ProjectsLocationsTargetProjectsCreateCall) TargetProjectId(targetProjectId string) *ProjectsLocationsTargetProjectsCreateCall {
10552 c.urlParams_.Set("targetProjectId", targetProjectId)
10553 return c
10554 }
10555
10556
10557
10558
10559 func (c *ProjectsLocationsTargetProjectsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsCreateCall {
10560 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10561 return c
10562 }
10563
10564
10565 func (c *ProjectsLocationsTargetProjectsCreateCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsCreateCall {
10566 c.ctx_ = ctx
10567 return c
10568 }
10569
10570
10571
10572 func (c *ProjectsLocationsTargetProjectsCreateCall) Header() http.Header {
10573 if c.header_ == nil {
10574 c.header_ = make(http.Header)
10575 }
10576 return c.header_
10577 }
10578
10579 func (c *ProjectsLocationsTargetProjectsCreateCall) doRequest(alt string) (*http.Response, error) {
10580 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
10581 var body io.Reader = nil
10582 body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetproject)
10583 if err != nil {
10584 return nil, err
10585 }
10586 c.urlParams_.Set("alt", alt)
10587 c.urlParams_.Set("prettyPrint", "false")
10588 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetProjects")
10589 urls += "?" + c.urlParams_.Encode()
10590 req, err := http.NewRequest("POST", urls, body)
10591 if err != nil {
10592 return nil, err
10593 }
10594 req.Header = reqHeaders
10595 googleapi.Expand(req.URL, map[string]string{
10596 "parent": c.parent,
10597 })
10598 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10599 }
10600
10601
10602
10603
10604
10605
10606 func (c *ProjectsLocationsTargetProjectsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10607 gensupport.SetOptions(c.urlParams_, opts...)
10608 res, err := c.doRequest("json")
10609 if res != nil && res.StatusCode == http.StatusNotModified {
10610 if res.Body != nil {
10611 res.Body.Close()
10612 }
10613 return nil, gensupport.WrapError(&googleapi.Error{
10614 Code: res.StatusCode,
10615 Header: res.Header,
10616 })
10617 }
10618 if err != nil {
10619 return nil, err
10620 }
10621 defer googleapi.CloseBody(res)
10622 if err := googleapi.CheckResponse(res); err != nil {
10623 return nil, gensupport.WrapError(err)
10624 }
10625 ret := &Operation{
10626 ServerResponse: googleapi.ServerResponse{
10627 Header: res.Header,
10628 HTTPStatusCode: res.StatusCode,
10629 },
10630 }
10631 target := &ret
10632 if err := gensupport.DecodeResponse(target, res); err != nil {
10633 return nil, err
10634 }
10635 return ret, nil
10636 }
10637
10638 type ProjectsLocationsTargetProjectsDeleteCall struct {
10639 s *Service
10640 name string
10641 urlParams_ gensupport.URLParams
10642 ctx_ context.Context
10643 header_ http.Header
10644 }
10645
10646
10647
10648
10649
10650 func (r *ProjectsLocationsTargetProjectsService) Delete(name string) *ProjectsLocationsTargetProjectsDeleteCall {
10651 c := &ProjectsLocationsTargetProjectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10652 c.name = name
10653 return c
10654 }
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667 func (c *ProjectsLocationsTargetProjectsDeleteCall) RequestId(requestId string) *ProjectsLocationsTargetProjectsDeleteCall {
10668 c.urlParams_.Set("requestId", requestId)
10669 return c
10670 }
10671
10672
10673
10674
10675 func (c *ProjectsLocationsTargetProjectsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsDeleteCall {
10676 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10677 return c
10678 }
10679
10680
10681 func (c *ProjectsLocationsTargetProjectsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsDeleteCall {
10682 c.ctx_ = ctx
10683 return c
10684 }
10685
10686
10687
10688 func (c *ProjectsLocationsTargetProjectsDeleteCall) Header() http.Header {
10689 if c.header_ == nil {
10690 c.header_ = make(http.Header)
10691 }
10692 return c.header_
10693 }
10694
10695 func (c *ProjectsLocationsTargetProjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
10696 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10697 var body io.Reader = nil
10698 c.urlParams_.Set("alt", alt)
10699 c.urlParams_.Set("prettyPrint", "false")
10700 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10701 urls += "?" + c.urlParams_.Encode()
10702 req, err := http.NewRequest("DELETE", urls, body)
10703 if err != nil {
10704 return nil, err
10705 }
10706 req.Header = reqHeaders
10707 googleapi.Expand(req.URL, map[string]string{
10708 "name": c.name,
10709 })
10710 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10711 }
10712
10713
10714
10715
10716
10717
10718 func (c *ProjectsLocationsTargetProjectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10719 gensupport.SetOptions(c.urlParams_, opts...)
10720 res, err := c.doRequest("json")
10721 if res != nil && res.StatusCode == http.StatusNotModified {
10722 if res.Body != nil {
10723 res.Body.Close()
10724 }
10725 return nil, gensupport.WrapError(&googleapi.Error{
10726 Code: res.StatusCode,
10727 Header: res.Header,
10728 })
10729 }
10730 if err != nil {
10731 return nil, err
10732 }
10733 defer googleapi.CloseBody(res)
10734 if err := googleapi.CheckResponse(res); err != nil {
10735 return nil, gensupport.WrapError(err)
10736 }
10737 ret := &Operation{
10738 ServerResponse: googleapi.ServerResponse{
10739 Header: res.Header,
10740 HTTPStatusCode: res.StatusCode,
10741 },
10742 }
10743 target := &ret
10744 if err := gensupport.DecodeResponse(target, res); err != nil {
10745 return nil, err
10746 }
10747 return ret, nil
10748 }
10749
10750 type ProjectsLocationsTargetProjectsGetCall struct {
10751 s *Service
10752 name string
10753 urlParams_ gensupport.URLParams
10754 ifNoneMatch_ string
10755 ctx_ context.Context
10756 header_ http.Header
10757 }
10758
10759
10760
10761
10762
10763 func (r *ProjectsLocationsTargetProjectsService) Get(name string) *ProjectsLocationsTargetProjectsGetCall {
10764 c := &ProjectsLocationsTargetProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10765 c.name = name
10766 return c
10767 }
10768
10769
10770
10771
10772 func (c *ProjectsLocationsTargetProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsGetCall {
10773 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10774 return c
10775 }
10776
10777
10778
10779
10780 func (c *ProjectsLocationsTargetProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTargetProjectsGetCall {
10781 c.ifNoneMatch_ = entityTag
10782 return c
10783 }
10784
10785
10786 func (c *ProjectsLocationsTargetProjectsGetCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsGetCall {
10787 c.ctx_ = ctx
10788 return c
10789 }
10790
10791
10792
10793 func (c *ProjectsLocationsTargetProjectsGetCall) Header() http.Header {
10794 if c.header_ == nil {
10795 c.header_ = make(http.Header)
10796 }
10797 return c.header_
10798 }
10799
10800 func (c *ProjectsLocationsTargetProjectsGetCall) doRequest(alt string) (*http.Response, error) {
10801 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10802 if c.ifNoneMatch_ != "" {
10803 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10804 }
10805 var body io.Reader = nil
10806 c.urlParams_.Set("alt", alt)
10807 c.urlParams_.Set("prettyPrint", "false")
10808 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10809 urls += "?" + c.urlParams_.Encode()
10810 req, err := http.NewRequest("GET", urls, body)
10811 if err != nil {
10812 return nil, err
10813 }
10814 req.Header = reqHeaders
10815 googleapi.Expand(req.URL, map[string]string{
10816 "name": c.name,
10817 })
10818 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10819 }
10820
10821
10822
10823
10824
10825
10826 func (c *ProjectsLocationsTargetProjectsGetCall) Do(opts ...googleapi.CallOption) (*TargetProject, error) {
10827 gensupport.SetOptions(c.urlParams_, opts...)
10828 res, err := c.doRequest("json")
10829 if res != nil && res.StatusCode == http.StatusNotModified {
10830 if res.Body != nil {
10831 res.Body.Close()
10832 }
10833 return nil, gensupport.WrapError(&googleapi.Error{
10834 Code: res.StatusCode,
10835 Header: res.Header,
10836 })
10837 }
10838 if err != nil {
10839 return nil, err
10840 }
10841 defer googleapi.CloseBody(res)
10842 if err := googleapi.CheckResponse(res); err != nil {
10843 return nil, gensupport.WrapError(err)
10844 }
10845 ret := &TargetProject{
10846 ServerResponse: googleapi.ServerResponse{
10847 Header: res.Header,
10848 HTTPStatusCode: res.StatusCode,
10849 },
10850 }
10851 target := &ret
10852 if err := gensupport.DecodeResponse(target, res); err != nil {
10853 return nil, err
10854 }
10855 return ret, nil
10856 }
10857
10858 type ProjectsLocationsTargetProjectsListCall struct {
10859 s *Service
10860 parent string
10861 urlParams_ gensupport.URLParams
10862 ifNoneMatch_ string
10863 ctx_ context.Context
10864 header_ http.Header
10865 }
10866
10867
10868
10869
10870
10871 func (r *ProjectsLocationsTargetProjectsService) List(parent string) *ProjectsLocationsTargetProjectsListCall {
10872 c := &ProjectsLocationsTargetProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10873 c.parent = parent
10874 return c
10875 }
10876
10877
10878 func (c *ProjectsLocationsTargetProjectsListCall) Filter(filter string) *ProjectsLocationsTargetProjectsListCall {
10879 c.urlParams_.Set("filter", filter)
10880 return c
10881 }
10882
10883
10884
10885 func (c *ProjectsLocationsTargetProjectsListCall) OrderBy(orderBy string) *ProjectsLocationsTargetProjectsListCall {
10886 c.urlParams_.Set("orderBy", orderBy)
10887 return c
10888 }
10889
10890
10891
10892
10893
10894 func (c *ProjectsLocationsTargetProjectsListCall) PageSize(pageSize int64) *ProjectsLocationsTargetProjectsListCall {
10895 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10896 return c
10897 }
10898
10899
10900
10901
10902
10903 func (c *ProjectsLocationsTargetProjectsListCall) PageToken(pageToken string) *ProjectsLocationsTargetProjectsListCall {
10904 c.urlParams_.Set("pageToken", pageToken)
10905 return c
10906 }
10907
10908
10909
10910
10911 func (c *ProjectsLocationsTargetProjectsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsListCall {
10912 c.urlParams_.Set("fields", googleapi.CombineFields(s))
10913 return c
10914 }
10915
10916
10917
10918
10919 func (c *ProjectsLocationsTargetProjectsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTargetProjectsListCall {
10920 c.ifNoneMatch_ = entityTag
10921 return c
10922 }
10923
10924
10925 func (c *ProjectsLocationsTargetProjectsListCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsListCall {
10926 c.ctx_ = ctx
10927 return c
10928 }
10929
10930
10931
10932 func (c *ProjectsLocationsTargetProjectsListCall) Header() http.Header {
10933 if c.header_ == nil {
10934 c.header_ = make(http.Header)
10935 }
10936 return c.header_
10937 }
10938
10939 func (c *ProjectsLocationsTargetProjectsListCall) doRequest(alt string) (*http.Response, error) {
10940 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
10941 if c.ifNoneMatch_ != "" {
10942 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10943 }
10944 var body io.Reader = nil
10945 c.urlParams_.Set("alt", alt)
10946 c.urlParams_.Set("prettyPrint", "false")
10947 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetProjects")
10948 urls += "?" + c.urlParams_.Encode()
10949 req, err := http.NewRequest("GET", urls, body)
10950 if err != nil {
10951 return nil, err
10952 }
10953 req.Header = reqHeaders
10954 googleapi.Expand(req.URL, map[string]string{
10955 "parent": c.parent,
10956 })
10957 return gensupport.SendRequest(c.ctx_, c.s.client, req)
10958 }
10959
10960
10961
10962
10963
10964
10965
10966 func (c *ProjectsLocationsTargetProjectsListCall) Do(opts ...googleapi.CallOption) (*ListTargetProjectsResponse, error) {
10967 gensupport.SetOptions(c.urlParams_, opts...)
10968 res, err := c.doRequest("json")
10969 if res != nil && res.StatusCode == http.StatusNotModified {
10970 if res.Body != nil {
10971 res.Body.Close()
10972 }
10973 return nil, gensupport.WrapError(&googleapi.Error{
10974 Code: res.StatusCode,
10975 Header: res.Header,
10976 })
10977 }
10978 if err != nil {
10979 return nil, err
10980 }
10981 defer googleapi.CloseBody(res)
10982 if err := googleapi.CheckResponse(res); err != nil {
10983 return nil, gensupport.WrapError(err)
10984 }
10985 ret := &ListTargetProjectsResponse{
10986 ServerResponse: googleapi.ServerResponse{
10987 Header: res.Header,
10988 HTTPStatusCode: res.StatusCode,
10989 },
10990 }
10991 target := &ret
10992 if err := gensupport.DecodeResponse(target, res); err != nil {
10993 return nil, err
10994 }
10995 return ret, nil
10996 }
10997
10998
10999
11000
11001 func (c *ProjectsLocationsTargetProjectsListCall) Pages(ctx context.Context, f func(*ListTargetProjectsResponse) error) error {
11002 c.ctx_ = ctx
11003 defer c.PageToken(c.urlParams_.Get("pageToken"))
11004 for {
11005 x, err := c.Do()
11006 if err != nil {
11007 return err
11008 }
11009 if err := f(x); err != nil {
11010 return err
11011 }
11012 if x.NextPageToken == "" {
11013 return nil
11014 }
11015 c.PageToken(x.NextPageToken)
11016 }
11017 }
11018
11019 type ProjectsLocationsTargetProjectsPatchCall struct {
11020 s *Service
11021 name string
11022 targetproject *TargetProject
11023 urlParams_ gensupport.URLParams
11024 ctx_ context.Context
11025 header_ http.Header
11026 }
11027
11028
11029
11030
11031
11032
11033 func (r *ProjectsLocationsTargetProjectsService) Patch(name string, targetproject *TargetProject) *ProjectsLocationsTargetProjectsPatchCall {
11034 c := &ProjectsLocationsTargetProjectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11035 c.name = name
11036 c.targetproject = targetproject
11037 return c
11038 }
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051 func (c *ProjectsLocationsTargetProjectsPatchCall) RequestId(requestId string) *ProjectsLocationsTargetProjectsPatchCall {
11052 c.urlParams_.Set("requestId", requestId)
11053 return c
11054 }
11055
11056
11057
11058
11059
11060
11061
11062 func (c *ProjectsLocationsTargetProjectsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTargetProjectsPatchCall {
11063 c.urlParams_.Set("updateMask", updateMask)
11064 return c
11065 }
11066
11067
11068
11069
11070 func (c *ProjectsLocationsTargetProjectsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsPatchCall {
11071 c.urlParams_.Set("fields", googleapi.CombineFields(s))
11072 return c
11073 }
11074
11075
11076 func (c *ProjectsLocationsTargetProjectsPatchCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsPatchCall {
11077 c.ctx_ = ctx
11078 return c
11079 }
11080
11081
11082
11083 func (c *ProjectsLocationsTargetProjectsPatchCall) Header() http.Header {
11084 if c.header_ == nil {
11085 c.header_ = make(http.Header)
11086 }
11087 return c.header_
11088 }
11089
11090 func (c *ProjectsLocationsTargetProjectsPatchCall) doRequest(alt string) (*http.Response, error) {
11091 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
11092 var body io.Reader = nil
11093 body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetproject)
11094 if err != nil {
11095 return nil, err
11096 }
11097 c.urlParams_.Set("alt", alt)
11098 c.urlParams_.Set("prettyPrint", "false")
11099 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11100 urls += "?" + c.urlParams_.Encode()
11101 req, err := http.NewRequest("PATCH", urls, body)
11102 if err != nil {
11103 return nil, err
11104 }
11105 req.Header = reqHeaders
11106 googleapi.Expand(req.URL, map[string]string{
11107 "name": c.name,
11108 })
11109 return gensupport.SendRequest(c.ctx_, c.s.client, req)
11110 }
11111
11112
11113
11114
11115
11116
11117 func (c *ProjectsLocationsTargetProjectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11118 gensupport.SetOptions(c.urlParams_, opts...)
11119 res, err := c.doRequest("json")
11120 if res != nil && res.StatusCode == http.StatusNotModified {
11121 if res.Body != nil {
11122 res.Body.Close()
11123 }
11124 return nil, gensupport.WrapError(&googleapi.Error{
11125 Code: res.StatusCode,
11126 Header: res.Header,
11127 })
11128 }
11129 if err != nil {
11130 return nil, err
11131 }
11132 defer googleapi.CloseBody(res)
11133 if err := googleapi.CheckResponse(res); err != nil {
11134 return nil, gensupport.WrapError(err)
11135 }
11136 ret := &Operation{
11137 ServerResponse: googleapi.ServerResponse{
11138 Header: res.Header,
11139 HTTPStatusCode: res.StatusCode,
11140 },
11141 }
11142 target := &ret
11143 if err := gensupport.DecodeResponse(target, res); err != nil {
11144 return nil, err
11145 }
11146 return ret, nil
11147 }
11148
View as plain text