1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package vmmigration provides access to the VM Migration API.
8//
9// For product documentation, see: https://cloud.google.com/migrate/compute-engine
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/vmmigration/v1"
16//   ...
17//   ctx := context.Background()
18//   vmmigrationService, err := vmmigration.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   vmmigrationService, err := vmmigration.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   vmmigrationService, err := vmmigration.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package vmmigration // import "google.golang.org/api/vmmigration/v1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "vmmigration:v1"
75const apiName = "vmmigration"
76const apiVersion = "v1"
77const basePath = "https://vmmigration.googleapis.com/"
78const mtlsBasePath = "https://vmmigration.mtls.googleapis.com/"
79
80// OAuth2 scopes used by this API.
81const (
82	// See, edit, configure, and delete your Google Cloud data and see the
83	// email address for your Google Account.
84	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
85)
86
87// NewService creates a new Service.
88func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
89	scopesOption := option.WithScopes(
90		"https://www.googleapis.com/auth/cloud-platform",
91	)
92	// NOTE: prepend, so we don't override user-specified scopes.
93	opts = append([]option.ClientOption{scopesOption}, opts...)
94	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
95	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
96	client, endpoint, err := htransport.NewClient(ctx, opts...)
97	if err != nil {
98		return nil, err
99	}
100	s, err := New(client)
101	if err != nil {
102		return nil, err
103	}
104	if endpoint != "" {
105		s.BasePath = endpoint
106	}
107	return s, nil
108}
109
110// New creates a new Service. It uses the provided http.Client for requests.
111//
112// Deprecated: please use NewService instead.
113// To provide a custom HTTP client, use option.WithHTTPClient.
114// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
115func New(client *http.Client) (*Service, error) {
116	if client == nil {
117		return nil, errors.New("client is nil")
118	}
119	s := &Service{client: client, BasePath: basePath}
120	s.Projects = NewProjectsService(s)
121	return s, nil
122}
123
124type Service struct {
125	client    *http.Client
126	BasePath  string // API endpoint base URL
127	UserAgent string // optional additional User-Agent fragment
128
129	Projects *ProjectsService
130}
131
132func (s *Service) userAgent() string {
133	if s.UserAgent == "" {
134		return googleapi.UserAgent
135	}
136	return googleapi.UserAgent + " " + s.UserAgent
137}
138
139func NewProjectsService(s *Service) *ProjectsService {
140	rs := &ProjectsService{s: s}
141	rs.Locations = NewProjectsLocationsService(s)
142	return rs
143}
144
145type ProjectsService struct {
146	s *Service
147
148	Locations *ProjectsLocationsService
149}
150
151func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
152	rs := &ProjectsLocationsService{s: s}
153	rs.Groups = NewProjectsLocationsGroupsService(s)
154	rs.Operations = NewProjectsLocationsOperationsService(s)
155	rs.Sources = NewProjectsLocationsSourcesService(s)
156	rs.TargetProjects = NewProjectsLocationsTargetProjectsService(s)
157	return rs
158}
159
160type ProjectsLocationsService struct {
161	s *Service
162
163	Groups *ProjectsLocationsGroupsService
164
165	Operations *ProjectsLocationsOperationsService
166
167	Sources *ProjectsLocationsSourcesService
168
169	TargetProjects *ProjectsLocationsTargetProjectsService
170}
171
172func NewProjectsLocationsGroupsService(s *Service) *ProjectsLocationsGroupsService {
173	rs := &ProjectsLocationsGroupsService{s: s}
174	return rs
175}
176
177type ProjectsLocationsGroupsService struct {
178	s *Service
179}
180
181func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
182	rs := &ProjectsLocationsOperationsService{s: s}
183	return rs
184}
185
186type ProjectsLocationsOperationsService struct {
187	s *Service
188}
189
190func NewProjectsLocationsSourcesService(s *Service) *ProjectsLocationsSourcesService {
191	rs := &ProjectsLocationsSourcesService{s: s}
192	rs.DatacenterConnectors = NewProjectsLocationsSourcesDatacenterConnectorsService(s)
193	rs.MigratingVms = NewProjectsLocationsSourcesMigratingVmsService(s)
194	rs.UtilizationReports = NewProjectsLocationsSourcesUtilizationReportsService(s)
195	return rs
196}
197
198type ProjectsLocationsSourcesService struct {
199	s *Service
200
201	DatacenterConnectors *ProjectsLocationsSourcesDatacenterConnectorsService
202
203	MigratingVms *ProjectsLocationsSourcesMigratingVmsService
204
205	UtilizationReports *ProjectsLocationsSourcesUtilizationReportsService
206}
207
208func NewProjectsLocationsSourcesDatacenterConnectorsService(s *Service) *ProjectsLocationsSourcesDatacenterConnectorsService {
209	rs := &ProjectsLocationsSourcesDatacenterConnectorsService{s: s}
210	return rs
211}
212
213type ProjectsLocationsSourcesDatacenterConnectorsService struct {
214	s *Service
215}
216
217func NewProjectsLocationsSourcesMigratingVmsService(s *Service) *ProjectsLocationsSourcesMigratingVmsService {
218	rs := &ProjectsLocationsSourcesMigratingVmsService{s: s}
219	rs.CloneJobs = NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s)
220	rs.CutoverJobs = NewProjectsLocationsSourcesMigratingVmsCutoverJobsService(s)
221	return rs
222}
223
224type ProjectsLocationsSourcesMigratingVmsService struct {
225	s *Service
226
227	CloneJobs *ProjectsLocationsSourcesMigratingVmsCloneJobsService
228
229	CutoverJobs *ProjectsLocationsSourcesMigratingVmsCutoverJobsService
230}
231
232func NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s *Service) *ProjectsLocationsSourcesMigratingVmsCloneJobsService {
233	rs := &ProjectsLocationsSourcesMigratingVmsCloneJobsService{s: s}
234	return rs
235}
236
237type ProjectsLocationsSourcesMigratingVmsCloneJobsService struct {
238	s *Service
239}
240
241func NewProjectsLocationsSourcesMigratingVmsCutoverJobsService(s *Service) *ProjectsLocationsSourcesMigratingVmsCutoverJobsService {
242	rs := &ProjectsLocationsSourcesMigratingVmsCutoverJobsService{s: s}
243	return rs
244}
245
246type ProjectsLocationsSourcesMigratingVmsCutoverJobsService struct {
247	s *Service
248}
249
250func NewProjectsLocationsSourcesUtilizationReportsService(s *Service) *ProjectsLocationsSourcesUtilizationReportsService {
251	rs := &ProjectsLocationsSourcesUtilizationReportsService{s: s}
252	return rs
253}
254
255type ProjectsLocationsSourcesUtilizationReportsService struct {
256	s *Service
257}
258
259func NewProjectsLocationsTargetProjectsService(s *Service) *ProjectsLocationsTargetProjectsService {
260	rs := &ProjectsLocationsTargetProjectsService{s: s}
261	return rs
262}
263
264type ProjectsLocationsTargetProjectsService struct {
265	s *Service
266}
267
268// AddGroupMigrationRequest: Request message for 'AddGroupMigration'
269// request.
270type AddGroupMigrationRequest struct {
271	// MigratingVm: The full path name of the MigratingVm to add.
272	MigratingVm string `json:"migratingVm,omitempty"`
273
274	// ForceSendFields is a list of field names (e.g. "MigratingVm") to
275	// unconditionally include in API requests. By default, fields with
276	// empty or default values are omitted from API requests. However, any
277	// non-pointer, non-interface field appearing in ForceSendFields will be
278	// sent to the server regardless of whether the field is empty or not.
279	// This may be used to include empty fields in Patch requests.
280	ForceSendFields []string `json:"-"`
281
282	// NullFields is a list of field names (e.g. "MigratingVm") to include
283	// in API requests with the JSON null value. By default, fields with
284	// empty values are omitted from API requests. However, any field with
285	// an empty value appearing in NullFields will be sent to the server as
286	// null. It is an error if a field in this list has a non-empty value.
287	// This may be used to include null fields in Patch requests.
288	NullFields []string `json:"-"`
289}
290
291func (s *AddGroupMigrationRequest) MarshalJSON() ([]byte, error) {
292	type NoMethod AddGroupMigrationRequest
293	raw := NoMethod(*s)
294	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
295}
296
297// AppliedLicense: AppliedLicense holds the license data returned by
298// adaptation module report.
299type AppliedLicense struct {
300	// OsLicense: The OS license returned from the adaptation module's
301	// report.
302	OsLicense string `json:"osLicense,omitempty"`
303
304	// Type: The license type that was used in OS adaptation.
305	//
306	// Possible values:
307	//   "TYPE_UNSPECIFIED" - Unspecified license for the OS.
308	//   "NONE" - No license available for the OS.
309	//   "PAYG" - The license type is Pay As You Go license type.
310	//   "BYOL" - The license type is is Bring Your Own License type.
311	Type string `json:"type,omitempty"`
312
313	// ForceSendFields is a list of field names (e.g. "OsLicense") to
314	// unconditionally include in API requests. By default, fields with
315	// empty or default values are omitted from API requests. However, any
316	// non-pointer, non-interface field appearing in ForceSendFields will be
317	// sent to the server regardless of whether the field is empty or not.
318	// This may be used to include empty fields in Patch requests.
319	ForceSendFields []string `json:"-"`
320
321	// NullFields is a list of field names (e.g. "OsLicense") to include in
322	// API requests with the JSON null value. By default, fields with empty
323	// values are omitted from API requests. However, any field with an
324	// empty value appearing in NullFields will be sent to the server as
325	// null. It is an error if a field in this list has a non-empty value.
326	// This may be used to include null fields in Patch requests.
327	NullFields []string `json:"-"`
328}
329
330func (s *AppliedLicense) MarshalJSON() ([]byte, error) {
331	type NoMethod AppliedLicense
332	raw := NoMethod(*s)
333	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
334}
335
336// CancelCloneJobRequest: Request message for 'CancelCloneJob' request.
337type CancelCloneJobRequest struct {
338}
339
340// CancelCutoverJobRequest: Request message for 'CancelCutoverJob'
341// request.
342type CancelCutoverJobRequest struct {
343}
344
345// CancelOperationRequest: The request message for
346// Operations.CancelOperation.
347type CancelOperationRequest struct {
348}
349
350// CloneJob: CloneJob describes the process of creating a clone of a
351// MigratingVM to the requested target based on the latest successful
352// uploaded snapshots. While the migration cycles of a MigratingVm take
353// place, it is possible to verify the uploaded VM can be started in the
354// cloud, by creating a clone. The clone can be created without any
355// downtime, and it is created using the latest snapshots which are
356// already in the cloud. The cloneJob is only responsible for its work,
357// not its products, which means once it is finished, it will never
358// touch the instance it created. It will only delete it in case of the
359// CloneJob being cancelled or upon failure to clone.
360type CloneJob struct {
361	// ComputeEngineTargetDetails: Output only. Details of the target VM in
362	// Compute Engine.
363	ComputeEngineTargetDetails *ComputeEngineTargetDetails `json:"computeEngineTargetDetails,omitempty"`
364
365	// ComputeEngineVmDetails: Output only. Details of the VM in Compute
366	// Engine. Deprecated: Use compute_engine_target_details instead.
367	ComputeEngineVmDetails *TargetVMDetails `json:"computeEngineVmDetails,omitempty"`
368
369	// CreateTime: Output only. The time the clone job was created (as an
370	// API call, not when it was actually created in the target).
371	CreateTime string `json:"createTime,omitempty"`
372
373	// Error: Output only. Provides details for the errors that led to the
374	// Clone Job's state.
375	Error *Status `json:"error,omitempty"`
376
377	// Name: The name of the clone.
378	Name string `json:"name,omitempty"`
379
380	// State: Output only. State of the clone job.
381	//
382	// Possible values:
383	//   "STATE_UNSPECIFIED" - The state is unknown. This is used for API
384	// compatibility only and is not used by the system.
385	//   "PENDING" - The clone job has not yet started.
386	//   "ACTIVE" - The clone job is active and running.
387	//   "FAILED" - The clone job finished with errors.
388	//   "SUCCEEDED" - The clone job finished successfully.
389	//   "CANCELLED" - The clone job was cancelled.
390	//   "CANCELLING" - The clone job is being cancelled.
391	//   "ADAPTING_OS" - OS adaptation is running as part of the clone job
392	// to generate license.
393	State string `json:"state,omitempty"`
394
395	// StateTime: Output only. The time the state was last updated.
396	StateTime string `json:"stateTime,omitempty"`
397
398	// ServerResponse contains the HTTP response code and headers from the
399	// server.
400	googleapi.ServerResponse `json:"-"`
401
402	// ForceSendFields is a list of field names (e.g.
403	// "ComputeEngineTargetDetails") to unconditionally include in API
404	// requests. By default, fields with empty or default values are omitted
405	// from API requests. However, any non-pointer, non-interface field
406	// appearing in ForceSendFields will be sent to the server regardless of
407	// whether the field is empty or not. This may be used to include empty
408	// fields in Patch requests.
409	ForceSendFields []string `json:"-"`
410
411	// NullFields is a list of field names (e.g.
412	// "ComputeEngineTargetDetails") to include in API requests with the
413	// JSON null value. By default, fields with empty values are omitted
414	// from API requests. However, any field with an empty value appearing
415	// in NullFields will be sent to the server as null. It is an error if a
416	// field in this list has a non-empty value. This may be used to include
417	// null fields in Patch requests.
418	NullFields []string `json:"-"`
419}
420
421func (s *CloneJob) MarshalJSON() ([]byte, error) {
422	type NoMethod CloneJob
423	raw := NoMethod(*s)
424	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
425}
426
427// ComputeEngineTargetDefaults: ComputeEngineTargetDefaults is a
428// collection of details for creating a VM in a target Compute Engine
429// project.
430type ComputeEngineTargetDefaults struct {
431	// AppliedLicense: Output only. The OS license returned from the
432	// adaptation module report.
433	AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"`
434
435	// BootOption: Output only. The VM Boot Option, as set in the source vm.
436	//
437	// Possible values:
438	//   "COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED" - The boot option is
439	// unknown.
440	//   "COMPUTE_ENGINE_BOOT_OPTION_EFI" - The boot option is EFI.
441	//   "COMPUTE_ENGINE_BOOT_OPTION_BIOS" - The boot option is BIOS.
442	BootOption string `json:"bootOption,omitempty"`
443
444	// ComputeScheduling: Compute instance scheduling information (if empty
445	// default is used).
446	ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"`
447
448	// DiskType: The disk type to use in the VM.
449	//
450	// Possible values:
451	//   "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED" - An unspecified disk type.
452	// Will be used as STANDARD.
453	//   "COMPUTE_ENGINE_DISK_TYPE_STANDARD" - A Standard disk type.
454	//   "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type.
455	//   "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD
456	// persistent disks that balance performance and cost.
457	DiskType string `json:"diskType,omitempty"`
458
459	// Labels: A map of labels to associate with the VM.
460	Labels map[string]string `json:"labels,omitempty"`
461
462	// LicenseType: The license type to use in OS adaptation.
463	//
464	// Possible values:
465	//   "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT" - The license type is the
466	// default for the OS.
467	//   "COMPUTE_ENGINE_LICENSE_TYPE_PAYG" - The license type is Pay As You
468	// Go license type.
469	//   "COMPUTE_ENGINE_LICENSE_TYPE_BYOL" - The license type is Bring Your
470	// Own License type.
471	LicenseType string `json:"licenseType,omitempty"`
472
473	// MachineType: The machine type to create the VM with.
474	MachineType string `json:"machineType,omitempty"`
475
476	// MachineTypeSeries: The machine type series to create the VM with.
477	MachineTypeSeries string `json:"machineTypeSeries,omitempty"`
478
479	// Metadata: The metadata key/value pairs to assign to the VM.
480	Metadata map[string]string `json:"metadata,omitempty"`
481
482	// NetworkInterfaces: List of NICs connected to this VM.
483	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
484
485	// NetworkTags: A map of network tags to associate with the VM.
486	NetworkTags []string `json:"networkTags,omitempty"`
487
488	// SecureBoot: Defines whether the instance has Secure Boot enabled.
489	// This can be set to true only if the vm boot option is EFI.
490	SecureBoot bool `json:"secureBoot,omitempty"`
491
492	// ServiceAccount: The service account to associate the VM with.
493	ServiceAccount string `json:"serviceAccount,omitempty"`
494
495	// TargetProject: The full path of the resource of type TargetProject
496	// which represents the Compute Engine project in which to create this
497	// VM.
498	TargetProject string `json:"targetProject,omitempty"`
499
500	// VmName: The name of the VM to create.
501	VmName string `json:"vmName,omitempty"`
502
503	// Zone: The zone in which to create the VM.
504	Zone string `json:"zone,omitempty"`
505
506	// ForceSendFields is a list of field names (e.g. "AppliedLicense") to
507	// unconditionally include in API requests. By default, fields with
508	// empty or default values are omitted from API requests. However, any
509	// non-pointer, non-interface field appearing in ForceSendFields will be
510	// sent to the server regardless of whether the field is empty or not.
511	// This may be used to include empty fields in Patch requests.
512	ForceSendFields []string `json:"-"`
513
514	// NullFields is a list of field names (e.g. "AppliedLicense") to
515	// include in API requests with the JSON null value. By default, fields
516	// with empty values are omitted from API requests. However, any field
517	// with an empty value appearing in NullFields will be sent to the
518	// server as null. It is an error if a field in this list has a
519	// non-empty value. This may be used to include null fields in Patch
520	// requests.
521	NullFields []string `json:"-"`
522}
523
524func (s *ComputeEngineTargetDefaults) MarshalJSON() ([]byte, error) {
525	type NoMethod ComputeEngineTargetDefaults
526	raw := NoMethod(*s)
527	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
528}
529
530// ComputeEngineTargetDetails: ComputeEngineTargetDetails is a
531// collection of details for creating a VM in a target Compute Engine
532// project.
533type ComputeEngineTargetDetails struct {
534	// AppliedLicense: The OS license returned from the adaptation module
535	// report.
536	AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"`
537
538	// BootOption: The VM Boot Option, as set in the source vm.
539	//
540	// Possible values:
541	//   "COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED" - The boot option is
542	// unknown.
543	//   "COMPUTE_ENGINE_BOOT_OPTION_EFI" - The boot option is EFI.
544	//   "COMPUTE_ENGINE_BOOT_OPTION_BIOS" - The boot option is BIOS.
545	BootOption string `json:"bootOption,omitempty"`
546
547	// ComputeScheduling: Compute instance scheduling information (if empty
548	// default is used).
549	ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"`
550
551	// DiskType: The disk type to use in the VM.
552	//
553	// Possible values:
554	//   "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED" - An unspecified disk type.
555	// Will be used as STANDARD.
556	//   "COMPUTE_ENGINE_DISK_TYPE_STANDARD" - A Standard disk type.
557	//   "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type.
558	//   "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD
559	// persistent disks that balance performance and cost.
560	DiskType string `json:"diskType,omitempty"`
561
562	// Labels: A map of labels to associate with the VM.
563	Labels map[string]string `json:"labels,omitempty"`
564
565	// LicenseType: The license type to use in OS adaptation.
566	//
567	// Possible values:
568	//   "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT" - The license type is the
569	// default for the OS.
570	//   "COMPUTE_ENGINE_LICENSE_TYPE_PAYG" - The license type is Pay As You
571	// Go license type.
572	//   "COMPUTE_ENGINE_LICENSE_TYPE_BYOL" - The license type is Bring Your
573	// Own License type.
574	LicenseType string `json:"licenseType,omitempty"`
575
576	// MachineType: The machine type to create the VM with.
577	MachineType string `json:"machineType,omitempty"`
578
579	// MachineTypeSeries: The machine type series to create the VM with.
580	MachineTypeSeries string `json:"machineTypeSeries,omitempty"`
581
582	// Metadata: The metadata key/value pairs to assign to the VM.
583	Metadata map[string]string `json:"metadata,omitempty"`
584
585	// NetworkInterfaces: List of NICs connected to this VM.
586	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
587
588	// NetworkTags: A map of network tags to associate with the VM.
589	NetworkTags []string `json:"networkTags,omitempty"`
590
591	// Project: The GCP target project ID or project name.
592	Project string `json:"project,omitempty"`
593
594	// SecureBoot: Defines whether the instance has Secure Boot enabled.
595	// This can be set to true only if the vm boot option is EFI.
596	SecureBoot bool `json:"secureBoot,omitempty"`
597
598	// ServiceAccount: The service account to associate the VM with.
599	ServiceAccount string `json:"serviceAccount,omitempty"`
600
601	// VmName: The name of the VM to create.
602	VmName string `json:"vmName,omitempty"`
603
604	// Zone: The zone in which to create the VM.
605	Zone string `json:"zone,omitempty"`
606
607	// ForceSendFields is a list of field names (e.g. "AppliedLicense") to
608	// unconditionally include in API requests. By default, fields with
609	// empty or default values are omitted from API requests. However, any
610	// non-pointer, non-interface field appearing in ForceSendFields will be
611	// sent to the server regardless of whether the field is empty or not.
612	// This may be used to include empty fields in Patch requests.
613	ForceSendFields []string `json:"-"`
614
615	// NullFields is a list of field names (e.g. "AppliedLicense") to
616	// include in API requests with the JSON null value. By default, fields
617	// with empty values are omitted from API requests. However, any field
618	// with an empty value appearing in NullFields will be sent to the
619	// server as null. It is an error if a field in this list has a
620	// non-empty value. This may be used to include null fields in Patch
621	// requests.
622	NullFields []string `json:"-"`
623}
624
625func (s *ComputeEngineTargetDetails) MarshalJSON() ([]byte, error) {
626	type NoMethod ComputeEngineTargetDetails
627	raw := NoMethod(*s)
628	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
629}
630
631// ComputeScheduling: Scheduling information for VM on
632// maintenance/restart behaviour and node allocation in sole tenant
633// nodes.
634type ComputeScheduling struct {
635	// MinNodeCpus: The minimum number of virtual CPUs this instance will
636	// consume when running on a sole-tenant node. Ignored if no
637	// node_affinites are configured.
638	MinNodeCpus int64 `json:"minNodeCpus,omitempty"`
639
640	// NodeAffinities: A set of node affinity and anti-affinity
641	// configurations for sole tenant nodes.
642	NodeAffinities []*SchedulingNodeAffinity `json:"nodeAffinities,omitempty"`
643
644	// OnHostMaintenance: How the instance should behave when the host
645	// machine undergoes maintenance that may temporarily impact instance
646	// performance.
647	//
648	// Possible values:
649	//   "ON_HOST_MAINTENANCE_UNSPECIFIED" - An unknown, unexpected
650	// behavior.
651	//   "TERMINATE" - Terminate the instance when the host machine
652	// undergoes maintenance.
653	//   "MIGRATE" - Migrate the instance when the host machine undergoes
654	// maintenance.
655	OnHostMaintenance string `json:"onHostMaintenance,omitempty"`
656
657	// RestartType: Whether the Instance should be automatically restarted
658	// whenever it is terminated by Compute Engine (not terminated by user).
659	// This configuration is identical to `automaticRestart` field in
660	// Compute Engine create instance under scheduling. It was changed to an
661	// enum (instead of a boolean) to match the default value in Compute
662	// Engine which is automatic restart.
663	//
664	// Possible values:
665	//   "RESTART_TYPE_UNSPECIFIED" - Unspecified behavior. This will use
666	// the default.
667	//   "AUTOMATIC_RESTART" - The Instance should be automatically
668	// restarted whenever it is terminated by Compute Engine.
669	//   "NO_AUTOMATIC_RESTART" - The Instance isn't automatically restarted
670	// whenever it is terminated by Compute Engine.
671	RestartType string `json:"restartType,omitempty"`
672
673	// ForceSendFields is a list of field names (e.g. "MinNodeCpus") to
674	// unconditionally include in API requests. By default, fields with
675	// empty or default values are omitted from API requests. However, any
676	// non-pointer, non-interface field appearing in ForceSendFields will be
677	// sent to the server regardless of whether the field is empty or not.
678	// This may be used to include empty fields in Patch requests.
679	ForceSendFields []string `json:"-"`
680
681	// NullFields is a list of field names (e.g. "MinNodeCpus") to include
682	// in API requests with the JSON null value. By default, fields with
683	// empty values are omitted from API requests. However, any field with
684	// an empty value appearing in NullFields will be sent to the server as
685	// null. It is an error if a field in this list has a non-empty value.
686	// This may be used to include null fields in Patch requests.
687	NullFields []string `json:"-"`
688}
689
690func (s *ComputeScheduling) MarshalJSON() ([]byte, error) {
691	type NoMethod ComputeScheduling
692	raw := NoMethod(*s)
693	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
694}
695
696// CutoverJob: CutoverJob message describes a cutover of a migrating VM.
697// The CutoverJob is the operation of shutting down the VM, creating a
698// snapshot and clonning the VM using the replicated snapshot.
699type CutoverJob struct {
700	// ComputeEngineTargetDetails: Output only. Details of the target VM in
701	// Compute Engine.
702	ComputeEngineTargetDetails *ComputeEngineTargetDetails `json:"computeEngineTargetDetails,omitempty"`
703
704	// ComputeEngineVmDetails: Output only. Details of the VM in Compute
705	// Engine. Deprecated: Use compute_engine_target_details instead.
706	ComputeEngineVmDetails *TargetVMDetails `json:"computeEngineVmDetails,omitempty"`
707
708	// CreateTime: Output only. The time the cutover job was created (as an
709	// API call, not when it was actually created in the target).
710	CreateTime string `json:"createTime,omitempty"`
711
712	// Error: Output only. Provides details for the errors that led to the
713	// Cutover Job's state.
714	Error *Status `json:"error,omitempty"`
715
716	// Name: Output only. The name of the cutover job.
717	Name string `json:"name,omitempty"`
718
719	// ProgressPercent: Output only. The current progress in percentage of
720	// the cutover job.
721	ProgressPercent int64 `json:"progressPercent,omitempty"`
722
723	// State: Output only. State of the cutover job.
724	//
725	// Possible values:
726	//   "STATE_UNSPECIFIED" - The state is unknown. This is used for API
727	// compatibility only and is not used by the system.
728	//   "PENDING" - The cutover job has not yet started.
729	//   "FAILED" - The cutover job finished with errors.
730	//   "SUCCEEDED" - The cutover job finished successfully.
731	//   "CANCELLED" - The cutover job was cancelled.
732	//   "CANCELLING" - The cutover job is being cancelled.
733	//   "ACTIVE" - The cutover job is active and running.
734	//   "ADAPTING_OS" - OS adaptation is running as part of the cutover job
735	// to generate license.
736	State string `json:"state,omitempty"`
737
738	// StateMessage: Output only. A message providing possible extra details
739	// about the current state.
740	StateMessage string `json:"stateMessage,omitempty"`
741
742	// StateTime: Output only. The time the state was last updated.
743	StateTime string `json:"stateTime,omitempty"`
744
745	// ServerResponse contains the HTTP response code and headers from the
746	// server.
747	googleapi.ServerResponse `json:"-"`
748
749	// ForceSendFields is a list of field names (e.g.
750	// "ComputeEngineTargetDetails") to unconditionally include in API
751	// requests. By default, fields with empty or default values are omitted
752	// from API requests. However, any non-pointer, non-interface field
753	// appearing in ForceSendFields will be sent to the server regardless of
754	// whether the field is empty or not. This may be used to include empty
755	// fields in Patch requests.
756	ForceSendFields []string `json:"-"`
757
758	// NullFields is a list of field names (e.g.
759	// "ComputeEngineTargetDetails") to include in API requests with the
760	// JSON null value. By default, fields with empty values are omitted
761	// from API requests. However, any field with an empty value appearing
762	// in NullFields will be sent to the server as null. It is an error if a
763	// field in this list has a non-empty value. This may be used to include
764	// null fields in Patch requests.
765	NullFields []string `json:"-"`
766}
767
768func (s *CutoverJob) MarshalJSON() ([]byte, error) {
769	type NoMethod CutoverJob
770	raw := NoMethod(*s)
771	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
772}
773
774// DatacenterConnector: DatacenterConnector message describes a
775// connector between the Source and GCP, which is installed on a vmware
776// datacenter (an OVA vm installed by the user) to connect the
777// Datacenter to GCP and support vm migration data transfer.
778type DatacenterConnector struct {
779	// Bucket: Output only. The communication channel between the datacenter
780	// connector and GCP.
781	Bucket string `json:"bucket,omitempty"`
782
783	// CreateTime: Output only. The time the connector was created (as an
784	// API call, not when it was actually installed).
785	CreateTime string `json:"createTime,omitempty"`
786
787	// Error: Output only. Provides details on the state of the Datacenter
788	// Connector in case of an error.
789	Error *Status `json:"error,omitempty"`
790
791	// Name: Output only. The connector's name.
792	Name string `json:"name,omitempty"`
793
794	// RegistrationId: Immutable. A unique key for this connector. This key
795	// is internal to the OVA connector and is supplied with its creation
796	// during the registration process and can not be modified.
797	RegistrationId string `json:"registrationId,omitempty"`
798
799	// ServiceAccount: The service account to use in the connector when
800	// communicating with the cloud.
801	ServiceAccount string `json:"serviceAccount,omitempty"`
802
803	// State: Output only. State of the DatacenterConnector, as determined
804	// by the health checks.
805	//
806	// Possible values:
807	//   "STATE_UNSPECIFIED" - The state is unknown. This is used for API
808	// compatibility only and is not used by the system.
809	//   "PENDING" - The state was not sampled by the health checks yet.
810	//   "OFFLINE" - The source was sampled by health checks and is not
811	// available.
812	//   "FAILED" - The source is available but might not be usable yet due
813	// to unvalidated credentials or another reason. The credentials
814	// referred to are the ones to the Source. The error message will
815	// contain further details.
816	//   "ACTIVE" - The source exists and its credentials were verified.
817	State string `json:"state,omitempty"`
818
819	// StateTime: Output only. The time the state was last set.
820	StateTime string `json:"stateTime,omitempty"`
821
822	// UpdateTime: Output only. The last time the connector was updated with
823	// an API call.
824	UpdateTime string `json:"updateTime,omitempty"`
825
826	// Version: The version running in the DatacenterConnector. This is
827	// supplied by the OVA connector during the registration process and can
828	// not be modified.
829	Version string `json:"version,omitempty"`
830
831	// ServerResponse contains the HTTP response code and headers from the
832	// server.
833	googleapi.ServerResponse `json:"-"`
834
835	// ForceSendFields is a list of field names (e.g. "Bucket") to
836	// unconditionally include in API requests. By default, fields with
837	// empty or default values are omitted from API requests. However, any
838	// non-pointer, non-interface field appearing in ForceSendFields will be
839	// sent to the server regardless of whether the field is empty or not.
840	// This may be used to include empty fields in Patch requests.
841	ForceSendFields []string `json:"-"`
842
843	// NullFields is a list of field names (e.g. "Bucket") to include in API
844	// requests with the JSON null value. By default, fields with empty
845	// values are omitted from API requests. However, any field with an
846	// empty value appearing in NullFields will be sent to the server as
847	// null. It is an error if a field in this list has a non-empty value.
848	// This may be used to include null fields in Patch requests.
849	NullFields []string `json:"-"`
850}
851
852func (s *DatacenterConnector) MarshalJSON() ([]byte, error) {
853	type NoMethod DatacenterConnector
854	raw := NoMethod(*s)
855	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
856}
857
858// Empty: A generic empty message that you can re-use to avoid defining
859// duplicated empty messages in your APIs. A typical example is to use
860// it as the request or the response type of an API method. For
861// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
862// (google.protobuf.Empty); } The JSON representation for `Empty` is
863// empty JSON object `{}`.
864type Empty struct {
865	// ServerResponse contains the HTTP response code and headers from the
866	// server.
867	googleapi.ServerResponse `json:"-"`
868}
869
870// FetchInventoryResponse: Response message for fetchInventory.
871type FetchInventoryResponse struct {
872	// UpdateTime: Output only. The timestamp when the source was last
873	// queried (if the result is from the cache).
874	UpdateTime string `json:"updateTime,omitempty"`
875
876	// VmwareVms: Output only. The description of the VMs in a Source of
877	// type Vmware.
878	VmwareVms *VmwareVmsDetails `json:"vmwareVms,omitempty"`
879
880	// ServerResponse contains the HTTP response code and headers from the
881	// server.
882	googleapi.ServerResponse `json:"-"`
883
884	// ForceSendFields is a list of field names (e.g. "UpdateTime") to
885	// unconditionally include in API requests. By default, fields with
886	// empty or default values are omitted from API requests. However, any
887	// non-pointer, non-interface field appearing in ForceSendFields will be
888	// sent to the server regardless of whether the field is empty or not.
889	// This may be used to include empty fields in Patch requests.
890	ForceSendFields []string `json:"-"`
891
892	// NullFields is a list of field names (e.g. "UpdateTime") to include in
893	// API requests with the JSON null value. By default, fields with empty
894	// values are omitted from API requests. However, any field with an
895	// empty value appearing in NullFields will be sent to the server as
896	// null. It is an error if a field in this list has a non-empty value.
897	// This may be used to include null fields in Patch requests.
898	NullFields []string `json:"-"`
899}
900
901func (s *FetchInventoryResponse) MarshalJSON() ([]byte, error) {
902	type NoMethod FetchInventoryResponse
903	raw := NoMethod(*s)
904	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
905}
906
907// FinalizeMigrationRequest: Request message for 'FinalizeMigration'
908// request.
909type FinalizeMigrationRequest struct {
910}
911
912// Group: Describes message for 'Group' resource. The Group is a
913// collections of several MigratingVms.
914type Group struct {
915	// CreateTime: Output only. The create time timestamp.
916	CreateTime string `json:"createTime,omitempty"`
917
918	// Description: User-provided description of the group.
919	Description string `json:"description,omitempty"`
920
921	// DisplayName: Display name is a user defined name for this group which
922	// can be updated.
923	DisplayName string `json:"displayName,omitempty"`
924
925	// Name: The Group name.
926	Name string `json:"name,omitempty"`
927
928	// UpdateTime: Output only. The update time timestamp.
929	UpdateTime string `json:"updateTime,omitempty"`
930
931	// ServerResponse contains the HTTP response code and headers from the
932	// server.
933	googleapi.ServerResponse `json:"-"`
934
935	// ForceSendFields is a list of field names (e.g. "CreateTime") to
936	// unconditionally include in API requests. By default, fields with
937	// empty or default values are omitted from API requests. However, any
938	// non-pointer, non-interface field appearing in ForceSendFields will be
939	// sent to the server regardless of whether the field is empty or not.
940	// This may be used to include empty fields in Patch requests.
941	ForceSendFields []string `json:"-"`
942
943	// NullFields is a list of field names (e.g. "CreateTime") to include in
944	// API requests with the JSON null value. By default, fields with empty
945	// values are omitted from API requests. However, any field with an
946	// empty value appearing in NullFields will be sent to the server as
947	// null. It is an error if a field in this list has a non-empty value.
948	// This may be used to include null fields in Patch requests.
949	NullFields []string `json:"-"`
950}
951
952func (s *Group) MarshalJSON() ([]byte, error) {
953	type NoMethod Group
954	raw := NoMethod(*s)
955	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
956}
957
958// Link: Describes a URL link.
959type Link struct {
960	// Description: Describes what the link offers.
961	Description string `json:"description,omitempty"`
962
963	// Url: The URL of the link.
964	Url string `json:"url,omitempty"`
965
966	// ForceSendFields is a list of field names (e.g. "Description") to
967	// unconditionally include in API requests. By default, fields with
968	// empty or default values are omitted from API requests. However, any
969	// non-pointer, non-interface field appearing in ForceSendFields will be
970	// sent to the server regardless of whether the field is empty or not.
971	// This may be used to include empty fields in Patch requests.
972	ForceSendFields []string `json:"-"`
973
974	// NullFields is a list of field names (e.g. "Description") to include
975	// in API requests with the JSON null value. By default, fields with
976	// empty values are omitted from API requests. However, any field with
977	// an empty value appearing in NullFields will be sent to the server as
978	// null. It is an error if a field in this list has a non-empty value.
979	// This may be used to include null fields in Patch requests.
980	NullFields []string `json:"-"`
981}
982
983func (s *Link) MarshalJSON() ([]byte, error) {
984	type NoMethod Link
985	raw := NoMethod(*s)
986	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
987}
988
989// ListCloneJobsResponse: Response message for 'ListCloneJobs' request.
990type ListCloneJobsResponse struct {
991	// CloneJobs: Output only. The list of clone jobs response.
992	CloneJobs []*CloneJob `json:"cloneJobs,omitempty"`
993
994	// NextPageToken: Output only. A token, which can be sent as
995	// `page_token` to retrieve the next page. If this field is omitted,
996	// there are no subsequent pages.
997	NextPageToken string `json:"nextPageToken,omitempty"`
998
999	// Unreachable: Output only. Locations that could not be reached.
1000	Unreachable []string `json:"unreachable,omitempty"`
1001
1002	// ServerResponse contains the HTTP response code and headers from the
1003	// server.
1004	googleapi.ServerResponse `json:"-"`
1005
1006	// ForceSendFields is a list of field names (e.g. "CloneJobs") to
1007	// unconditionally include in API requests. By default, fields with
1008	// empty or default values are omitted from API requests. However, any
1009	// non-pointer, non-interface field appearing in ForceSendFields will be
1010	// sent to the server regardless of whether the field is empty or not.
1011	// This may be used to include empty fields in Patch requests.
1012	ForceSendFields []string `json:"-"`
1013
1014	// NullFields is a list of field names (e.g. "CloneJobs") to include in
1015	// API requests with the JSON null value. By default, fields with empty
1016	// values are omitted from API requests. However, any field with an
1017	// empty value appearing in NullFields will be sent to the server as
1018	// null. It is an error if a field in this list has a non-empty value.
1019	// This may be used to include null fields in Patch requests.
1020	NullFields []string `json:"-"`
1021}
1022
1023func (s *ListCloneJobsResponse) MarshalJSON() ([]byte, error) {
1024	type NoMethod ListCloneJobsResponse
1025	raw := NoMethod(*s)
1026	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1027}
1028
1029// ListCutoverJobsResponse: Response message for 'ListCutoverJobs'
1030// request.
1031type ListCutoverJobsResponse struct {
1032	// CutoverJobs: Output only. The list of cutover jobs response.
1033	CutoverJobs []*CutoverJob `json:"cutoverJobs,omitempty"`
1034
1035	// NextPageToken: Output only. A token, which can be sent as
1036	// `page_token` to retrieve the next page. If this field is omitted,
1037	// there are no subsequent pages.
1038	NextPageToken string `json:"nextPageToken,omitempty"`
1039
1040	// Unreachable: Output only. Locations that could not be reached.
1041	Unreachable []string `json:"unreachable,omitempty"`
1042
1043	// ServerResponse contains the HTTP response code and headers from the
1044	// server.
1045	googleapi.ServerResponse `json:"-"`
1046
1047	// ForceSendFields is a list of field names (e.g. "CutoverJobs") to
1048	// unconditionally include in API requests. By default, fields with
1049	// empty or default values are omitted from API requests. However, any
1050	// non-pointer, non-interface field appearing in ForceSendFields will be
1051	// sent to the server regardless of whether the field is empty or not.
1052	// This may be used to include empty fields in Patch requests.
1053	ForceSendFields []string `json:"-"`
1054
1055	// NullFields is a list of field names (e.g. "CutoverJobs") to include
1056	// in API requests with the JSON null value. By default, fields with
1057	// empty values are omitted from API requests. However, any field with
1058	// an empty value appearing in NullFields will be sent to the server as
1059	// null. It is an error if a field in this list has a non-empty value.
1060	// This may be used to include null fields in Patch requests.
1061	NullFields []string `json:"-"`
1062}
1063
1064func (s *ListCutoverJobsResponse) MarshalJSON() ([]byte, error) {
1065	type NoMethod ListCutoverJobsResponse
1066	raw := NoMethod(*s)
1067	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1068}
1069
1070// ListDatacenterConnectorsResponse: Response message for
1071// 'ListDatacenterConnectors' request.
1072type ListDatacenterConnectorsResponse struct {
1073	// DatacenterConnectors: Output only. The list of sources response.
1074	DatacenterConnectors []*DatacenterConnector `json:"datacenterConnectors,omitempty"`
1075
1076	// NextPageToken: Output only. A token, which can be sent as
1077	// `page_token` to retrieve the next page. If this field is omitted,
1078	// there are no subsequent pages.
1079	NextPageToken string `json:"nextPageToken,omitempty"`
1080
1081	// Unreachable: Output only. Locations that could not be reached.
1082	Unreachable []string `json:"unreachable,omitempty"`
1083
1084	// ServerResponse contains the HTTP response code and headers from the
1085	// server.
1086	googleapi.ServerResponse `json:"-"`
1087
1088	// ForceSendFields is a list of field names (e.g.
1089	// "DatacenterConnectors") to unconditionally include in API requests.
1090	// By default, fields with empty or default values are omitted from API
1091	// requests. However, any non-pointer, non-interface field appearing in
1092	// ForceSendFields will be sent to the server regardless of whether the
1093	// field is empty or not. This may be used to include empty fields in
1094	// Patch requests.
1095	ForceSendFields []string `json:"-"`
1096
1097	// NullFields is a list of field names (e.g. "DatacenterConnectors") to
1098	// include in API requests with the JSON null value. By default, fields
1099	// with empty values are omitted from API requests. However, any field
1100	// with an empty value appearing in NullFields will be sent to the
1101	// server as null. It is an error if a field in this list has a
1102	// non-empty value. This may be used to include null fields in Patch
1103	// requests.
1104	NullFields []string `json:"-"`
1105}
1106
1107func (s *ListDatacenterConnectorsResponse) MarshalJSON() ([]byte, error) {
1108	type NoMethod ListDatacenterConnectorsResponse
1109	raw := NoMethod(*s)
1110	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1111}
1112
1113// ListGroupsResponse: Response message for 'ListGroups' request.
1114type ListGroupsResponse struct {
1115	// Groups: Output only. The list of groups response.
1116	Groups []*Group `json:"groups,omitempty"`
1117
1118	// NextPageToken: Output only. A token, which can be sent as
1119	// `page_token` to retrieve the next page. If this field is omitted,
1120	// there are no subsequent pages.
1121	NextPageToken string `json:"nextPageToken,omitempty"`
1122
1123	// Unreachable: Output only. Locations that could not be reached.
1124	Unreachable []string `json:"unreachable,omitempty"`
1125
1126	// ServerResponse contains the HTTP response code and headers from the
1127	// server.
1128	googleapi.ServerResponse `json:"-"`
1129
1130	// ForceSendFields is a list of field names (e.g. "Groups") to
1131	// unconditionally include in API requests. By default, fields with
1132	// empty or default values are omitted from API requests. However, any
1133	// non-pointer, non-interface field appearing in ForceSendFields will be
1134	// sent to the server regardless of whether the field is empty or not.
1135	// This may be used to include empty fields in Patch requests.
1136	ForceSendFields []string `json:"-"`
1137
1138	// NullFields is a list of field names (e.g. "Groups") to include in API
1139	// requests with the JSON null value. By default, fields with empty
1140	// values are omitted from API requests. However, any field with an
1141	// empty value appearing in NullFields will be sent to the server as
1142	// null. It is an error if a field in this list has a non-empty value.
1143	// This may be used to include null fields in Patch requests.
1144	NullFields []string `json:"-"`
1145}
1146
1147func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) {
1148	type NoMethod ListGroupsResponse
1149	raw := NoMethod(*s)
1150	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1151}
1152
1153// ListLocationsResponse: The response message for
1154// Locations.ListLocations.
1155type ListLocationsResponse struct {
1156	// Locations: A list of locations that matches the specified filter in
1157	// the request.
1158	Locations []*Location `json:"locations,omitempty"`
1159
1160	// NextPageToken: The standard List next-page token.
1161	NextPageToken string `json:"nextPageToken,omitempty"`
1162
1163	// ServerResponse contains the HTTP response code and headers from the
1164	// server.
1165	googleapi.ServerResponse `json:"-"`
1166
1167	// ForceSendFields is a list of field names (e.g. "Locations") to
1168	// unconditionally include in API requests. By default, fields with
1169	// empty or default values are omitted from API requests. However, any
1170	// non-pointer, non-interface field appearing in ForceSendFields will be
1171	// sent to the server regardless of whether the field is empty or not.
1172	// This may be used to include empty fields in Patch requests.
1173	ForceSendFields []string `json:"-"`
1174
1175	// NullFields is a list of field names (e.g. "Locations") to include in
1176	// API requests with the JSON null value. By default, fields with empty
1177	// values are omitted from API requests. However, any field with an
1178	// empty value appearing in NullFields will be sent to the server as
1179	// null. It is an error if a field in this list has a non-empty value.
1180	// This may be used to include null fields in Patch requests.
1181	NullFields []string `json:"-"`
1182}
1183
1184func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
1185	type NoMethod ListLocationsResponse
1186	raw := NoMethod(*s)
1187	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1188}
1189
1190// ListMigratingVmsResponse: Response message for 'ListMigratingVms'
1191// request.
1192type ListMigratingVmsResponse struct {
1193	// MigratingVms: Output only. The list of Migrating VMs response.
1194	MigratingVms []*MigratingVm `json:"migratingVms,omitempty"`
1195
1196	// NextPageToken: Output only. A token, which can be sent as
1197	// `page_token` to retrieve the next page. If this field is omitted,
1198	// there are no subsequent pages.
1199	NextPageToken string `json:"nextPageToken,omitempty"`
1200
1201	// Unreachable: Output only. Locations that could not be reached.
1202	Unreachable []string `json:"unreachable,omitempty"`
1203
1204	// ServerResponse contains the HTTP response code and headers from the
1205	// server.
1206	googleapi.ServerResponse `json:"-"`
1207
1208	// ForceSendFields is a list of field names (e.g. "MigratingVms") to
1209	// unconditionally include in API requests. By default, fields with
1210	// empty or default values are omitted from API requests. However, any
1211	// non-pointer, non-interface field appearing in ForceSendFields will be
1212	// sent to the server regardless of whether the field is empty or not.
1213	// This may be used to include empty fields in Patch requests.
1214	ForceSendFields []string `json:"-"`
1215
1216	// NullFields is a list of field names (e.g. "MigratingVms") to include
1217	// in API requests with the JSON null value. By default, fields with
1218	// empty values are omitted from API requests. However, any field with
1219	// an empty value appearing in NullFields will be sent to the server as
1220	// null. It is an error if a field in this list has a non-empty value.
1221	// This may be used to include null fields in Patch requests.
1222	NullFields []string `json:"-"`
1223}
1224
1225func (s *ListMigratingVmsResponse) MarshalJSON() ([]byte, error) {
1226	type NoMethod ListMigratingVmsResponse
1227	raw := NoMethod(*s)
1228	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1229}
1230
1231// ListOperationsResponse: The response message for
1232// Operations.ListOperations.
1233type ListOperationsResponse struct {
1234	// NextPageToken: The standard List next-page token.
1235	NextPageToken string `json:"nextPageToken,omitempty"`
1236
1237	// Operations: A list of operations that matches the specified filter in
1238	// the request.
1239	Operations []*Operation `json:"operations,omitempty"`
1240
1241	// ServerResponse contains the HTTP response code and headers from the
1242	// server.
1243	googleapi.ServerResponse `json:"-"`
1244
1245	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1246	// unconditionally include in API requests. By default, fields with
1247	// empty or default values are omitted from API requests. However, any
1248	// non-pointer, non-interface field appearing in ForceSendFields will be
1249	// sent to the server regardless of whether the field is empty or not.
1250	// This may be used to include empty fields in Patch requests.
1251	ForceSendFields []string `json:"-"`
1252
1253	// NullFields is a list of field names (e.g. "NextPageToken") to include
1254	// in API requests with the JSON null value. By default, fields with
1255	// empty values are omitted from API requests. However, any field with
1256	// an empty value appearing in NullFields will be sent to the server as
1257	// null. It is an error if a field in this list has a non-empty value.
1258	// This may be used to include null fields in Patch requests.
1259	NullFields []string `json:"-"`
1260}
1261
1262func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
1263	type NoMethod ListOperationsResponse
1264	raw := NoMethod(*s)
1265	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1266}
1267
1268// ListSourcesResponse: Response message for 'ListSources' request.
1269type ListSourcesResponse struct {
1270	// NextPageToken: Output only. A token, which can be sent as
1271	// `page_token` to retrieve the next page. If this field is omitted,
1272	// there are no subsequent pages.
1273	NextPageToken string `json:"nextPageToken,omitempty"`
1274
1275	// Sources: Output only. The list of sources response.
1276	Sources []*Source `json:"sources,omitempty"`
1277
1278	// Unreachable: Output only. Locations that could not be reached.
1279	Unreachable []string `json:"unreachable,omitempty"`
1280
1281	// ServerResponse contains the HTTP response code and headers from the
1282	// server.
1283	googleapi.ServerResponse `json:"-"`
1284
1285	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1286	// unconditionally include in API requests. By default, fields with
1287	// empty or default values are omitted from API requests. However, any
1288	// non-pointer, non-interface field appearing in ForceSendFields will be
1289	// sent to the server regardless of whether the field is empty or not.
1290	// This may be used to include empty fields in Patch requests.
1291	ForceSendFields []string `json:"-"`
1292
1293	// NullFields is a list of field names (e.g. "NextPageToken") to include
1294	// in API requests with the JSON null value. By default, fields with
1295	// empty values are omitted from API requests. However, any field with
1296	// an empty value appearing in NullFields will be sent to the server as
1297	// null. It is an error if a field in this list has a non-empty value.
1298	// This may be used to include null fields in Patch requests.
1299	NullFields []string `json:"-"`
1300}
1301
1302func (s *ListSourcesResponse) MarshalJSON() ([]byte, error) {
1303	type NoMethod ListSourcesResponse
1304	raw := NoMethod(*s)
1305	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1306}
1307
1308// ListTargetProjectsResponse: Response message for 'ListTargetProjects'
1309// call.
1310type ListTargetProjectsResponse struct {
1311	// NextPageToken: Output only. A token, which can be sent as
1312	// `page_token` to retrieve the next page. If this field is omitted,
1313	// there are no subsequent pages.
1314	NextPageToken string `json:"nextPageToken,omitempty"`
1315
1316	// TargetProjects: Output only. The list of target response.
1317	TargetProjects []*TargetProject `json:"targetProjects,omitempty"`
1318
1319	// Unreachable: Output only. Locations that could not be reached.
1320	Unreachable []string `json:"unreachable,omitempty"`
1321
1322	// ServerResponse contains the HTTP response code and headers from the
1323	// server.
1324	googleapi.ServerResponse `json:"-"`
1325
1326	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1327	// unconditionally include in API requests. By default, fields with
1328	// empty or default values are omitted from API requests. However, any
1329	// non-pointer, non-interface field appearing in ForceSendFields will be
1330	// sent to the server regardless of whether the field is empty or not.
1331	// This may be used to include empty fields in Patch requests.
1332	ForceSendFields []string `json:"-"`
1333
1334	// NullFields is a list of field names (e.g. "NextPageToken") to include
1335	// in API requests with the JSON null value. By default, fields with
1336	// empty values are omitted from API requests. However, any field with
1337	// an empty value appearing in NullFields will be sent to the server as
1338	// null. It is an error if a field in this list has a non-empty value.
1339	// This may be used to include null fields in Patch requests.
1340	NullFields []string `json:"-"`
1341}
1342
1343func (s *ListTargetProjectsResponse) MarshalJSON() ([]byte, error) {
1344	type NoMethod ListTargetProjectsResponse
1345	raw := NoMethod(*s)
1346	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1347}
1348
1349// ListUtilizationReportsResponse: Response message for
1350// 'ListUtilizationReports' request.
1351type ListUtilizationReportsResponse struct {
1352	// NextPageToken: Output only. A token, which can be sent as
1353	// `page_token` to retrieve the next page. If this field is omitted,
1354	// there are no subsequent pages.
1355	NextPageToken string `json:"nextPageToken,omitempty"`
1356
1357	// Unreachable: Output only. Locations that could not be reached.
1358	Unreachable []string `json:"unreachable,omitempty"`
1359
1360	// UtilizationReports: Output only. The list of reports.
1361	UtilizationReports []*UtilizationReport `json:"utilizationReports,omitempty"`
1362
1363	// ServerResponse contains the HTTP response code and headers from the
1364	// server.
1365	googleapi.ServerResponse `json:"-"`
1366
1367	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1368	// unconditionally include in API requests. By default, fields with
1369	// empty or default values are omitted from API requests. However, any
1370	// non-pointer, non-interface field appearing in ForceSendFields will be
1371	// sent to the server regardless of whether the field is empty or not.
1372	// This may be used to include empty fields in Patch requests.
1373	ForceSendFields []string `json:"-"`
1374
1375	// NullFields is a list of field names (e.g. "NextPageToken") to include
1376	// in API requests with the JSON null value. By default, fields with
1377	// empty values are omitted from API requests. However, any field with
1378	// an empty value appearing in NullFields will be sent to the server as
1379	// null. It is an error if a field in this list has a non-empty value.
1380	// This may be used to include null fields in Patch requests.
1381	NullFields []string `json:"-"`
1382}
1383
1384func (s *ListUtilizationReportsResponse) MarshalJSON() ([]byte, error) {
1385	type NoMethod ListUtilizationReportsResponse
1386	raw := NoMethod(*s)
1387	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1388}
1389
1390// LocalizedMessage: Provides a localized error message that is safe to
1391// return to the user which can be attached to an RPC error.
1392type LocalizedMessage struct {
1393	// Locale: The locale used following the specification defined at
1394	// http://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US",
1395	// "fr-CH", "es-MX"
1396	Locale string `json:"locale,omitempty"`
1397
1398	// Message: The localized error message in the above locale.
1399	Message string `json:"message,omitempty"`
1400
1401	// ForceSendFields is a list of field names (e.g. "Locale") to
1402	// unconditionally include in API requests. By default, fields with
1403	// empty or default values are omitted from API requests. However, any
1404	// non-pointer, non-interface field appearing in ForceSendFields will be
1405	// sent to the server regardless of whether the field is empty or not.
1406	// This may be used to include empty fields in Patch requests.
1407	ForceSendFields []string `json:"-"`
1408
1409	// NullFields is a list of field names (e.g. "Locale") to include in API
1410	// requests with the JSON null value. By default, fields with empty
1411	// values are omitted from API requests. However, any field with an
1412	// empty value appearing in NullFields will be sent to the server as
1413	// null. It is an error if a field in this list has a non-empty value.
1414	// This may be used to include null fields in Patch requests.
1415	NullFields []string `json:"-"`
1416}
1417
1418func (s *LocalizedMessage) MarshalJSON() ([]byte, error) {
1419	type NoMethod LocalizedMessage
1420	raw := NoMethod(*s)
1421	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1422}
1423
1424// Location: A resource that represents Google Cloud Platform location.
1425type Location struct {
1426	// DisplayName: The friendly name for this location, typically a nearby
1427	// city name. For example, "Tokyo".
1428	DisplayName string `json:"displayName,omitempty"`
1429
1430	// Labels: Cross-service attributes for the location. For example
1431	// {"cloud.googleapis.com/region": "us-east1"}
1432	Labels map[string]string `json:"labels,omitempty"`
1433
1434	// LocationId: The canonical id for this location. For example:
1435	// "us-east1".
1436	LocationId string `json:"locationId,omitempty"`
1437
1438	// Metadata: Service-specific metadata. For example the available
1439	// capacity at the given location.
1440	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1441
1442	// Name: Resource name for the location, which may vary between
1443	// implementations. For example:
1444	// "projects/example-project/locations/us-east1"
1445	Name string `json:"name,omitempty"`
1446
1447	// ServerResponse contains the HTTP response code and headers from the
1448	// server.
1449	googleapi.ServerResponse `json:"-"`
1450
1451	// ForceSendFields is a list of field names (e.g. "DisplayName") to
1452	// unconditionally include in API requests. By default, fields with
1453	// empty or default values are omitted from API requests. However, any
1454	// non-pointer, non-interface field appearing in ForceSendFields will be
1455	// sent to the server regardless of whether the field is empty or not.
1456	// This may be used to include empty fields in Patch requests.
1457	ForceSendFields []string `json:"-"`
1458
1459	// NullFields is a list of field names (e.g. "DisplayName") to include
1460	// in API requests with the JSON null value. By default, fields with
1461	// empty values are omitted from API requests. However, any field with
1462	// an empty value appearing in NullFields will be sent to the server as
1463	// null. It is an error if a field in this list has a non-empty value.
1464	// This may be used to include null fields in Patch requests.
1465	NullFields []string `json:"-"`
1466}
1467
1468func (s *Location) MarshalJSON() ([]byte, error) {
1469	type NoMethod Location
1470	raw := NoMethod(*s)
1471	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1472}
1473
1474// MigratingVm: MigratingVm describes the VM that will be migrated from
1475// a Source environment and its replication state.
1476type MigratingVm struct {
1477	// ComputeEngineTargetDefaults: Details of the target VM in Compute
1478	// Engine.
1479	ComputeEngineTargetDefaults *ComputeEngineTargetDefaults `json:"computeEngineTargetDefaults,omitempty"`
1480
1481	// CreateTime: Output only. The time the migrating VM was created (this
1482	// refers to this resource and not to the time it was installed in the
1483	// source).
1484	CreateTime string `json:"createTime,omitempty"`
1485
1486	// CurrentSyncInfo: Output only. The percentage progress of the current
1487	// running replication cycle.
1488	CurrentSyncInfo *ReplicationCycle `json:"currentSyncInfo,omitempty"`
1489
1490	// Description: The description attached to the migrating VM by the
1491	// user.
1492	Description string `json:"description,omitempty"`
1493
1494	// DisplayName: The display name attached to the MigratingVm by the
1495	// user.
1496	DisplayName string `json:"displayName,omitempty"`
1497
1498	// Error: Output only. Provides details on the state of the Migrating VM
1499	// in case of an error in replication.
1500	Error *Status `json:"error,omitempty"`
1501
1502	// Group: Output only. The group this migrating vm is included in, if
1503	// any. The group is represented by the full path of the appropriate
1504	// Group resource.
1505	Group string `json:"group,omitempty"`
1506
1507	// Labels: The labels of the migrating VM.
1508	Labels map[string]string `json:"labels,omitempty"`
1509
1510	// LastSync: Output only. The most updated snapshot created time in the
1511	// source that finished replication.
1512	LastSync *ReplicationSync `json:"lastSync,omitempty"`
1513
1514	// Name: Output only. The identifier of the MigratingVm.
1515	Name string `json:"name,omitempty"`
1516
1517	// Policy: The replication schedule policy.
1518	Policy *SchedulePolicy `json:"policy,omitempty"`
1519
1520	// SourceVmId: The unique ID of the VM in the source. The VM's name in
1521	// vSphere can be changed, so this is not the VM's name but rather its
1522	// moRef id. This id is of the form vm-.
1523	SourceVmId string `json:"sourceVmId,omitempty"`
1524
1525	// State: Output only. State of the MigratingVm.
1526	//
1527	// Possible values:
1528	//   "STATE_UNSPECIFIED" - The state was not sampled by the health
1529	// checks yet.
1530	//   "PENDING" - The VM in the source is being verified.
1531	//   "READY" - The source VM was verified, and it's ready to start
1532	// replication.
1533	//   "FIRST_SYNC" - Migration is going through the first sync cycle.
1534	//   "ACTIVE" - The replication is active, and it's running or scheduled
1535	// to run.
1536	//   "CUTTING_OVER" - The source VM is being turned off, and a final
1537	// replication is currently running.
1538	//   "CUTOVER" - The source VM was stopped and replicated. The
1539	// replication is currently paused.
1540	//   "FINAL_SYNC" - A cutover job is active and replication cycle is
1541	// running the final sync.
1542	//   "PAUSED" - The replication was paused by the user and no cycles are
1543	// scheduled to run.
1544	//   "FINALIZING" - The migrating VM is being finalized and migration
1545	// resources are being removed.
1546	//   "FINALIZED" - The replication process is done. The migrating VM is
1547	// finalized and no longer consumes billable resources.
1548	//   "ERROR" - The replication process encountered an unrecoverable
1549	// error and was aborted.
1550	State string `json:"state,omitempty"`
1551
1552	// StateTime: Output only. The last time the migrating VM state was
1553	// updated.
1554	StateTime string `json:"stateTime,omitempty"`
1555
1556	// UpdateTime: Output only. The last time the migrating VM resource was
1557	// updated.
1558	UpdateTime string `json:"updateTime,omitempty"`
1559
1560	// ServerResponse contains the HTTP response code and headers from the
1561	// server.
1562	googleapi.ServerResponse `json:"-"`
1563
1564	// ForceSendFields is a list of field names (e.g.
1565	// "ComputeEngineTargetDefaults") to unconditionally include in API
1566	// requests. By default, fields with empty or default values are omitted
1567	// from API requests. However, any non-pointer, non-interface field
1568	// appearing in ForceSendFields will be sent to the server regardless of
1569	// whether the field is empty or not. This may be used to include empty
1570	// fields in Patch requests.
1571	ForceSendFields []string `json:"-"`
1572
1573	// NullFields is a list of field names (e.g.
1574	// "ComputeEngineTargetDefaults") to include in API requests with the
1575	// JSON null value. By default, fields with empty values are omitted
1576	// from API requests. However, any field with an empty value appearing
1577	// in NullFields will be sent to the server as null. It is an error if a
1578	// field in this list has a non-empty value. This may be used to include
1579	// null fields in Patch requests.
1580	NullFields []string `json:"-"`
1581}
1582
1583func (s *MigratingVm) MarshalJSON() ([]byte, error) {
1584	type NoMethod MigratingVm
1585	raw := NoMethod(*s)
1586	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1587}
1588
1589// MigrationError: Represents migration resource error information that
1590// can be used with google.rpc.Status message. MigrationError is used to
1591// present the user with error information in migration operations.
1592type MigrationError struct {
1593	// ActionItem: Output only. Suggested action for solving the error.
1594	ActionItem *LocalizedMessage `json:"actionItem,omitempty"`
1595
1596	// Code: Output only. The error code.
1597	//
1598	// Possible values:
1599	//   "ERROR_CODE_UNSPECIFIED" - Default value. This value is not used.
1600	//   "UNKNOWN_ERROR" - Migrate for Compute encountered an unknown error.
1601	//   "SOURCE_VALIDATION_ERROR" - Migrate for Compute encountered an
1602	// error while validating replication source health.
1603	//   "SOURCE_REPLICATION_ERROR" - Migrate for Compute encountered an
1604	// error during source data operation.
1605	//   "TARGET_REPLICATION_ERROR" - Migrate for Compute encountered an
1606	// error during target data operation.
1607	//   "OS_ADAPTATION_ERROR" - Migrate for Compute encountered an error
1608	// during OS adaptation.
1609	//   "CLONE_ERROR" - Migrate for Compute encountered an error in clone
1610	// operation.
1611	//   "CUTOVER_ERROR" - Migrate for Compute encountered an error in
1612	// cutover operation.
1613	//   "UTILIZATION_REPORT_ERROR" - Migrate for Compute encountered an
1614	// error during utilization report creation.
1615	Code string `json:"code,omitempty"`
1616
1617	// ErrorMessage: Output only. The localized error message.
1618	ErrorMessage *LocalizedMessage `json:"errorMessage,omitempty"`
1619
1620	// ErrorTime: Output only. The time the error occurred.
1621	ErrorTime string `json:"errorTime,omitempty"`
1622
1623	// HelpLinks: Output only. URL(s) pointing to additional information on
1624	// handling the current error.
1625	HelpLinks []*Link `json:"helpLinks,omitempty"`
1626
1627	// ForceSendFields is a list of field names (e.g. "ActionItem") to
1628	// unconditionally include in API requests. By default, fields with
1629	// empty or default values are omitted from API requests. However, any
1630	// non-pointer, non-interface field appearing in ForceSendFields will be
1631	// sent to the server regardless of whether the field is empty or not.
1632	// This may be used to include empty fields in Patch requests.
1633	ForceSendFields []string `json:"-"`
1634
1635	// NullFields is a list of field names (e.g. "ActionItem") to include in
1636	// API requests with the JSON null value. By default, fields with empty
1637	// values are omitted from API requests. However, any field with an
1638	// empty value appearing in NullFields will be sent to the server as
1639	// null. It is an error if a field in this list has a non-empty value.
1640	// This may be used to include null fields in Patch requests.
1641	NullFields []string `json:"-"`
1642}
1643
1644func (s *MigrationError) MarshalJSON() ([]byte, error) {
1645	type NoMethod MigrationError
1646	raw := NoMethod(*s)
1647	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1648}
1649
1650// NetworkInterface: NetworkInterface represents a NIC of a VM.
1651type NetworkInterface struct {
1652	// ExternalIp: The external IP to define in the NIC.
1653	ExternalIp string `json:"externalIp,omitempty"`
1654
1655	// InternalIp: The internal IP to define in the NIC. The formats
1656	// accepted are: `ephemeral` \ ipv4 address \ a named address resource
1657	// full path.
1658	InternalIp string `json:"internalIp,omitempty"`
1659
1660	// Network: The network to connect the NIC to.
1661	Network string `json:"network,omitempty"`
1662
1663	// Subnetwork: The subnetwork to connect the NIC to.
1664	Subnetwork string `json:"subnetwork,omitempty"`
1665
1666	// ForceSendFields is a list of field names (e.g. "ExternalIp") to
1667	// unconditionally include in API requests. By default, fields with
1668	// empty or default values are omitted from API requests. However, any
1669	// non-pointer, non-interface field appearing in ForceSendFields will be
1670	// sent to the server regardless of whether the field is empty or not.
1671	// This may be used to include empty fields in Patch requests.
1672	ForceSendFields []string `json:"-"`
1673
1674	// NullFields is a list of field names (e.g. "ExternalIp") to include in
1675	// API requests with the JSON null value. By default, fields with empty
1676	// values are omitted from API requests. However, any field with an
1677	// empty value appearing in NullFields will be sent to the server as
1678	// null. It is an error if a field in this list has a non-empty value.
1679	// This may be used to include null fields in Patch requests.
1680	NullFields []string `json:"-"`
1681}
1682
1683func (s *NetworkInterface) MarshalJSON() ([]byte, error) {
1684	type NoMethod NetworkInterface
1685	raw := NoMethod(*s)
1686	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1687}
1688
1689// Operation: This resource represents a long-running operation that is
1690// the result of a network API call.
1691type Operation struct {
1692	// Done: If the value is `false`, it means the operation is still in
1693	// progress. If `true`, the operation is completed, and either `error`
1694	// or `response` is available.
1695	Done bool `json:"done,omitempty"`
1696
1697	// Error: The error result of the operation in case of failure or
1698	// cancellation.
1699	Error *Status `json:"error,omitempty"`
1700
1701	// Metadata: Service-specific metadata associated with the operation. It
1702	// typically contains progress information and common metadata such as
1703	// create time. Some services might not provide such metadata. Any
1704	// method that returns a long-running operation should document the
1705	// metadata type, if any.
1706	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1707
1708	// Name: The server-assigned name, which is only unique within the same
1709	// service that originally returns it. If you use the default HTTP
1710	// mapping, the `name` should be a resource name ending with
1711	// `operations/{unique_id}`.
1712	Name string `json:"name,omitempty"`
1713
1714	// Response: The normal response of the operation in case of success. If
1715	// the original method returns no data on success, such as `Delete`, the
1716	// response is `google.protobuf.Empty`. If the original method is
1717	// standard `Get`/`Create`/`Update`, the response should be the
1718	// resource. For other methods, the response should have the type
1719	// `XxxResponse`, where `Xxx` is the original method name. For example,
1720	// if the original method name is `TakeSnapshot()`, the inferred
1721	// response type is `TakeSnapshotResponse`.
1722	Response googleapi.RawMessage `json:"response,omitempty"`
1723
1724	// ServerResponse contains the HTTP response code and headers from the
1725	// server.
1726	googleapi.ServerResponse `json:"-"`
1727
1728	// ForceSendFields is a list of field names (e.g. "Done") to
1729	// unconditionally include in API requests. By default, fields with
1730	// empty or default values are omitted from API requests. However, any
1731	// non-pointer, non-interface field appearing in ForceSendFields will be
1732	// sent to the server regardless of whether the field is empty or not.
1733	// This may be used to include empty fields in Patch requests.
1734	ForceSendFields []string `json:"-"`
1735
1736	// NullFields is a list of field names (e.g. "Done") to include in API
1737	// requests with the JSON null value. By default, fields with empty
1738	// values are omitted from API requests. However, any field with an
1739	// empty value appearing in NullFields will be sent to the server as
1740	// null. It is an error if a field in this list has a non-empty value.
1741	// This may be used to include null fields in Patch requests.
1742	NullFields []string `json:"-"`
1743}
1744
1745func (s *Operation) MarshalJSON() ([]byte, error) {
1746	type NoMethod Operation
1747	raw := NoMethod(*s)
1748	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1749}
1750
1751// OperationMetadata: Represents the metadata of the long-running
1752// operation.
1753type OperationMetadata struct {
1754	// ApiVersion: Output only. API version used to start the operation.
1755	ApiVersion string `json:"apiVersion,omitempty"`
1756
1757	// CreateTime: Output only. The time the operation was created.
1758	CreateTime string `json:"createTime,omitempty"`
1759
1760	// EndTime: Output only. The time the operation finished running.
1761	EndTime string `json:"endTime,omitempty"`
1762
1763	// RequestedCancellation: Output only. Identifies whether the user has
1764	// requested cancellation of the operation. Operations that have
1765	// successfully been cancelled have Operation.error value with a
1766	// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
1767	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
1768
1769	// StatusMessage: Output only. Human-readable status of the operation,
1770	// if any.
1771	StatusMessage string `json:"statusMessage,omitempty"`
1772
1773	// Target: Output only. Server-defined resource path for the target of
1774	// the operation.
1775	Target string `json:"target,omitempty"`
1776
1777	// Verb: Output only. Name of the verb executed by the operation.
1778	Verb string `json:"verb,omitempty"`
1779
1780	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
1781	// unconditionally include in API requests. By default, fields with
1782	// empty or default values are omitted from API requests. However, any
1783	// non-pointer, non-interface field appearing in ForceSendFields will be
1784	// sent to the server regardless of whether the field is empty or not.
1785	// This may be used to include empty fields in Patch requests.
1786	ForceSendFields []string `json:"-"`
1787
1788	// NullFields is a list of field names (e.g. "ApiVersion") to include in
1789	// API requests with the JSON null value. By default, fields with empty
1790	// values are omitted from API requests. However, any field with an
1791	// empty value appearing in NullFields will be sent to the server as
1792	// null. It is an error if a field in this list has a non-empty value.
1793	// This may be used to include null fields in Patch requests.
1794	NullFields []string `json:"-"`
1795}
1796
1797func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
1798	type NoMethod OperationMetadata
1799	raw := NoMethod(*s)
1800	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1801}
1802
1803// PauseMigrationRequest: Request message for 'PauseMigration' request.
1804type PauseMigrationRequest struct {
1805}
1806
1807// RemoveGroupMigrationRequest: Request message for 'RemoveMigration'
1808// request.
1809type RemoveGroupMigrationRequest struct {
1810	// MigratingVm: The MigratingVm to remove.
1811	MigratingVm string `json:"migratingVm,omitempty"`
1812
1813	// ForceSendFields is a list of field names (e.g. "MigratingVm") to
1814	// unconditionally include in API requests. By default, fields with
1815	// empty or default values are omitted from API requests. However, any
1816	// non-pointer, non-interface field appearing in ForceSendFields will be
1817	// sent to the server regardless of whether the field is empty or not.
1818	// This may be used to include empty fields in Patch requests.
1819	ForceSendFields []string `json:"-"`
1820
1821	// NullFields is a list of field names (e.g. "MigratingVm") to include
1822	// in API requests with the JSON null value. By default, fields with
1823	// empty values are omitted from API requests. However, any field with
1824	// an empty value appearing in NullFields will be sent to the server as
1825	// null. It is an error if a field in this list has a non-empty value.
1826	// This may be used to include null fields in Patch requests.
1827	NullFields []string `json:"-"`
1828}
1829
1830func (s *RemoveGroupMigrationRequest) MarshalJSON() ([]byte, error) {
1831	type NoMethod RemoveGroupMigrationRequest
1832	raw := NoMethod(*s)
1833	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1834}
1835
1836// ReplicationCycle: ReplicationCycle contains information about the
1837// current replication cycle status.
1838type ReplicationCycle struct {
1839	// ProgressPercent: The current progress in percentage of this cycle.
1840	ProgressPercent int64 `json:"progressPercent,omitempty"`
1841
1842	// StartTime: The time the replication cycle has started.
1843	StartTime string `json:"startTime,omitempty"`
1844
1845	// ForceSendFields is a list of field names (e.g. "ProgressPercent") to
1846	// unconditionally include in API requests. By default, fields with
1847	// empty or default values are omitted from API requests. However, any
1848	// non-pointer, non-interface field appearing in ForceSendFields will be
1849	// sent to the server regardless of whether the field is empty or not.
1850	// This may be used to include empty fields in Patch requests.
1851	ForceSendFields []string `json:"-"`
1852
1853	// NullFields is a list of field names (e.g. "ProgressPercent") to
1854	// include in API requests with the JSON null value. By default, fields
1855	// with empty values are omitted from API requests. However, any field
1856	// with an empty value appearing in NullFields will be sent to the
1857	// server as null. It is an error if a field in this list has a
1858	// non-empty value. This may be used to include null fields in Patch
1859	// requests.
1860	NullFields []string `json:"-"`
1861}
1862
1863func (s *ReplicationCycle) MarshalJSON() ([]byte, error) {
1864	type NoMethod ReplicationCycle
1865	raw := NoMethod(*s)
1866	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1867}
1868
1869// ReplicationSync: ReplicationSync contain information about the last
1870// replica sync to the cloud.
1871type ReplicationSync struct {
1872	// LastSyncTime: The most updated snapshot created time in the source
1873	// that finished replication.
1874	LastSyncTime string `json:"lastSyncTime,omitempty"`
1875
1876	// ForceSendFields is a list of field names (e.g. "LastSyncTime") to
1877	// unconditionally include in API requests. By default, fields with
1878	// empty or default values are omitted from API requests. However, any
1879	// non-pointer, non-interface field appearing in ForceSendFields will be
1880	// sent to the server regardless of whether the field is empty or not.
1881	// This may be used to include empty fields in Patch requests.
1882	ForceSendFields []string `json:"-"`
1883
1884	// NullFields is a list of field names (e.g. "LastSyncTime") to include
1885	// in API requests with the JSON null value. By default, fields with
1886	// empty values are omitted from API requests. However, any field with
1887	// an empty value appearing in NullFields will be sent to the server as
1888	// null. It is an error if a field in this list has a non-empty value.
1889	// This may be used to include null fields in Patch requests.
1890	NullFields []string `json:"-"`
1891}
1892
1893func (s *ReplicationSync) MarshalJSON() ([]byte, error) {
1894	type NoMethod ReplicationSync
1895	raw := NoMethod(*s)
1896	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1897}
1898
1899// ResumeMigrationRequest: Request message for 'ResumeMigration'
1900// request.
1901type ResumeMigrationRequest struct {
1902}
1903
1904// SchedulePolicy: A policy for scheduling replications.
1905type SchedulePolicy struct {
1906	// IdleDuration: The idle duration between replication stages.
1907	IdleDuration string `json:"idleDuration,omitempty"`
1908
1909	// SkipOsAdaptation: A flag to indicate whether to skip OS adaptation
1910	// during the replication sync. OS adaptation is a process where the
1911	// VM's operating system undergoes changes and adaptations to fully
1912	// function on Compute Engine.
1913	SkipOsAdaptation bool `json:"skipOsAdaptation,omitempty"`
1914
1915	// ForceSendFields is a list of field names (e.g. "IdleDuration") to
1916	// unconditionally include in API requests. By default, fields with
1917	// empty or default values are omitted from API requests. However, any
1918	// non-pointer, non-interface field appearing in ForceSendFields will be
1919	// sent to the server regardless of whether the field is empty or not.
1920	// This may be used to include empty fields in Patch requests.
1921	ForceSendFields []string `json:"-"`
1922
1923	// NullFields is a list of field names (e.g. "IdleDuration") to include
1924	// in API requests with the JSON null value. By default, fields with
1925	// empty values are omitted from API requests. However, any field with
1926	// an empty value appearing in NullFields will be sent to the server as
1927	// null. It is an error if a field in this list has a non-empty value.
1928	// This may be used to include null fields in Patch requests.
1929	NullFields []string `json:"-"`
1930}
1931
1932func (s *SchedulePolicy) MarshalJSON() ([]byte, error) {
1933	type NoMethod SchedulePolicy
1934	raw := NoMethod(*s)
1935	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1936}
1937
1938// SchedulingNodeAffinity: Node Affinity: the configuration of desired
1939// nodes onto which this Instance could be scheduled. Based on
1940// https://cloud.google.com/compute/docs/reference/rest/v1/instances/setScheduling
1941type SchedulingNodeAffinity struct {
1942	// Key: The label key of Node resource to reference.
1943	Key string `json:"key,omitempty"`
1944
1945	// Operator: The operator to use for the node resources specified in the
1946	// `values` parameter.
1947	//
1948	// Possible values:
1949	//   "OPERATOR_UNSPECIFIED" - An unknown, unexpected behavior.
1950	//   "IN" - The node resource group should be in these resources
1951	// affinity.
1952	//   "NOT_IN" - The node resource group should not be in these resources
1953	// affinity.
1954	Operator string `json:"operator,omitempty"`
1955
1956	// Values: Corresponds to the label values of Node resource.
1957	Values []string `json:"values,omitempty"`
1958
1959	// ForceSendFields is a list of field names (e.g. "Key") to
1960	// unconditionally include in API requests. By default, fields with
1961	// empty or default values are omitted from API requests. However, any
1962	// non-pointer, non-interface field appearing in ForceSendFields will be
1963	// sent to the server regardless of whether the field is empty or not.
1964	// This may be used to include empty fields in Patch requests.
1965	ForceSendFields []string `json:"-"`
1966
1967	// NullFields is a list of field names (e.g. "Key") to include in API
1968	// requests with the JSON null value. By default, fields with empty
1969	// values are omitted from API requests. However, any field with an
1970	// empty value appearing in NullFields will be sent to the server as
1971	// null. It is an error if a field in this list has a non-empty value.
1972	// This may be used to include null fields in Patch requests.
1973	NullFields []string `json:"-"`
1974}
1975
1976func (s *SchedulingNodeAffinity) MarshalJSON() ([]byte, error) {
1977	type NoMethod SchedulingNodeAffinity
1978	raw := NoMethod(*s)
1979	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1980}
1981
1982// Source: Source message describes a specific vm migration Source
1983// resource. It contains the source environment information.
1984type Source struct {
1985	// CreateTime: Output only. The create time timestamp.
1986	CreateTime string `json:"createTime,omitempty"`
1987
1988	// Description: User-provided description of the source.
1989	Description string `json:"description,omitempty"`
1990
1991	// Labels: The labels of the source.
1992	Labels map[string]string `json:"labels,omitempty"`
1993
1994	// Name: Output only. The Source name.
1995	Name string `json:"name,omitempty"`
1996
1997	// UpdateTime: Output only. The update time timestamp.
1998	UpdateTime string `json:"updateTime,omitempty"`
1999
2000	// Vmware: Vmware type source details.
2001	Vmware *VmwareSourceDetails `json:"vmware,omitempty"`
2002
2003	// ServerResponse contains the HTTP response code and headers from the
2004	// server.
2005	googleapi.ServerResponse `json:"-"`
2006
2007	// ForceSendFields is a list of field names (e.g. "CreateTime") to
2008	// unconditionally include in API requests. By default, fields with
2009	// empty or default values are omitted from API requests. However, any
2010	// non-pointer, non-interface field appearing in ForceSendFields will be
2011	// sent to the server regardless of whether the field is empty or not.
2012	// This may be used to include empty fields in Patch requests.
2013	ForceSendFields []string `json:"-"`
2014
2015	// NullFields is a list of field names (e.g. "CreateTime") to include in
2016	// API requests with the JSON null value. By default, fields with empty
2017	// values are omitted from API requests. However, any field with an
2018	// empty value appearing in NullFields will be sent to the server as
2019	// null. It is an error if a field in this list has a non-empty value.
2020	// This may be used to include null fields in Patch requests.
2021	NullFields []string `json:"-"`
2022}
2023
2024func (s *Source) MarshalJSON() ([]byte, error) {
2025	type NoMethod Source
2026	raw := NoMethod(*s)
2027	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2028}
2029
2030// StartMigrationRequest: Request message for 'StartMigrationRequest'
2031// request.
2032type StartMigrationRequest struct {
2033}
2034
2035// Status: The `Status` type defines a logical error model that is
2036// suitable for different programming environments, including REST APIs
2037// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
2038// `Status` message contains three pieces of data: error code, error
2039// message, and error details. You can find out more about this error
2040// model and how to work with it in the API Design Guide
2041// (https://cloud.google.com/apis/design/errors).
2042type Status struct {
2043	// Code: The status code, which should be an enum value of
2044	// google.rpc.Code.
2045	Code int64 `json:"code,omitempty"`
2046
2047	// Details: A list of messages that carry the error details. There is a
2048	// common set of message types for APIs to use.
2049	Details []googleapi.RawMessage `json:"details,omitempty"`
2050
2051	// Message: A developer-facing error message, which should be in
2052	// English. Any user-facing error message should be localized and sent
2053	// in the google.rpc.Status.details field, or localized by the client.
2054	Message string `json:"message,omitempty"`
2055
2056	// ForceSendFields is a list of field names (e.g. "Code") to
2057	// unconditionally include in API requests. By default, fields with
2058	// empty or default values are omitted from API requests. However, any
2059	// non-pointer, non-interface field appearing in ForceSendFields will be
2060	// sent to the server regardless of whether the field is empty or not.
2061	// This may be used to include empty fields in Patch requests.
2062	ForceSendFields []string `json:"-"`
2063
2064	// NullFields is a list of field names (e.g. "Code") to include in API
2065	// requests with the JSON null value. By default, fields with empty
2066	// values are omitted from API requests. However, any field with an
2067	// empty value appearing in NullFields will be sent to the server as
2068	// null. It is an error if a field in this list has a non-empty value.
2069	// This may be used to include null fields in Patch requests.
2070	NullFields []string `json:"-"`
2071}
2072
2073func (s *Status) MarshalJSON() ([]byte, error) {
2074	type NoMethod Status
2075	raw := NoMethod(*s)
2076	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2077}
2078
2079// TargetProject: TargetProject message represents a target Compute
2080// Engine project for a migration or a clone.
2081type TargetProject struct {
2082	// CreateTime: Output only. The time this target project resource was
2083	// created (not related to when the Compute Engine project it points to
2084	// was created).
2085	CreateTime string `json:"createTime,omitempty"`
2086
2087	// Description: The target project's description.
2088	Description string `json:"description,omitempty"`
2089
2090	// Name: The name of the target project.
2091	Name string `json:"name,omitempty"`
2092
2093	// Project: The target project ID (number) or project name.
2094	Project string `json:"project,omitempty"`
2095
2096	// UpdateTime: Output only. The last time the target project resource
2097	// was updated.
2098	UpdateTime string `json:"updateTime,omitempty"`
2099
2100	// ServerResponse contains the HTTP response code and headers from the
2101	// server.
2102	googleapi.ServerResponse `json:"-"`
2103
2104	// ForceSendFields is a list of field names (e.g. "CreateTime") to
2105	// unconditionally include in API requests. By default, fields with
2106	// empty or default values are omitted from API requests. However, any
2107	// non-pointer, non-interface field appearing in ForceSendFields will be
2108	// sent to the server regardless of whether the field is empty or not.
2109	// This may be used to include empty fields in Patch requests.
2110	ForceSendFields []string `json:"-"`
2111
2112	// NullFields is a list of field names (e.g. "CreateTime") to include in
2113	// API requests with the JSON null value. By default, fields with empty
2114	// values are omitted from API requests. However, any field with an
2115	// empty value appearing in NullFields will be sent to the server as
2116	// null. It is an error if a field in this list has a non-empty value.
2117	// This may be used to include null fields in Patch requests.
2118	NullFields []string `json:"-"`
2119}
2120
2121func (s *TargetProject) MarshalJSON() ([]byte, error) {
2122	type NoMethod TargetProject
2123	raw := NoMethod(*s)
2124	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2125}
2126
2127// TargetVMDetails: TargetVMDetails is a collection of details for
2128// creating a VM in a target Compute Engine project.
2129type TargetVMDetails struct {
2130	// AppliedLicense: Output only. The OS license returned from the
2131	// adaptation module report.
2132	AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"`
2133
2134	// BootOption: Output only. The VM Boot Option, as set in the source vm.
2135	//
2136	// Possible values:
2137	//   "BOOT_OPTION_UNSPECIFIED" - The boot option is unknown.
2138	//   "EFI" - The boot option is EFI.
2139	//   "BIOS" - The boot option is BIOS.
2140	BootOption string `json:"bootOption,omitempty"`
2141
2142	// ComputeScheduling: Compute instance scheduling information (if empty
2143	// default is used).
2144	ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"`
2145
2146	// DiskType: The disk type to use in the VM.
2147	//
2148	// Possible values:
2149	//   "DISK_TYPE_UNSPECIFIED" - An unspecified disk type. Will be used as
2150	// STANDARD.
2151	//   "STANDARD" - A Standard disk type.
2152	//   "BALANCED" - An alternative to SSD persistent disks that balance
2153	// performance and cost.
2154	//   "SSD" - SSD hard disk type.
2155	DiskType string `json:"diskType,omitempty"`
2156
2157	// Labels: A map of labels to associate with the VM.
2158	Labels map[string]string `json:"labels,omitempty"`
2159
2160	// LicenseType: The license type to use in OS adaptation.
2161	//
2162	// Possible values:
2163	//   "DEFAULT" - The license type is the default for the OS.
2164	//   "PAYG" - The license type is Pay As You Go license type.
2165	//   "BYOL" - The license type is Bring Your Own License type.
2166	LicenseType string `json:"licenseType,omitempty"`
2167
2168	// MachineType: The machine type to create the VM with.
2169	MachineType string `json:"machineType,omitempty"`
2170
2171	// MachineTypeSeries: The machine type series to create the VM with.
2172	MachineTypeSeries string `json:"machineTypeSeries,omitempty"`
2173
2174	// Metadata: The metadata key/value pairs to assign to the VM.
2175	Metadata map[string]string `json:"metadata,omitempty"`
2176
2177	// Name: The name of the VM to create.
2178	Name string `json:"name,omitempty"`
2179
2180	// NetworkInterfaces: List of NICs connected to this VM.
2181	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
2182
2183	// NetworkTags: A map of network tags to associate with the VM.
2184	NetworkTags []string `json:"networkTags,omitempty"`
2185
2186	// Project: The project in which to create the VM.
2187	Project string `json:"project,omitempty"`
2188
2189	// SecureBoot: Defines whether the instance has Secure Boot enabled.
2190	// This can be set to true only if the vm boot option is EFI.
2191	SecureBoot bool `json:"secureBoot,omitempty"`
2192
2193	// ServiceAccount: The service account to associate the VM with.
2194	ServiceAccount string `json:"serviceAccount,omitempty"`
2195
2196	// TargetProject: The full path of the resource of type TargetProject
2197	// which represents the Compute Engine project in which to create this
2198	// VM.
2199	TargetProject string `json:"targetProject,omitempty"`
2200
2201	// Zone: The zone in which to create the VM.
2202	Zone string `json:"zone,omitempty"`
2203
2204	// ForceSendFields is a list of field names (e.g. "AppliedLicense") to
2205	// unconditionally include in API requests. By default, fields with
2206	// empty or default values are omitted from API requests. However, any
2207	// non-pointer, non-interface field appearing in ForceSendFields will be
2208	// sent to the server regardless of whether the field is empty or not.
2209	// This may be used to include empty fields in Patch requests.
2210	ForceSendFields []string `json:"-"`
2211
2212	// NullFields is a list of field names (e.g. "AppliedLicense") to
2213	// include in API requests with the JSON null value. By default, fields
2214	// with empty values are omitted from API requests. However, any field
2215	// with an empty value appearing in NullFields will be sent to the
2216	// server as null. It is an error if a field in this list has a
2217	// non-empty value. This may be used to include null fields in Patch
2218	// requests.
2219	NullFields []string `json:"-"`
2220}
2221
2222func (s *TargetVMDetails) MarshalJSON() ([]byte, error) {
2223	type NoMethod TargetVMDetails
2224	raw := NoMethod(*s)
2225	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2226}
2227
2228// UtilizationReport: Utilization report details the utilization (CPU,
2229// memory, etc.) of selected source VMs.
2230type UtilizationReport struct {
2231	// CreateTime: Output only. The time the report was created (this refers
2232	// to the time of the request, not the time the report creation
2233	// completed).
2234	CreateTime string `json:"createTime,omitempty"`
2235
2236	// DisplayName: The report display name, as assigned by the user.
2237	DisplayName string `json:"displayName,omitempty"`
2238
2239	// Error: Output only. Provides details on the state of the report in
2240	// case of an error.
2241	Error *Status `json:"error,omitempty"`
2242
2243	// FrameEndTime: Output only. The point in time when the time frame
2244	// ends. Notice that the time frame is counted backwards. For instance
2245	// if the "frame_end_time" value is 2021/01/20 and the time frame is
2246	// WEEK then the report covers the week between 2021/01/20 and
2247	// 2021/01/14.
2248	FrameEndTime string `json:"frameEndTime,omitempty"`
2249
2250	// Name: Output only. The report unique name.
2251	Name string `json:"name,omitempty"`
2252
2253	// State: Output only. Current state of the report.
2254	//
2255	// Possible values:
2256	//   "STATE_UNSPECIFIED" - The state is unknown. This value is not in
2257	// use.
2258	//   "CREATING" - The report is in the making.
2259	//   "SUCCEEDED" - Report creation completed successfully.
2260	//   "FAILED" - Report creation failed.
2261	State string `json:"state,omitempty"`
2262
2263	// StateTime: Output only. The time the state was last set.
2264	StateTime string `json:"stateTime,omitempty"`
2265
2266	// TimeFrame: Time frame of the report.
2267	//
2268	// Possible values:
2269	//   "TIME_FRAME_UNSPECIFIED" - The time frame was not specified and
2270	// will default to WEEK.
2271	//   "WEEK" - One week.
2272	//   "MONTH" - One month.
2273	//   "YEAR" - One year.
2274	TimeFrame string `json:"timeFrame,omitempty"`
2275
2276	// VmCount: Output only. Total number of VMs included in the report.
2277	VmCount int64 `json:"vmCount,omitempty"`
2278
2279	// Vms: List of utilization information per VM. When sent as part of the
2280	// request, the "vm_id" field is used in order to specify which VMs to
2281	// include in the report. In that case all other fields are ignored.
2282	Vms []*VmUtilizationInfo `json:"vms,omitempty"`
2283
2284	// ServerResponse contains the HTTP response code and headers from the
2285	// server.
2286	googleapi.ServerResponse `json:"-"`
2287
2288	// ForceSendFields is a list of field names (e.g. "CreateTime") to
2289	// unconditionally include in API requests. By default, fields with
2290	// empty or default values are omitted from API requests. However, any
2291	// non-pointer, non-interface field appearing in ForceSendFields will be
2292	// sent to the server regardless of whether the field is empty or not.
2293	// This may be used to include empty fields in Patch requests.
2294	ForceSendFields []string `json:"-"`
2295
2296	// NullFields is a list of field names (e.g. "CreateTime") to include in
2297	// API requests with the JSON null value. By default, fields with empty
2298	// values are omitted from API requests. However, any field with an
2299	// empty value appearing in NullFields will be sent to the server as
2300	// null. It is an error if a field in this list has a non-empty value.
2301	// This may be used to include null fields in Patch requests.
2302	NullFields []string `json:"-"`
2303}
2304
2305func (s *UtilizationReport) MarshalJSON() ([]byte, error) {
2306	type NoMethod UtilizationReport
2307	raw := NoMethod(*s)
2308	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2309}
2310
2311// VmUtilizationInfo: Utilization information of a single VM.
2312type VmUtilizationInfo struct {
2313	// Utilization: Utilization metrics for this VM.
2314	Utilization *VmUtilizationMetrics `json:"utilization,omitempty"`
2315
2316	// VmId: The VM's ID in the source.
2317	VmId string `json:"vmId,omitempty"`
2318
2319	// VmwareVmDetails: The description of the VM in a Source of type
2320	// Vmware.
2321	VmwareVmDetails *VmwareVmDetails `json:"vmwareVmDetails,omitempty"`
2322
2323	// ForceSendFields is a list of field names (e.g. "Utilization") to
2324	// unconditionally include in API requests. By default, fields with
2325	// empty or default values are omitted from API requests. However, any
2326	// non-pointer, non-interface field appearing in ForceSendFields will be
2327	// sent to the server regardless of whether the field is empty or not.
2328	// This may be used to include empty fields in Patch requests.
2329	ForceSendFields []string `json:"-"`
2330
2331	// NullFields is a list of field names (e.g. "Utilization") to include
2332	// in API requests with the JSON null value. By default, fields with
2333	// empty values are omitted from API requests. However, any field with
2334	// an empty value appearing in NullFields will be sent to the server as
2335	// null. It is an error if a field in this list has a non-empty value.
2336	// This may be used to include null fields in Patch requests.
2337	NullFields []string `json:"-"`
2338}
2339
2340func (s *VmUtilizationInfo) MarshalJSON() ([]byte, error) {
2341	type NoMethod VmUtilizationInfo
2342	raw := NoMethod(*s)
2343	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2344}
2345
2346// VmUtilizationMetrics: Utilization metrics values for a single VM.
2347type VmUtilizationMetrics struct {
2348	// CpuAveragePercent: Average CPU usage, percent.
2349	CpuAveragePercent int64 `json:"cpuAveragePercent,omitempty"`
2350
2351	// CpuMaxPercent: Max CPU usage, percent.
2352	CpuMaxPercent int64 `json:"cpuMaxPercent,omitempty"`
2353
2354	// DiskIoRateAverageKbps: Average disk IO rate, in kilobytes per second.
2355	DiskIoRateAverageKbps int64 `json:"diskIoRateAverageKbps,omitempty,string"`
2356
2357	// DiskIoRateMaxKbps: Max disk IO rate, in kilobytes per second.
2358	DiskIoRateMaxKbps int64 `json:"diskIoRateMaxKbps,omitempty,string"`
2359
2360	// MemoryAveragePercent: Average memory usage, percent.
2361	MemoryAveragePercent int64 `json:"memoryAveragePercent,omitempty"`
2362
2363	// MemoryMaxPercent: Max memory usage, percent.
2364	MemoryMaxPercent int64 `json:"memoryMaxPercent,omitempty"`
2365
2366	// NetworkThroughputAverageKbps: Average network throughput (combined
2367	// transmit-rates and receive-rates), in kilobytes per second.
2368	NetworkThroughputAverageKbps int64 `json:"networkThroughputAverageKbps,omitempty,string"`
2369
2370	// NetworkThroughputMaxKbps: Max network throughput (combined
2371	// transmit-rates and receive-rates), in kilobytes per second.
2372	NetworkThroughputMaxKbps int64 `json:"networkThroughputMaxKbps,omitempty,string"`
2373
2374	// ForceSendFields is a list of field names (e.g. "CpuAveragePercent")
2375	// to unconditionally include in API requests. By default, fields with
2376	// empty or default values are omitted from API requests. However, any
2377	// non-pointer, non-interface field appearing in ForceSendFields will be
2378	// sent to the server regardless of whether the field is empty or not.
2379	// This may be used to include empty fields in Patch requests.
2380	ForceSendFields []string `json:"-"`
2381
2382	// NullFields is a list of field names (e.g. "CpuAveragePercent") to
2383	// include in API requests with the JSON null value. By default, fields
2384	// with empty values are omitted from API requests. However, any field
2385	// with an empty value appearing in NullFields will be sent to the
2386	// server as null. It is an error if a field in this list has a
2387	// non-empty value. This may be used to include null fields in Patch
2388	// requests.
2389	NullFields []string `json:"-"`
2390}
2391
2392func (s *VmUtilizationMetrics) MarshalJSON() ([]byte, error) {
2393	type NoMethod VmUtilizationMetrics
2394	raw := NoMethod(*s)
2395	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2396}
2397
2398// VmwareSourceDetails: VmwareSourceDetails message describes a specific
2399// source details for the vmware source type.
2400type VmwareSourceDetails struct {
2401	// Password: Input only. The credentials password. This is write only
2402	// and can not be read in a GET operation.
2403	Password string `json:"password,omitempty"`
2404
2405	// Thumbprint: The thumbprint representing the certificate for the
2406	// vcenter.
2407	Thumbprint string `json:"thumbprint,omitempty"`
2408
2409	// Username: The credentials username.
2410	Username string `json:"username,omitempty"`
2411
2412	// VcenterIp: The ip address of the vcenter this Source represents.
2413	VcenterIp string `json:"vcenterIp,omitempty"`
2414
2415	// ForceSendFields is a list of field names (e.g. "Password") to
2416	// unconditionally include in API requests. By default, fields with
2417	// empty or default values are omitted from API requests. However, any
2418	// non-pointer, non-interface field appearing in ForceSendFields will be
2419	// sent to the server regardless of whether the field is empty or not.
2420	// This may be used to include empty fields in Patch requests.
2421	ForceSendFields []string `json:"-"`
2422
2423	// NullFields is a list of field names (e.g. "Password") to include in
2424	// API requests with the JSON null value. By default, fields with empty
2425	// values are omitted from API requests. However, any field with an
2426	// empty value appearing in NullFields will be sent to the server as
2427	// null. It is an error if a field in this list has a non-empty value.
2428	// This may be used to include null fields in Patch requests.
2429	NullFields []string `json:"-"`
2430}
2431
2432func (s *VmwareSourceDetails) MarshalJSON() ([]byte, error) {
2433	type NoMethod VmwareSourceDetails
2434	raw := NoMethod(*s)
2435	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2436}
2437
2438// VmwareVmDetails: VmwareVmDetails describes a VM in vCenter.
2439type VmwareVmDetails struct {
2440	// BootOption: Output only. The VM Boot Option.
2441	//
2442	// Possible values:
2443	//   "BOOT_OPTION_UNSPECIFIED" - The boot option is unknown.
2444	//   "EFI" - The boot option is EFI.
2445	//   "BIOS" - The boot option is BIOS.
2446	BootOption string `json:"bootOption,omitempty"`
2447
2448	// CommittedStorageMb: The total size of the storage allocated to the VM
2449	// in MB.
2450	CommittedStorageMb int64 `json:"committedStorageMb,omitempty,string"`
2451
2452	// CpuCount: The number of cpus in the VM.
2453	CpuCount int64 `json:"cpuCount,omitempty"`
2454
2455	// DatacenterDescription: The descriptive name of the vCenter's
2456	// datacenter this VM is contained in.
2457	DatacenterDescription string `json:"datacenterDescription,omitempty"`
2458
2459	// DatacenterId: The id of the vCenter's datacenter this VM is contained
2460	// in.
2461	DatacenterId string `json:"datacenterId,omitempty"`
2462
2463	// DiskCount: The number of disks the VM has.
2464	DiskCount int64 `json:"diskCount,omitempty"`
2465
2466	// DisplayName: The display name of the VM. Note that this is not
2467	// necessarily unique.
2468	DisplayName string `json:"displayName,omitempty"`
2469
2470	// GuestDescription: The VM's OS. See for example
2471	// https://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html
2472	// for types of strings this might hold.
2473	GuestDescription string `json:"guestDescription,omitempty"`
2474
2475	// MemoryMb: The size of the memory of the VM in MB.
2476	MemoryMb int64 `json:"memoryMb,omitempty"`
2477
2478	// PowerState: The power state of the VM at the moment list was taken.
2479	//
2480	// Possible values:
2481	//   "POWER_STATE_UNSPECIFIED" - Power state is not specified.
2482	//   "ON" - The VM is turned ON.
2483	//   "OFF" - The VM is turned OFF.
2484	//   "SUSPENDED" - The VM is suspended. This is similar to hibernation
2485	// or sleep mode.
2486	PowerState string `json:"powerState,omitempty"`
2487
2488	// Uuid: The unique identifier of the VM in vCenter.
2489	Uuid string `json:"uuid,omitempty"`
2490
2491	// VmId: The VM's id in the source (note that this is not the
2492	// MigratingVm's id). This is the moref id of the VM.
2493	VmId string `json:"vmId,omitempty"`
2494
2495	// ForceSendFields is a list of field names (e.g. "BootOption") to
2496	// unconditionally include in API requests. By default, fields with
2497	// empty or default values are omitted from API requests. However, any
2498	// non-pointer, non-interface field appearing in ForceSendFields will be
2499	// sent to the server regardless of whether the field is empty or not.
2500	// This may be used to include empty fields in Patch requests.
2501	ForceSendFields []string `json:"-"`
2502
2503	// NullFields is a list of field names (e.g. "BootOption") to include in
2504	// API requests with the JSON null value. By default, fields with empty
2505	// values are omitted from API requests. However, any field with an
2506	// empty value appearing in NullFields will be sent to the server as
2507	// null. It is an error if a field in this list has a non-empty value.
2508	// This may be used to include null fields in Patch requests.
2509	NullFields []string `json:"-"`
2510}
2511
2512func (s *VmwareVmDetails) MarshalJSON() ([]byte, error) {
2513	type NoMethod VmwareVmDetails
2514	raw := NoMethod(*s)
2515	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2516}
2517
2518// VmwareVmsDetails: VmwareVmsDetails describes VMs in vCenter.
2519type VmwareVmsDetails struct {
2520	// Details: The details of the vmware VMs.
2521	Details []*VmwareVmDetails `json:"details,omitempty"`
2522
2523	// ForceSendFields is a list of field names (e.g. "Details") to
2524	// unconditionally include in API requests. By default, fields with
2525	// empty or default values are omitted from API requests. However, any
2526	// non-pointer, non-interface field appearing in ForceSendFields will be
2527	// sent to the server regardless of whether the field is empty or not.
2528	// This may be used to include empty fields in Patch requests.
2529	ForceSendFields []string `json:"-"`
2530
2531	// NullFields is a list of field names (e.g. "Details") to include in
2532	// API requests with the JSON null value. By default, fields with empty
2533	// values are omitted from API requests. However, any field with an
2534	// empty value appearing in NullFields will be sent to the server as
2535	// null. It is an error if a field in this list has a non-empty value.
2536	// This may be used to include null fields in Patch requests.
2537	NullFields []string `json:"-"`
2538}
2539
2540func (s *VmwareVmsDetails) MarshalJSON() ([]byte, error) {
2541	type NoMethod VmwareVmsDetails
2542	raw := NoMethod(*s)
2543	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2544}
2545
2546// method id "vmmigration.projects.locations.get":
2547
2548type ProjectsLocationsGetCall struct {
2549	s            *Service
2550	name         string
2551	urlParams_   gensupport.URLParams
2552	ifNoneMatch_ string
2553	ctx_         context.Context
2554	header_      http.Header
2555}
2556
2557// Get: Gets information about a location.
2558//
2559// - name: Resource name for the location.
2560func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
2561	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2562	c.name = name
2563	return c
2564}
2565
2566// Fields allows partial responses to be retrieved. See
2567// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2568// for more information.
2569func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
2570	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2571	return c
2572}
2573
2574// IfNoneMatch sets the optional parameter which makes the operation
2575// fail if the object's ETag matches the given value. This is useful for
2576// getting updates only after the object has changed since the last
2577// request. Use googleapi.IsNotModified to check whether the response
2578// error from Do is the result of In-None-Match.
2579func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
2580	c.ifNoneMatch_ = entityTag
2581	return c
2582}
2583
2584// Context sets the context to be used in this call's Do method. Any
2585// pending HTTP request will be aborted if the provided context is
2586// canceled.
2587func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
2588	c.ctx_ = ctx
2589	return c
2590}
2591
2592// Header returns an http.Header that can be modified by the caller to
2593// add HTTP headers to the request.
2594func (c *ProjectsLocationsGetCall) Header() http.Header {
2595	if c.header_ == nil {
2596		c.header_ = make(http.Header)
2597	}
2598	return c.header_
2599}
2600
2601func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
2602	reqHeaders := make(http.Header)
2603	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2604	for k, v := range c.header_ {
2605		reqHeaders[k] = v
2606	}
2607	reqHeaders.Set("User-Agent", c.s.userAgent())
2608	if c.ifNoneMatch_ != "" {
2609		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2610	}
2611	var body io.Reader = nil
2612	c.urlParams_.Set("alt", alt)
2613	c.urlParams_.Set("prettyPrint", "false")
2614	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
2615	urls += "?" + c.urlParams_.Encode()
2616	req, err := http.NewRequest("GET", urls, body)
2617	if err != nil {
2618		return nil, err
2619	}
2620	req.Header = reqHeaders
2621	googleapi.Expand(req.URL, map[string]string{
2622		"name": c.name,
2623	})
2624	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2625}
2626
2627// Do executes the "vmmigration.projects.locations.get" call.
2628// Exactly one of *Location or error will be non-nil. Any non-2xx status
2629// code is an error. Response headers are in either
2630// *Location.ServerResponse.Header or (if a response was returned at
2631// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2632// to check whether the returned error was because
2633// http.StatusNotModified was returned.
2634func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
2635	gensupport.SetOptions(c.urlParams_, opts...)
2636	res, err := c.doRequest("json")
2637	if res != nil && res.StatusCode == http.StatusNotModified {
2638		if res.Body != nil {
2639			res.Body.Close()
2640		}
2641		return nil, &googleapi.Error{
2642			Code:   res.StatusCode,
2643			Header: res.Header,
2644		}
2645	}
2646	if err != nil {
2647		return nil, err
2648	}
2649	defer googleapi.CloseBody(res)
2650	if err := googleapi.CheckResponse(res); err != nil {
2651		return nil, err
2652	}
2653	ret := &Location{
2654		ServerResponse: googleapi.ServerResponse{
2655			Header:         res.Header,
2656			HTTPStatusCode: res.StatusCode,
2657		},
2658	}
2659	target := &ret
2660	if err := gensupport.DecodeResponse(target, res); err != nil {
2661		return nil, err
2662	}
2663	return ret, nil
2664	// {
2665	//   "description": "Gets information about a location.",
2666	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}",
2667	//   "httpMethod": "GET",
2668	//   "id": "vmmigration.projects.locations.get",
2669	//   "parameterOrder": [
2670	//     "name"
2671	//   ],
2672	//   "parameters": {
2673	//     "name": {
2674	//       "description": "Resource name for the location.",
2675	//       "location": "path",
2676	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2677	//       "required": true,
2678	//       "type": "string"
2679	//     }
2680	//   },
2681	//   "path": "v1/{+name}",
2682	//   "response": {
2683	//     "$ref": "Location"
2684	//   },
2685	//   "scopes": [
2686	//     "https://www.googleapis.com/auth/cloud-platform"
2687	//   ]
2688	// }
2689
2690}
2691
2692// method id "vmmigration.projects.locations.list":
2693
2694type ProjectsLocationsListCall struct {
2695	s            *Service
2696	name         string
2697	urlParams_   gensupport.URLParams
2698	ifNoneMatch_ string
2699	ctx_         context.Context
2700	header_      http.Header
2701}
2702
2703// List: Lists information about the supported locations for this
2704// service.
2705//
2706// - name: The resource that owns the locations collection, if
2707//   applicable.
2708func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
2709	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2710	c.name = name
2711	return c
2712}
2713
2714// Filter sets the optional parameter "filter": A filter to narrow down
2715// results to a preferred subset. The filtering language accepts strings
2716// like "displayName=tokyo", and is documented in more detail in AIP-160
2717// (https://google.aip.dev/160).
2718func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
2719	c.urlParams_.Set("filter", filter)
2720	return c
2721}
2722
2723// PageSize sets the optional parameter "pageSize": The maximum number
2724// of results to return. If not set, the service selects a default.
2725func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
2726	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2727	return c
2728}
2729
2730// PageToken sets the optional parameter "pageToken": A page token
2731// received from the `next_page_token` field in the response. Send that
2732// page token to receive the subsequent page.
2733func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
2734	c.urlParams_.Set("pageToken", pageToken)
2735	return c
2736}
2737
2738// Fields allows partial responses to be retrieved. See
2739// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2740// for more information.
2741func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
2742	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2743	return c
2744}
2745
2746// IfNoneMatch sets the optional parameter which makes the operation
2747// fail if the object's ETag matches the given value. This is useful for
2748// getting updates only after the object has changed since the last
2749// request. Use googleapi.IsNotModified to check whether the response
2750// error from Do is the result of In-None-Match.
2751func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
2752	c.ifNoneMatch_ = entityTag
2753	return c
2754}
2755
2756// Context sets the context to be used in this call's Do method. Any
2757// pending HTTP request will be aborted if the provided context is
2758// canceled.
2759func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
2760	c.ctx_ = ctx
2761	return c
2762}
2763
2764// Header returns an http.Header that can be modified by the caller to
2765// add HTTP headers to the request.
2766func (c *ProjectsLocationsListCall) Header() http.Header {
2767	if c.header_ == nil {
2768		c.header_ = make(http.Header)
2769	}
2770	return c.header_
2771}
2772
2773func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
2774	reqHeaders := make(http.Header)
2775	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2776	for k, v := range c.header_ {
2777		reqHeaders[k] = v
2778	}
2779	reqHeaders.Set("User-Agent", c.s.userAgent())
2780	if c.ifNoneMatch_ != "" {
2781		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2782	}
2783	var body io.Reader = nil
2784	c.urlParams_.Set("alt", alt)
2785	c.urlParams_.Set("prettyPrint", "false")
2786	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
2787	urls += "?" + c.urlParams_.Encode()
2788	req, err := http.NewRequest("GET", urls, body)
2789	if err != nil {
2790		return nil, err
2791	}
2792	req.Header = reqHeaders
2793	googleapi.Expand(req.URL, map[string]string{
2794		"name": c.name,
2795	})
2796	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2797}
2798
2799// Do executes the "vmmigration.projects.locations.list" call.
2800// Exactly one of *ListLocationsResponse or error will be non-nil. Any
2801// non-2xx status code is an error. Response headers are in either
2802// *ListLocationsResponse.ServerResponse.Header or (if a response was
2803// returned at all) in error.(*googleapi.Error).Header. Use
2804// googleapi.IsNotModified to check whether the returned error was
2805// because http.StatusNotModified was returned.
2806func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
2807	gensupport.SetOptions(c.urlParams_, opts...)
2808	res, err := c.doRequest("json")
2809	if res != nil && res.StatusCode == http.StatusNotModified {
2810		if res.Body != nil {
2811			res.Body.Close()
2812		}
2813		return nil, &googleapi.Error{
2814			Code:   res.StatusCode,
2815			Header: res.Header,
2816		}
2817	}
2818	if err != nil {
2819		return nil, err
2820	}
2821	defer googleapi.CloseBody(res)
2822	if err := googleapi.CheckResponse(res); err != nil {
2823		return nil, err
2824	}
2825	ret := &ListLocationsResponse{
2826		ServerResponse: googleapi.ServerResponse{
2827			Header:         res.Header,
2828			HTTPStatusCode: res.StatusCode,
2829		},
2830	}
2831	target := &ret
2832	if err := gensupport.DecodeResponse(target, res); err != nil {
2833		return nil, err
2834	}
2835	return ret, nil
2836	// {
2837	//   "description": "Lists information about the supported locations for this service.",
2838	//   "flatPath": "v1/projects/{projectsId}/locations",
2839	//   "httpMethod": "GET",
2840	//   "id": "vmmigration.projects.locations.list",
2841	//   "parameterOrder": [
2842	//     "name"
2843	//   ],
2844	//   "parameters": {
2845	//     "filter": {
2846	//       "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in [AIP-160](https://google.aip.dev/160).",
2847	//       "location": "query",
2848	//       "type": "string"
2849	//     },
2850	//     "name": {
2851	//       "description": "The resource that owns the locations collection, if applicable.",
2852	//       "location": "path",
2853	//       "pattern": "^projects/[^/]+$",
2854	//       "required": true,
2855	//       "type": "string"
2856	//     },
2857	//     "pageSize": {
2858	//       "description": "The maximum number of results to return. If not set, the service selects a default.",
2859	//       "format": "int32",
2860	//       "location": "query",
2861	//       "type": "integer"
2862	//     },
2863	//     "pageToken": {
2864	//       "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.",
2865	//       "location": "query",
2866	//       "type": "string"
2867	//     }
2868	//   },
2869	//   "path": "v1/{+name}/locations",
2870	//   "response": {
2871	//     "$ref": "ListLocationsResponse"
2872	//   },
2873	//   "scopes": [
2874	//     "https://www.googleapis.com/auth/cloud-platform"
2875	//   ]
2876	// }
2877
2878}
2879
2880// Pages invokes f for each page of results.
2881// A non-nil error returned from f will halt the iteration.
2882// The provided context supersedes any context provided to the Context method.
2883func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2884	c.ctx_ = ctx
2885	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2886	for {
2887		x, err := c.Do()
2888		if err != nil {
2889			return err
2890		}
2891		if err := f(x); err != nil {
2892			return err
2893		}
2894		if x.NextPageToken == "" {
2895			return nil
2896		}
2897		c.PageToken(x.NextPageToken)
2898	}
2899}
2900
2901// method id "vmmigration.projects.locations.groups.addGroupMigration":
2902
2903type ProjectsLocationsGroupsAddGroupMigrationCall struct {
2904	s                        *Service
2905	group                    string
2906	addgroupmigrationrequest *AddGroupMigrationRequest
2907	urlParams_               gensupport.URLParams
2908	ctx_                     context.Context
2909	header_                  http.Header
2910}
2911
2912// AddGroupMigration: Adds a MigratingVm to a Group.
2913//
2914// - group: The full path name of the Group to add to.
2915func (r *ProjectsLocationsGroupsService) AddGroupMigration(group string, addgroupmigrationrequest *AddGroupMigrationRequest) *ProjectsLocationsGroupsAddGroupMigrationCall {
2916	c := &ProjectsLocationsGroupsAddGroupMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2917	c.group = group
2918	c.addgroupmigrationrequest = addgroupmigrationrequest
2919	return c
2920}
2921
2922// Fields allows partial responses to be retrieved. See
2923// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2924// for more information.
2925func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsAddGroupMigrationCall {
2926	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2927	return c
2928}
2929
2930// Context sets the context to be used in this call's Do method. Any
2931// pending HTTP request will be aborted if the provided context is
2932// canceled.
2933func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Context(ctx context.Context) *ProjectsLocationsGroupsAddGroupMigrationCall {
2934	c.ctx_ = ctx
2935	return c
2936}
2937
2938// Header returns an http.Header that can be modified by the caller to
2939// add HTTP headers to the request.
2940func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Header() http.Header {
2941	if c.header_ == nil {
2942		c.header_ = make(http.Header)
2943	}
2944	return c.header_
2945}
2946
2947func (c *ProjectsLocationsGroupsAddGroupMigrationCall) doRequest(alt string) (*http.Response, error) {
2948	reqHeaders := make(http.Header)
2949	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2950	for k, v := range c.header_ {
2951		reqHeaders[k] = v
2952	}
2953	reqHeaders.Set("User-Agent", c.s.userAgent())
2954	var body io.Reader = nil
2955	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addgroupmigrationrequest)
2956	if err != nil {
2957		return nil, err
2958	}
2959	reqHeaders.Set("Content-Type", "application/json")
2960	c.urlParams_.Set("alt", alt)
2961	c.urlParams_.Set("prettyPrint", "false")
2962	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+group}:addGroupMigration")
2963	urls += "?" + c.urlParams_.Encode()
2964	req, err := http.NewRequest("POST", urls, body)
2965	if err != nil {
2966		return nil, err
2967	}
2968	req.Header = reqHeaders
2969	googleapi.Expand(req.URL, map[string]string{
2970		"group": c.group,
2971	})
2972	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2973}
2974
2975// Do executes the "vmmigration.projects.locations.groups.addGroupMigration" call.
2976// Exactly one of *Operation or error will be non-nil. Any non-2xx
2977// status code is an error. Response headers are in either
2978// *Operation.ServerResponse.Header or (if a response was returned at
2979// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2980// to check whether the returned error was because
2981// http.StatusNotModified was returned.
2982func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
2983	gensupport.SetOptions(c.urlParams_, opts...)
2984	res, err := c.doRequest("json")
2985	if res != nil && res.StatusCode == http.StatusNotModified {
2986		if res.Body != nil {
2987			res.Body.Close()
2988		}
2989		return nil, &googleapi.Error{
2990			Code:   res.StatusCode,
2991			Header: res.Header,
2992		}
2993	}
2994	if err != nil {
2995		return nil, err
2996	}
2997	defer googleapi.CloseBody(res)
2998	if err := googleapi.CheckResponse(res); err != nil {
2999		return nil, err
3000	}
3001	ret := &Operation{
3002		ServerResponse: googleapi.ServerResponse{
3003			Header:         res.Header,
3004			HTTPStatusCode: res.StatusCode,
3005		},
3006	}
3007	target := &ret
3008	if err := gensupport.DecodeResponse(target, res); err != nil {
3009		return nil, err
3010	}
3011	return ret, nil
3012	// {
3013	//   "description": "Adds a MigratingVm to a Group.",
3014	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}:addGroupMigration",
3015	//   "httpMethod": "POST",
3016	//   "id": "vmmigration.projects.locations.groups.addGroupMigration",
3017	//   "parameterOrder": [
3018	//     "group"
3019	//   ],
3020	//   "parameters": {
3021	//     "group": {
3022	//       "description": "Required. The full path name of the Group to add to.",
3023	//       "location": "path",
3024	//       "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$",
3025	//       "required": true,
3026	//       "type": "string"
3027	//     }
3028	//   },
3029	//   "path": "v1/{+group}:addGroupMigration",
3030	//   "request": {
3031	//     "$ref": "AddGroupMigrationRequest"
3032	//   },
3033	//   "response": {
3034	//     "$ref": "Operation"
3035	//   },
3036	//   "scopes": [
3037	//     "https://www.googleapis.com/auth/cloud-platform"
3038	//   ]
3039	// }
3040
3041}
3042
3043// method id "vmmigration.projects.locations.groups.create":
3044
3045type ProjectsLocationsGroupsCreateCall struct {
3046	s          *Service
3047	parent     string
3048	group      *Group
3049	urlParams_ gensupport.URLParams
3050	ctx_       context.Context
3051	header_    http.Header
3052}
3053
3054// Create: Creates a new Group in a given project and location.
3055//
3056// - parent: The Group's parent.
3057func (r *ProjectsLocationsGroupsService) Create(parent string, group *Group) *ProjectsLocationsGroupsCreateCall {
3058	c := &ProjectsLocationsGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3059	c.parent = parent
3060	c.group = group
3061	return c
3062}
3063
3064// GroupId sets the optional parameter "groupId": Required. The group
3065// identifier.
3066func (c *ProjectsLocationsGroupsCreateCall) GroupId(groupId string) *ProjectsLocationsGroupsCreateCall {
3067	c.urlParams_.Set("groupId", groupId)
3068	return c
3069}
3070
3071// RequestId sets the optional parameter "requestId": A request ID to
3072// identify requests. Specify a unique request ID so that if you must
3073// retry your request, the server will know to ignore the request if it
3074// has already been completed. The server will guarantee that for at
3075// least 60 minutes since the first request. For example, consider a
3076// situation where you make an initial request and t he request times
3077// out. If you make the request again with the same request ID, the
3078// server can check if original operation with the same request ID was
3079// received, and if so, will ignore the second request. This prevents
3080// clients from accidentally creating duplicate commitments. The request
3081// ID must be a valid UUID with the exception that zero UUID is not
3082// supported (00000000-0000-0000-0000-000000000000).
3083func (c *ProjectsLocationsGroupsCreateCall) RequestId(requestId string) *ProjectsLocationsGroupsCreateCall {
3084	c.urlParams_.Set("requestId", requestId)
3085	return c
3086}
3087
3088// Fields allows partial responses to be retrieved. See
3089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3090// for more information.
3091func (c *ProjectsLocationsGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsCreateCall {
3092	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3093	return c
3094}
3095
3096// Context sets the context to be used in this call's Do method. Any
3097// pending HTTP request will be aborted if the provided context is
3098// canceled.
3099func (c *ProjectsLocationsGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsGroupsCreateCall {
3100	c.ctx_ = ctx
3101	return c
3102}
3103
3104// Header returns an http.Header that can be modified by the caller to
3105// add HTTP headers to the request.
3106func (c *ProjectsLocationsGroupsCreateCall) Header() http.Header {
3107	if c.header_ == nil {
3108		c.header_ = make(http.Header)
3109	}
3110	return c.header_
3111}
3112
3113func (c *ProjectsLocationsGroupsCreateCall) doRequest(alt string) (*http.Response, error) {
3114	reqHeaders := make(http.Header)
3115	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3116	for k, v := range c.header_ {
3117		reqHeaders[k] = v
3118	}
3119	reqHeaders.Set("User-Agent", c.s.userAgent())
3120	var body io.Reader = nil
3121	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
3122	if err != nil {
3123		return nil, err
3124	}
3125	reqHeaders.Set("Content-Type", "application/json")
3126	c.urlParams_.Set("alt", alt)
3127	c.urlParams_.Set("prettyPrint", "false")
3128	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/groups")
3129	urls += "?" + c.urlParams_.Encode()
3130	req, err := http.NewRequest("POST", urls, body)
3131	if err != nil {
3132		return nil, err
3133	}
3134	req.Header = reqHeaders
3135	googleapi.Expand(req.URL, map[string]string{
3136		"parent": c.parent,
3137	})
3138	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3139}
3140
3141// Do executes the "vmmigration.projects.locations.groups.create" call.
3142// Exactly one of *Operation or error will be non-nil. Any non-2xx
3143// status code is an error. Response headers are in either
3144// *Operation.ServerResponse.Header or (if a response was returned at
3145// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3146// to check whether the returned error was because
3147// http.StatusNotModified was returned.
3148func (c *ProjectsLocationsGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3149	gensupport.SetOptions(c.urlParams_, opts...)
3150	res, err := c.doRequest("json")
3151	if res != nil && res.StatusCode == http.StatusNotModified {
3152		if res.Body != nil {
3153			res.Body.Close()
3154		}
3155		return nil, &googleapi.Error{
3156			Code:   res.StatusCode,
3157			Header: res.Header,
3158		}
3159	}
3160	if err != nil {
3161		return nil, err
3162	}
3163	defer googleapi.CloseBody(res)
3164	if err := googleapi.CheckResponse(res); err != nil {
3165		return nil, err
3166	}
3167	ret := &Operation{
3168		ServerResponse: googleapi.ServerResponse{
3169			Header:         res.Header,
3170			HTTPStatusCode: res.StatusCode,
3171		},
3172	}
3173	target := &ret
3174	if err := gensupport.DecodeResponse(target, res); err != nil {
3175		return nil, err
3176	}
3177	return ret, nil
3178	// {
3179	//   "description": "Creates a new Group in a given project and location.",
3180	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups",
3181	//   "httpMethod": "POST",
3182	//   "id": "vmmigration.projects.locations.groups.create",
3183	//   "parameterOrder": [
3184	//     "parent"
3185	//   ],
3186	//   "parameters": {
3187	//     "groupId": {
3188	//       "description": "Required. The group identifier.",
3189	//       "location": "query",
3190	//       "type": "string"
3191	//     },
3192	//     "parent": {
3193	//       "description": "Required. The Group's parent.",
3194	//       "location": "path",
3195	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
3196	//       "required": true,
3197	//       "type": "string"
3198	//     },
3199	//     "requestId": {
3200	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
3201	//       "location": "query",
3202	//       "type": "string"
3203	//     }
3204	//   },
3205	//   "path": "v1/{+parent}/groups",
3206	//   "request": {
3207	//     "$ref": "Group"
3208	//   },
3209	//   "response": {
3210	//     "$ref": "Operation"
3211	//   },
3212	//   "scopes": [
3213	//     "https://www.googleapis.com/auth/cloud-platform"
3214	//   ]
3215	// }
3216
3217}
3218
3219// method id "vmmigration.projects.locations.groups.delete":
3220
3221type ProjectsLocationsGroupsDeleteCall struct {
3222	s          *Service
3223	name       string
3224	urlParams_ gensupport.URLParams
3225	ctx_       context.Context
3226	header_    http.Header
3227}
3228
3229// Delete: Deletes a single Group.
3230//
3231// - name: The Group name.
3232func (r *ProjectsLocationsGroupsService) Delete(name string) *ProjectsLocationsGroupsDeleteCall {
3233	c := &ProjectsLocationsGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3234	c.name = name
3235	return c
3236}
3237
3238// RequestId sets the optional parameter "requestId": A request ID to
3239// identify requests. Specify a unique request ID so that if you must
3240// retry your request, the server will know to ignore the request if it
3241// has already been completed. The server will guarantee that for at
3242// least 60 minutes after the first request. For example, consider a
3243// situation where you make an initial request and t he request times
3244// out. If you make the request again with the same request ID, the
3245// server can check if original operation with the same request ID was
3246// received, and if so, will ignore the second request. This prevents
3247// clients from accidentally creating duplicate commitments. The request
3248// ID must be a valid UUID with the exception that zero UUID is not
3249// supported (00000000-0000-0000-0000-000000000000).
3250func (c *ProjectsLocationsGroupsDeleteCall) RequestId(requestId string) *ProjectsLocationsGroupsDeleteCall {
3251	c.urlParams_.Set("requestId", requestId)
3252	return c
3253}
3254
3255// Fields allows partial responses to be retrieved. See
3256// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3257// for more information.
3258func (c *ProjectsLocationsGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsDeleteCall {
3259	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3260	return c
3261}
3262
3263// Context sets the context to be used in this call's Do method. Any
3264// pending HTTP request will be aborted if the provided context is
3265// canceled.
3266func (c *ProjectsLocationsGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGroupsDeleteCall {
3267	c.ctx_ = ctx
3268	return c
3269}
3270
3271// Header returns an http.Header that can be modified by the caller to
3272// add HTTP headers to the request.
3273func (c *ProjectsLocationsGroupsDeleteCall) Header() http.Header {
3274	if c.header_ == nil {
3275		c.header_ = make(http.Header)
3276	}
3277	return c.header_
3278}
3279
3280func (c *ProjectsLocationsGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
3281	reqHeaders := make(http.Header)
3282	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3283	for k, v := range c.header_ {
3284		reqHeaders[k] = v
3285	}
3286	reqHeaders.Set("User-Agent", c.s.userAgent())
3287	var body io.Reader = nil
3288	c.urlParams_.Set("alt", alt)
3289	c.urlParams_.Set("prettyPrint", "false")
3290	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3291	urls += "?" + c.urlParams_.Encode()
3292	req, err := http.NewRequest("DELETE", urls, body)
3293	if err != nil {
3294		return nil, err
3295	}
3296	req.Header = reqHeaders
3297	googleapi.Expand(req.URL, map[string]string{
3298		"name": c.name,
3299	})
3300	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3301}
3302
3303// Do executes the "vmmigration.projects.locations.groups.delete" call.
3304// Exactly one of *Operation or error will be non-nil. Any non-2xx
3305// status code is an error. Response headers are in either
3306// *Operation.ServerResponse.Header or (if a response was returned at
3307// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3308// to check whether the returned error was because
3309// http.StatusNotModified was returned.
3310func (c *ProjectsLocationsGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3311	gensupport.SetOptions(c.urlParams_, opts...)
3312	res, err := c.doRequest("json")
3313	if res != nil && res.StatusCode == http.StatusNotModified {
3314		if res.Body != nil {
3315			res.Body.Close()
3316		}
3317		return nil, &googleapi.Error{
3318			Code:   res.StatusCode,
3319			Header: res.Header,
3320		}
3321	}
3322	if err != nil {
3323		return nil, err
3324	}
3325	defer googleapi.CloseBody(res)
3326	if err := googleapi.CheckResponse(res); err != nil {
3327		return nil, err
3328	}
3329	ret := &Operation{
3330		ServerResponse: googleapi.ServerResponse{
3331			Header:         res.Header,
3332			HTTPStatusCode: res.StatusCode,
3333		},
3334	}
3335	target := &ret
3336	if err := gensupport.DecodeResponse(target, res); err != nil {
3337		return nil, err
3338	}
3339	return ret, nil
3340	// {
3341	//   "description": "Deletes a single Group.",
3342	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}",
3343	//   "httpMethod": "DELETE",
3344	//   "id": "vmmigration.projects.locations.groups.delete",
3345	//   "parameterOrder": [
3346	//     "name"
3347	//   ],
3348	//   "parameters": {
3349	//     "name": {
3350	//       "description": "Required. The Group name.",
3351	//       "location": "path",
3352	//       "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$",
3353	//       "required": true,
3354	//       "type": "string"
3355	//     },
3356	//     "requestId": {
3357	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
3358	//       "location": "query",
3359	//       "type": "string"
3360	//     }
3361	//   },
3362	//   "path": "v1/{+name}",
3363	//   "response": {
3364	//     "$ref": "Operation"
3365	//   },
3366	//   "scopes": [
3367	//     "https://www.googleapis.com/auth/cloud-platform"
3368	//   ]
3369	// }
3370
3371}
3372
3373// method id "vmmigration.projects.locations.groups.get":
3374
3375type ProjectsLocationsGroupsGetCall struct {
3376	s            *Service
3377	name         string
3378	urlParams_   gensupport.URLParams
3379	ifNoneMatch_ string
3380	ctx_         context.Context
3381	header_      http.Header
3382}
3383
3384// Get: Gets details of a single Group.
3385//
3386// - name: The group name.
3387func (r *ProjectsLocationsGroupsService) Get(name string) *ProjectsLocationsGroupsGetCall {
3388	c := &ProjectsLocationsGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3389	c.name = name
3390	return c
3391}
3392
3393// Fields allows partial responses to be retrieved. See
3394// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3395// for more information.
3396func (c *ProjectsLocationsGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsGetCall {
3397	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3398	return c
3399}
3400
3401// IfNoneMatch sets the optional parameter which makes the operation
3402// fail if the object's ETag matches the given value. This is useful for
3403// getting updates only after the object has changed since the last
3404// request. Use googleapi.IsNotModified to check whether the response
3405// error from Do is the result of In-None-Match.
3406func (c *ProjectsLocationsGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGroupsGetCall {
3407	c.ifNoneMatch_ = entityTag
3408	return c
3409}
3410
3411// Context sets the context to be used in this call's Do method. Any
3412// pending HTTP request will be aborted if the provided context is
3413// canceled.
3414func (c *ProjectsLocationsGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsGroupsGetCall {
3415	c.ctx_ = ctx
3416	return c
3417}
3418
3419// Header returns an http.Header that can be modified by the caller to
3420// add HTTP headers to the request.
3421func (c *ProjectsLocationsGroupsGetCall) Header() http.Header {
3422	if c.header_ == nil {
3423		c.header_ = make(http.Header)
3424	}
3425	return c.header_
3426}
3427
3428func (c *ProjectsLocationsGroupsGetCall) doRequest(alt string) (*http.Response, error) {
3429	reqHeaders := make(http.Header)
3430	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3431	for k, v := range c.header_ {
3432		reqHeaders[k] = v
3433	}
3434	reqHeaders.Set("User-Agent", c.s.userAgent())
3435	if c.ifNoneMatch_ != "" {
3436		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3437	}
3438	var body io.Reader = nil
3439	c.urlParams_.Set("alt", alt)
3440	c.urlParams_.Set("prettyPrint", "false")
3441	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3442	urls += "?" + c.urlParams_.Encode()
3443	req, err := http.NewRequest("GET", urls, body)
3444	if err != nil {
3445		return nil, err
3446	}
3447	req.Header = reqHeaders
3448	googleapi.Expand(req.URL, map[string]string{
3449		"name": c.name,
3450	})
3451	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3452}
3453
3454// Do executes the "vmmigration.projects.locations.groups.get" call.
3455// Exactly one of *Group or error will be non-nil. Any non-2xx status
3456// code is an error. Response headers are in either
3457// *Group.ServerResponse.Header or (if a response was returned at all)
3458// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3459// check whether the returned error was because http.StatusNotModified
3460// was returned.
3461func (c *ProjectsLocationsGroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) {
3462	gensupport.SetOptions(c.urlParams_, opts...)
3463	res, err := c.doRequest("json")
3464	if res != nil && res.StatusCode == http.StatusNotModified {
3465		if res.Body != nil {
3466			res.Body.Close()
3467		}
3468		return nil, &googleapi.Error{
3469			Code:   res.StatusCode,
3470			Header: res.Header,
3471		}
3472	}
3473	if err != nil {
3474		return nil, err
3475	}
3476	defer googleapi.CloseBody(res)
3477	if err := googleapi.CheckResponse(res); err != nil {
3478		return nil, err
3479	}
3480	ret := &Group{
3481		ServerResponse: googleapi.ServerResponse{
3482			Header:         res.Header,
3483			HTTPStatusCode: res.StatusCode,
3484		},
3485	}
3486	target := &ret
3487	if err := gensupport.DecodeResponse(target, res); err != nil {
3488		return nil, err
3489	}
3490	return ret, nil
3491	// {
3492	//   "description": "Gets details of a single Group.",
3493	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}",
3494	//   "httpMethod": "GET",
3495	//   "id": "vmmigration.projects.locations.groups.get",
3496	//   "parameterOrder": [
3497	//     "name"
3498	//   ],
3499	//   "parameters": {
3500	//     "name": {
3501	//       "description": "Required. The group name.",
3502	//       "location": "path",
3503	//       "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$",
3504	//       "required": true,
3505	//       "type": "string"
3506	//     }
3507	//   },
3508	//   "path": "v1/{+name}",
3509	//   "response": {
3510	//     "$ref": "Group"
3511	//   },
3512	//   "scopes": [
3513	//     "https://www.googleapis.com/auth/cloud-platform"
3514	//   ]
3515	// }
3516
3517}
3518
3519// method id "vmmigration.projects.locations.groups.list":
3520
3521type ProjectsLocationsGroupsListCall struct {
3522	s            *Service
3523	parent       string
3524	urlParams_   gensupport.URLParams
3525	ifNoneMatch_ string
3526	ctx_         context.Context
3527	header_      http.Header
3528}
3529
3530// List: Lists Groups in a given project and location.
3531//
3532// - parent: The parent, which owns this collection of groups.
3533func (r *ProjectsLocationsGroupsService) List(parent string) *ProjectsLocationsGroupsListCall {
3534	c := &ProjectsLocationsGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3535	c.parent = parent
3536	return c
3537}
3538
3539// Filter sets the optional parameter "filter": The filter request.
3540func (c *ProjectsLocationsGroupsListCall) Filter(filter string) *ProjectsLocationsGroupsListCall {
3541	c.urlParams_.Set("filter", filter)
3542	return c
3543}
3544
3545// OrderBy sets the optional parameter "orderBy": the order by fields
3546// for the result.
3547func (c *ProjectsLocationsGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsGroupsListCall {
3548	c.urlParams_.Set("orderBy", orderBy)
3549	return c
3550}
3551
3552// PageSize sets the optional parameter "pageSize": The maximum number
3553// of groups to return. The service may return fewer than this value. If
3554// unspecified, at most 500 groups will be returned. The maximum value
3555// is 1000; values above 1000 will be coerced to 1000.
3556func (c *ProjectsLocationsGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsGroupsListCall {
3557	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3558	return c
3559}
3560
3561// PageToken sets the optional parameter "pageToken": Required. A page
3562// token, received from a previous `ListGroups` call. Provide this to
3563// retrieve the subsequent page. When paginating, all other parameters
3564// provided to `ListGroups` must match the call that provided the page
3565// token.
3566func (c *ProjectsLocationsGroupsListCall) PageToken(pageToken string) *ProjectsLocationsGroupsListCall {
3567	c.urlParams_.Set("pageToken", pageToken)
3568	return c
3569}
3570
3571// Fields allows partial responses to be retrieved. See
3572// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3573// for more information.
3574func (c *ProjectsLocationsGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsListCall {
3575	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3576	return c
3577}
3578
3579// IfNoneMatch sets the optional parameter which makes the operation
3580// fail if the object's ETag matches the given value. This is useful for
3581// getting updates only after the object has changed since the last
3582// request. Use googleapi.IsNotModified to check whether the response
3583// error from Do is the result of In-None-Match.
3584func (c *ProjectsLocationsGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGroupsListCall {
3585	c.ifNoneMatch_ = entityTag
3586	return c
3587}
3588
3589// Context sets the context to be used in this call's Do method. Any
3590// pending HTTP request will be aborted if the provided context is
3591// canceled.
3592func (c *ProjectsLocationsGroupsListCall) Context(ctx context.Context) *ProjectsLocationsGroupsListCall {
3593	c.ctx_ = ctx
3594	return c
3595}
3596
3597// Header returns an http.Header that can be modified by the caller to
3598// add HTTP headers to the request.
3599func (c *ProjectsLocationsGroupsListCall) Header() http.Header {
3600	if c.header_ == nil {
3601		c.header_ = make(http.Header)
3602	}
3603	return c.header_
3604}
3605
3606func (c *ProjectsLocationsGroupsListCall) doRequest(alt string) (*http.Response, error) {
3607	reqHeaders := make(http.Header)
3608	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3609	for k, v := range c.header_ {
3610		reqHeaders[k] = v
3611	}
3612	reqHeaders.Set("User-Agent", c.s.userAgent())
3613	if c.ifNoneMatch_ != "" {
3614		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3615	}
3616	var body io.Reader = nil
3617	c.urlParams_.Set("alt", alt)
3618	c.urlParams_.Set("prettyPrint", "false")
3619	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/groups")
3620	urls += "?" + c.urlParams_.Encode()
3621	req, err := http.NewRequest("GET", urls, body)
3622	if err != nil {
3623		return nil, err
3624	}
3625	req.Header = reqHeaders
3626	googleapi.Expand(req.URL, map[string]string{
3627		"parent": c.parent,
3628	})
3629	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3630}
3631
3632// Do executes the "vmmigration.projects.locations.groups.list" call.
3633// Exactly one of *ListGroupsResponse or error will be non-nil. Any
3634// non-2xx status code is an error. Response headers are in either
3635// *ListGroupsResponse.ServerResponse.Header or (if a response was
3636// returned at all) in error.(*googleapi.Error).Header. Use
3637// googleapi.IsNotModified to check whether the returned error was
3638// because http.StatusNotModified was returned.
3639func (c *ProjectsLocationsGroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsResponse, error) {
3640	gensupport.SetOptions(c.urlParams_, opts...)
3641	res, err := c.doRequest("json")
3642	if res != nil && res.StatusCode == http.StatusNotModified {
3643		if res.Body != nil {
3644			res.Body.Close()
3645		}
3646		return nil, &googleapi.Error{
3647			Code:   res.StatusCode,
3648			Header: res.Header,
3649		}
3650	}
3651	if err != nil {
3652		return nil, err
3653	}
3654	defer googleapi.CloseBody(res)
3655	if err := googleapi.CheckResponse(res); err != nil {
3656		return nil, err
3657	}
3658	ret := &ListGroupsResponse{
3659		ServerResponse: googleapi.ServerResponse{
3660			Header:         res.Header,
3661			HTTPStatusCode: res.StatusCode,
3662		},
3663	}
3664	target := &ret
3665	if err := gensupport.DecodeResponse(target, res); err != nil {
3666		return nil, err
3667	}
3668	return ret, nil
3669	// {
3670	//   "description": "Lists Groups in a given project and location.",
3671	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups",
3672	//   "httpMethod": "GET",
3673	//   "id": "vmmigration.projects.locations.groups.list",
3674	//   "parameterOrder": [
3675	//     "parent"
3676	//   ],
3677	//   "parameters": {
3678	//     "filter": {
3679	//       "description": "Optional. The filter request.",
3680	//       "location": "query",
3681	//       "type": "string"
3682	//     },
3683	//     "orderBy": {
3684	//       "description": "Optional. the order by fields for the result.",
3685	//       "location": "query",
3686	//       "type": "string"
3687	//     },
3688	//     "pageSize": {
3689	//       "description": "Optional. The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 500 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
3690	//       "format": "int32",
3691	//       "location": "query",
3692	//       "type": "integer"
3693	//     },
3694	//     "pageToken": {
3695	//       "description": "Required. A page token, received from a previous `ListGroups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListGroups` must match the call that provided the page token.",
3696	//       "location": "query",
3697	//       "type": "string"
3698	//     },
3699	//     "parent": {
3700	//       "description": "Required. The parent, which owns this collection of groups.",
3701	//       "location": "path",
3702	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
3703	//       "required": true,
3704	//       "type": "string"
3705	//     }
3706	//   },
3707	//   "path": "v1/{+parent}/groups",
3708	//   "response": {
3709	//     "$ref": "ListGroupsResponse"
3710	//   },
3711	//   "scopes": [
3712	//     "https://www.googleapis.com/auth/cloud-platform"
3713	//   ]
3714	// }
3715
3716}
3717
3718// Pages invokes f for each page of results.
3719// A non-nil error returned from f will halt the iteration.
3720// The provided context supersedes any context provided to the Context method.
3721func (c *ProjectsLocationsGroupsListCall) Pages(ctx context.Context, f func(*ListGroupsResponse) error) error {
3722	c.ctx_ = ctx
3723	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3724	for {
3725		x, err := c.Do()
3726		if err != nil {
3727			return err
3728		}
3729		if err := f(x); err != nil {
3730			return err
3731		}
3732		if x.NextPageToken == "" {
3733			return nil
3734		}
3735		c.PageToken(x.NextPageToken)
3736	}
3737}
3738
3739// method id "vmmigration.projects.locations.groups.patch":
3740
3741type ProjectsLocationsGroupsPatchCall struct {
3742	s          *Service
3743	name       string
3744	group      *Group
3745	urlParams_ gensupport.URLParams
3746	ctx_       context.Context
3747	header_    http.Header
3748}
3749
3750// Patch: Updates the parameters of a single Group.
3751//
3752// - name: The Group name.
3753func (r *ProjectsLocationsGroupsService) Patch(name string, group *Group) *ProjectsLocationsGroupsPatchCall {
3754	c := &ProjectsLocationsGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3755	c.name = name
3756	c.group = group
3757	return c
3758}
3759
3760// RequestId sets the optional parameter "requestId": A request ID to
3761// identify requests. Specify a unique request ID so that if you must
3762// retry your request, the server will know to ignore the request if it
3763// has already been completed. The server will guarantee that for at
3764// least 60 minutes since the first request. For example, consider a
3765// situation where you make an initial request and t he request times
3766// out. If you make the request again with the same request ID, the
3767// server can check if original operation with the same request ID was
3768// received, and if so, will ignore the second request. This prevents
3769// clients from accidentally creating duplicate commitments. The request
3770// ID must be a valid UUID with the exception that zero UUID is not
3771// supported (00000000-0000-0000-0000-000000000000).
3772func (c *ProjectsLocationsGroupsPatchCall) RequestId(requestId string) *ProjectsLocationsGroupsPatchCall {
3773	c.urlParams_.Set("requestId", requestId)
3774	return c
3775}
3776
3777// UpdateMask sets the optional parameter "updateMask": Field mask is
3778// used to specify the fields to be overwritten in the Group resource by
3779// the update. The fields specified in the update_mask are relative to
3780// the resource, not the full request. A field will be overwritten if it
3781// is in the mask. If the user does not provide a mask then all fields
3782// will be overwritten.
3783func (c *ProjectsLocationsGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGroupsPatchCall {
3784	c.urlParams_.Set("updateMask", updateMask)
3785	return c
3786}
3787
3788// Fields allows partial responses to be retrieved. See
3789// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3790// for more information.
3791func (c *ProjectsLocationsGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsPatchCall {
3792	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3793	return c
3794}
3795
3796// Context sets the context to be used in this call's Do method. Any
3797// pending HTTP request will be aborted if the provided context is
3798// canceled.
3799func (c *ProjectsLocationsGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsGroupsPatchCall {
3800	c.ctx_ = ctx
3801	return c
3802}
3803
3804// Header returns an http.Header that can be modified by the caller to
3805// add HTTP headers to the request.
3806func (c *ProjectsLocationsGroupsPatchCall) Header() http.Header {
3807	if c.header_ == nil {
3808		c.header_ = make(http.Header)
3809	}
3810	return c.header_
3811}
3812
3813func (c *ProjectsLocationsGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
3814	reqHeaders := make(http.Header)
3815	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3816	for k, v := range c.header_ {
3817		reqHeaders[k] = v
3818	}
3819	reqHeaders.Set("User-Agent", c.s.userAgent())
3820	var body io.Reader = nil
3821	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
3822	if err != nil {
3823		return nil, err
3824	}
3825	reqHeaders.Set("Content-Type", "application/json")
3826	c.urlParams_.Set("alt", alt)
3827	c.urlParams_.Set("prettyPrint", "false")
3828	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
3829	urls += "?" + c.urlParams_.Encode()
3830	req, err := http.NewRequest("PATCH", urls, body)
3831	if err != nil {
3832		return nil, err
3833	}
3834	req.Header = reqHeaders
3835	googleapi.Expand(req.URL, map[string]string{
3836		"name": c.name,
3837	})
3838	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3839}
3840
3841// Do executes the "vmmigration.projects.locations.groups.patch" call.
3842// Exactly one of *Operation or error will be non-nil. Any non-2xx
3843// status code is an error. Response headers are in either
3844// *Operation.ServerResponse.Header or (if a response was returned at
3845// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3846// to check whether the returned error was because
3847// http.StatusNotModified was returned.
3848func (c *ProjectsLocationsGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3849	gensupport.SetOptions(c.urlParams_, opts...)
3850	res, err := c.doRequest("json")
3851	if res != nil && res.StatusCode == http.StatusNotModified {
3852		if res.Body != nil {
3853			res.Body.Close()
3854		}
3855		return nil, &googleapi.Error{
3856			Code:   res.StatusCode,
3857			Header: res.Header,
3858		}
3859	}
3860	if err != nil {
3861		return nil, err
3862	}
3863	defer googleapi.CloseBody(res)
3864	if err := googleapi.CheckResponse(res); err != nil {
3865		return nil, err
3866	}
3867	ret := &Operation{
3868		ServerResponse: googleapi.ServerResponse{
3869			Header:         res.Header,
3870			HTTPStatusCode: res.StatusCode,
3871		},
3872	}
3873	target := &ret
3874	if err := gensupport.DecodeResponse(target, res); err != nil {
3875		return nil, err
3876	}
3877	return ret, nil
3878	// {
3879	//   "description": "Updates the parameters of a single Group.",
3880	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}",
3881	//   "httpMethod": "PATCH",
3882	//   "id": "vmmigration.projects.locations.groups.patch",
3883	//   "parameterOrder": [
3884	//     "name"
3885	//   ],
3886	//   "parameters": {
3887	//     "name": {
3888	//       "description": "The Group name.",
3889	//       "location": "path",
3890	//       "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$",
3891	//       "required": true,
3892	//       "type": "string"
3893	//     },
3894	//     "requestId": {
3895	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
3896	//       "location": "query",
3897	//       "type": "string"
3898	//     },
3899	//     "updateMask": {
3900	//       "description": "Field mask is used to specify the fields to be overwritten in the Group resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.",
3901	//       "format": "google-fieldmask",
3902	//       "location": "query",
3903	//       "type": "string"
3904	//     }
3905	//   },
3906	//   "path": "v1/{+name}",
3907	//   "request": {
3908	//     "$ref": "Group"
3909	//   },
3910	//   "response": {
3911	//     "$ref": "Operation"
3912	//   },
3913	//   "scopes": [
3914	//     "https://www.googleapis.com/auth/cloud-platform"
3915	//   ]
3916	// }
3917
3918}
3919
3920// method id "vmmigration.projects.locations.groups.removeGroupMigration":
3921
3922type ProjectsLocationsGroupsRemoveGroupMigrationCall struct {
3923	s                           *Service
3924	group                       string
3925	removegroupmigrationrequest *RemoveGroupMigrationRequest
3926	urlParams_                  gensupport.URLParams
3927	ctx_                        context.Context
3928	header_                     http.Header
3929}
3930
3931// RemoveGroupMigration: Removes a MigratingVm from a Group.
3932//
3933// - group: The name of the Group.
3934func (r *ProjectsLocationsGroupsService) RemoveGroupMigration(group string, removegroupmigrationrequest *RemoveGroupMigrationRequest) *ProjectsLocationsGroupsRemoveGroupMigrationCall {
3935	c := &ProjectsLocationsGroupsRemoveGroupMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3936	c.group = group
3937	c.removegroupmigrationrequest = removegroupmigrationrequest
3938	return c
3939}
3940
3941// Fields allows partial responses to be retrieved. See
3942// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3943// for more information.
3944func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsRemoveGroupMigrationCall {
3945	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3946	return c
3947}
3948
3949// Context sets the context to be used in this call's Do method. Any
3950// pending HTTP request will be aborted if the provided context is
3951// canceled.
3952func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Context(ctx context.Context) *ProjectsLocationsGroupsRemoveGroupMigrationCall {
3953	c.ctx_ = ctx
3954	return c
3955}
3956
3957// Header returns an http.Header that can be modified by the caller to
3958// add HTTP headers to the request.
3959func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Header() http.Header {
3960	if c.header_ == nil {
3961		c.header_ = make(http.Header)
3962	}
3963	return c.header_
3964}
3965
3966func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) doRequest(alt string) (*http.Response, error) {
3967	reqHeaders := make(http.Header)
3968	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3969	for k, v := range c.header_ {
3970		reqHeaders[k] = v
3971	}
3972	reqHeaders.Set("User-Agent", c.s.userAgent())
3973	var body io.Reader = nil
3974	body, err := googleapi.WithoutDataWrapper.JSONReader(c.removegroupmigrationrequest)
3975	if err != nil {
3976		return nil, err
3977	}
3978	reqHeaders.Set("Content-Type", "application/json")
3979	c.urlParams_.Set("alt", alt)
3980	c.urlParams_.Set("prettyPrint", "false")
3981	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+group}:removeGroupMigration")
3982	urls += "?" + c.urlParams_.Encode()
3983	req, err := http.NewRequest("POST", urls, body)
3984	if err != nil {
3985		return nil, err
3986	}
3987	req.Header = reqHeaders
3988	googleapi.Expand(req.URL, map[string]string{
3989		"group": c.group,
3990	})
3991	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3992}
3993
3994// Do executes the "vmmigration.projects.locations.groups.removeGroupMigration" call.
3995// Exactly one of *Operation or error will be non-nil. Any non-2xx
3996// status code is an error. Response headers are in either
3997// *Operation.ServerResponse.Header or (if a response was returned at
3998// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3999// to check whether the returned error was because
4000// http.StatusNotModified was returned.
4001func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4002	gensupport.SetOptions(c.urlParams_, opts...)
4003	res, err := c.doRequest("json")
4004	if res != nil && res.StatusCode == http.StatusNotModified {
4005		if res.Body != nil {
4006			res.Body.Close()
4007		}
4008		return nil, &googleapi.Error{
4009			Code:   res.StatusCode,
4010			Header: res.Header,
4011		}
4012	}
4013	if err != nil {
4014		return nil, err
4015	}
4016	defer googleapi.CloseBody(res)
4017	if err := googleapi.CheckResponse(res); err != nil {
4018		return nil, err
4019	}
4020	ret := &Operation{
4021		ServerResponse: googleapi.ServerResponse{
4022			Header:         res.Header,
4023			HTTPStatusCode: res.StatusCode,
4024		},
4025	}
4026	target := &ret
4027	if err := gensupport.DecodeResponse(target, res); err != nil {
4028		return nil, err
4029	}
4030	return ret, nil
4031	// {
4032	//   "description": "Removes a MigratingVm from a Group.",
4033	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}:removeGroupMigration",
4034	//   "httpMethod": "POST",
4035	//   "id": "vmmigration.projects.locations.groups.removeGroupMigration",
4036	//   "parameterOrder": [
4037	//     "group"
4038	//   ],
4039	//   "parameters": {
4040	//     "group": {
4041	//       "description": "Required. The name of the Group.",
4042	//       "location": "path",
4043	//       "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$",
4044	//       "required": true,
4045	//       "type": "string"
4046	//     }
4047	//   },
4048	//   "path": "v1/{+group}:removeGroupMigration",
4049	//   "request": {
4050	//     "$ref": "RemoveGroupMigrationRequest"
4051	//   },
4052	//   "response": {
4053	//     "$ref": "Operation"
4054	//   },
4055	//   "scopes": [
4056	//     "https://www.googleapis.com/auth/cloud-platform"
4057	//   ]
4058	// }
4059
4060}
4061
4062// method id "vmmigration.projects.locations.operations.cancel":
4063
4064type ProjectsLocationsOperationsCancelCall struct {
4065	s                      *Service
4066	name                   string
4067	canceloperationrequest *CancelOperationRequest
4068	urlParams_             gensupport.URLParams
4069	ctx_                   context.Context
4070	header_                http.Header
4071}
4072
4073// Cancel: Starts asynchronous cancellation on a long-running operation.
4074// The server makes a best effort to cancel the operation, but success
4075// is not guaranteed. If the server doesn't support this method, it
4076// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
4077// Operations.GetOperation or other methods to check whether the
4078// cancellation succeeded or whether the operation completed despite
4079// cancellation. On successful cancellation, the operation is not
4080// deleted; instead, it becomes an operation with an Operation.error
4081// value with a google.rpc.Status.code of 1, corresponding to
4082// `Code.CANCELLED`.
4083//
4084// - name: The name of the operation resource to be cancelled.
4085func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
4086	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4087	c.name = name
4088	c.canceloperationrequest = canceloperationrequest
4089	return c
4090}
4091
4092// Fields allows partial responses to be retrieved. See
4093// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4094// for more information.
4095func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
4096	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4097	return c
4098}
4099
4100// Context sets the context to be used in this call's Do method. Any
4101// pending HTTP request will be aborted if the provided context is
4102// canceled.
4103func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
4104	c.ctx_ = ctx
4105	return c
4106}
4107
4108// Header returns an http.Header that can be modified by the caller to
4109// add HTTP headers to the request.
4110func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
4111	if c.header_ == nil {
4112		c.header_ = make(http.Header)
4113	}
4114	return c.header_
4115}
4116
4117func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
4118	reqHeaders := make(http.Header)
4119	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4120	for k, v := range c.header_ {
4121		reqHeaders[k] = v
4122	}
4123	reqHeaders.Set("User-Agent", c.s.userAgent())
4124	var body io.Reader = nil
4125	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
4126	if err != nil {
4127		return nil, err
4128	}
4129	reqHeaders.Set("Content-Type", "application/json")
4130	c.urlParams_.Set("alt", alt)
4131	c.urlParams_.Set("prettyPrint", "false")
4132	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
4133	urls += "?" + c.urlParams_.Encode()
4134	req, err := http.NewRequest("POST", urls, body)
4135	if err != nil {
4136		return nil, err
4137	}
4138	req.Header = reqHeaders
4139	googleapi.Expand(req.URL, map[string]string{
4140		"name": c.name,
4141	})
4142	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4143}
4144
4145// Do executes the "vmmigration.projects.locations.operations.cancel" call.
4146// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4147// code is an error. Response headers are in either
4148// *Empty.ServerResponse.Header or (if a response was returned at all)
4149// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4150// check whether the returned error was because http.StatusNotModified
4151// was returned.
4152func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4153	gensupport.SetOptions(c.urlParams_, opts...)
4154	res, err := c.doRequest("json")
4155	if res != nil && res.StatusCode == http.StatusNotModified {
4156		if res.Body != nil {
4157			res.Body.Close()
4158		}
4159		return nil, &googleapi.Error{
4160			Code:   res.StatusCode,
4161			Header: res.Header,
4162		}
4163	}
4164	if err != nil {
4165		return nil, err
4166	}
4167	defer googleapi.CloseBody(res)
4168	if err := googleapi.CheckResponse(res); err != nil {
4169		return nil, err
4170	}
4171	ret := &Empty{
4172		ServerResponse: googleapi.ServerResponse{
4173			Header:         res.Header,
4174			HTTPStatusCode: res.StatusCode,
4175		},
4176	}
4177	target := &ret
4178	if err := gensupport.DecodeResponse(target, res); err != nil {
4179		return nil, err
4180	}
4181	return ret, nil
4182	// {
4183	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.",
4184	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
4185	//   "httpMethod": "POST",
4186	//   "id": "vmmigration.projects.locations.operations.cancel",
4187	//   "parameterOrder": [
4188	//     "name"
4189	//   ],
4190	//   "parameters": {
4191	//     "name": {
4192	//       "description": "The name of the operation resource to be cancelled.",
4193	//       "location": "path",
4194	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
4195	//       "required": true,
4196	//       "type": "string"
4197	//     }
4198	//   },
4199	//   "path": "v1/{+name}:cancel",
4200	//   "request": {
4201	//     "$ref": "CancelOperationRequest"
4202	//   },
4203	//   "response": {
4204	//     "$ref": "Empty"
4205	//   },
4206	//   "scopes": [
4207	//     "https://www.googleapis.com/auth/cloud-platform"
4208	//   ]
4209	// }
4210
4211}
4212
4213// method id "vmmigration.projects.locations.operations.delete":
4214
4215type ProjectsLocationsOperationsDeleteCall struct {
4216	s          *Service
4217	name       string
4218	urlParams_ gensupport.URLParams
4219	ctx_       context.Context
4220	header_    http.Header
4221}
4222
4223// Delete: Deletes a long-running operation. This method indicates that
4224// the client is no longer interested in the operation result. It does
4225// not cancel the operation. If the server doesn't support this method,
4226// it returns `google.rpc.Code.UNIMPLEMENTED`.
4227//
4228// - name: The name of the operation resource to be deleted.
4229func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
4230	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4231	c.name = name
4232	return c
4233}
4234
4235// Fields allows partial responses to be retrieved. See
4236// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4237// for more information.
4238func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
4239	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4240	return c
4241}
4242
4243// Context sets the context to be used in this call's Do method. Any
4244// pending HTTP request will be aborted if the provided context is
4245// canceled.
4246func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
4247	c.ctx_ = ctx
4248	return c
4249}
4250
4251// Header returns an http.Header that can be modified by the caller to
4252// add HTTP headers to the request.
4253func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
4254	if c.header_ == nil {
4255		c.header_ = make(http.Header)
4256	}
4257	return c.header_
4258}
4259
4260func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
4261	reqHeaders := make(http.Header)
4262	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4263	for k, v := range c.header_ {
4264		reqHeaders[k] = v
4265	}
4266	reqHeaders.Set("User-Agent", c.s.userAgent())
4267	var body io.Reader = nil
4268	c.urlParams_.Set("alt", alt)
4269	c.urlParams_.Set("prettyPrint", "false")
4270	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4271	urls += "?" + c.urlParams_.Encode()
4272	req, err := http.NewRequest("DELETE", urls, body)
4273	if err != nil {
4274		return nil, err
4275	}
4276	req.Header = reqHeaders
4277	googleapi.Expand(req.URL, map[string]string{
4278		"name": c.name,
4279	})
4280	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4281}
4282
4283// Do executes the "vmmigration.projects.locations.operations.delete" call.
4284// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4285// code is an error. Response headers are in either
4286// *Empty.ServerResponse.Header or (if a response was returned at all)
4287// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4288// check whether the returned error was because http.StatusNotModified
4289// was returned.
4290func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4291	gensupport.SetOptions(c.urlParams_, opts...)
4292	res, err := c.doRequest("json")
4293	if res != nil && res.StatusCode == http.StatusNotModified {
4294		if res.Body != nil {
4295			res.Body.Close()
4296		}
4297		return nil, &googleapi.Error{
4298			Code:   res.StatusCode,
4299			Header: res.Header,
4300		}
4301	}
4302	if err != nil {
4303		return nil, err
4304	}
4305	defer googleapi.CloseBody(res)
4306	if err := googleapi.CheckResponse(res); err != nil {
4307		return nil, err
4308	}
4309	ret := &Empty{
4310		ServerResponse: googleapi.ServerResponse{
4311			Header:         res.Header,
4312			HTTPStatusCode: res.StatusCode,
4313		},
4314	}
4315	target := &ret
4316	if err := gensupport.DecodeResponse(target, res); err != nil {
4317		return nil, err
4318	}
4319	return ret, nil
4320	// {
4321	//   "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.",
4322	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
4323	//   "httpMethod": "DELETE",
4324	//   "id": "vmmigration.projects.locations.operations.delete",
4325	//   "parameterOrder": [
4326	//     "name"
4327	//   ],
4328	//   "parameters": {
4329	//     "name": {
4330	//       "description": "The name of the operation resource to be deleted.",
4331	//       "location": "path",
4332	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
4333	//       "required": true,
4334	//       "type": "string"
4335	//     }
4336	//   },
4337	//   "path": "v1/{+name}",
4338	//   "response": {
4339	//     "$ref": "Empty"
4340	//   },
4341	//   "scopes": [
4342	//     "https://www.googleapis.com/auth/cloud-platform"
4343	//   ]
4344	// }
4345
4346}
4347
4348// method id "vmmigration.projects.locations.operations.get":
4349
4350type ProjectsLocationsOperationsGetCall struct {
4351	s            *Service
4352	name         string
4353	urlParams_   gensupport.URLParams
4354	ifNoneMatch_ string
4355	ctx_         context.Context
4356	header_      http.Header
4357}
4358
4359// Get: Gets the latest state of a long-running operation. Clients can
4360// use this method to poll the operation result at intervals as
4361// recommended by the API service.
4362//
4363// - name: The name of the operation resource.
4364func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
4365	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4366	c.name = name
4367	return c
4368}
4369
4370// Fields allows partial responses to be retrieved. See
4371// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4372// for more information.
4373func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
4374	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4375	return c
4376}
4377
4378// IfNoneMatch sets the optional parameter which makes the operation
4379// fail if the object's ETag matches the given value. This is useful for
4380// getting updates only after the object has changed since the last
4381// request. Use googleapi.IsNotModified to check whether the response
4382// error from Do is the result of In-None-Match.
4383func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
4384	c.ifNoneMatch_ = entityTag
4385	return c
4386}
4387
4388// Context sets the context to be used in this call's Do method. Any
4389// pending HTTP request will be aborted if the provided context is
4390// canceled.
4391func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
4392	c.ctx_ = ctx
4393	return c
4394}
4395
4396// Header returns an http.Header that can be modified by the caller to
4397// add HTTP headers to the request.
4398func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
4399	if c.header_ == nil {
4400		c.header_ = make(http.Header)
4401	}
4402	return c.header_
4403}
4404
4405func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
4406	reqHeaders := make(http.Header)
4407	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4408	for k, v := range c.header_ {
4409		reqHeaders[k] = v
4410	}
4411	reqHeaders.Set("User-Agent", c.s.userAgent())
4412	if c.ifNoneMatch_ != "" {
4413		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4414	}
4415	var body io.Reader = nil
4416	c.urlParams_.Set("alt", alt)
4417	c.urlParams_.Set("prettyPrint", "false")
4418	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4419	urls += "?" + c.urlParams_.Encode()
4420	req, err := http.NewRequest("GET", urls, body)
4421	if err != nil {
4422		return nil, err
4423	}
4424	req.Header = reqHeaders
4425	googleapi.Expand(req.URL, map[string]string{
4426		"name": c.name,
4427	})
4428	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4429}
4430
4431// Do executes the "vmmigration.projects.locations.operations.get" call.
4432// Exactly one of *Operation or error will be non-nil. Any non-2xx
4433// status code is an error. Response headers are in either
4434// *Operation.ServerResponse.Header or (if a response was returned at
4435// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4436// to check whether the returned error was because
4437// http.StatusNotModified was returned.
4438func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4439	gensupport.SetOptions(c.urlParams_, opts...)
4440	res, err := c.doRequest("json")
4441	if res != nil && res.StatusCode == http.StatusNotModified {
4442		if res.Body != nil {
4443			res.Body.Close()
4444		}
4445		return nil, &googleapi.Error{
4446			Code:   res.StatusCode,
4447			Header: res.Header,
4448		}
4449	}
4450	if err != nil {
4451		return nil, err
4452	}
4453	defer googleapi.CloseBody(res)
4454	if err := googleapi.CheckResponse(res); err != nil {
4455		return nil, err
4456	}
4457	ret := &Operation{
4458		ServerResponse: googleapi.ServerResponse{
4459			Header:         res.Header,
4460			HTTPStatusCode: res.StatusCode,
4461		},
4462	}
4463	target := &ret
4464	if err := gensupport.DecodeResponse(target, res); err != nil {
4465		return nil, err
4466	}
4467	return ret, nil
4468	// {
4469	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
4470	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
4471	//   "httpMethod": "GET",
4472	//   "id": "vmmigration.projects.locations.operations.get",
4473	//   "parameterOrder": [
4474	//     "name"
4475	//   ],
4476	//   "parameters": {
4477	//     "name": {
4478	//       "description": "The name of the operation resource.",
4479	//       "location": "path",
4480	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
4481	//       "required": true,
4482	//       "type": "string"
4483	//     }
4484	//   },
4485	//   "path": "v1/{+name}",
4486	//   "response": {
4487	//     "$ref": "Operation"
4488	//   },
4489	//   "scopes": [
4490	//     "https://www.googleapis.com/auth/cloud-platform"
4491	//   ]
4492	// }
4493
4494}
4495
4496// method id "vmmigration.projects.locations.operations.list":
4497
4498type ProjectsLocationsOperationsListCall struct {
4499	s            *Service
4500	name         string
4501	urlParams_   gensupport.URLParams
4502	ifNoneMatch_ string
4503	ctx_         context.Context
4504	header_      http.Header
4505}
4506
4507// List: Lists operations that match the specified filter in the
4508// request. If the server doesn't support this method, it returns
4509// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
4510// override the binding to use different resource name schemes, such as
4511// `users/*/operations`. To override the binding, API services can add a
4512// binding such as "/v1/{name=users/*}/operations" to their service
4513// configuration. For backwards compatibility, the default name includes
4514// the operations collection id, however overriding users must ensure
4515// the name binding is the parent resource, without the operations
4516// collection id.
4517//
4518// - name: The name of the operation's parent resource.
4519func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
4520	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4521	c.name = name
4522	return c
4523}
4524
4525// Filter sets the optional parameter "filter": The standard list
4526// filter.
4527func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
4528	c.urlParams_.Set("filter", filter)
4529	return c
4530}
4531
4532// PageSize sets the optional parameter "pageSize": The standard list
4533// page size.
4534func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
4535	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4536	return c
4537}
4538
4539// PageToken sets the optional parameter "pageToken": The standard list
4540// page token.
4541func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
4542	c.urlParams_.Set("pageToken", pageToken)
4543	return c
4544}
4545
4546// Fields allows partial responses to be retrieved. See
4547// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4548// for more information.
4549func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
4550	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4551	return c
4552}
4553
4554// IfNoneMatch sets the optional parameter which makes the operation
4555// fail if the object's ETag matches the given value. This is useful for
4556// getting updates only after the object has changed since the last
4557// request. Use googleapi.IsNotModified to check whether the response
4558// error from Do is the result of In-None-Match.
4559func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
4560	c.ifNoneMatch_ = entityTag
4561	return c
4562}
4563
4564// Context sets the context to be used in this call's Do method. Any
4565// pending HTTP request will be aborted if the provided context is
4566// canceled.
4567func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
4568	c.ctx_ = ctx
4569	return c
4570}
4571
4572// Header returns an http.Header that can be modified by the caller to
4573// add HTTP headers to the request.
4574func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
4575	if c.header_ == nil {
4576		c.header_ = make(http.Header)
4577	}
4578	return c.header_
4579}
4580
4581func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
4582	reqHeaders := make(http.Header)
4583	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4584	for k, v := range c.header_ {
4585		reqHeaders[k] = v
4586	}
4587	reqHeaders.Set("User-Agent", c.s.userAgent())
4588	if c.ifNoneMatch_ != "" {
4589		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4590	}
4591	var body io.Reader = nil
4592	c.urlParams_.Set("alt", alt)
4593	c.urlParams_.Set("prettyPrint", "false")
4594	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
4595	urls += "?" + c.urlParams_.Encode()
4596	req, err := http.NewRequest("GET", urls, body)
4597	if err != nil {
4598		return nil, err
4599	}
4600	req.Header = reqHeaders
4601	googleapi.Expand(req.URL, map[string]string{
4602		"name": c.name,
4603	})
4604	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4605}
4606
4607// Do executes the "vmmigration.projects.locations.operations.list" call.
4608// Exactly one of *ListOperationsResponse or error will be non-nil. Any
4609// non-2xx status code is an error. Response headers are in either
4610// *ListOperationsResponse.ServerResponse.Header or (if a response was
4611// returned at all) in error.(*googleapi.Error).Header. Use
4612// googleapi.IsNotModified to check whether the returned error was
4613// because http.StatusNotModified was returned.
4614func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
4615	gensupport.SetOptions(c.urlParams_, opts...)
4616	res, err := c.doRequest("json")
4617	if res != nil && res.StatusCode == http.StatusNotModified {
4618		if res.Body != nil {
4619			res.Body.Close()
4620		}
4621		return nil, &googleapi.Error{
4622			Code:   res.StatusCode,
4623			Header: res.Header,
4624		}
4625	}
4626	if err != nil {
4627		return nil, err
4628	}
4629	defer googleapi.CloseBody(res)
4630	if err := googleapi.CheckResponse(res); err != nil {
4631		return nil, err
4632	}
4633	ret := &ListOperationsResponse{
4634		ServerResponse: googleapi.ServerResponse{
4635			Header:         res.Header,
4636			HTTPStatusCode: res.StatusCode,
4637		},
4638	}
4639	target := &ret
4640	if err := gensupport.DecodeResponse(target, res); err != nil {
4641		return nil, err
4642	}
4643	return ret, nil
4644	// {
4645	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
4646	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations",
4647	//   "httpMethod": "GET",
4648	//   "id": "vmmigration.projects.locations.operations.list",
4649	//   "parameterOrder": [
4650	//     "name"
4651	//   ],
4652	//   "parameters": {
4653	//     "filter": {
4654	//       "description": "The standard list filter.",
4655	//       "location": "query",
4656	//       "type": "string"
4657	//     },
4658	//     "name": {
4659	//       "description": "The name of the operation's parent resource.",
4660	//       "location": "path",
4661	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4662	//       "required": true,
4663	//       "type": "string"
4664	//     },
4665	//     "pageSize": {
4666	//       "description": "The standard list page size.",
4667	//       "format": "int32",
4668	//       "location": "query",
4669	//       "type": "integer"
4670	//     },
4671	//     "pageToken": {
4672	//       "description": "The standard list page token.",
4673	//       "location": "query",
4674	//       "type": "string"
4675	//     }
4676	//   },
4677	//   "path": "v1/{+name}/operations",
4678	//   "response": {
4679	//     "$ref": "ListOperationsResponse"
4680	//   },
4681	//   "scopes": [
4682	//     "https://www.googleapis.com/auth/cloud-platform"
4683	//   ]
4684	// }
4685
4686}
4687
4688// Pages invokes f for each page of results.
4689// A non-nil error returned from f will halt the iteration.
4690// The provided context supersedes any context provided to the Context method.
4691func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
4692	c.ctx_ = ctx
4693	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4694	for {
4695		x, err := c.Do()
4696		if err != nil {
4697			return err
4698		}
4699		if err := f(x); err != nil {
4700			return err
4701		}
4702		if x.NextPageToken == "" {
4703			return nil
4704		}
4705		c.PageToken(x.NextPageToken)
4706	}
4707}
4708
4709// method id "vmmigration.projects.locations.sources.create":
4710
4711type ProjectsLocationsSourcesCreateCall struct {
4712	s          *Service
4713	parent     string
4714	source     *Source
4715	urlParams_ gensupport.URLParams
4716	ctx_       context.Context
4717	header_    http.Header
4718}
4719
4720// Create: Creates a new Source in a given project and location.
4721//
4722// - parent: The Source's parent.
4723func (r *ProjectsLocationsSourcesService) Create(parent string, source *Source) *ProjectsLocationsSourcesCreateCall {
4724	c := &ProjectsLocationsSourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4725	c.parent = parent
4726	c.source = source
4727	return c
4728}
4729
4730// RequestId sets the optional parameter "requestId": A request ID to
4731// identify requests. Specify a unique request ID so that if you must
4732// retry your request, the server will know to ignore the request if it
4733// has already been completed. The server will guarantee that for at
4734// least 60 minutes since the first request. For example, consider a
4735// situation where you make an initial request and t he request times
4736// out. If you make the request again with the same request ID, the
4737// server can check if original operation with the same request ID was
4738// received, and if so, will ignore the second request. This prevents
4739// clients from accidentally creating duplicate commitments. The request
4740// ID must be a valid UUID with the exception that zero UUID is not
4741// supported (00000000-0000-0000-0000-000000000000).
4742func (c *ProjectsLocationsSourcesCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesCreateCall {
4743	c.urlParams_.Set("requestId", requestId)
4744	return c
4745}
4746
4747// SourceId sets the optional parameter "sourceId": Required. The source
4748// identifier.
4749func (c *ProjectsLocationsSourcesCreateCall) SourceId(sourceId string) *ProjectsLocationsSourcesCreateCall {
4750	c.urlParams_.Set("sourceId", sourceId)
4751	return c
4752}
4753
4754// Fields allows partial responses to be retrieved. See
4755// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4756// for more information.
4757func (c *ProjectsLocationsSourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesCreateCall {
4758	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4759	return c
4760}
4761
4762// Context sets the context to be used in this call's Do method. Any
4763// pending HTTP request will be aborted if the provided context is
4764// canceled.
4765func (c *ProjectsLocationsSourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesCreateCall {
4766	c.ctx_ = ctx
4767	return c
4768}
4769
4770// Header returns an http.Header that can be modified by the caller to
4771// add HTTP headers to the request.
4772func (c *ProjectsLocationsSourcesCreateCall) Header() http.Header {
4773	if c.header_ == nil {
4774		c.header_ = make(http.Header)
4775	}
4776	return c.header_
4777}
4778
4779func (c *ProjectsLocationsSourcesCreateCall) doRequest(alt string) (*http.Response, error) {
4780	reqHeaders := make(http.Header)
4781	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4782	for k, v := range c.header_ {
4783		reqHeaders[k] = v
4784	}
4785	reqHeaders.Set("User-Agent", c.s.userAgent())
4786	var body io.Reader = nil
4787	body, err := googleapi.WithoutDataWrapper.JSONReader(c.source)
4788	if err != nil {
4789		return nil, err
4790	}
4791	reqHeaders.Set("Content-Type", "application/json")
4792	c.urlParams_.Set("alt", alt)
4793	c.urlParams_.Set("prettyPrint", "false")
4794	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sources")
4795	urls += "?" + c.urlParams_.Encode()
4796	req, err := http.NewRequest("POST", urls, body)
4797	if err != nil {
4798		return nil, err
4799	}
4800	req.Header = reqHeaders
4801	googleapi.Expand(req.URL, map[string]string{
4802		"parent": c.parent,
4803	})
4804	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4805}
4806
4807// Do executes the "vmmigration.projects.locations.sources.create" call.
4808// Exactly one of *Operation or error will be non-nil. Any non-2xx
4809// status code is an error. Response headers are in either
4810// *Operation.ServerResponse.Header or (if a response was returned at
4811// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4812// to check whether the returned error was because
4813// http.StatusNotModified was returned.
4814func (c *ProjectsLocationsSourcesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4815	gensupport.SetOptions(c.urlParams_, opts...)
4816	res, err := c.doRequest("json")
4817	if res != nil && res.StatusCode == http.StatusNotModified {
4818		if res.Body != nil {
4819			res.Body.Close()
4820		}
4821		return nil, &googleapi.Error{
4822			Code:   res.StatusCode,
4823			Header: res.Header,
4824		}
4825	}
4826	if err != nil {
4827		return nil, err
4828	}
4829	defer googleapi.CloseBody(res)
4830	if err := googleapi.CheckResponse(res); err != nil {
4831		return nil, err
4832	}
4833	ret := &Operation{
4834		ServerResponse: googleapi.ServerResponse{
4835			Header:         res.Header,
4836			HTTPStatusCode: res.StatusCode,
4837		},
4838	}
4839	target := &ret
4840	if err := gensupport.DecodeResponse(target, res); err != nil {
4841		return nil, err
4842	}
4843	return ret, nil
4844	// {
4845	//   "description": "Creates a new Source in a given project and location.",
4846	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources",
4847	//   "httpMethod": "POST",
4848	//   "id": "vmmigration.projects.locations.sources.create",
4849	//   "parameterOrder": [
4850	//     "parent"
4851	//   ],
4852	//   "parameters": {
4853	//     "parent": {
4854	//       "description": "Required. The Source's parent.",
4855	//       "location": "path",
4856	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4857	//       "required": true,
4858	//       "type": "string"
4859	//     },
4860	//     "requestId": {
4861	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
4862	//       "location": "query",
4863	//       "type": "string"
4864	//     },
4865	//     "sourceId": {
4866	//       "description": "Required. The source identifier.",
4867	//       "location": "query",
4868	//       "type": "string"
4869	//     }
4870	//   },
4871	//   "path": "v1/{+parent}/sources",
4872	//   "request": {
4873	//     "$ref": "Source"
4874	//   },
4875	//   "response": {
4876	//     "$ref": "Operation"
4877	//   },
4878	//   "scopes": [
4879	//     "https://www.googleapis.com/auth/cloud-platform"
4880	//   ]
4881	// }
4882
4883}
4884
4885// method id "vmmigration.projects.locations.sources.delete":
4886
4887type ProjectsLocationsSourcesDeleteCall struct {
4888	s          *Service
4889	name       string
4890	urlParams_ gensupport.URLParams
4891	ctx_       context.Context
4892	header_    http.Header
4893}
4894
4895// Delete: Deletes a single Source.
4896//
4897// - name: The Source name.
4898func (r *ProjectsLocationsSourcesService) Delete(name string) *ProjectsLocationsSourcesDeleteCall {
4899	c := &ProjectsLocationsSourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4900	c.name = name
4901	return c
4902}
4903
4904// RequestId sets the optional parameter "requestId": A request ID to
4905// identify requests. Specify a unique request ID so that if you must
4906// retry your request, the server will know to ignore the request if it
4907// has already been completed. The server will guarantee that for at
4908// least 60 minutes after the first request. For example, consider a
4909// situation where you make an initial request and t he request times
4910// out. If you make the request again with the same request ID, the
4911// server can check if original operation with the same request ID was
4912// received, and if so, will ignore the second request. This prevents
4913// clients from accidentally creating duplicate commitments. The request
4914// ID must be a valid UUID with the exception that zero UUID is not
4915// supported (00000000-0000-0000-0000-000000000000).
4916func (c *ProjectsLocationsSourcesDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesDeleteCall {
4917	c.urlParams_.Set("requestId", requestId)
4918	return c
4919}
4920
4921// Fields allows partial responses to be retrieved. See
4922// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4923// for more information.
4924func (c *ProjectsLocationsSourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDeleteCall {
4925	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4926	return c
4927}
4928
4929// Context sets the context to be used in this call's Do method. Any
4930// pending HTTP request will be aborted if the provided context is
4931// canceled.
4932func (c *ProjectsLocationsSourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesDeleteCall {
4933	c.ctx_ = ctx
4934	return c
4935}
4936
4937// Header returns an http.Header that can be modified by the caller to
4938// add HTTP headers to the request.
4939func (c *ProjectsLocationsSourcesDeleteCall) Header() http.Header {
4940	if c.header_ == nil {
4941		c.header_ = make(http.Header)
4942	}
4943	return c.header_
4944}
4945
4946func (c *ProjectsLocationsSourcesDeleteCall) doRequest(alt string) (*http.Response, error) {
4947	reqHeaders := make(http.Header)
4948	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4949	for k, v := range c.header_ {
4950		reqHeaders[k] = v
4951	}
4952	reqHeaders.Set("User-Agent", c.s.userAgent())
4953	var body io.Reader = nil
4954	c.urlParams_.Set("alt", alt)
4955	c.urlParams_.Set("prettyPrint", "false")
4956	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4957	urls += "?" + c.urlParams_.Encode()
4958	req, err := http.NewRequest("DELETE", urls, body)
4959	if err != nil {
4960		return nil, err
4961	}
4962	req.Header = reqHeaders
4963	googleapi.Expand(req.URL, map[string]string{
4964		"name": c.name,
4965	})
4966	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4967}
4968
4969// Do executes the "vmmigration.projects.locations.sources.delete" call.
4970// Exactly one of *Operation or error will be non-nil. Any non-2xx
4971// status code is an error. Response headers are in either
4972// *Operation.ServerResponse.Header or (if a response was returned at
4973// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4974// to check whether the returned error was because
4975// http.StatusNotModified was returned.
4976func (c *ProjectsLocationsSourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4977	gensupport.SetOptions(c.urlParams_, opts...)
4978	res, err := c.doRequest("json")
4979	if res != nil && res.StatusCode == http.StatusNotModified {
4980		if res.Body != nil {
4981			res.Body.Close()
4982		}
4983		return nil, &googleapi.Error{
4984			Code:   res.StatusCode,
4985			Header: res.Header,
4986		}
4987	}
4988	if err != nil {
4989		return nil, err
4990	}
4991	defer googleapi.CloseBody(res)
4992	if err := googleapi.CheckResponse(res); err != nil {
4993		return nil, err
4994	}
4995	ret := &Operation{
4996		ServerResponse: googleapi.ServerResponse{
4997			Header:         res.Header,
4998			HTTPStatusCode: res.StatusCode,
4999		},
5000	}
5001	target := &ret
5002	if err := gensupport.DecodeResponse(target, res); err != nil {
5003		return nil, err
5004	}
5005	return ret, nil
5006	// {
5007	//   "description": "Deletes a single Source.",
5008	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}",
5009	//   "httpMethod": "DELETE",
5010	//   "id": "vmmigration.projects.locations.sources.delete",
5011	//   "parameterOrder": [
5012	//     "name"
5013	//   ],
5014	//   "parameters": {
5015	//     "name": {
5016	//       "description": "Required. The Source name.",
5017	//       "location": "path",
5018	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
5019	//       "required": true,
5020	//       "type": "string"
5021	//     },
5022	//     "requestId": {
5023	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
5024	//       "location": "query",
5025	//       "type": "string"
5026	//     }
5027	//   },
5028	//   "path": "v1/{+name}",
5029	//   "response": {
5030	//     "$ref": "Operation"
5031	//   },
5032	//   "scopes": [
5033	//     "https://www.googleapis.com/auth/cloud-platform"
5034	//   ]
5035	// }
5036
5037}
5038
5039// method id "vmmigration.projects.locations.sources.fetchInventory":
5040
5041type ProjectsLocationsSourcesFetchInventoryCall struct {
5042	s            *Service
5043	source       string
5044	urlParams_   gensupport.URLParams
5045	ifNoneMatch_ string
5046	ctx_         context.Context
5047	header_      http.Header
5048}
5049
5050// FetchInventory: List remote source's inventory of VMs. The remote
5051// source is the onprem vCenter (remote in the sense it's not in Compute
5052// Engine). The inventory describes the list of existing VMs in that
5053// source. Note that this operation lists the VMs on the remote source,
5054// as opposed to listing the MigratingVms resources in the vmmigration
5055// service.
5056//
5057// - source: The name of the Source.
5058func (r *ProjectsLocationsSourcesService) FetchInventory(source string) *ProjectsLocationsSourcesFetchInventoryCall {
5059	c := &ProjectsLocationsSourcesFetchInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5060	c.source = source
5061	return c
5062}
5063
5064// ForceRefresh sets the optional parameter "forceRefresh": If this flag
5065// is set to true, the source will be queried instead of using cached
5066// results. Using this flag will make the call slower.
5067func (c *ProjectsLocationsSourcesFetchInventoryCall) ForceRefresh(forceRefresh bool) *ProjectsLocationsSourcesFetchInventoryCall {
5068	c.urlParams_.Set("forceRefresh", fmt.Sprint(forceRefresh))
5069	return c
5070}
5071
5072// Fields allows partial responses to be retrieved. See
5073// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5074// for more information.
5075func (c *ProjectsLocationsSourcesFetchInventoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesFetchInventoryCall {
5076	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5077	return c
5078}
5079
5080// IfNoneMatch sets the optional parameter which makes the operation
5081// fail if the object's ETag matches the given value. This is useful for
5082// getting updates only after the object has changed since the last
5083// request. Use googleapi.IsNotModified to check whether the response
5084// error from Do is the result of In-None-Match.
5085func (c *ProjectsLocationsSourcesFetchInventoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesFetchInventoryCall {
5086	c.ifNoneMatch_ = entityTag
5087	return c
5088}
5089
5090// Context sets the context to be used in this call's Do method. Any
5091// pending HTTP request will be aborted if the provided context is
5092// canceled.
5093func (c *ProjectsLocationsSourcesFetchInventoryCall) Context(ctx context.Context) *ProjectsLocationsSourcesFetchInventoryCall {
5094	c.ctx_ = ctx
5095	return c
5096}
5097
5098// Header returns an http.Header that can be modified by the caller to
5099// add HTTP headers to the request.
5100func (c *ProjectsLocationsSourcesFetchInventoryCall) Header() http.Header {
5101	if c.header_ == nil {
5102		c.header_ = make(http.Header)
5103	}
5104	return c.header_
5105}
5106
5107func (c *ProjectsLocationsSourcesFetchInventoryCall) doRequest(alt string) (*http.Response, error) {
5108	reqHeaders := make(http.Header)
5109	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5110	for k, v := range c.header_ {
5111		reqHeaders[k] = v
5112	}
5113	reqHeaders.Set("User-Agent", c.s.userAgent())
5114	if c.ifNoneMatch_ != "" {
5115		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5116	}
5117	var body io.Reader = nil
5118	c.urlParams_.Set("alt", alt)
5119	c.urlParams_.Set("prettyPrint", "false")
5120	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+source}:fetchInventory")
5121	urls += "?" + c.urlParams_.Encode()
5122	req, err := http.NewRequest("GET", urls, body)
5123	if err != nil {
5124		return nil, err
5125	}
5126	req.Header = reqHeaders
5127	googleapi.Expand(req.URL, map[string]string{
5128		"source": c.source,
5129	})
5130	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5131}
5132
5133// Do executes the "vmmigration.projects.locations.sources.fetchInventory" call.
5134// Exactly one of *FetchInventoryResponse or error will be non-nil. Any
5135// non-2xx status code is an error. Response headers are in either
5136// *FetchInventoryResponse.ServerResponse.Header or (if a response was
5137// returned at all) in error.(*googleapi.Error).Header. Use
5138// googleapi.IsNotModified to check whether the returned error was
5139// because http.StatusNotModified was returned.
5140func (c *ProjectsLocationsSourcesFetchInventoryCall) Do(opts ...googleapi.CallOption) (*FetchInventoryResponse, error) {
5141	gensupport.SetOptions(c.urlParams_, opts...)
5142	res, err := c.doRequest("json")
5143	if res != nil && res.StatusCode == http.StatusNotModified {
5144		if res.Body != nil {
5145			res.Body.Close()
5146		}
5147		return nil, &googleapi.Error{
5148			Code:   res.StatusCode,
5149			Header: res.Header,
5150		}
5151	}
5152	if err != nil {
5153		return nil, err
5154	}
5155	defer googleapi.CloseBody(res)
5156	if err := googleapi.CheckResponse(res); err != nil {
5157		return nil, err
5158	}
5159	ret := &FetchInventoryResponse{
5160		ServerResponse: googleapi.ServerResponse{
5161			Header:         res.Header,
5162			HTTPStatusCode: res.StatusCode,
5163		},
5164	}
5165	target := &ret
5166	if err := gensupport.DecodeResponse(target, res); err != nil {
5167		return nil, err
5168	}
5169	return ret, nil
5170	// {
5171	//   "description": "List remote source's inventory of VMs. The remote source is the onprem vCenter (remote in the sense it's not in Compute Engine). The inventory describes the list of existing VMs in that source. Note that this operation lists the VMs on the remote source, as opposed to listing the MigratingVms resources in the vmmigration service.",
5172	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}:fetchInventory",
5173	//   "httpMethod": "GET",
5174	//   "id": "vmmigration.projects.locations.sources.fetchInventory",
5175	//   "parameterOrder": [
5176	//     "source"
5177	//   ],
5178	//   "parameters": {
5179	//     "forceRefresh": {
5180	//       "description": "If this flag is set to true, the source will be queried instead of using cached results. Using this flag will make the call slower.",
5181	//       "location": "query",
5182	//       "type": "boolean"
5183	//     },
5184	//     "source": {
5185	//       "description": "Required. The name of the Source.",
5186	//       "location": "path",
5187	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
5188	//       "required": true,
5189	//       "type": "string"
5190	//     }
5191	//   },
5192	//   "path": "v1/{+source}:fetchInventory",
5193	//   "response": {
5194	//     "$ref": "FetchInventoryResponse"
5195	//   },
5196	//   "scopes": [
5197	//     "https://www.googleapis.com/auth/cloud-platform"
5198	//   ]
5199	// }
5200
5201}
5202
5203// method id "vmmigration.projects.locations.sources.get":
5204
5205type ProjectsLocationsSourcesGetCall struct {
5206	s            *Service
5207	name         string
5208	urlParams_   gensupport.URLParams
5209	ifNoneMatch_ string
5210	ctx_         context.Context
5211	header_      http.Header
5212}
5213
5214// Get: Gets details of a single Source.
5215//
5216// - name: The Source name.
5217func (r *ProjectsLocationsSourcesService) Get(name string) *ProjectsLocationsSourcesGetCall {
5218	c := &ProjectsLocationsSourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5219	c.name = name
5220	return c
5221}
5222
5223// Fields allows partial responses to be retrieved. See
5224// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5225// for more information.
5226func (c *ProjectsLocationsSourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesGetCall {
5227	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5228	return c
5229}
5230
5231// IfNoneMatch sets the optional parameter which makes the operation
5232// fail if the object's ETag matches the given value. This is useful for
5233// getting updates only after the object has changed since the last
5234// request. Use googleapi.IsNotModified to check whether the response
5235// error from Do is the result of In-None-Match.
5236func (c *ProjectsLocationsSourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesGetCall {
5237	c.ifNoneMatch_ = entityTag
5238	return c
5239}
5240
5241// Context sets the context to be used in this call's Do method. Any
5242// pending HTTP request will be aborted if the provided context is
5243// canceled.
5244func (c *ProjectsLocationsSourcesGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesGetCall {
5245	c.ctx_ = ctx
5246	return c
5247}
5248
5249// Header returns an http.Header that can be modified by the caller to
5250// add HTTP headers to the request.
5251func (c *ProjectsLocationsSourcesGetCall) Header() http.Header {
5252	if c.header_ == nil {
5253		c.header_ = make(http.Header)
5254	}
5255	return c.header_
5256}
5257
5258func (c *ProjectsLocationsSourcesGetCall) doRequest(alt string) (*http.Response, error) {
5259	reqHeaders := make(http.Header)
5260	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5261	for k, v := range c.header_ {
5262		reqHeaders[k] = v
5263	}
5264	reqHeaders.Set("User-Agent", c.s.userAgent())
5265	if c.ifNoneMatch_ != "" {
5266		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5267	}
5268	var body io.Reader = nil
5269	c.urlParams_.Set("alt", alt)
5270	c.urlParams_.Set("prettyPrint", "false")
5271	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5272	urls += "?" + c.urlParams_.Encode()
5273	req, err := http.NewRequest("GET", urls, body)
5274	if err != nil {
5275		return nil, err
5276	}
5277	req.Header = reqHeaders
5278	googleapi.Expand(req.URL, map[string]string{
5279		"name": c.name,
5280	})
5281	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5282}
5283
5284// Do executes the "vmmigration.projects.locations.sources.get" call.
5285// Exactly one of *Source or error will be non-nil. Any non-2xx status
5286// code is an error. Response headers are in either
5287// *Source.ServerResponse.Header or (if a response was returned at all)
5288// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5289// check whether the returned error was because http.StatusNotModified
5290// was returned.
5291func (c *ProjectsLocationsSourcesGetCall) Do(opts ...googleapi.CallOption) (*Source, error) {
5292	gensupport.SetOptions(c.urlParams_, opts...)
5293	res, err := c.doRequest("json")
5294	if res != nil && res.StatusCode == http.StatusNotModified {
5295		if res.Body != nil {
5296			res.Body.Close()
5297		}
5298		return nil, &googleapi.Error{
5299			Code:   res.StatusCode,
5300			Header: res.Header,
5301		}
5302	}
5303	if err != nil {
5304		return nil, err
5305	}
5306	defer googleapi.CloseBody(res)
5307	if err := googleapi.CheckResponse(res); err != nil {
5308		return nil, err
5309	}
5310	ret := &Source{
5311		ServerResponse: googleapi.ServerResponse{
5312			Header:         res.Header,
5313			HTTPStatusCode: res.StatusCode,
5314		},
5315	}
5316	target := &ret
5317	if err := gensupport.DecodeResponse(target, res); err != nil {
5318		return nil, err
5319	}
5320	return ret, nil
5321	// {
5322	//   "description": "Gets details of a single Source.",
5323	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}",
5324	//   "httpMethod": "GET",
5325	//   "id": "vmmigration.projects.locations.sources.get",
5326	//   "parameterOrder": [
5327	//     "name"
5328	//   ],
5329	//   "parameters": {
5330	//     "name": {
5331	//       "description": "Required. The Source name.",
5332	//       "location": "path",
5333	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
5334	//       "required": true,
5335	//       "type": "string"
5336	//     }
5337	//   },
5338	//   "path": "v1/{+name}",
5339	//   "response": {
5340	//     "$ref": "Source"
5341	//   },
5342	//   "scopes": [
5343	//     "https://www.googleapis.com/auth/cloud-platform"
5344	//   ]
5345	// }
5346
5347}
5348
5349// method id "vmmigration.projects.locations.sources.list":
5350
5351type ProjectsLocationsSourcesListCall struct {
5352	s            *Service
5353	parent       string
5354	urlParams_   gensupport.URLParams
5355	ifNoneMatch_ string
5356	ctx_         context.Context
5357	header_      http.Header
5358}
5359
5360// List: Lists Sources in a given project and location.
5361//
5362// - parent: The parent, which owns this collection of sources.
5363func (r *ProjectsLocationsSourcesService) List(parent string) *ProjectsLocationsSourcesListCall {
5364	c := &ProjectsLocationsSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5365	c.parent = parent
5366	return c
5367}
5368
5369// Filter sets the optional parameter "filter": The filter request.
5370func (c *ProjectsLocationsSourcesListCall) Filter(filter string) *ProjectsLocationsSourcesListCall {
5371	c.urlParams_.Set("filter", filter)
5372	return c
5373}
5374
5375// OrderBy sets the optional parameter "orderBy": the order by fields
5376// for the result.
5377func (c *ProjectsLocationsSourcesListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesListCall {
5378	c.urlParams_.Set("orderBy", orderBy)
5379	return c
5380}
5381
5382// PageSize sets the optional parameter "pageSize": The maximum number
5383// of sources to return. The service may return fewer than this value.
5384// If unspecified, at most 500 sources will be returned. The maximum
5385// value is 1000; values above 1000 will be coerced to 1000.
5386func (c *ProjectsLocationsSourcesListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesListCall {
5387	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5388	return c
5389}
5390
5391// PageToken sets the optional parameter "pageToken": Required. A page
5392// token, received from a previous `ListSources` call. Provide this to
5393// retrieve the subsequent page. When paginating, all other parameters
5394// provided to `ListSources` must match the call that provided the page
5395// token.
5396func (c *ProjectsLocationsSourcesListCall) PageToken(pageToken string) *ProjectsLocationsSourcesListCall {
5397	c.urlParams_.Set("pageToken", pageToken)
5398	return c
5399}
5400
5401// Fields allows partial responses to be retrieved. See
5402// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5403// for more information.
5404func (c *ProjectsLocationsSourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesListCall {
5405	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5406	return c
5407}
5408
5409// IfNoneMatch sets the optional parameter which makes the operation
5410// fail if the object's ETag matches the given value. This is useful for
5411// getting updates only after the object has changed since the last
5412// request. Use googleapi.IsNotModified to check whether the response
5413// error from Do is the result of In-None-Match.
5414func (c *ProjectsLocationsSourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesListCall {
5415	c.ifNoneMatch_ = entityTag
5416	return c
5417}
5418
5419// Context sets the context to be used in this call's Do method. Any
5420// pending HTTP request will be aborted if the provided context is
5421// canceled.
5422func (c *ProjectsLocationsSourcesListCall) Context(ctx context.Context) *ProjectsLocationsSourcesListCall {
5423	c.ctx_ = ctx
5424	return c
5425}
5426
5427// Header returns an http.Header that can be modified by the caller to
5428// add HTTP headers to the request.
5429func (c *ProjectsLocationsSourcesListCall) Header() http.Header {
5430	if c.header_ == nil {
5431		c.header_ = make(http.Header)
5432	}
5433	return c.header_
5434}
5435
5436func (c *ProjectsLocationsSourcesListCall) doRequest(alt string) (*http.Response, error) {
5437	reqHeaders := make(http.Header)
5438	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5439	for k, v := range c.header_ {
5440		reqHeaders[k] = v
5441	}
5442	reqHeaders.Set("User-Agent", c.s.userAgent())
5443	if c.ifNoneMatch_ != "" {
5444		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5445	}
5446	var body io.Reader = nil
5447	c.urlParams_.Set("alt", alt)
5448	c.urlParams_.Set("prettyPrint", "false")
5449	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sources")
5450	urls += "?" + c.urlParams_.Encode()
5451	req, err := http.NewRequest("GET", urls, body)
5452	if err != nil {
5453		return nil, err
5454	}
5455	req.Header = reqHeaders
5456	googleapi.Expand(req.URL, map[string]string{
5457		"parent": c.parent,
5458	})
5459	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5460}
5461
5462// Do executes the "vmmigration.projects.locations.sources.list" call.
5463// Exactly one of *ListSourcesResponse or error will be non-nil. Any
5464// non-2xx status code is an error. Response headers are in either
5465// *ListSourcesResponse.ServerResponse.Header or (if a response was
5466// returned at all) in error.(*googleapi.Error).Header. Use
5467// googleapi.IsNotModified to check whether the returned error was
5468// because http.StatusNotModified was returned.
5469func (c *ProjectsLocationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesResponse, error) {
5470	gensupport.SetOptions(c.urlParams_, opts...)
5471	res, err := c.doRequest("json")
5472	if res != nil && res.StatusCode == http.StatusNotModified {
5473		if res.Body != nil {
5474			res.Body.Close()
5475		}
5476		return nil, &googleapi.Error{
5477			Code:   res.StatusCode,
5478			Header: res.Header,
5479		}
5480	}
5481	if err != nil {
5482		return nil, err
5483	}
5484	defer googleapi.CloseBody(res)
5485	if err := googleapi.CheckResponse(res); err != nil {
5486		return nil, err
5487	}
5488	ret := &ListSourcesResponse{
5489		ServerResponse: googleapi.ServerResponse{
5490			Header:         res.Header,
5491			HTTPStatusCode: res.StatusCode,
5492		},
5493	}
5494	target := &ret
5495	if err := gensupport.DecodeResponse(target, res); err != nil {
5496		return nil, err
5497	}
5498	return ret, nil
5499	// {
5500	//   "description": "Lists Sources in a given project and location.",
5501	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources",
5502	//   "httpMethod": "GET",
5503	//   "id": "vmmigration.projects.locations.sources.list",
5504	//   "parameterOrder": [
5505	//     "parent"
5506	//   ],
5507	//   "parameters": {
5508	//     "filter": {
5509	//       "description": "Optional. The filter request.",
5510	//       "location": "query",
5511	//       "type": "string"
5512	//     },
5513	//     "orderBy": {
5514	//       "description": "Optional. the order by fields for the result.",
5515	//       "location": "query",
5516	//       "type": "string"
5517	//     },
5518	//     "pageSize": {
5519	//       "description": "Optional. The maximum number of sources to return. The service may return fewer than this value. If unspecified, at most 500 sources will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
5520	//       "format": "int32",
5521	//       "location": "query",
5522	//       "type": "integer"
5523	//     },
5524	//     "pageToken": {
5525	//       "description": "Required. A page token, received from a previous `ListSources` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSources` must match the call that provided the page token.",
5526	//       "location": "query",
5527	//       "type": "string"
5528	//     },
5529	//     "parent": {
5530	//       "description": "Required. The parent, which owns this collection of sources.",
5531	//       "location": "path",
5532	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
5533	//       "required": true,
5534	//       "type": "string"
5535	//     }
5536	//   },
5537	//   "path": "v1/{+parent}/sources",
5538	//   "response": {
5539	//     "$ref": "ListSourcesResponse"
5540	//   },
5541	//   "scopes": [
5542	//     "https://www.googleapis.com/auth/cloud-platform"
5543	//   ]
5544	// }
5545
5546}
5547
5548// Pages invokes f for each page of results.
5549// A non-nil error returned from f will halt the iteration.
5550// The provided context supersedes any context provided to the Context method.
5551func (c *ProjectsLocationsSourcesListCall) Pages(ctx context.Context, f func(*ListSourcesResponse) error) error {
5552	c.ctx_ = ctx
5553	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5554	for {
5555		x, err := c.Do()
5556		if err != nil {
5557			return err
5558		}
5559		if err := f(x); err != nil {
5560			return err
5561		}
5562		if x.NextPageToken == "" {
5563			return nil
5564		}
5565		c.PageToken(x.NextPageToken)
5566	}
5567}
5568
5569// method id "vmmigration.projects.locations.sources.patch":
5570
5571type ProjectsLocationsSourcesPatchCall struct {
5572	s          *Service
5573	name       string
5574	source     *Source
5575	urlParams_ gensupport.URLParams
5576	ctx_       context.Context
5577	header_    http.Header
5578}
5579
5580// Patch: Updates the parameters of a single Source.
5581//
5582// - name: Output only. The Source name.
5583func (r *ProjectsLocationsSourcesService) Patch(name string, source *Source) *ProjectsLocationsSourcesPatchCall {
5584	c := &ProjectsLocationsSourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5585	c.name = name
5586	c.source = source
5587	return c
5588}
5589
5590// RequestId sets the optional parameter "requestId": A request ID to
5591// identify requests. Specify a unique request ID so that if you must
5592// retry your request, the server will know to ignore the request if it
5593// has already been completed. The server will guarantee that for at
5594// least 60 minutes since the first request. For example, consider a
5595// situation where you make an initial request and t he request times
5596// out. If you make the request again with the same request ID, the
5597// server can check if original operation with the same request ID was
5598// received, and if so, will ignore the second request. This prevents
5599// clients from accidentally creating duplicate commitments. The request
5600// ID must be a valid UUID with the exception that zero UUID is not
5601// supported (00000000-0000-0000-0000-000000000000).
5602func (c *ProjectsLocationsSourcesPatchCall) RequestId(requestId string) *ProjectsLocationsSourcesPatchCall {
5603	c.urlParams_.Set("requestId", requestId)
5604	return c
5605}
5606
5607// UpdateMask sets the optional parameter "updateMask": Field mask is
5608// used to specify the fields to be overwritten in the Source resource
5609// by the update. The fields specified in the update_mask are relative
5610// to the resource, not the full request. A field will be overwritten if
5611// it is in the mask. If the user does not provide a mask then all
5612// fields will be overwritten.
5613func (c *ProjectsLocationsSourcesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSourcesPatchCall {
5614	c.urlParams_.Set("updateMask", updateMask)
5615	return c
5616}
5617
5618// Fields allows partial responses to be retrieved. See
5619// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5620// for more information.
5621func (c *ProjectsLocationsSourcesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesPatchCall {
5622	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5623	return c
5624}
5625
5626// Context sets the context to be used in this call's Do method. Any
5627// pending HTTP request will be aborted if the provided context is
5628// canceled.
5629func (c *ProjectsLocationsSourcesPatchCall) Context(ctx context.Context) *ProjectsLocationsSourcesPatchCall {
5630	c.ctx_ = ctx
5631	return c
5632}
5633
5634// Header returns an http.Header that can be modified by the caller to
5635// add HTTP headers to the request.
5636func (c *ProjectsLocationsSourcesPatchCall) Header() http.Header {
5637	if c.header_ == nil {
5638		c.header_ = make(http.Header)
5639	}
5640	return c.header_
5641}
5642
5643func (c *ProjectsLocationsSourcesPatchCall) doRequest(alt string) (*http.Response, error) {
5644	reqHeaders := make(http.Header)
5645	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5646	for k, v := range c.header_ {
5647		reqHeaders[k] = v
5648	}
5649	reqHeaders.Set("User-Agent", c.s.userAgent())
5650	var body io.Reader = nil
5651	body, err := googleapi.WithoutDataWrapper.JSONReader(c.source)
5652	if err != nil {
5653		return nil, err
5654	}
5655	reqHeaders.Set("Content-Type", "application/json")
5656	c.urlParams_.Set("alt", alt)
5657	c.urlParams_.Set("prettyPrint", "false")
5658	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5659	urls += "?" + c.urlParams_.Encode()
5660	req, err := http.NewRequest("PATCH", urls, body)
5661	if err != nil {
5662		return nil, err
5663	}
5664	req.Header = reqHeaders
5665	googleapi.Expand(req.URL, map[string]string{
5666		"name": c.name,
5667	})
5668	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5669}
5670
5671// Do executes the "vmmigration.projects.locations.sources.patch" call.
5672// Exactly one of *Operation or error will be non-nil. Any non-2xx
5673// status code is an error. Response headers are in either
5674// *Operation.ServerResponse.Header or (if a response was returned at
5675// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5676// to check whether the returned error was because
5677// http.StatusNotModified was returned.
5678func (c *ProjectsLocationsSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5679	gensupport.SetOptions(c.urlParams_, opts...)
5680	res, err := c.doRequest("json")
5681	if res != nil && res.StatusCode == http.StatusNotModified {
5682		if res.Body != nil {
5683			res.Body.Close()
5684		}
5685		return nil, &googleapi.Error{
5686			Code:   res.StatusCode,
5687			Header: res.Header,
5688		}
5689	}
5690	if err != nil {
5691		return nil, err
5692	}
5693	defer googleapi.CloseBody(res)
5694	if err := googleapi.CheckResponse(res); err != nil {
5695		return nil, err
5696	}
5697	ret := &Operation{
5698		ServerResponse: googleapi.ServerResponse{
5699			Header:         res.Header,
5700			HTTPStatusCode: res.StatusCode,
5701		},
5702	}
5703	target := &ret
5704	if err := gensupport.DecodeResponse(target, res); err != nil {
5705		return nil, err
5706	}
5707	return ret, nil
5708	// {
5709	//   "description": "Updates the parameters of a single Source.",
5710	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}",
5711	//   "httpMethod": "PATCH",
5712	//   "id": "vmmigration.projects.locations.sources.patch",
5713	//   "parameterOrder": [
5714	//     "name"
5715	//   ],
5716	//   "parameters": {
5717	//     "name": {
5718	//       "description": "Output only. The Source name.",
5719	//       "location": "path",
5720	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
5721	//       "required": true,
5722	//       "type": "string"
5723	//     },
5724	//     "requestId": {
5725	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
5726	//       "location": "query",
5727	//       "type": "string"
5728	//     },
5729	//     "updateMask": {
5730	//       "description": "Field mask is used to specify the fields to be overwritten in the Source resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.",
5731	//       "format": "google-fieldmask",
5732	//       "location": "query",
5733	//       "type": "string"
5734	//     }
5735	//   },
5736	//   "path": "v1/{+name}",
5737	//   "request": {
5738	//     "$ref": "Source"
5739	//   },
5740	//   "response": {
5741	//     "$ref": "Operation"
5742	//   },
5743	//   "scopes": [
5744	//     "https://www.googleapis.com/auth/cloud-platform"
5745	//   ]
5746	// }
5747
5748}
5749
5750// method id "vmmigration.projects.locations.sources.datacenterConnectors.create":
5751
5752type ProjectsLocationsSourcesDatacenterConnectorsCreateCall struct {
5753	s                   *Service
5754	parent              string
5755	datacenterconnector *DatacenterConnector
5756	urlParams_          gensupport.URLParams
5757	ctx_                context.Context
5758	header_             http.Header
5759}
5760
5761// Create: Creates a new DatacenterConnector in a given Source.
5762//
5763// - parent: The DatacenterConnector's parent. Required. The Source in
5764//   where the new DatacenterConnector will be created. For example:
5765//   `projects/my-project/locations/us-central1/sources/my-source`.
5766func (r *ProjectsLocationsSourcesDatacenterConnectorsService) Create(parent string, datacenterconnector *DatacenterConnector) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
5767	c := &ProjectsLocationsSourcesDatacenterConnectorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5768	c.parent = parent
5769	c.datacenterconnector = datacenterconnector
5770	return c
5771}
5772
5773// DatacenterConnectorId sets the optional parameter
5774// "datacenterConnectorId": Required. The datacenterConnector
5775// identifier.
5776func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) DatacenterConnectorId(datacenterConnectorId string) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
5777	c.urlParams_.Set("datacenterConnectorId", datacenterConnectorId)
5778	return c
5779}
5780
5781// RequestId sets the optional parameter "requestId": A request ID to
5782// identify requests. Specify a unique request ID so that if you must
5783// retry your request, the server will know to ignore the request if it
5784// has already been completed. The server will guarantee that for at
5785// least 60 minutes since the first request. For example, consider a
5786// situation where you make an initial request and t he request times
5787// out. If you make the request again with the same request ID, the
5788// server can check if original operation with the same request ID was
5789// received, and if so, will ignore the second request. This prevents
5790// clients from accidentally creating duplicate commitments. The request
5791// ID must be a valid UUID with the exception that zero UUID is not
5792// supported (00000000-0000-0000-0000-000000000000).
5793func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
5794	c.urlParams_.Set("requestId", requestId)
5795	return c
5796}
5797
5798// Fields allows partial responses to be retrieved. See
5799// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5800// for more information.
5801func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
5802	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5803	return c
5804}
5805
5806// Context sets the context to be used in this call's Do method. Any
5807// pending HTTP request will be aborted if the provided context is
5808// canceled.
5809func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
5810	c.ctx_ = ctx
5811	return c
5812}
5813
5814// Header returns an http.Header that can be modified by the caller to
5815// add HTTP headers to the request.
5816func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Header() http.Header {
5817	if c.header_ == nil {
5818		c.header_ = make(http.Header)
5819	}
5820	return c.header_
5821}
5822
5823func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) doRequest(alt string) (*http.Response, error) {
5824	reqHeaders := make(http.Header)
5825	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5826	for k, v := range c.header_ {
5827		reqHeaders[k] = v
5828	}
5829	reqHeaders.Set("User-Agent", c.s.userAgent())
5830	var body io.Reader = nil
5831	body, err := googleapi.WithoutDataWrapper.JSONReader(c.datacenterconnector)
5832	if err != nil {
5833		return nil, err
5834	}
5835	reqHeaders.Set("Content-Type", "application/json")
5836	c.urlParams_.Set("alt", alt)
5837	c.urlParams_.Set("prettyPrint", "false")
5838	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datacenterConnectors")
5839	urls += "?" + c.urlParams_.Encode()
5840	req, err := http.NewRequest("POST", urls, body)
5841	if err != nil {
5842		return nil, err
5843	}
5844	req.Header = reqHeaders
5845	googleapi.Expand(req.URL, map[string]string{
5846		"parent": c.parent,
5847	})
5848	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5849}
5850
5851// Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.create" call.
5852// Exactly one of *Operation or error will be non-nil. Any non-2xx
5853// status code is an error. Response headers are in either
5854// *Operation.ServerResponse.Header or (if a response was returned at
5855// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5856// to check whether the returned error was because
5857// http.StatusNotModified was returned.
5858func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5859	gensupport.SetOptions(c.urlParams_, opts...)
5860	res, err := c.doRequest("json")
5861	if res != nil && res.StatusCode == http.StatusNotModified {
5862		if res.Body != nil {
5863			res.Body.Close()
5864		}
5865		return nil, &googleapi.Error{
5866			Code:   res.StatusCode,
5867			Header: res.Header,
5868		}
5869	}
5870	if err != nil {
5871		return nil, err
5872	}
5873	defer googleapi.CloseBody(res)
5874	if err := googleapi.CheckResponse(res); err != nil {
5875		return nil, err
5876	}
5877	ret := &Operation{
5878		ServerResponse: googleapi.ServerResponse{
5879			Header:         res.Header,
5880			HTTPStatusCode: res.StatusCode,
5881		},
5882	}
5883	target := &ret
5884	if err := gensupport.DecodeResponse(target, res); err != nil {
5885		return nil, err
5886	}
5887	return ret, nil
5888	// {
5889	//   "description": "Creates a new DatacenterConnector in a given Source.",
5890	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors",
5891	//   "httpMethod": "POST",
5892	//   "id": "vmmigration.projects.locations.sources.datacenterConnectors.create",
5893	//   "parameterOrder": [
5894	//     "parent"
5895	//   ],
5896	//   "parameters": {
5897	//     "datacenterConnectorId": {
5898	//       "description": "Required. The datacenterConnector identifier.",
5899	//       "location": "query",
5900	//       "type": "string"
5901	//     },
5902	//     "parent": {
5903	//       "description": "Required. The DatacenterConnector's parent. Required. The Source in where the new DatacenterConnector will be created. For example: `projects/my-project/locations/us-central1/sources/my-source`",
5904	//       "location": "path",
5905	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
5906	//       "required": true,
5907	//       "type": "string"
5908	//     },
5909	//     "requestId": {
5910	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
5911	//       "location": "query",
5912	//       "type": "string"
5913	//     }
5914	//   },
5915	//   "path": "v1/{+parent}/datacenterConnectors",
5916	//   "request": {
5917	//     "$ref": "DatacenterConnector"
5918	//   },
5919	//   "response": {
5920	//     "$ref": "Operation"
5921	//   },
5922	//   "scopes": [
5923	//     "https://www.googleapis.com/auth/cloud-platform"
5924	//   ]
5925	// }
5926
5927}
5928
5929// method id "vmmigration.projects.locations.sources.datacenterConnectors.delete":
5930
5931type ProjectsLocationsSourcesDatacenterConnectorsDeleteCall struct {
5932	s          *Service
5933	name       string
5934	urlParams_ gensupport.URLParams
5935	ctx_       context.Context
5936	header_    http.Header
5937}
5938
5939// Delete: Deletes a single DatacenterConnector.
5940//
5941// - name: The DatacenterConnector name.
5942func (r *ProjectsLocationsSourcesDatacenterConnectorsService) Delete(name string) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
5943	c := &ProjectsLocationsSourcesDatacenterConnectorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5944	c.name = name
5945	return c
5946}
5947
5948// RequestId sets the optional parameter "requestId": A request ID to
5949// identify requests. Specify a unique request ID so that if you must
5950// retry your request, the server will know to ignore the request if it
5951// has already been completed. The server will guarantee that for at
5952// least 60 minutes after the first request. For example, consider a
5953// situation where you make an initial request and t he request times
5954// out. If you make the request again with the same request ID, the
5955// server can check if original operation with the same request ID was
5956// received, and if so, will ignore the second request. This prevents
5957// clients from accidentally creating duplicate commitments. The request
5958// ID must be a valid UUID with the exception that zero UUID is not
5959// supported (00000000-0000-0000-0000-000000000000).
5960func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
5961	c.urlParams_.Set("requestId", requestId)
5962	return c
5963}
5964
5965// Fields allows partial responses to be retrieved. See
5966// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5967// for more information.
5968func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
5969	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5970	return c
5971}
5972
5973// Context sets the context to be used in this call's Do method. Any
5974// pending HTTP request will be aborted if the provided context is
5975// canceled.
5976func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
5977	c.ctx_ = ctx
5978	return c
5979}
5980
5981// Header returns an http.Header that can be modified by the caller to
5982// add HTTP headers to the request.
5983func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Header() http.Header {
5984	if c.header_ == nil {
5985		c.header_ = make(http.Header)
5986	}
5987	return c.header_
5988}
5989
5990func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) doRequest(alt string) (*http.Response, error) {
5991	reqHeaders := make(http.Header)
5992	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5993	for k, v := range c.header_ {
5994		reqHeaders[k] = v
5995	}
5996	reqHeaders.Set("User-Agent", c.s.userAgent())
5997	var body io.Reader = nil
5998	c.urlParams_.Set("alt", alt)
5999	c.urlParams_.Set("prettyPrint", "false")
6000	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6001	urls += "?" + c.urlParams_.Encode()
6002	req, err := http.NewRequest("DELETE", urls, body)
6003	if err != nil {
6004		return nil, err
6005	}
6006	req.Header = reqHeaders
6007	googleapi.Expand(req.URL, map[string]string{
6008		"name": c.name,
6009	})
6010	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6011}
6012
6013// Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.delete" call.
6014// Exactly one of *Operation or error will be non-nil. Any non-2xx
6015// status code is an error. Response headers are in either
6016// *Operation.ServerResponse.Header or (if a response was returned at
6017// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6018// to check whether the returned error was because
6019// http.StatusNotModified was returned.
6020func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6021	gensupport.SetOptions(c.urlParams_, opts...)
6022	res, err := c.doRequest("json")
6023	if res != nil && res.StatusCode == http.StatusNotModified {
6024		if res.Body != nil {
6025			res.Body.Close()
6026		}
6027		return nil, &googleapi.Error{
6028			Code:   res.StatusCode,
6029			Header: res.Header,
6030		}
6031	}
6032	if err != nil {
6033		return nil, err
6034	}
6035	defer googleapi.CloseBody(res)
6036	if err := googleapi.CheckResponse(res); err != nil {
6037		return nil, err
6038	}
6039	ret := &Operation{
6040		ServerResponse: googleapi.ServerResponse{
6041			Header:         res.Header,
6042			HTTPStatusCode: res.StatusCode,
6043		},
6044	}
6045	target := &ret
6046	if err := gensupport.DecodeResponse(target, res); err != nil {
6047		return nil, err
6048	}
6049	return ret, nil
6050	// {
6051	//   "description": "Deletes a single DatacenterConnector.",
6052	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors/{datacenterConnectorsId}",
6053	//   "httpMethod": "DELETE",
6054	//   "id": "vmmigration.projects.locations.sources.datacenterConnectors.delete",
6055	//   "parameterOrder": [
6056	//     "name"
6057	//   ],
6058	//   "parameters": {
6059	//     "name": {
6060	//       "description": "Required. The DatacenterConnector name.",
6061	//       "location": "path",
6062	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/datacenterConnectors/[^/]+$",
6063	//       "required": true,
6064	//       "type": "string"
6065	//     },
6066	//     "requestId": {
6067	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
6068	//       "location": "query",
6069	//       "type": "string"
6070	//     }
6071	//   },
6072	//   "path": "v1/{+name}",
6073	//   "response": {
6074	//     "$ref": "Operation"
6075	//   },
6076	//   "scopes": [
6077	//     "https://www.googleapis.com/auth/cloud-platform"
6078	//   ]
6079	// }
6080
6081}
6082
6083// method id "vmmigration.projects.locations.sources.datacenterConnectors.get":
6084
6085type ProjectsLocationsSourcesDatacenterConnectorsGetCall struct {
6086	s            *Service
6087	name         string
6088	urlParams_   gensupport.URLParams
6089	ifNoneMatch_ string
6090	ctx_         context.Context
6091	header_      http.Header
6092}
6093
6094// Get: Gets details of a single DatacenterConnector.
6095//
6096// - name: The name of the DatacenterConnector.
6097func (r *ProjectsLocationsSourcesDatacenterConnectorsService) Get(name string) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
6098	c := &ProjectsLocationsSourcesDatacenterConnectorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6099	c.name = name
6100	return c
6101}
6102
6103// Fields allows partial responses to be retrieved. See
6104// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6105// for more information.
6106func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
6107	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6108	return c
6109}
6110
6111// IfNoneMatch sets the optional parameter which makes the operation
6112// fail if the object's ETag matches the given value. This is useful for
6113// getting updates only after the object has changed since the last
6114// request. Use googleapi.IsNotModified to check whether the response
6115// error from Do is the result of In-None-Match.
6116func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
6117	c.ifNoneMatch_ = entityTag
6118	return c
6119}
6120
6121// Context sets the context to be used in this call's Do method. Any
6122// pending HTTP request will be aborted if the provided context is
6123// canceled.
6124func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
6125	c.ctx_ = ctx
6126	return c
6127}
6128
6129// Header returns an http.Header that can be modified by the caller to
6130// add HTTP headers to the request.
6131func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Header() http.Header {
6132	if c.header_ == nil {
6133		c.header_ = make(http.Header)
6134	}
6135	return c.header_
6136}
6137
6138func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) doRequest(alt string) (*http.Response, error) {
6139	reqHeaders := make(http.Header)
6140	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6141	for k, v := range c.header_ {
6142		reqHeaders[k] = v
6143	}
6144	reqHeaders.Set("User-Agent", c.s.userAgent())
6145	if c.ifNoneMatch_ != "" {
6146		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6147	}
6148	var body io.Reader = nil
6149	c.urlParams_.Set("alt", alt)
6150	c.urlParams_.Set("prettyPrint", "false")
6151	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6152	urls += "?" + c.urlParams_.Encode()
6153	req, err := http.NewRequest("GET", urls, body)
6154	if err != nil {
6155		return nil, err
6156	}
6157	req.Header = reqHeaders
6158	googleapi.Expand(req.URL, map[string]string{
6159		"name": c.name,
6160	})
6161	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6162}
6163
6164// Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.get" call.
6165// Exactly one of *DatacenterConnector or error will be non-nil. Any
6166// non-2xx status code is an error. Response headers are in either
6167// *DatacenterConnector.ServerResponse.Header or (if a response was
6168// returned at all) in error.(*googleapi.Error).Header. Use
6169// googleapi.IsNotModified to check whether the returned error was
6170// because http.StatusNotModified was returned.
6171func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Do(opts ...googleapi.CallOption) (*DatacenterConnector, error) {
6172	gensupport.SetOptions(c.urlParams_, opts...)
6173	res, err := c.doRequest("json")
6174	if res != nil && res.StatusCode == http.StatusNotModified {
6175		if res.Body != nil {
6176			res.Body.Close()
6177		}
6178		return nil, &googleapi.Error{
6179			Code:   res.StatusCode,
6180			Header: res.Header,
6181		}
6182	}
6183	if err != nil {
6184		return nil, err
6185	}
6186	defer googleapi.CloseBody(res)
6187	if err := googleapi.CheckResponse(res); err != nil {
6188		return nil, err
6189	}
6190	ret := &DatacenterConnector{
6191		ServerResponse: googleapi.ServerResponse{
6192			Header:         res.Header,
6193			HTTPStatusCode: res.StatusCode,
6194		},
6195	}
6196	target := &ret
6197	if err := gensupport.DecodeResponse(target, res); err != nil {
6198		return nil, err
6199	}
6200	return ret, nil
6201	// {
6202	//   "description": "Gets details of a single DatacenterConnector.",
6203	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors/{datacenterConnectorsId}",
6204	//   "httpMethod": "GET",
6205	//   "id": "vmmigration.projects.locations.sources.datacenterConnectors.get",
6206	//   "parameterOrder": [
6207	//     "name"
6208	//   ],
6209	//   "parameters": {
6210	//     "name": {
6211	//       "description": "Required. The name of the DatacenterConnector.",
6212	//       "location": "path",
6213	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/datacenterConnectors/[^/]+$",
6214	//       "required": true,
6215	//       "type": "string"
6216	//     }
6217	//   },
6218	//   "path": "v1/{+name}",
6219	//   "response": {
6220	//     "$ref": "DatacenterConnector"
6221	//   },
6222	//   "scopes": [
6223	//     "https://www.googleapis.com/auth/cloud-platform"
6224	//   ]
6225	// }
6226
6227}
6228
6229// method id "vmmigration.projects.locations.sources.datacenterConnectors.list":
6230
6231type ProjectsLocationsSourcesDatacenterConnectorsListCall struct {
6232	s            *Service
6233	parent       string
6234	urlParams_   gensupport.URLParams
6235	ifNoneMatch_ string
6236	ctx_         context.Context
6237	header_      http.Header
6238}
6239
6240// List: Lists DatacenterConnectors in a given Source.
6241//
6242// - parent: The parent, which owns this collection of connectors.
6243func (r *ProjectsLocationsSourcesDatacenterConnectorsService) List(parent string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6244	c := &ProjectsLocationsSourcesDatacenterConnectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6245	c.parent = parent
6246	return c
6247}
6248
6249// Filter sets the optional parameter "filter": The filter request.
6250func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Filter(filter string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6251	c.urlParams_.Set("filter", filter)
6252	return c
6253}
6254
6255// OrderBy sets the optional parameter "orderBy": the order by fields
6256// for the result.
6257func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6258	c.urlParams_.Set("orderBy", orderBy)
6259	return c
6260}
6261
6262// PageSize sets the optional parameter "pageSize": The maximum number
6263// of connectors to return. The service may return fewer than this
6264// value. If unspecified, at most 500 sources will be returned. The
6265// maximum value is 1000; values above 1000 will be coerced to 1000.
6266func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6267	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6268	return c
6269}
6270
6271// PageToken sets the optional parameter "pageToken": Required. A page
6272// token, received from a previous `ListDatacenterConnectors` call.
6273// Provide this to retrieve the subsequent page. When paginating, all
6274// other parameters provided to `ListDatacenterConnectors` must match
6275// the call that provided the page token.
6276func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6277	c.urlParams_.Set("pageToken", pageToken)
6278	return c
6279}
6280
6281// Fields allows partial responses to be retrieved. See
6282// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6283// for more information.
6284func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6285	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6286	return c
6287}
6288
6289// IfNoneMatch sets the optional parameter which makes the operation
6290// fail if the object's ETag matches the given value. This is useful for
6291// getting updates only after the object has changed since the last
6292// request. Use googleapi.IsNotModified to check whether the response
6293// error from Do is the result of In-None-Match.
6294func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6295	c.ifNoneMatch_ = entityTag
6296	return c
6297}
6298
6299// Context sets the context to be used in this call's Do method. Any
6300// pending HTTP request will be aborted if the provided context is
6301// canceled.
6302func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6303	c.ctx_ = ctx
6304	return c
6305}
6306
6307// Header returns an http.Header that can be modified by the caller to
6308// add HTTP headers to the request.
6309func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Header() http.Header {
6310	if c.header_ == nil {
6311		c.header_ = make(http.Header)
6312	}
6313	return c.header_
6314}
6315
6316func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) doRequest(alt string) (*http.Response, error) {
6317	reqHeaders := make(http.Header)
6318	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6319	for k, v := range c.header_ {
6320		reqHeaders[k] = v
6321	}
6322	reqHeaders.Set("User-Agent", c.s.userAgent())
6323	if c.ifNoneMatch_ != "" {
6324		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6325	}
6326	var body io.Reader = nil
6327	c.urlParams_.Set("alt", alt)
6328	c.urlParams_.Set("prettyPrint", "false")
6329	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datacenterConnectors")
6330	urls += "?" + c.urlParams_.Encode()
6331	req, err := http.NewRequest("GET", urls, body)
6332	if err != nil {
6333		return nil, err
6334	}
6335	req.Header = reqHeaders
6336	googleapi.Expand(req.URL, map[string]string{
6337		"parent": c.parent,
6338	})
6339	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6340}
6341
6342// Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.list" call.
6343// Exactly one of *ListDatacenterConnectorsResponse or error will be
6344// non-nil. Any non-2xx status code is an error. Response headers are in
6345// either *ListDatacenterConnectorsResponse.ServerResponse.Header or (if
6346// a response was returned at all) in error.(*googleapi.Error).Header.
6347// Use googleapi.IsNotModified to check whether the returned error was
6348// because http.StatusNotModified was returned.
6349func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Do(opts ...googleapi.CallOption) (*ListDatacenterConnectorsResponse, error) {
6350	gensupport.SetOptions(c.urlParams_, opts...)
6351	res, err := c.doRequest("json")
6352	if res != nil && res.StatusCode == http.StatusNotModified {
6353		if res.Body != nil {
6354			res.Body.Close()
6355		}
6356		return nil, &googleapi.Error{
6357			Code:   res.StatusCode,
6358			Header: res.Header,
6359		}
6360	}
6361	if err != nil {
6362		return nil, err
6363	}
6364	defer googleapi.CloseBody(res)
6365	if err := googleapi.CheckResponse(res); err != nil {
6366		return nil, err
6367	}
6368	ret := &ListDatacenterConnectorsResponse{
6369		ServerResponse: googleapi.ServerResponse{
6370			Header:         res.Header,
6371			HTTPStatusCode: res.StatusCode,
6372		},
6373	}
6374	target := &ret
6375	if err := gensupport.DecodeResponse(target, res); err != nil {
6376		return nil, err
6377	}
6378	return ret, nil
6379	// {
6380	//   "description": "Lists DatacenterConnectors in a given Source.",
6381	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors",
6382	//   "httpMethod": "GET",
6383	//   "id": "vmmigration.projects.locations.sources.datacenterConnectors.list",
6384	//   "parameterOrder": [
6385	//     "parent"
6386	//   ],
6387	//   "parameters": {
6388	//     "filter": {
6389	//       "description": "Optional. The filter request.",
6390	//       "location": "query",
6391	//       "type": "string"
6392	//     },
6393	//     "orderBy": {
6394	//       "description": "Optional. the order by fields for the result.",
6395	//       "location": "query",
6396	//       "type": "string"
6397	//     },
6398	//     "pageSize": {
6399	//       "description": "Optional. The maximum number of connectors to return. The service may return fewer than this value. If unspecified, at most 500 sources will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
6400	//       "format": "int32",
6401	//       "location": "query",
6402	//       "type": "integer"
6403	//     },
6404	//     "pageToken": {
6405	//       "description": "Required. A page token, received from a previous `ListDatacenterConnectors` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDatacenterConnectors` must match the call that provided the page token.",
6406	//       "location": "query",
6407	//       "type": "string"
6408	//     },
6409	//     "parent": {
6410	//       "description": "Required. The parent, which owns this collection of connectors.",
6411	//       "location": "path",
6412	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
6413	//       "required": true,
6414	//       "type": "string"
6415	//     }
6416	//   },
6417	//   "path": "v1/{+parent}/datacenterConnectors",
6418	//   "response": {
6419	//     "$ref": "ListDatacenterConnectorsResponse"
6420	//   },
6421	//   "scopes": [
6422	//     "https://www.googleapis.com/auth/cloud-platform"
6423	//   ]
6424	// }
6425
6426}
6427
6428// Pages invokes f for each page of results.
6429// A non-nil error returned from f will halt the iteration.
6430// The provided context supersedes any context provided to the Context method.
6431func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Pages(ctx context.Context, f func(*ListDatacenterConnectorsResponse) error) error {
6432	c.ctx_ = ctx
6433	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6434	for {
6435		x, err := c.Do()
6436		if err != nil {
6437			return err
6438		}
6439		if err := f(x); err != nil {
6440			return err
6441		}
6442		if x.NextPageToken == "" {
6443			return nil
6444		}
6445		c.PageToken(x.NextPageToken)
6446	}
6447}
6448
6449// method id "vmmigration.projects.locations.sources.migratingVms.create":
6450
6451type ProjectsLocationsSourcesMigratingVmsCreateCall struct {
6452	s           *Service
6453	parent      string
6454	migratingvm *MigratingVm
6455	urlParams_  gensupport.URLParams
6456	ctx_        context.Context
6457	header_     http.Header
6458}
6459
6460// Create: Creates a new MigratingVm in a given Source.
6461//
6462// - parent: The MigratingVm's parent.
6463func (r *ProjectsLocationsSourcesMigratingVmsService) Create(parent string, migratingvm *MigratingVm) *ProjectsLocationsSourcesMigratingVmsCreateCall {
6464	c := &ProjectsLocationsSourcesMigratingVmsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6465	c.parent = parent
6466	c.migratingvm = migratingvm
6467	return c
6468}
6469
6470// MigratingVmId sets the optional parameter "migratingVmId": Required.
6471// The migratingVm identifier.
6472func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) MigratingVmId(migratingVmId string) *ProjectsLocationsSourcesMigratingVmsCreateCall {
6473	c.urlParams_.Set("migratingVmId", migratingVmId)
6474	return c
6475}
6476
6477// RequestId sets the optional parameter "requestId": A request ID to
6478// identify requests. Specify a unique request ID so that if you must
6479// retry your request, the server will know to ignore the request if it
6480// has already been completed. The server will guarantee that for at
6481// least 60 minutes since the first request. For example, consider a
6482// situation where you make an initial request and t he request times
6483// out. If you make the request again with the same request ID, the
6484// server can check if original operation with the same request ID was
6485// received, and if so, will ignore the second request. This prevents
6486// clients from accidentally creating duplicate commitments. The request
6487// ID must be a valid UUID with the exception that zero UUID is not
6488// supported (00000000-0000-0000-0000-000000000000).
6489func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsCreateCall {
6490	c.urlParams_.Set("requestId", requestId)
6491	return c
6492}
6493
6494// Fields allows partial responses to be retrieved. See
6495// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6496// for more information.
6497func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCreateCall {
6498	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6499	return c
6500}
6501
6502// Context sets the context to be used in this call's Do method. Any
6503// pending HTTP request will be aborted if the provided context is
6504// canceled.
6505func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCreateCall {
6506	c.ctx_ = ctx
6507	return c
6508}
6509
6510// Header returns an http.Header that can be modified by the caller to
6511// add HTTP headers to the request.
6512func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Header() http.Header {
6513	if c.header_ == nil {
6514		c.header_ = make(http.Header)
6515	}
6516	return c.header_
6517}
6518
6519func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) doRequest(alt string) (*http.Response, error) {
6520	reqHeaders := make(http.Header)
6521	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6522	for k, v := range c.header_ {
6523		reqHeaders[k] = v
6524	}
6525	reqHeaders.Set("User-Agent", c.s.userAgent())
6526	var body io.Reader = nil
6527	body, err := googleapi.WithoutDataWrapper.JSONReader(c.migratingvm)
6528	if err != nil {
6529		return nil, err
6530	}
6531	reqHeaders.Set("Content-Type", "application/json")
6532	c.urlParams_.Set("alt", alt)
6533	c.urlParams_.Set("prettyPrint", "false")
6534	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratingVms")
6535	urls += "?" + c.urlParams_.Encode()
6536	req, err := http.NewRequest("POST", urls, body)
6537	if err != nil {
6538		return nil, err
6539	}
6540	req.Header = reqHeaders
6541	googleapi.Expand(req.URL, map[string]string{
6542		"parent": c.parent,
6543	})
6544	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6545}
6546
6547// Do executes the "vmmigration.projects.locations.sources.migratingVms.create" call.
6548// Exactly one of *Operation or error will be non-nil. Any non-2xx
6549// status code is an error. Response headers are in either
6550// *Operation.ServerResponse.Header or (if a response was returned at
6551// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6552// to check whether the returned error was because
6553// http.StatusNotModified was returned.
6554func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6555	gensupport.SetOptions(c.urlParams_, opts...)
6556	res, err := c.doRequest("json")
6557	if res != nil && res.StatusCode == http.StatusNotModified {
6558		if res.Body != nil {
6559			res.Body.Close()
6560		}
6561		return nil, &googleapi.Error{
6562			Code:   res.StatusCode,
6563			Header: res.Header,
6564		}
6565	}
6566	if err != nil {
6567		return nil, err
6568	}
6569	defer googleapi.CloseBody(res)
6570	if err := googleapi.CheckResponse(res); err != nil {
6571		return nil, err
6572	}
6573	ret := &Operation{
6574		ServerResponse: googleapi.ServerResponse{
6575			Header:         res.Header,
6576			HTTPStatusCode: res.StatusCode,
6577		},
6578	}
6579	target := &ret
6580	if err := gensupport.DecodeResponse(target, res); err != nil {
6581		return nil, err
6582	}
6583	return ret, nil
6584	// {
6585	//   "description": "Creates a new MigratingVm in a given Source.",
6586	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms",
6587	//   "httpMethod": "POST",
6588	//   "id": "vmmigration.projects.locations.sources.migratingVms.create",
6589	//   "parameterOrder": [
6590	//     "parent"
6591	//   ],
6592	//   "parameters": {
6593	//     "migratingVmId": {
6594	//       "description": "Required. The migratingVm identifier.",
6595	//       "location": "query",
6596	//       "type": "string"
6597	//     },
6598	//     "parent": {
6599	//       "description": "Required. The MigratingVm's parent.",
6600	//       "location": "path",
6601	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
6602	//       "required": true,
6603	//       "type": "string"
6604	//     },
6605	//     "requestId": {
6606	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
6607	//       "location": "query",
6608	//       "type": "string"
6609	//     }
6610	//   },
6611	//   "path": "v1/{+parent}/migratingVms",
6612	//   "request": {
6613	//     "$ref": "MigratingVm"
6614	//   },
6615	//   "response": {
6616	//     "$ref": "Operation"
6617	//   },
6618	//   "scopes": [
6619	//     "https://www.googleapis.com/auth/cloud-platform"
6620	//   ]
6621	// }
6622
6623}
6624
6625// method id "vmmigration.projects.locations.sources.migratingVms.delete":
6626
6627type ProjectsLocationsSourcesMigratingVmsDeleteCall struct {
6628	s          *Service
6629	name       string
6630	urlParams_ gensupport.URLParams
6631	ctx_       context.Context
6632	header_    http.Header
6633}
6634
6635// Delete: Deletes a single MigratingVm.
6636//
6637// - name: The name of the MigratingVm.
6638func (r *ProjectsLocationsSourcesMigratingVmsService) Delete(name string) *ProjectsLocationsSourcesMigratingVmsDeleteCall {
6639	c := &ProjectsLocationsSourcesMigratingVmsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6640	c.name = name
6641	return c
6642}
6643
6644// Fields allows partial responses to be retrieved. See
6645// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6646// for more information.
6647func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsDeleteCall {
6648	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6649	return c
6650}
6651
6652// Context sets the context to be used in this call's Do method. Any
6653// pending HTTP request will be aborted if the provided context is
6654// canceled.
6655func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsDeleteCall {
6656	c.ctx_ = ctx
6657	return c
6658}
6659
6660// Header returns an http.Header that can be modified by the caller to
6661// add HTTP headers to the request.
6662func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Header() http.Header {
6663	if c.header_ == nil {
6664		c.header_ = make(http.Header)
6665	}
6666	return c.header_
6667}
6668
6669func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) doRequest(alt string) (*http.Response, error) {
6670	reqHeaders := make(http.Header)
6671	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6672	for k, v := range c.header_ {
6673		reqHeaders[k] = v
6674	}
6675	reqHeaders.Set("User-Agent", c.s.userAgent())
6676	var body io.Reader = nil
6677	c.urlParams_.Set("alt", alt)
6678	c.urlParams_.Set("prettyPrint", "false")
6679	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6680	urls += "?" + c.urlParams_.Encode()
6681	req, err := http.NewRequest("DELETE", urls, body)
6682	if err != nil {
6683		return nil, err
6684	}
6685	req.Header = reqHeaders
6686	googleapi.Expand(req.URL, map[string]string{
6687		"name": c.name,
6688	})
6689	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6690}
6691
6692// Do executes the "vmmigration.projects.locations.sources.migratingVms.delete" call.
6693// Exactly one of *Operation or error will be non-nil. Any non-2xx
6694// status code is an error. Response headers are in either
6695// *Operation.ServerResponse.Header or (if a response was returned at
6696// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6697// to check whether the returned error was because
6698// http.StatusNotModified was returned.
6699func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6700	gensupport.SetOptions(c.urlParams_, opts...)
6701	res, err := c.doRequest("json")
6702	if res != nil && res.StatusCode == http.StatusNotModified {
6703		if res.Body != nil {
6704			res.Body.Close()
6705		}
6706		return nil, &googleapi.Error{
6707			Code:   res.StatusCode,
6708			Header: res.Header,
6709		}
6710	}
6711	if err != nil {
6712		return nil, err
6713	}
6714	defer googleapi.CloseBody(res)
6715	if err := googleapi.CheckResponse(res); err != nil {
6716		return nil, err
6717	}
6718	ret := &Operation{
6719		ServerResponse: googleapi.ServerResponse{
6720			Header:         res.Header,
6721			HTTPStatusCode: res.StatusCode,
6722		},
6723	}
6724	target := &ret
6725	if err := gensupport.DecodeResponse(target, res); err != nil {
6726		return nil, err
6727	}
6728	return ret, nil
6729	// {
6730	//   "description": "Deletes a single MigratingVm.",
6731	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}",
6732	//   "httpMethod": "DELETE",
6733	//   "id": "vmmigration.projects.locations.sources.migratingVms.delete",
6734	//   "parameterOrder": [
6735	//     "name"
6736	//   ],
6737	//   "parameters": {
6738	//     "name": {
6739	//       "description": "Required. The name of the MigratingVm.",
6740	//       "location": "path",
6741	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
6742	//       "required": true,
6743	//       "type": "string"
6744	//     }
6745	//   },
6746	//   "path": "v1/{+name}",
6747	//   "response": {
6748	//     "$ref": "Operation"
6749	//   },
6750	//   "scopes": [
6751	//     "https://www.googleapis.com/auth/cloud-platform"
6752	//   ]
6753	// }
6754
6755}
6756
6757// method id "vmmigration.projects.locations.sources.migratingVms.finalizeMigration":
6758
6759type ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall struct {
6760	s                        *Service
6761	migratingVm              string
6762	finalizemigrationrequest *FinalizeMigrationRequest
6763	urlParams_               gensupport.URLParams
6764	ctx_                     context.Context
6765	header_                  http.Header
6766}
6767
6768// FinalizeMigration: Marks a migration as completed, deleting migration
6769// resources that are no longer being used. Only applicable after
6770// cutover is done.
6771//
6772// - migratingVm: The name of the MigratingVm.
6773func (r *ProjectsLocationsSourcesMigratingVmsService) FinalizeMigration(migratingVm string, finalizemigrationrequest *FinalizeMigrationRequest) *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall {
6774	c := &ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6775	c.migratingVm = migratingVm
6776	c.finalizemigrationrequest = finalizemigrationrequest
6777	return c
6778}
6779
6780// Fields allows partial responses to be retrieved. See
6781// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6782// for more information.
6783func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall {
6784	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6785	return c
6786}
6787
6788// Context sets the context to be used in this call's Do method. Any
6789// pending HTTP request will be aborted if the provided context is
6790// canceled.
6791func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall {
6792	c.ctx_ = ctx
6793	return c
6794}
6795
6796// Header returns an http.Header that can be modified by the caller to
6797// add HTTP headers to the request.
6798func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Header() http.Header {
6799	if c.header_ == nil {
6800		c.header_ = make(http.Header)
6801	}
6802	return c.header_
6803}
6804
6805func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) doRequest(alt string) (*http.Response, error) {
6806	reqHeaders := make(http.Header)
6807	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6808	for k, v := range c.header_ {
6809		reqHeaders[k] = v
6810	}
6811	reqHeaders.Set("User-Agent", c.s.userAgent())
6812	var body io.Reader = nil
6813	body, err := googleapi.WithoutDataWrapper.JSONReader(c.finalizemigrationrequest)
6814	if err != nil {
6815		return nil, err
6816	}
6817	reqHeaders.Set("Content-Type", "application/json")
6818	c.urlParams_.Set("alt", alt)
6819	c.urlParams_.Set("prettyPrint", "false")
6820	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migratingVm}:finalizeMigration")
6821	urls += "?" + c.urlParams_.Encode()
6822	req, err := http.NewRequest("POST", urls, body)
6823	if err != nil {
6824		return nil, err
6825	}
6826	req.Header = reqHeaders
6827	googleapi.Expand(req.URL, map[string]string{
6828		"migratingVm": c.migratingVm,
6829	})
6830	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6831}
6832
6833// Do executes the "vmmigration.projects.locations.sources.migratingVms.finalizeMigration" call.
6834// Exactly one of *Operation or error will be non-nil. Any non-2xx
6835// status code is an error. Response headers are in either
6836// *Operation.ServerResponse.Header or (if a response was returned at
6837// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6838// to check whether the returned error was because
6839// http.StatusNotModified was returned.
6840func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6841	gensupport.SetOptions(c.urlParams_, opts...)
6842	res, err := c.doRequest("json")
6843	if res != nil && res.StatusCode == http.StatusNotModified {
6844		if res.Body != nil {
6845			res.Body.Close()
6846		}
6847		return nil, &googleapi.Error{
6848			Code:   res.StatusCode,
6849			Header: res.Header,
6850		}
6851	}
6852	if err != nil {
6853		return nil, err
6854	}
6855	defer googleapi.CloseBody(res)
6856	if err := googleapi.CheckResponse(res); err != nil {
6857		return nil, err
6858	}
6859	ret := &Operation{
6860		ServerResponse: googleapi.ServerResponse{
6861			Header:         res.Header,
6862			HTTPStatusCode: res.StatusCode,
6863		},
6864	}
6865	target := &ret
6866	if err := gensupport.DecodeResponse(target, res); err != nil {
6867		return nil, err
6868	}
6869	return ret, nil
6870	// {
6871	//   "description": "Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.",
6872	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:finalizeMigration",
6873	//   "httpMethod": "POST",
6874	//   "id": "vmmigration.projects.locations.sources.migratingVms.finalizeMigration",
6875	//   "parameterOrder": [
6876	//     "migratingVm"
6877	//   ],
6878	//   "parameters": {
6879	//     "migratingVm": {
6880	//       "description": "Required. The name of the MigratingVm.",
6881	//       "location": "path",
6882	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
6883	//       "required": true,
6884	//       "type": "string"
6885	//     }
6886	//   },
6887	//   "path": "v1/{+migratingVm}:finalizeMigration",
6888	//   "request": {
6889	//     "$ref": "FinalizeMigrationRequest"
6890	//   },
6891	//   "response": {
6892	//     "$ref": "Operation"
6893	//   },
6894	//   "scopes": [
6895	//     "https://www.googleapis.com/auth/cloud-platform"
6896	//   ]
6897	// }
6898
6899}
6900
6901// method id "vmmigration.projects.locations.sources.migratingVms.get":
6902
6903type ProjectsLocationsSourcesMigratingVmsGetCall struct {
6904	s            *Service
6905	name         string
6906	urlParams_   gensupport.URLParams
6907	ifNoneMatch_ string
6908	ctx_         context.Context
6909	header_      http.Header
6910}
6911
6912// Get: Gets details of a single MigratingVm.
6913//
6914// - name: The name of the MigratingVm.
6915func (r *ProjectsLocationsSourcesMigratingVmsService) Get(name string) *ProjectsLocationsSourcesMigratingVmsGetCall {
6916	c := &ProjectsLocationsSourcesMigratingVmsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6917	c.name = name
6918	return c
6919}
6920
6921// Fields allows partial responses to be retrieved. See
6922// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6923// for more information.
6924func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsGetCall {
6925	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6926	return c
6927}
6928
6929// IfNoneMatch sets the optional parameter which makes the operation
6930// fail if the object's ETag matches the given value. This is useful for
6931// getting updates only after the object has changed since the last
6932// request. Use googleapi.IsNotModified to check whether the response
6933// error from Do is the result of In-None-Match.
6934func (c *ProjectsLocationsSourcesMigratingVmsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsGetCall {
6935	c.ifNoneMatch_ = entityTag
6936	return c
6937}
6938
6939// Context sets the context to be used in this call's Do method. Any
6940// pending HTTP request will be aborted if the provided context is
6941// canceled.
6942func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsGetCall {
6943	c.ctx_ = ctx
6944	return c
6945}
6946
6947// Header returns an http.Header that can be modified by the caller to
6948// add HTTP headers to the request.
6949func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Header() http.Header {
6950	if c.header_ == nil {
6951		c.header_ = make(http.Header)
6952	}
6953	return c.header_
6954}
6955
6956func (c *ProjectsLocationsSourcesMigratingVmsGetCall) doRequest(alt string) (*http.Response, error) {
6957	reqHeaders := make(http.Header)
6958	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6959	for k, v := range c.header_ {
6960		reqHeaders[k] = v
6961	}
6962	reqHeaders.Set("User-Agent", c.s.userAgent())
6963	if c.ifNoneMatch_ != "" {
6964		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6965	}
6966	var body io.Reader = nil
6967	c.urlParams_.Set("alt", alt)
6968	c.urlParams_.Set("prettyPrint", "false")
6969	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6970	urls += "?" + c.urlParams_.Encode()
6971	req, err := http.NewRequest("GET", urls, body)
6972	if err != nil {
6973		return nil, err
6974	}
6975	req.Header = reqHeaders
6976	googleapi.Expand(req.URL, map[string]string{
6977		"name": c.name,
6978	})
6979	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6980}
6981
6982// Do executes the "vmmigration.projects.locations.sources.migratingVms.get" call.
6983// Exactly one of *MigratingVm or error will be non-nil. Any non-2xx
6984// status code is an error. Response headers are in either
6985// *MigratingVm.ServerResponse.Header or (if a response was returned at
6986// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6987// to check whether the returned error was because
6988// http.StatusNotModified was returned.
6989func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Do(opts ...googleapi.CallOption) (*MigratingVm, error) {
6990	gensupport.SetOptions(c.urlParams_, opts...)
6991	res, err := c.doRequest("json")
6992	if res != nil && res.StatusCode == http.StatusNotModified {
6993		if res.Body != nil {
6994			res.Body.Close()
6995		}
6996		return nil, &googleapi.Error{
6997			Code:   res.StatusCode,
6998			Header: res.Header,
6999		}
7000	}
7001	if err != nil {
7002		return nil, err
7003	}
7004	defer googleapi.CloseBody(res)
7005	if err := googleapi.CheckResponse(res); err != nil {
7006		return nil, err
7007	}
7008	ret := &MigratingVm{
7009		ServerResponse: googleapi.ServerResponse{
7010			Header:         res.Header,
7011			HTTPStatusCode: res.StatusCode,
7012		},
7013	}
7014	target := &ret
7015	if err := gensupport.DecodeResponse(target, res); err != nil {
7016		return nil, err
7017	}
7018	return ret, nil
7019	// {
7020	//   "description": "Gets details of a single MigratingVm.",
7021	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}",
7022	//   "httpMethod": "GET",
7023	//   "id": "vmmigration.projects.locations.sources.migratingVms.get",
7024	//   "parameterOrder": [
7025	//     "name"
7026	//   ],
7027	//   "parameters": {
7028	//     "name": {
7029	//       "description": "Required. The name of the MigratingVm.",
7030	//       "location": "path",
7031	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
7032	//       "required": true,
7033	//       "type": "string"
7034	//     }
7035	//   },
7036	//   "path": "v1/{+name}",
7037	//   "response": {
7038	//     "$ref": "MigratingVm"
7039	//   },
7040	//   "scopes": [
7041	//     "https://www.googleapis.com/auth/cloud-platform"
7042	//   ]
7043	// }
7044
7045}
7046
7047// method id "vmmigration.projects.locations.sources.migratingVms.list":
7048
7049type ProjectsLocationsSourcesMigratingVmsListCall struct {
7050	s            *Service
7051	parent       string
7052	urlParams_   gensupport.URLParams
7053	ifNoneMatch_ string
7054	ctx_         context.Context
7055	header_      http.Header
7056}
7057
7058// List: Lists MigratingVms in a given Source.
7059//
7060// - parent: The parent, which owns this collection of MigratingVms.
7061func (r *ProjectsLocationsSourcesMigratingVmsService) List(parent string) *ProjectsLocationsSourcesMigratingVmsListCall {
7062	c := &ProjectsLocationsSourcesMigratingVmsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7063	c.parent = parent
7064	return c
7065}
7066
7067// Filter sets the optional parameter "filter": The filter request.
7068func (c *ProjectsLocationsSourcesMigratingVmsListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsListCall {
7069	c.urlParams_.Set("filter", filter)
7070	return c
7071}
7072
7073// OrderBy sets the optional parameter "orderBy": the order by fields
7074// for the result.
7075func (c *ProjectsLocationsSourcesMigratingVmsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsListCall {
7076	c.urlParams_.Set("orderBy", orderBy)
7077	return c
7078}
7079
7080// PageSize sets the optional parameter "pageSize": The maximum number
7081// of migrating VMs to return. The service may return fewer than this
7082// value. If unspecified, at most 500 migrating VMs will be returned.
7083// The maximum value is 1000; values above 1000 will be coerced to 1000.
7084func (c *ProjectsLocationsSourcesMigratingVmsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsListCall {
7085	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7086	return c
7087}
7088
7089// PageToken sets the optional parameter "pageToken": Required. A page
7090// token, received from a previous `ListMigratingVms` call. Provide this
7091// to retrieve the subsequent page. When paginating, all other
7092// parameters provided to `ListMigratingVms` must match the call that
7093// provided the page token.
7094func (c *ProjectsLocationsSourcesMigratingVmsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsListCall {
7095	c.urlParams_.Set("pageToken", pageToken)
7096	return c
7097}
7098
7099// Fields allows partial responses to be retrieved. See
7100// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7101// for more information.
7102func (c *ProjectsLocationsSourcesMigratingVmsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsListCall {
7103	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7104	return c
7105}
7106
7107// IfNoneMatch sets the optional parameter which makes the operation
7108// fail if the object's ETag matches the given value. This is useful for
7109// getting updates only after the object has changed since the last
7110// request. Use googleapi.IsNotModified to check whether the response
7111// error from Do is the result of In-None-Match.
7112func (c *ProjectsLocationsSourcesMigratingVmsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsListCall {
7113	c.ifNoneMatch_ = entityTag
7114	return c
7115}
7116
7117// Context sets the context to be used in this call's Do method. Any
7118// pending HTTP request will be aborted if the provided context is
7119// canceled.
7120func (c *ProjectsLocationsSourcesMigratingVmsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsListCall {
7121	c.ctx_ = ctx
7122	return c
7123}
7124
7125// Header returns an http.Header that can be modified by the caller to
7126// add HTTP headers to the request.
7127func (c *ProjectsLocationsSourcesMigratingVmsListCall) Header() http.Header {
7128	if c.header_ == nil {
7129		c.header_ = make(http.Header)
7130	}
7131	return c.header_
7132}
7133
7134func (c *ProjectsLocationsSourcesMigratingVmsListCall) doRequest(alt string) (*http.Response, error) {
7135	reqHeaders := make(http.Header)
7136	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7137	for k, v := range c.header_ {
7138		reqHeaders[k] = v
7139	}
7140	reqHeaders.Set("User-Agent", c.s.userAgent())
7141	if c.ifNoneMatch_ != "" {
7142		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7143	}
7144	var body io.Reader = nil
7145	c.urlParams_.Set("alt", alt)
7146	c.urlParams_.Set("prettyPrint", "false")
7147	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratingVms")
7148	urls += "?" + c.urlParams_.Encode()
7149	req, err := http.NewRequest("GET", urls, body)
7150	if err != nil {
7151		return nil, err
7152	}
7153	req.Header = reqHeaders
7154	googleapi.Expand(req.URL, map[string]string{
7155		"parent": c.parent,
7156	})
7157	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7158}
7159
7160// Do executes the "vmmigration.projects.locations.sources.migratingVms.list" call.
7161// Exactly one of *ListMigratingVmsResponse or error will be non-nil.
7162// Any non-2xx status code is an error. Response headers are in either
7163// *ListMigratingVmsResponse.ServerResponse.Header or (if a response was
7164// returned at all) in error.(*googleapi.Error).Header. Use
7165// googleapi.IsNotModified to check whether the returned error was
7166// because http.StatusNotModified was returned.
7167func (c *ProjectsLocationsSourcesMigratingVmsListCall) Do(opts ...googleapi.CallOption) (*ListMigratingVmsResponse, error) {
7168	gensupport.SetOptions(c.urlParams_, opts...)
7169	res, err := c.doRequest("json")
7170	if res != nil && res.StatusCode == http.StatusNotModified {
7171		if res.Body != nil {
7172			res.Body.Close()
7173		}
7174		return nil, &googleapi.Error{
7175			Code:   res.StatusCode,
7176			Header: res.Header,
7177		}
7178	}
7179	if err != nil {
7180		return nil, err
7181	}
7182	defer googleapi.CloseBody(res)
7183	if err := googleapi.CheckResponse(res); err != nil {
7184		return nil, err
7185	}
7186	ret := &ListMigratingVmsResponse{
7187		ServerResponse: googleapi.ServerResponse{
7188			Header:         res.Header,
7189			HTTPStatusCode: res.StatusCode,
7190		},
7191	}
7192	target := &ret
7193	if err := gensupport.DecodeResponse(target, res); err != nil {
7194		return nil, err
7195	}
7196	return ret, nil
7197	// {
7198	//   "description": "Lists MigratingVms in a given Source.",
7199	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms",
7200	//   "httpMethod": "GET",
7201	//   "id": "vmmigration.projects.locations.sources.migratingVms.list",
7202	//   "parameterOrder": [
7203	//     "parent"
7204	//   ],
7205	//   "parameters": {
7206	//     "filter": {
7207	//       "description": "Optional. The filter request.",
7208	//       "location": "query",
7209	//       "type": "string"
7210	//     },
7211	//     "orderBy": {
7212	//       "description": "Optional. the order by fields for the result.",
7213	//       "location": "query",
7214	//       "type": "string"
7215	//     },
7216	//     "pageSize": {
7217	//       "description": "Optional. The maximum number of migrating VMs to return. The service may return fewer than this value. If unspecified, at most 500 migrating VMs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
7218	//       "format": "int32",
7219	//       "location": "query",
7220	//       "type": "integer"
7221	//     },
7222	//     "pageToken": {
7223	//       "description": "Required. A page token, received from a previous `ListMigratingVms` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMigratingVms` must match the call that provided the page token.",
7224	//       "location": "query",
7225	//       "type": "string"
7226	//     },
7227	//     "parent": {
7228	//       "description": "Required. The parent, which owns this collection of MigratingVms.",
7229	//       "location": "path",
7230	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
7231	//       "required": true,
7232	//       "type": "string"
7233	//     }
7234	//   },
7235	//   "path": "v1/{+parent}/migratingVms",
7236	//   "response": {
7237	//     "$ref": "ListMigratingVmsResponse"
7238	//   },
7239	//   "scopes": [
7240	//     "https://www.googleapis.com/auth/cloud-platform"
7241	//   ]
7242	// }
7243
7244}
7245
7246// Pages invokes f for each page of results.
7247// A non-nil error returned from f will halt the iteration.
7248// The provided context supersedes any context provided to the Context method.
7249func (c *ProjectsLocationsSourcesMigratingVmsListCall) Pages(ctx context.Context, f func(*ListMigratingVmsResponse) error) error {
7250	c.ctx_ = ctx
7251	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7252	for {
7253		x, err := c.Do()
7254		if err != nil {
7255			return err
7256		}
7257		if err := f(x); err != nil {
7258			return err
7259		}
7260		if x.NextPageToken == "" {
7261			return nil
7262		}
7263		c.PageToken(x.NextPageToken)
7264	}
7265}
7266
7267// method id "vmmigration.projects.locations.sources.migratingVms.patch":
7268
7269type ProjectsLocationsSourcesMigratingVmsPatchCall struct {
7270	s           *Service
7271	nameid      string
7272	migratingvm *MigratingVm
7273	urlParams_  gensupport.URLParams
7274	ctx_        context.Context
7275	header_     http.Header
7276}
7277
7278// Patch: Updates the parameters of a single MigratingVm.
7279//
7280// - name: Output only. The identifier of the MigratingVm.
7281func (r *ProjectsLocationsSourcesMigratingVmsService) Patch(nameid string, migratingvm *MigratingVm) *ProjectsLocationsSourcesMigratingVmsPatchCall {
7282	c := &ProjectsLocationsSourcesMigratingVmsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7283	c.nameid = nameid
7284	c.migratingvm = migratingvm
7285	return c
7286}
7287
7288// RequestId sets the optional parameter "requestId": A request ID to
7289// identify requests. Specify a unique request ID so that if you must
7290// retry your request, the server will know to ignore the request if it
7291// has already been completed. The server will guarantee that for at
7292// least 60 minutes since the first request. For example, consider a
7293// situation where you make an initial request and t he request times
7294// out. If you make the request again with the same request ID, the
7295// server can check if original operation with the same request ID was
7296// received, and if so, will ignore the second request. This prevents
7297// clients from accidentally creating duplicate commitments. The request
7298// ID must be a valid UUID with the exception that zero UUID is not
7299// supported (00000000-0000-0000-0000-000000000000).
7300func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsPatchCall {
7301	c.urlParams_.Set("requestId", requestId)
7302	return c
7303}
7304
7305// UpdateMask sets the optional parameter "updateMask": Field mask is
7306// used to specify the fields to be overwritten in the MigratingVm
7307// resource by the update. The fields specified in the update_mask are
7308// relative to the resource, not the full request. A field will be
7309// overwritten if it is in the mask. If the user does not provide a mask
7310// then all fields will be overwritten.
7311func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSourcesMigratingVmsPatchCall {
7312	c.urlParams_.Set("updateMask", updateMask)
7313	return c
7314}
7315
7316// Fields allows partial responses to be retrieved. See
7317// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7318// for more information.
7319func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsPatchCall {
7320	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7321	return c
7322}
7323
7324// Context sets the context to be used in this call's Do method. Any
7325// pending HTTP request will be aborted if the provided context is
7326// canceled.
7327func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsPatchCall {
7328	c.ctx_ = ctx
7329	return c
7330}
7331
7332// Header returns an http.Header that can be modified by the caller to
7333// add HTTP headers to the request.
7334func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Header() http.Header {
7335	if c.header_ == nil {
7336		c.header_ = make(http.Header)
7337	}
7338	return c.header_
7339}
7340
7341func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) doRequest(alt string) (*http.Response, error) {
7342	reqHeaders := make(http.Header)
7343	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7344	for k, v := range c.header_ {
7345		reqHeaders[k] = v
7346	}
7347	reqHeaders.Set("User-Agent", c.s.userAgent())
7348	var body io.Reader = nil
7349	body, err := googleapi.WithoutDataWrapper.JSONReader(c.migratingvm)
7350	if err != nil {
7351		return nil, err
7352	}
7353	reqHeaders.Set("Content-Type", "application/json")
7354	c.urlParams_.Set("alt", alt)
7355	c.urlParams_.Set("prettyPrint", "false")
7356	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7357	urls += "?" + c.urlParams_.Encode()
7358	req, err := http.NewRequest("PATCH", urls, body)
7359	if err != nil {
7360		return nil, err
7361	}
7362	req.Header = reqHeaders
7363	googleapi.Expand(req.URL, map[string]string{
7364		"name": c.nameid,
7365	})
7366	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7367}
7368
7369// Do executes the "vmmigration.projects.locations.sources.migratingVms.patch" call.
7370// Exactly one of *Operation or error will be non-nil. Any non-2xx
7371// status code is an error. Response headers are in either
7372// *Operation.ServerResponse.Header or (if a response was returned at
7373// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7374// to check whether the returned error was because
7375// http.StatusNotModified was returned.
7376func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7377	gensupport.SetOptions(c.urlParams_, opts...)
7378	res, err := c.doRequest("json")
7379	if res != nil && res.StatusCode == http.StatusNotModified {
7380		if res.Body != nil {
7381			res.Body.Close()
7382		}
7383		return nil, &googleapi.Error{
7384			Code:   res.StatusCode,
7385			Header: res.Header,
7386		}
7387	}
7388	if err != nil {
7389		return nil, err
7390	}
7391	defer googleapi.CloseBody(res)
7392	if err := googleapi.CheckResponse(res); err != nil {
7393		return nil, err
7394	}
7395	ret := &Operation{
7396		ServerResponse: googleapi.ServerResponse{
7397			Header:         res.Header,
7398			HTTPStatusCode: res.StatusCode,
7399		},
7400	}
7401	target := &ret
7402	if err := gensupport.DecodeResponse(target, res); err != nil {
7403		return nil, err
7404	}
7405	return ret, nil
7406	// {
7407	//   "description": "Updates the parameters of a single MigratingVm.",
7408	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}",
7409	//   "httpMethod": "PATCH",
7410	//   "id": "vmmigration.projects.locations.sources.migratingVms.patch",
7411	//   "parameterOrder": [
7412	//     "name"
7413	//   ],
7414	//   "parameters": {
7415	//     "name": {
7416	//       "description": "Output only. The identifier of the MigratingVm.",
7417	//       "location": "path",
7418	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
7419	//       "required": true,
7420	//       "type": "string"
7421	//     },
7422	//     "requestId": {
7423	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
7424	//       "location": "query",
7425	//       "type": "string"
7426	//     },
7427	//     "updateMask": {
7428	//       "description": "Field mask is used to specify the fields to be overwritten in the MigratingVm resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.",
7429	//       "format": "google-fieldmask",
7430	//       "location": "query",
7431	//       "type": "string"
7432	//     }
7433	//   },
7434	//   "path": "v1/{+name}",
7435	//   "request": {
7436	//     "$ref": "MigratingVm"
7437	//   },
7438	//   "response": {
7439	//     "$ref": "Operation"
7440	//   },
7441	//   "scopes": [
7442	//     "https://www.googleapis.com/auth/cloud-platform"
7443	//   ]
7444	// }
7445
7446}
7447
7448// method id "vmmigration.projects.locations.sources.migratingVms.pauseMigration":
7449
7450type ProjectsLocationsSourcesMigratingVmsPauseMigrationCall struct {
7451	s                     *Service
7452	migratingVm           string
7453	pausemigrationrequest *PauseMigrationRequest
7454	urlParams_            gensupport.URLParams
7455	ctx_                  context.Context
7456	header_               http.Header
7457}
7458
7459// PauseMigration: Pauses a migration for a VM. If cycle tasks are
7460// running they will be cancelled, preserving source task data. Further
7461// replication cycles will not be triggered while the VM is paused.
7462//
7463// - migratingVm: The name of the MigratingVm.
7464func (r *ProjectsLocationsSourcesMigratingVmsService) PauseMigration(migratingVm string, pausemigrationrequest *PauseMigrationRequest) *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall {
7465	c := &ProjectsLocationsSourcesMigratingVmsPauseMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7466	c.migratingVm = migratingVm
7467	c.pausemigrationrequest = pausemigrationrequest
7468	return c
7469}
7470
7471// Fields allows partial responses to be retrieved. See
7472// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7473// for more information.
7474func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall {
7475	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7476	return c
7477}
7478
7479// Context sets the context to be used in this call's Do method. Any
7480// pending HTTP request will be aborted if the provided context is
7481// canceled.
7482func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall {
7483	c.ctx_ = ctx
7484	return c
7485}
7486
7487// Header returns an http.Header that can be modified by the caller to
7488// add HTTP headers to the request.
7489func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Header() http.Header {
7490	if c.header_ == nil {
7491		c.header_ = make(http.Header)
7492	}
7493	return c.header_
7494}
7495
7496func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) doRequest(alt string) (*http.Response, error) {
7497	reqHeaders := make(http.Header)
7498	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7499	for k, v := range c.header_ {
7500		reqHeaders[k] = v
7501	}
7502	reqHeaders.Set("User-Agent", c.s.userAgent())
7503	var body io.Reader = nil
7504	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pausemigrationrequest)
7505	if err != nil {
7506		return nil, err
7507	}
7508	reqHeaders.Set("Content-Type", "application/json")
7509	c.urlParams_.Set("alt", alt)
7510	c.urlParams_.Set("prettyPrint", "false")
7511	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migratingVm}:pauseMigration")
7512	urls += "?" + c.urlParams_.Encode()
7513	req, err := http.NewRequest("POST", urls, body)
7514	if err != nil {
7515		return nil, err
7516	}
7517	req.Header = reqHeaders
7518	googleapi.Expand(req.URL, map[string]string{
7519		"migratingVm": c.migratingVm,
7520	})
7521	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7522}
7523
7524// Do executes the "vmmigration.projects.locations.sources.migratingVms.pauseMigration" call.
7525// Exactly one of *Operation or error will be non-nil. Any non-2xx
7526// status code is an error. Response headers are in either
7527// *Operation.ServerResponse.Header or (if a response was returned at
7528// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7529// to check whether the returned error was because
7530// http.StatusNotModified was returned.
7531func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7532	gensupport.SetOptions(c.urlParams_, opts...)
7533	res, err := c.doRequest("json")
7534	if res != nil && res.StatusCode == http.StatusNotModified {
7535		if res.Body != nil {
7536			res.Body.Close()
7537		}
7538		return nil, &googleapi.Error{
7539			Code:   res.StatusCode,
7540			Header: res.Header,
7541		}
7542	}
7543	if err != nil {
7544		return nil, err
7545	}
7546	defer googleapi.CloseBody(res)
7547	if err := googleapi.CheckResponse(res); err != nil {
7548		return nil, err
7549	}
7550	ret := &Operation{
7551		ServerResponse: googleapi.ServerResponse{
7552			Header:         res.Header,
7553			HTTPStatusCode: res.StatusCode,
7554		},
7555	}
7556	target := &ret
7557	if err := gensupport.DecodeResponse(target, res); err != nil {
7558		return nil, err
7559	}
7560	return ret, nil
7561	// {
7562	//   "description": "Pauses a migration for a VM. If cycle tasks are running they will be cancelled, preserving source task data. Further replication cycles will not be triggered while the VM is paused.",
7563	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:pauseMigration",
7564	//   "httpMethod": "POST",
7565	//   "id": "vmmigration.projects.locations.sources.migratingVms.pauseMigration",
7566	//   "parameterOrder": [
7567	//     "migratingVm"
7568	//   ],
7569	//   "parameters": {
7570	//     "migratingVm": {
7571	//       "description": "Required. The name of the MigratingVm.",
7572	//       "location": "path",
7573	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
7574	//       "required": true,
7575	//       "type": "string"
7576	//     }
7577	//   },
7578	//   "path": "v1/{+migratingVm}:pauseMigration",
7579	//   "request": {
7580	//     "$ref": "PauseMigrationRequest"
7581	//   },
7582	//   "response": {
7583	//     "$ref": "Operation"
7584	//   },
7585	//   "scopes": [
7586	//     "https://www.googleapis.com/auth/cloud-platform"
7587	//   ]
7588	// }
7589
7590}
7591
7592// method id "vmmigration.projects.locations.sources.migratingVms.resumeMigration":
7593
7594type ProjectsLocationsSourcesMigratingVmsResumeMigrationCall struct {
7595	s                      *Service
7596	migratingVm            string
7597	resumemigrationrequest *ResumeMigrationRequest
7598	urlParams_             gensupport.URLParams
7599	ctx_                   context.Context
7600	header_                http.Header
7601}
7602
7603// ResumeMigration: Resumes a migration for a VM. When called on a
7604// paused migration, will start the process of uploading data and
7605// creating snapshots; when called on a completed cut-over migration,
7606// will update the migration to active state and start the process of
7607// uploading data and creating snapshots.
7608//
7609// - migratingVm: The name of the MigratingVm.
7610func (r *ProjectsLocationsSourcesMigratingVmsService) ResumeMigration(migratingVm string, resumemigrationrequest *ResumeMigrationRequest) *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall {
7611	c := &ProjectsLocationsSourcesMigratingVmsResumeMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7612	c.migratingVm = migratingVm
7613	c.resumemigrationrequest = resumemigrationrequest
7614	return c
7615}
7616
7617// Fields allows partial responses to be retrieved. See
7618// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7619// for more information.
7620func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall {
7621	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7622	return c
7623}
7624
7625// Context sets the context to be used in this call's Do method. Any
7626// pending HTTP request will be aborted if the provided context is
7627// canceled.
7628func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall {
7629	c.ctx_ = ctx
7630	return c
7631}
7632
7633// Header returns an http.Header that can be modified by the caller to
7634// add HTTP headers to the request.
7635func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Header() http.Header {
7636	if c.header_ == nil {
7637		c.header_ = make(http.Header)
7638	}
7639	return c.header_
7640}
7641
7642func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) doRequest(alt string) (*http.Response, error) {
7643	reqHeaders := make(http.Header)
7644	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7645	for k, v := range c.header_ {
7646		reqHeaders[k] = v
7647	}
7648	reqHeaders.Set("User-Agent", c.s.userAgent())
7649	var body io.Reader = nil
7650	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumemigrationrequest)
7651	if err != nil {
7652		return nil, err
7653	}
7654	reqHeaders.Set("Content-Type", "application/json")
7655	c.urlParams_.Set("alt", alt)
7656	c.urlParams_.Set("prettyPrint", "false")
7657	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migratingVm}:resumeMigration")
7658	urls += "?" + c.urlParams_.Encode()
7659	req, err := http.NewRequest("POST", urls, body)
7660	if err != nil {
7661		return nil, err
7662	}
7663	req.Header = reqHeaders
7664	googleapi.Expand(req.URL, map[string]string{
7665		"migratingVm": c.migratingVm,
7666	})
7667	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7668}
7669
7670// Do executes the "vmmigration.projects.locations.sources.migratingVms.resumeMigration" call.
7671// Exactly one of *Operation or error will be non-nil. Any non-2xx
7672// status code is an error. Response headers are in either
7673// *Operation.ServerResponse.Header or (if a response was returned at
7674// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7675// to check whether the returned error was because
7676// http.StatusNotModified was returned.
7677func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7678	gensupport.SetOptions(c.urlParams_, opts...)
7679	res, err := c.doRequest("json")
7680	if res != nil && res.StatusCode == http.StatusNotModified {
7681		if res.Body != nil {
7682			res.Body.Close()
7683		}
7684		return nil, &googleapi.Error{
7685			Code:   res.StatusCode,
7686			Header: res.Header,
7687		}
7688	}
7689	if err != nil {
7690		return nil, err
7691	}
7692	defer googleapi.CloseBody(res)
7693	if err := googleapi.CheckResponse(res); err != nil {
7694		return nil, err
7695	}
7696	ret := &Operation{
7697		ServerResponse: googleapi.ServerResponse{
7698			Header:         res.Header,
7699			HTTPStatusCode: res.StatusCode,
7700		},
7701	}
7702	target := &ret
7703	if err := gensupport.DecodeResponse(target, res); err != nil {
7704		return nil, err
7705	}
7706	return ret, nil
7707	// {
7708	//   "description": "Resumes a migration for a VM. When called on a paused migration, will start the process of uploading data and creating snapshots; when called on a completed cut-over migration, will update the migration to active state and start the process of uploading data and creating snapshots.",
7709	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:resumeMigration",
7710	//   "httpMethod": "POST",
7711	//   "id": "vmmigration.projects.locations.sources.migratingVms.resumeMigration",
7712	//   "parameterOrder": [
7713	//     "migratingVm"
7714	//   ],
7715	//   "parameters": {
7716	//     "migratingVm": {
7717	//       "description": "Required. The name of the MigratingVm.",
7718	//       "location": "path",
7719	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
7720	//       "required": true,
7721	//       "type": "string"
7722	//     }
7723	//   },
7724	//   "path": "v1/{+migratingVm}:resumeMigration",
7725	//   "request": {
7726	//     "$ref": "ResumeMigrationRequest"
7727	//   },
7728	//   "response": {
7729	//     "$ref": "Operation"
7730	//   },
7731	//   "scopes": [
7732	//     "https://www.googleapis.com/auth/cloud-platform"
7733	//   ]
7734	// }
7735
7736}
7737
7738// method id "vmmigration.projects.locations.sources.migratingVms.startMigration":
7739
7740type ProjectsLocationsSourcesMigratingVmsStartMigrationCall struct {
7741	s                     *Service
7742	migratingVm           string
7743	startmigrationrequest *StartMigrationRequest
7744	urlParams_            gensupport.URLParams
7745	ctx_                  context.Context
7746	header_               http.Header
7747}
7748
7749// StartMigration: Starts migration for a VM. Starts the process of
7750// uploading data and creating snapshots, in replication cycles
7751// scheduled by the policy.
7752//
7753// - migratingVm: The name of the MigratingVm.
7754func (r *ProjectsLocationsSourcesMigratingVmsService) StartMigration(migratingVm string, startmigrationrequest *StartMigrationRequest) *ProjectsLocationsSourcesMigratingVmsStartMigrationCall {
7755	c := &ProjectsLocationsSourcesMigratingVmsStartMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7756	c.migratingVm = migratingVm
7757	c.startmigrationrequest = startmigrationrequest
7758	return c
7759}
7760
7761// Fields allows partial responses to be retrieved. See
7762// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7763// for more information.
7764func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsStartMigrationCall {
7765	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7766	return c
7767}
7768
7769// Context sets the context to be used in this call's Do method. Any
7770// pending HTTP request will be aborted if the provided context is
7771// canceled.
7772func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsStartMigrationCall {
7773	c.ctx_ = ctx
7774	return c
7775}
7776
7777// Header returns an http.Header that can be modified by the caller to
7778// add HTTP headers to the request.
7779func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Header() http.Header {
7780	if c.header_ == nil {
7781		c.header_ = make(http.Header)
7782	}
7783	return c.header_
7784}
7785
7786func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) doRequest(alt string) (*http.Response, error) {
7787	reqHeaders := make(http.Header)
7788	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7789	for k, v := range c.header_ {
7790		reqHeaders[k] = v
7791	}
7792	reqHeaders.Set("User-Agent", c.s.userAgent())
7793	var body io.Reader = nil
7794	body, err := googleapi.WithoutDataWrapper.JSONReader(c.startmigrationrequest)
7795	if err != nil {
7796		return nil, err
7797	}
7798	reqHeaders.Set("Content-Type", "application/json")
7799	c.urlParams_.Set("alt", alt)
7800	c.urlParams_.Set("prettyPrint", "false")
7801	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migratingVm}:startMigration")
7802	urls += "?" + c.urlParams_.Encode()
7803	req, err := http.NewRequest("POST", urls, body)
7804	if err != nil {
7805		return nil, err
7806	}
7807	req.Header = reqHeaders
7808	googleapi.Expand(req.URL, map[string]string{
7809		"migratingVm": c.migratingVm,
7810	})
7811	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7812}
7813
7814// Do executes the "vmmigration.projects.locations.sources.migratingVms.startMigration" call.
7815// Exactly one of *Operation or error will be non-nil. Any non-2xx
7816// status code is an error. Response headers are in either
7817// *Operation.ServerResponse.Header or (if a response was returned at
7818// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7819// to check whether the returned error was because
7820// http.StatusNotModified was returned.
7821func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7822	gensupport.SetOptions(c.urlParams_, opts...)
7823	res, err := c.doRequest("json")
7824	if res != nil && res.StatusCode == http.StatusNotModified {
7825		if res.Body != nil {
7826			res.Body.Close()
7827		}
7828		return nil, &googleapi.Error{
7829			Code:   res.StatusCode,
7830			Header: res.Header,
7831		}
7832	}
7833	if err != nil {
7834		return nil, err
7835	}
7836	defer googleapi.CloseBody(res)
7837	if err := googleapi.CheckResponse(res); err != nil {
7838		return nil, err
7839	}
7840	ret := &Operation{
7841		ServerResponse: googleapi.ServerResponse{
7842			Header:         res.Header,
7843			HTTPStatusCode: res.StatusCode,
7844		},
7845	}
7846	target := &ret
7847	if err := gensupport.DecodeResponse(target, res); err != nil {
7848		return nil, err
7849	}
7850	return ret, nil
7851	// {
7852	//   "description": "Starts migration for a VM. Starts the process of uploading data and creating snapshots, in replication cycles scheduled by the policy.",
7853	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:startMigration",
7854	//   "httpMethod": "POST",
7855	//   "id": "vmmigration.projects.locations.sources.migratingVms.startMigration",
7856	//   "parameterOrder": [
7857	//     "migratingVm"
7858	//   ],
7859	//   "parameters": {
7860	//     "migratingVm": {
7861	//       "description": "Required. The name of the MigratingVm.",
7862	//       "location": "path",
7863	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
7864	//       "required": true,
7865	//       "type": "string"
7866	//     }
7867	//   },
7868	//   "path": "v1/{+migratingVm}:startMigration",
7869	//   "request": {
7870	//     "$ref": "StartMigrationRequest"
7871	//   },
7872	//   "response": {
7873	//     "$ref": "Operation"
7874	//   },
7875	//   "scopes": [
7876	//     "https://www.googleapis.com/auth/cloud-platform"
7877	//   ]
7878	// }
7879
7880}
7881
7882// method id "vmmigration.projects.locations.sources.migratingVms.cloneJobs.cancel":
7883
7884type ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall struct {
7885	s                     *Service
7886	name                  string
7887	cancelclonejobrequest *CancelCloneJobRequest
7888	urlParams_            gensupport.URLParams
7889	ctx_                  context.Context
7890	header_               http.Header
7891}
7892
7893// Cancel: Initiates the cancellation of a running clone job.
7894//
7895// - name: The clone job id.
7896func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) Cancel(name string, cancelclonejobrequest *CancelCloneJobRequest) *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall {
7897	c := &ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7898	c.name = name
7899	c.cancelclonejobrequest = cancelclonejobrequest
7900	return c
7901}
7902
7903// Fields allows partial responses to be retrieved. See
7904// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7905// for more information.
7906func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall {
7907	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7908	return c
7909}
7910
7911// Context sets the context to be used in this call's Do method. Any
7912// pending HTTP request will be aborted if the provided context is
7913// canceled.
7914func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall {
7915	c.ctx_ = ctx
7916	return c
7917}
7918
7919// Header returns an http.Header that can be modified by the caller to
7920// add HTTP headers to the request.
7921func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Header() http.Header {
7922	if c.header_ == nil {
7923		c.header_ = make(http.Header)
7924	}
7925	return c.header_
7926}
7927
7928func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) doRequest(alt string) (*http.Response, error) {
7929	reqHeaders := make(http.Header)
7930	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7931	for k, v := range c.header_ {
7932		reqHeaders[k] = v
7933	}
7934	reqHeaders.Set("User-Agent", c.s.userAgent())
7935	var body io.Reader = nil
7936	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelclonejobrequest)
7937	if err != nil {
7938		return nil, err
7939	}
7940	reqHeaders.Set("Content-Type", "application/json")
7941	c.urlParams_.Set("alt", alt)
7942	c.urlParams_.Set("prettyPrint", "false")
7943	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
7944	urls += "?" + c.urlParams_.Encode()
7945	req, err := http.NewRequest("POST", urls, body)
7946	if err != nil {
7947		return nil, err
7948	}
7949	req.Header = reqHeaders
7950	googleapi.Expand(req.URL, map[string]string{
7951		"name": c.name,
7952	})
7953	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7954}
7955
7956// Do executes the "vmmigration.projects.locations.sources.migratingVms.cloneJobs.cancel" call.
7957// Exactly one of *Operation or error will be non-nil. Any non-2xx
7958// status code is an error. Response headers are in either
7959// *Operation.ServerResponse.Header or (if a response was returned at
7960// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7961// to check whether the returned error was because
7962// http.StatusNotModified was returned.
7963func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7964	gensupport.SetOptions(c.urlParams_, opts...)
7965	res, err := c.doRequest("json")
7966	if res != nil && res.StatusCode == http.StatusNotModified {
7967		if res.Body != nil {
7968			res.Body.Close()
7969		}
7970		return nil, &googleapi.Error{
7971			Code:   res.StatusCode,
7972			Header: res.Header,
7973		}
7974	}
7975	if err != nil {
7976		return nil, err
7977	}
7978	defer googleapi.CloseBody(res)
7979	if err := googleapi.CheckResponse(res); err != nil {
7980		return nil, err
7981	}
7982	ret := &Operation{
7983		ServerResponse: googleapi.ServerResponse{
7984			Header:         res.Header,
7985			HTTPStatusCode: res.StatusCode,
7986		},
7987	}
7988	target := &ret
7989	if err := gensupport.DecodeResponse(target, res); err != nil {
7990		return nil, err
7991	}
7992	return ret, nil
7993	// {
7994	//   "description": "Initiates the cancellation of a running clone job.",
7995	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs/{cloneJobsId}:cancel",
7996	//   "httpMethod": "POST",
7997	//   "id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.cancel",
7998	//   "parameterOrder": [
7999	//     "name"
8000	//   ],
8001	//   "parameters": {
8002	//     "name": {
8003	//       "description": "Required. The clone job id",
8004	//       "location": "path",
8005	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cloneJobs/[^/]+$",
8006	//       "required": true,
8007	//       "type": "string"
8008	//     }
8009	//   },
8010	//   "path": "v1/{+name}:cancel",
8011	//   "request": {
8012	//     "$ref": "CancelCloneJobRequest"
8013	//   },
8014	//   "response": {
8015	//     "$ref": "Operation"
8016	//   },
8017	//   "scopes": [
8018	//     "https://www.googleapis.com/auth/cloud-platform"
8019	//   ]
8020	// }
8021
8022}
8023
8024// method id "vmmigration.projects.locations.sources.migratingVms.cloneJobs.create":
8025
8026type ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall struct {
8027	s          *Service
8028	parent     string
8029	clonejob   *CloneJob
8030	urlParams_ gensupport.URLParams
8031	ctx_       context.Context
8032	header_    http.Header
8033}
8034
8035// Create: Initiates a Clone of a specific migrating VM.
8036//
8037// - parent: The Clone's parent.
8038func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) Create(parent string, clonejob *CloneJob) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8039	c := &ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8040	c.parent = parent
8041	c.clonejob = clonejob
8042	return c
8043}
8044
8045// CloneJobId sets the optional parameter "cloneJobId": Required. The
8046// clone job identifier.
8047func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) CloneJobId(cloneJobId string) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8048	c.urlParams_.Set("cloneJobId", cloneJobId)
8049	return c
8050}
8051
8052// RequestId sets the optional parameter "requestId": A request ID to
8053// identify requests. Specify a unique request ID so that if you must
8054// retry your request, the server will know to ignore the request if it
8055// has already been completed. The server will guarantee that for at
8056// least 60 minutes since the first request. For example, consider a
8057// situation where you make an initial request and t he request times
8058// out. If you make the request again with the same request ID, the
8059// server can check if original operation with the same request ID was
8060// received, and if so, will ignore the second request. This prevents
8061// clients from accidentally creating duplicate commitments. The request
8062// ID must be a valid UUID with the exception that zero UUID is not
8063// supported (00000000-0000-0000-0000-000000000000).
8064func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8065	c.urlParams_.Set("requestId", requestId)
8066	return c
8067}
8068
8069// Fields allows partial responses to be retrieved. See
8070// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8071// for more information.
8072func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8073	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8074	return c
8075}
8076
8077// Context sets the context to be used in this call's Do method. Any
8078// pending HTTP request will be aborted if the provided context is
8079// canceled.
8080func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8081	c.ctx_ = ctx
8082	return c
8083}
8084
8085// Header returns an http.Header that can be modified by the caller to
8086// add HTTP headers to the request.
8087func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Header() http.Header {
8088	if c.header_ == nil {
8089		c.header_ = make(http.Header)
8090	}
8091	return c.header_
8092}
8093
8094func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) doRequest(alt string) (*http.Response, error) {
8095	reqHeaders := make(http.Header)
8096	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8097	for k, v := range c.header_ {
8098		reqHeaders[k] = v
8099	}
8100	reqHeaders.Set("User-Agent", c.s.userAgent())
8101	var body io.Reader = nil
8102	body, err := googleapi.WithoutDataWrapper.JSONReader(c.clonejob)
8103	if err != nil {
8104		return nil, err
8105	}
8106	reqHeaders.Set("Content-Type", "application/json")
8107	c.urlParams_.Set("alt", alt)
8108	c.urlParams_.Set("prettyPrint", "false")
8109	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cloneJobs")
8110	urls += "?" + c.urlParams_.Encode()
8111	req, err := http.NewRequest("POST", urls, body)
8112	if err != nil {
8113		return nil, err
8114	}
8115	req.Header = reqHeaders
8116	googleapi.Expand(req.URL, map[string]string{
8117		"parent": c.parent,
8118	})
8119	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8120}
8121
8122// Do executes the "vmmigration.projects.locations.sources.migratingVms.cloneJobs.create" call.
8123// Exactly one of *Operation or error will be non-nil. Any non-2xx
8124// status code is an error. Response headers are in either
8125// *Operation.ServerResponse.Header or (if a response was returned at
8126// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8127// to check whether the returned error was because
8128// http.StatusNotModified was returned.
8129func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8130	gensupport.SetOptions(c.urlParams_, opts...)
8131	res, err := c.doRequest("json")
8132	if res != nil && res.StatusCode == http.StatusNotModified {
8133		if res.Body != nil {
8134			res.Body.Close()
8135		}
8136		return nil, &googleapi.Error{
8137			Code:   res.StatusCode,
8138			Header: res.Header,
8139		}
8140	}
8141	if err != nil {
8142		return nil, err
8143	}
8144	defer googleapi.CloseBody(res)
8145	if err := googleapi.CheckResponse(res); err != nil {
8146		return nil, err
8147	}
8148	ret := &Operation{
8149		ServerResponse: googleapi.ServerResponse{
8150			Header:         res.Header,
8151			HTTPStatusCode: res.StatusCode,
8152		},
8153	}
8154	target := &ret
8155	if err := gensupport.DecodeResponse(target, res); err != nil {
8156		return nil, err
8157	}
8158	return ret, nil
8159	// {
8160	//   "description": "Initiates a Clone of a specific migrating VM.",
8161	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs",
8162	//   "httpMethod": "POST",
8163	//   "id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.create",
8164	//   "parameterOrder": [
8165	//     "parent"
8166	//   ],
8167	//   "parameters": {
8168	//     "cloneJobId": {
8169	//       "description": "Required. The clone job identifier.",
8170	//       "location": "query",
8171	//       "type": "string"
8172	//     },
8173	//     "parent": {
8174	//       "description": "Required. The Clone's parent.",
8175	//       "location": "path",
8176	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
8177	//       "required": true,
8178	//       "type": "string"
8179	//     },
8180	//     "requestId": {
8181	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
8182	//       "location": "query",
8183	//       "type": "string"
8184	//     }
8185	//   },
8186	//   "path": "v1/{+parent}/cloneJobs",
8187	//   "request": {
8188	//     "$ref": "CloneJob"
8189	//   },
8190	//   "response": {
8191	//     "$ref": "Operation"
8192	//   },
8193	//   "scopes": [
8194	//     "https://www.googleapis.com/auth/cloud-platform"
8195	//   ]
8196	// }
8197
8198}
8199
8200// method id "vmmigration.projects.locations.sources.migratingVms.cloneJobs.get":
8201
8202type ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall struct {
8203	s            *Service
8204	name         string
8205	urlParams_   gensupport.URLParams
8206	ifNoneMatch_ string
8207	ctx_         context.Context
8208	header_      http.Header
8209}
8210
8211// Get: Gets details of a single CloneJob.
8212//
8213// - name: The name of the CloneJob.
8214func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) Get(name string) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
8215	c := &ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8216	c.name = name
8217	return c
8218}
8219
8220// Fields allows partial responses to be retrieved. See
8221// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8222// for more information.
8223func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
8224	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8225	return c
8226}
8227
8228// IfNoneMatch sets the optional parameter which makes the operation
8229// fail if the object's ETag matches the given value. This is useful for
8230// getting updates only after the object has changed since the last
8231// request. Use googleapi.IsNotModified to check whether the response
8232// error from Do is the result of In-None-Match.
8233func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
8234	c.ifNoneMatch_ = entityTag
8235	return c
8236}
8237
8238// Context sets the context to be used in this call's Do method. Any
8239// pending HTTP request will be aborted if the provided context is
8240// canceled.
8241func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
8242	c.ctx_ = ctx
8243	return c
8244}
8245
8246// Header returns an http.Header that can be modified by the caller to
8247// add HTTP headers to the request.
8248func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Header() http.Header {
8249	if c.header_ == nil {
8250		c.header_ = make(http.Header)
8251	}
8252	return c.header_
8253}
8254
8255func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) doRequest(alt string) (*http.Response, error) {
8256	reqHeaders := make(http.Header)
8257	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8258	for k, v := range c.header_ {
8259		reqHeaders[k] = v
8260	}
8261	reqHeaders.Set("User-Agent", c.s.userAgent())
8262	if c.ifNoneMatch_ != "" {
8263		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8264	}
8265	var body io.Reader = nil
8266	c.urlParams_.Set("alt", alt)
8267	c.urlParams_.Set("prettyPrint", "false")
8268	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8269	urls += "?" + c.urlParams_.Encode()
8270	req, err := http.NewRequest("GET", urls, body)
8271	if err != nil {
8272		return nil, err
8273	}
8274	req.Header = reqHeaders
8275	googleapi.Expand(req.URL, map[string]string{
8276		"name": c.name,
8277	})
8278	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8279}
8280
8281// Do executes the "vmmigration.projects.locations.sources.migratingVms.cloneJobs.get" call.
8282// Exactly one of *CloneJob or error will be non-nil. Any non-2xx status
8283// code is an error. Response headers are in either
8284// *CloneJob.ServerResponse.Header or (if a response was returned at
8285// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8286// to check whether the returned error was because
8287// http.StatusNotModified was returned.
8288func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Do(opts ...googleapi.CallOption) (*CloneJob, error) {
8289	gensupport.SetOptions(c.urlParams_, opts...)
8290	res, err := c.doRequest("json")
8291	if res != nil && res.StatusCode == http.StatusNotModified {
8292		if res.Body != nil {
8293			res.Body.Close()
8294		}
8295		return nil, &googleapi.Error{
8296			Code:   res.StatusCode,
8297			Header: res.Header,
8298		}
8299	}
8300	if err != nil {
8301		return nil, err
8302	}
8303	defer googleapi.CloseBody(res)
8304	if err := googleapi.CheckResponse(res); err != nil {
8305		return nil, err
8306	}
8307	ret := &CloneJob{
8308		ServerResponse: googleapi.ServerResponse{
8309			Header:         res.Header,
8310			HTTPStatusCode: res.StatusCode,
8311		},
8312	}
8313	target := &ret
8314	if err := gensupport.DecodeResponse(target, res); err != nil {
8315		return nil, err
8316	}
8317	return ret, nil
8318	// {
8319	//   "description": "Gets details of a single CloneJob.",
8320	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs/{cloneJobsId}",
8321	//   "httpMethod": "GET",
8322	//   "id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.get",
8323	//   "parameterOrder": [
8324	//     "name"
8325	//   ],
8326	//   "parameters": {
8327	//     "name": {
8328	//       "description": "Required. The name of the CloneJob.",
8329	//       "location": "path",
8330	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cloneJobs/[^/]+$",
8331	//       "required": true,
8332	//       "type": "string"
8333	//     }
8334	//   },
8335	//   "path": "v1/{+name}",
8336	//   "response": {
8337	//     "$ref": "CloneJob"
8338	//   },
8339	//   "scopes": [
8340	//     "https://www.googleapis.com/auth/cloud-platform"
8341	//   ]
8342	// }
8343
8344}
8345
8346// method id "vmmigration.projects.locations.sources.migratingVms.cloneJobs.list":
8347
8348type ProjectsLocationsSourcesMigratingVmsCloneJobsListCall struct {
8349	s            *Service
8350	parent       string
8351	urlParams_   gensupport.URLParams
8352	ifNoneMatch_ string
8353	ctx_         context.Context
8354	header_      http.Header
8355}
8356
8357// List: Lists CloneJobs of a given migrating VM.
8358//
8359// - parent: The parent, which owns this collection of source VMs.
8360func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) List(parent string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8361	c := &ProjectsLocationsSourcesMigratingVmsCloneJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8362	c.parent = parent
8363	return c
8364}
8365
8366// Filter sets the optional parameter "filter": The filter request.
8367func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8368	c.urlParams_.Set("filter", filter)
8369	return c
8370}
8371
8372// OrderBy sets the optional parameter "orderBy": the order by fields
8373// for the result.
8374func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8375	c.urlParams_.Set("orderBy", orderBy)
8376	return c
8377}
8378
8379// PageSize sets the optional parameter "pageSize": The maximum number
8380// of clone jobs to return. The service may return fewer than this
8381// value. If unspecified, at most 500 clone jobs will be returned. The
8382// maximum value is 1000; values above 1000 will be coerced to 1000.
8383func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8384	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8385	return c
8386}
8387
8388// PageToken sets the optional parameter "pageToken": Required. A page
8389// token, received from a previous `ListCloneJobs` call. Provide this to
8390// retrieve the subsequent page. When paginating, all other parameters
8391// provided to `ListCloneJobs` must match the call that provided the
8392// page token.
8393func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8394	c.urlParams_.Set("pageToken", pageToken)
8395	return c
8396}
8397
8398// Fields allows partial responses to be retrieved. See
8399// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8400// for more information.
8401func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8402	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8403	return c
8404}
8405
8406// IfNoneMatch sets the optional parameter which makes the operation
8407// fail if the object's ETag matches the given value. This is useful for
8408// getting updates only after the object has changed since the last
8409// request. Use googleapi.IsNotModified to check whether the response
8410// error from Do is the result of In-None-Match.
8411func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8412	c.ifNoneMatch_ = entityTag
8413	return c
8414}
8415
8416// Context sets the context to be used in this call's Do method. Any
8417// pending HTTP request will be aborted if the provided context is
8418// canceled.
8419func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8420	c.ctx_ = ctx
8421	return c
8422}
8423
8424// Header returns an http.Header that can be modified by the caller to
8425// add HTTP headers to the request.
8426func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Header() http.Header {
8427	if c.header_ == nil {
8428		c.header_ = make(http.Header)
8429	}
8430	return c.header_
8431}
8432
8433func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) doRequest(alt string) (*http.Response, error) {
8434	reqHeaders := make(http.Header)
8435	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8436	for k, v := range c.header_ {
8437		reqHeaders[k] = v
8438	}
8439	reqHeaders.Set("User-Agent", c.s.userAgent())
8440	if c.ifNoneMatch_ != "" {
8441		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8442	}
8443	var body io.Reader = nil
8444	c.urlParams_.Set("alt", alt)
8445	c.urlParams_.Set("prettyPrint", "false")
8446	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cloneJobs")
8447	urls += "?" + c.urlParams_.Encode()
8448	req, err := http.NewRequest("GET", urls, body)
8449	if err != nil {
8450		return nil, err
8451	}
8452	req.Header = reqHeaders
8453	googleapi.Expand(req.URL, map[string]string{
8454		"parent": c.parent,
8455	})
8456	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8457}
8458
8459// Do executes the "vmmigration.projects.locations.sources.migratingVms.cloneJobs.list" call.
8460// Exactly one of *ListCloneJobsResponse or error will be non-nil. Any
8461// non-2xx status code is an error. Response headers are in either
8462// *ListCloneJobsResponse.ServerResponse.Header or (if a response was
8463// returned at all) in error.(*googleapi.Error).Header. Use
8464// googleapi.IsNotModified to check whether the returned error was
8465// because http.StatusNotModified was returned.
8466func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Do(opts ...googleapi.CallOption) (*ListCloneJobsResponse, error) {
8467	gensupport.SetOptions(c.urlParams_, opts...)
8468	res, err := c.doRequest("json")
8469	if res != nil && res.StatusCode == http.StatusNotModified {
8470		if res.Body != nil {
8471			res.Body.Close()
8472		}
8473		return nil, &googleapi.Error{
8474			Code:   res.StatusCode,
8475			Header: res.Header,
8476		}
8477	}
8478	if err != nil {
8479		return nil, err
8480	}
8481	defer googleapi.CloseBody(res)
8482	if err := googleapi.CheckResponse(res); err != nil {
8483		return nil, err
8484	}
8485	ret := &ListCloneJobsResponse{
8486		ServerResponse: googleapi.ServerResponse{
8487			Header:         res.Header,
8488			HTTPStatusCode: res.StatusCode,
8489		},
8490	}
8491	target := &ret
8492	if err := gensupport.DecodeResponse(target, res); err != nil {
8493		return nil, err
8494	}
8495	return ret, nil
8496	// {
8497	//   "description": "Lists CloneJobs of a given migrating VM.",
8498	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs",
8499	//   "httpMethod": "GET",
8500	//   "id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.list",
8501	//   "parameterOrder": [
8502	//     "parent"
8503	//   ],
8504	//   "parameters": {
8505	//     "filter": {
8506	//       "description": "Optional. The filter request.",
8507	//       "location": "query",
8508	//       "type": "string"
8509	//     },
8510	//     "orderBy": {
8511	//       "description": "Optional. the order by fields for the result.",
8512	//       "location": "query",
8513	//       "type": "string"
8514	//     },
8515	//     "pageSize": {
8516	//       "description": "Optional. The maximum number of clone jobs to return. The service may return fewer than this value. If unspecified, at most 500 clone jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
8517	//       "format": "int32",
8518	//       "location": "query",
8519	//       "type": "integer"
8520	//     },
8521	//     "pageToken": {
8522	//       "description": "Required. A page token, received from a previous `ListCloneJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCloneJobs` must match the call that provided the page token.",
8523	//       "location": "query",
8524	//       "type": "string"
8525	//     },
8526	//     "parent": {
8527	//       "description": "Required. The parent, which owns this collection of source VMs.",
8528	//       "location": "path",
8529	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
8530	//       "required": true,
8531	//       "type": "string"
8532	//     }
8533	//   },
8534	//   "path": "v1/{+parent}/cloneJobs",
8535	//   "response": {
8536	//     "$ref": "ListCloneJobsResponse"
8537	//   },
8538	//   "scopes": [
8539	//     "https://www.googleapis.com/auth/cloud-platform"
8540	//   ]
8541	// }
8542
8543}
8544
8545// Pages invokes f for each page of results.
8546// A non-nil error returned from f will halt the iteration.
8547// The provided context supersedes any context provided to the Context method.
8548func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Pages(ctx context.Context, f func(*ListCloneJobsResponse) error) error {
8549	c.ctx_ = ctx
8550	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8551	for {
8552		x, err := c.Do()
8553		if err != nil {
8554			return err
8555		}
8556		if err := f(x); err != nil {
8557			return err
8558		}
8559		if x.NextPageToken == "" {
8560			return nil
8561		}
8562		c.PageToken(x.NextPageToken)
8563	}
8564}
8565
8566// method id "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.cancel":
8567
8568type ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall struct {
8569	s                       *Service
8570	name                    string
8571	cancelcutoverjobrequest *CancelCutoverJobRequest
8572	urlParams_              gensupport.URLParams
8573	ctx_                    context.Context
8574	header_                 http.Header
8575}
8576
8577// Cancel: Initiates the cancellation of a running cutover job.
8578//
8579// - name: The cutover job id.
8580func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) Cancel(name string, cancelcutoverjobrequest *CancelCutoverJobRequest) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall {
8581	c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8582	c.name = name
8583	c.cancelcutoverjobrequest = cancelcutoverjobrequest
8584	return c
8585}
8586
8587// Fields allows partial responses to be retrieved. See
8588// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8589// for more information.
8590func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall {
8591	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8592	return c
8593}
8594
8595// Context sets the context to be used in this call's Do method. Any
8596// pending HTTP request will be aborted if the provided context is
8597// canceled.
8598func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall {
8599	c.ctx_ = ctx
8600	return c
8601}
8602
8603// Header returns an http.Header that can be modified by the caller to
8604// add HTTP headers to the request.
8605func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Header() http.Header {
8606	if c.header_ == nil {
8607		c.header_ = make(http.Header)
8608	}
8609	return c.header_
8610}
8611
8612func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) doRequest(alt string) (*http.Response, error) {
8613	reqHeaders := make(http.Header)
8614	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8615	for k, v := range c.header_ {
8616		reqHeaders[k] = v
8617	}
8618	reqHeaders.Set("User-Agent", c.s.userAgent())
8619	var body io.Reader = nil
8620	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelcutoverjobrequest)
8621	if err != nil {
8622		return nil, err
8623	}
8624	reqHeaders.Set("Content-Type", "application/json")
8625	c.urlParams_.Set("alt", alt)
8626	c.urlParams_.Set("prettyPrint", "false")
8627	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
8628	urls += "?" + c.urlParams_.Encode()
8629	req, err := http.NewRequest("POST", urls, body)
8630	if err != nil {
8631		return nil, err
8632	}
8633	req.Header = reqHeaders
8634	googleapi.Expand(req.URL, map[string]string{
8635		"name": c.name,
8636	})
8637	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8638}
8639
8640// Do executes the "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.cancel" call.
8641// Exactly one of *Operation or error will be non-nil. Any non-2xx
8642// status code is an error. Response headers are in either
8643// *Operation.ServerResponse.Header or (if a response was returned at
8644// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8645// to check whether the returned error was because
8646// http.StatusNotModified was returned.
8647func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8648	gensupport.SetOptions(c.urlParams_, opts...)
8649	res, err := c.doRequest("json")
8650	if res != nil && res.StatusCode == http.StatusNotModified {
8651		if res.Body != nil {
8652			res.Body.Close()
8653		}
8654		return nil, &googleapi.Error{
8655			Code:   res.StatusCode,
8656			Header: res.Header,
8657		}
8658	}
8659	if err != nil {
8660		return nil, err
8661	}
8662	defer googleapi.CloseBody(res)
8663	if err := googleapi.CheckResponse(res); err != nil {
8664		return nil, err
8665	}
8666	ret := &Operation{
8667		ServerResponse: googleapi.ServerResponse{
8668			Header:         res.Header,
8669			HTTPStatusCode: res.StatusCode,
8670		},
8671	}
8672	target := &ret
8673	if err := gensupport.DecodeResponse(target, res); err != nil {
8674		return nil, err
8675	}
8676	return ret, nil
8677	// {
8678	//   "description": "Initiates the cancellation of a running cutover job.",
8679	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs/{cutoverJobsId}:cancel",
8680	//   "httpMethod": "POST",
8681	//   "id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.cancel",
8682	//   "parameterOrder": [
8683	//     "name"
8684	//   ],
8685	//   "parameters": {
8686	//     "name": {
8687	//       "description": "Required. The cutover job id",
8688	//       "location": "path",
8689	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cutoverJobs/[^/]+$",
8690	//       "required": true,
8691	//       "type": "string"
8692	//     }
8693	//   },
8694	//   "path": "v1/{+name}:cancel",
8695	//   "request": {
8696	//     "$ref": "CancelCutoverJobRequest"
8697	//   },
8698	//   "response": {
8699	//     "$ref": "Operation"
8700	//   },
8701	//   "scopes": [
8702	//     "https://www.googleapis.com/auth/cloud-platform"
8703	//   ]
8704	// }
8705
8706}
8707
8708// method id "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.create":
8709
8710type ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall struct {
8711	s          *Service
8712	parent     string
8713	cutoverjob *CutoverJob
8714	urlParams_ gensupport.URLParams
8715	ctx_       context.Context
8716	header_    http.Header
8717}
8718
8719// Create: Initiates a Cutover of a specific migrating VM. The returned
8720// LRO is completed when the cutover job resource is created and the job
8721// is initiated.
8722//
8723// - parent: The Cutover's parent.
8724func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) Create(parent string, cutoverjob *CutoverJob) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
8725	c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8726	c.parent = parent
8727	c.cutoverjob = cutoverjob
8728	return c
8729}
8730
8731// CutoverJobId sets the optional parameter "cutoverJobId": Required.
8732// The cutover job identifier.
8733func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) CutoverJobId(cutoverJobId string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
8734	c.urlParams_.Set("cutoverJobId", cutoverJobId)
8735	return c
8736}
8737
8738// RequestId sets the optional parameter "requestId": A request ID to
8739// identify requests. Specify a unique request ID so that if you must
8740// retry your request, the server will know to ignore the request if it
8741// has already been completed. The server will guarantee that for at
8742// least 60 minutes since the first request. For example, consider a
8743// situation where you make an initial request and t he request times
8744// out. If you make the request again with the same request ID, the
8745// server can check if original operation with the same request ID was
8746// received, and if so, will ignore the second request. This prevents
8747// clients from accidentally creating duplicate commitments. The request
8748// ID must be a valid UUID with the exception that zero UUID is not
8749// supported (00000000-0000-0000-0000-000000000000).
8750func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
8751	c.urlParams_.Set("requestId", requestId)
8752	return c
8753}
8754
8755// Fields allows partial responses to be retrieved. See
8756// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8757// for more information.
8758func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
8759	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8760	return c
8761}
8762
8763// Context sets the context to be used in this call's Do method. Any
8764// pending HTTP request will be aborted if the provided context is
8765// canceled.
8766func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
8767	c.ctx_ = ctx
8768	return c
8769}
8770
8771// Header returns an http.Header that can be modified by the caller to
8772// add HTTP headers to the request.
8773func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Header() http.Header {
8774	if c.header_ == nil {
8775		c.header_ = make(http.Header)
8776	}
8777	return c.header_
8778}
8779
8780func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) doRequest(alt string) (*http.Response, error) {
8781	reqHeaders := make(http.Header)
8782	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8783	for k, v := range c.header_ {
8784		reqHeaders[k] = v
8785	}
8786	reqHeaders.Set("User-Agent", c.s.userAgent())
8787	var body io.Reader = nil
8788	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cutoverjob)
8789	if err != nil {
8790		return nil, err
8791	}
8792	reqHeaders.Set("Content-Type", "application/json")
8793	c.urlParams_.Set("alt", alt)
8794	c.urlParams_.Set("prettyPrint", "false")
8795	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cutoverJobs")
8796	urls += "?" + c.urlParams_.Encode()
8797	req, err := http.NewRequest("POST", urls, body)
8798	if err != nil {
8799		return nil, err
8800	}
8801	req.Header = reqHeaders
8802	googleapi.Expand(req.URL, map[string]string{
8803		"parent": c.parent,
8804	})
8805	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8806}
8807
8808// Do executes the "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.create" call.
8809// Exactly one of *Operation or error will be non-nil. Any non-2xx
8810// status code is an error. Response headers are in either
8811// *Operation.ServerResponse.Header or (if a response was returned at
8812// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8813// to check whether the returned error was because
8814// http.StatusNotModified was returned.
8815func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8816	gensupport.SetOptions(c.urlParams_, opts...)
8817	res, err := c.doRequest("json")
8818	if res != nil && res.StatusCode == http.StatusNotModified {
8819		if res.Body != nil {
8820			res.Body.Close()
8821		}
8822		return nil, &googleapi.Error{
8823			Code:   res.StatusCode,
8824			Header: res.Header,
8825		}
8826	}
8827	if err != nil {
8828		return nil, err
8829	}
8830	defer googleapi.CloseBody(res)
8831	if err := googleapi.CheckResponse(res); err != nil {
8832		return nil, err
8833	}
8834	ret := &Operation{
8835		ServerResponse: googleapi.ServerResponse{
8836			Header:         res.Header,
8837			HTTPStatusCode: res.StatusCode,
8838		},
8839	}
8840	target := &ret
8841	if err := gensupport.DecodeResponse(target, res); err != nil {
8842		return nil, err
8843	}
8844	return ret, nil
8845	// {
8846	//   "description": "Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.",
8847	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs",
8848	//   "httpMethod": "POST",
8849	//   "id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.create",
8850	//   "parameterOrder": [
8851	//     "parent"
8852	//   ],
8853	//   "parameters": {
8854	//     "cutoverJobId": {
8855	//       "description": "Required. The cutover job identifier.",
8856	//       "location": "query",
8857	//       "type": "string"
8858	//     },
8859	//     "parent": {
8860	//       "description": "Required. The Cutover's parent.",
8861	//       "location": "path",
8862	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
8863	//       "required": true,
8864	//       "type": "string"
8865	//     },
8866	//     "requestId": {
8867	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
8868	//       "location": "query",
8869	//       "type": "string"
8870	//     }
8871	//   },
8872	//   "path": "v1/{+parent}/cutoverJobs",
8873	//   "request": {
8874	//     "$ref": "CutoverJob"
8875	//   },
8876	//   "response": {
8877	//     "$ref": "Operation"
8878	//   },
8879	//   "scopes": [
8880	//     "https://www.googleapis.com/auth/cloud-platform"
8881	//   ]
8882	// }
8883
8884}
8885
8886// method id "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.get":
8887
8888type ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall struct {
8889	s            *Service
8890	name         string
8891	urlParams_   gensupport.URLParams
8892	ifNoneMatch_ string
8893	ctx_         context.Context
8894	header_      http.Header
8895}
8896
8897// Get: Gets details of a single CutoverJob.
8898//
8899// - name: The name of the CutoverJob.
8900func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) Get(name string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
8901	c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8902	c.name = name
8903	return c
8904}
8905
8906// Fields allows partial responses to be retrieved. See
8907// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8908// for more information.
8909func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
8910	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8911	return c
8912}
8913
8914// IfNoneMatch sets the optional parameter which makes the operation
8915// fail if the object's ETag matches the given value. This is useful for
8916// getting updates only after the object has changed since the last
8917// request. Use googleapi.IsNotModified to check whether the response
8918// error from Do is the result of In-None-Match.
8919func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
8920	c.ifNoneMatch_ = entityTag
8921	return c
8922}
8923
8924// Context sets the context to be used in this call's Do method. Any
8925// pending HTTP request will be aborted if the provided context is
8926// canceled.
8927func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
8928	c.ctx_ = ctx
8929	return c
8930}
8931
8932// Header returns an http.Header that can be modified by the caller to
8933// add HTTP headers to the request.
8934func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Header() http.Header {
8935	if c.header_ == nil {
8936		c.header_ = make(http.Header)
8937	}
8938	return c.header_
8939}
8940
8941func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) doRequest(alt string) (*http.Response, error) {
8942	reqHeaders := make(http.Header)
8943	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8944	for k, v := range c.header_ {
8945		reqHeaders[k] = v
8946	}
8947	reqHeaders.Set("User-Agent", c.s.userAgent())
8948	if c.ifNoneMatch_ != "" {
8949		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8950	}
8951	var body io.Reader = nil
8952	c.urlParams_.Set("alt", alt)
8953	c.urlParams_.Set("prettyPrint", "false")
8954	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
8955	urls += "?" + c.urlParams_.Encode()
8956	req, err := http.NewRequest("GET", urls, body)
8957	if err != nil {
8958		return nil, err
8959	}
8960	req.Header = reqHeaders
8961	googleapi.Expand(req.URL, map[string]string{
8962		"name": c.name,
8963	})
8964	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8965}
8966
8967// Do executes the "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.get" call.
8968// Exactly one of *CutoverJob or error will be non-nil. Any non-2xx
8969// status code is an error. Response headers are in either
8970// *CutoverJob.ServerResponse.Header or (if a response was returned at
8971// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8972// to check whether the returned error was because
8973// http.StatusNotModified was returned.
8974func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Do(opts ...googleapi.CallOption) (*CutoverJob, error) {
8975	gensupport.SetOptions(c.urlParams_, opts...)
8976	res, err := c.doRequest("json")
8977	if res != nil && res.StatusCode == http.StatusNotModified {
8978		if res.Body != nil {
8979			res.Body.Close()
8980		}
8981		return nil, &googleapi.Error{
8982			Code:   res.StatusCode,
8983			Header: res.Header,
8984		}
8985	}
8986	if err != nil {
8987		return nil, err
8988	}
8989	defer googleapi.CloseBody(res)
8990	if err := googleapi.CheckResponse(res); err != nil {
8991		return nil, err
8992	}
8993	ret := &CutoverJob{
8994		ServerResponse: googleapi.ServerResponse{
8995			Header:         res.Header,
8996			HTTPStatusCode: res.StatusCode,
8997		},
8998	}
8999	target := &ret
9000	if err := gensupport.DecodeResponse(target, res); err != nil {
9001		return nil, err
9002	}
9003	return ret, nil
9004	// {
9005	//   "description": "Gets details of a single CutoverJob.",
9006	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs/{cutoverJobsId}",
9007	//   "httpMethod": "GET",
9008	//   "id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.get",
9009	//   "parameterOrder": [
9010	//     "name"
9011	//   ],
9012	//   "parameters": {
9013	//     "name": {
9014	//       "description": "Required. The name of the CutoverJob.",
9015	//       "location": "path",
9016	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cutoverJobs/[^/]+$",
9017	//       "required": true,
9018	//       "type": "string"
9019	//     }
9020	//   },
9021	//   "path": "v1/{+name}",
9022	//   "response": {
9023	//     "$ref": "CutoverJob"
9024	//   },
9025	//   "scopes": [
9026	//     "https://www.googleapis.com/auth/cloud-platform"
9027	//   ]
9028	// }
9029
9030}
9031
9032// method id "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.list":
9033
9034type ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall struct {
9035	s            *Service
9036	parent       string
9037	urlParams_   gensupport.URLParams
9038	ifNoneMatch_ string
9039	ctx_         context.Context
9040	header_      http.Header
9041}
9042
9043// List: Lists CutoverJobs of a given migrating VM.
9044//
9045// - parent: The parent, which owns this collection of migrating VMs.
9046func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) List(parent string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9047	c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9048	c.parent = parent
9049	return c
9050}
9051
9052// Filter sets the optional parameter "filter": The filter request.
9053func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9054	c.urlParams_.Set("filter", filter)
9055	return c
9056}
9057
9058// OrderBy sets the optional parameter "orderBy": the order by fields
9059// for the result.
9060func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9061	c.urlParams_.Set("orderBy", orderBy)
9062	return c
9063}
9064
9065// PageSize sets the optional parameter "pageSize": The maximum number
9066// of cutover jobs to return. The service may return fewer than this
9067// value. If unspecified, at most 500 cutover jobs will be returned. The
9068// maximum value is 1000; values above 1000 will be coerced to 1000.
9069func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9070	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9071	return c
9072}
9073
9074// PageToken sets the optional parameter "pageToken": Required. A page
9075// token, received from a previous `ListCutoverJobs` call. Provide this
9076// to retrieve the subsequent page. When paginating, all other
9077// parameters provided to `ListCutoverJobs` must match the call that
9078// provided the page token.
9079func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9080	c.urlParams_.Set("pageToken", pageToken)
9081	return c
9082}
9083
9084// Fields allows partial responses to be retrieved. See
9085// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9086// for more information.
9087func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9088	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9089	return c
9090}
9091
9092// IfNoneMatch sets the optional parameter which makes the operation
9093// fail if the object's ETag matches the given value. This is useful for
9094// getting updates only after the object has changed since the last
9095// request. Use googleapi.IsNotModified to check whether the response
9096// error from Do is the result of In-None-Match.
9097func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9098	c.ifNoneMatch_ = entityTag
9099	return c
9100}
9101
9102// Context sets the context to be used in this call's Do method. Any
9103// pending HTTP request will be aborted if the provided context is
9104// canceled.
9105func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9106	c.ctx_ = ctx
9107	return c
9108}
9109
9110// Header returns an http.Header that can be modified by the caller to
9111// add HTTP headers to the request.
9112func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Header() http.Header {
9113	if c.header_ == nil {
9114		c.header_ = make(http.Header)
9115	}
9116	return c.header_
9117}
9118
9119func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) doRequest(alt string) (*http.Response, error) {
9120	reqHeaders := make(http.Header)
9121	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9122	for k, v := range c.header_ {
9123		reqHeaders[k] = v
9124	}
9125	reqHeaders.Set("User-Agent", c.s.userAgent())
9126	if c.ifNoneMatch_ != "" {
9127		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9128	}
9129	var body io.Reader = nil
9130	c.urlParams_.Set("alt", alt)
9131	c.urlParams_.Set("prettyPrint", "false")
9132	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cutoverJobs")
9133	urls += "?" + c.urlParams_.Encode()
9134	req, err := http.NewRequest("GET", urls, body)
9135	if err != nil {
9136		return nil, err
9137	}
9138	req.Header = reqHeaders
9139	googleapi.Expand(req.URL, map[string]string{
9140		"parent": c.parent,
9141	})
9142	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9143}
9144
9145// Do executes the "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.list" call.
9146// Exactly one of *ListCutoverJobsResponse or error will be non-nil. Any
9147// non-2xx status code is an error. Response headers are in either
9148// *ListCutoverJobsResponse.ServerResponse.Header or (if a response was
9149// returned at all) in error.(*googleapi.Error).Header. Use
9150// googleapi.IsNotModified to check whether the returned error was
9151// because http.StatusNotModified was returned.
9152func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Do(opts ...googleapi.CallOption) (*ListCutoverJobsResponse, error) {
9153	gensupport.SetOptions(c.urlParams_, opts...)
9154	res, err := c.doRequest("json")
9155	if res != nil && res.StatusCode == http.StatusNotModified {
9156		if res.Body != nil {
9157			res.Body.Close()
9158		}
9159		return nil, &googleapi.Error{
9160			Code:   res.StatusCode,
9161			Header: res.Header,
9162		}
9163	}
9164	if err != nil {
9165		return nil, err
9166	}
9167	defer googleapi.CloseBody(res)
9168	if err := googleapi.CheckResponse(res); err != nil {
9169		return nil, err
9170	}
9171	ret := &ListCutoverJobsResponse{
9172		ServerResponse: googleapi.ServerResponse{
9173			Header:         res.Header,
9174			HTTPStatusCode: res.StatusCode,
9175		},
9176	}
9177	target := &ret
9178	if err := gensupport.DecodeResponse(target, res); err != nil {
9179		return nil, err
9180	}
9181	return ret, nil
9182	// {
9183	//   "description": "Lists CutoverJobs of a given migrating VM.",
9184	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs",
9185	//   "httpMethod": "GET",
9186	//   "id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.list",
9187	//   "parameterOrder": [
9188	//     "parent"
9189	//   ],
9190	//   "parameters": {
9191	//     "filter": {
9192	//       "description": "Optional. The filter request.",
9193	//       "location": "query",
9194	//       "type": "string"
9195	//     },
9196	//     "orderBy": {
9197	//       "description": "Optional. the order by fields for the result.",
9198	//       "location": "query",
9199	//       "type": "string"
9200	//     },
9201	//     "pageSize": {
9202	//       "description": "Optional. The maximum number of cutover jobs to return. The service may return fewer than this value. If unspecified, at most 500 cutover jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
9203	//       "format": "int32",
9204	//       "location": "query",
9205	//       "type": "integer"
9206	//     },
9207	//     "pageToken": {
9208	//       "description": "Required. A page token, received from a previous `ListCutoverJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCutoverJobs` must match the call that provided the page token.",
9209	//       "location": "query",
9210	//       "type": "string"
9211	//     },
9212	//     "parent": {
9213	//       "description": "Required. The parent, which owns this collection of migrating VMs.",
9214	//       "location": "path",
9215	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
9216	//       "required": true,
9217	//       "type": "string"
9218	//     }
9219	//   },
9220	//   "path": "v1/{+parent}/cutoverJobs",
9221	//   "response": {
9222	//     "$ref": "ListCutoverJobsResponse"
9223	//   },
9224	//   "scopes": [
9225	//     "https://www.googleapis.com/auth/cloud-platform"
9226	//   ]
9227	// }
9228
9229}
9230
9231// Pages invokes f for each page of results.
9232// A non-nil error returned from f will halt the iteration.
9233// The provided context supersedes any context provided to the Context method.
9234func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Pages(ctx context.Context, f func(*ListCutoverJobsResponse) error) error {
9235	c.ctx_ = ctx
9236	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9237	for {
9238		x, err := c.Do()
9239		if err != nil {
9240			return err
9241		}
9242		if err := f(x); err != nil {
9243			return err
9244		}
9245		if x.NextPageToken == "" {
9246			return nil
9247		}
9248		c.PageToken(x.NextPageToken)
9249	}
9250}
9251
9252// method id "vmmigration.projects.locations.sources.utilizationReports.create":
9253
9254type ProjectsLocationsSourcesUtilizationReportsCreateCall struct {
9255	s                 *Service
9256	parent            string
9257	utilizationreport *UtilizationReport
9258	urlParams_        gensupport.URLParams
9259	ctx_              context.Context
9260	header_           http.Header
9261}
9262
9263// Create: Creates a new UtilizationReport.
9264//
9265// - parent: The Utilization Report's parent.
9266func (r *ProjectsLocationsSourcesUtilizationReportsService) Create(parent string, utilizationreport *UtilizationReport) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
9267	c := &ProjectsLocationsSourcesUtilizationReportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9268	c.parent = parent
9269	c.utilizationreport = utilizationreport
9270	return c
9271}
9272
9273// RequestId sets the optional parameter "requestId": A request ID to
9274// identify requests. Specify a unique request ID so that if you must
9275// retry your request, the server will know to ignore the request if it
9276// has already been completed. The server will guarantee that for at
9277// least 60 minutes since the first request. For example, consider a
9278// situation where you make an initial request and t he request times
9279// out. If you make the request again with the same request ID, the
9280// server can check if original operation with the same request ID was
9281// received, and if so, will ignore the second request. This prevents
9282// clients from accidentally creating duplicate commitments. The request
9283// ID must be a valid UUID with the exception that zero UUID is not
9284// supported (00000000-0000-0000-0000-000000000000).
9285func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
9286	c.urlParams_.Set("requestId", requestId)
9287	return c
9288}
9289
9290// UtilizationReportId sets the optional parameter
9291// "utilizationReportId": Required. The ID to use for the report, which
9292// will become the final component of the reports's resource name. This
9293// value maximum length is 63 characters, and valid characters are
9294// /a-z-/. It must start with an english letter and must not end with a
9295// hyphen.
9296func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) UtilizationReportId(utilizationReportId string) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
9297	c.urlParams_.Set("utilizationReportId", utilizationReportId)
9298	return c
9299}
9300
9301// Fields allows partial responses to be retrieved. See
9302// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9303// for more information.
9304func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
9305	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9306	return c
9307}
9308
9309// Context sets the context to be used in this call's Do method. Any
9310// pending HTTP request will be aborted if the provided context is
9311// canceled.
9312func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
9313	c.ctx_ = ctx
9314	return c
9315}
9316
9317// Header returns an http.Header that can be modified by the caller to
9318// add HTTP headers to the request.
9319func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Header() http.Header {
9320	if c.header_ == nil {
9321		c.header_ = make(http.Header)
9322	}
9323	return c.header_
9324}
9325
9326func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) doRequest(alt string) (*http.Response, error) {
9327	reqHeaders := make(http.Header)
9328	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9329	for k, v := range c.header_ {
9330		reqHeaders[k] = v
9331	}
9332	reqHeaders.Set("User-Agent", c.s.userAgent())
9333	var body io.Reader = nil
9334	body, err := googleapi.WithoutDataWrapper.JSONReader(c.utilizationreport)
9335	if err != nil {
9336		return nil, err
9337	}
9338	reqHeaders.Set("Content-Type", "application/json")
9339	c.urlParams_.Set("alt", alt)
9340	c.urlParams_.Set("prettyPrint", "false")
9341	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/utilizationReports")
9342	urls += "?" + c.urlParams_.Encode()
9343	req, err := http.NewRequest("POST", urls, body)
9344	if err != nil {
9345		return nil, err
9346	}
9347	req.Header = reqHeaders
9348	googleapi.Expand(req.URL, map[string]string{
9349		"parent": c.parent,
9350	})
9351	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9352}
9353
9354// Do executes the "vmmigration.projects.locations.sources.utilizationReports.create" call.
9355// Exactly one of *Operation or error will be non-nil. Any non-2xx
9356// status code is an error. Response headers are in either
9357// *Operation.ServerResponse.Header or (if a response was returned at
9358// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9359// to check whether the returned error was because
9360// http.StatusNotModified was returned.
9361func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9362	gensupport.SetOptions(c.urlParams_, opts...)
9363	res, err := c.doRequest("json")
9364	if res != nil && res.StatusCode == http.StatusNotModified {
9365		if res.Body != nil {
9366			res.Body.Close()
9367		}
9368		return nil, &googleapi.Error{
9369			Code:   res.StatusCode,
9370			Header: res.Header,
9371		}
9372	}
9373	if err != nil {
9374		return nil, err
9375	}
9376	defer googleapi.CloseBody(res)
9377	if err := googleapi.CheckResponse(res); err != nil {
9378		return nil, err
9379	}
9380	ret := &Operation{
9381		ServerResponse: googleapi.ServerResponse{
9382			Header:         res.Header,
9383			HTTPStatusCode: res.StatusCode,
9384		},
9385	}
9386	target := &ret
9387	if err := gensupport.DecodeResponse(target, res); err != nil {
9388		return nil, err
9389	}
9390	return ret, nil
9391	// {
9392	//   "description": "Creates a new UtilizationReport.",
9393	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports",
9394	//   "httpMethod": "POST",
9395	//   "id": "vmmigration.projects.locations.sources.utilizationReports.create",
9396	//   "parameterOrder": [
9397	//     "parent"
9398	//   ],
9399	//   "parameters": {
9400	//     "parent": {
9401	//       "description": "Required. The Utilization Report's parent.",
9402	//       "location": "path",
9403	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
9404	//       "required": true,
9405	//       "type": "string"
9406	//     },
9407	//     "requestId": {
9408	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
9409	//       "location": "query",
9410	//       "type": "string"
9411	//     },
9412	//     "utilizationReportId": {
9413	//       "description": "Required. The ID to use for the report, which will become the final component of the reports's resource name. This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.",
9414	//       "location": "query",
9415	//       "type": "string"
9416	//     }
9417	//   },
9418	//   "path": "v1/{+parent}/utilizationReports",
9419	//   "request": {
9420	//     "$ref": "UtilizationReport"
9421	//   },
9422	//   "response": {
9423	//     "$ref": "Operation"
9424	//   },
9425	//   "scopes": [
9426	//     "https://www.googleapis.com/auth/cloud-platform"
9427	//   ]
9428	// }
9429
9430}
9431
9432// method id "vmmigration.projects.locations.sources.utilizationReports.delete":
9433
9434type ProjectsLocationsSourcesUtilizationReportsDeleteCall struct {
9435	s          *Service
9436	name       string
9437	urlParams_ gensupport.URLParams
9438	ctx_       context.Context
9439	header_    http.Header
9440}
9441
9442// Delete: Deletes a single Utilization Report.
9443//
9444// - name: The Utilization Report name.
9445func (r *ProjectsLocationsSourcesUtilizationReportsService) Delete(name string) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
9446	c := &ProjectsLocationsSourcesUtilizationReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9447	c.name = name
9448	return c
9449}
9450
9451// RequestId sets the optional parameter "requestId": A request ID to
9452// identify requests. Specify a unique request ID so that if you must
9453// retry your request, the server will know to ignore the request if it
9454// has already been completed. The server will guarantee that for at
9455// least 60 minutes after the first request. For example, consider a
9456// situation where you make an initial request and t he request times
9457// out. If you make the request again with the same request ID, the
9458// server can check if original operation with the same request ID was
9459// received, and if so, will ignore the second request. This prevents
9460// clients from accidentally creating duplicate commitments. The request
9461// ID must be a valid UUID with the exception that zero UUID is not
9462// supported (00000000-0000-0000-0000-000000000000).
9463func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
9464	c.urlParams_.Set("requestId", requestId)
9465	return c
9466}
9467
9468// Fields allows partial responses to be retrieved. See
9469// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9470// for more information.
9471func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
9472	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9473	return c
9474}
9475
9476// Context sets the context to be used in this call's Do method. Any
9477// pending HTTP request will be aborted if the provided context is
9478// canceled.
9479func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
9480	c.ctx_ = ctx
9481	return c
9482}
9483
9484// Header returns an http.Header that can be modified by the caller to
9485// add HTTP headers to the request.
9486func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Header() http.Header {
9487	if c.header_ == nil {
9488		c.header_ = make(http.Header)
9489	}
9490	return c.header_
9491}
9492
9493func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
9494	reqHeaders := make(http.Header)
9495	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9496	for k, v := range c.header_ {
9497		reqHeaders[k] = v
9498	}
9499	reqHeaders.Set("User-Agent", c.s.userAgent())
9500	var body io.Reader = nil
9501	c.urlParams_.Set("alt", alt)
9502	c.urlParams_.Set("prettyPrint", "false")
9503	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9504	urls += "?" + c.urlParams_.Encode()
9505	req, err := http.NewRequest("DELETE", urls, body)
9506	if err != nil {
9507		return nil, err
9508	}
9509	req.Header = reqHeaders
9510	googleapi.Expand(req.URL, map[string]string{
9511		"name": c.name,
9512	})
9513	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9514}
9515
9516// Do executes the "vmmigration.projects.locations.sources.utilizationReports.delete" call.
9517// Exactly one of *Operation or error will be non-nil. Any non-2xx
9518// status code is an error. Response headers are in either
9519// *Operation.ServerResponse.Header or (if a response was returned at
9520// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9521// to check whether the returned error was because
9522// http.StatusNotModified was returned.
9523func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9524	gensupport.SetOptions(c.urlParams_, opts...)
9525	res, err := c.doRequest("json")
9526	if res != nil && res.StatusCode == http.StatusNotModified {
9527		if res.Body != nil {
9528			res.Body.Close()
9529		}
9530		return nil, &googleapi.Error{
9531			Code:   res.StatusCode,
9532			Header: res.Header,
9533		}
9534	}
9535	if err != nil {
9536		return nil, err
9537	}
9538	defer googleapi.CloseBody(res)
9539	if err := googleapi.CheckResponse(res); err != nil {
9540		return nil, err
9541	}
9542	ret := &Operation{
9543		ServerResponse: googleapi.ServerResponse{
9544			Header:         res.Header,
9545			HTTPStatusCode: res.StatusCode,
9546		},
9547	}
9548	target := &ret
9549	if err := gensupport.DecodeResponse(target, res); err != nil {
9550		return nil, err
9551	}
9552	return ret, nil
9553	// {
9554	//   "description": "Deletes a single Utilization Report.",
9555	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports/{utilizationReportsId}",
9556	//   "httpMethod": "DELETE",
9557	//   "id": "vmmigration.projects.locations.sources.utilizationReports.delete",
9558	//   "parameterOrder": [
9559	//     "name"
9560	//   ],
9561	//   "parameters": {
9562	//     "name": {
9563	//       "description": "Required. The Utilization Report name.",
9564	//       "location": "path",
9565	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/utilizationReports/[^/]+$",
9566	//       "required": true,
9567	//       "type": "string"
9568	//     },
9569	//     "requestId": {
9570	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
9571	//       "location": "query",
9572	//       "type": "string"
9573	//     }
9574	//   },
9575	//   "path": "v1/{+name}",
9576	//   "response": {
9577	//     "$ref": "Operation"
9578	//   },
9579	//   "scopes": [
9580	//     "https://www.googleapis.com/auth/cloud-platform"
9581	//   ]
9582	// }
9583
9584}
9585
9586// method id "vmmigration.projects.locations.sources.utilizationReports.get":
9587
9588type ProjectsLocationsSourcesUtilizationReportsGetCall struct {
9589	s            *Service
9590	name         string
9591	urlParams_   gensupport.URLParams
9592	ifNoneMatch_ string
9593	ctx_         context.Context
9594	header_      http.Header
9595}
9596
9597// Get: Gets a single Utilization Report.
9598//
9599// - name: The Utilization Report name.
9600func (r *ProjectsLocationsSourcesUtilizationReportsService) Get(name string) *ProjectsLocationsSourcesUtilizationReportsGetCall {
9601	c := &ProjectsLocationsSourcesUtilizationReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9602	c.name = name
9603	return c
9604}
9605
9606// View sets the optional parameter "view": The level of details of the
9607// report. Defaults to FULL
9608//
9609// Possible values:
9610//   "UTILIZATION_REPORT_VIEW_UNSPECIFIED" - The default / unset value.
9611// The API will default to FULL on single report request and BASIC for
9612// multiple reports request.
9613//   "BASIC" - Get the report metadata, without the list of VMs and
9614// their utilization info.
9615//   "FULL" - Include everything.
9616func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) View(view string) *ProjectsLocationsSourcesUtilizationReportsGetCall {
9617	c.urlParams_.Set("view", view)
9618	return c
9619}
9620
9621// Fields allows partial responses to be retrieved. See
9622// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9623// for more information.
9624func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsGetCall {
9625	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9626	return c
9627}
9628
9629// IfNoneMatch sets the optional parameter which makes the operation
9630// fail if the object's ETag matches the given value. This is useful for
9631// getting updates only after the object has changed since the last
9632// request. Use googleapi.IsNotModified to check whether the response
9633// error from Do is the result of In-None-Match.
9634func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesUtilizationReportsGetCall {
9635	c.ifNoneMatch_ = entityTag
9636	return c
9637}
9638
9639// Context sets the context to be used in this call's Do method. Any
9640// pending HTTP request will be aborted if the provided context is
9641// canceled.
9642func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsGetCall {
9643	c.ctx_ = ctx
9644	return c
9645}
9646
9647// Header returns an http.Header that can be modified by the caller to
9648// add HTTP headers to the request.
9649func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Header() http.Header {
9650	if c.header_ == nil {
9651		c.header_ = make(http.Header)
9652	}
9653	return c.header_
9654}
9655
9656func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) doRequest(alt string) (*http.Response, error) {
9657	reqHeaders := make(http.Header)
9658	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9659	for k, v := range c.header_ {
9660		reqHeaders[k] = v
9661	}
9662	reqHeaders.Set("User-Agent", c.s.userAgent())
9663	if c.ifNoneMatch_ != "" {
9664		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9665	}
9666	var body io.Reader = nil
9667	c.urlParams_.Set("alt", alt)
9668	c.urlParams_.Set("prettyPrint", "false")
9669	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
9670	urls += "?" + c.urlParams_.Encode()
9671	req, err := http.NewRequest("GET", urls, body)
9672	if err != nil {
9673		return nil, err
9674	}
9675	req.Header = reqHeaders
9676	googleapi.Expand(req.URL, map[string]string{
9677		"name": c.name,
9678	})
9679	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9680}
9681
9682// Do executes the "vmmigration.projects.locations.sources.utilizationReports.get" call.
9683// Exactly one of *UtilizationReport or error will be non-nil. Any
9684// non-2xx status code is an error. Response headers are in either
9685// *UtilizationReport.ServerResponse.Header or (if a response was
9686// returned at all) in error.(*googleapi.Error).Header. Use
9687// googleapi.IsNotModified to check whether the returned error was
9688// because http.StatusNotModified was returned.
9689func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Do(opts ...googleapi.CallOption) (*UtilizationReport, error) {
9690	gensupport.SetOptions(c.urlParams_, opts...)
9691	res, err := c.doRequest("json")
9692	if res != nil && res.StatusCode == http.StatusNotModified {
9693		if res.Body != nil {
9694			res.Body.Close()
9695		}
9696		return nil, &googleapi.Error{
9697			Code:   res.StatusCode,
9698			Header: res.Header,
9699		}
9700	}
9701	if err != nil {
9702		return nil, err
9703	}
9704	defer googleapi.CloseBody(res)
9705	if err := googleapi.CheckResponse(res); err != nil {
9706		return nil, err
9707	}
9708	ret := &UtilizationReport{
9709		ServerResponse: googleapi.ServerResponse{
9710			Header:         res.Header,
9711			HTTPStatusCode: res.StatusCode,
9712		},
9713	}
9714	target := &ret
9715	if err := gensupport.DecodeResponse(target, res); err != nil {
9716		return nil, err
9717	}
9718	return ret, nil
9719	// {
9720	//   "description": "Gets a single Utilization Report.",
9721	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports/{utilizationReportsId}",
9722	//   "httpMethod": "GET",
9723	//   "id": "vmmigration.projects.locations.sources.utilizationReports.get",
9724	//   "parameterOrder": [
9725	//     "name"
9726	//   ],
9727	//   "parameters": {
9728	//     "name": {
9729	//       "description": "Required. The Utilization Report name.",
9730	//       "location": "path",
9731	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/utilizationReports/[^/]+$",
9732	//       "required": true,
9733	//       "type": "string"
9734	//     },
9735	//     "view": {
9736	//       "description": "Optional. The level of details of the report. Defaults to FULL",
9737	//       "enum": [
9738	//         "UTILIZATION_REPORT_VIEW_UNSPECIFIED",
9739	//         "BASIC",
9740	//         "FULL"
9741	//       ],
9742	//       "enumDescriptions": [
9743	//         "The default / unset value. The API will default to FULL on single report request and BASIC for multiple reports request.",
9744	//         "Get the report metadata, without the list of VMs and their utilization info.",
9745	//         "Include everything."
9746	//       ],
9747	//       "location": "query",
9748	//       "type": "string"
9749	//     }
9750	//   },
9751	//   "path": "v1/{+name}",
9752	//   "response": {
9753	//     "$ref": "UtilizationReport"
9754	//   },
9755	//   "scopes": [
9756	//     "https://www.googleapis.com/auth/cloud-platform"
9757	//   ]
9758	// }
9759
9760}
9761
9762// method id "vmmigration.projects.locations.sources.utilizationReports.list":
9763
9764type ProjectsLocationsSourcesUtilizationReportsListCall struct {
9765	s            *Service
9766	parent       string
9767	urlParams_   gensupport.URLParams
9768	ifNoneMatch_ string
9769	ctx_         context.Context
9770	header_      http.Header
9771}
9772
9773// List: Lists Utilization Reports of the given Source.
9774//
9775// - parent: The Utilization Reports parent.
9776func (r *ProjectsLocationsSourcesUtilizationReportsService) List(parent string) *ProjectsLocationsSourcesUtilizationReportsListCall {
9777	c := &ProjectsLocationsSourcesUtilizationReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9778	c.parent = parent
9779	return c
9780}
9781
9782// Filter sets the optional parameter "filter": The filter request.
9783func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Filter(filter string) *ProjectsLocationsSourcesUtilizationReportsListCall {
9784	c.urlParams_.Set("filter", filter)
9785	return c
9786}
9787
9788// OrderBy sets the optional parameter "orderBy": the order by fields
9789// for the result.
9790func (c *ProjectsLocationsSourcesUtilizationReportsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesUtilizationReportsListCall {
9791	c.urlParams_.Set("orderBy", orderBy)
9792	return c
9793}
9794
9795// PageSize sets the optional parameter "pageSize": The maximum number
9796// of reports to return. The service may return fewer than this value.
9797// If unspecified, at most 500 reports will be returned. The maximum
9798// value is 1000; values above 1000 will be coerced to 1000.
9799func (c *ProjectsLocationsSourcesUtilizationReportsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesUtilizationReportsListCall {
9800	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9801	return c
9802}
9803
9804// PageToken sets the optional parameter "pageToken": Required. A page
9805// token, received from a previous `ListUtilizationReports` call.
9806// Provide this to retrieve the subsequent page. When paginating, all
9807// other parameters provided to `ListUtilizationReports` must match the
9808// call that provided the page token.
9809func (c *ProjectsLocationsSourcesUtilizationReportsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesUtilizationReportsListCall {
9810	c.urlParams_.Set("pageToken", pageToken)
9811	return c
9812}
9813
9814// View sets the optional parameter "view": The level of details of each
9815// report. Defaults to BASIC.
9816//
9817// Possible values:
9818//   "UTILIZATION_REPORT_VIEW_UNSPECIFIED" - The default / unset value.
9819// The API will default to FULL on single report request and BASIC for
9820// multiple reports request.
9821//   "BASIC" - Get the report metadata, without the list of VMs and
9822// their utilization info.
9823//   "FULL" - Include everything.
9824func (c *ProjectsLocationsSourcesUtilizationReportsListCall) View(view string) *ProjectsLocationsSourcesUtilizationReportsListCall {
9825	c.urlParams_.Set("view", view)
9826	return c
9827}
9828
9829// Fields allows partial responses to be retrieved. See
9830// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9831// for more information.
9832func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsListCall {
9833	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9834	return c
9835}
9836
9837// IfNoneMatch sets the optional parameter which makes the operation
9838// fail if the object's ETag matches the given value. This is useful for
9839// getting updates only after the object has changed since the last
9840// request. Use googleapi.IsNotModified to check whether the response
9841// error from Do is the result of In-None-Match.
9842func (c *ProjectsLocationsSourcesUtilizationReportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesUtilizationReportsListCall {
9843	c.ifNoneMatch_ = entityTag
9844	return c
9845}
9846
9847// Context sets the context to be used in this call's Do method. Any
9848// pending HTTP request will be aborted if the provided context is
9849// canceled.
9850func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsListCall {
9851	c.ctx_ = ctx
9852	return c
9853}
9854
9855// Header returns an http.Header that can be modified by the caller to
9856// add HTTP headers to the request.
9857func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Header() http.Header {
9858	if c.header_ == nil {
9859		c.header_ = make(http.Header)
9860	}
9861	return c.header_
9862}
9863
9864func (c *ProjectsLocationsSourcesUtilizationReportsListCall) doRequest(alt string) (*http.Response, error) {
9865	reqHeaders := make(http.Header)
9866	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9867	for k, v := range c.header_ {
9868		reqHeaders[k] = v
9869	}
9870	reqHeaders.Set("User-Agent", c.s.userAgent())
9871	if c.ifNoneMatch_ != "" {
9872		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9873	}
9874	var body io.Reader = nil
9875	c.urlParams_.Set("alt", alt)
9876	c.urlParams_.Set("prettyPrint", "false")
9877	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/utilizationReports")
9878	urls += "?" + c.urlParams_.Encode()
9879	req, err := http.NewRequest("GET", urls, body)
9880	if err != nil {
9881		return nil, err
9882	}
9883	req.Header = reqHeaders
9884	googleapi.Expand(req.URL, map[string]string{
9885		"parent": c.parent,
9886	})
9887	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9888}
9889
9890// Do executes the "vmmigration.projects.locations.sources.utilizationReports.list" call.
9891// Exactly one of *ListUtilizationReportsResponse or error will be
9892// non-nil. Any non-2xx status code is an error. Response headers are in
9893// either *ListUtilizationReportsResponse.ServerResponse.Header or (if a
9894// response was returned at all) in error.(*googleapi.Error).Header. Use
9895// googleapi.IsNotModified to check whether the returned error was
9896// because http.StatusNotModified was returned.
9897func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Do(opts ...googleapi.CallOption) (*ListUtilizationReportsResponse, error) {
9898	gensupport.SetOptions(c.urlParams_, opts...)
9899	res, err := c.doRequest("json")
9900	if res != nil && res.StatusCode == http.StatusNotModified {
9901		if res.Body != nil {
9902			res.Body.Close()
9903		}
9904		return nil, &googleapi.Error{
9905			Code:   res.StatusCode,
9906			Header: res.Header,
9907		}
9908	}
9909	if err != nil {
9910		return nil, err
9911	}
9912	defer googleapi.CloseBody(res)
9913	if err := googleapi.CheckResponse(res); err != nil {
9914		return nil, err
9915	}
9916	ret := &ListUtilizationReportsResponse{
9917		ServerResponse: googleapi.ServerResponse{
9918			Header:         res.Header,
9919			HTTPStatusCode: res.StatusCode,
9920		},
9921	}
9922	target := &ret
9923	if err := gensupport.DecodeResponse(target, res); err != nil {
9924		return nil, err
9925	}
9926	return ret, nil
9927	// {
9928	//   "description": "Lists Utilization Reports of the given Source.",
9929	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports",
9930	//   "httpMethod": "GET",
9931	//   "id": "vmmigration.projects.locations.sources.utilizationReports.list",
9932	//   "parameterOrder": [
9933	//     "parent"
9934	//   ],
9935	//   "parameters": {
9936	//     "filter": {
9937	//       "description": "Optional. The filter request.",
9938	//       "location": "query",
9939	//       "type": "string"
9940	//     },
9941	//     "orderBy": {
9942	//       "description": "Optional. the order by fields for the result.",
9943	//       "location": "query",
9944	//       "type": "string"
9945	//     },
9946	//     "pageSize": {
9947	//       "description": "Optional. The maximum number of reports to return. The service may return fewer than this value. If unspecified, at most 500 reports will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
9948	//       "format": "int32",
9949	//       "location": "query",
9950	//       "type": "integer"
9951	//     },
9952	//     "pageToken": {
9953	//       "description": "Required. A page token, received from a previous `ListUtilizationReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListUtilizationReports` must match the call that provided the page token.",
9954	//       "location": "query",
9955	//       "type": "string"
9956	//     },
9957	//     "parent": {
9958	//       "description": "Required. The Utilization Reports parent.",
9959	//       "location": "path",
9960	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
9961	//       "required": true,
9962	//       "type": "string"
9963	//     },
9964	//     "view": {
9965	//       "description": "Optional. The level of details of each report. Defaults to BASIC.",
9966	//       "enum": [
9967	//         "UTILIZATION_REPORT_VIEW_UNSPECIFIED",
9968	//         "BASIC",
9969	//         "FULL"
9970	//       ],
9971	//       "enumDescriptions": [
9972	//         "The default / unset value. The API will default to FULL on single report request and BASIC for multiple reports request.",
9973	//         "Get the report metadata, without the list of VMs and their utilization info.",
9974	//         "Include everything."
9975	//       ],
9976	//       "location": "query",
9977	//       "type": "string"
9978	//     }
9979	//   },
9980	//   "path": "v1/{+parent}/utilizationReports",
9981	//   "response": {
9982	//     "$ref": "ListUtilizationReportsResponse"
9983	//   },
9984	//   "scopes": [
9985	//     "https://www.googleapis.com/auth/cloud-platform"
9986	//   ]
9987	// }
9988
9989}
9990
9991// Pages invokes f for each page of results.
9992// A non-nil error returned from f will halt the iteration.
9993// The provided context supersedes any context provided to the Context method.
9994func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Pages(ctx context.Context, f func(*ListUtilizationReportsResponse) error) error {
9995	c.ctx_ = ctx
9996	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9997	for {
9998		x, err := c.Do()
9999		if err != nil {
10000			return err
10001		}
10002		if err := f(x); err != nil {
10003			return err
10004		}
10005		if x.NextPageToken == "" {
10006			return nil
10007		}
10008		c.PageToken(x.NextPageToken)
10009	}
10010}
10011
10012// method id "vmmigration.projects.locations.targetProjects.create":
10013
10014type ProjectsLocationsTargetProjectsCreateCall struct {
10015	s             *Service
10016	parent        string
10017	targetproject *TargetProject
10018	urlParams_    gensupport.URLParams
10019	ctx_          context.Context
10020	header_       http.Header
10021}
10022
10023// Create: Creates a new TargetProject in a given project. NOTE:
10024// TargetProject is a global resource; hence the only supported value
10025// for location is `global`.
10026//
10027// - parent: The TargetProject's parent.
10028func (r *ProjectsLocationsTargetProjectsService) Create(parent string, targetproject *TargetProject) *ProjectsLocationsTargetProjectsCreateCall {
10029	c := &ProjectsLocationsTargetProjectsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10030	c.parent = parent
10031	c.targetproject = targetproject
10032	return c
10033}
10034
10035// RequestId sets the optional parameter "requestId": A request ID to
10036// identify requests. Specify a unique request ID so that if you must
10037// retry your request, the server will know to ignore the request if it
10038// has already been completed. The server will guarantee that for at
10039// least 60 minutes since the first request. For example, consider a
10040// situation where you make an initial request and t he request times
10041// out. If you make the request again with the same request ID, the
10042// server can check if original operation with the same request ID was
10043// received, and if so, will ignore the second request. This prevents
10044// clients from accidentally creating duplicate commitments. The request
10045// ID must be a valid UUID with the exception that zero UUID is not
10046// supported (00000000-0000-0000-0000-000000000000).
10047func (c *ProjectsLocationsTargetProjectsCreateCall) RequestId(requestId string) *ProjectsLocationsTargetProjectsCreateCall {
10048	c.urlParams_.Set("requestId", requestId)
10049	return c
10050}
10051
10052// TargetProjectId sets the optional parameter "targetProjectId":
10053// Required. The target_project identifier.
10054func (c *ProjectsLocationsTargetProjectsCreateCall) TargetProjectId(targetProjectId string) *ProjectsLocationsTargetProjectsCreateCall {
10055	c.urlParams_.Set("targetProjectId", targetProjectId)
10056	return c
10057}
10058
10059// Fields allows partial responses to be retrieved. See
10060// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10061// for more information.
10062func (c *ProjectsLocationsTargetProjectsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsCreateCall {
10063	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10064	return c
10065}
10066
10067// Context sets the context to be used in this call's Do method. Any
10068// pending HTTP request will be aborted if the provided context is
10069// canceled.
10070func (c *ProjectsLocationsTargetProjectsCreateCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsCreateCall {
10071	c.ctx_ = ctx
10072	return c
10073}
10074
10075// Header returns an http.Header that can be modified by the caller to
10076// add HTTP headers to the request.
10077func (c *ProjectsLocationsTargetProjectsCreateCall) Header() http.Header {
10078	if c.header_ == nil {
10079		c.header_ = make(http.Header)
10080	}
10081	return c.header_
10082}
10083
10084func (c *ProjectsLocationsTargetProjectsCreateCall) doRequest(alt string) (*http.Response, error) {
10085	reqHeaders := make(http.Header)
10086	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10087	for k, v := range c.header_ {
10088		reqHeaders[k] = v
10089	}
10090	reqHeaders.Set("User-Agent", c.s.userAgent())
10091	var body io.Reader = nil
10092	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetproject)
10093	if err != nil {
10094		return nil, err
10095	}
10096	reqHeaders.Set("Content-Type", "application/json")
10097	c.urlParams_.Set("alt", alt)
10098	c.urlParams_.Set("prettyPrint", "false")
10099	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetProjects")
10100	urls += "?" + c.urlParams_.Encode()
10101	req, err := http.NewRequest("POST", urls, body)
10102	if err != nil {
10103		return nil, err
10104	}
10105	req.Header = reqHeaders
10106	googleapi.Expand(req.URL, map[string]string{
10107		"parent": c.parent,
10108	})
10109	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10110}
10111
10112// Do executes the "vmmigration.projects.locations.targetProjects.create" call.
10113// Exactly one of *Operation or error will be non-nil. Any non-2xx
10114// status code is an error. Response headers are in either
10115// *Operation.ServerResponse.Header or (if a response was returned at
10116// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10117// to check whether the returned error was because
10118// http.StatusNotModified was returned.
10119func (c *ProjectsLocationsTargetProjectsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10120	gensupport.SetOptions(c.urlParams_, opts...)
10121	res, err := c.doRequest("json")
10122	if res != nil && res.StatusCode == http.StatusNotModified {
10123		if res.Body != nil {
10124			res.Body.Close()
10125		}
10126		return nil, &googleapi.Error{
10127			Code:   res.StatusCode,
10128			Header: res.Header,
10129		}
10130	}
10131	if err != nil {
10132		return nil, err
10133	}
10134	defer googleapi.CloseBody(res)
10135	if err := googleapi.CheckResponse(res); err != nil {
10136		return nil, err
10137	}
10138	ret := &Operation{
10139		ServerResponse: googleapi.ServerResponse{
10140			Header:         res.Header,
10141			HTTPStatusCode: res.StatusCode,
10142		},
10143	}
10144	target := &ret
10145	if err := gensupport.DecodeResponse(target, res); err != nil {
10146		return nil, err
10147	}
10148	return ret, nil
10149	// {
10150	//   "description": "Creates a new TargetProject in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.",
10151	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/targetProjects",
10152	//   "httpMethod": "POST",
10153	//   "id": "vmmigration.projects.locations.targetProjects.create",
10154	//   "parameterOrder": [
10155	//     "parent"
10156	//   ],
10157	//   "parameters": {
10158	//     "parent": {
10159	//       "description": "Required. The TargetProject's parent.",
10160	//       "location": "path",
10161	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
10162	//       "required": true,
10163	//       "type": "string"
10164	//     },
10165	//     "requestId": {
10166	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
10167	//       "location": "query",
10168	//       "type": "string"
10169	//     },
10170	//     "targetProjectId": {
10171	//       "description": "Required. The target_project identifier.",
10172	//       "location": "query",
10173	//       "type": "string"
10174	//     }
10175	//   },
10176	//   "path": "v1/{+parent}/targetProjects",
10177	//   "request": {
10178	//     "$ref": "TargetProject"
10179	//   },
10180	//   "response": {
10181	//     "$ref": "Operation"
10182	//   },
10183	//   "scopes": [
10184	//     "https://www.googleapis.com/auth/cloud-platform"
10185	//   ]
10186	// }
10187
10188}
10189
10190// method id "vmmigration.projects.locations.targetProjects.delete":
10191
10192type ProjectsLocationsTargetProjectsDeleteCall struct {
10193	s          *Service
10194	name       string
10195	urlParams_ gensupport.URLParams
10196	ctx_       context.Context
10197	header_    http.Header
10198}
10199
10200// Delete: Deletes a single TargetProject. NOTE: TargetProject is a
10201// global resource; hence the only supported value for location is
10202// `global`.
10203//
10204// - name: The TargetProject name.
10205func (r *ProjectsLocationsTargetProjectsService) Delete(name string) *ProjectsLocationsTargetProjectsDeleteCall {
10206	c := &ProjectsLocationsTargetProjectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10207	c.name = name
10208	return c
10209}
10210
10211// RequestId sets the optional parameter "requestId": A request ID to
10212// identify requests. Specify a unique request ID so that if you must
10213// retry your request, the server will know to ignore the request if it
10214// has already been completed. The server will guarantee that for at
10215// least 60 minutes after the first request. For example, consider a
10216// situation where you make an initial request and t he request times
10217// out. If you make the request again with the same request ID, the
10218// server can check if original operation with the same request ID was
10219// received, and if so, will ignore the second request. This prevents
10220// clients from accidentally creating duplicate commitments. The request
10221// ID must be a valid UUID with the exception that zero UUID is not
10222// supported (00000000-0000-0000-0000-000000000000).
10223func (c *ProjectsLocationsTargetProjectsDeleteCall) RequestId(requestId string) *ProjectsLocationsTargetProjectsDeleteCall {
10224	c.urlParams_.Set("requestId", requestId)
10225	return c
10226}
10227
10228// Fields allows partial responses to be retrieved. See
10229// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10230// for more information.
10231func (c *ProjectsLocationsTargetProjectsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsDeleteCall {
10232	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10233	return c
10234}
10235
10236// Context sets the context to be used in this call's Do method. Any
10237// pending HTTP request will be aborted if the provided context is
10238// canceled.
10239func (c *ProjectsLocationsTargetProjectsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsDeleteCall {
10240	c.ctx_ = ctx
10241	return c
10242}
10243
10244// Header returns an http.Header that can be modified by the caller to
10245// add HTTP headers to the request.
10246func (c *ProjectsLocationsTargetProjectsDeleteCall) Header() http.Header {
10247	if c.header_ == nil {
10248		c.header_ = make(http.Header)
10249	}
10250	return c.header_
10251}
10252
10253func (c *ProjectsLocationsTargetProjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
10254	reqHeaders := make(http.Header)
10255	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10256	for k, v := range c.header_ {
10257		reqHeaders[k] = v
10258	}
10259	reqHeaders.Set("User-Agent", c.s.userAgent())
10260	var body io.Reader = nil
10261	c.urlParams_.Set("alt", alt)
10262	c.urlParams_.Set("prettyPrint", "false")
10263	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10264	urls += "?" + c.urlParams_.Encode()
10265	req, err := http.NewRequest("DELETE", urls, body)
10266	if err != nil {
10267		return nil, err
10268	}
10269	req.Header = reqHeaders
10270	googleapi.Expand(req.URL, map[string]string{
10271		"name": c.name,
10272	})
10273	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10274}
10275
10276// Do executes the "vmmigration.projects.locations.targetProjects.delete" call.
10277// Exactly one of *Operation or error will be non-nil. Any non-2xx
10278// status code is an error. Response headers are in either
10279// *Operation.ServerResponse.Header or (if a response was returned at
10280// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10281// to check whether the returned error was because
10282// http.StatusNotModified was returned.
10283func (c *ProjectsLocationsTargetProjectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10284	gensupport.SetOptions(c.urlParams_, opts...)
10285	res, err := c.doRequest("json")
10286	if res != nil && res.StatusCode == http.StatusNotModified {
10287		if res.Body != nil {
10288			res.Body.Close()
10289		}
10290		return nil, &googleapi.Error{
10291			Code:   res.StatusCode,
10292			Header: res.Header,
10293		}
10294	}
10295	if err != nil {
10296		return nil, err
10297	}
10298	defer googleapi.CloseBody(res)
10299	if err := googleapi.CheckResponse(res); err != nil {
10300		return nil, err
10301	}
10302	ret := &Operation{
10303		ServerResponse: googleapi.ServerResponse{
10304			Header:         res.Header,
10305			HTTPStatusCode: res.StatusCode,
10306		},
10307	}
10308	target := &ret
10309	if err := gensupport.DecodeResponse(target, res); err != nil {
10310		return nil, err
10311	}
10312	return ret, nil
10313	// {
10314	//   "description": "Deletes a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.",
10315	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/targetProjects/{targetProjectsId}",
10316	//   "httpMethod": "DELETE",
10317	//   "id": "vmmigration.projects.locations.targetProjects.delete",
10318	//   "parameterOrder": [
10319	//     "name"
10320	//   ],
10321	//   "parameters": {
10322	//     "name": {
10323	//       "description": "Required. The TargetProject name.",
10324	//       "location": "path",
10325	//       "pattern": "^projects/[^/]+/locations/[^/]+/targetProjects/[^/]+$",
10326	//       "required": true,
10327	//       "type": "string"
10328	//     },
10329	//     "requestId": {
10330	//       "description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
10331	//       "location": "query",
10332	//       "type": "string"
10333	//     }
10334	//   },
10335	//   "path": "v1/{+name}",
10336	//   "response": {
10337	//     "$ref": "Operation"
10338	//   },
10339	//   "scopes": [
10340	//     "https://www.googleapis.com/auth/cloud-platform"
10341	//   ]
10342	// }
10343
10344}
10345
10346// method id "vmmigration.projects.locations.targetProjects.get":
10347
10348type ProjectsLocationsTargetProjectsGetCall struct {
10349	s            *Service
10350	name         string
10351	urlParams_   gensupport.URLParams
10352	ifNoneMatch_ string
10353	ctx_         context.Context
10354	header_      http.Header
10355}
10356
10357// Get: Gets details of a single TargetProject. NOTE: TargetProject is a
10358// global resource; hence the only supported value for location is
10359// `global`.
10360//
10361// - name: The TargetProject name.
10362func (r *ProjectsLocationsTargetProjectsService) Get(name string) *ProjectsLocationsTargetProjectsGetCall {
10363	c := &ProjectsLocationsTargetProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10364	c.name = name
10365	return c
10366}
10367
10368// Fields allows partial responses to be retrieved. See
10369// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10370// for more information.
10371func (c *ProjectsLocationsTargetProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsGetCall {
10372	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10373	return c
10374}
10375
10376// IfNoneMatch sets the optional parameter which makes the operation
10377// fail if the object's ETag matches the given value. This is useful for
10378// getting updates only after the object has changed since the last
10379// request. Use googleapi.IsNotModified to check whether the response
10380// error from Do is the result of In-None-Match.
10381func (c *ProjectsLocationsTargetProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTargetProjectsGetCall {
10382	c.ifNoneMatch_ = entityTag
10383	return c
10384}
10385
10386// Context sets the context to be used in this call's Do method. Any
10387// pending HTTP request will be aborted if the provided context is
10388// canceled.
10389func (c *ProjectsLocationsTargetProjectsGetCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsGetCall {
10390	c.ctx_ = ctx
10391	return c
10392}
10393
10394// Header returns an http.Header that can be modified by the caller to
10395// add HTTP headers to the request.
10396func (c *ProjectsLocationsTargetProjectsGetCall) Header() http.Header {
10397	if c.header_ == nil {
10398		c.header_ = make(http.Header)
10399	}
10400	return c.header_
10401}
10402
10403func (c *ProjectsLocationsTargetProjectsGetCall) doRequest(alt string) (*http.Response, error) {
10404	reqHeaders := make(http.Header)
10405	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10406	for k, v := range c.header_ {
10407		reqHeaders[k] = v
10408	}
10409	reqHeaders.Set("User-Agent", c.s.userAgent())
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, "v1/{+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// Do executes the "vmmigration.projects.locations.targetProjects.get" call.
10430// Exactly one of *TargetProject or error will be non-nil. Any non-2xx
10431// status code is an error. Response headers are in either
10432// *TargetProject.ServerResponse.Header or (if a response was returned
10433// at all) in error.(*googleapi.Error).Header. Use
10434// googleapi.IsNotModified to check whether the returned error was
10435// because http.StatusNotModified was returned.
10436func (c *ProjectsLocationsTargetProjectsGetCall) Do(opts ...googleapi.CallOption) (*TargetProject, error) {
10437	gensupport.SetOptions(c.urlParams_, opts...)
10438	res, err := c.doRequest("json")
10439	if res != nil && res.StatusCode == http.StatusNotModified {
10440		if res.Body != nil {
10441			res.Body.Close()
10442		}
10443		return nil, &googleapi.Error{
10444			Code:   res.StatusCode,
10445			Header: res.Header,
10446		}
10447	}
10448	if err != nil {
10449		return nil, err
10450	}
10451	defer googleapi.CloseBody(res)
10452	if err := googleapi.CheckResponse(res); err != nil {
10453		return nil, err
10454	}
10455	ret := &TargetProject{
10456		ServerResponse: googleapi.ServerResponse{
10457			Header:         res.Header,
10458			HTTPStatusCode: res.StatusCode,
10459		},
10460	}
10461	target := &ret
10462	if err := gensupport.DecodeResponse(target, res); err != nil {
10463		return nil, err
10464	}
10465	return ret, nil
10466	// {
10467	//   "description": "Gets details of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.",
10468	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/targetProjects/{targetProjectsId}",
10469	//   "httpMethod": "GET",
10470	//   "id": "vmmigration.projects.locations.targetProjects.get",
10471	//   "parameterOrder": [
10472	//     "name"
10473	//   ],
10474	//   "parameters": {
10475	//     "name": {
10476	//       "description": "Required. The TargetProject name.",
10477	//       "location": "path",
10478	//       "pattern": "^projects/[^/]+/locations/[^/]+/targetProjects/[^/]+$",
10479	//       "required": true,
10480	//       "type": "string"
10481	//     }
10482	//   },
10483	//   "path": "v1/{+name}",
10484	//   "response": {
10485	//     "$ref": "TargetProject"
10486	//   },
10487	//   "scopes": [
10488	//     "https://www.googleapis.com/auth/cloud-platform"
10489	//   ]
10490	// }
10491
10492}
10493
10494// method id "vmmigration.projects.locations.targetProjects.list":
10495
10496type ProjectsLocationsTargetProjectsListCall struct {
10497	s            *Service
10498	parent       string
10499	urlParams_   gensupport.URLParams
10500	ifNoneMatch_ string
10501	ctx_         context.Context
10502	header_      http.Header
10503}
10504
10505// List: Lists TargetProjects in a given project. NOTE: TargetProject is
10506// a global resource; hence the only supported value for location is
10507// `global`.
10508//
10509// - parent: The parent, which owns this collection of targets.
10510func (r *ProjectsLocationsTargetProjectsService) List(parent string) *ProjectsLocationsTargetProjectsListCall {
10511	c := &ProjectsLocationsTargetProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10512	c.parent = parent
10513	return c
10514}
10515
10516// Filter sets the optional parameter "filter": The filter request.
10517func (c *ProjectsLocationsTargetProjectsListCall) Filter(filter string) *ProjectsLocationsTargetProjectsListCall {
10518	c.urlParams_.Set("filter", filter)
10519	return c
10520}
10521
10522// OrderBy sets the optional parameter "orderBy": the order by fields
10523// for the result.
10524func (c *ProjectsLocationsTargetProjectsListCall) OrderBy(orderBy string) *ProjectsLocationsTargetProjectsListCall {
10525	c.urlParams_.Set("orderBy", orderBy)
10526	return c
10527}
10528
10529// PageSize sets the optional parameter "pageSize": The maximum number
10530// of targets to return. The service may return fewer than this value.
10531// If unspecified, at most 500 targets will be returned. The maximum
10532// value is 1000; values above 1000 will be coerced to 1000.
10533func (c *ProjectsLocationsTargetProjectsListCall) PageSize(pageSize int64) *ProjectsLocationsTargetProjectsListCall {
10534	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10535	return c
10536}
10537
10538// PageToken sets the optional parameter "pageToken": Required. A page
10539// token, received from a previous `ListTargets` call. Provide this to
10540// retrieve the subsequent page. When paginating, all other parameters
10541// provided to `ListTargets` must match the call that provided the page
10542// token.
10543func (c *ProjectsLocationsTargetProjectsListCall) PageToken(pageToken string) *ProjectsLocationsTargetProjectsListCall {
10544	c.urlParams_.Set("pageToken", pageToken)
10545	return c
10546}
10547
10548// Fields allows partial responses to be retrieved. See
10549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10550// for more information.
10551func (c *ProjectsLocationsTargetProjectsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsListCall {
10552	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10553	return c
10554}
10555
10556// IfNoneMatch sets the optional parameter which makes the operation
10557// fail if the object's ETag matches the given value. This is useful for
10558// getting updates only after the object has changed since the last
10559// request. Use googleapi.IsNotModified to check whether the response
10560// error from Do is the result of In-None-Match.
10561func (c *ProjectsLocationsTargetProjectsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTargetProjectsListCall {
10562	c.ifNoneMatch_ = entityTag
10563	return c
10564}
10565
10566// Context sets the context to be used in this call's Do method. Any
10567// pending HTTP request will be aborted if the provided context is
10568// canceled.
10569func (c *ProjectsLocationsTargetProjectsListCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsListCall {
10570	c.ctx_ = ctx
10571	return c
10572}
10573
10574// Header returns an http.Header that can be modified by the caller to
10575// add HTTP headers to the request.
10576func (c *ProjectsLocationsTargetProjectsListCall) Header() http.Header {
10577	if c.header_ == nil {
10578		c.header_ = make(http.Header)
10579	}
10580	return c.header_
10581}
10582
10583func (c *ProjectsLocationsTargetProjectsListCall) doRequest(alt string) (*http.Response, error) {
10584	reqHeaders := make(http.Header)
10585	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10586	for k, v := range c.header_ {
10587		reqHeaders[k] = v
10588	}
10589	reqHeaders.Set("User-Agent", c.s.userAgent())
10590	if c.ifNoneMatch_ != "" {
10591		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10592	}
10593	var body io.Reader = nil
10594	c.urlParams_.Set("alt", alt)
10595	c.urlParams_.Set("prettyPrint", "false")
10596	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetProjects")
10597	urls += "?" + c.urlParams_.Encode()
10598	req, err := http.NewRequest("GET", urls, body)
10599	if err != nil {
10600		return nil, err
10601	}
10602	req.Header = reqHeaders
10603	googleapi.Expand(req.URL, map[string]string{
10604		"parent": c.parent,
10605	})
10606	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10607}
10608
10609// Do executes the "vmmigration.projects.locations.targetProjects.list" call.
10610// Exactly one of *ListTargetProjectsResponse or error will be non-nil.
10611// Any non-2xx status code is an error. Response headers are in either
10612// *ListTargetProjectsResponse.ServerResponse.Header or (if a response
10613// was returned at all) in error.(*googleapi.Error).Header. Use
10614// googleapi.IsNotModified to check whether the returned error was
10615// because http.StatusNotModified was returned.
10616func (c *ProjectsLocationsTargetProjectsListCall) Do(opts ...googleapi.CallOption) (*ListTargetProjectsResponse, error) {
10617	gensupport.SetOptions(c.urlParams_, opts...)
10618	res, err := c.doRequest("json")
10619	if res != nil && res.StatusCode == http.StatusNotModified {
10620		if res.Body != nil {
10621			res.Body.Close()
10622		}
10623		return nil, &googleapi.Error{
10624			Code:   res.StatusCode,
10625			Header: res.Header,
10626		}
10627	}
10628	if err != nil {
10629		return nil, err
10630	}
10631	defer googleapi.CloseBody(res)
10632	if err := googleapi.CheckResponse(res); err != nil {
10633		return nil, err
10634	}
10635	ret := &ListTargetProjectsResponse{
10636		ServerResponse: googleapi.ServerResponse{
10637			Header:         res.Header,
10638			HTTPStatusCode: res.StatusCode,
10639		},
10640	}
10641	target := &ret
10642	if err := gensupport.DecodeResponse(target, res); err != nil {
10643		return nil, err
10644	}
10645	return ret, nil
10646	// {
10647	//   "description": "Lists TargetProjects in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.",
10648	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/targetProjects",
10649	//   "httpMethod": "GET",
10650	//   "id": "vmmigration.projects.locations.targetProjects.list",
10651	//   "parameterOrder": [
10652	//     "parent"
10653	//   ],
10654	//   "parameters": {
10655	//     "filter": {
10656	//       "description": "Optional. The filter request.",
10657	//       "location": "query",
10658	//       "type": "string"
10659	//     },
10660	//     "orderBy": {
10661	//       "description": "Optional. the order by fields for the result.",
10662	//       "location": "query",
10663	//       "type": "string"
10664	//     },
10665	//     "pageSize": {
10666	//       "description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.",
10667	//       "format": "int32",
10668	//       "location": "query",
10669	//       "type": "integer"
10670	//     },
10671	//     "pageToken": {
10672	//       "description": "Required. A page token, received from a previous `ListTargets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargets` must match the call that provided the page token.",
10673	//       "location": "query",
10674	//       "type": "string"
10675	//     },
10676	//     "parent": {
10677	//       "description": "Required. The parent, which owns this collection of targets.",
10678	//       "location": "path",
10679	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
10680	//       "required": true,
10681	//       "type": "string"
10682	//     }
10683	//   },
10684	//   "path": "v1/{+parent}/targetProjects",
10685	//   "response": {
10686	//     "$ref": "ListTargetProjectsResponse"
10687	//   },
10688	//   "scopes": [
10689	//     "https://www.googleapis.com/auth/cloud-platform"
10690	//   ]
10691	// }
10692
10693}
10694
10695// Pages invokes f for each page of results.
10696// A non-nil error returned from f will halt the iteration.
10697// The provided context supersedes any context provided to the Context method.
10698func (c *ProjectsLocationsTargetProjectsListCall) Pages(ctx context.Context, f func(*ListTargetProjectsResponse) error) error {
10699	c.ctx_ = ctx
10700	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10701	for {
10702		x, err := c.Do()
10703		if err != nil {
10704			return err
10705		}
10706		if err := f(x); err != nil {
10707			return err
10708		}
10709		if x.NextPageToken == "" {
10710			return nil
10711		}
10712		c.PageToken(x.NextPageToken)
10713	}
10714}
10715
10716// method id "vmmigration.projects.locations.targetProjects.patch":
10717
10718type ProjectsLocationsTargetProjectsPatchCall struct {
10719	s             *Service
10720	name          string
10721	targetproject *TargetProject
10722	urlParams_    gensupport.URLParams
10723	ctx_          context.Context
10724	header_       http.Header
10725}
10726
10727// Patch: Updates the parameters of a single TargetProject. NOTE:
10728// TargetProject is a global resource; hence the only supported value
10729// for location is `global`.
10730//
10731// - name: The name of the target project.
10732func (r *ProjectsLocationsTargetProjectsService) Patch(name string, targetproject *TargetProject) *ProjectsLocationsTargetProjectsPatchCall {
10733	c := &ProjectsLocationsTargetProjectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10734	c.name = name
10735	c.targetproject = targetproject
10736	return c
10737}
10738
10739// RequestId sets the optional parameter "requestId": A request ID to
10740// identify requests. Specify a unique request ID so that if you must
10741// retry your request, the server will know to ignore the request if it
10742// has already been completed. The server will guarantee that for at
10743// least 60 minutes since the first request. For example, consider a
10744// situation where you make an initial request and t he request times
10745// out. If you make the request again with the same request ID, the
10746// server can check if original operation with the same request ID was
10747// received, and if so, will ignore the second request. This prevents
10748// clients from accidentally creating duplicate commitments. The request
10749// ID must be a valid UUID with the exception that zero UUID is not
10750// supported (00000000-0000-0000-0000-000000000000).
10751func (c *ProjectsLocationsTargetProjectsPatchCall) RequestId(requestId string) *ProjectsLocationsTargetProjectsPatchCall {
10752	c.urlParams_.Set("requestId", requestId)
10753	return c
10754}
10755
10756// UpdateMask sets the optional parameter "updateMask": Field mask is
10757// used to specify the fields to be overwritten in the TargetProject
10758// resource by the update. The fields specified in the update_mask are
10759// relative to the resource, not the full request. A field will be
10760// overwritten if it is in the mask. If the user does not provide a mask
10761// then all fields will be overwritten.
10762func (c *ProjectsLocationsTargetProjectsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTargetProjectsPatchCall {
10763	c.urlParams_.Set("updateMask", updateMask)
10764	return c
10765}
10766
10767// Fields allows partial responses to be retrieved. See
10768// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10769// for more information.
10770func (c *ProjectsLocationsTargetProjectsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsPatchCall {
10771	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10772	return c
10773}
10774
10775// Context sets the context to be used in this call's Do method. Any
10776// pending HTTP request will be aborted if the provided context is
10777// canceled.
10778func (c *ProjectsLocationsTargetProjectsPatchCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsPatchCall {
10779	c.ctx_ = ctx
10780	return c
10781}
10782
10783// Header returns an http.Header that can be modified by the caller to
10784// add HTTP headers to the request.
10785func (c *ProjectsLocationsTargetProjectsPatchCall) Header() http.Header {
10786	if c.header_ == nil {
10787		c.header_ = make(http.Header)
10788	}
10789	return c.header_
10790}
10791
10792func (c *ProjectsLocationsTargetProjectsPatchCall) doRequest(alt string) (*http.Response, error) {
10793	reqHeaders := make(http.Header)
10794	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10795	for k, v := range c.header_ {
10796		reqHeaders[k] = v
10797	}
10798	reqHeaders.Set("User-Agent", c.s.userAgent())
10799	var body io.Reader = nil
10800	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetproject)
10801	if err != nil {
10802		return nil, err
10803	}
10804	reqHeaders.Set("Content-Type", "application/json")
10805	c.urlParams_.Set("alt", alt)
10806	c.urlParams_.Set("prettyPrint", "false")
10807	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
10808	urls += "?" + c.urlParams_.Encode()
10809	req, err := http.NewRequest("PATCH", urls, body)
10810	if err != nil {
10811		return nil, err
10812	}
10813	req.Header = reqHeaders
10814	googleapi.Expand(req.URL, map[string]string{
10815		"name": c.name,
10816	})
10817	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10818}
10819
10820// Do executes the "vmmigration.projects.locations.targetProjects.patch" call.
10821// Exactly one of *Operation or error will be non-nil. Any non-2xx
10822// status code is an error. Response headers are in either
10823// *Operation.ServerResponse.Header or (if a response was returned at
10824// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10825// to check whether the returned error was because
10826// http.StatusNotModified was returned.
10827func (c *ProjectsLocationsTargetProjectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10828	gensupport.SetOptions(c.urlParams_, opts...)
10829	res, err := c.doRequest("json")
10830	if res != nil && res.StatusCode == http.StatusNotModified {
10831		if res.Body != nil {
10832			res.Body.Close()
10833		}
10834		return nil, &googleapi.Error{
10835			Code:   res.StatusCode,
10836			Header: res.Header,
10837		}
10838	}
10839	if err != nil {
10840		return nil, err
10841	}
10842	defer googleapi.CloseBody(res)
10843	if err := googleapi.CheckResponse(res); err != nil {
10844		return nil, err
10845	}
10846	ret := &Operation{
10847		ServerResponse: googleapi.ServerResponse{
10848			Header:         res.Header,
10849			HTTPStatusCode: res.StatusCode,
10850		},
10851	}
10852	target := &ret
10853	if err := gensupport.DecodeResponse(target, res); err != nil {
10854		return nil, err
10855	}
10856	return ret, nil
10857	// {
10858	//   "description": "Updates the parameters of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.",
10859	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/targetProjects/{targetProjectsId}",
10860	//   "httpMethod": "PATCH",
10861	//   "id": "vmmigration.projects.locations.targetProjects.patch",
10862	//   "parameterOrder": [
10863	//     "name"
10864	//   ],
10865	//   "parameters": {
10866	//     "name": {
10867	//       "description": "The name of the target project.",
10868	//       "location": "path",
10869	//       "pattern": "^projects/[^/]+/locations/[^/]+/targetProjects/[^/]+$",
10870	//       "required": true,
10871	//       "type": "string"
10872	//     },
10873	//     "requestId": {
10874	//       "description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).",
10875	//       "location": "query",
10876	//       "type": "string"
10877	//     },
10878	//     "updateMask": {
10879	//       "description": "Field mask is used to specify the fields to be overwritten in the TargetProject resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.",
10880	//       "format": "google-fieldmask",
10881	//       "location": "query",
10882	//       "type": "string"
10883	//     }
10884	//   },
10885	//   "path": "v1/{+name}",
10886	//   "request": {
10887	//     "$ref": "TargetProject"
10888	//   },
10889	//   "response": {
10890	//     "$ref": "Operation"
10891	//   },
10892	//   "scopes": [
10893	//     "https://www.googleapis.com/auth/cloud-platform"
10894	//   ]
10895	// }
10896
10897}
10898