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