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/v1alpha1"
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/v1alpha1"
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:v1alpha1"
75const apiName = "vmmigration"
76const apiVersion = "v1alpha1"
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	// TargetDetails: Output only. Details of the VM to create as the target
399	// of this clone job. Deprecated: Use compute_engine_target_details
400	// instead.
401	TargetDetails *TargetVMDetails `json:"targetDetails,omitempty"`
402
403	// ServerResponse contains the HTTP response code and headers from the
404	// server.
405	googleapi.ServerResponse `json:"-"`
406
407	// ForceSendFields is a list of field names (e.g.
408	// "ComputeEngineTargetDetails") to unconditionally include in API
409	// requests. By default, fields with empty or default values are omitted
410	// from API requests. However, any non-pointer, non-interface field
411	// appearing in ForceSendFields will be sent to the server regardless of
412	// whether the field is empty or not. This may be used to include empty
413	// fields in Patch requests.
414	ForceSendFields []string `json:"-"`
415
416	// NullFields is a list of field names (e.g.
417	// "ComputeEngineTargetDetails") to include in API requests with the
418	// JSON null value. By default, fields with empty values are omitted
419	// from API requests. However, any field with an empty value appearing
420	// in NullFields will be sent to the server as null. It is an error if a
421	// field in this list has a non-empty value. This may be used to include
422	// null fields in Patch requests.
423	NullFields []string `json:"-"`
424}
425
426func (s *CloneJob) MarshalJSON() ([]byte, error) {
427	type NoMethod CloneJob
428	raw := NoMethod(*s)
429	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
430}
431
432// ComputeEngineTargetDefaults: ComputeEngineTargetDefaults is a
433// collection of details for creating a VM in a target Compute Engine
434// project.
435type ComputeEngineTargetDefaults struct {
436	// AppliedLicense: Output only. The OS license returned from the
437	// adaptation module report.
438	AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"`
439
440	// BootOption: Output only. The VM Boot Option, as set in the source vm.
441	//
442	// Possible values:
443	//   "COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED" - The boot option is
444	// unknown.
445	//   "COMPUTE_ENGINE_BOOT_OPTION_EFI" - The boot option is EFI.
446	//   "COMPUTE_ENGINE_BOOT_OPTION_BIOS" - The boot option is BIOS.
447	BootOption string `json:"bootOption,omitempty"`
448
449	// ComputeScheduling: Compute instance scheduling information (if empty
450	// default is used).
451	ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"`
452
453	// DiskType: The disk type to use in the VM.
454	//
455	// Possible values:
456	//   "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED" - An unspecified disk type.
457	// Will be used as STANDARD.
458	//   "COMPUTE_ENGINE_DISK_TYPE_STANDARD" - A Standard disk type.
459	//   "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type.
460	//   "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD
461	// persistent disks that balance performance and cost.
462	DiskType string `json:"diskType,omitempty"`
463
464	// Labels: A map of labels to associate with the VM.
465	Labels map[string]string `json:"labels,omitempty"`
466
467	// LicenseType: The license type to use in OS adaptation.
468	//
469	// Possible values:
470	//   "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT" - The license type is the
471	// default for the OS.
472	//   "COMPUTE_ENGINE_LICENSE_TYPE_PAYG" - The license type is Pay As You
473	// Go license type.
474	//   "COMPUTE_ENGINE_LICENSE_TYPE_BYOL" - The license type is Bring Your
475	// Own License type.
476	LicenseType string `json:"licenseType,omitempty"`
477
478	// MachineType: The machine type to create the VM with.
479	MachineType string `json:"machineType,omitempty"`
480
481	// MachineTypeSeries: The machine type series to create the VM with.
482	MachineTypeSeries string `json:"machineTypeSeries,omitempty"`
483
484	// Metadata: The metadata key/value pairs to assign to the VM.
485	Metadata map[string]string `json:"metadata,omitempty"`
486
487	// NetworkInterfaces: List of NICs connected to this VM.
488	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
489
490	// NetworkTags: A map of network tags to associate with the VM.
491	NetworkTags []string `json:"networkTags,omitempty"`
492
493	// SecureBoot: Defines whether the instance has Secure Boot enabled.
494	// This can be set to true only if the vm boot option is EFI.
495	SecureBoot bool `json:"secureBoot,omitempty"`
496
497	// ServiceAccount: The service account to associate the VM with.
498	ServiceAccount string `json:"serviceAccount,omitempty"`
499
500	// TargetProject: The full path of the resource of type TargetProject
501	// which represents the Compute Engine project in which to create this
502	// VM.
503	TargetProject string `json:"targetProject,omitempty"`
504
505	// VmName: The name of the VM to create.
506	VmName string `json:"vmName,omitempty"`
507
508	// Zone: The zone in which to create the VM.
509	Zone string `json:"zone,omitempty"`
510
511	// ForceSendFields is a list of field names (e.g. "AppliedLicense") to
512	// unconditionally include in API requests. By default, fields with
513	// empty or default values are omitted from API requests. However, any
514	// non-pointer, non-interface field appearing in ForceSendFields will be
515	// sent to the server regardless of whether the field is empty or not.
516	// This may be used to include empty fields in Patch requests.
517	ForceSendFields []string `json:"-"`
518
519	// NullFields is a list of field names (e.g. "AppliedLicense") to
520	// include in API requests with the JSON null value. By default, fields
521	// with empty values are omitted from API requests. However, any field
522	// with an empty value appearing in NullFields will be sent to the
523	// server as null. It is an error if a field in this list has a
524	// non-empty value. This may be used to include null fields in Patch
525	// requests.
526	NullFields []string `json:"-"`
527}
528
529func (s *ComputeEngineTargetDefaults) MarshalJSON() ([]byte, error) {
530	type NoMethod ComputeEngineTargetDefaults
531	raw := NoMethod(*s)
532	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
533}
534
535// ComputeEngineTargetDetails: ComputeEngineTargetDetails is a
536// collection of details for creating a VM in a target Compute Engine
537// project.
538type ComputeEngineTargetDetails struct {
539	// AppliedLicense: The OS license returned from the adaptation module
540	// report.
541	AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"`
542
543	// BootOption: The VM Boot Option, as set in the source vm.
544	//
545	// Possible values:
546	//   "COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED" - The boot option is
547	// unknown.
548	//   "COMPUTE_ENGINE_BOOT_OPTION_EFI" - The boot option is EFI.
549	//   "COMPUTE_ENGINE_BOOT_OPTION_BIOS" - The boot option is BIOS.
550	BootOption string `json:"bootOption,omitempty"`
551
552	// ComputeScheduling: Compute instance scheduling information (if empty
553	// default is used).
554	ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"`
555
556	// DiskType: The disk type to use in the VM.
557	//
558	// Possible values:
559	//   "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED" - An unspecified disk type.
560	// Will be used as STANDARD.
561	//   "COMPUTE_ENGINE_DISK_TYPE_STANDARD" - A Standard disk type.
562	//   "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type.
563	//   "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD
564	// persistent disks that balance performance and cost.
565	DiskType string `json:"diskType,omitempty"`
566
567	// Labels: A map of labels to associate with the VM.
568	Labels map[string]string `json:"labels,omitempty"`
569
570	// LicenseType: The license type to use in OS adaptation.
571	//
572	// Possible values:
573	//   "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT" - The license type is the
574	// default for the OS.
575	//   "COMPUTE_ENGINE_LICENSE_TYPE_PAYG" - The license type is Pay As You
576	// Go license type.
577	//   "COMPUTE_ENGINE_LICENSE_TYPE_BYOL" - The license type is Bring Your
578	// Own License type.
579	LicenseType string `json:"licenseType,omitempty"`
580
581	// MachineType: The machine type to create the VM with.
582	MachineType string `json:"machineType,omitempty"`
583
584	// MachineTypeSeries: The machine type series to create the VM with.
585	MachineTypeSeries string `json:"machineTypeSeries,omitempty"`
586
587	// Metadata: The metadata key/value pairs to assign to the VM.
588	Metadata map[string]string `json:"metadata,omitempty"`
589
590	// NetworkInterfaces: List of NICs connected to this VM.
591	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
592
593	// NetworkTags: A map of network tags to associate with the VM.
594	NetworkTags []string `json:"networkTags,omitempty"`
595
596	// Project: The GCP target project ID or project name.
597	Project string `json:"project,omitempty"`
598
599	// SecureBoot: Defines whether the instance has Secure Boot enabled.
600	// This can be set to true only if the vm boot option is EFI.
601	SecureBoot bool `json:"secureBoot,omitempty"`
602
603	// ServiceAccount: The service account to associate the VM with.
604	ServiceAccount string `json:"serviceAccount,omitempty"`
605
606	// VmName: The name of the VM to create.
607	VmName string `json:"vmName,omitempty"`
608
609	// Zone: The zone in which to create the VM.
610	Zone string `json:"zone,omitempty"`
611
612	// ForceSendFields is a list of field names (e.g. "AppliedLicense") to
613	// unconditionally include in API requests. By default, fields with
614	// empty or default values are omitted from API requests. However, any
615	// non-pointer, non-interface field appearing in ForceSendFields will be
616	// sent to the server regardless of whether the field is empty or not.
617	// This may be used to include empty fields in Patch requests.
618	ForceSendFields []string `json:"-"`
619
620	// NullFields is a list of field names (e.g. "AppliedLicense") to
621	// include in API requests with the JSON null value. By default, fields
622	// with empty values are omitted from API requests. However, any field
623	// with an empty value appearing in NullFields will be sent to the
624	// server as null. It is an error if a field in this list has a
625	// non-empty value. This may be used to include null fields in Patch
626	// requests.
627	NullFields []string `json:"-"`
628}
629
630func (s *ComputeEngineTargetDetails) MarshalJSON() ([]byte, error) {
631	type NoMethod ComputeEngineTargetDetails
632	raw := NoMethod(*s)
633	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
634}
635
636// ComputeScheduling: Scheduling information for VM on
637// maintenance/restart behaviour and node allocation in sole tenant
638// nodes.
639type ComputeScheduling struct {
640	AutomaticRestart bool `json:"automaticRestart,omitempty"`
641
642	// MinNodeCpus: The minimum number of virtual CPUs this instance will
643	// consume when running on a sole-tenant node. Ignored if no
644	// node_affinites are configured.
645	MinNodeCpus int64 `json:"minNodeCpus,omitempty"`
646
647	// NodeAffinities: A set of node affinity and anti-affinity
648	// configurations for sole tenant nodes.
649	NodeAffinities []*SchedulingNodeAffinity `json:"nodeAffinities,omitempty"`
650
651	// OnHostMaintenance: How the instance should behave when the host
652	// machine undergoes maintenance that may temporarily impact instance
653	// performance.
654	//
655	// Possible values:
656	//   "ON_HOST_MAINTENANCE_UNSPECIFIED" - An unknown, unexpected
657	// behavior.
658	//   "TERMINATE" - Terminate the instance when the host machine
659	// undergoes maintenance.
660	//   "MIGRATE" - Migrate the instance when the host machine undergoes
661	// maintenance.
662	OnHostMaintenance string `json:"onHostMaintenance,omitempty"`
663
664	// RestartType: Whether the Instance should be automatically restarted
665	// whenever it is terminated by Compute Engine (not terminated by user).
666	// This configuration is identical to `automaticRestart` field in
667	// Compute Engine create instance under scheduling. It was changed to an
668	// enum (instead of a boolean) to match the default value in Compute
669	// Engine which is automatic restart.
670	//
671	// Possible values:
672	//   "RESTART_TYPE_UNSPECIFIED" - Unspecified behavior. This will use
673	// the default.
674	//   "AUTOMATIC_RESTART" - The Instance should be automatically
675	// restarted whenever it is terminated by Compute Engine.
676	//   "NO_AUTOMATIC_RESTART" - The Instance isn't automatically restarted
677	// whenever it is terminated by Compute Engine.
678	RestartType string `json:"restartType,omitempty"`
679
680	// ForceSendFields is a list of field names (e.g. "AutomaticRestart") to
681	// unconditionally include in API requests. By default, fields with
682	// empty or default values are omitted from API requests. However, any
683	// non-pointer, non-interface field appearing in ForceSendFields will be
684	// sent to the server regardless of whether the field is empty or not.
685	// This may be used to include empty fields in Patch requests.
686	ForceSendFields []string `json:"-"`
687
688	// NullFields is a list of field names (e.g. "AutomaticRestart") to
689	// include in API requests with the JSON null value. By default, fields
690	// with empty values are omitted from API requests. However, any field
691	// with an empty value appearing in NullFields will be sent to the
692	// server as null. It is an error if a field in this list has a
693	// non-empty value. This may be used to include null fields in Patch
694	// requests.
695	NullFields []string `json:"-"`
696}
697
698func (s *ComputeScheduling) MarshalJSON() ([]byte, error) {
699	type NoMethod ComputeScheduling
700	raw := NoMethod(*s)
701	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
702}
703
704// CutoverJob: CutoverJob message describes a cutover of a migrating VM.
705// The CutoverJob is the operation of shutting down the VM, creating a
706// snapshot and clonning the VM using the replicated snapshot.
707type CutoverJob struct {
708	// ComputeEngineTargetDetails: Output only. Details of the target VM in
709	// Compute Engine.
710	ComputeEngineTargetDetails *ComputeEngineTargetDetails `json:"computeEngineTargetDetails,omitempty"`
711
712	// ComputeEngineVmDetails: Output only. Details of the VM in Compute
713	// Engine. Deprecated: Use compute_engine_target_details instead.
714	ComputeEngineVmDetails *TargetVMDetails `json:"computeEngineVmDetails,omitempty"`
715
716	// CreateTime: Output only. The time the cutover job was created (as an
717	// API call, not when it was actually created in the target).
718	CreateTime string `json:"createTime,omitempty"`
719
720	// Error: Output only. Provides details for the errors that led to the
721	// Cutover Job's state.
722	Error *Status `json:"error,omitempty"`
723
724	// Name: Output only. The name of the cutover job.
725	Name string `json:"name,omitempty"`
726
727	// Progress: Output only. The current progress in percentage of the
728	// cutover job.
729	Progress int64 `json:"progress,omitempty"`
730
731	// ProgressPercent: Output only. The current progress in percentage of
732	// the cutover job.
733	ProgressPercent int64 `json:"progressPercent,omitempty"`
734
735	// State: Output only. State of the cutover job.
736	//
737	// Possible values:
738	//   "STATE_UNSPECIFIED" - The state is unknown. This is used for API
739	// compatibility only and is not used by the system.
740	//   "PENDING" - The cutover job has not yet started.
741	//   "FAILED" - The cutover job finished with errors.
742	//   "SUCCEEDED" - The cutover job finished successfully.
743	//   "CANCELLED" - The cutover job was cancelled.
744	//   "CANCELLING" - The cutover job is being cancelled.
745	//   "ACTIVE" - The cutover job is active and running.
746	//   "ADAPTING_OS" - OS adaptation is running as part of the cutover job
747	// to generate license.
748	State string `json:"state,omitempty"`
749
750	// StateMessage: Output only. A message providing possible extra details
751	// about the current state.
752	StateMessage string `json:"stateMessage,omitempty"`
753
754	// StateTime: Output only. The time the state was last updated.
755	StateTime string `json:"stateTime,omitempty"`
756
757	// TargetDetails: Output only. Details of the VM to create as the target
758	// of this cutover job. Deprecated: Use compute_engine_target_details
759	// instead.
760	TargetDetails *TargetVMDetails `json:"targetDetails,omitempty"`
761
762	// ServerResponse contains the HTTP response code and headers from the
763	// server.
764	googleapi.ServerResponse `json:"-"`
765
766	// ForceSendFields is a list of field names (e.g.
767	// "ComputeEngineTargetDetails") to unconditionally include in API
768	// requests. By default, fields with empty or default values are omitted
769	// from API requests. However, any non-pointer, non-interface field
770	// appearing in ForceSendFields will be sent to the server regardless of
771	// whether the field is empty or not. This may be used to include empty
772	// fields in Patch requests.
773	ForceSendFields []string `json:"-"`
774
775	// NullFields is a list of field names (e.g.
776	// "ComputeEngineTargetDetails") to include in API requests with the
777	// JSON null value. By default, fields with empty values are omitted
778	// from API requests. However, any field with an empty value appearing
779	// in NullFields will be sent to the server as null. It is an error if a
780	// field in this list has a non-empty value. This may be used to include
781	// null fields in Patch requests.
782	NullFields []string `json:"-"`
783}
784
785func (s *CutoverJob) MarshalJSON() ([]byte, error) {
786	type NoMethod CutoverJob
787	raw := NoMethod(*s)
788	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
789}
790
791// DatacenterConnector: DatacenterConnector message describes a
792// connector between the Source and GCP, which is installed on a vmware
793// datacenter (an OVA vm installed by the user) to connect the
794// Datacenter to GCP and support vm migration data transfer.
795type DatacenterConnector struct {
796	// Bucket: Output only. The communication channel between the datacenter
797	// connector and GCP.
798	Bucket string `json:"bucket,omitempty"`
799
800	// CreateTime: Output only. The time the connector was created (as an
801	// API call, not when it was actually installed).
802	CreateTime string `json:"createTime,omitempty"`
803
804	// Error: Output only. Provides details on the state of the Datacenter
805	// Connector in case of an error.
806	Error *Status `json:"error,omitempty"`
807
808	// Name: Output only. The connector's name.
809	Name string `json:"name,omitempty"`
810
811	// RegistrationId: Immutable. A unique key for this connector. This key
812	// is internal to the OVA connector and is supplied with its creation
813	// during the registration process and can not be modified.
814	RegistrationId string `json:"registrationId,omitempty"`
815
816	// ServiceAccount: The service account to use in the connector when
817	// communicating with the cloud.
818	ServiceAccount string `json:"serviceAccount,omitempty"`
819
820	// State: Output only. State of the DatacenterConnector, as determined
821	// by the health checks.
822	//
823	// Possible values:
824	//   "STATE_UNSPECIFIED" - The state is unknown. This is used for API
825	// compatibility only and is not used by the system.
826	//   "PENDING" - The state was not sampled by the health checks yet.
827	//   "OFFLINE" - The source was sampled by health checks and is not
828	// available.
829	//   "FAILED" - The source is available but might not be usable yet due
830	// to unvalidated credentials or another reason. The credentials
831	// referred to are the ones to the Source. The error message will
832	// contain further details.
833	//   "ACTIVE" - The source exists and its credentials were verified.
834	State string `json:"state,omitempty"`
835
836	// StateTime: Output only. The time the state was last set.
837	StateTime string `json:"stateTime,omitempty"`
838
839	// UpdateTime: Output only. The last time the connector was updated with
840	// an API call.
841	UpdateTime string `json:"updateTime,omitempty"`
842
843	// Version: The version running in the DatacenterConnector. This is
844	// supplied by the OVA connector during the registration process and can
845	// not be modified.
846	Version string `json:"version,omitempty"`
847
848	// ServerResponse contains the HTTP response code and headers from the
849	// server.
850	googleapi.ServerResponse `json:"-"`
851
852	// ForceSendFields is a list of field names (e.g. "Bucket") to
853	// unconditionally include in API requests. By default, fields with
854	// empty or default values are omitted from API requests. However, any
855	// non-pointer, non-interface field appearing in ForceSendFields will be
856	// sent to the server regardless of whether the field is empty or not.
857	// This may be used to include empty fields in Patch requests.
858	ForceSendFields []string `json:"-"`
859
860	// NullFields is a list of field names (e.g. "Bucket") to include in API
861	// requests with the JSON null value. By default, fields with empty
862	// values are omitted from API requests. However, any field with an
863	// empty value appearing in NullFields will be sent to the server as
864	// null. It is an error if a field in this list has a non-empty value.
865	// This may be used to include null fields in Patch requests.
866	NullFields []string `json:"-"`
867}
868
869func (s *DatacenterConnector) MarshalJSON() ([]byte, error) {
870	type NoMethod DatacenterConnector
871	raw := NoMethod(*s)
872	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
873}
874
875// Empty: A generic empty message that you can re-use to avoid defining
876// duplicated empty messages in your APIs. A typical example is to use
877// it as the request or the response type of an API method. For
878// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
879// (google.protobuf.Empty); } The JSON representation for `Empty` is
880// empty JSON object `{}`.
881type Empty struct {
882	// ServerResponse contains the HTTP response code and headers from the
883	// server.
884	googleapi.ServerResponse `json:"-"`
885}
886
887// FetchInventoryResponse: Response message for fetchInventory.
888type FetchInventoryResponse struct {
889	// UpdateTime: Output only. The timestamp when the source was last
890	// queried (if the result is from the cache).
891	UpdateTime string `json:"updateTime,omitempty"`
892
893	// VmwareVms: Output only. The description of the VMs in a Source of
894	// type Vmware.
895	VmwareVms *VmwareVmsDetails `json:"vmwareVms,omitempty"`
896
897	// ServerResponse contains the HTTP response code and headers from the
898	// server.
899	googleapi.ServerResponse `json:"-"`
900
901	// ForceSendFields is a list of field names (e.g. "UpdateTime") to
902	// unconditionally include in API requests. By default, fields with
903	// empty or default values are omitted from API requests. However, any
904	// non-pointer, non-interface field appearing in ForceSendFields will be
905	// sent to the server regardless of whether the field is empty or not.
906	// This may be used to include empty fields in Patch requests.
907	ForceSendFields []string `json:"-"`
908
909	// NullFields is a list of field names (e.g. "UpdateTime") to include in
910	// API requests with the JSON null value. By default, fields with empty
911	// values are omitted from API requests. However, any field with an
912	// empty value appearing in NullFields will be sent to the server as
913	// null. It is an error if a field in this list has a non-empty value.
914	// This may be used to include null fields in Patch requests.
915	NullFields []string `json:"-"`
916}
917
918func (s *FetchInventoryResponse) MarshalJSON() ([]byte, error) {
919	type NoMethod FetchInventoryResponse
920	raw := NoMethod(*s)
921	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
922}
923
924// FinalizeMigrationRequest: Request message for 'FinalizeMigration'
925// request.
926type FinalizeMigrationRequest struct {
927}
928
929// Group: Describes message for 'Group' resource. The Group is a
930// collections of several MigratingVms.
931type Group struct {
932	// CreateTime: Output only. The create time timestamp.
933	CreateTime string `json:"createTime,omitempty"`
934
935	// Description: User-provided description of the group.
936	Description string `json:"description,omitempty"`
937
938	// DisplayName: Display name is a user defined name for this group which
939	// can be updated.
940	DisplayName string `json:"displayName,omitempty"`
941
942	// Name: The Group name.
943	Name string `json:"name,omitempty"`
944
945	// UpdateTime: Output only. The update time timestamp.
946	UpdateTime string `json:"updateTime,omitempty"`
947
948	// ServerResponse contains the HTTP response code and headers from the
949	// server.
950	googleapi.ServerResponse `json:"-"`
951
952	// ForceSendFields is a list of field names (e.g. "CreateTime") to
953	// unconditionally include in API requests. By default, fields with
954	// empty or default values are omitted from API requests. However, any
955	// non-pointer, non-interface field appearing in ForceSendFields will be
956	// sent to the server regardless of whether the field is empty or not.
957	// This may be used to include empty fields in Patch requests.
958	ForceSendFields []string `json:"-"`
959
960	// NullFields is a list of field names (e.g. "CreateTime") to include in
961	// API requests with the JSON null value. By default, fields with empty
962	// values are omitted from API requests. However, any field with an
963	// empty value appearing in NullFields will be sent to the server as
964	// null. It is an error if a field in this list has a non-empty value.
965	// This may be used to include null fields in Patch requests.
966	NullFields []string `json:"-"`
967}
968
969func (s *Group) MarshalJSON() ([]byte, error) {
970	type NoMethod Group
971	raw := NoMethod(*s)
972	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
973}
974
975// Link: Describes a URL link.
976type Link struct {
977	// Description: Describes what the link offers.
978	Description string `json:"description,omitempty"`
979
980	// Url: The URL of the link.
981	Url string `json:"url,omitempty"`
982
983	// ForceSendFields is a list of field names (e.g. "Description") to
984	// unconditionally include in API requests. By default, fields with
985	// empty or default values are omitted from API requests. However, any
986	// non-pointer, non-interface field appearing in ForceSendFields will be
987	// sent to the server regardless of whether the field is empty or not.
988	// This may be used to include empty fields in Patch requests.
989	ForceSendFields []string `json:"-"`
990
991	// NullFields is a list of field names (e.g. "Description") to include
992	// in API requests with the JSON null value. By default, fields with
993	// empty values are omitted from API requests. However, any field with
994	// an empty value appearing in NullFields will be sent to the server as
995	// null. It is an error if a field in this list has a non-empty value.
996	// This may be used to include null fields in Patch requests.
997	NullFields []string `json:"-"`
998}
999
1000func (s *Link) MarshalJSON() ([]byte, error) {
1001	type NoMethod Link
1002	raw := NoMethod(*s)
1003	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1004}
1005
1006// ListCloneJobsResponse: Response message for 'ListCloneJobs' request.
1007type ListCloneJobsResponse struct {
1008	// CloneJobs: Output only. The list of clone jobs response.
1009	CloneJobs []*CloneJob `json:"cloneJobs,omitempty"`
1010
1011	// NextPageToken: Output only. A token, which can be sent as
1012	// `page_token` to retrieve the next page. If this field is omitted,
1013	// there are no subsequent pages.
1014	NextPageToken string `json:"nextPageToken,omitempty"`
1015
1016	// Unreachable: Output only. Locations that could not be reached.
1017	Unreachable []string `json:"unreachable,omitempty"`
1018
1019	// ServerResponse contains the HTTP response code and headers from the
1020	// server.
1021	googleapi.ServerResponse `json:"-"`
1022
1023	// ForceSendFields is a list of field names (e.g. "CloneJobs") to
1024	// unconditionally include in API requests. By default, fields with
1025	// empty or default values are omitted from API requests. However, any
1026	// non-pointer, non-interface field appearing in ForceSendFields will be
1027	// sent to the server regardless of whether the field is empty or not.
1028	// This may be used to include empty fields in Patch requests.
1029	ForceSendFields []string `json:"-"`
1030
1031	// NullFields is a list of field names (e.g. "CloneJobs") to include in
1032	// API requests with the JSON null value. By default, fields with empty
1033	// values are omitted from API requests. However, any field with an
1034	// empty value appearing in NullFields will be sent to the server as
1035	// null. It is an error if a field in this list has a non-empty value.
1036	// This may be used to include null fields in Patch requests.
1037	NullFields []string `json:"-"`
1038}
1039
1040func (s *ListCloneJobsResponse) MarshalJSON() ([]byte, error) {
1041	type NoMethod ListCloneJobsResponse
1042	raw := NoMethod(*s)
1043	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1044}
1045
1046// ListCutoverJobsResponse: Response message for 'ListCutoverJobs'
1047// request.
1048type ListCutoverJobsResponse struct {
1049	// CutoverJobs: Output only. The list of cutover jobs response.
1050	CutoverJobs []*CutoverJob `json:"cutoverJobs,omitempty"`
1051
1052	// NextPageToken: Output only. A token, which can be sent as
1053	// `page_token` to retrieve the next page. If this field is omitted,
1054	// there are no subsequent pages.
1055	NextPageToken string `json:"nextPageToken,omitempty"`
1056
1057	// Unreachable: Output only. Locations that could not be reached.
1058	Unreachable []string `json:"unreachable,omitempty"`
1059
1060	// ServerResponse contains the HTTP response code and headers from the
1061	// server.
1062	googleapi.ServerResponse `json:"-"`
1063
1064	// ForceSendFields is a list of field names (e.g. "CutoverJobs") to
1065	// unconditionally include in API requests. By default, fields with
1066	// empty or default values are omitted from API requests. However, any
1067	// non-pointer, non-interface field appearing in ForceSendFields will be
1068	// sent to the server regardless of whether the field is empty or not.
1069	// This may be used to include empty fields in Patch requests.
1070	ForceSendFields []string `json:"-"`
1071
1072	// NullFields is a list of field names (e.g. "CutoverJobs") to include
1073	// in API requests with the JSON null value. By default, fields with
1074	// empty values are omitted from API requests. However, any field with
1075	// an empty value appearing in NullFields will be sent to the server as
1076	// null. It is an error if a field in this list has a non-empty value.
1077	// This may be used to include null fields in Patch requests.
1078	NullFields []string `json:"-"`
1079}
1080
1081func (s *ListCutoverJobsResponse) MarshalJSON() ([]byte, error) {
1082	type NoMethod ListCutoverJobsResponse
1083	raw := NoMethod(*s)
1084	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1085}
1086
1087// ListDatacenterConnectorsResponse: Response message for
1088// 'ListDatacenterConnectors' request.
1089type ListDatacenterConnectorsResponse struct {
1090	// DatacenterConnectors: Output only. The list of sources response.
1091	DatacenterConnectors []*DatacenterConnector `json:"datacenterConnectors,omitempty"`
1092
1093	// NextPageToken: Output only. A token, which can be sent as
1094	// `page_token` to retrieve the next page. If this field is omitted,
1095	// there are no subsequent pages.
1096	NextPageToken string `json:"nextPageToken,omitempty"`
1097
1098	// Unreachable: Output only. Locations that could not be reached.
1099	Unreachable []string `json:"unreachable,omitempty"`
1100
1101	// ServerResponse contains the HTTP response code and headers from the
1102	// server.
1103	googleapi.ServerResponse `json:"-"`
1104
1105	// ForceSendFields is a list of field names (e.g.
1106	// "DatacenterConnectors") to unconditionally include in API requests.
1107	// By default, fields with empty or default values are omitted from API
1108	// requests. However, any non-pointer, non-interface field appearing in
1109	// ForceSendFields will be sent to the server regardless of whether the
1110	// field is empty or not. This may be used to include empty fields in
1111	// Patch requests.
1112	ForceSendFields []string `json:"-"`
1113
1114	// NullFields is a list of field names (e.g. "DatacenterConnectors") to
1115	// include in API requests with the JSON null value. By default, fields
1116	// with empty values are omitted from API requests. However, any field
1117	// with an empty value appearing in NullFields will be sent to the
1118	// server as null. It is an error if a field in this list has a
1119	// non-empty value. This may be used to include null fields in Patch
1120	// requests.
1121	NullFields []string `json:"-"`
1122}
1123
1124func (s *ListDatacenterConnectorsResponse) MarshalJSON() ([]byte, error) {
1125	type NoMethod ListDatacenterConnectorsResponse
1126	raw := NoMethod(*s)
1127	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1128}
1129
1130// ListGroupsResponse: Response message for 'ListGroups' request.
1131type ListGroupsResponse struct {
1132	// Groups: Output only. The list of groups response.
1133	Groups []*Group `json:"groups,omitempty"`
1134
1135	// NextPageToken: Output only. A token, which can be sent as
1136	// `page_token` to retrieve the next page. If this field is omitted,
1137	// there are no subsequent pages.
1138	NextPageToken string `json:"nextPageToken,omitempty"`
1139
1140	// Unreachable: Output only. Locations that could not be reached.
1141	Unreachable []string `json:"unreachable,omitempty"`
1142
1143	// ServerResponse contains the HTTP response code and headers from the
1144	// server.
1145	googleapi.ServerResponse `json:"-"`
1146
1147	// ForceSendFields is a list of field names (e.g. "Groups") to
1148	// unconditionally include in API requests. By default, fields with
1149	// empty or default values are omitted from API requests. However, any
1150	// non-pointer, non-interface field appearing in ForceSendFields will be
1151	// sent to the server regardless of whether the field is empty or not.
1152	// This may be used to include empty fields in Patch requests.
1153	ForceSendFields []string `json:"-"`
1154
1155	// NullFields is a list of field names (e.g. "Groups") to include in API
1156	// requests with the JSON null value. By default, fields with empty
1157	// values are omitted from API requests. However, any field with an
1158	// empty value appearing in NullFields will be sent to the server as
1159	// null. It is an error if a field in this list has a non-empty value.
1160	// This may be used to include null fields in Patch requests.
1161	NullFields []string `json:"-"`
1162}
1163
1164func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) {
1165	type NoMethod ListGroupsResponse
1166	raw := NoMethod(*s)
1167	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1168}
1169
1170// ListLocationsResponse: The response message for
1171// Locations.ListLocations.
1172type ListLocationsResponse struct {
1173	// Locations: A list of locations that matches the specified filter in
1174	// the request.
1175	Locations []*Location `json:"locations,omitempty"`
1176
1177	// NextPageToken: The standard List next-page token.
1178	NextPageToken string `json:"nextPageToken,omitempty"`
1179
1180	// ServerResponse contains the HTTP response code and headers from the
1181	// server.
1182	googleapi.ServerResponse `json:"-"`
1183
1184	// ForceSendFields is a list of field names (e.g. "Locations") to
1185	// unconditionally include in API requests. By default, fields with
1186	// empty or default values are omitted from API requests. However, any
1187	// non-pointer, non-interface field appearing in ForceSendFields will be
1188	// sent to the server regardless of whether the field is empty or not.
1189	// This may be used to include empty fields in Patch requests.
1190	ForceSendFields []string `json:"-"`
1191
1192	// NullFields is a list of field names (e.g. "Locations") to include in
1193	// API requests with the JSON null value. By default, fields with empty
1194	// values are omitted from API requests. However, any field with an
1195	// empty value appearing in NullFields will be sent to the server as
1196	// null. It is an error if a field in this list has a non-empty value.
1197	// This may be used to include null fields in Patch requests.
1198	NullFields []string `json:"-"`
1199}
1200
1201func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
1202	type NoMethod ListLocationsResponse
1203	raw := NoMethod(*s)
1204	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1205}
1206
1207// ListMigratingVmsResponse: Response message for 'ListMigratingVms'
1208// request.
1209type ListMigratingVmsResponse struct {
1210	// MigratingVms: Output only. The list of Migrating VMs response.
1211	MigratingVms []*MigratingVm `json:"migratingVms,omitempty"`
1212
1213	// NextPageToken: Output only. A token, which can be sent as
1214	// `page_token` to retrieve the next page. If this field is omitted,
1215	// there are no subsequent pages.
1216	NextPageToken string `json:"nextPageToken,omitempty"`
1217
1218	// Unreachable: Output only. Locations that could not be reached.
1219	Unreachable []string `json:"unreachable,omitempty"`
1220
1221	// ServerResponse contains the HTTP response code and headers from the
1222	// server.
1223	googleapi.ServerResponse `json:"-"`
1224
1225	// ForceSendFields is a list of field names (e.g. "MigratingVms") to
1226	// unconditionally include in API requests. By default, fields with
1227	// empty or default values are omitted from API requests. However, any
1228	// non-pointer, non-interface field appearing in ForceSendFields will be
1229	// sent to the server regardless of whether the field is empty or not.
1230	// This may be used to include empty fields in Patch requests.
1231	ForceSendFields []string `json:"-"`
1232
1233	// NullFields is a list of field names (e.g. "MigratingVms") to include
1234	// in API requests with the JSON null value. By default, fields with
1235	// empty values are omitted from API requests. However, any field with
1236	// an empty value appearing in NullFields will be sent to the server as
1237	// null. It is an error if a field in this list has a non-empty value.
1238	// This may be used to include null fields in Patch requests.
1239	NullFields []string `json:"-"`
1240}
1241
1242func (s *ListMigratingVmsResponse) MarshalJSON() ([]byte, error) {
1243	type NoMethod ListMigratingVmsResponse
1244	raw := NoMethod(*s)
1245	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1246}
1247
1248// ListOperationsResponse: The response message for
1249// Operations.ListOperations.
1250type ListOperationsResponse struct {
1251	// NextPageToken: The standard List next-page token.
1252	NextPageToken string `json:"nextPageToken,omitempty"`
1253
1254	// Operations: A list of operations that matches the specified filter in
1255	// the request.
1256	Operations []*Operation `json:"operations,omitempty"`
1257
1258	// ServerResponse contains the HTTP response code and headers from the
1259	// server.
1260	googleapi.ServerResponse `json:"-"`
1261
1262	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1263	// unconditionally include in API requests. By default, fields with
1264	// empty or default values are omitted from API requests. However, any
1265	// non-pointer, non-interface field appearing in ForceSendFields will be
1266	// sent to the server regardless of whether the field is empty or not.
1267	// This may be used to include empty fields in Patch requests.
1268	ForceSendFields []string `json:"-"`
1269
1270	// NullFields is a list of field names (e.g. "NextPageToken") to include
1271	// in API requests with the JSON null value. By default, fields with
1272	// empty values are omitted from API requests. However, any field with
1273	// an empty value appearing in NullFields will be sent to the server as
1274	// null. It is an error if a field in this list has a non-empty value.
1275	// This may be used to include null fields in Patch requests.
1276	NullFields []string `json:"-"`
1277}
1278
1279func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
1280	type NoMethod ListOperationsResponse
1281	raw := NoMethod(*s)
1282	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1283}
1284
1285// ListSourcesResponse: Response message for 'ListSources' request.
1286type ListSourcesResponse struct {
1287	// NextPageToken: Output only. A token, which can be sent as
1288	// `page_token` to retrieve the next page. If this field is omitted,
1289	// there are no subsequent pages.
1290	NextPageToken string `json:"nextPageToken,omitempty"`
1291
1292	// Sources: Output only. The list of sources response.
1293	Sources []*Source `json:"sources,omitempty"`
1294
1295	// Unreachable: Output only. Locations that could not be reached.
1296	Unreachable []string `json:"unreachable,omitempty"`
1297
1298	// ServerResponse contains the HTTP response code and headers from the
1299	// server.
1300	googleapi.ServerResponse `json:"-"`
1301
1302	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1303	// unconditionally include in API requests. By default, fields with
1304	// empty or default values are omitted from API requests. However, any
1305	// non-pointer, non-interface field appearing in ForceSendFields will be
1306	// sent to the server regardless of whether the field is empty or not.
1307	// This may be used to include empty fields in Patch requests.
1308	ForceSendFields []string `json:"-"`
1309
1310	// NullFields is a list of field names (e.g. "NextPageToken") to include
1311	// in API requests with the JSON null value. By default, fields with
1312	// empty values are omitted from API requests. However, any field with
1313	// an empty value appearing in NullFields will be sent to the server as
1314	// null. It is an error if a field in this list has a non-empty value.
1315	// This may be used to include null fields in Patch requests.
1316	NullFields []string `json:"-"`
1317}
1318
1319func (s *ListSourcesResponse) MarshalJSON() ([]byte, error) {
1320	type NoMethod ListSourcesResponse
1321	raw := NoMethod(*s)
1322	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1323}
1324
1325// ListTargetProjectsResponse: Response message for 'ListTargetProjects'
1326// call.
1327type ListTargetProjectsResponse struct {
1328	// NextPageToken: Output only. A token, which can be sent as
1329	// `page_token` to retrieve the next page. If this field is omitted,
1330	// there are no subsequent pages.
1331	NextPageToken string `json:"nextPageToken,omitempty"`
1332
1333	// TargetProjects: Output only. The list of target response.
1334	TargetProjects []*TargetProject `json:"targetProjects,omitempty"`
1335
1336	// Unreachable: Output only. Locations that could not be reached.
1337	Unreachable []string `json:"unreachable,omitempty"`
1338
1339	// ServerResponse contains the HTTP response code and headers from the
1340	// server.
1341	googleapi.ServerResponse `json:"-"`
1342
1343	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1344	// unconditionally include in API requests. By default, fields with
1345	// empty or default values are omitted from API requests. However, any
1346	// non-pointer, non-interface field appearing in ForceSendFields will be
1347	// sent to the server regardless of whether the field is empty or not.
1348	// This may be used to include empty fields in Patch requests.
1349	ForceSendFields []string `json:"-"`
1350
1351	// NullFields is a list of field names (e.g. "NextPageToken") to include
1352	// in API requests with the JSON null value. By default, fields with
1353	// empty values are omitted from API requests. However, any field with
1354	// an empty value appearing in NullFields will be sent to the server as
1355	// null. It is an error if a field in this list has a non-empty value.
1356	// This may be used to include null fields in Patch requests.
1357	NullFields []string `json:"-"`
1358}
1359
1360func (s *ListTargetProjectsResponse) MarshalJSON() ([]byte, error) {
1361	type NoMethod ListTargetProjectsResponse
1362	raw := NoMethod(*s)
1363	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1364}
1365
1366// ListUtilizationReportsResponse: Response message for
1367// 'ListUtilizationReports' request.
1368type ListUtilizationReportsResponse struct {
1369	// NextPageToken: Output only. A token, which can be sent as
1370	// `page_token` to retrieve the next page. If this field is omitted,
1371	// there are no subsequent pages.
1372	NextPageToken string `json:"nextPageToken,omitempty"`
1373
1374	// Unreachable: Output only. Locations that could not be reached.
1375	Unreachable []string `json:"unreachable,omitempty"`
1376
1377	// UtilizationReports: Output only. The list of reports.
1378	UtilizationReports []*UtilizationReport `json:"utilizationReports,omitempty"`
1379
1380	// ServerResponse contains the HTTP response code and headers from the
1381	// server.
1382	googleapi.ServerResponse `json:"-"`
1383
1384	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
1385	// unconditionally include in API requests. By default, fields with
1386	// empty or default values are omitted from API requests. However, any
1387	// non-pointer, non-interface field appearing in ForceSendFields will be
1388	// sent to the server regardless of whether the field is empty or not.
1389	// This may be used to include empty fields in Patch requests.
1390	ForceSendFields []string `json:"-"`
1391
1392	// NullFields is a list of field names (e.g. "NextPageToken") to include
1393	// in API requests with the JSON null value. By default, fields with
1394	// empty values are omitted from API requests. However, any field with
1395	// an empty value appearing in NullFields will be sent to the server as
1396	// null. It is an error if a field in this list has a non-empty value.
1397	// This may be used to include null fields in Patch requests.
1398	NullFields []string `json:"-"`
1399}
1400
1401func (s *ListUtilizationReportsResponse) MarshalJSON() ([]byte, error) {
1402	type NoMethod ListUtilizationReportsResponse
1403	raw := NoMethod(*s)
1404	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1405}
1406
1407// LocalizedMessage: Provides a localized error message that is safe to
1408// return to the user which can be attached to an RPC error.
1409type LocalizedMessage struct {
1410	// Locale: The locale used following the specification defined at
1411	// http://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US",
1412	// "fr-CH", "es-MX"
1413	Locale string `json:"locale,omitempty"`
1414
1415	// Message: The localized error message in the above locale.
1416	Message string `json:"message,omitempty"`
1417
1418	// ForceSendFields is a list of field names (e.g. "Locale") to
1419	// unconditionally include in API requests. By default, fields with
1420	// empty or default values are omitted from API requests. However, any
1421	// non-pointer, non-interface field appearing in ForceSendFields will be
1422	// sent to the server regardless of whether the field is empty or not.
1423	// This may be used to include empty fields in Patch requests.
1424	ForceSendFields []string `json:"-"`
1425
1426	// NullFields is a list of field names (e.g. "Locale") to include in API
1427	// requests with the JSON null value. By default, fields with empty
1428	// values are omitted from API requests. However, any field with an
1429	// empty value appearing in NullFields will be sent to the server as
1430	// null. It is an error if a field in this list has a non-empty value.
1431	// This may be used to include null fields in Patch requests.
1432	NullFields []string `json:"-"`
1433}
1434
1435func (s *LocalizedMessage) MarshalJSON() ([]byte, error) {
1436	type NoMethod LocalizedMessage
1437	raw := NoMethod(*s)
1438	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1439}
1440
1441// Location: A resource that represents Google Cloud Platform location.
1442type Location struct {
1443	// DisplayName: The friendly name for this location, typically a nearby
1444	// city name. For example, "Tokyo".
1445	DisplayName string `json:"displayName,omitempty"`
1446
1447	// Labels: Cross-service attributes for the location. For example
1448	// {"cloud.googleapis.com/region": "us-east1"}
1449	Labels map[string]string `json:"labels,omitempty"`
1450
1451	// LocationId: The canonical id for this location. For example:
1452	// "us-east1".
1453	LocationId string `json:"locationId,omitempty"`
1454
1455	// Metadata: Service-specific metadata. For example the available
1456	// capacity at the given location.
1457	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1458
1459	// Name: Resource name for the location, which may vary between
1460	// implementations. For example:
1461	// "projects/example-project/locations/us-east1"
1462	Name string `json:"name,omitempty"`
1463
1464	// ServerResponse contains the HTTP response code and headers from the
1465	// server.
1466	googleapi.ServerResponse `json:"-"`
1467
1468	// ForceSendFields is a list of field names (e.g. "DisplayName") to
1469	// unconditionally include in API requests. By default, fields with
1470	// empty or default values are omitted from API requests. However, any
1471	// non-pointer, non-interface field appearing in ForceSendFields will be
1472	// sent to the server regardless of whether the field is empty or not.
1473	// This may be used to include empty fields in Patch requests.
1474	ForceSendFields []string `json:"-"`
1475
1476	// NullFields is a list of field names (e.g. "DisplayName") to include
1477	// in API requests with the JSON null value. By default, fields with
1478	// empty values are omitted from API requests. However, any field with
1479	// an empty value appearing in NullFields will be sent to the server as
1480	// null. It is an error if a field in this list has a non-empty value.
1481	// This may be used to include null fields in Patch requests.
1482	NullFields []string `json:"-"`
1483}
1484
1485func (s *Location) MarshalJSON() ([]byte, error) {
1486	type NoMethod Location
1487	raw := NoMethod(*s)
1488	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1489}
1490
1491// MigratingVm: MigratingVm describes the VM that will be migrated from
1492// a Source environment and its replication state.
1493type MigratingVm struct {
1494	// ComputeEngineTargetDefaults: Details of the target VM in Compute
1495	// Engine.
1496	ComputeEngineTargetDefaults *ComputeEngineTargetDefaults `json:"computeEngineTargetDefaults,omitempty"`
1497
1498	// ComputeEngineVmDefaults: Details of the VM in Compute Engine.
1499	// Deprecated: Use compute_engine_target_defaults instead.
1500	ComputeEngineVmDefaults *TargetVMDetails `json:"computeEngineVmDefaults,omitempty"`
1501
1502	// CreateTime: Output only. The time the migrating VM was created (this
1503	// refers to this resource and not to the time it was installed in the
1504	// source).
1505	CreateTime string `json:"createTime,omitempty"`
1506
1507	// CurrentSyncInfo: Output only. The percentage progress of the current
1508	// running replication cycle.
1509	CurrentSyncInfo *ReplicationCycle `json:"currentSyncInfo,omitempty"`
1510
1511	// Description: The description attached to the migrating VM by the
1512	// user.
1513	Description string `json:"description,omitempty"`
1514
1515	// DisplayName: The display name attached to the MigratingVm by the
1516	// user.
1517	DisplayName string `json:"displayName,omitempty"`
1518
1519	// Error: Output only. Provides details on the state of the Migrating VM
1520	// in case of an error in replication.
1521	Error *Status `json:"error,omitempty"`
1522
1523	// Group: Output only. The group this migrating vm is included in, if
1524	// any. The group is represented by the full path of the appropriate
1525	// Group resource.
1526	Group string `json:"group,omitempty"`
1527
1528	// Labels: The labels of the migrating VM.
1529	Labels map[string]string `json:"labels,omitempty"`
1530
1531	// LastSync: Output only. The most updated snapshot created time in the
1532	// source that finished replication.
1533	LastSync *ReplicationSync `json:"lastSync,omitempty"`
1534
1535	// Name: Output only. The identifier of the MigratingVm.
1536	Name string `json:"name,omitempty"`
1537
1538	// Policy: The replication schedule policy.
1539	Policy *SchedulePolicy `json:"policy,omitempty"`
1540
1541	// RecentCloneJobs: Output only. The recent clone jobs performed on the
1542	// migrating VM. This field holds the vm's last completed clone job and
1543	// the vm's running clone job, if one exists.
1544	RecentCloneJobs []*CloneJob `json:"recentCloneJobs,omitempty"`
1545
1546	// RecentCutoverJobs: Output only. The recent cutover jobs performed on
1547	// the migrating VM. This field holds the vm's last completed cutover
1548	// job and the vm's running cutover job, if one exists.
1549	RecentCutoverJobs []*CutoverJob `json:"recentCutoverJobs,omitempty"`
1550
1551	// SourceVmId: The unique ID of the VM in the source. The VM's name in
1552	// vSphere can be changed, so this is not the VM's name but rather its
1553	// moRef id. This id is of the form vm-.
1554	SourceVmId string `json:"sourceVmId,omitempty"`
1555
1556	// State: Output only. State of the MigratingVm.
1557	//
1558	// Possible values:
1559	//   "STATE_UNSPECIFIED" - The state was not sampled by the health
1560	// checks yet.
1561	//   "PENDING" - The VM in the source is being verified.
1562	//   "READY" - The source VM was verified, and it's ready to start
1563	// replication.
1564	//   "FIRST_SYNC" - Migration is going through the first sync cycle.
1565	//   "ACTIVE" - The replication is active, and it's running or scheduled
1566	// to run.
1567	//   "CUTTING_OVER" - The source VM is being turned off, and a final
1568	// replication is currently running.
1569	//   "CUTOVER" - The source VM was stopped and replicated. The
1570	// replication is currently paused.
1571	//   "FINAL_SYNC" - A cutover job is active and replication cycle is
1572	// running the final sync.
1573	//   "PAUSED" - The replication was paused by the user and no cycles are
1574	// scheduled to run.
1575	//   "FINALIZING" - The migrating VM is being finalized and migration
1576	// resources are being removed.
1577	//   "FINALIZED" - The replication process is done. The migrating VM is
1578	// finalized and no longer consumes billable resources.
1579	//   "ERROR" - The replication process encountered an unrecoverable
1580	// error and was aborted.
1581	State string `json:"state,omitempty"`
1582
1583	// StateTime: Output only. The last time the migrating VM state was
1584	// updated.
1585	StateTime string `json:"stateTime,omitempty"`
1586
1587	// TargetDefaults: The default configuration of the target VM that will
1588	// be created in GCP as a result of the migration. Deprecated: Use
1589	// compute_engine_target_defaults instead.
1590	TargetDefaults *TargetVMDetails `json:"targetDefaults,omitempty"`
1591
1592	// UpdateTime: Output only. The last time the migrating VM resource was
1593	// updated.
1594	UpdateTime string `json:"updateTime,omitempty"`
1595
1596	// ServerResponse contains the HTTP response code and headers from the
1597	// server.
1598	googleapi.ServerResponse `json:"-"`
1599
1600	// ForceSendFields is a list of field names (e.g.
1601	// "ComputeEngineTargetDefaults") to unconditionally include in API
1602	// requests. By default, fields with empty or default values are omitted
1603	// from API requests. However, any non-pointer, non-interface field
1604	// appearing in ForceSendFields will be sent to the server regardless of
1605	// whether the field is empty or not. This may be used to include empty
1606	// fields in Patch requests.
1607	ForceSendFields []string `json:"-"`
1608
1609	// NullFields is a list of field names (e.g.
1610	// "ComputeEngineTargetDefaults") to include in API requests with the
1611	// JSON null value. By default, fields with empty values are omitted
1612	// from API requests. However, any field with an empty value appearing
1613	// in NullFields will be sent to the server as null. It is an error if a
1614	// field in this list has a non-empty value. This may be used to include
1615	// null fields in Patch requests.
1616	NullFields []string `json:"-"`
1617}
1618
1619func (s *MigratingVm) MarshalJSON() ([]byte, error) {
1620	type NoMethod MigratingVm
1621	raw := NoMethod(*s)
1622	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1623}
1624
1625// MigrationError: Represents migration resource error information that
1626// can be used with google.rpc.Status message. MigrationError is used to
1627// present the user with error information in migration operations.
1628type MigrationError struct {
1629	// ActionItem: Output only. Suggested action for solving the error.
1630	ActionItem *LocalizedMessage `json:"actionItem,omitempty"`
1631
1632	// Code: Output only. The error code.
1633	//
1634	// Possible values:
1635	//   "ERROR_CODE_UNSPECIFIED" - Default value. This value is not used.
1636	//   "UNKNOWN_ERROR" - Migrate for Compute encountered an unknown error.
1637	//   "SOURCE_VALIDATION_ERROR" - Migrate for Compute encountered an
1638	// error while validating replication source health.
1639	//   "SOURCE_REPLICATION_ERROR" - Migrate for Compute encountered an
1640	// error during source data operation.
1641	//   "TARGET_REPLICATION_ERROR" - Migrate for Compute encountered an
1642	// error during target data operation.
1643	//   "OS_ADAPTATION_ERROR" - Migrate for Compute encountered an error
1644	// during OS adaptation.
1645	//   "CLONE_ERROR" - Migrate for Compute encountered an error in clone
1646	// operation.
1647	//   "CUTOVER_ERROR" - Migrate for Compute encountered an error in
1648	// cutover operation.
1649	//   "UTILIZATION_REPORT_ERROR" - Migrate for Compute encountered an
1650	// error during utilization report creation.
1651	Code string `json:"code,omitempty"`
1652
1653	// ErrorMessage: Output only. The localized error message.
1654	ErrorMessage *LocalizedMessage `json:"errorMessage,omitempty"`
1655
1656	// ErrorTime: Output only. The time the error occurred.
1657	ErrorTime string `json:"errorTime,omitempty"`
1658
1659	// HelpLinks: Output only. URL(s) pointing to additional information on
1660	// handling the current error.
1661	HelpLinks []*Link `json:"helpLinks,omitempty"`
1662
1663	// ForceSendFields is a list of field names (e.g. "ActionItem") to
1664	// unconditionally include in API requests. By default, fields with
1665	// empty or default values are omitted from API requests. However, any
1666	// non-pointer, non-interface field appearing in ForceSendFields will be
1667	// sent to the server regardless of whether the field is empty or not.
1668	// This may be used to include empty fields in Patch requests.
1669	ForceSendFields []string `json:"-"`
1670
1671	// NullFields is a list of field names (e.g. "ActionItem") to include in
1672	// API requests with the JSON null value. By default, fields with empty
1673	// values are omitted from API requests. However, any field with an
1674	// empty value appearing in NullFields will be sent to the server as
1675	// null. It is an error if a field in this list has a non-empty value.
1676	// This may be used to include null fields in Patch requests.
1677	NullFields []string `json:"-"`
1678}
1679
1680func (s *MigrationError) MarshalJSON() ([]byte, error) {
1681	type NoMethod MigrationError
1682	raw := NoMethod(*s)
1683	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1684}
1685
1686// NetworkInterface: NetworkInterface represents a NIC of a VM.
1687type NetworkInterface struct {
1688	// ExternalIp: The external IP to define in the NIC.
1689	ExternalIp string `json:"externalIp,omitempty"`
1690
1691	// InternalIp: The internal IP to define in the NIC. The formats
1692	// accepted are: `ephemeral` \ ipv4 address \ a named address resource
1693	// full path.
1694	InternalIp string `json:"internalIp,omitempty"`
1695
1696	// Network: The network to connect the NIC to.
1697	Network string `json:"network,omitempty"`
1698
1699	// Subnetwork: The subnetwork to connect the NIC to.
1700	Subnetwork string `json:"subnetwork,omitempty"`
1701
1702	// ForceSendFields is a list of field names (e.g. "ExternalIp") to
1703	// unconditionally include in API requests. By default, fields with
1704	// empty or default values are omitted from API requests. However, any
1705	// non-pointer, non-interface field appearing in ForceSendFields will be
1706	// sent to the server regardless of whether the field is empty or not.
1707	// This may be used to include empty fields in Patch requests.
1708	ForceSendFields []string `json:"-"`
1709
1710	// NullFields is a list of field names (e.g. "ExternalIp") to include in
1711	// API requests with the JSON null value. By default, fields with empty
1712	// values are omitted from API requests. However, any field with an
1713	// empty value appearing in NullFields will be sent to the server as
1714	// null. It is an error if a field in this list has a non-empty value.
1715	// This may be used to include null fields in Patch requests.
1716	NullFields []string `json:"-"`
1717}
1718
1719func (s *NetworkInterface) MarshalJSON() ([]byte, error) {
1720	type NoMethod NetworkInterface
1721	raw := NoMethod(*s)
1722	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1723}
1724
1725// Operation: This resource represents a long-running operation that is
1726// the result of a network API call.
1727type Operation struct {
1728	// Done: If the value is `false`, it means the operation is still in
1729	// progress. If `true`, the operation is completed, and either `error`
1730	// or `response` is available.
1731	Done bool `json:"done,omitempty"`
1732
1733	// Error: The error result of the operation in case of failure or
1734	// cancellation.
1735	Error *Status `json:"error,omitempty"`
1736
1737	// Metadata: Service-specific metadata associated with the operation. It
1738	// typically contains progress information and common metadata such as
1739	// create time. Some services might not provide such metadata. Any
1740	// method that returns a long-running operation should document the
1741	// metadata type, if any.
1742	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1743
1744	// Name: The server-assigned name, which is only unique within the same
1745	// service that originally returns it. If you use the default HTTP
1746	// mapping, the `name` should be a resource name ending with
1747	// `operations/{unique_id}`.
1748	Name string `json:"name,omitempty"`
1749
1750	// Response: The normal response of the operation in case of success. If
1751	// the original method returns no data on success, such as `Delete`, the
1752	// response is `google.protobuf.Empty`. If the original method is
1753	// standard `Get`/`Create`/`Update`, the response should be the
1754	// resource. For other methods, the response should have the type
1755	// `XxxResponse`, where `Xxx` is the original method name. For example,
1756	// if the original method name is `TakeSnapshot()`, the inferred
1757	// response type is `TakeSnapshotResponse`.
1758	Response googleapi.RawMessage `json:"response,omitempty"`
1759
1760	// ServerResponse contains the HTTP response code and headers from the
1761	// server.
1762	googleapi.ServerResponse `json:"-"`
1763
1764	// ForceSendFields is a list of field names (e.g. "Done") to
1765	// unconditionally include in API requests. By default, fields with
1766	// empty or default values are omitted from API requests. However, any
1767	// non-pointer, non-interface field appearing in ForceSendFields will be
1768	// sent to the server regardless of whether the field is empty or not.
1769	// This may be used to include empty fields in Patch requests.
1770	ForceSendFields []string `json:"-"`
1771
1772	// NullFields is a list of field names (e.g. "Done") to include in API
1773	// requests with the JSON null value. By default, fields with empty
1774	// values are omitted from API requests. However, any field with an
1775	// empty value appearing in NullFields will be sent to the server as
1776	// null. It is an error if a field in this list has a non-empty value.
1777	// This may be used to include null fields in Patch requests.
1778	NullFields []string `json:"-"`
1779}
1780
1781func (s *Operation) MarshalJSON() ([]byte, error) {
1782	type NoMethod Operation
1783	raw := NoMethod(*s)
1784	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1785}
1786
1787// OperationMetadata: Represents the metadata of the long-running
1788// operation.
1789type OperationMetadata struct {
1790	// ApiVersion: Output only. API version used to start the operation.
1791	ApiVersion string `json:"apiVersion,omitempty"`
1792
1793	// CreateTime: Output only. The time the operation was created.
1794	CreateTime string `json:"createTime,omitempty"`
1795
1796	// EndTime: Output only. The time the operation finished running.
1797	EndTime string `json:"endTime,omitempty"`
1798
1799	// RequestedCancellation: Output only. Identifies whether the user has
1800	// requested cancellation of the operation. Operations that have
1801	// successfully been cancelled have Operation.error value with a
1802	// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
1803	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
1804
1805	// StatusMessage: Output only. Human-readable status of the operation,
1806	// if any.
1807	StatusMessage string `json:"statusMessage,omitempty"`
1808
1809	// Target: Output only. Server-defined resource path for the target of
1810	// the operation.
1811	Target string `json:"target,omitempty"`
1812
1813	// Verb: Output only. Name of the verb executed by the operation.
1814	Verb string `json:"verb,omitempty"`
1815
1816	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
1817	// unconditionally include in API requests. By default, fields with
1818	// empty or default values are omitted from API requests. However, any
1819	// non-pointer, non-interface field appearing in ForceSendFields will be
1820	// sent to the server regardless of whether the field is empty or not.
1821	// This may be used to include empty fields in Patch requests.
1822	ForceSendFields []string `json:"-"`
1823
1824	// NullFields is a list of field names (e.g. "ApiVersion") to include in
1825	// API requests with the JSON null value. By default, fields with empty
1826	// values are omitted from API requests. However, any field with an
1827	// empty value appearing in NullFields will be sent to the server as
1828	// null. It is an error if a field in this list has a non-empty value.
1829	// This may be used to include null fields in Patch requests.
1830	NullFields []string `json:"-"`
1831}
1832
1833func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
1834	type NoMethod OperationMetadata
1835	raw := NoMethod(*s)
1836	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1837}
1838
1839// PauseMigrationRequest: Request message for 'PauseMigration' request.
1840type PauseMigrationRequest struct {
1841}
1842
1843// RemoveGroupMigrationRequest: Request message for 'RemoveMigration'
1844// request.
1845type RemoveGroupMigrationRequest struct {
1846	// MigratingVm: The MigratingVm to remove.
1847	MigratingVm string `json:"migratingVm,omitempty"`
1848
1849	// ForceSendFields is a list of field names (e.g. "MigratingVm") to
1850	// unconditionally include in API requests. By default, fields with
1851	// empty or default values are omitted from API requests. However, any
1852	// non-pointer, non-interface field appearing in ForceSendFields will be
1853	// sent to the server regardless of whether the field is empty or not.
1854	// This may be used to include empty fields in Patch requests.
1855	ForceSendFields []string `json:"-"`
1856
1857	// NullFields is a list of field names (e.g. "MigratingVm") to include
1858	// in API requests with the JSON null value. By default, fields with
1859	// empty values are omitted from API requests. However, any field with
1860	// an empty value appearing in NullFields will be sent to the server as
1861	// null. It is an error if a field in this list has a non-empty value.
1862	// This may be used to include null fields in Patch requests.
1863	NullFields []string `json:"-"`
1864}
1865
1866func (s *RemoveGroupMigrationRequest) MarshalJSON() ([]byte, error) {
1867	type NoMethod RemoveGroupMigrationRequest
1868	raw := NoMethod(*s)
1869	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1870}
1871
1872// ReplicationCycle: ReplicationCycle contains information about the
1873// current replication cycle status.
1874type ReplicationCycle struct {
1875	// Progress: The current progress in percentage of this cycle.
1876	Progress int64 `json:"progress,omitempty"`
1877
1878	// ProgressPercent: The current progress in percentage of this cycle.
1879	ProgressPercent int64 `json:"progressPercent,omitempty"`
1880
1881	// StartTime: The time the replication cycle has started.
1882	StartTime string `json:"startTime,omitempty"`
1883
1884	// ForceSendFields is a list of field names (e.g. "Progress") to
1885	// unconditionally include in API requests. By default, fields with
1886	// empty or default values are omitted from API requests. However, any
1887	// non-pointer, non-interface field appearing in ForceSendFields will be
1888	// sent to the server regardless of whether the field is empty or not.
1889	// This may be used to include empty fields in Patch requests.
1890	ForceSendFields []string `json:"-"`
1891
1892	// NullFields is a list of field names (e.g. "Progress") to include in
1893	// API requests with the JSON null value. By default, fields with empty
1894	// values are omitted from API requests. However, any field with an
1895	// empty value appearing in NullFields will be sent to the server as
1896	// null. It is an error if a field in this list has a non-empty value.
1897	// This may be used to include null fields in Patch requests.
1898	NullFields []string `json:"-"`
1899}
1900
1901func (s *ReplicationCycle) MarshalJSON() ([]byte, error) {
1902	type NoMethod ReplicationCycle
1903	raw := NoMethod(*s)
1904	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1905}
1906
1907// ReplicationSync: ReplicationSync contain information about the last
1908// replica sync to the cloud.
1909type ReplicationSync struct {
1910	// LastSyncTime: The most updated snapshot created time in the source
1911	// that finished replication.
1912	LastSyncTime string `json:"lastSyncTime,omitempty"`
1913
1914	// ForceSendFields is a list of field names (e.g. "LastSyncTime") to
1915	// unconditionally include in API requests. By default, fields with
1916	// empty or default values are omitted from API requests. However, any
1917	// non-pointer, non-interface field appearing in ForceSendFields will be
1918	// sent to the server regardless of whether the field is empty or not.
1919	// This may be used to include empty fields in Patch requests.
1920	ForceSendFields []string `json:"-"`
1921
1922	// NullFields is a list of field names (e.g. "LastSyncTime") to include
1923	// in API requests with the JSON null value. By default, fields with
1924	// empty values are omitted from API requests. However, any field with
1925	// an empty value appearing in NullFields will be sent to the server as
1926	// null. It is an error if a field in this list has a non-empty value.
1927	// This may be used to include null fields in Patch requests.
1928	NullFields []string `json:"-"`
1929}
1930
1931func (s *ReplicationSync) MarshalJSON() ([]byte, error) {
1932	type NoMethod ReplicationSync
1933	raw := NoMethod(*s)
1934	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1935}
1936
1937// ResumeMigrationRequest: Request message for 'ResumeMigration'
1938// request.
1939type ResumeMigrationRequest struct {
1940}
1941
1942// SchedulePolicy: A policy for scheduling replications.
1943type SchedulePolicy struct {
1944	// IdleDuration: The idle duration between replication stages.
1945	IdleDuration string `json:"idleDuration,omitempty"`
1946
1947	// SkipOsAdaptation: A flag to indicate whether to skip OS adaptation
1948	// during the replication sync. OS adaptation is a process where the
1949	// VM's operating system undergoes changes and adaptations to fully
1950	// function on Compute Engine.
1951	SkipOsAdaptation bool `json:"skipOsAdaptation,omitempty"`
1952
1953	// ForceSendFields is a list of field names (e.g. "IdleDuration") to
1954	// unconditionally include in API requests. By default, fields with
1955	// empty or default values are omitted from API requests. However, any
1956	// non-pointer, non-interface field appearing in ForceSendFields will be
1957	// sent to the server regardless of whether the field is empty or not.
1958	// This may be used to include empty fields in Patch requests.
1959	ForceSendFields []string `json:"-"`
1960
1961	// NullFields is a list of field names (e.g. "IdleDuration") to include
1962	// in API requests with the JSON null value. By default, fields with
1963	// empty values are omitted from API requests. However, any field with
1964	// an empty value appearing in NullFields will be sent to the server as
1965	// null. It is an error if a field in this list has a non-empty value.
1966	// This may be used to include null fields in Patch requests.
1967	NullFields []string `json:"-"`
1968}
1969
1970func (s *SchedulePolicy) MarshalJSON() ([]byte, error) {
1971	type NoMethod SchedulePolicy
1972	raw := NoMethod(*s)
1973	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1974}
1975
1976// SchedulingNodeAffinity: Node Affinity: the configuration of desired
1977// nodes onto which this Instance could be scheduled. Based on
1978// https://cloud.google.com/compute/docs/reference/rest/v1/instances/setScheduling
1979type SchedulingNodeAffinity struct {
1980	// Key: The label key of Node resource to reference.
1981	Key string `json:"key,omitempty"`
1982
1983	// Operator: The operator to use for the node resources specified in the
1984	// `values` parameter.
1985	//
1986	// Possible values:
1987	//   "OPERATOR_UNSPECIFIED" - An unknown, unexpected behavior.
1988	//   "IN" - The node resource group should be in these resources
1989	// affinity.
1990	//   "NOT_IN" - The node resource group should not be in these resources
1991	// affinity.
1992	Operator string `json:"operator,omitempty"`
1993
1994	// Values: Corresponds to the label values of Node resource.
1995	Values []string `json:"values,omitempty"`
1996
1997	// ForceSendFields is a list of field names (e.g. "Key") to
1998	// unconditionally include in API requests. By default, fields with
1999	// empty or default values are omitted from API requests. However, any
2000	// non-pointer, non-interface field appearing in ForceSendFields will be
2001	// sent to the server regardless of whether the field is empty or not.
2002	// This may be used to include empty fields in Patch requests.
2003	ForceSendFields []string `json:"-"`
2004
2005	// NullFields is a list of field names (e.g. "Key") to include in API
2006	// requests with the JSON null value. By default, fields with empty
2007	// values are omitted from API requests. However, any field with an
2008	// empty value appearing in NullFields will be sent to the server as
2009	// null. It is an error if a field in this list has a non-empty value.
2010	// This may be used to include null fields in Patch requests.
2011	NullFields []string `json:"-"`
2012}
2013
2014func (s *SchedulingNodeAffinity) MarshalJSON() ([]byte, error) {
2015	type NoMethod SchedulingNodeAffinity
2016	raw := NoMethod(*s)
2017	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2018}
2019
2020// Source: Source message describes a specific vm migration Source
2021// resource. It contains the source environment information.
2022type Source struct {
2023	// CreateTime: Output only. The create time timestamp.
2024	CreateTime string `json:"createTime,omitempty"`
2025
2026	// Description: User-provided description of the source.
2027	Description string `json:"description,omitempty"`
2028
2029	// Error: Output only. Provides details on the state of the Source in
2030	// case of an error.
2031	Error *Status `json:"error,omitempty"`
2032
2033	// Labels: The labels of the source.
2034	Labels map[string]string `json:"labels,omitempty"`
2035
2036	// Name: Output only. The Source name.
2037	Name string `json:"name,omitempty"`
2038
2039	// UpdateTime: Output only. The update time timestamp.
2040	UpdateTime string `json:"updateTime,omitempty"`
2041
2042	// Vmware: Vmware type source details.
2043	Vmware *VmwareSourceDetails `json:"vmware,omitempty"`
2044
2045	// ServerResponse contains the HTTP response code and headers from the
2046	// server.
2047	googleapi.ServerResponse `json:"-"`
2048
2049	// ForceSendFields is a list of field names (e.g. "CreateTime") to
2050	// unconditionally include in API requests. By default, fields with
2051	// empty or default values are omitted from API requests. However, any
2052	// non-pointer, non-interface field appearing in ForceSendFields will be
2053	// sent to the server regardless of whether the field is empty or not.
2054	// This may be used to include empty fields in Patch requests.
2055	ForceSendFields []string `json:"-"`
2056
2057	// NullFields is a list of field names (e.g. "CreateTime") to include in
2058	// API requests with the JSON null value. By default, fields with empty
2059	// values are omitted from API requests. However, any field with an
2060	// empty value appearing in NullFields will be sent to the server as
2061	// null. It is an error if a field in this list has a non-empty value.
2062	// This may be used to include null fields in Patch requests.
2063	NullFields []string `json:"-"`
2064}
2065
2066func (s *Source) MarshalJSON() ([]byte, error) {
2067	type NoMethod Source
2068	raw := NoMethod(*s)
2069	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2070}
2071
2072// StartMigrationRequest: Request message for 'StartMigrationRequest'
2073// request.
2074type StartMigrationRequest struct {
2075}
2076
2077// Status: The `Status` type defines a logical error model that is
2078// suitable for different programming environments, including REST APIs
2079// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
2080// `Status` message contains three pieces of data: error code, error
2081// message, and error details. You can find out more about this error
2082// model and how to work with it in the API Design Guide
2083// (https://cloud.google.com/apis/design/errors).
2084type Status struct {
2085	// Code: The status code, which should be an enum value of
2086	// google.rpc.Code.
2087	Code int64 `json:"code,omitempty"`
2088
2089	// Details: A list of messages that carry the error details. There is a
2090	// common set of message types for APIs to use.
2091	Details []googleapi.RawMessage `json:"details,omitempty"`
2092
2093	// Message: A developer-facing error message, which should be in
2094	// English. Any user-facing error message should be localized and sent
2095	// in the google.rpc.Status.details field, or localized by the client.
2096	Message string `json:"message,omitempty"`
2097
2098	// ForceSendFields is a list of field names (e.g. "Code") to
2099	// unconditionally include in API requests. By default, fields with
2100	// empty or default values are omitted from API requests. However, any
2101	// non-pointer, non-interface field appearing in ForceSendFields will be
2102	// sent to the server regardless of whether the field is empty or not.
2103	// This may be used to include empty fields in Patch requests.
2104	ForceSendFields []string `json:"-"`
2105
2106	// NullFields is a list of field names (e.g. "Code") to include in API
2107	// requests with the JSON null value. By default, fields with empty
2108	// values are omitted from API requests. However, any field with an
2109	// empty value appearing in NullFields will be sent to the server as
2110	// null. It is an error if a field in this list has a non-empty value.
2111	// This may be used to include null fields in Patch requests.
2112	NullFields []string `json:"-"`
2113}
2114
2115func (s *Status) MarshalJSON() ([]byte, error) {
2116	type NoMethod Status
2117	raw := NoMethod(*s)
2118	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2119}
2120
2121// TargetProject: TargetProject message represents a target Compute
2122// Engine project for a migration or a clone.
2123type TargetProject struct {
2124	// CreateTime: Output only. The time this target project resource was
2125	// created (not related to when the Compute Engine project it points to
2126	// was created).
2127	CreateTime string `json:"createTime,omitempty"`
2128
2129	// Description: The target project's description.
2130	Description string `json:"description,omitempty"`
2131
2132	// Name: The name of the target project.
2133	Name string `json:"name,omitempty"`
2134
2135	// Project: The target project ID (number) or project name.
2136	Project string `json:"project,omitempty"`
2137
2138	// UpdateTime: Output only. The last time the target project resource
2139	// was updated.
2140	UpdateTime string `json:"updateTime,omitempty"`
2141
2142	// ServerResponse contains the HTTP response code and headers from the
2143	// server.
2144	googleapi.ServerResponse `json:"-"`
2145
2146	// ForceSendFields is a list of field names (e.g. "CreateTime") to
2147	// unconditionally include in API requests. By default, fields with
2148	// empty or default values are omitted from API requests. However, any
2149	// non-pointer, non-interface field appearing in ForceSendFields will be
2150	// sent to the server regardless of whether the field is empty or not.
2151	// This may be used to include empty fields in Patch requests.
2152	ForceSendFields []string `json:"-"`
2153
2154	// NullFields is a list of field names (e.g. "CreateTime") to include in
2155	// API requests with the JSON null value. By default, fields with empty
2156	// values are omitted from API requests. However, any field with an
2157	// empty value appearing in NullFields will be sent to the server as
2158	// null. It is an error if a field in this list has a non-empty value.
2159	// This may be used to include null fields in Patch requests.
2160	NullFields []string `json:"-"`
2161}
2162
2163func (s *TargetProject) MarshalJSON() ([]byte, error) {
2164	type NoMethod TargetProject
2165	raw := NoMethod(*s)
2166	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2167}
2168
2169// TargetVMDetails: TargetVMDetails is a collection of details for
2170// creating a VM in a target Compute Engine project.
2171type TargetVMDetails struct {
2172	// AppliedLicense: Output only. The OS license returned from the
2173	// adaptation module report.
2174	AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"`
2175
2176	// BootOption: Output only. The VM Boot Option, as set in the source vm.
2177	//
2178	// Possible values:
2179	//   "BOOT_OPTION_UNSPECIFIED" - The boot option is unknown.
2180	//   "EFI" - The boot option is EFI.
2181	//   "BIOS" - The boot option is BIOS.
2182	BootOption string `json:"bootOption,omitempty"`
2183
2184	// ComputeScheduling: Compute instance scheduling information (if empty
2185	// default is used).
2186	ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"`
2187
2188	// DiskType: The disk type to use in the VM.
2189	//
2190	// Possible values:
2191	//   "DISK_TYPE_UNSPECIFIED" - An unspecified disk type. Will be used as
2192	// STANDARD.
2193	//   "STANDARD" - A Standard disk type.
2194	//   "BALANCED" - An alternative to SSD persistent disks that balance
2195	// performance and cost.
2196	//   "SSD" - SSD hard disk type.
2197	DiskType string `json:"diskType,omitempty"`
2198
2199	// ExternalIp: The external IP to define in the VM.
2200	ExternalIp string `json:"externalIp,omitempty"`
2201
2202	// InternalIp: The internal IP to define in the VM. The formats accepted
2203	// are: `ephemeral` \ ipv4 address \ a named address resource full path.
2204	InternalIp string `json:"internalIp,omitempty"`
2205
2206	// Labels: A map of labels to associate with the VM.
2207	Labels map[string]string `json:"labels,omitempty"`
2208
2209	// LicenseType: The license type to use in OS adaptation.
2210	//
2211	// Possible values:
2212	//   "DEFAULT" - The license type is the default for the OS.
2213	//   "PAYG" - The license type is Pay As You Go license type.
2214	//   "BYOL" - The license type is Bring Your Own License type.
2215	LicenseType string `json:"licenseType,omitempty"`
2216
2217	// MachineType: The machine type to create the VM with.
2218	MachineType string `json:"machineType,omitempty"`
2219
2220	// MachineTypeSeries: The machine type series to create the VM with.
2221	MachineTypeSeries string `json:"machineTypeSeries,omitempty"`
2222
2223	// Metadata: The metadata key/value pairs to assign to the VM.
2224	Metadata map[string]string `json:"metadata,omitempty"`
2225
2226	// Name: The name of the VM to create.
2227	Name string `json:"name,omitempty"`
2228
2229	// Network: The network to connect the VM to.
2230	Network string `json:"network,omitempty"`
2231
2232	// NetworkInterfaces: List of NICs connected to this VM.
2233	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
2234
2235	// NetworkTags: A map of network tags to associate with the VM.
2236	NetworkTags []string `json:"networkTags,omitempty"`
2237
2238	// Project: The project in which to create the VM.
2239	Project string `json:"project,omitempty"`
2240
2241	// SecureBoot: Defines whether the instance has Secure Boot enabled.
2242	// This can be set to true only if the vm boot option is EFI.
2243	SecureBoot bool `json:"secureBoot,omitempty"`
2244
2245	// ServiceAccount: The service account to associate the VM with.
2246	ServiceAccount string `json:"serviceAccount,omitempty"`
2247
2248	// Subnetwork: The subnetwork to connect the VM to.
2249	Subnetwork string `json:"subnetwork,omitempty"`
2250
2251	// TargetProject: The full path of the resource of type TargetProject
2252	// which represents the Compute Engine project in which to create this
2253	// VM.
2254	TargetProject string `json:"targetProject,omitempty"`
2255
2256	// Zone: The zone in which to create the VM.
2257	Zone string `json:"zone,omitempty"`
2258
2259	// ForceSendFields is a list of field names (e.g. "AppliedLicense") to
2260	// unconditionally include in API requests. By default, fields with
2261	// empty or default values are omitted from API requests. However, any
2262	// non-pointer, non-interface field appearing in ForceSendFields will be
2263	// sent to the server regardless of whether the field is empty or not.
2264	// This may be used to include empty fields in Patch requests.
2265	ForceSendFields []string `json:"-"`
2266
2267	// NullFields is a list of field names (e.g. "AppliedLicense") to
2268	// include in API requests with the JSON null value. By default, fields
2269	// with empty values are omitted from API requests. However, any field
2270	// with an empty value appearing in NullFields will be sent to the
2271	// server as null. It is an error if a field in this list has a
2272	// non-empty value. This may be used to include null fields in Patch
2273	// requests.
2274	NullFields []string `json:"-"`
2275}
2276
2277func (s *TargetVMDetails) MarshalJSON() ([]byte, error) {
2278	type NoMethod TargetVMDetails
2279	raw := NoMethod(*s)
2280	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2281}
2282
2283// UtilizationReport: Utilization report details the utilization (CPU,
2284// memory, etc.) of selected source VMs.
2285type UtilizationReport struct {
2286	// CreateTime: Output only. The time the report was created (this refers
2287	// to the time of the request, not the time the report creation
2288	// completed).
2289	CreateTime string `json:"createTime,omitempty"`
2290
2291	// DisplayName: The report display name, as assigned by the user.
2292	DisplayName string `json:"displayName,omitempty"`
2293
2294	// Error: Output only. Provides details on the state of the report in
2295	// case of an error.
2296	Error *Status `json:"error,omitempty"`
2297
2298	// FrameEndTime: Output only. The point in time when the time frame
2299	// ends. Notice that the time frame is counted backwards. For instance
2300	// if the "frame_end_time" value is 2021/01/20 and the time frame is
2301	// WEEK then the report covers the week between 2021/01/20 and
2302	// 2021/01/14.
2303	FrameEndTime string `json:"frameEndTime,omitempty"`
2304
2305	// Name: Output only. The report unique name.
2306	Name string `json:"name,omitempty"`
2307
2308	// State: Output only. Current state of the report.
2309	//
2310	// Possible values:
2311	//   "STATE_UNSPECIFIED" - The state is unknown. This value is not in
2312	// use.
2313	//   "CREATING" - The report is in the making.
2314	//   "SUCCEEDED" - Report creation completed successfully.
2315	//   "FAILED" - Report creation failed.
2316	State string `json:"state,omitempty"`
2317
2318	// StateTime: Output only. The time the state was last set.
2319	StateTime string `json:"stateTime,omitempty"`
2320
2321	// TimeFrame: Time frame of the report.
2322	//
2323	// Possible values:
2324	//   "TIME_FRAME_UNSPECIFIED" - The time frame was not specified and
2325	// will default to WEEK.
2326	//   "WEEK" - One week.
2327	//   "MONTH" - One month.
2328	//   "YEAR" - One year.
2329	TimeFrame string `json:"timeFrame,omitempty"`
2330
2331	// VmCount: Output only. Total number of VMs included in the report.
2332	VmCount int64 `json:"vmCount,omitempty"`
2333
2334	// Vms: List of utilization information per VM. When sent as part of the
2335	// request, the "vm_id" field is used in order to specify which VMs to
2336	// include in the report. In that case all other fields are ignored.
2337	Vms []*VmUtilizationInfo `json:"vms,omitempty"`
2338
2339	// VmsCount: Output only. Total number of VMs included in the report.
2340	VmsCount int64 `json:"vmsCount,omitempty"`
2341
2342	// ServerResponse contains the HTTP response code and headers from the
2343	// server.
2344	googleapi.ServerResponse `json:"-"`
2345
2346	// ForceSendFields is a list of field names (e.g. "CreateTime") to
2347	// unconditionally include in API requests. By default, fields with
2348	// empty or default values are omitted from API requests. However, any
2349	// non-pointer, non-interface field appearing in ForceSendFields will be
2350	// sent to the server regardless of whether the field is empty or not.
2351	// This may be used to include empty fields in Patch requests.
2352	ForceSendFields []string `json:"-"`
2353
2354	// NullFields is a list of field names (e.g. "CreateTime") to include in
2355	// API requests with the JSON null value. By default, fields with empty
2356	// values are omitted from API requests. However, any field with an
2357	// empty value appearing in NullFields will be sent to the server as
2358	// null. It is an error if a field in this list has a non-empty value.
2359	// This may be used to include null fields in Patch requests.
2360	NullFields []string `json:"-"`
2361}
2362
2363func (s *UtilizationReport) MarshalJSON() ([]byte, error) {
2364	type NoMethod UtilizationReport
2365	raw := NoMethod(*s)
2366	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2367}
2368
2369// VmUtilizationInfo: Utilization information of a single VM.
2370type VmUtilizationInfo struct {
2371	// Utilization: Utilization metrics for this VM.
2372	Utilization *VmUtilizationMetrics `json:"utilization,omitempty"`
2373
2374	// VmId: The VM's ID in the source.
2375	VmId string `json:"vmId,omitempty"`
2376
2377	// VmwareVmDetails: The description of the VM in a Source of type
2378	// Vmware.
2379	VmwareVmDetails *VmwareVmDetails `json:"vmwareVmDetails,omitempty"`
2380
2381	// ForceSendFields is a list of field names (e.g. "Utilization") to
2382	// unconditionally include in API requests. By default, fields with
2383	// empty or default values are omitted from API requests. However, any
2384	// non-pointer, non-interface field appearing in ForceSendFields will be
2385	// sent to the server regardless of whether the field is empty or not.
2386	// This may be used to include empty fields in Patch requests.
2387	ForceSendFields []string `json:"-"`
2388
2389	// NullFields is a list of field names (e.g. "Utilization") to include
2390	// in API requests with the JSON null value. By default, fields with
2391	// empty values are omitted from API requests. However, any field with
2392	// an empty value appearing in NullFields will be sent to the server as
2393	// null. It is an error if a field in this list has a non-empty value.
2394	// This may be used to include null fields in Patch requests.
2395	NullFields []string `json:"-"`
2396}
2397
2398func (s *VmUtilizationInfo) MarshalJSON() ([]byte, error) {
2399	type NoMethod VmUtilizationInfo
2400	raw := NoMethod(*s)
2401	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2402}
2403
2404// VmUtilizationMetrics: Utilization metrics values for a single VM.
2405type VmUtilizationMetrics struct {
2406	// CpuAverage: Average CPU usage, percent.
2407	CpuAverage int64 `json:"cpuAverage,omitempty"`
2408
2409	// CpuAveragePercent: Average CPU usage, percent.
2410	CpuAveragePercent int64 `json:"cpuAveragePercent,omitempty"`
2411
2412	// CpuMax: Max CPU usage, percent.
2413	CpuMax int64 `json:"cpuMax,omitempty"`
2414
2415	// CpuMaxPercent: Max CPU usage, percent.
2416	CpuMaxPercent int64 `json:"cpuMaxPercent,omitempty"`
2417
2418	// DiskIoRateAverage: Average disk IO rate, in kilobytes per second.
2419	DiskIoRateAverage int64 `json:"diskIoRateAverage,omitempty,string"`
2420
2421	// DiskIoRateAverageKbps: Average disk IO rate, in kilobytes per second.
2422	DiskIoRateAverageKbps int64 `json:"diskIoRateAverageKbps,omitempty,string"`
2423
2424	// DiskIoRateMax: Max disk IO rate, in kilobytes per second.
2425	DiskIoRateMax int64 `json:"diskIoRateMax,omitempty,string"`
2426
2427	// DiskIoRateMaxKbps: Max disk IO rate, in kilobytes per second.
2428	DiskIoRateMaxKbps int64 `json:"diskIoRateMaxKbps,omitempty,string"`
2429
2430	// MemoryAverage: Average memory usage, percent.
2431	MemoryAverage int64 `json:"memoryAverage,omitempty"`
2432
2433	// MemoryAveragePercent: Average memory usage, percent.
2434	MemoryAveragePercent int64 `json:"memoryAveragePercent,omitempty"`
2435
2436	// MemoryMax: Max memory usage, percent.
2437	MemoryMax int64 `json:"memoryMax,omitempty"`
2438
2439	// MemoryMaxPercent: Max memory usage, percent.
2440	MemoryMaxPercent int64 `json:"memoryMaxPercent,omitempty"`
2441
2442	// NetworkThroughputAverage: Average network throughput (combined
2443	// transmit-rates and receive-rates), in kilobytes per second.
2444	NetworkThroughputAverage int64 `json:"networkThroughputAverage,omitempty,string"`
2445
2446	// NetworkThroughputAverageKbps: Average network throughput (combined
2447	// transmit-rates and receive-rates), in kilobytes per second.
2448	NetworkThroughputAverageKbps int64 `json:"networkThroughputAverageKbps,omitempty,string"`
2449
2450	// NetworkThroughputMax: Max network throughput (combined transmit-rates
2451	// and receive-rates), in kilobytes per second.
2452	NetworkThroughputMax int64 `json:"networkThroughputMax,omitempty,string"`
2453
2454	// NetworkThroughputMaxKbps: Max network throughput (combined
2455	// transmit-rates and receive-rates), in kilobytes per second.
2456	NetworkThroughputMaxKbps int64 `json:"networkThroughputMaxKbps,omitempty,string"`
2457
2458	// ForceSendFields is a list of field names (e.g. "CpuAverage") to
2459	// unconditionally include in API requests. By default, fields with
2460	// empty or default values are omitted from API requests. However, any
2461	// non-pointer, non-interface field appearing in ForceSendFields will be
2462	// sent to the server regardless of whether the field is empty or not.
2463	// This may be used to include empty fields in Patch requests.
2464	ForceSendFields []string `json:"-"`
2465
2466	// NullFields is a list of field names (e.g. "CpuAverage") to include in
2467	// API requests with the JSON null value. By default, fields with empty
2468	// values are omitted from API requests. However, any field with an
2469	// empty value appearing in NullFields will be sent to the server as
2470	// null. It is an error if a field in this list has a non-empty value.
2471	// This may be used to include null fields in Patch requests.
2472	NullFields []string `json:"-"`
2473}
2474
2475func (s *VmUtilizationMetrics) MarshalJSON() ([]byte, error) {
2476	type NoMethod VmUtilizationMetrics
2477	raw := NoMethod(*s)
2478	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2479}
2480
2481// VmwareSourceDetails: VmwareSourceDetails message describes a specific
2482// source details for the vmware source type.
2483type VmwareSourceDetails struct {
2484	// Password: Input only. The credentials password. This is write only
2485	// and can not be read in a GET operation.
2486	Password string `json:"password,omitempty"`
2487
2488	// Thumbprint: The thumbprint representing the certificate for the
2489	// vcenter.
2490	Thumbprint string `json:"thumbprint,omitempty"`
2491
2492	// Username: The credentials username.
2493	Username string `json:"username,omitempty"`
2494
2495	// VcenterIp: The ip address of the vcenter this Source represents.
2496	VcenterIp string `json:"vcenterIp,omitempty"`
2497
2498	// ForceSendFields is a list of field names (e.g. "Password") to
2499	// unconditionally include in API requests. By default, fields with
2500	// empty or default values are omitted from API requests. However, any
2501	// non-pointer, non-interface field appearing in ForceSendFields will be
2502	// sent to the server regardless of whether the field is empty or not.
2503	// This may be used to include empty fields in Patch requests.
2504	ForceSendFields []string `json:"-"`
2505
2506	// NullFields is a list of field names (e.g. "Password") to include in
2507	// API requests with the JSON null value. By default, fields with empty
2508	// values are omitted from API requests. However, any field with an
2509	// empty value appearing in NullFields will be sent to the server as
2510	// null. It is an error if a field in this list has a non-empty value.
2511	// This may be used to include null fields in Patch requests.
2512	NullFields []string `json:"-"`
2513}
2514
2515func (s *VmwareSourceDetails) MarshalJSON() ([]byte, error) {
2516	type NoMethod VmwareSourceDetails
2517	raw := NoMethod(*s)
2518	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2519}
2520
2521// VmwareVmDetails: VmwareVmDetails describes a VM in vCenter.
2522type VmwareVmDetails struct {
2523	// BootOption: Output only. The VM Boot Option.
2524	//
2525	// Possible values:
2526	//   "BOOT_OPTION_UNSPECIFIED" - The boot option is unknown.
2527	//   "EFI" - The boot option is EFI.
2528	//   "BIOS" - The boot option is BIOS.
2529	BootOption string `json:"bootOption,omitempty"`
2530
2531	// CommittedStorage: The total size of the storage allocated to the VM
2532	// in MB.
2533	CommittedStorage int64 `json:"committedStorage,omitempty,string"`
2534
2535	// CommittedStorageMb: The total size of the storage allocated to the VM
2536	// in MB.
2537	CommittedStorageMb int64 `json:"committedStorageMb,omitempty,string"`
2538
2539	// CpuCount: The number of cpus in the VM.
2540	CpuCount int64 `json:"cpuCount,omitempty"`
2541
2542	// DatacenterDescription: The descriptive name of the vCenter's
2543	// datacenter this VM is contained in.
2544	DatacenterDescription string `json:"datacenterDescription,omitempty"`
2545
2546	// DatacenterId: The id of the vCenter's datacenter this VM is contained
2547	// in.
2548	DatacenterId string `json:"datacenterId,omitempty"`
2549
2550	// DiskCount: The number of disks the VM has.
2551	DiskCount int64 `json:"diskCount,omitempty"`
2552
2553	// DisplayName: The display name of the VM. Note that this is not
2554	// necessarily unique.
2555	DisplayName string `json:"displayName,omitempty"`
2556
2557	// GuestDescription: The VM's OS. See for example
2558	// https://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html
2559	// for types of strings this might hold.
2560	GuestDescription string `json:"guestDescription,omitempty"`
2561
2562	// MemoryMb: The size of the memory of the VM in MB.
2563	MemoryMb int64 `json:"memoryMb,omitempty"`
2564
2565	// PowerState: The power state of the VM at the moment list was taken.
2566	//
2567	// Possible values:
2568	//   "POWER_STATE_UNSPECIFIED" - Power state is not specified.
2569	//   "ON" - The VM is turned ON.
2570	//   "OFF" - The VM is turned OFF.
2571	//   "SUSPENDED" - The VM is suspended. This is similar to hibernation
2572	// or sleep mode.
2573	PowerState string `json:"powerState,omitempty"`
2574
2575	// Uuid: The unique identifier of the VM in vCenter.
2576	Uuid string `json:"uuid,omitempty"`
2577
2578	// VmId: The VM's id in the source (note that this is not the
2579	// MigratingVm's id). This is the moref id of the VM.
2580	VmId string `json:"vmId,omitempty"`
2581
2582	// ForceSendFields is a list of field names (e.g. "BootOption") to
2583	// unconditionally include in API requests. By default, fields with
2584	// empty or default values are omitted from API requests. However, any
2585	// non-pointer, non-interface field appearing in ForceSendFields will be
2586	// sent to the server regardless of whether the field is empty or not.
2587	// This may be used to include empty fields in Patch requests.
2588	ForceSendFields []string `json:"-"`
2589
2590	// NullFields is a list of field names (e.g. "BootOption") to include in
2591	// API requests with the JSON null value. By default, fields with empty
2592	// values are omitted from API requests. However, any field with an
2593	// empty value appearing in NullFields will be sent to the server as
2594	// null. It is an error if a field in this list has a non-empty value.
2595	// This may be used to include null fields in Patch requests.
2596	NullFields []string `json:"-"`
2597}
2598
2599func (s *VmwareVmDetails) MarshalJSON() ([]byte, error) {
2600	type NoMethod VmwareVmDetails
2601	raw := NoMethod(*s)
2602	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2603}
2604
2605// VmwareVmsDetails: VmwareVmsDetails describes VMs in vCenter.
2606type VmwareVmsDetails struct {
2607	// Details: The details of the vmware VMs.
2608	Details []*VmwareVmDetails `json:"details,omitempty"`
2609
2610	// ForceSendFields is a list of field names (e.g. "Details") to
2611	// unconditionally include in API requests. By default, fields with
2612	// empty or default values are omitted from API requests. However, any
2613	// non-pointer, non-interface field appearing in ForceSendFields will be
2614	// sent to the server regardless of whether the field is empty or not.
2615	// This may be used to include empty fields in Patch requests.
2616	ForceSendFields []string `json:"-"`
2617
2618	// NullFields is a list of field names (e.g. "Details") to include in
2619	// API requests with the JSON null value. By default, fields with empty
2620	// values are omitted from API requests. However, any field with an
2621	// empty value appearing in NullFields will be sent to the server as
2622	// null. It is an error if a field in this list has a non-empty value.
2623	// This may be used to include null fields in Patch requests.
2624	NullFields []string `json:"-"`
2625}
2626
2627func (s *VmwareVmsDetails) MarshalJSON() ([]byte, error) {
2628	type NoMethod VmwareVmsDetails
2629	raw := NoMethod(*s)
2630	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2631}
2632
2633// method id "vmmigration.projects.locations.get":
2634
2635type ProjectsLocationsGetCall struct {
2636	s            *Service
2637	name         string
2638	urlParams_   gensupport.URLParams
2639	ifNoneMatch_ string
2640	ctx_         context.Context
2641	header_      http.Header
2642}
2643
2644// Get: Gets information about a location.
2645//
2646// - name: Resource name for the location.
2647func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
2648	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2649	c.name = name
2650	return c
2651}
2652
2653// Fields allows partial responses to be retrieved. See
2654// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2655// for more information.
2656func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
2657	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2658	return c
2659}
2660
2661// IfNoneMatch sets the optional parameter which makes the operation
2662// fail if the object's ETag matches the given value. This is useful for
2663// getting updates only after the object has changed since the last
2664// request. Use googleapi.IsNotModified to check whether the response
2665// error from Do is the result of In-None-Match.
2666func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
2667	c.ifNoneMatch_ = entityTag
2668	return c
2669}
2670
2671// Context sets the context to be used in this call's Do method. Any
2672// pending HTTP request will be aborted if the provided context is
2673// canceled.
2674func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
2675	c.ctx_ = ctx
2676	return c
2677}
2678
2679// Header returns an http.Header that can be modified by the caller to
2680// add HTTP headers to the request.
2681func (c *ProjectsLocationsGetCall) Header() http.Header {
2682	if c.header_ == nil {
2683		c.header_ = make(http.Header)
2684	}
2685	return c.header_
2686}
2687
2688func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
2689	reqHeaders := make(http.Header)
2690	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2691	for k, v := range c.header_ {
2692		reqHeaders[k] = v
2693	}
2694	reqHeaders.Set("User-Agent", c.s.userAgent())
2695	if c.ifNoneMatch_ != "" {
2696		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2697	}
2698	var body io.Reader = nil
2699	c.urlParams_.Set("alt", alt)
2700	c.urlParams_.Set("prettyPrint", "false")
2701	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
2702	urls += "?" + c.urlParams_.Encode()
2703	req, err := http.NewRequest("GET", urls, body)
2704	if err != nil {
2705		return nil, err
2706	}
2707	req.Header = reqHeaders
2708	googleapi.Expand(req.URL, map[string]string{
2709		"name": c.name,
2710	})
2711	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2712}
2713
2714// Do executes the "vmmigration.projects.locations.get" call.
2715// Exactly one of *Location or error will be non-nil. Any non-2xx status
2716// code is an error. Response headers are in either
2717// *Location.ServerResponse.Header or (if a response was returned at
2718// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2719// to check whether the returned error was because
2720// http.StatusNotModified was returned.
2721func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
2722	gensupport.SetOptions(c.urlParams_, opts...)
2723	res, err := c.doRequest("json")
2724	if res != nil && res.StatusCode == http.StatusNotModified {
2725		if res.Body != nil {
2726			res.Body.Close()
2727		}
2728		return nil, &googleapi.Error{
2729			Code:   res.StatusCode,
2730			Header: res.Header,
2731		}
2732	}
2733	if err != nil {
2734		return nil, err
2735	}
2736	defer googleapi.CloseBody(res)
2737	if err := googleapi.CheckResponse(res); err != nil {
2738		return nil, err
2739	}
2740	ret := &Location{
2741		ServerResponse: googleapi.ServerResponse{
2742			Header:         res.Header,
2743			HTTPStatusCode: res.StatusCode,
2744		},
2745	}
2746	target := &ret
2747	if err := gensupport.DecodeResponse(target, res); err != nil {
2748		return nil, err
2749	}
2750	return ret, nil
2751	// {
2752	//   "description": "Gets information about a location.",
2753	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}",
2754	//   "httpMethod": "GET",
2755	//   "id": "vmmigration.projects.locations.get",
2756	//   "parameterOrder": [
2757	//     "name"
2758	//   ],
2759	//   "parameters": {
2760	//     "name": {
2761	//       "description": "Resource name for the location.",
2762	//       "location": "path",
2763	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2764	//       "required": true,
2765	//       "type": "string"
2766	//     }
2767	//   },
2768	//   "path": "v1alpha1/{+name}",
2769	//   "response": {
2770	//     "$ref": "Location"
2771	//   },
2772	//   "scopes": [
2773	//     "https://www.googleapis.com/auth/cloud-platform"
2774	//   ]
2775	// }
2776
2777}
2778
2779// method id "vmmigration.projects.locations.list":
2780
2781type ProjectsLocationsListCall struct {
2782	s            *Service
2783	name         string
2784	urlParams_   gensupport.URLParams
2785	ifNoneMatch_ string
2786	ctx_         context.Context
2787	header_      http.Header
2788}
2789
2790// List: Lists information about the supported locations for this
2791// service.
2792//
2793// - name: The resource that owns the locations collection, if
2794//   applicable.
2795func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
2796	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2797	c.name = name
2798	return c
2799}
2800
2801// Filter sets the optional parameter "filter": A filter to narrow down
2802// results to a preferred subset. The filtering language accepts strings
2803// like "displayName=tokyo", and is documented in more detail in AIP-160
2804// (https://google.aip.dev/160).
2805func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
2806	c.urlParams_.Set("filter", filter)
2807	return c
2808}
2809
2810// PageSize sets the optional parameter "pageSize": The maximum number
2811// of results to return. If not set, the service selects a default.
2812func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
2813	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2814	return c
2815}
2816
2817// PageToken sets the optional parameter "pageToken": A page token
2818// received from the `next_page_token` field in the response. Send that
2819// page token to receive the subsequent page.
2820func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
2821	c.urlParams_.Set("pageToken", pageToken)
2822	return c
2823}
2824
2825// Fields allows partial responses to be retrieved. See
2826// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2827// for more information.
2828func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
2829	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2830	return c
2831}
2832
2833// IfNoneMatch sets the optional parameter which makes the operation
2834// fail if the object's ETag matches the given value. This is useful for
2835// getting updates only after the object has changed since the last
2836// request. Use googleapi.IsNotModified to check whether the response
2837// error from Do is the result of In-None-Match.
2838func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
2839	c.ifNoneMatch_ = entityTag
2840	return c
2841}
2842
2843// Context sets the context to be used in this call's Do method. Any
2844// pending HTTP request will be aborted if the provided context is
2845// canceled.
2846func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
2847	c.ctx_ = ctx
2848	return c
2849}
2850
2851// Header returns an http.Header that can be modified by the caller to
2852// add HTTP headers to the request.
2853func (c *ProjectsLocationsListCall) Header() http.Header {
2854	if c.header_ == nil {
2855		c.header_ = make(http.Header)
2856	}
2857	return c.header_
2858}
2859
2860func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
2861	reqHeaders := make(http.Header)
2862	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
2863	for k, v := range c.header_ {
2864		reqHeaders[k] = v
2865	}
2866	reqHeaders.Set("User-Agent", c.s.userAgent())
2867	if c.ifNoneMatch_ != "" {
2868		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2869	}
2870	var body io.Reader = nil
2871	c.urlParams_.Set("alt", alt)
2872	c.urlParams_.Set("prettyPrint", "false")
2873	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/locations")
2874	urls += "?" + c.urlParams_.Encode()
2875	req, err := http.NewRequest("GET", urls, body)
2876	if err != nil {
2877		return nil, err
2878	}
2879	req.Header = reqHeaders
2880	googleapi.Expand(req.URL, map[string]string{
2881		"name": c.name,
2882	})
2883	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2884}
2885
2886// Do executes the "vmmigration.projects.locations.list" call.
2887// Exactly one of *ListLocationsResponse or error will be non-nil. Any
2888// non-2xx status code is an error. Response headers are in either
2889// *ListLocationsResponse.ServerResponse.Header or (if a response was
2890// returned at all) in error.(*googleapi.Error).Header. Use
2891// googleapi.IsNotModified to check whether the returned error was
2892// because http.StatusNotModified was returned.
2893func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
2894	gensupport.SetOptions(c.urlParams_, opts...)
2895	res, err := c.doRequest("json")
2896	if res != nil && res.StatusCode == http.StatusNotModified {
2897		if res.Body != nil {
2898			res.Body.Close()
2899		}
2900		return nil, &googleapi.Error{
2901			Code:   res.StatusCode,
2902			Header: res.Header,
2903		}
2904	}
2905	if err != nil {
2906		return nil, err
2907	}
2908	defer googleapi.CloseBody(res)
2909	if err := googleapi.CheckResponse(res); err != nil {
2910		return nil, err
2911	}
2912	ret := &ListLocationsResponse{
2913		ServerResponse: googleapi.ServerResponse{
2914			Header:         res.Header,
2915			HTTPStatusCode: res.StatusCode,
2916		},
2917	}
2918	target := &ret
2919	if err := gensupport.DecodeResponse(target, res); err != nil {
2920		return nil, err
2921	}
2922	return ret, nil
2923	// {
2924	//   "description": "Lists information about the supported locations for this service.",
2925	//   "flatPath": "v1alpha1/projects/{projectsId}/locations",
2926	//   "httpMethod": "GET",
2927	//   "id": "vmmigration.projects.locations.list",
2928	//   "parameterOrder": [
2929	//     "name"
2930	//   ],
2931	//   "parameters": {
2932	//     "filter": {
2933	//       "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).",
2934	//       "location": "query",
2935	//       "type": "string"
2936	//     },
2937	//     "name": {
2938	//       "description": "The resource that owns the locations collection, if applicable.",
2939	//       "location": "path",
2940	//       "pattern": "^projects/[^/]+$",
2941	//       "required": true,
2942	//       "type": "string"
2943	//     },
2944	//     "pageSize": {
2945	//       "description": "The maximum number of results to return. If not set, the service selects a default.",
2946	//       "format": "int32",
2947	//       "location": "query",
2948	//       "type": "integer"
2949	//     },
2950	//     "pageToken": {
2951	//       "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.",
2952	//       "location": "query",
2953	//       "type": "string"
2954	//     }
2955	//   },
2956	//   "path": "v1alpha1/{+name}/locations",
2957	//   "response": {
2958	//     "$ref": "ListLocationsResponse"
2959	//   },
2960	//   "scopes": [
2961	//     "https://www.googleapis.com/auth/cloud-platform"
2962	//   ]
2963	// }
2964
2965}
2966
2967// Pages invokes f for each page of results.
2968// A non-nil error returned from f will halt the iteration.
2969// The provided context supersedes any context provided to the Context method.
2970func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2971	c.ctx_ = ctx
2972	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2973	for {
2974		x, err := c.Do()
2975		if err != nil {
2976			return err
2977		}
2978		if err := f(x); err != nil {
2979			return err
2980		}
2981		if x.NextPageToken == "" {
2982			return nil
2983		}
2984		c.PageToken(x.NextPageToken)
2985	}
2986}
2987
2988// method id "vmmigration.projects.locations.groups.addGroupMigration":
2989
2990type ProjectsLocationsGroupsAddGroupMigrationCall struct {
2991	s                        *Service
2992	group                    string
2993	addgroupmigrationrequest *AddGroupMigrationRequest
2994	urlParams_               gensupport.URLParams
2995	ctx_                     context.Context
2996	header_                  http.Header
2997}
2998
2999// AddGroupMigration: Adds a MigratingVm to a Group.
3000//
3001// - group: The full path name of the Group to add to.
3002func (r *ProjectsLocationsGroupsService) AddGroupMigration(group string, addgroupmigrationrequest *AddGroupMigrationRequest) *ProjectsLocationsGroupsAddGroupMigrationCall {
3003	c := &ProjectsLocationsGroupsAddGroupMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3004	c.group = group
3005	c.addgroupmigrationrequest = addgroupmigrationrequest
3006	return c
3007}
3008
3009// Fields allows partial responses to be retrieved. See
3010// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3011// for more information.
3012func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsAddGroupMigrationCall {
3013	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3014	return c
3015}
3016
3017// Context sets the context to be used in this call's Do method. Any
3018// pending HTTP request will be aborted if the provided context is
3019// canceled.
3020func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Context(ctx context.Context) *ProjectsLocationsGroupsAddGroupMigrationCall {
3021	c.ctx_ = ctx
3022	return c
3023}
3024
3025// Header returns an http.Header that can be modified by the caller to
3026// add HTTP headers to the request.
3027func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Header() http.Header {
3028	if c.header_ == nil {
3029		c.header_ = make(http.Header)
3030	}
3031	return c.header_
3032}
3033
3034func (c *ProjectsLocationsGroupsAddGroupMigrationCall) doRequest(alt string) (*http.Response, error) {
3035	reqHeaders := make(http.Header)
3036	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3037	for k, v := range c.header_ {
3038		reqHeaders[k] = v
3039	}
3040	reqHeaders.Set("User-Agent", c.s.userAgent())
3041	var body io.Reader = nil
3042	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addgroupmigrationrequest)
3043	if err != nil {
3044		return nil, err
3045	}
3046	reqHeaders.Set("Content-Type", "application/json")
3047	c.urlParams_.Set("alt", alt)
3048	c.urlParams_.Set("prettyPrint", "false")
3049	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+group}:addGroupMigration")
3050	urls += "?" + c.urlParams_.Encode()
3051	req, err := http.NewRequest("POST", urls, body)
3052	if err != nil {
3053		return nil, err
3054	}
3055	req.Header = reqHeaders
3056	googleapi.Expand(req.URL, map[string]string{
3057		"group": c.group,
3058	})
3059	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3060}
3061
3062// Do executes the "vmmigration.projects.locations.groups.addGroupMigration" call.
3063// Exactly one of *Operation or error will be non-nil. Any non-2xx
3064// status code is an error. Response headers are in either
3065// *Operation.ServerResponse.Header or (if a response was returned at
3066// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3067// to check whether the returned error was because
3068// http.StatusNotModified was returned.
3069func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3070	gensupport.SetOptions(c.urlParams_, opts...)
3071	res, err := c.doRequest("json")
3072	if res != nil && res.StatusCode == http.StatusNotModified {
3073		if res.Body != nil {
3074			res.Body.Close()
3075		}
3076		return nil, &googleapi.Error{
3077			Code:   res.StatusCode,
3078			Header: res.Header,
3079		}
3080	}
3081	if err != nil {
3082		return nil, err
3083	}
3084	defer googleapi.CloseBody(res)
3085	if err := googleapi.CheckResponse(res); err != nil {
3086		return nil, err
3087	}
3088	ret := &Operation{
3089		ServerResponse: googleapi.ServerResponse{
3090			Header:         res.Header,
3091			HTTPStatusCode: res.StatusCode,
3092		},
3093	}
3094	target := &ret
3095	if err := gensupport.DecodeResponse(target, res); err != nil {
3096		return nil, err
3097	}
3098	return ret, nil
3099	// {
3100	//   "description": "Adds a MigratingVm to a Group.",
3101	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}:addGroupMigration",
3102	//   "httpMethod": "POST",
3103	//   "id": "vmmigration.projects.locations.groups.addGroupMigration",
3104	//   "parameterOrder": [
3105	//     "group"
3106	//   ],
3107	//   "parameters": {
3108	//     "group": {
3109	//       "description": "Required. The full path name of the Group to add to.",
3110	//       "location": "path",
3111	//       "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$",
3112	//       "required": true,
3113	//       "type": "string"
3114	//     }
3115	//   },
3116	//   "path": "v1alpha1/{+group}:addGroupMigration",
3117	//   "request": {
3118	//     "$ref": "AddGroupMigrationRequest"
3119	//   },
3120	//   "response": {
3121	//     "$ref": "Operation"
3122	//   },
3123	//   "scopes": [
3124	//     "https://www.googleapis.com/auth/cloud-platform"
3125	//   ]
3126	// }
3127
3128}
3129
3130// method id "vmmigration.projects.locations.groups.create":
3131
3132type ProjectsLocationsGroupsCreateCall struct {
3133	s          *Service
3134	parent     string
3135	group      *Group
3136	urlParams_ gensupport.URLParams
3137	ctx_       context.Context
3138	header_    http.Header
3139}
3140
3141// Create: Creates a new Group in a given project and location.
3142//
3143// - parent: The Group's parent.
3144func (r *ProjectsLocationsGroupsService) Create(parent string, group *Group) *ProjectsLocationsGroupsCreateCall {
3145	c := &ProjectsLocationsGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3146	c.parent = parent
3147	c.group = group
3148	return c
3149}
3150
3151// GroupId sets the optional parameter "groupId": Required. The group
3152// identifier.
3153func (c *ProjectsLocationsGroupsCreateCall) GroupId(groupId string) *ProjectsLocationsGroupsCreateCall {
3154	c.urlParams_.Set("groupId", groupId)
3155	return c
3156}
3157
3158// RequestId sets the optional parameter "requestId": A request ID to
3159// identify requests. Specify a unique request ID so that if you must
3160// retry your request, the server will know to ignore the request if it
3161// has already been completed. The server will guarantee that for at
3162// least 60 minutes since the first request. For example, consider a
3163// situation where you make an initial request and t he request times
3164// out. If you make the request again with the same request ID, the
3165// server can check if original operation with the same request ID was
3166// received, and if so, will ignore the second request. This prevents
3167// clients from accidentally creating duplicate commitments. The request
3168// ID must be a valid UUID with the exception that zero UUID is not
3169// supported (00000000-0000-0000-0000-000000000000).
3170func (c *ProjectsLocationsGroupsCreateCall) RequestId(requestId string) *ProjectsLocationsGroupsCreateCall {
3171	c.urlParams_.Set("requestId", requestId)
3172	return c
3173}
3174
3175// Fields allows partial responses to be retrieved. See
3176// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3177// for more information.
3178func (c *ProjectsLocationsGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsCreateCall {
3179	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3180	return c
3181}
3182
3183// Context sets the context to be used in this call's Do method. Any
3184// pending HTTP request will be aborted if the provided context is
3185// canceled.
3186func (c *ProjectsLocationsGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsGroupsCreateCall {
3187	c.ctx_ = ctx
3188	return c
3189}
3190
3191// Header returns an http.Header that can be modified by the caller to
3192// add HTTP headers to the request.
3193func (c *ProjectsLocationsGroupsCreateCall) Header() http.Header {
3194	if c.header_ == nil {
3195		c.header_ = make(http.Header)
3196	}
3197	return c.header_
3198}
3199
3200func (c *ProjectsLocationsGroupsCreateCall) doRequest(alt string) (*http.Response, error) {
3201	reqHeaders := make(http.Header)
3202	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3203	for k, v := range c.header_ {
3204		reqHeaders[k] = v
3205	}
3206	reqHeaders.Set("User-Agent", c.s.userAgent())
3207	var body io.Reader = nil
3208	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
3209	if err != nil {
3210		return nil, err
3211	}
3212	reqHeaders.Set("Content-Type", "application/json")
3213	c.urlParams_.Set("alt", alt)
3214	c.urlParams_.Set("prettyPrint", "false")
3215	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/groups")
3216	urls += "?" + c.urlParams_.Encode()
3217	req, err := http.NewRequest("POST", urls, body)
3218	if err != nil {
3219		return nil, err
3220	}
3221	req.Header = reqHeaders
3222	googleapi.Expand(req.URL, map[string]string{
3223		"parent": c.parent,
3224	})
3225	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3226}
3227
3228// Do executes the "vmmigration.projects.locations.groups.create" call.
3229// Exactly one of *Operation or error will be non-nil. Any non-2xx
3230// status code is an error. Response headers are in either
3231// *Operation.ServerResponse.Header or (if a response was returned at
3232// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3233// to check whether the returned error was because
3234// http.StatusNotModified was returned.
3235func (c *ProjectsLocationsGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3236	gensupport.SetOptions(c.urlParams_, opts...)
3237	res, err := c.doRequest("json")
3238	if res != nil && res.StatusCode == http.StatusNotModified {
3239		if res.Body != nil {
3240			res.Body.Close()
3241		}
3242		return nil, &googleapi.Error{
3243			Code:   res.StatusCode,
3244			Header: res.Header,
3245		}
3246	}
3247	if err != nil {
3248		return nil, err
3249	}
3250	defer googleapi.CloseBody(res)
3251	if err := googleapi.CheckResponse(res); err != nil {
3252		return nil, err
3253	}
3254	ret := &Operation{
3255		ServerResponse: googleapi.ServerResponse{
3256			Header:         res.Header,
3257			HTTPStatusCode: res.StatusCode,
3258		},
3259	}
3260	target := &ret
3261	if err := gensupport.DecodeResponse(target, res); err != nil {
3262		return nil, err
3263	}
3264	return ret, nil
3265	// {
3266	//   "description": "Creates a new Group in a given project and location.",
3267	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups",
3268	//   "httpMethod": "POST",
3269	//   "id": "vmmigration.projects.locations.groups.create",
3270	//   "parameterOrder": [
3271	//     "parent"
3272	//   ],
3273	//   "parameters": {
3274	//     "groupId": {
3275	//       "description": "Required. The group identifier.",
3276	//       "location": "query",
3277	//       "type": "string"
3278	//     },
3279	//     "parent": {
3280	//       "description": "Required. The Group's parent.",
3281	//       "location": "path",
3282	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
3283	//       "required": true,
3284	//       "type": "string"
3285	//     },
3286	//     "requestId": {
3287	//       "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).",
3288	//       "location": "query",
3289	//       "type": "string"
3290	//     }
3291	//   },
3292	//   "path": "v1alpha1/{+parent}/groups",
3293	//   "request": {
3294	//     "$ref": "Group"
3295	//   },
3296	//   "response": {
3297	//     "$ref": "Operation"
3298	//   },
3299	//   "scopes": [
3300	//     "https://www.googleapis.com/auth/cloud-platform"
3301	//   ]
3302	// }
3303
3304}
3305
3306// method id "vmmigration.projects.locations.groups.delete":
3307
3308type ProjectsLocationsGroupsDeleteCall struct {
3309	s          *Service
3310	name       string
3311	urlParams_ gensupport.URLParams
3312	ctx_       context.Context
3313	header_    http.Header
3314}
3315
3316// Delete: Deletes a single Group.
3317//
3318// - name: The Group name.
3319func (r *ProjectsLocationsGroupsService) Delete(name string) *ProjectsLocationsGroupsDeleteCall {
3320	c := &ProjectsLocationsGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3321	c.name = name
3322	return c
3323}
3324
3325// RequestId sets the optional parameter "requestId": A request ID to
3326// identify requests. Specify a unique request ID so that if you must
3327// retry your request, the server will know to ignore the request if it
3328// has already been completed. The server will guarantee that for at
3329// least 60 minutes after the first request. For example, consider a
3330// situation where you make an initial request and t he request times
3331// out. If you make the request again with the same request ID, the
3332// server can check if original operation with the same request ID was
3333// received, and if so, will ignore the second request. This prevents
3334// clients from accidentally creating duplicate commitments. The request
3335// ID must be a valid UUID with the exception that zero UUID is not
3336// supported (00000000-0000-0000-0000-000000000000).
3337func (c *ProjectsLocationsGroupsDeleteCall) RequestId(requestId string) *ProjectsLocationsGroupsDeleteCall {
3338	c.urlParams_.Set("requestId", requestId)
3339	return c
3340}
3341
3342// Fields allows partial responses to be retrieved. See
3343// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3344// for more information.
3345func (c *ProjectsLocationsGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsDeleteCall {
3346	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3347	return c
3348}
3349
3350// Context sets the context to be used in this call's Do method. Any
3351// pending HTTP request will be aborted if the provided context is
3352// canceled.
3353func (c *ProjectsLocationsGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGroupsDeleteCall {
3354	c.ctx_ = ctx
3355	return c
3356}
3357
3358// Header returns an http.Header that can be modified by the caller to
3359// add HTTP headers to the request.
3360func (c *ProjectsLocationsGroupsDeleteCall) Header() http.Header {
3361	if c.header_ == nil {
3362		c.header_ = make(http.Header)
3363	}
3364	return c.header_
3365}
3366
3367func (c *ProjectsLocationsGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
3368	reqHeaders := make(http.Header)
3369	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3370	for k, v := range c.header_ {
3371		reqHeaders[k] = v
3372	}
3373	reqHeaders.Set("User-Agent", c.s.userAgent())
3374	var body io.Reader = nil
3375	c.urlParams_.Set("alt", alt)
3376	c.urlParams_.Set("prettyPrint", "false")
3377	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
3378	urls += "?" + c.urlParams_.Encode()
3379	req, err := http.NewRequest("DELETE", urls, body)
3380	if err != nil {
3381		return nil, err
3382	}
3383	req.Header = reqHeaders
3384	googleapi.Expand(req.URL, map[string]string{
3385		"name": c.name,
3386	})
3387	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3388}
3389
3390// Do executes the "vmmigration.projects.locations.groups.delete" call.
3391// Exactly one of *Operation or error will be non-nil. Any non-2xx
3392// status code is an error. Response headers are in either
3393// *Operation.ServerResponse.Header or (if a response was returned at
3394// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3395// to check whether the returned error was because
3396// http.StatusNotModified was returned.
3397func (c *ProjectsLocationsGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3398	gensupport.SetOptions(c.urlParams_, opts...)
3399	res, err := c.doRequest("json")
3400	if res != nil && res.StatusCode == http.StatusNotModified {
3401		if res.Body != nil {
3402			res.Body.Close()
3403		}
3404		return nil, &googleapi.Error{
3405			Code:   res.StatusCode,
3406			Header: res.Header,
3407		}
3408	}
3409	if err != nil {
3410		return nil, err
3411	}
3412	defer googleapi.CloseBody(res)
3413	if err := googleapi.CheckResponse(res); err != nil {
3414		return nil, err
3415	}
3416	ret := &Operation{
3417		ServerResponse: googleapi.ServerResponse{
3418			Header:         res.Header,
3419			HTTPStatusCode: res.StatusCode,
3420		},
3421	}
3422	target := &ret
3423	if err := gensupport.DecodeResponse(target, res); err != nil {
3424		return nil, err
3425	}
3426	return ret, nil
3427	// {
3428	//   "description": "Deletes a single Group.",
3429	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}",
3430	//   "httpMethod": "DELETE",
3431	//   "id": "vmmigration.projects.locations.groups.delete",
3432	//   "parameterOrder": [
3433	//     "name"
3434	//   ],
3435	//   "parameters": {
3436	//     "name": {
3437	//       "description": "Required. The Group name.",
3438	//       "location": "path",
3439	//       "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$",
3440	//       "required": true,
3441	//       "type": "string"
3442	//     },
3443	//     "requestId": {
3444	//       "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).",
3445	//       "location": "query",
3446	//       "type": "string"
3447	//     }
3448	//   },
3449	//   "path": "v1alpha1/{+name}",
3450	//   "response": {
3451	//     "$ref": "Operation"
3452	//   },
3453	//   "scopes": [
3454	//     "https://www.googleapis.com/auth/cloud-platform"
3455	//   ]
3456	// }
3457
3458}
3459
3460// method id "vmmigration.projects.locations.groups.get":
3461
3462type ProjectsLocationsGroupsGetCall struct {
3463	s            *Service
3464	name         string
3465	urlParams_   gensupport.URLParams
3466	ifNoneMatch_ string
3467	ctx_         context.Context
3468	header_      http.Header
3469}
3470
3471// Get: Gets details of a single Group.
3472//
3473// - name: The group name.
3474func (r *ProjectsLocationsGroupsService) Get(name string) *ProjectsLocationsGroupsGetCall {
3475	c := &ProjectsLocationsGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3476	c.name = name
3477	return c
3478}
3479
3480// Fields allows partial responses to be retrieved. See
3481// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3482// for more information.
3483func (c *ProjectsLocationsGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsGetCall {
3484	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3485	return c
3486}
3487
3488// IfNoneMatch sets the optional parameter which makes the operation
3489// fail if the object's ETag matches the given value. This is useful for
3490// getting updates only after the object has changed since the last
3491// request. Use googleapi.IsNotModified to check whether the response
3492// error from Do is the result of In-None-Match.
3493func (c *ProjectsLocationsGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGroupsGetCall {
3494	c.ifNoneMatch_ = entityTag
3495	return c
3496}
3497
3498// Context sets the context to be used in this call's Do method. Any
3499// pending HTTP request will be aborted if the provided context is
3500// canceled.
3501func (c *ProjectsLocationsGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsGroupsGetCall {
3502	c.ctx_ = ctx
3503	return c
3504}
3505
3506// Header returns an http.Header that can be modified by the caller to
3507// add HTTP headers to the request.
3508func (c *ProjectsLocationsGroupsGetCall) Header() http.Header {
3509	if c.header_ == nil {
3510		c.header_ = make(http.Header)
3511	}
3512	return c.header_
3513}
3514
3515func (c *ProjectsLocationsGroupsGetCall) doRequest(alt string) (*http.Response, error) {
3516	reqHeaders := make(http.Header)
3517	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3518	for k, v := range c.header_ {
3519		reqHeaders[k] = v
3520	}
3521	reqHeaders.Set("User-Agent", c.s.userAgent())
3522	if c.ifNoneMatch_ != "" {
3523		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3524	}
3525	var body io.Reader = nil
3526	c.urlParams_.Set("alt", alt)
3527	c.urlParams_.Set("prettyPrint", "false")
3528	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
3529	urls += "?" + c.urlParams_.Encode()
3530	req, err := http.NewRequest("GET", urls, body)
3531	if err != nil {
3532		return nil, err
3533	}
3534	req.Header = reqHeaders
3535	googleapi.Expand(req.URL, map[string]string{
3536		"name": c.name,
3537	})
3538	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3539}
3540
3541// Do executes the "vmmigration.projects.locations.groups.get" call.
3542// Exactly one of *Group or error will be non-nil. Any non-2xx status
3543// code is an error. Response headers are in either
3544// *Group.ServerResponse.Header or (if a response was returned at all)
3545// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3546// check whether the returned error was because http.StatusNotModified
3547// was returned.
3548func (c *ProjectsLocationsGroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) {
3549	gensupport.SetOptions(c.urlParams_, opts...)
3550	res, err := c.doRequest("json")
3551	if res != nil && res.StatusCode == http.StatusNotModified {
3552		if res.Body != nil {
3553			res.Body.Close()
3554		}
3555		return nil, &googleapi.Error{
3556			Code:   res.StatusCode,
3557			Header: res.Header,
3558		}
3559	}
3560	if err != nil {
3561		return nil, err
3562	}
3563	defer googleapi.CloseBody(res)
3564	if err := googleapi.CheckResponse(res); err != nil {
3565		return nil, err
3566	}
3567	ret := &Group{
3568		ServerResponse: googleapi.ServerResponse{
3569			Header:         res.Header,
3570			HTTPStatusCode: res.StatusCode,
3571		},
3572	}
3573	target := &ret
3574	if err := gensupport.DecodeResponse(target, res); err != nil {
3575		return nil, err
3576	}
3577	return ret, nil
3578	// {
3579	//   "description": "Gets details of a single Group.",
3580	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}",
3581	//   "httpMethod": "GET",
3582	//   "id": "vmmigration.projects.locations.groups.get",
3583	//   "parameterOrder": [
3584	//     "name"
3585	//   ],
3586	//   "parameters": {
3587	//     "name": {
3588	//       "description": "Required. The group name.",
3589	//       "location": "path",
3590	//       "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$",
3591	//       "required": true,
3592	//       "type": "string"
3593	//     }
3594	//   },
3595	//   "path": "v1alpha1/{+name}",
3596	//   "response": {
3597	//     "$ref": "Group"
3598	//   },
3599	//   "scopes": [
3600	//     "https://www.googleapis.com/auth/cloud-platform"
3601	//   ]
3602	// }
3603
3604}
3605
3606// method id "vmmigration.projects.locations.groups.list":
3607
3608type ProjectsLocationsGroupsListCall struct {
3609	s            *Service
3610	parent       string
3611	urlParams_   gensupport.URLParams
3612	ifNoneMatch_ string
3613	ctx_         context.Context
3614	header_      http.Header
3615}
3616
3617// List: Lists Groups in a given project and location.
3618//
3619// - parent: The parent, which owns this collection of groups.
3620func (r *ProjectsLocationsGroupsService) List(parent string) *ProjectsLocationsGroupsListCall {
3621	c := &ProjectsLocationsGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3622	c.parent = parent
3623	return c
3624}
3625
3626// Filter sets the optional parameter "filter": The filter request.
3627func (c *ProjectsLocationsGroupsListCall) Filter(filter string) *ProjectsLocationsGroupsListCall {
3628	c.urlParams_.Set("filter", filter)
3629	return c
3630}
3631
3632// OrderBy sets the optional parameter "orderBy": the order by fields
3633// for the result.
3634func (c *ProjectsLocationsGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsGroupsListCall {
3635	c.urlParams_.Set("orderBy", orderBy)
3636	return c
3637}
3638
3639// PageSize sets the optional parameter "pageSize": The maximum number
3640// of groups to return. The service may return fewer than this value. If
3641// unspecified, at most 500 groups will be returned. The maximum value
3642// is 1000; values above 1000 will be coerced to 1000.
3643func (c *ProjectsLocationsGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsGroupsListCall {
3644	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3645	return c
3646}
3647
3648// PageToken sets the optional parameter "pageToken": Required. A page
3649// token, received from a previous `ListGroups` call. Provide this to
3650// retrieve the subsequent page. When paginating, all other parameters
3651// provided to `ListGroups` must match the call that provided the page
3652// token.
3653func (c *ProjectsLocationsGroupsListCall) PageToken(pageToken string) *ProjectsLocationsGroupsListCall {
3654	c.urlParams_.Set("pageToken", pageToken)
3655	return c
3656}
3657
3658// Fields allows partial responses to be retrieved. See
3659// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3660// for more information.
3661func (c *ProjectsLocationsGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsListCall {
3662	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3663	return c
3664}
3665
3666// IfNoneMatch sets the optional parameter which makes the operation
3667// fail if the object's ETag matches the given value. This is useful for
3668// getting updates only after the object has changed since the last
3669// request. Use googleapi.IsNotModified to check whether the response
3670// error from Do is the result of In-None-Match.
3671func (c *ProjectsLocationsGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGroupsListCall {
3672	c.ifNoneMatch_ = entityTag
3673	return c
3674}
3675
3676// Context sets the context to be used in this call's Do method. Any
3677// pending HTTP request will be aborted if the provided context is
3678// canceled.
3679func (c *ProjectsLocationsGroupsListCall) Context(ctx context.Context) *ProjectsLocationsGroupsListCall {
3680	c.ctx_ = ctx
3681	return c
3682}
3683
3684// Header returns an http.Header that can be modified by the caller to
3685// add HTTP headers to the request.
3686func (c *ProjectsLocationsGroupsListCall) Header() http.Header {
3687	if c.header_ == nil {
3688		c.header_ = make(http.Header)
3689	}
3690	return c.header_
3691}
3692
3693func (c *ProjectsLocationsGroupsListCall) doRequest(alt string) (*http.Response, error) {
3694	reqHeaders := make(http.Header)
3695	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3696	for k, v := range c.header_ {
3697		reqHeaders[k] = v
3698	}
3699	reqHeaders.Set("User-Agent", c.s.userAgent())
3700	if c.ifNoneMatch_ != "" {
3701		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3702	}
3703	var body io.Reader = nil
3704	c.urlParams_.Set("alt", alt)
3705	c.urlParams_.Set("prettyPrint", "false")
3706	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/groups")
3707	urls += "?" + c.urlParams_.Encode()
3708	req, err := http.NewRequest("GET", urls, body)
3709	if err != nil {
3710		return nil, err
3711	}
3712	req.Header = reqHeaders
3713	googleapi.Expand(req.URL, map[string]string{
3714		"parent": c.parent,
3715	})
3716	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3717}
3718
3719// Do executes the "vmmigration.projects.locations.groups.list" call.
3720// Exactly one of *ListGroupsResponse or error will be non-nil. Any
3721// non-2xx status code is an error. Response headers are in either
3722// *ListGroupsResponse.ServerResponse.Header or (if a response was
3723// returned at all) in error.(*googleapi.Error).Header. Use
3724// googleapi.IsNotModified to check whether the returned error was
3725// because http.StatusNotModified was returned.
3726func (c *ProjectsLocationsGroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsResponse, error) {
3727	gensupport.SetOptions(c.urlParams_, opts...)
3728	res, err := c.doRequest("json")
3729	if res != nil && res.StatusCode == http.StatusNotModified {
3730		if res.Body != nil {
3731			res.Body.Close()
3732		}
3733		return nil, &googleapi.Error{
3734			Code:   res.StatusCode,
3735			Header: res.Header,
3736		}
3737	}
3738	if err != nil {
3739		return nil, err
3740	}
3741	defer googleapi.CloseBody(res)
3742	if err := googleapi.CheckResponse(res); err != nil {
3743		return nil, err
3744	}
3745	ret := &ListGroupsResponse{
3746		ServerResponse: googleapi.ServerResponse{
3747			Header:         res.Header,
3748			HTTPStatusCode: res.StatusCode,
3749		},
3750	}
3751	target := &ret
3752	if err := gensupport.DecodeResponse(target, res); err != nil {
3753		return nil, err
3754	}
3755	return ret, nil
3756	// {
3757	//   "description": "Lists Groups in a given project and location.",
3758	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups",
3759	//   "httpMethod": "GET",
3760	//   "id": "vmmigration.projects.locations.groups.list",
3761	//   "parameterOrder": [
3762	//     "parent"
3763	//   ],
3764	//   "parameters": {
3765	//     "filter": {
3766	//       "description": "Optional. The filter request.",
3767	//       "location": "query",
3768	//       "type": "string"
3769	//     },
3770	//     "orderBy": {
3771	//       "description": "Optional. the order by fields for the result.",
3772	//       "location": "query",
3773	//       "type": "string"
3774	//     },
3775	//     "pageSize": {
3776	//       "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.",
3777	//       "format": "int32",
3778	//       "location": "query",
3779	//       "type": "integer"
3780	//     },
3781	//     "pageToken": {
3782	//       "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.",
3783	//       "location": "query",
3784	//       "type": "string"
3785	//     },
3786	//     "parent": {
3787	//       "description": "Required. The parent, which owns this collection of groups.",
3788	//       "location": "path",
3789	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
3790	//       "required": true,
3791	//       "type": "string"
3792	//     }
3793	//   },
3794	//   "path": "v1alpha1/{+parent}/groups",
3795	//   "response": {
3796	//     "$ref": "ListGroupsResponse"
3797	//   },
3798	//   "scopes": [
3799	//     "https://www.googleapis.com/auth/cloud-platform"
3800	//   ]
3801	// }
3802
3803}
3804
3805// Pages invokes f for each page of results.
3806// A non-nil error returned from f will halt the iteration.
3807// The provided context supersedes any context provided to the Context method.
3808func (c *ProjectsLocationsGroupsListCall) Pages(ctx context.Context, f func(*ListGroupsResponse) error) error {
3809	c.ctx_ = ctx
3810	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3811	for {
3812		x, err := c.Do()
3813		if err != nil {
3814			return err
3815		}
3816		if err := f(x); err != nil {
3817			return err
3818		}
3819		if x.NextPageToken == "" {
3820			return nil
3821		}
3822		c.PageToken(x.NextPageToken)
3823	}
3824}
3825
3826// method id "vmmigration.projects.locations.groups.patch":
3827
3828type ProjectsLocationsGroupsPatchCall struct {
3829	s          *Service
3830	name       string
3831	group      *Group
3832	urlParams_ gensupport.URLParams
3833	ctx_       context.Context
3834	header_    http.Header
3835}
3836
3837// Patch: Updates the parameters of a single Group.
3838//
3839// - name: The Group name.
3840func (r *ProjectsLocationsGroupsService) Patch(name string, group *Group) *ProjectsLocationsGroupsPatchCall {
3841	c := &ProjectsLocationsGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3842	c.name = name
3843	c.group = group
3844	return c
3845}
3846
3847// RequestId sets the optional parameter "requestId": A request ID to
3848// identify requests. Specify a unique request ID so that if you must
3849// retry your request, the server will know to ignore the request if it
3850// has already been completed. The server will guarantee that for at
3851// least 60 minutes since the first request. For example, consider a
3852// situation where you make an initial request and t he request times
3853// out. If you make the request again with the same request ID, the
3854// server can check if original operation with the same request ID was
3855// received, and if so, will ignore the second request. This prevents
3856// clients from accidentally creating duplicate commitments. The request
3857// ID must be a valid UUID with the exception that zero UUID is not
3858// supported (00000000-0000-0000-0000-000000000000).
3859func (c *ProjectsLocationsGroupsPatchCall) RequestId(requestId string) *ProjectsLocationsGroupsPatchCall {
3860	c.urlParams_.Set("requestId", requestId)
3861	return c
3862}
3863
3864// UpdateMask sets the optional parameter "updateMask": Field mask is
3865// used to specify the fields to be overwritten in the Group resource by
3866// the update. The fields specified in the update_mask are relative to
3867// the resource, not the full request. A field will be overwritten if it
3868// is in the mask. If the user does not provide a mask then all fields
3869// will be overwritten.
3870func (c *ProjectsLocationsGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGroupsPatchCall {
3871	c.urlParams_.Set("updateMask", updateMask)
3872	return c
3873}
3874
3875// Fields allows partial responses to be retrieved. See
3876// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3877// for more information.
3878func (c *ProjectsLocationsGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsPatchCall {
3879	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3880	return c
3881}
3882
3883// Context sets the context to be used in this call's Do method. Any
3884// pending HTTP request will be aborted if the provided context is
3885// canceled.
3886func (c *ProjectsLocationsGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsGroupsPatchCall {
3887	c.ctx_ = ctx
3888	return c
3889}
3890
3891// Header returns an http.Header that can be modified by the caller to
3892// add HTTP headers to the request.
3893func (c *ProjectsLocationsGroupsPatchCall) Header() http.Header {
3894	if c.header_ == nil {
3895		c.header_ = make(http.Header)
3896	}
3897	return c.header_
3898}
3899
3900func (c *ProjectsLocationsGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
3901	reqHeaders := make(http.Header)
3902	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
3903	for k, v := range c.header_ {
3904		reqHeaders[k] = v
3905	}
3906	reqHeaders.Set("User-Agent", c.s.userAgent())
3907	var body io.Reader = nil
3908	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
3909	if err != nil {
3910		return nil, err
3911	}
3912	reqHeaders.Set("Content-Type", "application/json")
3913	c.urlParams_.Set("alt", alt)
3914	c.urlParams_.Set("prettyPrint", "false")
3915	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
3916	urls += "?" + c.urlParams_.Encode()
3917	req, err := http.NewRequest("PATCH", urls, body)
3918	if err != nil {
3919		return nil, err
3920	}
3921	req.Header = reqHeaders
3922	googleapi.Expand(req.URL, map[string]string{
3923		"name": c.name,
3924	})
3925	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3926}
3927
3928// Do executes the "vmmigration.projects.locations.groups.patch" call.
3929// Exactly one of *Operation or error will be non-nil. Any non-2xx
3930// status code is an error. Response headers are in either
3931// *Operation.ServerResponse.Header or (if a response was returned at
3932// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
3933// to check whether the returned error was because
3934// http.StatusNotModified was returned.
3935func (c *ProjectsLocationsGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3936	gensupport.SetOptions(c.urlParams_, opts...)
3937	res, err := c.doRequest("json")
3938	if res != nil && res.StatusCode == http.StatusNotModified {
3939		if res.Body != nil {
3940			res.Body.Close()
3941		}
3942		return nil, &googleapi.Error{
3943			Code:   res.StatusCode,
3944			Header: res.Header,
3945		}
3946	}
3947	if err != nil {
3948		return nil, err
3949	}
3950	defer googleapi.CloseBody(res)
3951	if err := googleapi.CheckResponse(res); err != nil {
3952		return nil, err
3953	}
3954	ret := &Operation{
3955		ServerResponse: googleapi.ServerResponse{
3956			Header:         res.Header,
3957			HTTPStatusCode: res.StatusCode,
3958		},
3959	}
3960	target := &ret
3961	if err := gensupport.DecodeResponse(target, res); err != nil {
3962		return nil, err
3963	}
3964	return ret, nil
3965	// {
3966	//   "description": "Updates the parameters of a single Group.",
3967	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}",
3968	//   "httpMethod": "PATCH",
3969	//   "id": "vmmigration.projects.locations.groups.patch",
3970	//   "parameterOrder": [
3971	//     "name"
3972	//   ],
3973	//   "parameters": {
3974	//     "name": {
3975	//       "description": "The Group name.",
3976	//       "location": "path",
3977	//       "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$",
3978	//       "required": true,
3979	//       "type": "string"
3980	//     },
3981	//     "requestId": {
3982	//       "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).",
3983	//       "location": "query",
3984	//       "type": "string"
3985	//     },
3986	//     "updateMask": {
3987	//       "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.",
3988	//       "format": "google-fieldmask",
3989	//       "location": "query",
3990	//       "type": "string"
3991	//     }
3992	//   },
3993	//   "path": "v1alpha1/{+name}",
3994	//   "request": {
3995	//     "$ref": "Group"
3996	//   },
3997	//   "response": {
3998	//     "$ref": "Operation"
3999	//   },
4000	//   "scopes": [
4001	//     "https://www.googleapis.com/auth/cloud-platform"
4002	//   ]
4003	// }
4004
4005}
4006
4007// method id "vmmigration.projects.locations.groups.removeGroupMigration":
4008
4009type ProjectsLocationsGroupsRemoveGroupMigrationCall struct {
4010	s                           *Service
4011	group                       string
4012	removegroupmigrationrequest *RemoveGroupMigrationRequest
4013	urlParams_                  gensupport.URLParams
4014	ctx_                        context.Context
4015	header_                     http.Header
4016}
4017
4018// RemoveGroupMigration: Removes a MigratingVm from a Group.
4019//
4020// - group: The name of the Group.
4021func (r *ProjectsLocationsGroupsService) RemoveGroupMigration(group string, removegroupmigrationrequest *RemoveGroupMigrationRequest) *ProjectsLocationsGroupsRemoveGroupMigrationCall {
4022	c := &ProjectsLocationsGroupsRemoveGroupMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4023	c.group = group
4024	c.removegroupmigrationrequest = removegroupmigrationrequest
4025	return c
4026}
4027
4028// Fields allows partial responses to be retrieved. See
4029// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4030// for more information.
4031func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsRemoveGroupMigrationCall {
4032	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4033	return c
4034}
4035
4036// Context sets the context to be used in this call's Do method. Any
4037// pending HTTP request will be aborted if the provided context is
4038// canceled.
4039func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Context(ctx context.Context) *ProjectsLocationsGroupsRemoveGroupMigrationCall {
4040	c.ctx_ = ctx
4041	return c
4042}
4043
4044// Header returns an http.Header that can be modified by the caller to
4045// add HTTP headers to the request.
4046func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Header() http.Header {
4047	if c.header_ == nil {
4048		c.header_ = make(http.Header)
4049	}
4050	return c.header_
4051}
4052
4053func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) doRequest(alt string) (*http.Response, error) {
4054	reqHeaders := make(http.Header)
4055	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4056	for k, v := range c.header_ {
4057		reqHeaders[k] = v
4058	}
4059	reqHeaders.Set("User-Agent", c.s.userAgent())
4060	var body io.Reader = nil
4061	body, err := googleapi.WithoutDataWrapper.JSONReader(c.removegroupmigrationrequest)
4062	if err != nil {
4063		return nil, err
4064	}
4065	reqHeaders.Set("Content-Type", "application/json")
4066	c.urlParams_.Set("alt", alt)
4067	c.urlParams_.Set("prettyPrint", "false")
4068	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+group}:removeGroupMigration")
4069	urls += "?" + c.urlParams_.Encode()
4070	req, err := http.NewRequest("POST", urls, body)
4071	if err != nil {
4072		return nil, err
4073	}
4074	req.Header = reqHeaders
4075	googleapi.Expand(req.URL, map[string]string{
4076		"group": c.group,
4077	})
4078	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4079}
4080
4081// Do executes the "vmmigration.projects.locations.groups.removeGroupMigration" call.
4082// Exactly one of *Operation or error will be non-nil. Any non-2xx
4083// status code is an error. Response headers are in either
4084// *Operation.ServerResponse.Header or (if a response was returned at
4085// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4086// to check whether the returned error was because
4087// http.StatusNotModified was returned.
4088func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4089	gensupport.SetOptions(c.urlParams_, opts...)
4090	res, err := c.doRequest("json")
4091	if res != nil && res.StatusCode == http.StatusNotModified {
4092		if res.Body != nil {
4093			res.Body.Close()
4094		}
4095		return nil, &googleapi.Error{
4096			Code:   res.StatusCode,
4097			Header: res.Header,
4098		}
4099	}
4100	if err != nil {
4101		return nil, err
4102	}
4103	defer googleapi.CloseBody(res)
4104	if err := googleapi.CheckResponse(res); err != nil {
4105		return nil, err
4106	}
4107	ret := &Operation{
4108		ServerResponse: googleapi.ServerResponse{
4109			Header:         res.Header,
4110			HTTPStatusCode: res.StatusCode,
4111		},
4112	}
4113	target := &ret
4114	if err := gensupport.DecodeResponse(target, res); err != nil {
4115		return nil, err
4116	}
4117	return ret, nil
4118	// {
4119	//   "description": "Removes a MigratingVm from a Group.",
4120	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}:removeGroupMigration",
4121	//   "httpMethod": "POST",
4122	//   "id": "vmmigration.projects.locations.groups.removeGroupMigration",
4123	//   "parameterOrder": [
4124	//     "group"
4125	//   ],
4126	//   "parameters": {
4127	//     "group": {
4128	//       "description": "Required. The name of the Group.",
4129	//       "location": "path",
4130	//       "pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$",
4131	//       "required": true,
4132	//       "type": "string"
4133	//     }
4134	//   },
4135	//   "path": "v1alpha1/{+group}:removeGroupMigration",
4136	//   "request": {
4137	//     "$ref": "RemoveGroupMigrationRequest"
4138	//   },
4139	//   "response": {
4140	//     "$ref": "Operation"
4141	//   },
4142	//   "scopes": [
4143	//     "https://www.googleapis.com/auth/cloud-platform"
4144	//   ]
4145	// }
4146
4147}
4148
4149// method id "vmmigration.projects.locations.operations.cancel":
4150
4151type ProjectsLocationsOperationsCancelCall struct {
4152	s                      *Service
4153	name                   string
4154	canceloperationrequest *CancelOperationRequest
4155	urlParams_             gensupport.URLParams
4156	ctx_                   context.Context
4157	header_                http.Header
4158}
4159
4160// Cancel: Starts asynchronous cancellation on a long-running operation.
4161// The server makes a best effort to cancel the operation, but success
4162// is not guaranteed. If the server doesn't support this method, it
4163// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use
4164// Operations.GetOperation or other methods to check whether the
4165// cancellation succeeded or whether the operation completed despite
4166// cancellation. On successful cancellation, the operation is not
4167// deleted; instead, it becomes an operation with an Operation.error
4168// value with a google.rpc.Status.code of 1, corresponding to
4169// `Code.CANCELLED`.
4170//
4171// - name: The name of the operation resource to be cancelled.
4172func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
4173	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4174	c.name = name
4175	c.canceloperationrequest = canceloperationrequest
4176	return c
4177}
4178
4179// Fields allows partial responses to be retrieved. See
4180// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4181// for more information.
4182func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
4183	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4184	return c
4185}
4186
4187// Context sets the context to be used in this call's Do method. Any
4188// pending HTTP request will be aborted if the provided context is
4189// canceled.
4190func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
4191	c.ctx_ = ctx
4192	return c
4193}
4194
4195// Header returns an http.Header that can be modified by the caller to
4196// add HTTP headers to the request.
4197func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
4198	if c.header_ == nil {
4199		c.header_ = make(http.Header)
4200	}
4201	return c.header_
4202}
4203
4204func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
4205	reqHeaders := make(http.Header)
4206	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4207	for k, v := range c.header_ {
4208		reqHeaders[k] = v
4209	}
4210	reqHeaders.Set("User-Agent", c.s.userAgent())
4211	var body io.Reader = nil
4212	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
4213	if err != nil {
4214		return nil, err
4215	}
4216	reqHeaders.Set("Content-Type", "application/json")
4217	c.urlParams_.Set("alt", alt)
4218	c.urlParams_.Set("prettyPrint", "false")
4219	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:cancel")
4220	urls += "?" + c.urlParams_.Encode()
4221	req, err := http.NewRequest("POST", urls, body)
4222	if err != nil {
4223		return nil, err
4224	}
4225	req.Header = reqHeaders
4226	googleapi.Expand(req.URL, map[string]string{
4227		"name": c.name,
4228	})
4229	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4230}
4231
4232// Do executes the "vmmigration.projects.locations.operations.cancel" call.
4233// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4234// code is an error. Response headers are in either
4235// *Empty.ServerResponse.Header or (if a response was returned at all)
4236// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4237// check whether the returned error was because http.StatusNotModified
4238// was returned.
4239func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4240	gensupport.SetOptions(c.urlParams_, opts...)
4241	res, err := c.doRequest("json")
4242	if res != nil && res.StatusCode == http.StatusNotModified {
4243		if res.Body != nil {
4244			res.Body.Close()
4245		}
4246		return nil, &googleapi.Error{
4247			Code:   res.StatusCode,
4248			Header: res.Header,
4249		}
4250	}
4251	if err != nil {
4252		return nil, err
4253	}
4254	defer googleapi.CloseBody(res)
4255	if err := googleapi.CheckResponse(res); err != nil {
4256		return nil, err
4257	}
4258	ret := &Empty{
4259		ServerResponse: googleapi.ServerResponse{
4260			Header:         res.Header,
4261			HTTPStatusCode: res.StatusCode,
4262		},
4263	}
4264	target := &ret
4265	if err := gensupport.DecodeResponse(target, res); err != nil {
4266		return nil, err
4267	}
4268	return ret, nil
4269	// {
4270	//   "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`.",
4271	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel",
4272	//   "httpMethod": "POST",
4273	//   "id": "vmmigration.projects.locations.operations.cancel",
4274	//   "parameterOrder": [
4275	//     "name"
4276	//   ],
4277	//   "parameters": {
4278	//     "name": {
4279	//       "description": "The name of the operation resource to be cancelled.",
4280	//       "location": "path",
4281	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
4282	//       "required": true,
4283	//       "type": "string"
4284	//     }
4285	//   },
4286	//   "path": "v1alpha1/{+name}:cancel",
4287	//   "request": {
4288	//     "$ref": "CancelOperationRequest"
4289	//   },
4290	//   "response": {
4291	//     "$ref": "Empty"
4292	//   },
4293	//   "scopes": [
4294	//     "https://www.googleapis.com/auth/cloud-platform"
4295	//   ]
4296	// }
4297
4298}
4299
4300// method id "vmmigration.projects.locations.operations.delete":
4301
4302type ProjectsLocationsOperationsDeleteCall struct {
4303	s          *Service
4304	name       string
4305	urlParams_ gensupport.URLParams
4306	ctx_       context.Context
4307	header_    http.Header
4308}
4309
4310// Delete: Deletes a long-running operation. This method indicates that
4311// the client is no longer interested in the operation result. It does
4312// not cancel the operation. If the server doesn't support this method,
4313// it returns `google.rpc.Code.UNIMPLEMENTED`.
4314//
4315// - name: The name of the operation resource to be deleted.
4316func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
4317	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4318	c.name = name
4319	return c
4320}
4321
4322// Fields allows partial responses to be retrieved. See
4323// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4324// for more information.
4325func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
4326	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4327	return c
4328}
4329
4330// Context sets the context to be used in this call's Do method. Any
4331// pending HTTP request will be aborted if the provided context is
4332// canceled.
4333func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
4334	c.ctx_ = ctx
4335	return c
4336}
4337
4338// Header returns an http.Header that can be modified by the caller to
4339// add HTTP headers to the request.
4340func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
4341	if c.header_ == nil {
4342		c.header_ = make(http.Header)
4343	}
4344	return c.header_
4345}
4346
4347func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
4348	reqHeaders := make(http.Header)
4349	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4350	for k, v := range c.header_ {
4351		reqHeaders[k] = v
4352	}
4353	reqHeaders.Set("User-Agent", c.s.userAgent())
4354	var body io.Reader = nil
4355	c.urlParams_.Set("alt", alt)
4356	c.urlParams_.Set("prettyPrint", "false")
4357	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
4358	urls += "?" + c.urlParams_.Encode()
4359	req, err := http.NewRequest("DELETE", urls, body)
4360	if err != nil {
4361		return nil, err
4362	}
4363	req.Header = reqHeaders
4364	googleapi.Expand(req.URL, map[string]string{
4365		"name": c.name,
4366	})
4367	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4368}
4369
4370// Do executes the "vmmigration.projects.locations.operations.delete" call.
4371// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4372// code is an error. Response headers are in either
4373// *Empty.ServerResponse.Header or (if a response was returned at all)
4374// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4375// check whether the returned error was because http.StatusNotModified
4376// was returned.
4377func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4378	gensupport.SetOptions(c.urlParams_, opts...)
4379	res, err := c.doRequest("json")
4380	if res != nil && res.StatusCode == http.StatusNotModified {
4381		if res.Body != nil {
4382			res.Body.Close()
4383		}
4384		return nil, &googleapi.Error{
4385			Code:   res.StatusCode,
4386			Header: res.Header,
4387		}
4388	}
4389	if err != nil {
4390		return nil, err
4391	}
4392	defer googleapi.CloseBody(res)
4393	if err := googleapi.CheckResponse(res); err != nil {
4394		return nil, err
4395	}
4396	ret := &Empty{
4397		ServerResponse: googleapi.ServerResponse{
4398			Header:         res.Header,
4399			HTTPStatusCode: res.StatusCode,
4400		},
4401	}
4402	target := &ret
4403	if err := gensupport.DecodeResponse(target, res); err != nil {
4404		return nil, err
4405	}
4406	return ret, nil
4407	// {
4408	//   "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`.",
4409	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
4410	//   "httpMethod": "DELETE",
4411	//   "id": "vmmigration.projects.locations.operations.delete",
4412	//   "parameterOrder": [
4413	//     "name"
4414	//   ],
4415	//   "parameters": {
4416	//     "name": {
4417	//       "description": "The name of the operation resource to be deleted.",
4418	//       "location": "path",
4419	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
4420	//       "required": true,
4421	//       "type": "string"
4422	//     }
4423	//   },
4424	//   "path": "v1alpha1/{+name}",
4425	//   "response": {
4426	//     "$ref": "Empty"
4427	//   },
4428	//   "scopes": [
4429	//     "https://www.googleapis.com/auth/cloud-platform"
4430	//   ]
4431	// }
4432
4433}
4434
4435// method id "vmmigration.projects.locations.operations.get":
4436
4437type ProjectsLocationsOperationsGetCall struct {
4438	s            *Service
4439	name         string
4440	urlParams_   gensupport.URLParams
4441	ifNoneMatch_ string
4442	ctx_         context.Context
4443	header_      http.Header
4444}
4445
4446// Get: Gets the latest state of a long-running operation. Clients can
4447// use this method to poll the operation result at intervals as
4448// recommended by the API service.
4449//
4450// - name: The name of the operation resource.
4451func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
4452	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4453	c.name = name
4454	return c
4455}
4456
4457// Fields allows partial responses to be retrieved. See
4458// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4459// for more information.
4460func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
4461	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4462	return c
4463}
4464
4465// IfNoneMatch sets the optional parameter which makes the operation
4466// fail if the object's ETag matches the given value. This is useful for
4467// getting updates only after the object has changed since the last
4468// request. Use googleapi.IsNotModified to check whether the response
4469// error from Do is the result of In-None-Match.
4470func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
4471	c.ifNoneMatch_ = entityTag
4472	return c
4473}
4474
4475// Context sets the context to be used in this call's Do method. Any
4476// pending HTTP request will be aborted if the provided context is
4477// canceled.
4478func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
4479	c.ctx_ = ctx
4480	return c
4481}
4482
4483// Header returns an http.Header that can be modified by the caller to
4484// add HTTP headers to the request.
4485func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
4486	if c.header_ == nil {
4487		c.header_ = make(http.Header)
4488	}
4489	return c.header_
4490}
4491
4492func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
4493	reqHeaders := make(http.Header)
4494	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4495	for k, v := range c.header_ {
4496		reqHeaders[k] = v
4497	}
4498	reqHeaders.Set("User-Agent", c.s.userAgent())
4499	if c.ifNoneMatch_ != "" {
4500		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4501	}
4502	var body io.Reader = nil
4503	c.urlParams_.Set("alt", alt)
4504	c.urlParams_.Set("prettyPrint", "false")
4505	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
4506	urls += "?" + c.urlParams_.Encode()
4507	req, err := http.NewRequest("GET", urls, body)
4508	if err != nil {
4509		return nil, err
4510	}
4511	req.Header = reqHeaders
4512	googleapi.Expand(req.URL, map[string]string{
4513		"name": c.name,
4514	})
4515	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4516}
4517
4518// Do executes the "vmmigration.projects.locations.operations.get" call.
4519// Exactly one of *Operation or error will be non-nil. Any non-2xx
4520// status code is an error. Response headers are in either
4521// *Operation.ServerResponse.Header or (if a response was returned at
4522// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4523// to check whether the returned error was because
4524// http.StatusNotModified was returned.
4525func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4526	gensupport.SetOptions(c.urlParams_, opts...)
4527	res, err := c.doRequest("json")
4528	if res != nil && res.StatusCode == http.StatusNotModified {
4529		if res.Body != nil {
4530			res.Body.Close()
4531		}
4532		return nil, &googleapi.Error{
4533			Code:   res.StatusCode,
4534			Header: res.Header,
4535		}
4536	}
4537	if err != nil {
4538		return nil, err
4539	}
4540	defer googleapi.CloseBody(res)
4541	if err := googleapi.CheckResponse(res); err != nil {
4542		return nil, err
4543	}
4544	ret := &Operation{
4545		ServerResponse: googleapi.ServerResponse{
4546			Header:         res.Header,
4547			HTTPStatusCode: res.StatusCode,
4548		},
4549	}
4550	target := &ret
4551	if err := gensupport.DecodeResponse(target, res); err != nil {
4552		return nil, err
4553	}
4554	return ret, nil
4555	// {
4556	//   "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.",
4557	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}",
4558	//   "httpMethod": "GET",
4559	//   "id": "vmmigration.projects.locations.operations.get",
4560	//   "parameterOrder": [
4561	//     "name"
4562	//   ],
4563	//   "parameters": {
4564	//     "name": {
4565	//       "description": "The name of the operation resource.",
4566	//       "location": "path",
4567	//       "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
4568	//       "required": true,
4569	//       "type": "string"
4570	//     }
4571	//   },
4572	//   "path": "v1alpha1/{+name}",
4573	//   "response": {
4574	//     "$ref": "Operation"
4575	//   },
4576	//   "scopes": [
4577	//     "https://www.googleapis.com/auth/cloud-platform"
4578	//   ]
4579	// }
4580
4581}
4582
4583// method id "vmmigration.projects.locations.operations.list":
4584
4585type ProjectsLocationsOperationsListCall struct {
4586	s            *Service
4587	name         string
4588	urlParams_   gensupport.URLParams
4589	ifNoneMatch_ string
4590	ctx_         context.Context
4591	header_      http.Header
4592}
4593
4594// List: Lists operations that match the specified filter in the
4595// request. If the server doesn't support this method, it returns
4596// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
4597// override the binding to use different resource name schemes, such as
4598// `users/*/operations`. To override the binding, API services can add a
4599// binding such as "/v1/{name=users/*}/operations" to their service
4600// configuration. For backwards compatibility, the default name includes
4601// the operations collection id, however overriding users must ensure
4602// the name binding is the parent resource, without the operations
4603// collection id.
4604//
4605// - name: The name of the operation's parent resource.
4606func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
4607	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4608	c.name = name
4609	return c
4610}
4611
4612// Filter sets the optional parameter "filter": The standard list
4613// filter.
4614func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
4615	c.urlParams_.Set("filter", filter)
4616	return c
4617}
4618
4619// PageSize sets the optional parameter "pageSize": The standard list
4620// page size.
4621func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
4622	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4623	return c
4624}
4625
4626// PageToken sets the optional parameter "pageToken": The standard list
4627// page token.
4628func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
4629	c.urlParams_.Set("pageToken", pageToken)
4630	return c
4631}
4632
4633// Fields allows partial responses to be retrieved. See
4634// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4635// for more information.
4636func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
4637	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4638	return c
4639}
4640
4641// IfNoneMatch sets the optional parameter which makes the operation
4642// fail if the object's ETag matches the given value. This is useful for
4643// getting updates only after the object has changed since the last
4644// request. Use googleapi.IsNotModified to check whether the response
4645// error from Do is the result of In-None-Match.
4646func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
4647	c.ifNoneMatch_ = entityTag
4648	return c
4649}
4650
4651// Context sets the context to be used in this call's Do method. Any
4652// pending HTTP request will be aborted if the provided context is
4653// canceled.
4654func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
4655	c.ctx_ = ctx
4656	return c
4657}
4658
4659// Header returns an http.Header that can be modified by the caller to
4660// add HTTP headers to the request.
4661func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
4662	if c.header_ == nil {
4663		c.header_ = make(http.Header)
4664	}
4665	return c.header_
4666}
4667
4668func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
4669	reqHeaders := make(http.Header)
4670	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4671	for k, v := range c.header_ {
4672		reqHeaders[k] = v
4673	}
4674	reqHeaders.Set("User-Agent", c.s.userAgent())
4675	if c.ifNoneMatch_ != "" {
4676		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4677	}
4678	var body io.Reader = nil
4679	c.urlParams_.Set("alt", alt)
4680	c.urlParams_.Set("prettyPrint", "false")
4681	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}/operations")
4682	urls += "?" + c.urlParams_.Encode()
4683	req, err := http.NewRequest("GET", urls, body)
4684	if err != nil {
4685		return nil, err
4686	}
4687	req.Header = reqHeaders
4688	googleapi.Expand(req.URL, map[string]string{
4689		"name": c.name,
4690	})
4691	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4692}
4693
4694// Do executes the "vmmigration.projects.locations.operations.list" call.
4695// Exactly one of *ListOperationsResponse or error will be non-nil. Any
4696// non-2xx status code is an error. Response headers are in either
4697// *ListOperationsResponse.ServerResponse.Header or (if a response was
4698// returned at all) in error.(*googleapi.Error).Header. Use
4699// googleapi.IsNotModified to check whether the returned error was
4700// because http.StatusNotModified was returned.
4701func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
4702	gensupport.SetOptions(c.urlParams_, opts...)
4703	res, err := c.doRequest("json")
4704	if res != nil && res.StatusCode == http.StatusNotModified {
4705		if res.Body != nil {
4706			res.Body.Close()
4707		}
4708		return nil, &googleapi.Error{
4709			Code:   res.StatusCode,
4710			Header: res.Header,
4711		}
4712	}
4713	if err != nil {
4714		return nil, err
4715	}
4716	defer googleapi.CloseBody(res)
4717	if err := googleapi.CheckResponse(res); err != nil {
4718		return nil, err
4719	}
4720	ret := &ListOperationsResponse{
4721		ServerResponse: googleapi.ServerResponse{
4722			Header:         res.Header,
4723			HTTPStatusCode: res.StatusCode,
4724		},
4725	}
4726	target := &ret
4727	if err := gensupport.DecodeResponse(target, res); err != nil {
4728		return nil, err
4729	}
4730	return ret, nil
4731	// {
4732	//   "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.",
4733	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations",
4734	//   "httpMethod": "GET",
4735	//   "id": "vmmigration.projects.locations.operations.list",
4736	//   "parameterOrder": [
4737	//     "name"
4738	//   ],
4739	//   "parameters": {
4740	//     "filter": {
4741	//       "description": "The standard list filter.",
4742	//       "location": "query",
4743	//       "type": "string"
4744	//     },
4745	//     "name": {
4746	//       "description": "The name of the operation's parent resource.",
4747	//       "location": "path",
4748	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4749	//       "required": true,
4750	//       "type": "string"
4751	//     },
4752	//     "pageSize": {
4753	//       "description": "The standard list page size.",
4754	//       "format": "int32",
4755	//       "location": "query",
4756	//       "type": "integer"
4757	//     },
4758	//     "pageToken": {
4759	//       "description": "The standard list page token.",
4760	//       "location": "query",
4761	//       "type": "string"
4762	//     }
4763	//   },
4764	//   "path": "v1alpha1/{+name}/operations",
4765	//   "response": {
4766	//     "$ref": "ListOperationsResponse"
4767	//   },
4768	//   "scopes": [
4769	//     "https://www.googleapis.com/auth/cloud-platform"
4770	//   ]
4771	// }
4772
4773}
4774
4775// Pages invokes f for each page of results.
4776// A non-nil error returned from f will halt the iteration.
4777// The provided context supersedes any context provided to the Context method.
4778func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
4779	c.ctx_ = ctx
4780	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4781	for {
4782		x, err := c.Do()
4783		if err != nil {
4784			return err
4785		}
4786		if err := f(x); err != nil {
4787			return err
4788		}
4789		if x.NextPageToken == "" {
4790			return nil
4791		}
4792		c.PageToken(x.NextPageToken)
4793	}
4794}
4795
4796// method id "vmmigration.projects.locations.sources.create":
4797
4798type ProjectsLocationsSourcesCreateCall struct {
4799	s          *Service
4800	parent     string
4801	source     *Source
4802	urlParams_ gensupport.URLParams
4803	ctx_       context.Context
4804	header_    http.Header
4805}
4806
4807// Create: Creates a new Source in a given project and location.
4808//
4809// - parent: The Source's parent.
4810func (r *ProjectsLocationsSourcesService) Create(parent string, source *Source) *ProjectsLocationsSourcesCreateCall {
4811	c := &ProjectsLocationsSourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4812	c.parent = parent
4813	c.source = source
4814	return c
4815}
4816
4817// RequestId sets the optional parameter "requestId": A request ID to
4818// identify requests. Specify a unique request ID so that if you must
4819// retry your request, the server will know to ignore the request if it
4820// has already been completed. The server will guarantee that for at
4821// least 60 minutes since the first request. For example, consider a
4822// situation where you make an initial request and t he request times
4823// out. If you make the request again with the same request ID, the
4824// server can check if original operation with the same request ID was
4825// received, and if so, will ignore the second request. This prevents
4826// clients from accidentally creating duplicate commitments. The request
4827// ID must be a valid UUID with the exception that zero UUID is not
4828// supported (00000000-0000-0000-0000-000000000000).
4829func (c *ProjectsLocationsSourcesCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesCreateCall {
4830	c.urlParams_.Set("requestId", requestId)
4831	return c
4832}
4833
4834// SourceId sets the optional parameter "sourceId": Required. The source
4835// identifier.
4836func (c *ProjectsLocationsSourcesCreateCall) SourceId(sourceId string) *ProjectsLocationsSourcesCreateCall {
4837	c.urlParams_.Set("sourceId", sourceId)
4838	return c
4839}
4840
4841// Fields allows partial responses to be retrieved. See
4842// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4843// for more information.
4844func (c *ProjectsLocationsSourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesCreateCall {
4845	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4846	return c
4847}
4848
4849// Context sets the context to be used in this call's Do method. Any
4850// pending HTTP request will be aborted if the provided context is
4851// canceled.
4852func (c *ProjectsLocationsSourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesCreateCall {
4853	c.ctx_ = ctx
4854	return c
4855}
4856
4857// Header returns an http.Header that can be modified by the caller to
4858// add HTTP headers to the request.
4859func (c *ProjectsLocationsSourcesCreateCall) Header() http.Header {
4860	if c.header_ == nil {
4861		c.header_ = make(http.Header)
4862	}
4863	return c.header_
4864}
4865
4866func (c *ProjectsLocationsSourcesCreateCall) doRequest(alt string) (*http.Response, error) {
4867	reqHeaders := make(http.Header)
4868	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
4869	for k, v := range c.header_ {
4870		reqHeaders[k] = v
4871	}
4872	reqHeaders.Set("User-Agent", c.s.userAgent())
4873	var body io.Reader = nil
4874	body, err := googleapi.WithoutDataWrapper.JSONReader(c.source)
4875	if err != nil {
4876		return nil, err
4877	}
4878	reqHeaders.Set("Content-Type", "application/json")
4879	c.urlParams_.Set("alt", alt)
4880	c.urlParams_.Set("prettyPrint", "false")
4881	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/sources")
4882	urls += "?" + c.urlParams_.Encode()
4883	req, err := http.NewRequest("POST", urls, body)
4884	if err != nil {
4885		return nil, err
4886	}
4887	req.Header = reqHeaders
4888	googleapi.Expand(req.URL, map[string]string{
4889		"parent": c.parent,
4890	})
4891	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4892}
4893
4894// Do executes the "vmmigration.projects.locations.sources.create" call.
4895// Exactly one of *Operation or error will be non-nil. Any non-2xx
4896// status code is an error. Response headers are in either
4897// *Operation.ServerResponse.Header or (if a response was returned at
4898// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4899// to check whether the returned error was because
4900// http.StatusNotModified was returned.
4901func (c *ProjectsLocationsSourcesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4902	gensupport.SetOptions(c.urlParams_, opts...)
4903	res, err := c.doRequest("json")
4904	if res != nil && res.StatusCode == http.StatusNotModified {
4905		if res.Body != nil {
4906			res.Body.Close()
4907		}
4908		return nil, &googleapi.Error{
4909			Code:   res.StatusCode,
4910			Header: res.Header,
4911		}
4912	}
4913	if err != nil {
4914		return nil, err
4915	}
4916	defer googleapi.CloseBody(res)
4917	if err := googleapi.CheckResponse(res); err != nil {
4918		return nil, err
4919	}
4920	ret := &Operation{
4921		ServerResponse: googleapi.ServerResponse{
4922			Header:         res.Header,
4923			HTTPStatusCode: res.StatusCode,
4924		},
4925	}
4926	target := &ret
4927	if err := gensupport.DecodeResponse(target, res); err != nil {
4928		return nil, err
4929	}
4930	return ret, nil
4931	// {
4932	//   "description": "Creates a new Source in a given project and location.",
4933	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources",
4934	//   "httpMethod": "POST",
4935	//   "id": "vmmigration.projects.locations.sources.create",
4936	//   "parameterOrder": [
4937	//     "parent"
4938	//   ],
4939	//   "parameters": {
4940	//     "parent": {
4941	//       "description": "Required. The Source's parent.",
4942	//       "location": "path",
4943	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4944	//       "required": true,
4945	//       "type": "string"
4946	//     },
4947	//     "requestId": {
4948	//       "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).",
4949	//       "location": "query",
4950	//       "type": "string"
4951	//     },
4952	//     "sourceId": {
4953	//       "description": "Required. The source identifier.",
4954	//       "location": "query",
4955	//       "type": "string"
4956	//     }
4957	//   },
4958	//   "path": "v1alpha1/{+parent}/sources",
4959	//   "request": {
4960	//     "$ref": "Source"
4961	//   },
4962	//   "response": {
4963	//     "$ref": "Operation"
4964	//   },
4965	//   "scopes": [
4966	//     "https://www.googleapis.com/auth/cloud-platform"
4967	//   ]
4968	// }
4969
4970}
4971
4972// method id "vmmigration.projects.locations.sources.delete":
4973
4974type ProjectsLocationsSourcesDeleteCall struct {
4975	s          *Service
4976	name       string
4977	urlParams_ gensupport.URLParams
4978	ctx_       context.Context
4979	header_    http.Header
4980}
4981
4982// Delete: Deletes a single Source.
4983//
4984// - name: The Source name.
4985func (r *ProjectsLocationsSourcesService) Delete(name string) *ProjectsLocationsSourcesDeleteCall {
4986	c := &ProjectsLocationsSourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4987	c.name = name
4988	return c
4989}
4990
4991// RequestId sets the optional parameter "requestId": A request ID to
4992// identify requests. Specify a unique request ID so that if you must
4993// retry your request, the server will know to ignore the request if it
4994// has already been completed. The server will guarantee that for at
4995// least 60 minutes after the first request. For example, consider a
4996// situation where you make an initial request and t he request times
4997// out. If you make the request again with the same request ID, the
4998// server can check if original operation with the same request ID was
4999// received, and if so, will ignore the second request. This prevents
5000// clients from accidentally creating duplicate commitments. The request
5001// ID must be a valid UUID with the exception that zero UUID is not
5002// supported (00000000-0000-0000-0000-000000000000).
5003func (c *ProjectsLocationsSourcesDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesDeleteCall {
5004	c.urlParams_.Set("requestId", requestId)
5005	return c
5006}
5007
5008// Fields allows partial responses to be retrieved. See
5009// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5010// for more information.
5011func (c *ProjectsLocationsSourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDeleteCall {
5012	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5013	return c
5014}
5015
5016// Context sets the context to be used in this call's Do method. Any
5017// pending HTTP request will be aborted if the provided context is
5018// canceled.
5019func (c *ProjectsLocationsSourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesDeleteCall {
5020	c.ctx_ = ctx
5021	return c
5022}
5023
5024// Header returns an http.Header that can be modified by the caller to
5025// add HTTP headers to the request.
5026func (c *ProjectsLocationsSourcesDeleteCall) Header() http.Header {
5027	if c.header_ == nil {
5028		c.header_ = make(http.Header)
5029	}
5030	return c.header_
5031}
5032
5033func (c *ProjectsLocationsSourcesDeleteCall) doRequest(alt string) (*http.Response, error) {
5034	reqHeaders := make(http.Header)
5035	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5036	for k, v := range c.header_ {
5037		reqHeaders[k] = v
5038	}
5039	reqHeaders.Set("User-Agent", c.s.userAgent())
5040	var body io.Reader = nil
5041	c.urlParams_.Set("alt", alt)
5042	c.urlParams_.Set("prettyPrint", "false")
5043	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
5044	urls += "?" + c.urlParams_.Encode()
5045	req, err := http.NewRequest("DELETE", urls, body)
5046	if err != nil {
5047		return nil, err
5048	}
5049	req.Header = reqHeaders
5050	googleapi.Expand(req.URL, map[string]string{
5051		"name": c.name,
5052	})
5053	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5054}
5055
5056// Do executes the "vmmigration.projects.locations.sources.delete" call.
5057// Exactly one of *Operation or error will be non-nil. Any non-2xx
5058// status code is an error. Response headers are in either
5059// *Operation.ServerResponse.Header or (if a response was returned at
5060// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5061// to check whether the returned error was because
5062// http.StatusNotModified was returned.
5063func (c *ProjectsLocationsSourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5064	gensupport.SetOptions(c.urlParams_, opts...)
5065	res, err := c.doRequest("json")
5066	if res != nil && res.StatusCode == http.StatusNotModified {
5067		if res.Body != nil {
5068			res.Body.Close()
5069		}
5070		return nil, &googleapi.Error{
5071			Code:   res.StatusCode,
5072			Header: res.Header,
5073		}
5074	}
5075	if err != nil {
5076		return nil, err
5077	}
5078	defer googleapi.CloseBody(res)
5079	if err := googleapi.CheckResponse(res); err != nil {
5080		return nil, err
5081	}
5082	ret := &Operation{
5083		ServerResponse: googleapi.ServerResponse{
5084			Header:         res.Header,
5085			HTTPStatusCode: res.StatusCode,
5086		},
5087	}
5088	target := &ret
5089	if err := gensupport.DecodeResponse(target, res); err != nil {
5090		return nil, err
5091	}
5092	return ret, nil
5093	// {
5094	//   "description": "Deletes a single Source.",
5095	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}",
5096	//   "httpMethod": "DELETE",
5097	//   "id": "vmmigration.projects.locations.sources.delete",
5098	//   "parameterOrder": [
5099	//     "name"
5100	//   ],
5101	//   "parameters": {
5102	//     "name": {
5103	//       "description": "Required. The Source name.",
5104	//       "location": "path",
5105	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
5106	//       "required": true,
5107	//       "type": "string"
5108	//     },
5109	//     "requestId": {
5110	//       "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).",
5111	//       "location": "query",
5112	//       "type": "string"
5113	//     }
5114	//   },
5115	//   "path": "v1alpha1/{+name}",
5116	//   "response": {
5117	//     "$ref": "Operation"
5118	//   },
5119	//   "scopes": [
5120	//     "https://www.googleapis.com/auth/cloud-platform"
5121	//   ]
5122	// }
5123
5124}
5125
5126// method id "vmmigration.projects.locations.sources.fetchInventory":
5127
5128type ProjectsLocationsSourcesFetchInventoryCall struct {
5129	s            *Service
5130	source       string
5131	urlParams_   gensupport.URLParams
5132	ifNoneMatch_ string
5133	ctx_         context.Context
5134	header_      http.Header
5135}
5136
5137// FetchInventory: List remote source's inventory of VMs. The remote
5138// source is the onprem vCenter (remote in the sense it's not in Compute
5139// Engine). The inventory describes the list of existing VMs in that
5140// source. Note that this operation lists the VMs on the remote source,
5141// as opposed to listing the MigratingVms resources in the vmmigration
5142// service.
5143//
5144// - source: The name of the Source.
5145func (r *ProjectsLocationsSourcesService) FetchInventory(source string) *ProjectsLocationsSourcesFetchInventoryCall {
5146	c := &ProjectsLocationsSourcesFetchInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5147	c.source = source
5148	return c
5149}
5150
5151// ForceRefresh sets the optional parameter "forceRefresh": If this flag
5152// is set to true, the source will be queried instead of using cached
5153// results. Using this flag will make the call slower.
5154func (c *ProjectsLocationsSourcesFetchInventoryCall) ForceRefresh(forceRefresh bool) *ProjectsLocationsSourcesFetchInventoryCall {
5155	c.urlParams_.Set("forceRefresh", fmt.Sprint(forceRefresh))
5156	return c
5157}
5158
5159// Fields allows partial responses to be retrieved. See
5160// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5161// for more information.
5162func (c *ProjectsLocationsSourcesFetchInventoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesFetchInventoryCall {
5163	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5164	return c
5165}
5166
5167// IfNoneMatch sets the optional parameter which makes the operation
5168// fail if the object's ETag matches the given value. This is useful for
5169// getting updates only after the object has changed since the last
5170// request. Use googleapi.IsNotModified to check whether the response
5171// error from Do is the result of In-None-Match.
5172func (c *ProjectsLocationsSourcesFetchInventoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesFetchInventoryCall {
5173	c.ifNoneMatch_ = entityTag
5174	return c
5175}
5176
5177// Context sets the context to be used in this call's Do method. Any
5178// pending HTTP request will be aborted if the provided context is
5179// canceled.
5180func (c *ProjectsLocationsSourcesFetchInventoryCall) Context(ctx context.Context) *ProjectsLocationsSourcesFetchInventoryCall {
5181	c.ctx_ = ctx
5182	return c
5183}
5184
5185// Header returns an http.Header that can be modified by the caller to
5186// add HTTP headers to the request.
5187func (c *ProjectsLocationsSourcesFetchInventoryCall) Header() http.Header {
5188	if c.header_ == nil {
5189		c.header_ = make(http.Header)
5190	}
5191	return c.header_
5192}
5193
5194func (c *ProjectsLocationsSourcesFetchInventoryCall) doRequest(alt string) (*http.Response, error) {
5195	reqHeaders := make(http.Header)
5196	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5197	for k, v := range c.header_ {
5198		reqHeaders[k] = v
5199	}
5200	reqHeaders.Set("User-Agent", c.s.userAgent())
5201	if c.ifNoneMatch_ != "" {
5202		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5203	}
5204	var body io.Reader = nil
5205	c.urlParams_.Set("alt", alt)
5206	c.urlParams_.Set("prettyPrint", "false")
5207	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+source}:fetchInventory")
5208	urls += "?" + c.urlParams_.Encode()
5209	req, err := http.NewRequest("GET", urls, body)
5210	if err != nil {
5211		return nil, err
5212	}
5213	req.Header = reqHeaders
5214	googleapi.Expand(req.URL, map[string]string{
5215		"source": c.source,
5216	})
5217	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5218}
5219
5220// Do executes the "vmmigration.projects.locations.sources.fetchInventory" call.
5221// Exactly one of *FetchInventoryResponse or error will be non-nil. Any
5222// non-2xx status code is an error. Response headers are in either
5223// *FetchInventoryResponse.ServerResponse.Header or (if a response was
5224// returned at all) in error.(*googleapi.Error).Header. Use
5225// googleapi.IsNotModified to check whether the returned error was
5226// because http.StatusNotModified was returned.
5227func (c *ProjectsLocationsSourcesFetchInventoryCall) Do(opts ...googleapi.CallOption) (*FetchInventoryResponse, error) {
5228	gensupport.SetOptions(c.urlParams_, opts...)
5229	res, err := c.doRequest("json")
5230	if res != nil && res.StatusCode == http.StatusNotModified {
5231		if res.Body != nil {
5232			res.Body.Close()
5233		}
5234		return nil, &googleapi.Error{
5235			Code:   res.StatusCode,
5236			Header: res.Header,
5237		}
5238	}
5239	if err != nil {
5240		return nil, err
5241	}
5242	defer googleapi.CloseBody(res)
5243	if err := googleapi.CheckResponse(res); err != nil {
5244		return nil, err
5245	}
5246	ret := &FetchInventoryResponse{
5247		ServerResponse: googleapi.ServerResponse{
5248			Header:         res.Header,
5249			HTTPStatusCode: res.StatusCode,
5250		},
5251	}
5252	target := &ret
5253	if err := gensupport.DecodeResponse(target, res); err != nil {
5254		return nil, err
5255	}
5256	return ret, nil
5257	// {
5258	//   "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.",
5259	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}:fetchInventory",
5260	//   "httpMethod": "GET",
5261	//   "id": "vmmigration.projects.locations.sources.fetchInventory",
5262	//   "parameterOrder": [
5263	//     "source"
5264	//   ],
5265	//   "parameters": {
5266	//     "forceRefresh": {
5267	//       "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.",
5268	//       "location": "query",
5269	//       "type": "boolean"
5270	//     },
5271	//     "source": {
5272	//       "description": "Required. The name of the Source.",
5273	//       "location": "path",
5274	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
5275	//       "required": true,
5276	//       "type": "string"
5277	//     }
5278	//   },
5279	//   "path": "v1alpha1/{+source}:fetchInventory",
5280	//   "response": {
5281	//     "$ref": "FetchInventoryResponse"
5282	//   },
5283	//   "scopes": [
5284	//     "https://www.googleapis.com/auth/cloud-platform"
5285	//   ]
5286	// }
5287
5288}
5289
5290// method id "vmmigration.projects.locations.sources.get":
5291
5292type ProjectsLocationsSourcesGetCall struct {
5293	s            *Service
5294	name         string
5295	urlParams_   gensupport.URLParams
5296	ifNoneMatch_ string
5297	ctx_         context.Context
5298	header_      http.Header
5299}
5300
5301// Get: Gets details of a single Source.
5302//
5303// - name: The Source name.
5304func (r *ProjectsLocationsSourcesService) Get(name string) *ProjectsLocationsSourcesGetCall {
5305	c := &ProjectsLocationsSourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5306	c.name = name
5307	return c
5308}
5309
5310// Fields allows partial responses to be retrieved. See
5311// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5312// for more information.
5313func (c *ProjectsLocationsSourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesGetCall {
5314	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5315	return c
5316}
5317
5318// IfNoneMatch sets the optional parameter which makes the operation
5319// fail if the object's ETag matches the given value. This is useful for
5320// getting updates only after the object has changed since the last
5321// request. Use googleapi.IsNotModified to check whether the response
5322// error from Do is the result of In-None-Match.
5323func (c *ProjectsLocationsSourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesGetCall {
5324	c.ifNoneMatch_ = entityTag
5325	return c
5326}
5327
5328// Context sets the context to be used in this call's Do method. Any
5329// pending HTTP request will be aborted if the provided context is
5330// canceled.
5331func (c *ProjectsLocationsSourcesGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesGetCall {
5332	c.ctx_ = ctx
5333	return c
5334}
5335
5336// Header returns an http.Header that can be modified by the caller to
5337// add HTTP headers to the request.
5338func (c *ProjectsLocationsSourcesGetCall) Header() http.Header {
5339	if c.header_ == nil {
5340		c.header_ = make(http.Header)
5341	}
5342	return c.header_
5343}
5344
5345func (c *ProjectsLocationsSourcesGetCall) doRequest(alt string) (*http.Response, error) {
5346	reqHeaders := make(http.Header)
5347	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5348	for k, v := range c.header_ {
5349		reqHeaders[k] = v
5350	}
5351	reqHeaders.Set("User-Agent", c.s.userAgent())
5352	if c.ifNoneMatch_ != "" {
5353		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5354	}
5355	var body io.Reader = nil
5356	c.urlParams_.Set("alt", alt)
5357	c.urlParams_.Set("prettyPrint", "false")
5358	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
5359	urls += "?" + c.urlParams_.Encode()
5360	req, err := http.NewRequest("GET", urls, body)
5361	if err != nil {
5362		return nil, err
5363	}
5364	req.Header = reqHeaders
5365	googleapi.Expand(req.URL, map[string]string{
5366		"name": c.name,
5367	})
5368	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5369}
5370
5371// Do executes the "vmmigration.projects.locations.sources.get" call.
5372// Exactly one of *Source or error will be non-nil. Any non-2xx status
5373// code is an error. Response headers are in either
5374// *Source.ServerResponse.Header or (if a response was returned at all)
5375// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5376// check whether the returned error was because http.StatusNotModified
5377// was returned.
5378func (c *ProjectsLocationsSourcesGetCall) Do(opts ...googleapi.CallOption) (*Source, error) {
5379	gensupport.SetOptions(c.urlParams_, opts...)
5380	res, err := c.doRequest("json")
5381	if res != nil && res.StatusCode == http.StatusNotModified {
5382		if res.Body != nil {
5383			res.Body.Close()
5384		}
5385		return nil, &googleapi.Error{
5386			Code:   res.StatusCode,
5387			Header: res.Header,
5388		}
5389	}
5390	if err != nil {
5391		return nil, err
5392	}
5393	defer googleapi.CloseBody(res)
5394	if err := googleapi.CheckResponse(res); err != nil {
5395		return nil, err
5396	}
5397	ret := &Source{
5398		ServerResponse: googleapi.ServerResponse{
5399			Header:         res.Header,
5400			HTTPStatusCode: res.StatusCode,
5401		},
5402	}
5403	target := &ret
5404	if err := gensupport.DecodeResponse(target, res); err != nil {
5405		return nil, err
5406	}
5407	return ret, nil
5408	// {
5409	//   "description": "Gets details of a single Source.",
5410	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}",
5411	//   "httpMethod": "GET",
5412	//   "id": "vmmigration.projects.locations.sources.get",
5413	//   "parameterOrder": [
5414	//     "name"
5415	//   ],
5416	//   "parameters": {
5417	//     "name": {
5418	//       "description": "Required. The Source name.",
5419	//       "location": "path",
5420	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
5421	//       "required": true,
5422	//       "type": "string"
5423	//     }
5424	//   },
5425	//   "path": "v1alpha1/{+name}",
5426	//   "response": {
5427	//     "$ref": "Source"
5428	//   },
5429	//   "scopes": [
5430	//     "https://www.googleapis.com/auth/cloud-platform"
5431	//   ]
5432	// }
5433
5434}
5435
5436// method id "vmmigration.projects.locations.sources.list":
5437
5438type ProjectsLocationsSourcesListCall struct {
5439	s            *Service
5440	parent       string
5441	urlParams_   gensupport.URLParams
5442	ifNoneMatch_ string
5443	ctx_         context.Context
5444	header_      http.Header
5445}
5446
5447// List: Lists Sources in a given project and location.
5448//
5449// - parent: The parent, which owns this collection of sources.
5450func (r *ProjectsLocationsSourcesService) List(parent string) *ProjectsLocationsSourcesListCall {
5451	c := &ProjectsLocationsSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5452	c.parent = parent
5453	return c
5454}
5455
5456// Filter sets the optional parameter "filter": The filter request.
5457func (c *ProjectsLocationsSourcesListCall) Filter(filter string) *ProjectsLocationsSourcesListCall {
5458	c.urlParams_.Set("filter", filter)
5459	return c
5460}
5461
5462// OrderBy sets the optional parameter "orderBy": the order by fields
5463// for the result.
5464func (c *ProjectsLocationsSourcesListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesListCall {
5465	c.urlParams_.Set("orderBy", orderBy)
5466	return c
5467}
5468
5469// PageSize sets the optional parameter "pageSize": The maximum number
5470// of sources to return. The service may return fewer than this value.
5471// If unspecified, at most 500 sources will be returned. The maximum
5472// value is 1000; values above 1000 will be coerced to 1000.
5473func (c *ProjectsLocationsSourcesListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesListCall {
5474	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5475	return c
5476}
5477
5478// PageToken sets the optional parameter "pageToken": Required. A page
5479// token, received from a previous `ListSources` call. Provide this to
5480// retrieve the subsequent page. When paginating, all other parameters
5481// provided to `ListSources` must match the call that provided the page
5482// token.
5483func (c *ProjectsLocationsSourcesListCall) PageToken(pageToken string) *ProjectsLocationsSourcesListCall {
5484	c.urlParams_.Set("pageToken", pageToken)
5485	return c
5486}
5487
5488// Fields allows partial responses to be retrieved. See
5489// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5490// for more information.
5491func (c *ProjectsLocationsSourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesListCall {
5492	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5493	return c
5494}
5495
5496// IfNoneMatch sets the optional parameter which makes the operation
5497// fail if the object's ETag matches the given value. This is useful for
5498// getting updates only after the object has changed since the last
5499// request. Use googleapi.IsNotModified to check whether the response
5500// error from Do is the result of In-None-Match.
5501func (c *ProjectsLocationsSourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesListCall {
5502	c.ifNoneMatch_ = entityTag
5503	return c
5504}
5505
5506// Context sets the context to be used in this call's Do method. Any
5507// pending HTTP request will be aborted if the provided context is
5508// canceled.
5509func (c *ProjectsLocationsSourcesListCall) Context(ctx context.Context) *ProjectsLocationsSourcesListCall {
5510	c.ctx_ = ctx
5511	return c
5512}
5513
5514// Header returns an http.Header that can be modified by the caller to
5515// add HTTP headers to the request.
5516func (c *ProjectsLocationsSourcesListCall) Header() http.Header {
5517	if c.header_ == nil {
5518		c.header_ = make(http.Header)
5519	}
5520	return c.header_
5521}
5522
5523func (c *ProjectsLocationsSourcesListCall) doRequest(alt string) (*http.Response, error) {
5524	reqHeaders := make(http.Header)
5525	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5526	for k, v := range c.header_ {
5527		reqHeaders[k] = v
5528	}
5529	reqHeaders.Set("User-Agent", c.s.userAgent())
5530	if c.ifNoneMatch_ != "" {
5531		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5532	}
5533	var body io.Reader = nil
5534	c.urlParams_.Set("alt", alt)
5535	c.urlParams_.Set("prettyPrint", "false")
5536	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/sources")
5537	urls += "?" + c.urlParams_.Encode()
5538	req, err := http.NewRequest("GET", urls, body)
5539	if err != nil {
5540		return nil, err
5541	}
5542	req.Header = reqHeaders
5543	googleapi.Expand(req.URL, map[string]string{
5544		"parent": c.parent,
5545	})
5546	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5547}
5548
5549// Do executes the "vmmigration.projects.locations.sources.list" call.
5550// Exactly one of *ListSourcesResponse or error will be non-nil. Any
5551// non-2xx status code is an error. Response headers are in either
5552// *ListSourcesResponse.ServerResponse.Header or (if a response was
5553// returned at all) in error.(*googleapi.Error).Header. Use
5554// googleapi.IsNotModified to check whether the returned error was
5555// because http.StatusNotModified was returned.
5556func (c *ProjectsLocationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesResponse, error) {
5557	gensupport.SetOptions(c.urlParams_, opts...)
5558	res, err := c.doRequest("json")
5559	if res != nil && res.StatusCode == http.StatusNotModified {
5560		if res.Body != nil {
5561			res.Body.Close()
5562		}
5563		return nil, &googleapi.Error{
5564			Code:   res.StatusCode,
5565			Header: res.Header,
5566		}
5567	}
5568	if err != nil {
5569		return nil, err
5570	}
5571	defer googleapi.CloseBody(res)
5572	if err := googleapi.CheckResponse(res); err != nil {
5573		return nil, err
5574	}
5575	ret := &ListSourcesResponse{
5576		ServerResponse: googleapi.ServerResponse{
5577			Header:         res.Header,
5578			HTTPStatusCode: res.StatusCode,
5579		},
5580	}
5581	target := &ret
5582	if err := gensupport.DecodeResponse(target, res); err != nil {
5583		return nil, err
5584	}
5585	return ret, nil
5586	// {
5587	//   "description": "Lists Sources in a given project and location.",
5588	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources",
5589	//   "httpMethod": "GET",
5590	//   "id": "vmmigration.projects.locations.sources.list",
5591	//   "parameterOrder": [
5592	//     "parent"
5593	//   ],
5594	//   "parameters": {
5595	//     "filter": {
5596	//       "description": "Optional. The filter request.",
5597	//       "location": "query",
5598	//       "type": "string"
5599	//     },
5600	//     "orderBy": {
5601	//       "description": "Optional. the order by fields for the result.",
5602	//       "location": "query",
5603	//       "type": "string"
5604	//     },
5605	//     "pageSize": {
5606	//       "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.",
5607	//       "format": "int32",
5608	//       "location": "query",
5609	//       "type": "integer"
5610	//     },
5611	//     "pageToken": {
5612	//       "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.",
5613	//       "location": "query",
5614	//       "type": "string"
5615	//     },
5616	//     "parent": {
5617	//       "description": "Required. The parent, which owns this collection of sources.",
5618	//       "location": "path",
5619	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
5620	//       "required": true,
5621	//       "type": "string"
5622	//     }
5623	//   },
5624	//   "path": "v1alpha1/{+parent}/sources",
5625	//   "response": {
5626	//     "$ref": "ListSourcesResponse"
5627	//   },
5628	//   "scopes": [
5629	//     "https://www.googleapis.com/auth/cloud-platform"
5630	//   ]
5631	// }
5632
5633}
5634
5635// Pages invokes f for each page of results.
5636// A non-nil error returned from f will halt the iteration.
5637// The provided context supersedes any context provided to the Context method.
5638func (c *ProjectsLocationsSourcesListCall) Pages(ctx context.Context, f func(*ListSourcesResponse) error) error {
5639	c.ctx_ = ctx
5640	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5641	for {
5642		x, err := c.Do()
5643		if err != nil {
5644			return err
5645		}
5646		if err := f(x); err != nil {
5647			return err
5648		}
5649		if x.NextPageToken == "" {
5650			return nil
5651		}
5652		c.PageToken(x.NextPageToken)
5653	}
5654}
5655
5656// method id "vmmigration.projects.locations.sources.patch":
5657
5658type ProjectsLocationsSourcesPatchCall struct {
5659	s          *Service
5660	name       string
5661	source     *Source
5662	urlParams_ gensupport.URLParams
5663	ctx_       context.Context
5664	header_    http.Header
5665}
5666
5667// Patch: Updates the parameters of a single Source.
5668//
5669// - name: Output only. The Source name.
5670func (r *ProjectsLocationsSourcesService) Patch(name string, source *Source) *ProjectsLocationsSourcesPatchCall {
5671	c := &ProjectsLocationsSourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5672	c.name = name
5673	c.source = source
5674	return c
5675}
5676
5677// RequestId sets the optional parameter "requestId": A request ID to
5678// identify requests. Specify a unique request ID so that if you must
5679// retry your request, the server will know to ignore the request if it
5680// has already been completed. The server will guarantee that for at
5681// least 60 minutes since the first request. For example, consider a
5682// situation where you make an initial request and t he request times
5683// out. If you make the request again with the same request ID, the
5684// server can check if original operation with the same request ID was
5685// received, and if so, will ignore the second request. This prevents
5686// clients from accidentally creating duplicate commitments. The request
5687// ID must be a valid UUID with the exception that zero UUID is not
5688// supported (00000000-0000-0000-0000-000000000000).
5689func (c *ProjectsLocationsSourcesPatchCall) RequestId(requestId string) *ProjectsLocationsSourcesPatchCall {
5690	c.urlParams_.Set("requestId", requestId)
5691	return c
5692}
5693
5694// UpdateMask sets the optional parameter "updateMask": Field mask is
5695// used to specify the fields to be overwritten in the Source resource
5696// by the update. The fields specified in the update_mask are relative
5697// to the resource, not the full request. A field will be overwritten if
5698// it is in the mask. If the user does not provide a mask then all
5699// fields will be overwritten.
5700func (c *ProjectsLocationsSourcesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSourcesPatchCall {
5701	c.urlParams_.Set("updateMask", updateMask)
5702	return c
5703}
5704
5705// Fields allows partial responses to be retrieved. See
5706// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5707// for more information.
5708func (c *ProjectsLocationsSourcesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesPatchCall {
5709	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5710	return c
5711}
5712
5713// Context sets the context to be used in this call's Do method. Any
5714// pending HTTP request will be aborted if the provided context is
5715// canceled.
5716func (c *ProjectsLocationsSourcesPatchCall) Context(ctx context.Context) *ProjectsLocationsSourcesPatchCall {
5717	c.ctx_ = ctx
5718	return c
5719}
5720
5721// Header returns an http.Header that can be modified by the caller to
5722// add HTTP headers to the request.
5723func (c *ProjectsLocationsSourcesPatchCall) Header() http.Header {
5724	if c.header_ == nil {
5725		c.header_ = make(http.Header)
5726	}
5727	return c.header_
5728}
5729
5730func (c *ProjectsLocationsSourcesPatchCall) doRequest(alt string) (*http.Response, error) {
5731	reqHeaders := make(http.Header)
5732	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5733	for k, v := range c.header_ {
5734		reqHeaders[k] = v
5735	}
5736	reqHeaders.Set("User-Agent", c.s.userAgent())
5737	var body io.Reader = nil
5738	body, err := googleapi.WithoutDataWrapper.JSONReader(c.source)
5739	if err != nil {
5740		return nil, err
5741	}
5742	reqHeaders.Set("Content-Type", "application/json")
5743	c.urlParams_.Set("alt", alt)
5744	c.urlParams_.Set("prettyPrint", "false")
5745	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
5746	urls += "?" + c.urlParams_.Encode()
5747	req, err := http.NewRequest("PATCH", urls, body)
5748	if err != nil {
5749		return nil, err
5750	}
5751	req.Header = reqHeaders
5752	googleapi.Expand(req.URL, map[string]string{
5753		"name": c.name,
5754	})
5755	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5756}
5757
5758// Do executes the "vmmigration.projects.locations.sources.patch" call.
5759// Exactly one of *Operation or error will be non-nil. Any non-2xx
5760// status code is an error. Response headers are in either
5761// *Operation.ServerResponse.Header or (if a response was returned at
5762// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5763// to check whether the returned error was because
5764// http.StatusNotModified was returned.
5765func (c *ProjectsLocationsSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5766	gensupport.SetOptions(c.urlParams_, opts...)
5767	res, err := c.doRequest("json")
5768	if res != nil && res.StatusCode == http.StatusNotModified {
5769		if res.Body != nil {
5770			res.Body.Close()
5771		}
5772		return nil, &googleapi.Error{
5773			Code:   res.StatusCode,
5774			Header: res.Header,
5775		}
5776	}
5777	if err != nil {
5778		return nil, err
5779	}
5780	defer googleapi.CloseBody(res)
5781	if err := googleapi.CheckResponse(res); err != nil {
5782		return nil, err
5783	}
5784	ret := &Operation{
5785		ServerResponse: googleapi.ServerResponse{
5786			Header:         res.Header,
5787			HTTPStatusCode: res.StatusCode,
5788		},
5789	}
5790	target := &ret
5791	if err := gensupport.DecodeResponse(target, res); err != nil {
5792		return nil, err
5793	}
5794	return ret, nil
5795	// {
5796	//   "description": "Updates the parameters of a single Source.",
5797	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}",
5798	//   "httpMethod": "PATCH",
5799	//   "id": "vmmigration.projects.locations.sources.patch",
5800	//   "parameterOrder": [
5801	//     "name"
5802	//   ],
5803	//   "parameters": {
5804	//     "name": {
5805	//       "description": "Output only. The Source name.",
5806	//       "location": "path",
5807	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
5808	//       "required": true,
5809	//       "type": "string"
5810	//     },
5811	//     "requestId": {
5812	//       "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).",
5813	//       "location": "query",
5814	//       "type": "string"
5815	//     },
5816	//     "updateMask": {
5817	//       "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.",
5818	//       "format": "google-fieldmask",
5819	//       "location": "query",
5820	//       "type": "string"
5821	//     }
5822	//   },
5823	//   "path": "v1alpha1/{+name}",
5824	//   "request": {
5825	//     "$ref": "Source"
5826	//   },
5827	//   "response": {
5828	//     "$ref": "Operation"
5829	//   },
5830	//   "scopes": [
5831	//     "https://www.googleapis.com/auth/cloud-platform"
5832	//   ]
5833	// }
5834
5835}
5836
5837// method id "vmmigration.projects.locations.sources.datacenterConnectors.create":
5838
5839type ProjectsLocationsSourcesDatacenterConnectorsCreateCall struct {
5840	s                   *Service
5841	parent              string
5842	datacenterconnector *DatacenterConnector
5843	urlParams_          gensupport.URLParams
5844	ctx_                context.Context
5845	header_             http.Header
5846}
5847
5848// Create: Creates a new DatacenterConnector in a given Source.
5849//
5850// - parent: The DatacenterConnector's parent. Required. The Source in
5851//   where the new DatacenterConnector will be created. For example:
5852//   `projects/my-project/locations/us-central1/sources/my-source`.
5853func (r *ProjectsLocationsSourcesDatacenterConnectorsService) Create(parent string, datacenterconnector *DatacenterConnector) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
5854	c := &ProjectsLocationsSourcesDatacenterConnectorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5855	c.parent = parent
5856	c.datacenterconnector = datacenterconnector
5857	return c
5858}
5859
5860// DatacenterConnectorId sets the optional parameter
5861// "datacenterConnectorId": Required. The datacenterConnector
5862// identifier.
5863func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) DatacenterConnectorId(datacenterConnectorId string) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
5864	c.urlParams_.Set("datacenterConnectorId", datacenterConnectorId)
5865	return c
5866}
5867
5868// RequestId sets the optional parameter "requestId": A request ID to
5869// identify requests. Specify a unique request ID so that if you must
5870// retry your request, the server will know to ignore the request if it
5871// has already been completed. The server will guarantee that for at
5872// least 60 minutes since the first request. For example, consider a
5873// situation where you make an initial request and t he request times
5874// out. If you make the request again with the same request ID, the
5875// server can check if original operation with the same request ID was
5876// received, and if so, will ignore the second request. This prevents
5877// clients from accidentally creating duplicate commitments. The request
5878// ID must be a valid UUID with the exception that zero UUID is not
5879// supported (00000000-0000-0000-0000-000000000000).
5880func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
5881	c.urlParams_.Set("requestId", requestId)
5882	return c
5883}
5884
5885// Fields allows partial responses to be retrieved. See
5886// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5887// for more information.
5888func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
5889	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5890	return c
5891}
5892
5893// Context sets the context to be used in this call's Do method. Any
5894// pending HTTP request will be aborted if the provided context is
5895// canceled.
5896func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
5897	c.ctx_ = ctx
5898	return c
5899}
5900
5901// Header returns an http.Header that can be modified by the caller to
5902// add HTTP headers to the request.
5903func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Header() http.Header {
5904	if c.header_ == nil {
5905		c.header_ = make(http.Header)
5906	}
5907	return c.header_
5908}
5909
5910func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) doRequest(alt string) (*http.Response, error) {
5911	reqHeaders := make(http.Header)
5912	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
5913	for k, v := range c.header_ {
5914		reqHeaders[k] = v
5915	}
5916	reqHeaders.Set("User-Agent", c.s.userAgent())
5917	var body io.Reader = nil
5918	body, err := googleapi.WithoutDataWrapper.JSONReader(c.datacenterconnector)
5919	if err != nil {
5920		return nil, err
5921	}
5922	reqHeaders.Set("Content-Type", "application/json")
5923	c.urlParams_.Set("alt", alt)
5924	c.urlParams_.Set("prettyPrint", "false")
5925	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/datacenterConnectors")
5926	urls += "?" + c.urlParams_.Encode()
5927	req, err := http.NewRequest("POST", urls, body)
5928	if err != nil {
5929		return nil, err
5930	}
5931	req.Header = reqHeaders
5932	googleapi.Expand(req.URL, map[string]string{
5933		"parent": c.parent,
5934	})
5935	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5936}
5937
5938// Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.create" call.
5939// Exactly one of *Operation or error will be non-nil. Any non-2xx
5940// status code is an error. Response headers are in either
5941// *Operation.ServerResponse.Header or (if a response was returned at
5942// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5943// to check whether the returned error was because
5944// http.StatusNotModified was returned.
5945func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5946	gensupport.SetOptions(c.urlParams_, opts...)
5947	res, err := c.doRequest("json")
5948	if res != nil && res.StatusCode == http.StatusNotModified {
5949		if res.Body != nil {
5950			res.Body.Close()
5951		}
5952		return nil, &googleapi.Error{
5953			Code:   res.StatusCode,
5954			Header: res.Header,
5955		}
5956	}
5957	if err != nil {
5958		return nil, err
5959	}
5960	defer googleapi.CloseBody(res)
5961	if err := googleapi.CheckResponse(res); err != nil {
5962		return nil, err
5963	}
5964	ret := &Operation{
5965		ServerResponse: googleapi.ServerResponse{
5966			Header:         res.Header,
5967			HTTPStatusCode: res.StatusCode,
5968		},
5969	}
5970	target := &ret
5971	if err := gensupport.DecodeResponse(target, res); err != nil {
5972		return nil, err
5973	}
5974	return ret, nil
5975	// {
5976	//   "description": "Creates a new DatacenterConnector in a given Source.",
5977	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors",
5978	//   "httpMethod": "POST",
5979	//   "id": "vmmigration.projects.locations.sources.datacenterConnectors.create",
5980	//   "parameterOrder": [
5981	//     "parent"
5982	//   ],
5983	//   "parameters": {
5984	//     "datacenterConnectorId": {
5985	//       "description": "Required. The datacenterConnector identifier.",
5986	//       "location": "query",
5987	//       "type": "string"
5988	//     },
5989	//     "parent": {
5990	//       "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`",
5991	//       "location": "path",
5992	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
5993	//       "required": true,
5994	//       "type": "string"
5995	//     },
5996	//     "requestId": {
5997	//       "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).",
5998	//       "location": "query",
5999	//       "type": "string"
6000	//     }
6001	//   },
6002	//   "path": "v1alpha1/{+parent}/datacenterConnectors",
6003	//   "request": {
6004	//     "$ref": "DatacenterConnector"
6005	//   },
6006	//   "response": {
6007	//     "$ref": "Operation"
6008	//   },
6009	//   "scopes": [
6010	//     "https://www.googleapis.com/auth/cloud-platform"
6011	//   ]
6012	// }
6013
6014}
6015
6016// method id "vmmigration.projects.locations.sources.datacenterConnectors.delete":
6017
6018type ProjectsLocationsSourcesDatacenterConnectorsDeleteCall struct {
6019	s          *Service
6020	name       string
6021	urlParams_ gensupport.URLParams
6022	ctx_       context.Context
6023	header_    http.Header
6024}
6025
6026// Delete: Deletes a single DatacenterConnector.
6027//
6028// - name: The DatacenterConnector name.
6029func (r *ProjectsLocationsSourcesDatacenterConnectorsService) Delete(name string) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
6030	c := &ProjectsLocationsSourcesDatacenterConnectorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6031	c.name = name
6032	return c
6033}
6034
6035// RequestId sets the optional parameter "requestId": A request ID to
6036// identify requests. Specify a unique request ID so that if you must
6037// retry your request, the server will know to ignore the request if it
6038// has already been completed. The server will guarantee that for at
6039// least 60 minutes after the first request. For example, consider a
6040// situation where you make an initial request and t he request times
6041// out. If you make the request again with the same request ID, the
6042// server can check if original operation with the same request ID was
6043// received, and if so, will ignore the second request. This prevents
6044// clients from accidentally creating duplicate commitments. The request
6045// ID must be a valid UUID with the exception that zero UUID is not
6046// supported (00000000-0000-0000-0000-000000000000).
6047func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
6048	c.urlParams_.Set("requestId", requestId)
6049	return c
6050}
6051
6052// Fields allows partial responses to be retrieved. See
6053// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6054// for more information.
6055func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
6056	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6057	return c
6058}
6059
6060// Context sets the context to be used in this call's Do method. Any
6061// pending HTTP request will be aborted if the provided context is
6062// canceled.
6063func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
6064	c.ctx_ = ctx
6065	return c
6066}
6067
6068// Header returns an http.Header that can be modified by the caller to
6069// add HTTP headers to the request.
6070func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Header() http.Header {
6071	if c.header_ == nil {
6072		c.header_ = make(http.Header)
6073	}
6074	return c.header_
6075}
6076
6077func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) doRequest(alt string) (*http.Response, error) {
6078	reqHeaders := make(http.Header)
6079	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6080	for k, v := range c.header_ {
6081		reqHeaders[k] = v
6082	}
6083	reqHeaders.Set("User-Agent", c.s.userAgent())
6084	var body io.Reader = nil
6085	c.urlParams_.Set("alt", alt)
6086	c.urlParams_.Set("prettyPrint", "false")
6087	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
6088	urls += "?" + c.urlParams_.Encode()
6089	req, err := http.NewRequest("DELETE", urls, body)
6090	if err != nil {
6091		return nil, err
6092	}
6093	req.Header = reqHeaders
6094	googleapi.Expand(req.URL, map[string]string{
6095		"name": c.name,
6096	})
6097	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6098}
6099
6100// Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.delete" call.
6101// Exactly one of *Operation or error will be non-nil. Any non-2xx
6102// status code is an error. Response headers are in either
6103// *Operation.ServerResponse.Header or (if a response was returned at
6104// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6105// to check whether the returned error was because
6106// http.StatusNotModified was returned.
6107func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6108	gensupport.SetOptions(c.urlParams_, opts...)
6109	res, err := c.doRequest("json")
6110	if res != nil && res.StatusCode == http.StatusNotModified {
6111		if res.Body != nil {
6112			res.Body.Close()
6113		}
6114		return nil, &googleapi.Error{
6115			Code:   res.StatusCode,
6116			Header: res.Header,
6117		}
6118	}
6119	if err != nil {
6120		return nil, err
6121	}
6122	defer googleapi.CloseBody(res)
6123	if err := googleapi.CheckResponse(res); err != nil {
6124		return nil, err
6125	}
6126	ret := &Operation{
6127		ServerResponse: googleapi.ServerResponse{
6128			Header:         res.Header,
6129			HTTPStatusCode: res.StatusCode,
6130		},
6131	}
6132	target := &ret
6133	if err := gensupport.DecodeResponse(target, res); err != nil {
6134		return nil, err
6135	}
6136	return ret, nil
6137	// {
6138	//   "description": "Deletes a single DatacenterConnector.",
6139	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors/{datacenterConnectorsId}",
6140	//   "httpMethod": "DELETE",
6141	//   "id": "vmmigration.projects.locations.sources.datacenterConnectors.delete",
6142	//   "parameterOrder": [
6143	//     "name"
6144	//   ],
6145	//   "parameters": {
6146	//     "name": {
6147	//       "description": "Required. The DatacenterConnector name.",
6148	//       "location": "path",
6149	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/datacenterConnectors/[^/]+$",
6150	//       "required": true,
6151	//       "type": "string"
6152	//     },
6153	//     "requestId": {
6154	//       "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).",
6155	//       "location": "query",
6156	//       "type": "string"
6157	//     }
6158	//   },
6159	//   "path": "v1alpha1/{+name}",
6160	//   "response": {
6161	//     "$ref": "Operation"
6162	//   },
6163	//   "scopes": [
6164	//     "https://www.googleapis.com/auth/cloud-platform"
6165	//   ]
6166	// }
6167
6168}
6169
6170// method id "vmmigration.projects.locations.sources.datacenterConnectors.get":
6171
6172type ProjectsLocationsSourcesDatacenterConnectorsGetCall struct {
6173	s            *Service
6174	name         string
6175	urlParams_   gensupport.URLParams
6176	ifNoneMatch_ string
6177	ctx_         context.Context
6178	header_      http.Header
6179}
6180
6181// Get: Gets details of a single DatacenterConnector.
6182//
6183// - name: The name of the DatacenterConnector.
6184func (r *ProjectsLocationsSourcesDatacenterConnectorsService) Get(name string) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
6185	c := &ProjectsLocationsSourcesDatacenterConnectorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6186	c.name = name
6187	return c
6188}
6189
6190// Fields allows partial responses to be retrieved. See
6191// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6192// for more information.
6193func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
6194	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6195	return c
6196}
6197
6198// IfNoneMatch sets the optional parameter which makes the operation
6199// fail if the object's ETag matches the given value. This is useful for
6200// getting updates only after the object has changed since the last
6201// request. Use googleapi.IsNotModified to check whether the response
6202// error from Do is the result of In-None-Match.
6203func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
6204	c.ifNoneMatch_ = entityTag
6205	return c
6206}
6207
6208// Context sets the context to be used in this call's Do method. Any
6209// pending HTTP request will be aborted if the provided context is
6210// canceled.
6211func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
6212	c.ctx_ = ctx
6213	return c
6214}
6215
6216// Header returns an http.Header that can be modified by the caller to
6217// add HTTP headers to the request.
6218func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Header() http.Header {
6219	if c.header_ == nil {
6220		c.header_ = make(http.Header)
6221	}
6222	return c.header_
6223}
6224
6225func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) doRequest(alt string) (*http.Response, error) {
6226	reqHeaders := make(http.Header)
6227	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6228	for k, v := range c.header_ {
6229		reqHeaders[k] = v
6230	}
6231	reqHeaders.Set("User-Agent", c.s.userAgent())
6232	if c.ifNoneMatch_ != "" {
6233		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6234	}
6235	var body io.Reader = nil
6236	c.urlParams_.Set("alt", alt)
6237	c.urlParams_.Set("prettyPrint", "false")
6238	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
6239	urls += "?" + c.urlParams_.Encode()
6240	req, err := http.NewRequest("GET", urls, body)
6241	if err != nil {
6242		return nil, err
6243	}
6244	req.Header = reqHeaders
6245	googleapi.Expand(req.URL, map[string]string{
6246		"name": c.name,
6247	})
6248	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6249}
6250
6251// Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.get" call.
6252// Exactly one of *DatacenterConnector or error will be non-nil. Any
6253// non-2xx status code is an error. Response headers are in either
6254// *DatacenterConnector.ServerResponse.Header or (if a response was
6255// returned at all) in error.(*googleapi.Error).Header. Use
6256// googleapi.IsNotModified to check whether the returned error was
6257// because http.StatusNotModified was returned.
6258func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Do(opts ...googleapi.CallOption) (*DatacenterConnector, error) {
6259	gensupport.SetOptions(c.urlParams_, opts...)
6260	res, err := c.doRequest("json")
6261	if res != nil && res.StatusCode == http.StatusNotModified {
6262		if res.Body != nil {
6263			res.Body.Close()
6264		}
6265		return nil, &googleapi.Error{
6266			Code:   res.StatusCode,
6267			Header: res.Header,
6268		}
6269	}
6270	if err != nil {
6271		return nil, err
6272	}
6273	defer googleapi.CloseBody(res)
6274	if err := googleapi.CheckResponse(res); err != nil {
6275		return nil, err
6276	}
6277	ret := &DatacenterConnector{
6278		ServerResponse: googleapi.ServerResponse{
6279			Header:         res.Header,
6280			HTTPStatusCode: res.StatusCode,
6281		},
6282	}
6283	target := &ret
6284	if err := gensupport.DecodeResponse(target, res); err != nil {
6285		return nil, err
6286	}
6287	return ret, nil
6288	// {
6289	//   "description": "Gets details of a single DatacenterConnector.",
6290	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors/{datacenterConnectorsId}",
6291	//   "httpMethod": "GET",
6292	//   "id": "vmmigration.projects.locations.sources.datacenterConnectors.get",
6293	//   "parameterOrder": [
6294	//     "name"
6295	//   ],
6296	//   "parameters": {
6297	//     "name": {
6298	//       "description": "Required. The name of the DatacenterConnector.",
6299	//       "location": "path",
6300	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/datacenterConnectors/[^/]+$",
6301	//       "required": true,
6302	//       "type": "string"
6303	//     }
6304	//   },
6305	//   "path": "v1alpha1/{+name}",
6306	//   "response": {
6307	//     "$ref": "DatacenterConnector"
6308	//   },
6309	//   "scopes": [
6310	//     "https://www.googleapis.com/auth/cloud-platform"
6311	//   ]
6312	// }
6313
6314}
6315
6316// method id "vmmigration.projects.locations.sources.datacenterConnectors.list":
6317
6318type ProjectsLocationsSourcesDatacenterConnectorsListCall struct {
6319	s            *Service
6320	parent       string
6321	urlParams_   gensupport.URLParams
6322	ifNoneMatch_ string
6323	ctx_         context.Context
6324	header_      http.Header
6325}
6326
6327// List: Lists DatacenterConnectors in a given Source.
6328//
6329// - parent: The parent, which owns this collection of connectors.
6330func (r *ProjectsLocationsSourcesDatacenterConnectorsService) List(parent string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6331	c := &ProjectsLocationsSourcesDatacenterConnectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6332	c.parent = parent
6333	return c
6334}
6335
6336// Filter sets the optional parameter "filter": The filter request.
6337func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Filter(filter string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6338	c.urlParams_.Set("filter", filter)
6339	return c
6340}
6341
6342// OrderBy sets the optional parameter "orderBy": the order by fields
6343// for the result.
6344func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6345	c.urlParams_.Set("orderBy", orderBy)
6346	return c
6347}
6348
6349// PageSize sets the optional parameter "pageSize": The maximum number
6350// of connectors to return. The service may return fewer than this
6351// value. If unspecified, at most 500 sources will be returned. The
6352// maximum value is 1000; values above 1000 will be coerced to 1000.
6353func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6354	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6355	return c
6356}
6357
6358// PageToken sets the optional parameter "pageToken": Required. A page
6359// token, received from a previous `ListDatacenterConnectors` call.
6360// Provide this to retrieve the subsequent page. When paginating, all
6361// other parameters provided to `ListDatacenterConnectors` must match
6362// the call that provided the page token.
6363func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6364	c.urlParams_.Set("pageToken", pageToken)
6365	return c
6366}
6367
6368// Fields allows partial responses to be retrieved. See
6369// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6370// for more information.
6371func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6372	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6373	return c
6374}
6375
6376// IfNoneMatch sets the optional parameter which makes the operation
6377// fail if the object's ETag matches the given value. This is useful for
6378// getting updates only after the object has changed since the last
6379// request. Use googleapi.IsNotModified to check whether the response
6380// error from Do is the result of In-None-Match.
6381func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6382	c.ifNoneMatch_ = entityTag
6383	return c
6384}
6385
6386// Context sets the context to be used in this call's Do method. Any
6387// pending HTTP request will be aborted if the provided context is
6388// canceled.
6389func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
6390	c.ctx_ = ctx
6391	return c
6392}
6393
6394// Header returns an http.Header that can be modified by the caller to
6395// add HTTP headers to the request.
6396func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Header() http.Header {
6397	if c.header_ == nil {
6398		c.header_ = make(http.Header)
6399	}
6400	return c.header_
6401}
6402
6403func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) doRequest(alt string) (*http.Response, error) {
6404	reqHeaders := make(http.Header)
6405	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6406	for k, v := range c.header_ {
6407		reqHeaders[k] = v
6408	}
6409	reqHeaders.Set("User-Agent", c.s.userAgent())
6410	if c.ifNoneMatch_ != "" {
6411		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6412	}
6413	var body io.Reader = nil
6414	c.urlParams_.Set("alt", alt)
6415	c.urlParams_.Set("prettyPrint", "false")
6416	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/datacenterConnectors")
6417	urls += "?" + c.urlParams_.Encode()
6418	req, err := http.NewRequest("GET", urls, body)
6419	if err != nil {
6420		return nil, err
6421	}
6422	req.Header = reqHeaders
6423	googleapi.Expand(req.URL, map[string]string{
6424		"parent": c.parent,
6425	})
6426	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6427}
6428
6429// Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.list" call.
6430// Exactly one of *ListDatacenterConnectorsResponse or error will be
6431// non-nil. Any non-2xx status code is an error. Response headers are in
6432// either *ListDatacenterConnectorsResponse.ServerResponse.Header or (if
6433// a response was returned at all) in error.(*googleapi.Error).Header.
6434// Use googleapi.IsNotModified to check whether the returned error was
6435// because http.StatusNotModified was returned.
6436func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Do(opts ...googleapi.CallOption) (*ListDatacenterConnectorsResponse, error) {
6437	gensupport.SetOptions(c.urlParams_, opts...)
6438	res, err := c.doRequest("json")
6439	if res != nil && res.StatusCode == http.StatusNotModified {
6440		if res.Body != nil {
6441			res.Body.Close()
6442		}
6443		return nil, &googleapi.Error{
6444			Code:   res.StatusCode,
6445			Header: res.Header,
6446		}
6447	}
6448	if err != nil {
6449		return nil, err
6450	}
6451	defer googleapi.CloseBody(res)
6452	if err := googleapi.CheckResponse(res); err != nil {
6453		return nil, err
6454	}
6455	ret := &ListDatacenterConnectorsResponse{
6456		ServerResponse: googleapi.ServerResponse{
6457			Header:         res.Header,
6458			HTTPStatusCode: res.StatusCode,
6459		},
6460	}
6461	target := &ret
6462	if err := gensupport.DecodeResponse(target, res); err != nil {
6463		return nil, err
6464	}
6465	return ret, nil
6466	// {
6467	//   "description": "Lists DatacenterConnectors in a given Source.",
6468	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors",
6469	//   "httpMethod": "GET",
6470	//   "id": "vmmigration.projects.locations.sources.datacenterConnectors.list",
6471	//   "parameterOrder": [
6472	//     "parent"
6473	//   ],
6474	//   "parameters": {
6475	//     "filter": {
6476	//       "description": "Optional. The filter request.",
6477	//       "location": "query",
6478	//       "type": "string"
6479	//     },
6480	//     "orderBy": {
6481	//       "description": "Optional. the order by fields for the result.",
6482	//       "location": "query",
6483	//       "type": "string"
6484	//     },
6485	//     "pageSize": {
6486	//       "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.",
6487	//       "format": "int32",
6488	//       "location": "query",
6489	//       "type": "integer"
6490	//     },
6491	//     "pageToken": {
6492	//       "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.",
6493	//       "location": "query",
6494	//       "type": "string"
6495	//     },
6496	//     "parent": {
6497	//       "description": "Required. The parent, which owns this collection of connectors.",
6498	//       "location": "path",
6499	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
6500	//       "required": true,
6501	//       "type": "string"
6502	//     }
6503	//   },
6504	//   "path": "v1alpha1/{+parent}/datacenterConnectors",
6505	//   "response": {
6506	//     "$ref": "ListDatacenterConnectorsResponse"
6507	//   },
6508	//   "scopes": [
6509	//     "https://www.googleapis.com/auth/cloud-platform"
6510	//   ]
6511	// }
6512
6513}
6514
6515// Pages invokes f for each page of results.
6516// A non-nil error returned from f will halt the iteration.
6517// The provided context supersedes any context provided to the Context method.
6518func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Pages(ctx context.Context, f func(*ListDatacenterConnectorsResponse) error) error {
6519	c.ctx_ = ctx
6520	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6521	for {
6522		x, err := c.Do()
6523		if err != nil {
6524			return err
6525		}
6526		if err := f(x); err != nil {
6527			return err
6528		}
6529		if x.NextPageToken == "" {
6530			return nil
6531		}
6532		c.PageToken(x.NextPageToken)
6533	}
6534}
6535
6536// method id "vmmigration.projects.locations.sources.migratingVms.create":
6537
6538type ProjectsLocationsSourcesMigratingVmsCreateCall struct {
6539	s           *Service
6540	parent      string
6541	migratingvm *MigratingVm
6542	urlParams_  gensupport.URLParams
6543	ctx_        context.Context
6544	header_     http.Header
6545}
6546
6547// Create: Creates a new MigratingVm in a given Source.
6548//
6549// - parent: The MigratingVm's parent.
6550func (r *ProjectsLocationsSourcesMigratingVmsService) Create(parent string, migratingvm *MigratingVm) *ProjectsLocationsSourcesMigratingVmsCreateCall {
6551	c := &ProjectsLocationsSourcesMigratingVmsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6552	c.parent = parent
6553	c.migratingvm = migratingvm
6554	return c
6555}
6556
6557// MigratingVmId sets the optional parameter "migratingVmId": Required.
6558// The migratingVm identifier.
6559func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) MigratingVmId(migratingVmId string) *ProjectsLocationsSourcesMigratingVmsCreateCall {
6560	c.urlParams_.Set("migratingVmId", migratingVmId)
6561	return c
6562}
6563
6564// RequestId sets the optional parameter "requestId": A request ID to
6565// identify requests. Specify a unique request ID so that if you must
6566// retry your request, the server will know to ignore the request if it
6567// has already been completed. The server will guarantee that for at
6568// least 60 minutes since the first request. For example, consider a
6569// situation where you make an initial request and t he request times
6570// out. If you make the request again with the same request ID, the
6571// server can check if original operation with the same request ID was
6572// received, and if so, will ignore the second request. This prevents
6573// clients from accidentally creating duplicate commitments. The request
6574// ID must be a valid UUID with the exception that zero UUID is not
6575// supported (00000000-0000-0000-0000-000000000000).
6576func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsCreateCall {
6577	c.urlParams_.Set("requestId", requestId)
6578	return c
6579}
6580
6581// Fields allows partial responses to be retrieved. See
6582// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6583// for more information.
6584func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCreateCall {
6585	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6586	return c
6587}
6588
6589// Context sets the context to be used in this call's Do method. Any
6590// pending HTTP request will be aborted if the provided context is
6591// canceled.
6592func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCreateCall {
6593	c.ctx_ = ctx
6594	return c
6595}
6596
6597// Header returns an http.Header that can be modified by the caller to
6598// add HTTP headers to the request.
6599func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Header() http.Header {
6600	if c.header_ == nil {
6601		c.header_ = make(http.Header)
6602	}
6603	return c.header_
6604}
6605
6606func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) doRequest(alt string) (*http.Response, error) {
6607	reqHeaders := make(http.Header)
6608	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6609	for k, v := range c.header_ {
6610		reqHeaders[k] = v
6611	}
6612	reqHeaders.Set("User-Agent", c.s.userAgent())
6613	var body io.Reader = nil
6614	body, err := googleapi.WithoutDataWrapper.JSONReader(c.migratingvm)
6615	if err != nil {
6616		return nil, err
6617	}
6618	reqHeaders.Set("Content-Type", "application/json")
6619	c.urlParams_.Set("alt", alt)
6620	c.urlParams_.Set("prettyPrint", "false")
6621	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/migratingVms")
6622	urls += "?" + c.urlParams_.Encode()
6623	req, err := http.NewRequest("POST", urls, body)
6624	if err != nil {
6625		return nil, err
6626	}
6627	req.Header = reqHeaders
6628	googleapi.Expand(req.URL, map[string]string{
6629		"parent": c.parent,
6630	})
6631	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6632}
6633
6634// Do executes the "vmmigration.projects.locations.sources.migratingVms.create" call.
6635// Exactly one of *Operation or error will be non-nil. Any non-2xx
6636// status code is an error. Response headers are in either
6637// *Operation.ServerResponse.Header or (if a response was returned at
6638// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6639// to check whether the returned error was because
6640// http.StatusNotModified was returned.
6641func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6642	gensupport.SetOptions(c.urlParams_, opts...)
6643	res, err := c.doRequest("json")
6644	if res != nil && res.StatusCode == http.StatusNotModified {
6645		if res.Body != nil {
6646			res.Body.Close()
6647		}
6648		return nil, &googleapi.Error{
6649			Code:   res.StatusCode,
6650			Header: res.Header,
6651		}
6652	}
6653	if err != nil {
6654		return nil, err
6655	}
6656	defer googleapi.CloseBody(res)
6657	if err := googleapi.CheckResponse(res); err != nil {
6658		return nil, err
6659	}
6660	ret := &Operation{
6661		ServerResponse: googleapi.ServerResponse{
6662			Header:         res.Header,
6663			HTTPStatusCode: res.StatusCode,
6664		},
6665	}
6666	target := &ret
6667	if err := gensupport.DecodeResponse(target, res); err != nil {
6668		return nil, err
6669	}
6670	return ret, nil
6671	// {
6672	//   "description": "Creates a new MigratingVm in a given Source.",
6673	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms",
6674	//   "httpMethod": "POST",
6675	//   "id": "vmmigration.projects.locations.sources.migratingVms.create",
6676	//   "parameterOrder": [
6677	//     "parent"
6678	//   ],
6679	//   "parameters": {
6680	//     "migratingVmId": {
6681	//       "description": "Required. The migratingVm identifier.",
6682	//       "location": "query",
6683	//       "type": "string"
6684	//     },
6685	//     "parent": {
6686	//       "description": "Required. The MigratingVm's parent.",
6687	//       "location": "path",
6688	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
6689	//       "required": true,
6690	//       "type": "string"
6691	//     },
6692	//     "requestId": {
6693	//       "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).",
6694	//       "location": "query",
6695	//       "type": "string"
6696	//     }
6697	//   },
6698	//   "path": "v1alpha1/{+parent}/migratingVms",
6699	//   "request": {
6700	//     "$ref": "MigratingVm"
6701	//   },
6702	//   "response": {
6703	//     "$ref": "Operation"
6704	//   },
6705	//   "scopes": [
6706	//     "https://www.googleapis.com/auth/cloud-platform"
6707	//   ]
6708	// }
6709
6710}
6711
6712// method id "vmmigration.projects.locations.sources.migratingVms.delete":
6713
6714type ProjectsLocationsSourcesMigratingVmsDeleteCall struct {
6715	s          *Service
6716	name       string
6717	urlParams_ gensupport.URLParams
6718	ctx_       context.Context
6719	header_    http.Header
6720}
6721
6722// Delete: Deletes a single MigratingVm.
6723//
6724// - name: The name of the MigratingVm.
6725func (r *ProjectsLocationsSourcesMigratingVmsService) Delete(name string) *ProjectsLocationsSourcesMigratingVmsDeleteCall {
6726	c := &ProjectsLocationsSourcesMigratingVmsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6727	c.name = name
6728	return c
6729}
6730
6731// Fields allows partial responses to be retrieved. See
6732// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6733// for more information.
6734func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsDeleteCall {
6735	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6736	return c
6737}
6738
6739// Context sets the context to be used in this call's Do method. Any
6740// pending HTTP request will be aborted if the provided context is
6741// canceled.
6742func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsDeleteCall {
6743	c.ctx_ = ctx
6744	return c
6745}
6746
6747// Header returns an http.Header that can be modified by the caller to
6748// add HTTP headers to the request.
6749func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Header() http.Header {
6750	if c.header_ == nil {
6751		c.header_ = make(http.Header)
6752	}
6753	return c.header_
6754}
6755
6756func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) doRequest(alt string) (*http.Response, error) {
6757	reqHeaders := make(http.Header)
6758	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6759	for k, v := range c.header_ {
6760		reqHeaders[k] = v
6761	}
6762	reqHeaders.Set("User-Agent", c.s.userAgent())
6763	var body io.Reader = nil
6764	c.urlParams_.Set("alt", alt)
6765	c.urlParams_.Set("prettyPrint", "false")
6766	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
6767	urls += "?" + c.urlParams_.Encode()
6768	req, err := http.NewRequest("DELETE", urls, body)
6769	if err != nil {
6770		return nil, err
6771	}
6772	req.Header = reqHeaders
6773	googleapi.Expand(req.URL, map[string]string{
6774		"name": c.name,
6775	})
6776	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6777}
6778
6779// Do executes the "vmmigration.projects.locations.sources.migratingVms.delete" call.
6780// Exactly one of *Operation or error will be non-nil. Any non-2xx
6781// status code is an error. Response headers are in either
6782// *Operation.ServerResponse.Header or (if a response was returned at
6783// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6784// to check whether the returned error was because
6785// http.StatusNotModified was returned.
6786func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6787	gensupport.SetOptions(c.urlParams_, opts...)
6788	res, err := c.doRequest("json")
6789	if res != nil && res.StatusCode == http.StatusNotModified {
6790		if res.Body != nil {
6791			res.Body.Close()
6792		}
6793		return nil, &googleapi.Error{
6794			Code:   res.StatusCode,
6795			Header: res.Header,
6796		}
6797	}
6798	if err != nil {
6799		return nil, err
6800	}
6801	defer googleapi.CloseBody(res)
6802	if err := googleapi.CheckResponse(res); err != nil {
6803		return nil, err
6804	}
6805	ret := &Operation{
6806		ServerResponse: googleapi.ServerResponse{
6807			Header:         res.Header,
6808			HTTPStatusCode: res.StatusCode,
6809		},
6810	}
6811	target := &ret
6812	if err := gensupport.DecodeResponse(target, res); err != nil {
6813		return nil, err
6814	}
6815	return ret, nil
6816	// {
6817	//   "description": "Deletes a single MigratingVm.",
6818	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}",
6819	//   "httpMethod": "DELETE",
6820	//   "id": "vmmigration.projects.locations.sources.migratingVms.delete",
6821	//   "parameterOrder": [
6822	//     "name"
6823	//   ],
6824	//   "parameters": {
6825	//     "name": {
6826	//       "description": "Required. The name of the MigratingVm.",
6827	//       "location": "path",
6828	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
6829	//       "required": true,
6830	//       "type": "string"
6831	//     }
6832	//   },
6833	//   "path": "v1alpha1/{+name}",
6834	//   "response": {
6835	//     "$ref": "Operation"
6836	//   },
6837	//   "scopes": [
6838	//     "https://www.googleapis.com/auth/cloud-platform"
6839	//   ]
6840	// }
6841
6842}
6843
6844// method id "vmmigration.projects.locations.sources.migratingVms.finalizeMigration":
6845
6846type ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall struct {
6847	s                        *Service
6848	migratingVm              string
6849	finalizemigrationrequest *FinalizeMigrationRequest
6850	urlParams_               gensupport.URLParams
6851	ctx_                     context.Context
6852	header_                  http.Header
6853}
6854
6855// FinalizeMigration: Marks a migration as completed, deleting migration
6856// resources that are no longer being used. Only applicable after
6857// cutover is done.
6858//
6859// - migratingVm: The name of the MigratingVm.
6860func (r *ProjectsLocationsSourcesMigratingVmsService) FinalizeMigration(migratingVm string, finalizemigrationrequest *FinalizeMigrationRequest) *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall {
6861	c := &ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6862	c.migratingVm = migratingVm
6863	c.finalizemigrationrequest = finalizemigrationrequest
6864	return c
6865}
6866
6867// Fields allows partial responses to be retrieved. See
6868// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6869// for more information.
6870func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall {
6871	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6872	return c
6873}
6874
6875// Context sets the context to be used in this call's Do method. Any
6876// pending HTTP request will be aborted if the provided context is
6877// canceled.
6878func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall {
6879	c.ctx_ = ctx
6880	return c
6881}
6882
6883// Header returns an http.Header that can be modified by the caller to
6884// add HTTP headers to the request.
6885func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Header() http.Header {
6886	if c.header_ == nil {
6887		c.header_ = make(http.Header)
6888	}
6889	return c.header_
6890}
6891
6892func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) doRequest(alt string) (*http.Response, error) {
6893	reqHeaders := make(http.Header)
6894	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
6895	for k, v := range c.header_ {
6896		reqHeaders[k] = v
6897	}
6898	reqHeaders.Set("User-Agent", c.s.userAgent())
6899	var body io.Reader = nil
6900	body, err := googleapi.WithoutDataWrapper.JSONReader(c.finalizemigrationrequest)
6901	if err != nil {
6902		return nil, err
6903	}
6904	reqHeaders.Set("Content-Type", "application/json")
6905	c.urlParams_.Set("alt", alt)
6906	c.urlParams_.Set("prettyPrint", "false")
6907	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+migratingVm}:finalizeMigration")
6908	urls += "?" + c.urlParams_.Encode()
6909	req, err := http.NewRequest("POST", urls, body)
6910	if err != nil {
6911		return nil, err
6912	}
6913	req.Header = reqHeaders
6914	googleapi.Expand(req.URL, map[string]string{
6915		"migratingVm": c.migratingVm,
6916	})
6917	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6918}
6919
6920// Do executes the "vmmigration.projects.locations.sources.migratingVms.finalizeMigration" call.
6921// Exactly one of *Operation or error will be non-nil. Any non-2xx
6922// status code is an error. Response headers are in either
6923// *Operation.ServerResponse.Header or (if a response was returned at
6924// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6925// to check whether the returned error was because
6926// http.StatusNotModified was returned.
6927func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6928	gensupport.SetOptions(c.urlParams_, opts...)
6929	res, err := c.doRequest("json")
6930	if res != nil && res.StatusCode == http.StatusNotModified {
6931		if res.Body != nil {
6932			res.Body.Close()
6933		}
6934		return nil, &googleapi.Error{
6935			Code:   res.StatusCode,
6936			Header: res.Header,
6937		}
6938	}
6939	if err != nil {
6940		return nil, err
6941	}
6942	defer googleapi.CloseBody(res)
6943	if err := googleapi.CheckResponse(res); err != nil {
6944		return nil, err
6945	}
6946	ret := &Operation{
6947		ServerResponse: googleapi.ServerResponse{
6948			Header:         res.Header,
6949			HTTPStatusCode: res.StatusCode,
6950		},
6951	}
6952	target := &ret
6953	if err := gensupport.DecodeResponse(target, res); err != nil {
6954		return nil, err
6955	}
6956	return ret, nil
6957	// {
6958	//   "description": "Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.",
6959	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:finalizeMigration",
6960	//   "httpMethod": "POST",
6961	//   "id": "vmmigration.projects.locations.sources.migratingVms.finalizeMigration",
6962	//   "parameterOrder": [
6963	//     "migratingVm"
6964	//   ],
6965	//   "parameters": {
6966	//     "migratingVm": {
6967	//       "description": "Required. The name of the MigratingVm.",
6968	//       "location": "path",
6969	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
6970	//       "required": true,
6971	//       "type": "string"
6972	//     }
6973	//   },
6974	//   "path": "v1alpha1/{+migratingVm}:finalizeMigration",
6975	//   "request": {
6976	//     "$ref": "FinalizeMigrationRequest"
6977	//   },
6978	//   "response": {
6979	//     "$ref": "Operation"
6980	//   },
6981	//   "scopes": [
6982	//     "https://www.googleapis.com/auth/cloud-platform"
6983	//   ]
6984	// }
6985
6986}
6987
6988// method id "vmmigration.projects.locations.sources.migratingVms.get":
6989
6990type ProjectsLocationsSourcesMigratingVmsGetCall struct {
6991	s            *Service
6992	name         string
6993	urlParams_   gensupport.URLParams
6994	ifNoneMatch_ string
6995	ctx_         context.Context
6996	header_      http.Header
6997}
6998
6999// Get: Gets details of a single MigratingVm.
7000//
7001// - name: The name of the MigratingVm.
7002func (r *ProjectsLocationsSourcesMigratingVmsService) Get(name string) *ProjectsLocationsSourcesMigratingVmsGetCall {
7003	c := &ProjectsLocationsSourcesMigratingVmsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7004	c.name = name
7005	return c
7006}
7007
7008// Fields allows partial responses to be retrieved. See
7009// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7010// for more information.
7011func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsGetCall {
7012	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7013	return c
7014}
7015
7016// IfNoneMatch sets the optional parameter which makes the operation
7017// fail if the object's ETag matches the given value. This is useful for
7018// getting updates only after the object has changed since the last
7019// request. Use googleapi.IsNotModified to check whether the response
7020// error from Do is the result of In-None-Match.
7021func (c *ProjectsLocationsSourcesMigratingVmsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsGetCall {
7022	c.ifNoneMatch_ = entityTag
7023	return c
7024}
7025
7026// Context sets the context to be used in this call's Do method. Any
7027// pending HTTP request will be aborted if the provided context is
7028// canceled.
7029func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsGetCall {
7030	c.ctx_ = ctx
7031	return c
7032}
7033
7034// Header returns an http.Header that can be modified by the caller to
7035// add HTTP headers to the request.
7036func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Header() http.Header {
7037	if c.header_ == nil {
7038		c.header_ = make(http.Header)
7039	}
7040	return c.header_
7041}
7042
7043func (c *ProjectsLocationsSourcesMigratingVmsGetCall) doRequest(alt string) (*http.Response, error) {
7044	reqHeaders := make(http.Header)
7045	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7046	for k, v := range c.header_ {
7047		reqHeaders[k] = v
7048	}
7049	reqHeaders.Set("User-Agent", c.s.userAgent())
7050	if c.ifNoneMatch_ != "" {
7051		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7052	}
7053	var body io.Reader = nil
7054	c.urlParams_.Set("alt", alt)
7055	c.urlParams_.Set("prettyPrint", "false")
7056	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
7057	urls += "?" + c.urlParams_.Encode()
7058	req, err := http.NewRequest("GET", urls, body)
7059	if err != nil {
7060		return nil, err
7061	}
7062	req.Header = reqHeaders
7063	googleapi.Expand(req.URL, map[string]string{
7064		"name": c.name,
7065	})
7066	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7067}
7068
7069// Do executes the "vmmigration.projects.locations.sources.migratingVms.get" call.
7070// Exactly one of *MigratingVm or error will be non-nil. Any non-2xx
7071// status code is an error. Response headers are in either
7072// *MigratingVm.ServerResponse.Header or (if a response was returned at
7073// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7074// to check whether the returned error was because
7075// http.StatusNotModified was returned.
7076func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Do(opts ...googleapi.CallOption) (*MigratingVm, error) {
7077	gensupport.SetOptions(c.urlParams_, opts...)
7078	res, err := c.doRequest("json")
7079	if res != nil && res.StatusCode == http.StatusNotModified {
7080		if res.Body != nil {
7081			res.Body.Close()
7082		}
7083		return nil, &googleapi.Error{
7084			Code:   res.StatusCode,
7085			Header: res.Header,
7086		}
7087	}
7088	if err != nil {
7089		return nil, err
7090	}
7091	defer googleapi.CloseBody(res)
7092	if err := googleapi.CheckResponse(res); err != nil {
7093		return nil, err
7094	}
7095	ret := &MigratingVm{
7096		ServerResponse: googleapi.ServerResponse{
7097			Header:         res.Header,
7098			HTTPStatusCode: res.StatusCode,
7099		},
7100	}
7101	target := &ret
7102	if err := gensupport.DecodeResponse(target, res); err != nil {
7103		return nil, err
7104	}
7105	return ret, nil
7106	// {
7107	//   "description": "Gets details of a single MigratingVm.",
7108	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}",
7109	//   "httpMethod": "GET",
7110	//   "id": "vmmigration.projects.locations.sources.migratingVms.get",
7111	//   "parameterOrder": [
7112	//     "name"
7113	//   ],
7114	//   "parameters": {
7115	//     "name": {
7116	//       "description": "Required. The name of the MigratingVm.",
7117	//       "location": "path",
7118	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
7119	//       "required": true,
7120	//       "type": "string"
7121	//     }
7122	//   },
7123	//   "path": "v1alpha1/{+name}",
7124	//   "response": {
7125	//     "$ref": "MigratingVm"
7126	//   },
7127	//   "scopes": [
7128	//     "https://www.googleapis.com/auth/cloud-platform"
7129	//   ]
7130	// }
7131
7132}
7133
7134// method id "vmmigration.projects.locations.sources.migratingVms.list":
7135
7136type ProjectsLocationsSourcesMigratingVmsListCall struct {
7137	s            *Service
7138	parent       string
7139	urlParams_   gensupport.URLParams
7140	ifNoneMatch_ string
7141	ctx_         context.Context
7142	header_      http.Header
7143}
7144
7145// List: Lists MigratingVms in a given Source.
7146//
7147// - parent: The parent, which owns this collection of MigratingVms.
7148func (r *ProjectsLocationsSourcesMigratingVmsService) List(parent string) *ProjectsLocationsSourcesMigratingVmsListCall {
7149	c := &ProjectsLocationsSourcesMigratingVmsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7150	c.parent = parent
7151	return c
7152}
7153
7154// Filter sets the optional parameter "filter": The filter request.
7155func (c *ProjectsLocationsSourcesMigratingVmsListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsListCall {
7156	c.urlParams_.Set("filter", filter)
7157	return c
7158}
7159
7160// OrderBy sets the optional parameter "orderBy": the order by fields
7161// for the result.
7162func (c *ProjectsLocationsSourcesMigratingVmsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsListCall {
7163	c.urlParams_.Set("orderBy", orderBy)
7164	return c
7165}
7166
7167// PageSize sets the optional parameter "pageSize": The maximum number
7168// of migrating VMs to return. The service may return fewer than this
7169// value. If unspecified, at most 500 migrating VMs will be returned.
7170// The maximum value is 1000; values above 1000 will be coerced to 1000.
7171func (c *ProjectsLocationsSourcesMigratingVmsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsListCall {
7172	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7173	return c
7174}
7175
7176// PageToken sets the optional parameter "pageToken": Required. A page
7177// token, received from a previous `ListMigratingVms` call. Provide this
7178// to retrieve the subsequent page. When paginating, all other
7179// parameters provided to `ListMigratingVms` must match the call that
7180// provided the page token.
7181func (c *ProjectsLocationsSourcesMigratingVmsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsListCall {
7182	c.urlParams_.Set("pageToken", pageToken)
7183	return c
7184}
7185
7186// Fields allows partial responses to be retrieved. See
7187// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7188// for more information.
7189func (c *ProjectsLocationsSourcesMigratingVmsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsListCall {
7190	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7191	return c
7192}
7193
7194// IfNoneMatch sets the optional parameter which makes the operation
7195// fail if the object's ETag matches the given value. This is useful for
7196// getting updates only after the object has changed since the last
7197// request. Use googleapi.IsNotModified to check whether the response
7198// error from Do is the result of In-None-Match.
7199func (c *ProjectsLocationsSourcesMigratingVmsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsListCall {
7200	c.ifNoneMatch_ = entityTag
7201	return c
7202}
7203
7204// Context sets the context to be used in this call's Do method. Any
7205// pending HTTP request will be aborted if the provided context is
7206// canceled.
7207func (c *ProjectsLocationsSourcesMigratingVmsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsListCall {
7208	c.ctx_ = ctx
7209	return c
7210}
7211
7212// Header returns an http.Header that can be modified by the caller to
7213// add HTTP headers to the request.
7214func (c *ProjectsLocationsSourcesMigratingVmsListCall) Header() http.Header {
7215	if c.header_ == nil {
7216		c.header_ = make(http.Header)
7217	}
7218	return c.header_
7219}
7220
7221func (c *ProjectsLocationsSourcesMigratingVmsListCall) doRequest(alt string) (*http.Response, error) {
7222	reqHeaders := make(http.Header)
7223	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7224	for k, v := range c.header_ {
7225		reqHeaders[k] = v
7226	}
7227	reqHeaders.Set("User-Agent", c.s.userAgent())
7228	if c.ifNoneMatch_ != "" {
7229		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7230	}
7231	var body io.Reader = nil
7232	c.urlParams_.Set("alt", alt)
7233	c.urlParams_.Set("prettyPrint", "false")
7234	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/migratingVms")
7235	urls += "?" + c.urlParams_.Encode()
7236	req, err := http.NewRequest("GET", urls, body)
7237	if err != nil {
7238		return nil, err
7239	}
7240	req.Header = reqHeaders
7241	googleapi.Expand(req.URL, map[string]string{
7242		"parent": c.parent,
7243	})
7244	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7245}
7246
7247// Do executes the "vmmigration.projects.locations.sources.migratingVms.list" call.
7248// Exactly one of *ListMigratingVmsResponse or error will be non-nil.
7249// Any non-2xx status code is an error. Response headers are in either
7250// *ListMigratingVmsResponse.ServerResponse.Header or (if a response was
7251// returned at all) in error.(*googleapi.Error).Header. Use
7252// googleapi.IsNotModified to check whether the returned error was
7253// because http.StatusNotModified was returned.
7254func (c *ProjectsLocationsSourcesMigratingVmsListCall) Do(opts ...googleapi.CallOption) (*ListMigratingVmsResponse, error) {
7255	gensupport.SetOptions(c.urlParams_, opts...)
7256	res, err := c.doRequest("json")
7257	if res != nil && res.StatusCode == http.StatusNotModified {
7258		if res.Body != nil {
7259			res.Body.Close()
7260		}
7261		return nil, &googleapi.Error{
7262			Code:   res.StatusCode,
7263			Header: res.Header,
7264		}
7265	}
7266	if err != nil {
7267		return nil, err
7268	}
7269	defer googleapi.CloseBody(res)
7270	if err := googleapi.CheckResponse(res); err != nil {
7271		return nil, err
7272	}
7273	ret := &ListMigratingVmsResponse{
7274		ServerResponse: googleapi.ServerResponse{
7275			Header:         res.Header,
7276			HTTPStatusCode: res.StatusCode,
7277		},
7278	}
7279	target := &ret
7280	if err := gensupport.DecodeResponse(target, res); err != nil {
7281		return nil, err
7282	}
7283	return ret, nil
7284	// {
7285	//   "description": "Lists MigratingVms in a given Source.",
7286	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms",
7287	//   "httpMethod": "GET",
7288	//   "id": "vmmigration.projects.locations.sources.migratingVms.list",
7289	//   "parameterOrder": [
7290	//     "parent"
7291	//   ],
7292	//   "parameters": {
7293	//     "filter": {
7294	//       "description": "Optional. The filter request.",
7295	//       "location": "query",
7296	//       "type": "string"
7297	//     },
7298	//     "orderBy": {
7299	//       "description": "Optional. the order by fields for the result.",
7300	//       "location": "query",
7301	//       "type": "string"
7302	//     },
7303	//     "pageSize": {
7304	//       "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.",
7305	//       "format": "int32",
7306	//       "location": "query",
7307	//       "type": "integer"
7308	//     },
7309	//     "pageToken": {
7310	//       "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.",
7311	//       "location": "query",
7312	//       "type": "string"
7313	//     },
7314	//     "parent": {
7315	//       "description": "Required. The parent, which owns this collection of MigratingVms.",
7316	//       "location": "path",
7317	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
7318	//       "required": true,
7319	//       "type": "string"
7320	//     }
7321	//   },
7322	//   "path": "v1alpha1/{+parent}/migratingVms",
7323	//   "response": {
7324	//     "$ref": "ListMigratingVmsResponse"
7325	//   },
7326	//   "scopes": [
7327	//     "https://www.googleapis.com/auth/cloud-platform"
7328	//   ]
7329	// }
7330
7331}
7332
7333// Pages invokes f for each page of results.
7334// A non-nil error returned from f will halt the iteration.
7335// The provided context supersedes any context provided to the Context method.
7336func (c *ProjectsLocationsSourcesMigratingVmsListCall) Pages(ctx context.Context, f func(*ListMigratingVmsResponse) error) error {
7337	c.ctx_ = ctx
7338	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7339	for {
7340		x, err := c.Do()
7341		if err != nil {
7342			return err
7343		}
7344		if err := f(x); err != nil {
7345			return err
7346		}
7347		if x.NextPageToken == "" {
7348			return nil
7349		}
7350		c.PageToken(x.NextPageToken)
7351	}
7352}
7353
7354// method id "vmmigration.projects.locations.sources.migratingVms.patch":
7355
7356type ProjectsLocationsSourcesMigratingVmsPatchCall struct {
7357	s           *Service
7358	nameid      string
7359	migratingvm *MigratingVm
7360	urlParams_  gensupport.URLParams
7361	ctx_        context.Context
7362	header_     http.Header
7363}
7364
7365// Patch: Updates the parameters of a single MigratingVm.
7366//
7367// - name: Output only. The identifier of the MigratingVm.
7368func (r *ProjectsLocationsSourcesMigratingVmsService) Patch(nameid string, migratingvm *MigratingVm) *ProjectsLocationsSourcesMigratingVmsPatchCall {
7369	c := &ProjectsLocationsSourcesMigratingVmsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7370	c.nameid = nameid
7371	c.migratingvm = migratingvm
7372	return c
7373}
7374
7375// RequestId sets the optional parameter "requestId": A request ID to
7376// identify requests. Specify a unique request ID so that if you must
7377// retry your request, the server will know to ignore the request if it
7378// has already been completed. The server will guarantee that for at
7379// least 60 minutes since the first request. For example, consider a
7380// situation where you make an initial request and t he request times
7381// out. If you make the request again with the same request ID, the
7382// server can check if original operation with the same request ID was
7383// received, and if so, will ignore the second request. This prevents
7384// clients from accidentally creating duplicate commitments. The request
7385// ID must be a valid UUID with the exception that zero UUID is not
7386// supported (00000000-0000-0000-0000-000000000000).
7387func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsPatchCall {
7388	c.urlParams_.Set("requestId", requestId)
7389	return c
7390}
7391
7392// UpdateMask sets the optional parameter "updateMask": Field mask is
7393// used to specify the fields to be overwritten in the MigratingVm
7394// resource by the update. The fields specified in the update_mask are
7395// relative to the resource, not the full request. A field will be
7396// overwritten if it is in the mask. If the user does not provide a mask
7397// then all fields will be overwritten.
7398func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSourcesMigratingVmsPatchCall {
7399	c.urlParams_.Set("updateMask", updateMask)
7400	return c
7401}
7402
7403// Fields allows partial responses to be retrieved. See
7404// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7405// for more information.
7406func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsPatchCall {
7407	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7408	return c
7409}
7410
7411// Context sets the context to be used in this call's Do method. Any
7412// pending HTTP request will be aborted if the provided context is
7413// canceled.
7414func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsPatchCall {
7415	c.ctx_ = ctx
7416	return c
7417}
7418
7419// Header returns an http.Header that can be modified by the caller to
7420// add HTTP headers to the request.
7421func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Header() http.Header {
7422	if c.header_ == nil {
7423		c.header_ = make(http.Header)
7424	}
7425	return c.header_
7426}
7427
7428func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) doRequest(alt string) (*http.Response, error) {
7429	reqHeaders := make(http.Header)
7430	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7431	for k, v := range c.header_ {
7432		reqHeaders[k] = v
7433	}
7434	reqHeaders.Set("User-Agent", c.s.userAgent())
7435	var body io.Reader = nil
7436	body, err := googleapi.WithoutDataWrapper.JSONReader(c.migratingvm)
7437	if err != nil {
7438		return nil, err
7439	}
7440	reqHeaders.Set("Content-Type", "application/json")
7441	c.urlParams_.Set("alt", alt)
7442	c.urlParams_.Set("prettyPrint", "false")
7443	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
7444	urls += "?" + c.urlParams_.Encode()
7445	req, err := http.NewRequest("PATCH", urls, body)
7446	if err != nil {
7447		return nil, err
7448	}
7449	req.Header = reqHeaders
7450	googleapi.Expand(req.URL, map[string]string{
7451		"name": c.nameid,
7452	})
7453	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7454}
7455
7456// Do executes the "vmmigration.projects.locations.sources.migratingVms.patch" call.
7457// Exactly one of *Operation or error will be non-nil. Any non-2xx
7458// status code is an error. Response headers are in either
7459// *Operation.ServerResponse.Header or (if a response was returned at
7460// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7461// to check whether the returned error was because
7462// http.StatusNotModified was returned.
7463func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7464	gensupport.SetOptions(c.urlParams_, opts...)
7465	res, err := c.doRequest("json")
7466	if res != nil && res.StatusCode == http.StatusNotModified {
7467		if res.Body != nil {
7468			res.Body.Close()
7469		}
7470		return nil, &googleapi.Error{
7471			Code:   res.StatusCode,
7472			Header: res.Header,
7473		}
7474	}
7475	if err != nil {
7476		return nil, err
7477	}
7478	defer googleapi.CloseBody(res)
7479	if err := googleapi.CheckResponse(res); err != nil {
7480		return nil, err
7481	}
7482	ret := &Operation{
7483		ServerResponse: googleapi.ServerResponse{
7484			Header:         res.Header,
7485			HTTPStatusCode: res.StatusCode,
7486		},
7487	}
7488	target := &ret
7489	if err := gensupport.DecodeResponse(target, res); err != nil {
7490		return nil, err
7491	}
7492	return ret, nil
7493	// {
7494	//   "description": "Updates the parameters of a single MigratingVm.",
7495	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}",
7496	//   "httpMethod": "PATCH",
7497	//   "id": "vmmigration.projects.locations.sources.migratingVms.patch",
7498	//   "parameterOrder": [
7499	//     "name"
7500	//   ],
7501	//   "parameters": {
7502	//     "name": {
7503	//       "description": "Output only. The identifier of the MigratingVm.",
7504	//       "location": "path",
7505	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
7506	//       "required": true,
7507	//       "type": "string"
7508	//     },
7509	//     "requestId": {
7510	//       "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).",
7511	//       "location": "query",
7512	//       "type": "string"
7513	//     },
7514	//     "updateMask": {
7515	//       "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.",
7516	//       "format": "google-fieldmask",
7517	//       "location": "query",
7518	//       "type": "string"
7519	//     }
7520	//   },
7521	//   "path": "v1alpha1/{+name}",
7522	//   "request": {
7523	//     "$ref": "MigratingVm"
7524	//   },
7525	//   "response": {
7526	//     "$ref": "Operation"
7527	//   },
7528	//   "scopes": [
7529	//     "https://www.googleapis.com/auth/cloud-platform"
7530	//   ]
7531	// }
7532
7533}
7534
7535// method id "vmmigration.projects.locations.sources.migratingVms.pauseMigration":
7536
7537type ProjectsLocationsSourcesMigratingVmsPauseMigrationCall struct {
7538	s                     *Service
7539	migratingVm           string
7540	pausemigrationrequest *PauseMigrationRequest
7541	urlParams_            gensupport.URLParams
7542	ctx_                  context.Context
7543	header_               http.Header
7544}
7545
7546// PauseMigration: Pauses a migration for a VM. If cycle tasks are
7547// running they will be cancelled, preserving source task data. Further
7548// replication cycles will not be triggered while the VM is paused.
7549//
7550// - migratingVm: The name of the MigratingVm.
7551func (r *ProjectsLocationsSourcesMigratingVmsService) PauseMigration(migratingVm string, pausemigrationrequest *PauseMigrationRequest) *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall {
7552	c := &ProjectsLocationsSourcesMigratingVmsPauseMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7553	c.migratingVm = migratingVm
7554	c.pausemigrationrequest = pausemigrationrequest
7555	return c
7556}
7557
7558// Fields allows partial responses to be retrieved. See
7559// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7560// for more information.
7561func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall {
7562	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7563	return c
7564}
7565
7566// Context sets the context to be used in this call's Do method. Any
7567// pending HTTP request will be aborted if the provided context is
7568// canceled.
7569func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall {
7570	c.ctx_ = ctx
7571	return c
7572}
7573
7574// Header returns an http.Header that can be modified by the caller to
7575// add HTTP headers to the request.
7576func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Header() http.Header {
7577	if c.header_ == nil {
7578		c.header_ = make(http.Header)
7579	}
7580	return c.header_
7581}
7582
7583func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) doRequest(alt string) (*http.Response, error) {
7584	reqHeaders := make(http.Header)
7585	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7586	for k, v := range c.header_ {
7587		reqHeaders[k] = v
7588	}
7589	reqHeaders.Set("User-Agent", c.s.userAgent())
7590	var body io.Reader = nil
7591	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pausemigrationrequest)
7592	if err != nil {
7593		return nil, err
7594	}
7595	reqHeaders.Set("Content-Type", "application/json")
7596	c.urlParams_.Set("alt", alt)
7597	c.urlParams_.Set("prettyPrint", "false")
7598	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+migratingVm}:pauseMigration")
7599	urls += "?" + c.urlParams_.Encode()
7600	req, err := http.NewRequest("POST", urls, body)
7601	if err != nil {
7602		return nil, err
7603	}
7604	req.Header = reqHeaders
7605	googleapi.Expand(req.URL, map[string]string{
7606		"migratingVm": c.migratingVm,
7607	})
7608	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7609}
7610
7611// Do executes the "vmmigration.projects.locations.sources.migratingVms.pauseMigration" call.
7612// Exactly one of *Operation or error will be non-nil. Any non-2xx
7613// status code is an error. Response headers are in either
7614// *Operation.ServerResponse.Header or (if a response was returned at
7615// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7616// to check whether the returned error was because
7617// http.StatusNotModified was returned.
7618func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7619	gensupport.SetOptions(c.urlParams_, opts...)
7620	res, err := c.doRequest("json")
7621	if res != nil && res.StatusCode == http.StatusNotModified {
7622		if res.Body != nil {
7623			res.Body.Close()
7624		}
7625		return nil, &googleapi.Error{
7626			Code:   res.StatusCode,
7627			Header: res.Header,
7628		}
7629	}
7630	if err != nil {
7631		return nil, err
7632	}
7633	defer googleapi.CloseBody(res)
7634	if err := googleapi.CheckResponse(res); err != nil {
7635		return nil, err
7636	}
7637	ret := &Operation{
7638		ServerResponse: googleapi.ServerResponse{
7639			Header:         res.Header,
7640			HTTPStatusCode: res.StatusCode,
7641		},
7642	}
7643	target := &ret
7644	if err := gensupport.DecodeResponse(target, res); err != nil {
7645		return nil, err
7646	}
7647	return ret, nil
7648	// {
7649	//   "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.",
7650	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:pauseMigration",
7651	//   "httpMethod": "POST",
7652	//   "id": "vmmigration.projects.locations.sources.migratingVms.pauseMigration",
7653	//   "parameterOrder": [
7654	//     "migratingVm"
7655	//   ],
7656	//   "parameters": {
7657	//     "migratingVm": {
7658	//       "description": "Required. The name of the MigratingVm.",
7659	//       "location": "path",
7660	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
7661	//       "required": true,
7662	//       "type": "string"
7663	//     }
7664	//   },
7665	//   "path": "v1alpha1/{+migratingVm}:pauseMigration",
7666	//   "request": {
7667	//     "$ref": "PauseMigrationRequest"
7668	//   },
7669	//   "response": {
7670	//     "$ref": "Operation"
7671	//   },
7672	//   "scopes": [
7673	//     "https://www.googleapis.com/auth/cloud-platform"
7674	//   ]
7675	// }
7676
7677}
7678
7679// method id "vmmigration.projects.locations.sources.migratingVms.resumeMigration":
7680
7681type ProjectsLocationsSourcesMigratingVmsResumeMigrationCall struct {
7682	s                      *Service
7683	migratingVm            string
7684	resumemigrationrequest *ResumeMigrationRequest
7685	urlParams_             gensupport.URLParams
7686	ctx_                   context.Context
7687	header_                http.Header
7688}
7689
7690// ResumeMigration: Resumes a migration for a VM. When called on a
7691// paused migration, will start the process of uploading data and
7692// creating snapshots; when called on a completed cut-over migration,
7693// will update the migration to active state and start the process of
7694// uploading data and creating snapshots.
7695//
7696// - migratingVm: The name of the MigratingVm.
7697func (r *ProjectsLocationsSourcesMigratingVmsService) ResumeMigration(migratingVm string, resumemigrationrequest *ResumeMigrationRequest) *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall {
7698	c := &ProjectsLocationsSourcesMigratingVmsResumeMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7699	c.migratingVm = migratingVm
7700	c.resumemigrationrequest = resumemigrationrequest
7701	return c
7702}
7703
7704// Fields allows partial responses to be retrieved. See
7705// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7706// for more information.
7707func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall {
7708	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7709	return c
7710}
7711
7712// Context sets the context to be used in this call's Do method. Any
7713// pending HTTP request will be aborted if the provided context is
7714// canceled.
7715func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall {
7716	c.ctx_ = ctx
7717	return c
7718}
7719
7720// Header returns an http.Header that can be modified by the caller to
7721// add HTTP headers to the request.
7722func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Header() http.Header {
7723	if c.header_ == nil {
7724		c.header_ = make(http.Header)
7725	}
7726	return c.header_
7727}
7728
7729func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) doRequest(alt string) (*http.Response, error) {
7730	reqHeaders := make(http.Header)
7731	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7732	for k, v := range c.header_ {
7733		reqHeaders[k] = v
7734	}
7735	reqHeaders.Set("User-Agent", c.s.userAgent())
7736	var body io.Reader = nil
7737	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumemigrationrequest)
7738	if err != nil {
7739		return nil, err
7740	}
7741	reqHeaders.Set("Content-Type", "application/json")
7742	c.urlParams_.Set("alt", alt)
7743	c.urlParams_.Set("prettyPrint", "false")
7744	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+migratingVm}:resumeMigration")
7745	urls += "?" + c.urlParams_.Encode()
7746	req, err := http.NewRequest("POST", urls, body)
7747	if err != nil {
7748		return nil, err
7749	}
7750	req.Header = reqHeaders
7751	googleapi.Expand(req.URL, map[string]string{
7752		"migratingVm": c.migratingVm,
7753	})
7754	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7755}
7756
7757// Do executes the "vmmigration.projects.locations.sources.migratingVms.resumeMigration" call.
7758// Exactly one of *Operation or error will be non-nil. Any non-2xx
7759// status code is an error. Response headers are in either
7760// *Operation.ServerResponse.Header or (if a response was returned at
7761// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7762// to check whether the returned error was because
7763// http.StatusNotModified was returned.
7764func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7765	gensupport.SetOptions(c.urlParams_, opts...)
7766	res, err := c.doRequest("json")
7767	if res != nil && res.StatusCode == http.StatusNotModified {
7768		if res.Body != nil {
7769			res.Body.Close()
7770		}
7771		return nil, &googleapi.Error{
7772			Code:   res.StatusCode,
7773			Header: res.Header,
7774		}
7775	}
7776	if err != nil {
7777		return nil, err
7778	}
7779	defer googleapi.CloseBody(res)
7780	if err := googleapi.CheckResponse(res); err != nil {
7781		return nil, err
7782	}
7783	ret := &Operation{
7784		ServerResponse: googleapi.ServerResponse{
7785			Header:         res.Header,
7786			HTTPStatusCode: res.StatusCode,
7787		},
7788	}
7789	target := &ret
7790	if err := gensupport.DecodeResponse(target, res); err != nil {
7791		return nil, err
7792	}
7793	return ret, nil
7794	// {
7795	//   "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.",
7796	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:resumeMigration",
7797	//   "httpMethod": "POST",
7798	//   "id": "vmmigration.projects.locations.sources.migratingVms.resumeMigration",
7799	//   "parameterOrder": [
7800	//     "migratingVm"
7801	//   ],
7802	//   "parameters": {
7803	//     "migratingVm": {
7804	//       "description": "Required. The name of the MigratingVm.",
7805	//       "location": "path",
7806	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
7807	//       "required": true,
7808	//       "type": "string"
7809	//     }
7810	//   },
7811	//   "path": "v1alpha1/{+migratingVm}:resumeMigration",
7812	//   "request": {
7813	//     "$ref": "ResumeMigrationRequest"
7814	//   },
7815	//   "response": {
7816	//     "$ref": "Operation"
7817	//   },
7818	//   "scopes": [
7819	//     "https://www.googleapis.com/auth/cloud-platform"
7820	//   ]
7821	// }
7822
7823}
7824
7825// method id "vmmigration.projects.locations.sources.migratingVms.startMigration":
7826
7827type ProjectsLocationsSourcesMigratingVmsStartMigrationCall struct {
7828	s                     *Service
7829	migratingVm           string
7830	startmigrationrequest *StartMigrationRequest
7831	urlParams_            gensupport.URLParams
7832	ctx_                  context.Context
7833	header_               http.Header
7834}
7835
7836// StartMigration: Starts migration for a VM. Starts the process of
7837// uploading data and creating snapshots, in replication cycles
7838// scheduled by the policy.
7839//
7840// - migratingVm: The name of the MigratingVm.
7841func (r *ProjectsLocationsSourcesMigratingVmsService) StartMigration(migratingVm string, startmigrationrequest *StartMigrationRequest) *ProjectsLocationsSourcesMigratingVmsStartMigrationCall {
7842	c := &ProjectsLocationsSourcesMigratingVmsStartMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7843	c.migratingVm = migratingVm
7844	c.startmigrationrequest = startmigrationrequest
7845	return c
7846}
7847
7848// Fields allows partial responses to be retrieved. See
7849// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7850// for more information.
7851func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsStartMigrationCall {
7852	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7853	return c
7854}
7855
7856// Context sets the context to be used in this call's Do method. Any
7857// pending HTTP request will be aborted if the provided context is
7858// canceled.
7859func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsStartMigrationCall {
7860	c.ctx_ = ctx
7861	return c
7862}
7863
7864// Header returns an http.Header that can be modified by the caller to
7865// add HTTP headers to the request.
7866func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Header() http.Header {
7867	if c.header_ == nil {
7868		c.header_ = make(http.Header)
7869	}
7870	return c.header_
7871}
7872
7873func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) doRequest(alt string) (*http.Response, error) {
7874	reqHeaders := make(http.Header)
7875	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
7876	for k, v := range c.header_ {
7877		reqHeaders[k] = v
7878	}
7879	reqHeaders.Set("User-Agent", c.s.userAgent())
7880	var body io.Reader = nil
7881	body, err := googleapi.WithoutDataWrapper.JSONReader(c.startmigrationrequest)
7882	if err != nil {
7883		return nil, err
7884	}
7885	reqHeaders.Set("Content-Type", "application/json")
7886	c.urlParams_.Set("alt", alt)
7887	c.urlParams_.Set("prettyPrint", "false")
7888	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+migratingVm}:startMigration")
7889	urls += "?" + c.urlParams_.Encode()
7890	req, err := http.NewRequest("POST", urls, body)
7891	if err != nil {
7892		return nil, err
7893	}
7894	req.Header = reqHeaders
7895	googleapi.Expand(req.URL, map[string]string{
7896		"migratingVm": c.migratingVm,
7897	})
7898	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7899}
7900
7901// Do executes the "vmmigration.projects.locations.sources.migratingVms.startMigration" call.
7902// Exactly one of *Operation or error will be non-nil. Any non-2xx
7903// status code is an error. Response headers are in either
7904// *Operation.ServerResponse.Header or (if a response was returned at
7905// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7906// to check whether the returned error was because
7907// http.StatusNotModified was returned.
7908func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7909	gensupport.SetOptions(c.urlParams_, opts...)
7910	res, err := c.doRequest("json")
7911	if res != nil && res.StatusCode == http.StatusNotModified {
7912		if res.Body != nil {
7913			res.Body.Close()
7914		}
7915		return nil, &googleapi.Error{
7916			Code:   res.StatusCode,
7917			Header: res.Header,
7918		}
7919	}
7920	if err != nil {
7921		return nil, err
7922	}
7923	defer googleapi.CloseBody(res)
7924	if err := googleapi.CheckResponse(res); err != nil {
7925		return nil, err
7926	}
7927	ret := &Operation{
7928		ServerResponse: googleapi.ServerResponse{
7929			Header:         res.Header,
7930			HTTPStatusCode: res.StatusCode,
7931		},
7932	}
7933	target := &ret
7934	if err := gensupport.DecodeResponse(target, res); err != nil {
7935		return nil, err
7936	}
7937	return ret, nil
7938	// {
7939	//   "description": "Starts migration for a VM. Starts the process of uploading data and creating snapshots, in replication cycles scheduled by the policy.",
7940	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:startMigration",
7941	//   "httpMethod": "POST",
7942	//   "id": "vmmigration.projects.locations.sources.migratingVms.startMigration",
7943	//   "parameterOrder": [
7944	//     "migratingVm"
7945	//   ],
7946	//   "parameters": {
7947	//     "migratingVm": {
7948	//       "description": "Required. The name of the MigratingVm.",
7949	//       "location": "path",
7950	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
7951	//       "required": true,
7952	//       "type": "string"
7953	//     }
7954	//   },
7955	//   "path": "v1alpha1/{+migratingVm}:startMigration",
7956	//   "request": {
7957	//     "$ref": "StartMigrationRequest"
7958	//   },
7959	//   "response": {
7960	//     "$ref": "Operation"
7961	//   },
7962	//   "scopes": [
7963	//     "https://www.googleapis.com/auth/cloud-platform"
7964	//   ]
7965	// }
7966
7967}
7968
7969// method id "vmmigration.projects.locations.sources.migratingVms.cloneJobs.cancel":
7970
7971type ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall struct {
7972	s                     *Service
7973	name                  string
7974	cancelclonejobrequest *CancelCloneJobRequest
7975	urlParams_            gensupport.URLParams
7976	ctx_                  context.Context
7977	header_               http.Header
7978}
7979
7980// Cancel: Initiates the cancellation of a running clone job.
7981//
7982// - name: The clone job id.
7983func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) Cancel(name string, cancelclonejobrequest *CancelCloneJobRequest) *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall {
7984	c := &ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7985	c.name = name
7986	c.cancelclonejobrequest = cancelclonejobrequest
7987	return c
7988}
7989
7990// Fields allows partial responses to be retrieved. See
7991// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7992// for more information.
7993func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall {
7994	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7995	return c
7996}
7997
7998// Context sets the context to be used in this call's Do method. Any
7999// pending HTTP request will be aborted if the provided context is
8000// canceled.
8001func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall {
8002	c.ctx_ = ctx
8003	return c
8004}
8005
8006// Header returns an http.Header that can be modified by the caller to
8007// add HTTP headers to the request.
8008func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Header() http.Header {
8009	if c.header_ == nil {
8010		c.header_ = make(http.Header)
8011	}
8012	return c.header_
8013}
8014
8015func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) doRequest(alt string) (*http.Response, error) {
8016	reqHeaders := make(http.Header)
8017	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8018	for k, v := range c.header_ {
8019		reqHeaders[k] = v
8020	}
8021	reqHeaders.Set("User-Agent", c.s.userAgent())
8022	var body io.Reader = nil
8023	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelclonejobrequest)
8024	if err != nil {
8025		return nil, err
8026	}
8027	reqHeaders.Set("Content-Type", "application/json")
8028	c.urlParams_.Set("alt", alt)
8029	c.urlParams_.Set("prettyPrint", "false")
8030	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:cancel")
8031	urls += "?" + c.urlParams_.Encode()
8032	req, err := http.NewRequest("POST", urls, body)
8033	if err != nil {
8034		return nil, err
8035	}
8036	req.Header = reqHeaders
8037	googleapi.Expand(req.URL, map[string]string{
8038		"name": c.name,
8039	})
8040	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8041}
8042
8043// Do executes the "vmmigration.projects.locations.sources.migratingVms.cloneJobs.cancel" call.
8044// Exactly one of *Operation or error will be non-nil. Any non-2xx
8045// status code is an error. Response headers are in either
8046// *Operation.ServerResponse.Header or (if a response was returned at
8047// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8048// to check whether the returned error was because
8049// http.StatusNotModified was returned.
8050func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8051	gensupport.SetOptions(c.urlParams_, opts...)
8052	res, err := c.doRequest("json")
8053	if res != nil && res.StatusCode == http.StatusNotModified {
8054		if res.Body != nil {
8055			res.Body.Close()
8056		}
8057		return nil, &googleapi.Error{
8058			Code:   res.StatusCode,
8059			Header: res.Header,
8060		}
8061	}
8062	if err != nil {
8063		return nil, err
8064	}
8065	defer googleapi.CloseBody(res)
8066	if err := googleapi.CheckResponse(res); err != nil {
8067		return nil, err
8068	}
8069	ret := &Operation{
8070		ServerResponse: googleapi.ServerResponse{
8071			Header:         res.Header,
8072			HTTPStatusCode: res.StatusCode,
8073		},
8074	}
8075	target := &ret
8076	if err := gensupport.DecodeResponse(target, res); err != nil {
8077		return nil, err
8078	}
8079	return ret, nil
8080	// {
8081	//   "description": "Initiates the cancellation of a running clone job.",
8082	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs/{cloneJobsId}:cancel",
8083	//   "httpMethod": "POST",
8084	//   "id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.cancel",
8085	//   "parameterOrder": [
8086	//     "name"
8087	//   ],
8088	//   "parameters": {
8089	//     "name": {
8090	//       "description": "Required. The clone job id",
8091	//       "location": "path",
8092	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cloneJobs/[^/]+$",
8093	//       "required": true,
8094	//       "type": "string"
8095	//     }
8096	//   },
8097	//   "path": "v1alpha1/{+name}:cancel",
8098	//   "request": {
8099	//     "$ref": "CancelCloneJobRequest"
8100	//   },
8101	//   "response": {
8102	//     "$ref": "Operation"
8103	//   },
8104	//   "scopes": [
8105	//     "https://www.googleapis.com/auth/cloud-platform"
8106	//   ]
8107	// }
8108
8109}
8110
8111// method id "vmmigration.projects.locations.sources.migratingVms.cloneJobs.create":
8112
8113type ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall struct {
8114	s          *Service
8115	parent     string
8116	clonejob   *CloneJob
8117	urlParams_ gensupport.URLParams
8118	ctx_       context.Context
8119	header_    http.Header
8120}
8121
8122// Create: Initiates a Clone of a specific migrating VM.
8123//
8124// - parent: The Clone's parent.
8125func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) Create(parent string, clonejob *CloneJob) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8126	c := &ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8127	c.parent = parent
8128	c.clonejob = clonejob
8129	return c
8130}
8131
8132// CloneJobId sets the optional parameter "cloneJobId": Required. The
8133// clone job identifier.
8134func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) CloneJobId(cloneJobId string) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8135	c.urlParams_.Set("cloneJobId", cloneJobId)
8136	return c
8137}
8138
8139// RequestId sets the optional parameter "requestId": A request ID to
8140// identify requests. Specify a unique request ID so that if you must
8141// retry your request, the server will know to ignore the request if it
8142// has already been completed. The server will guarantee that for at
8143// least 60 minutes since the first request. For example, consider a
8144// situation where you make an initial request and t he request times
8145// out. If you make the request again with the same request ID, the
8146// server can check if original operation with the same request ID was
8147// received, and if so, will ignore the second request. This prevents
8148// clients from accidentally creating duplicate commitments. The request
8149// ID must be a valid UUID with the exception that zero UUID is not
8150// supported (00000000-0000-0000-0000-000000000000).
8151func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8152	c.urlParams_.Set("requestId", requestId)
8153	return c
8154}
8155
8156// Fields allows partial responses to be retrieved. See
8157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8158// for more information.
8159func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8160	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8161	return c
8162}
8163
8164// Context sets the context to be used in this call's Do method. Any
8165// pending HTTP request will be aborted if the provided context is
8166// canceled.
8167func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
8168	c.ctx_ = ctx
8169	return c
8170}
8171
8172// Header returns an http.Header that can be modified by the caller to
8173// add HTTP headers to the request.
8174func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Header() http.Header {
8175	if c.header_ == nil {
8176		c.header_ = make(http.Header)
8177	}
8178	return c.header_
8179}
8180
8181func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) doRequest(alt string) (*http.Response, error) {
8182	reqHeaders := make(http.Header)
8183	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8184	for k, v := range c.header_ {
8185		reqHeaders[k] = v
8186	}
8187	reqHeaders.Set("User-Agent", c.s.userAgent())
8188	var body io.Reader = nil
8189	body, err := googleapi.WithoutDataWrapper.JSONReader(c.clonejob)
8190	if err != nil {
8191		return nil, err
8192	}
8193	reqHeaders.Set("Content-Type", "application/json")
8194	c.urlParams_.Set("alt", alt)
8195	c.urlParams_.Set("prettyPrint", "false")
8196	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/cloneJobs")
8197	urls += "?" + c.urlParams_.Encode()
8198	req, err := http.NewRequest("POST", urls, body)
8199	if err != nil {
8200		return nil, err
8201	}
8202	req.Header = reqHeaders
8203	googleapi.Expand(req.URL, map[string]string{
8204		"parent": c.parent,
8205	})
8206	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8207}
8208
8209// Do executes the "vmmigration.projects.locations.sources.migratingVms.cloneJobs.create" call.
8210// Exactly one of *Operation or error will be non-nil. Any non-2xx
8211// status code is an error. Response headers are in either
8212// *Operation.ServerResponse.Header or (if a response was returned at
8213// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8214// to check whether the returned error was because
8215// http.StatusNotModified was returned.
8216func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8217	gensupport.SetOptions(c.urlParams_, opts...)
8218	res, err := c.doRequest("json")
8219	if res != nil && res.StatusCode == http.StatusNotModified {
8220		if res.Body != nil {
8221			res.Body.Close()
8222		}
8223		return nil, &googleapi.Error{
8224			Code:   res.StatusCode,
8225			Header: res.Header,
8226		}
8227	}
8228	if err != nil {
8229		return nil, err
8230	}
8231	defer googleapi.CloseBody(res)
8232	if err := googleapi.CheckResponse(res); err != nil {
8233		return nil, err
8234	}
8235	ret := &Operation{
8236		ServerResponse: googleapi.ServerResponse{
8237			Header:         res.Header,
8238			HTTPStatusCode: res.StatusCode,
8239		},
8240	}
8241	target := &ret
8242	if err := gensupport.DecodeResponse(target, res); err != nil {
8243		return nil, err
8244	}
8245	return ret, nil
8246	// {
8247	//   "description": "Initiates a Clone of a specific migrating VM.",
8248	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs",
8249	//   "httpMethod": "POST",
8250	//   "id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.create",
8251	//   "parameterOrder": [
8252	//     "parent"
8253	//   ],
8254	//   "parameters": {
8255	//     "cloneJobId": {
8256	//       "description": "Required. The clone job identifier.",
8257	//       "location": "query",
8258	//       "type": "string"
8259	//     },
8260	//     "parent": {
8261	//       "description": "Required. The Clone's parent.",
8262	//       "location": "path",
8263	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
8264	//       "required": true,
8265	//       "type": "string"
8266	//     },
8267	//     "requestId": {
8268	//       "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).",
8269	//       "location": "query",
8270	//       "type": "string"
8271	//     }
8272	//   },
8273	//   "path": "v1alpha1/{+parent}/cloneJobs",
8274	//   "request": {
8275	//     "$ref": "CloneJob"
8276	//   },
8277	//   "response": {
8278	//     "$ref": "Operation"
8279	//   },
8280	//   "scopes": [
8281	//     "https://www.googleapis.com/auth/cloud-platform"
8282	//   ]
8283	// }
8284
8285}
8286
8287// method id "vmmigration.projects.locations.sources.migratingVms.cloneJobs.get":
8288
8289type ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall struct {
8290	s            *Service
8291	name         string
8292	urlParams_   gensupport.URLParams
8293	ifNoneMatch_ string
8294	ctx_         context.Context
8295	header_      http.Header
8296}
8297
8298// Get: Gets details of a single CloneJob.
8299//
8300// - name: The name of the CloneJob.
8301func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) Get(name string) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
8302	c := &ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8303	c.name = name
8304	return c
8305}
8306
8307// Fields allows partial responses to be retrieved. See
8308// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8309// for more information.
8310func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
8311	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8312	return c
8313}
8314
8315// IfNoneMatch sets the optional parameter which makes the operation
8316// fail if the object's ETag matches the given value. This is useful for
8317// getting updates only after the object has changed since the last
8318// request. Use googleapi.IsNotModified to check whether the response
8319// error from Do is the result of In-None-Match.
8320func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
8321	c.ifNoneMatch_ = entityTag
8322	return c
8323}
8324
8325// Context sets the context to be used in this call's Do method. Any
8326// pending HTTP request will be aborted if the provided context is
8327// canceled.
8328func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
8329	c.ctx_ = ctx
8330	return c
8331}
8332
8333// Header returns an http.Header that can be modified by the caller to
8334// add HTTP headers to the request.
8335func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Header() http.Header {
8336	if c.header_ == nil {
8337		c.header_ = make(http.Header)
8338	}
8339	return c.header_
8340}
8341
8342func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) doRequest(alt string) (*http.Response, error) {
8343	reqHeaders := make(http.Header)
8344	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8345	for k, v := range c.header_ {
8346		reqHeaders[k] = v
8347	}
8348	reqHeaders.Set("User-Agent", c.s.userAgent())
8349	if c.ifNoneMatch_ != "" {
8350		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8351	}
8352	var body io.Reader = nil
8353	c.urlParams_.Set("alt", alt)
8354	c.urlParams_.Set("prettyPrint", "false")
8355	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
8356	urls += "?" + c.urlParams_.Encode()
8357	req, err := http.NewRequest("GET", urls, body)
8358	if err != nil {
8359		return nil, err
8360	}
8361	req.Header = reqHeaders
8362	googleapi.Expand(req.URL, map[string]string{
8363		"name": c.name,
8364	})
8365	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8366}
8367
8368// Do executes the "vmmigration.projects.locations.sources.migratingVms.cloneJobs.get" call.
8369// Exactly one of *CloneJob or error will be non-nil. Any non-2xx status
8370// code is an error. Response headers are in either
8371// *CloneJob.ServerResponse.Header or (if a response was returned at
8372// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8373// to check whether the returned error was because
8374// http.StatusNotModified was returned.
8375func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Do(opts ...googleapi.CallOption) (*CloneJob, error) {
8376	gensupport.SetOptions(c.urlParams_, opts...)
8377	res, err := c.doRequest("json")
8378	if res != nil && res.StatusCode == http.StatusNotModified {
8379		if res.Body != nil {
8380			res.Body.Close()
8381		}
8382		return nil, &googleapi.Error{
8383			Code:   res.StatusCode,
8384			Header: res.Header,
8385		}
8386	}
8387	if err != nil {
8388		return nil, err
8389	}
8390	defer googleapi.CloseBody(res)
8391	if err := googleapi.CheckResponse(res); err != nil {
8392		return nil, err
8393	}
8394	ret := &CloneJob{
8395		ServerResponse: googleapi.ServerResponse{
8396			Header:         res.Header,
8397			HTTPStatusCode: res.StatusCode,
8398		},
8399	}
8400	target := &ret
8401	if err := gensupport.DecodeResponse(target, res); err != nil {
8402		return nil, err
8403	}
8404	return ret, nil
8405	// {
8406	//   "description": "Gets details of a single CloneJob.",
8407	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs/{cloneJobsId}",
8408	//   "httpMethod": "GET",
8409	//   "id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.get",
8410	//   "parameterOrder": [
8411	//     "name"
8412	//   ],
8413	//   "parameters": {
8414	//     "name": {
8415	//       "description": "Required. The name of the CloneJob.",
8416	//       "location": "path",
8417	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cloneJobs/[^/]+$",
8418	//       "required": true,
8419	//       "type": "string"
8420	//     }
8421	//   },
8422	//   "path": "v1alpha1/{+name}",
8423	//   "response": {
8424	//     "$ref": "CloneJob"
8425	//   },
8426	//   "scopes": [
8427	//     "https://www.googleapis.com/auth/cloud-platform"
8428	//   ]
8429	// }
8430
8431}
8432
8433// method id "vmmigration.projects.locations.sources.migratingVms.cloneJobs.list":
8434
8435type ProjectsLocationsSourcesMigratingVmsCloneJobsListCall struct {
8436	s            *Service
8437	parent       string
8438	urlParams_   gensupport.URLParams
8439	ifNoneMatch_ string
8440	ctx_         context.Context
8441	header_      http.Header
8442}
8443
8444// List: Lists CloneJobs of a given migrating VM.
8445//
8446// - parent: The parent, which owns this collection of source VMs.
8447func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) List(parent string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8448	c := &ProjectsLocationsSourcesMigratingVmsCloneJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8449	c.parent = parent
8450	return c
8451}
8452
8453// Filter sets the optional parameter "filter": The filter request.
8454func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8455	c.urlParams_.Set("filter", filter)
8456	return c
8457}
8458
8459// OrderBy sets the optional parameter "orderBy": the order by fields
8460// for the result.
8461func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8462	c.urlParams_.Set("orderBy", orderBy)
8463	return c
8464}
8465
8466// PageSize sets the optional parameter "pageSize": The maximum number
8467// of clone jobs to return. The service may return fewer than this
8468// value. If unspecified, at most 500 clone jobs will be returned. The
8469// maximum value is 1000; values above 1000 will be coerced to 1000.
8470func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8471	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8472	return c
8473}
8474
8475// PageToken sets the optional parameter "pageToken": Required. A page
8476// token, received from a previous `ListCloneJobs` call. Provide this to
8477// retrieve the subsequent page. When paginating, all other parameters
8478// provided to `ListCloneJobs` must match the call that provided the
8479// page token.
8480func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8481	c.urlParams_.Set("pageToken", pageToken)
8482	return c
8483}
8484
8485// Fields allows partial responses to be retrieved. See
8486// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8487// for more information.
8488func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8489	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8490	return c
8491}
8492
8493// IfNoneMatch sets the optional parameter which makes the operation
8494// fail if the object's ETag matches the given value. This is useful for
8495// getting updates only after the object has changed since the last
8496// request. Use googleapi.IsNotModified to check whether the response
8497// error from Do is the result of In-None-Match.
8498func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8499	c.ifNoneMatch_ = entityTag
8500	return c
8501}
8502
8503// Context sets the context to be used in this call's Do method. Any
8504// pending HTTP request will be aborted if the provided context is
8505// canceled.
8506func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
8507	c.ctx_ = ctx
8508	return c
8509}
8510
8511// Header returns an http.Header that can be modified by the caller to
8512// add HTTP headers to the request.
8513func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Header() http.Header {
8514	if c.header_ == nil {
8515		c.header_ = make(http.Header)
8516	}
8517	return c.header_
8518}
8519
8520func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) doRequest(alt string) (*http.Response, error) {
8521	reqHeaders := make(http.Header)
8522	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8523	for k, v := range c.header_ {
8524		reqHeaders[k] = v
8525	}
8526	reqHeaders.Set("User-Agent", c.s.userAgent())
8527	if c.ifNoneMatch_ != "" {
8528		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8529	}
8530	var body io.Reader = nil
8531	c.urlParams_.Set("alt", alt)
8532	c.urlParams_.Set("prettyPrint", "false")
8533	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/cloneJobs")
8534	urls += "?" + c.urlParams_.Encode()
8535	req, err := http.NewRequest("GET", urls, body)
8536	if err != nil {
8537		return nil, err
8538	}
8539	req.Header = reqHeaders
8540	googleapi.Expand(req.URL, map[string]string{
8541		"parent": c.parent,
8542	})
8543	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8544}
8545
8546// Do executes the "vmmigration.projects.locations.sources.migratingVms.cloneJobs.list" call.
8547// Exactly one of *ListCloneJobsResponse or error will be non-nil. Any
8548// non-2xx status code is an error. Response headers are in either
8549// *ListCloneJobsResponse.ServerResponse.Header or (if a response was
8550// returned at all) in error.(*googleapi.Error).Header. Use
8551// googleapi.IsNotModified to check whether the returned error was
8552// because http.StatusNotModified was returned.
8553func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Do(opts ...googleapi.CallOption) (*ListCloneJobsResponse, error) {
8554	gensupport.SetOptions(c.urlParams_, opts...)
8555	res, err := c.doRequest("json")
8556	if res != nil && res.StatusCode == http.StatusNotModified {
8557		if res.Body != nil {
8558			res.Body.Close()
8559		}
8560		return nil, &googleapi.Error{
8561			Code:   res.StatusCode,
8562			Header: res.Header,
8563		}
8564	}
8565	if err != nil {
8566		return nil, err
8567	}
8568	defer googleapi.CloseBody(res)
8569	if err := googleapi.CheckResponse(res); err != nil {
8570		return nil, err
8571	}
8572	ret := &ListCloneJobsResponse{
8573		ServerResponse: googleapi.ServerResponse{
8574			Header:         res.Header,
8575			HTTPStatusCode: res.StatusCode,
8576		},
8577	}
8578	target := &ret
8579	if err := gensupport.DecodeResponse(target, res); err != nil {
8580		return nil, err
8581	}
8582	return ret, nil
8583	// {
8584	//   "description": "Lists CloneJobs of a given migrating VM.",
8585	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs",
8586	//   "httpMethod": "GET",
8587	//   "id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.list",
8588	//   "parameterOrder": [
8589	//     "parent"
8590	//   ],
8591	//   "parameters": {
8592	//     "filter": {
8593	//       "description": "Optional. The filter request.",
8594	//       "location": "query",
8595	//       "type": "string"
8596	//     },
8597	//     "orderBy": {
8598	//       "description": "Optional. the order by fields for the result.",
8599	//       "location": "query",
8600	//       "type": "string"
8601	//     },
8602	//     "pageSize": {
8603	//       "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.",
8604	//       "format": "int32",
8605	//       "location": "query",
8606	//       "type": "integer"
8607	//     },
8608	//     "pageToken": {
8609	//       "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.",
8610	//       "location": "query",
8611	//       "type": "string"
8612	//     },
8613	//     "parent": {
8614	//       "description": "Required. The parent, which owns this collection of source VMs.",
8615	//       "location": "path",
8616	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
8617	//       "required": true,
8618	//       "type": "string"
8619	//     }
8620	//   },
8621	//   "path": "v1alpha1/{+parent}/cloneJobs",
8622	//   "response": {
8623	//     "$ref": "ListCloneJobsResponse"
8624	//   },
8625	//   "scopes": [
8626	//     "https://www.googleapis.com/auth/cloud-platform"
8627	//   ]
8628	// }
8629
8630}
8631
8632// Pages invokes f for each page of results.
8633// A non-nil error returned from f will halt the iteration.
8634// The provided context supersedes any context provided to the Context method.
8635func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Pages(ctx context.Context, f func(*ListCloneJobsResponse) error) error {
8636	c.ctx_ = ctx
8637	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8638	for {
8639		x, err := c.Do()
8640		if err != nil {
8641			return err
8642		}
8643		if err := f(x); err != nil {
8644			return err
8645		}
8646		if x.NextPageToken == "" {
8647			return nil
8648		}
8649		c.PageToken(x.NextPageToken)
8650	}
8651}
8652
8653// method id "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.cancel":
8654
8655type ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall struct {
8656	s                       *Service
8657	name                    string
8658	cancelcutoverjobrequest *CancelCutoverJobRequest
8659	urlParams_              gensupport.URLParams
8660	ctx_                    context.Context
8661	header_                 http.Header
8662}
8663
8664// Cancel: Initiates the cancellation of a running cutover job.
8665//
8666// - name: The cutover job id.
8667func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) Cancel(name string, cancelcutoverjobrequest *CancelCutoverJobRequest) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall {
8668	c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8669	c.name = name
8670	c.cancelcutoverjobrequest = cancelcutoverjobrequest
8671	return c
8672}
8673
8674// Fields allows partial responses to be retrieved. See
8675// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8676// for more information.
8677func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall {
8678	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8679	return c
8680}
8681
8682// Context sets the context to be used in this call's Do method. Any
8683// pending HTTP request will be aborted if the provided context is
8684// canceled.
8685func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall {
8686	c.ctx_ = ctx
8687	return c
8688}
8689
8690// Header returns an http.Header that can be modified by the caller to
8691// add HTTP headers to the request.
8692func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Header() http.Header {
8693	if c.header_ == nil {
8694		c.header_ = make(http.Header)
8695	}
8696	return c.header_
8697}
8698
8699func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) doRequest(alt string) (*http.Response, error) {
8700	reqHeaders := make(http.Header)
8701	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8702	for k, v := range c.header_ {
8703		reqHeaders[k] = v
8704	}
8705	reqHeaders.Set("User-Agent", c.s.userAgent())
8706	var body io.Reader = nil
8707	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelcutoverjobrequest)
8708	if err != nil {
8709		return nil, err
8710	}
8711	reqHeaders.Set("Content-Type", "application/json")
8712	c.urlParams_.Set("alt", alt)
8713	c.urlParams_.Set("prettyPrint", "false")
8714	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:cancel")
8715	urls += "?" + c.urlParams_.Encode()
8716	req, err := http.NewRequest("POST", urls, body)
8717	if err != nil {
8718		return nil, err
8719	}
8720	req.Header = reqHeaders
8721	googleapi.Expand(req.URL, map[string]string{
8722		"name": c.name,
8723	})
8724	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8725}
8726
8727// Do executes the "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.cancel" call.
8728// Exactly one of *Operation or error will be non-nil. Any non-2xx
8729// status code is an error. Response headers are in either
8730// *Operation.ServerResponse.Header or (if a response was returned at
8731// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8732// to check whether the returned error was because
8733// http.StatusNotModified was returned.
8734func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8735	gensupport.SetOptions(c.urlParams_, opts...)
8736	res, err := c.doRequest("json")
8737	if res != nil && res.StatusCode == http.StatusNotModified {
8738		if res.Body != nil {
8739			res.Body.Close()
8740		}
8741		return nil, &googleapi.Error{
8742			Code:   res.StatusCode,
8743			Header: res.Header,
8744		}
8745	}
8746	if err != nil {
8747		return nil, err
8748	}
8749	defer googleapi.CloseBody(res)
8750	if err := googleapi.CheckResponse(res); err != nil {
8751		return nil, err
8752	}
8753	ret := &Operation{
8754		ServerResponse: googleapi.ServerResponse{
8755			Header:         res.Header,
8756			HTTPStatusCode: res.StatusCode,
8757		},
8758	}
8759	target := &ret
8760	if err := gensupport.DecodeResponse(target, res); err != nil {
8761		return nil, err
8762	}
8763	return ret, nil
8764	// {
8765	//   "description": "Initiates the cancellation of a running cutover job.",
8766	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs/{cutoverJobsId}:cancel",
8767	//   "httpMethod": "POST",
8768	//   "id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.cancel",
8769	//   "parameterOrder": [
8770	//     "name"
8771	//   ],
8772	//   "parameters": {
8773	//     "name": {
8774	//       "description": "Required. The cutover job id",
8775	//       "location": "path",
8776	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cutoverJobs/[^/]+$",
8777	//       "required": true,
8778	//       "type": "string"
8779	//     }
8780	//   },
8781	//   "path": "v1alpha1/{+name}:cancel",
8782	//   "request": {
8783	//     "$ref": "CancelCutoverJobRequest"
8784	//   },
8785	//   "response": {
8786	//     "$ref": "Operation"
8787	//   },
8788	//   "scopes": [
8789	//     "https://www.googleapis.com/auth/cloud-platform"
8790	//   ]
8791	// }
8792
8793}
8794
8795// method id "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.create":
8796
8797type ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall struct {
8798	s          *Service
8799	parent     string
8800	cutoverjob *CutoverJob
8801	urlParams_ gensupport.URLParams
8802	ctx_       context.Context
8803	header_    http.Header
8804}
8805
8806// Create: Initiates a Cutover of a specific migrating VM. The returned
8807// LRO is completed when the cutover job resource is created and the job
8808// is initiated.
8809//
8810// - parent: The Cutover's parent.
8811func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) Create(parent string, cutoverjob *CutoverJob) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
8812	c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8813	c.parent = parent
8814	c.cutoverjob = cutoverjob
8815	return c
8816}
8817
8818// CutoverJobId sets the optional parameter "cutoverJobId": Required.
8819// The cutover job identifier.
8820func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) CutoverJobId(cutoverJobId string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
8821	c.urlParams_.Set("cutoverJobId", cutoverJobId)
8822	return c
8823}
8824
8825// RequestId sets the optional parameter "requestId": A request ID to
8826// identify requests. Specify a unique request ID so that if you must
8827// retry your request, the server will know to ignore the request if it
8828// has already been completed. The server will guarantee that for at
8829// least 60 minutes since the first request. For example, consider a
8830// situation where you make an initial request and t he request times
8831// out. If you make the request again with the same request ID, the
8832// server can check if original operation with the same request ID was
8833// received, and if so, will ignore the second request. This prevents
8834// clients from accidentally creating duplicate commitments. The request
8835// ID must be a valid UUID with the exception that zero UUID is not
8836// supported (00000000-0000-0000-0000-000000000000).
8837func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
8838	c.urlParams_.Set("requestId", requestId)
8839	return c
8840}
8841
8842// Fields allows partial responses to be retrieved. See
8843// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8844// for more information.
8845func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
8846	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8847	return c
8848}
8849
8850// Context sets the context to be used in this call's Do method. Any
8851// pending HTTP request will be aborted if the provided context is
8852// canceled.
8853func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
8854	c.ctx_ = ctx
8855	return c
8856}
8857
8858// Header returns an http.Header that can be modified by the caller to
8859// add HTTP headers to the request.
8860func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Header() http.Header {
8861	if c.header_ == nil {
8862		c.header_ = make(http.Header)
8863	}
8864	return c.header_
8865}
8866
8867func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) doRequest(alt string) (*http.Response, error) {
8868	reqHeaders := make(http.Header)
8869	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
8870	for k, v := range c.header_ {
8871		reqHeaders[k] = v
8872	}
8873	reqHeaders.Set("User-Agent", c.s.userAgent())
8874	var body io.Reader = nil
8875	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cutoverjob)
8876	if err != nil {
8877		return nil, err
8878	}
8879	reqHeaders.Set("Content-Type", "application/json")
8880	c.urlParams_.Set("alt", alt)
8881	c.urlParams_.Set("prettyPrint", "false")
8882	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/cutoverJobs")
8883	urls += "?" + c.urlParams_.Encode()
8884	req, err := http.NewRequest("POST", urls, body)
8885	if err != nil {
8886		return nil, err
8887	}
8888	req.Header = reqHeaders
8889	googleapi.Expand(req.URL, map[string]string{
8890		"parent": c.parent,
8891	})
8892	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8893}
8894
8895// Do executes the "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.create" call.
8896// Exactly one of *Operation or error will be non-nil. Any non-2xx
8897// status code is an error. Response headers are in either
8898// *Operation.ServerResponse.Header or (if a response was returned at
8899// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8900// to check whether the returned error was because
8901// http.StatusNotModified was returned.
8902func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8903	gensupport.SetOptions(c.urlParams_, opts...)
8904	res, err := c.doRequest("json")
8905	if res != nil && res.StatusCode == http.StatusNotModified {
8906		if res.Body != nil {
8907			res.Body.Close()
8908		}
8909		return nil, &googleapi.Error{
8910			Code:   res.StatusCode,
8911			Header: res.Header,
8912		}
8913	}
8914	if err != nil {
8915		return nil, err
8916	}
8917	defer googleapi.CloseBody(res)
8918	if err := googleapi.CheckResponse(res); err != nil {
8919		return nil, err
8920	}
8921	ret := &Operation{
8922		ServerResponse: googleapi.ServerResponse{
8923			Header:         res.Header,
8924			HTTPStatusCode: res.StatusCode,
8925		},
8926	}
8927	target := &ret
8928	if err := gensupport.DecodeResponse(target, res); err != nil {
8929		return nil, err
8930	}
8931	return ret, nil
8932	// {
8933	//   "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.",
8934	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs",
8935	//   "httpMethod": "POST",
8936	//   "id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.create",
8937	//   "parameterOrder": [
8938	//     "parent"
8939	//   ],
8940	//   "parameters": {
8941	//     "cutoverJobId": {
8942	//       "description": "Required. The cutover job identifier.",
8943	//       "location": "query",
8944	//       "type": "string"
8945	//     },
8946	//     "parent": {
8947	//       "description": "Required. The Cutover's parent.",
8948	//       "location": "path",
8949	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
8950	//       "required": true,
8951	//       "type": "string"
8952	//     },
8953	//     "requestId": {
8954	//       "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).",
8955	//       "location": "query",
8956	//       "type": "string"
8957	//     }
8958	//   },
8959	//   "path": "v1alpha1/{+parent}/cutoverJobs",
8960	//   "request": {
8961	//     "$ref": "CutoverJob"
8962	//   },
8963	//   "response": {
8964	//     "$ref": "Operation"
8965	//   },
8966	//   "scopes": [
8967	//     "https://www.googleapis.com/auth/cloud-platform"
8968	//   ]
8969	// }
8970
8971}
8972
8973// method id "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.get":
8974
8975type ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall struct {
8976	s            *Service
8977	name         string
8978	urlParams_   gensupport.URLParams
8979	ifNoneMatch_ string
8980	ctx_         context.Context
8981	header_      http.Header
8982}
8983
8984// Get: Gets details of a single CutoverJob.
8985//
8986// - name: The name of the CutoverJob.
8987func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) Get(name string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
8988	c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8989	c.name = name
8990	return c
8991}
8992
8993// Fields allows partial responses to be retrieved. See
8994// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8995// for more information.
8996func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
8997	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8998	return c
8999}
9000
9001// IfNoneMatch sets the optional parameter which makes the operation
9002// fail if the object's ETag matches the given value. This is useful for
9003// getting updates only after the object has changed since the last
9004// request. Use googleapi.IsNotModified to check whether the response
9005// error from Do is the result of In-None-Match.
9006func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
9007	c.ifNoneMatch_ = entityTag
9008	return c
9009}
9010
9011// Context sets the context to be used in this call's Do method. Any
9012// pending HTTP request will be aborted if the provided context is
9013// canceled.
9014func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
9015	c.ctx_ = ctx
9016	return c
9017}
9018
9019// Header returns an http.Header that can be modified by the caller to
9020// add HTTP headers to the request.
9021func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Header() http.Header {
9022	if c.header_ == nil {
9023		c.header_ = make(http.Header)
9024	}
9025	return c.header_
9026}
9027
9028func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) doRequest(alt string) (*http.Response, error) {
9029	reqHeaders := make(http.Header)
9030	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9031	for k, v := range c.header_ {
9032		reqHeaders[k] = v
9033	}
9034	reqHeaders.Set("User-Agent", c.s.userAgent())
9035	if c.ifNoneMatch_ != "" {
9036		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9037	}
9038	var body io.Reader = nil
9039	c.urlParams_.Set("alt", alt)
9040	c.urlParams_.Set("prettyPrint", "false")
9041	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
9042	urls += "?" + c.urlParams_.Encode()
9043	req, err := http.NewRequest("GET", urls, body)
9044	if err != nil {
9045		return nil, err
9046	}
9047	req.Header = reqHeaders
9048	googleapi.Expand(req.URL, map[string]string{
9049		"name": c.name,
9050	})
9051	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9052}
9053
9054// Do executes the "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.get" call.
9055// Exactly one of *CutoverJob or error will be non-nil. Any non-2xx
9056// status code is an error. Response headers are in either
9057// *CutoverJob.ServerResponse.Header or (if a response was returned at
9058// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9059// to check whether the returned error was because
9060// http.StatusNotModified was returned.
9061func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Do(opts ...googleapi.CallOption) (*CutoverJob, error) {
9062	gensupport.SetOptions(c.urlParams_, opts...)
9063	res, err := c.doRequest("json")
9064	if res != nil && res.StatusCode == http.StatusNotModified {
9065		if res.Body != nil {
9066			res.Body.Close()
9067		}
9068		return nil, &googleapi.Error{
9069			Code:   res.StatusCode,
9070			Header: res.Header,
9071		}
9072	}
9073	if err != nil {
9074		return nil, err
9075	}
9076	defer googleapi.CloseBody(res)
9077	if err := googleapi.CheckResponse(res); err != nil {
9078		return nil, err
9079	}
9080	ret := &CutoverJob{
9081		ServerResponse: googleapi.ServerResponse{
9082			Header:         res.Header,
9083			HTTPStatusCode: res.StatusCode,
9084		},
9085	}
9086	target := &ret
9087	if err := gensupport.DecodeResponse(target, res); err != nil {
9088		return nil, err
9089	}
9090	return ret, nil
9091	// {
9092	//   "description": "Gets details of a single CutoverJob.",
9093	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs/{cutoverJobsId}",
9094	//   "httpMethod": "GET",
9095	//   "id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.get",
9096	//   "parameterOrder": [
9097	//     "name"
9098	//   ],
9099	//   "parameters": {
9100	//     "name": {
9101	//       "description": "Required. The name of the CutoverJob.",
9102	//       "location": "path",
9103	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cutoverJobs/[^/]+$",
9104	//       "required": true,
9105	//       "type": "string"
9106	//     }
9107	//   },
9108	//   "path": "v1alpha1/{+name}",
9109	//   "response": {
9110	//     "$ref": "CutoverJob"
9111	//   },
9112	//   "scopes": [
9113	//     "https://www.googleapis.com/auth/cloud-platform"
9114	//   ]
9115	// }
9116
9117}
9118
9119// method id "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.list":
9120
9121type ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall struct {
9122	s            *Service
9123	parent       string
9124	urlParams_   gensupport.URLParams
9125	ifNoneMatch_ string
9126	ctx_         context.Context
9127	header_      http.Header
9128}
9129
9130// List: Lists CutoverJobs of a given migrating VM.
9131//
9132// - parent: The parent, which owns this collection of migrating VMs.
9133func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) List(parent string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9134	c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9135	c.parent = parent
9136	return c
9137}
9138
9139// Filter sets the optional parameter "filter": The filter request.
9140func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9141	c.urlParams_.Set("filter", filter)
9142	return c
9143}
9144
9145// OrderBy sets the optional parameter "orderBy": the order by fields
9146// for the result.
9147func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9148	c.urlParams_.Set("orderBy", orderBy)
9149	return c
9150}
9151
9152// PageSize sets the optional parameter "pageSize": The maximum number
9153// of cutover jobs to return. The service may return fewer than this
9154// value. If unspecified, at most 500 cutover jobs will be returned. The
9155// maximum value is 1000; values above 1000 will be coerced to 1000.
9156func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9157	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9158	return c
9159}
9160
9161// PageToken sets the optional parameter "pageToken": Required. A page
9162// token, received from a previous `ListCutoverJobs` call. Provide this
9163// to retrieve the subsequent page. When paginating, all other
9164// parameters provided to `ListCutoverJobs` must match the call that
9165// provided the page token.
9166func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9167	c.urlParams_.Set("pageToken", pageToken)
9168	return c
9169}
9170
9171// Fields allows partial responses to be retrieved. See
9172// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9173// for more information.
9174func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9175	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9176	return c
9177}
9178
9179// IfNoneMatch sets the optional parameter which makes the operation
9180// fail if the object's ETag matches the given value. This is useful for
9181// getting updates only after the object has changed since the last
9182// request. Use googleapi.IsNotModified to check whether the response
9183// error from Do is the result of In-None-Match.
9184func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9185	c.ifNoneMatch_ = entityTag
9186	return c
9187}
9188
9189// Context sets the context to be used in this call's Do method. Any
9190// pending HTTP request will be aborted if the provided context is
9191// canceled.
9192func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
9193	c.ctx_ = ctx
9194	return c
9195}
9196
9197// Header returns an http.Header that can be modified by the caller to
9198// add HTTP headers to the request.
9199func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Header() http.Header {
9200	if c.header_ == nil {
9201		c.header_ = make(http.Header)
9202	}
9203	return c.header_
9204}
9205
9206func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) doRequest(alt string) (*http.Response, error) {
9207	reqHeaders := make(http.Header)
9208	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9209	for k, v := range c.header_ {
9210		reqHeaders[k] = v
9211	}
9212	reqHeaders.Set("User-Agent", c.s.userAgent())
9213	if c.ifNoneMatch_ != "" {
9214		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9215	}
9216	var body io.Reader = nil
9217	c.urlParams_.Set("alt", alt)
9218	c.urlParams_.Set("prettyPrint", "false")
9219	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/cutoverJobs")
9220	urls += "?" + c.urlParams_.Encode()
9221	req, err := http.NewRequest("GET", urls, body)
9222	if err != nil {
9223		return nil, err
9224	}
9225	req.Header = reqHeaders
9226	googleapi.Expand(req.URL, map[string]string{
9227		"parent": c.parent,
9228	})
9229	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9230}
9231
9232// Do executes the "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.list" call.
9233// Exactly one of *ListCutoverJobsResponse or error will be non-nil. Any
9234// non-2xx status code is an error. Response headers are in either
9235// *ListCutoverJobsResponse.ServerResponse.Header or (if a response was
9236// returned at all) in error.(*googleapi.Error).Header. Use
9237// googleapi.IsNotModified to check whether the returned error was
9238// because http.StatusNotModified was returned.
9239func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Do(opts ...googleapi.CallOption) (*ListCutoverJobsResponse, error) {
9240	gensupport.SetOptions(c.urlParams_, opts...)
9241	res, err := c.doRequest("json")
9242	if res != nil && res.StatusCode == http.StatusNotModified {
9243		if res.Body != nil {
9244			res.Body.Close()
9245		}
9246		return nil, &googleapi.Error{
9247			Code:   res.StatusCode,
9248			Header: res.Header,
9249		}
9250	}
9251	if err != nil {
9252		return nil, err
9253	}
9254	defer googleapi.CloseBody(res)
9255	if err := googleapi.CheckResponse(res); err != nil {
9256		return nil, err
9257	}
9258	ret := &ListCutoverJobsResponse{
9259		ServerResponse: googleapi.ServerResponse{
9260			Header:         res.Header,
9261			HTTPStatusCode: res.StatusCode,
9262		},
9263	}
9264	target := &ret
9265	if err := gensupport.DecodeResponse(target, res); err != nil {
9266		return nil, err
9267	}
9268	return ret, nil
9269	// {
9270	//   "description": "Lists CutoverJobs of a given migrating VM.",
9271	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs",
9272	//   "httpMethod": "GET",
9273	//   "id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.list",
9274	//   "parameterOrder": [
9275	//     "parent"
9276	//   ],
9277	//   "parameters": {
9278	//     "filter": {
9279	//       "description": "Optional. The filter request.",
9280	//       "location": "query",
9281	//       "type": "string"
9282	//     },
9283	//     "orderBy": {
9284	//       "description": "Optional. the order by fields for the result.",
9285	//       "location": "query",
9286	//       "type": "string"
9287	//     },
9288	//     "pageSize": {
9289	//       "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.",
9290	//       "format": "int32",
9291	//       "location": "query",
9292	//       "type": "integer"
9293	//     },
9294	//     "pageToken": {
9295	//       "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.",
9296	//       "location": "query",
9297	//       "type": "string"
9298	//     },
9299	//     "parent": {
9300	//       "description": "Required. The parent, which owns this collection of migrating VMs.",
9301	//       "location": "path",
9302	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$",
9303	//       "required": true,
9304	//       "type": "string"
9305	//     }
9306	//   },
9307	//   "path": "v1alpha1/{+parent}/cutoverJobs",
9308	//   "response": {
9309	//     "$ref": "ListCutoverJobsResponse"
9310	//   },
9311	//   "scopes": [
9312	//     "https://www.googleapis.com/auth/cloud-platform"
9313	//   ]
9314	// }
9315
9316}
9317
9318// Pages invokes f for each page of results.
9319// A non-nil error returned from f will halt the iteration.
9320// The provided context supersedes any context provided to the Context method.
9321func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Pages(ctx context.Context, f func(*ListCutoverJobsResponse) error) error {
9322	c.ctx_ = ctx
9323	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9324	for {
9325		x, err := c.Do()
9326		if err != nil {
9327			return err
9328		}
9329		if err := f(x); err != nil {
9330			return err
9331		}
9332		if x.NextPageToken == "" {
9333			return nil
9334		}
9335		c.PageToken(x.NextPageToken)
9336	}
9337}
9338
9339// method id "vmmigration.projects.locations.sources.utilizationReports.create":
9340
9341type ProjectsLocationsSourcesUtilizationReportsCreateCall struct {
9342	s                 *Service
9343	parent            string
9344	utilizationreport *UtilizationReport
9345	urlParams_        gensupport.URLParams
9346	ctx_              context.Context
9347	header_           http.Header
9348}
9349
9350// Create: Creates a new UtilizationReport.
9351//
9352// - parent: The Utilization Report's parent.
9353func (r *ProjectsLocationsSourcesUtilizationReportsService) Create(parent string, utilizationreport *UtilizationReport) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
9354	c := &ProjectsLocationsSourcesUtilizationReportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9355	c.parent = parent
9356	c.utilizationreport = utilizationreport
9357	return c
9358}
9359
9360// RequestId sets the optional parameter "requestId": A request ID to
9361// identify requests. Specify a unique request ID so that if you must
9362// retry your request, the server will know to ignore the request if it
9363// has already been completed. The server will guarantee that for at
9364// least 60 minutes since the first request. For example, consider a
9365// situation where you make an initial request and t he request times
9366// out. If you make the request again with the same request ID, the
9367// server can check if original operation with the same request ID was
9368// received, and if so, will ignore the second request. This prevents
9369// clients from accidentally creating duplicate commitments. The request
9370// ID must be a valid UUID with the exception that zero UUID is not
9371// supported (00000000-0000-0000-0000-000000000000).
9372func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
9373	c.urlParams_.Set("requestId", requestId)
9374	return c
9375}
9376
9377// UtilizationReportId sets the optional parameter
9378// "utilizationReportId": Required. The ID to use for the report, which
9379// will become the final component of the reports's resource name. This
9380// value maximum length is 63 characters, and valid characters are
9381// /a-z-/. It must start with an english letter and must not end with a
9382// hyphen.
9383func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) UtilizationReportId(utilizationReportId string) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
9384	c.urlParams_.Set("utilizationReportId", utilizationReportId)
9385	return c
9386}
9387
9388// Fields allows partial responses to be retrieved. See
9389// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9390// for more information.
9391func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
9392	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9393	return c
9394}
9395
9396// Context sets the context to be used in this call's Do method. Any
9397// pending HTTP request will be aborted if the provided context is
9398// canceled.
9399func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
9400	c.ctx_ = ctx
9401	return c
9402}
9403
9404// Header returns an http.Header that can be modified by the caller to
9405// add HTTP headers to the request.
9406func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Header() http.Header {
9407	if c.header_ == nil {
9408		c.header_ = make(http.Header)
9409	}
9410	return c.header_
9411}
9412
9413func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) doRequest(alt string) (*http.Response, error) {
9414	reqHeaders := make(http.Header)
9415	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9416	for k, v := range c.header_ {
9417		reqHeaders[k] = v
9418	}
9419	reqHeaders.Set("User-Agent", c.s.userAgent())
9420	var body io.Reader = nil
9421	body, err := googleapi.WithoutDataWrapper.JSONReader(c.utilizationreport)
9422	if err != nil {
9423		return nil, err
9424	}
9425	reqHeaders.Set("Content-Type", "application/json")
9426	c.urlParams_.Set("alt", alt)
9427	c.urlParams_.Set("prettyPrint", "false")
9428	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/utilizationReports")
9429	urls += "?" + c.urlParams_.Encode()
9430	req, err := http.NewRequest("POST", urls, body)
9431	if err != nil {
9432		return nil, err
9433	}
9434	req.Header = reqHeaders
9435	googleapi.Expand(req.URL, map[string]string{
9436		"parent": c.parent,
9437	})
9438	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9439}
9440
9441// Do executes the "vmmigration.projects.locations.sources.utilizationReports.create" call.
9442// Exactly one of *Operation or error will be non-nil. Any non-2xx
9443// status code is an error. Response headers are in either
9444// *Operation.ServerResponse.Header or (if a response was returned at
9445// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9446// to check whether the returned error was because
9447// http.StatusNotModified was returned.
9448func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9449	gensupport.SetOptions(c.urlParams_, opts...)
9450	res, err := c.doRequest("json")
9451	if res != nil && res.StatusCode == http.StatusNotModified {
9452		if res.Body != nil {
9453			res.Body.Close()
9454		}
9455		return nil, &googleapi.Error{
9456			Code:   res.StatusCode,
9457			Header: res.Header,
9458		}
9459	}
9460	if err != nil {
9461		return nil, err
9462	}
9463	defer googleapi.CloseBody(res)
9464	if err := googleapi.CheckResponse(res); err != nil {
9465		return nil, err
9466	}
9467	ret := &Operation{
9468		ServerResponse: googleapi.ServerResponse{
9469			Header:         res.Header,
9470			HTTPStatusCode: res.StatusCode,
9471		},
9472	}
9473	target := &ret
9474	if err := gensupport.DecodeResponse(target, res); err != nil {
9475		return nil, err
9476	}
9477	return ret, nil
9478	// {
9479	//   "description": "Creates a new UtilizationReport.",
9480	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports",
9481	//   "httpMethod": "POST",
9482	//   "id": "vmmigration.projects.locations.sources.utilizationReports.create",
9483	//   "parameterOrder": [
9484	//     "parent"
9485	//   ],
9486	//   "parameters": {
9487	//     "parent": {
9488	//       "description": "Required. The Utilization Report's parent.",
9489	//       "location": "path",
9490	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
9491	//       "required": true,
9492	//       "type": "string"
9493	//     },
9494	//     "requestId": {
9495	//       "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).",
9496	//       "location": "query",
9497	//       "type": "string"
9498	//     },
9499	//     "utilizationReportId": {
9500	//       "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.",
9501	//       "location": "query",
9502	//       "type": "string"
9503	//     }
9504	//   },
9505	//   "path": "v1alpha1/{+parent}/utilizationReports",
9506	//   "request": {
9507	//     "$ref": "UtilizationReport"
9508	//   },
9509	//   "response": {
9510	//     "$ref": "Operation"
9511	//   },
9512	//   "scopes": [
9513	//     "https://www.googleapis.com/auth/cloud-platform"
9514	//   ]
9515	// }
9516
9517}
9518
9519// method id "vmmigration.projects.locations.sources.utilizationReports.delete":
9520
9521type ProjectsLocationsSourcesUtilizationReportsDeleteCall struct {
9522	s          *Service
9523	name       string
9524	urlParams_ gensupport.URLParams
9525	ctx_       context.Context
9526	header_    http.Header
9527}
9528
9529// Delete: Deletes a single Utilization Report.
9530//
9531// - name: The Utilization Report name.
9532func (r *ProjectsLocationsSourcesUtilizationReportsService) Delete(name string) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
9533	c := &ProjectsLocationsSourcesUtilizationReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9534	c.name = name
9535	return c
9536}
9537
9538// RequestId sets the optional parameter "requestId": A request ID to
9539// identify requests. Specify a unique request ID so that if you must
9540// retry your request, the server will know to ignore the request if it
9541// has already been completed. The server will guarantee that for at
9542// least 60 minutes after the first request. For example, consider a
9543// situation where you make an initial request and t he request times
9544// out. If you make the request again with the same request ID, the
9545// server can check if original operation with the same request ID was
9546// received, and if so, will ignore the second request. This prevents
9547// clients from accidentally creating duplicate commitments. The request
9548// ID must be a valid UUID with the exception that zero UUID is not
9549// supported (00000000-0000-0000-0000-000000000000).
9550func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
9551	c.urlParams_.Set("requestId", requestId)
9552	return c
9553}
9554
9555// Fields allows partial responses to be retrieved. See
9556// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9557// for more information.
9558func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
9559	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9560	return c
9561}
9562
9563// Context sets the context to be used in this call's Do method. Any
9564// pending HTTP request will be aborted if the provided context is
9565// canceled.
9566func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
9567	c.ctx_ = ctx
9568	return c
9569}
9570
9571// Header returns an http.Header that can be modified by the caller to
9572// add HTTP headers to the request.
9573func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Header() http.Header {
9574	if c.header_ == nil {
9575		c.header_ = make(http.Header)
9576	}
9577	return c.header_
9578}
9579
9580func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
9581	reqHeaders := make(http.Header)
9582	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9583	for k, v := range c.header_ {
9584		reqHeaders[k] = v
9585	}
9586	reqHeaders.Set("User-Agent", c.s.userAgent())
9587	var body io.Reader = nil
9588	c.urlParams_.Set("alt", alt)
9589	c.urlParams_.Set("prettyPrint", "false")
9590	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
9591	urls += "?" + c.urlParams_.Encode()
9592	req, err := http.NewRequest("DELETE", urls, body)
9593	if err != nil {
9594		return nil, err
9595	}
9596	req.Header = reqHeaders
9597	googleapi.Expand(req.URL, map[string]string{
9598		"name": c.name,
9599	})
9600	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9601}
9602
9603// Do executes the "vmmigration.projects.locations.sources.utilizationReports.delete" call.
9604// Exactly one of *Operation or error will be non-nil. Any non-2xx
9605// status code is an error. Response headers are in either
9606// *Operation.ServerResponse.Header or (if a response was returned at
9607// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9608// to check whether the returned error was because
9609// http.StatusNotModified was returned.
9610func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9611	gensupport.SetOptions(c.urlParams_, opts...)
9612	res, err := c.doRequest("json")
9613	if res != nil && res.StatusCode == http.StatusNotModified {
9614		if res.Body != nil {
9615			res.Body.Close()
9616		}
9617		return nil, &googleapi.Error{
9618			Code:   res.StatusCode,
9619			Header: res.Header,
9620		}
9621	}
9622	if err != nil {
9623		return nil, err
9624	}
9625	defer googleapi.CloseBody(res)
9626	if err := googleapi.CheckResponse(res); err != nil {
9627		return nil, err
9628	}
9629	ret := &Operation{
9630		ServerResponse: googleapi.ServerResponse{
9631			Header:         res.Header,
9632			HTTPStatusCode: res.StatusCode,
9633		},
9634	}
9635	target := &ret
9636	if err := gensupport.DecodeResponse(target, res); err != nil {
9637		return nil, err
9638	}
9639	return ret, nil
9640	// {
9641	//   "description": "Deletes a single Utilization Report.",
9642	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports/{utilizationReportsId}",
9643	//   "httpMethod": "DELETE",
9644	//   "id": "vmmigration.projects.locations.sources.utilizationReports.delete",
9645	//   "parameterOrder": [
9646	//     "name"
9647	//   ],
9648	//   "parameters": {
9649	//     "name": {
9650	//       "description": "Required. The Utilization Report name.",
9651	//       "location": "path",
9652	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/utilizationReports/[^/]+$",
9653	//       "required": true,
9654	//       "type": "string"
9655	//     },
9656	//     "requestId": {
9657	//       "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).",
9658	//       "location": "query",
9659	//       "type": "string"
9660	//     }
9661	//   },
9662	//   "path": "v1alpha1/{+name}",
9663	//   "response": {
9664	//     "$ref": "Operation"
9665	//   },
9666	//   "scopes": [
9667	//     "https://www.googleapis.com/auth/cloud-platform"
9668	//   ]
9669	// }
9670
9671}
9672
9673// method id "vmmigration.projects.locations.sources.utilizationReports.get":
9674
9675type ProjectsLocationsSourcesUtilizationReportsGetCall struct {
9676	s            *Service
9677	name         string
9678	urlParams_   gensupport.URLParams
9679	ifNoneMatch_ string
9680	ctx_         context.Context
9681	header_      http.Header
9682}
9683
9684// Get: Gets a single Utilization Report.
9685//
9686// - name: The Utilization Report name.
9687func (r *ProjectsLocationsSourcesUtilizationReportsService) Get(name string) *ProjectsLocationsSourcesUtilizationReportsGetCall {
9688	c := &ProjectsLocationsSourcesUtilizationReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9689	c.name = name
9690	return c
9691}
9692
9693// View sets the optional parameter "view": The level of details of the
9694// report. Defaults to FULL
9695//
9696// Possible values:
9697//   "UTILIZATION_REPORT_VIEW_UNSPECIFIED" - The default / unset value.
9698// The API will default to FULL on single report request and BASIC for
9699// multiple reports request.
9700//   "BASIC" - Get the report metadata, without the list of VMs and
9701// their utilization info.
9702//   "FULL" - Include everything.
9703func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) View(view string) *ProjectsLocationsSourcesUtilizationReportsGetCall {
9704	c.urlParams_.Set("view", view)
9705	return c
9706}
9707
9708// Fields allows partial responses to be retrieved. See
9709// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9710// for more information.
9711func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsGetCall {
9712	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9713	return c
9714}
9715
9716// IfNoneMatch sets the optional parameter which makes the operation
9717// fail if the object's ETag matches the given value. This is useful for
9718// getting updates only after the object has changed since the last
9719// request. Use googleapi.IsNotModified to check whether the response
9720// error from Do is the result of In-None-Match.
9721func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesUtilizationReportsGetCall {
9722	c.ifNoneMatch_ = entityTag
9723	return c
9724}
9725
9726// Context sets the context to be used in this call's Do method. Any
9727// pending HTTP request will be aborted if the provided context is
9728// canceled.
9729func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsGetCall {
9730	c.ctx_ = ctx
9731	return c
9732}
9733
9734// Header returns an http.Header that can be modified by the caller to
9735// add HTTP headers to the request.
9736func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Header() http.Header {
9737	if c.header_ == nil {
9738		c.header_ = make(http.Header)
9739	}
9740	return c.header_
9741}
9742
9743func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) doRequest(alt string) (*http.Response, error) {
9744	reqHeaders := make(http.Header)
9745	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9746	for k, v := range c.header_ {
9747		reqHeaders[k] = v
9748	}
9749	reqHeaders.Set("User-Agent", c.s.userAgent())
9750	if c.ifNoneMatch_ != "" {
9751		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9752	}
9753	var body io.Reader = nil
9754	c.urlParams_.Set("alt", alt)
9755	c.urlParams_.Set("prettyPrint", "false")
9756	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
9757	urls += "?" + c.urlParams_.Encode()
9758	req, err := http.NewRequest("GET", urls, body)
9759	if err != nil {
9760		return nil, err
9761	}
9762	req.Header = reqHeaders
9763	googleapi.Expand(req.URL, map[string]string{
9764		"name": c.name,
9765	})
9766	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9767}
9768
9769// Do executes the "vmmigration.projects.locations.sources.utilizationReports.get" call.
9770// Exactly one of *UtilizationReport or error will be non-nil. Any
9771// non-2xx status code is an error. Response headers are in either
9772// *UtilizationReport.ServerResponse.Header or (if a response was
9773// returned at all) in error.(*googleapi.Error).Header. Use
9774// googleapi.IsNotModified to check whether the returned error was
9775// because http.StatusNotModified was returned.
9776func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Do(opts ...googleapi.CallOption) (*UtilizationReport, error) {
9777	gensupport.SetOptions(c.urlParams_, opts...)
9778	res, err := c.doRequest("json")
9779	if res != nil && res.StatusCode == http.StatusNotModified {
9780		if res.Body != nil {
9781			res.Body.Close()
9782		}
9783		return nil, &googleapi.Error{
9784			Code:   res.StatusCode,
9785			Header: res.Header,
9786		}
9787	}
9788	if err != nil {
9789		return nil, err
9790	}
9791	defer googleapi.CloseBody(res)
9792	if err := googleapi.CheckResponse(res); err != nil {
9793		return nil, err
9794	}
9795	ret := &UtilizationReport{
9796		ServerResponse: googleapi.ServerResponse{
9797			Header:         res.Header,
9798			HTTPStatusCode: res.StatusCode,
9799		},
9800	}
9801	target := &ret
9802	if err := gensupport.DecodeResponse(target, res); err != nil {
9803		return nil, err
9804	}
9805	return ret, nil
9806	// {
9807	//   "description": "Gets a single Utilization Report.",
9808	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports/{utilizationReportsId}",
9809	//   "httpMethod": "GET",
9810	//   "id": "vmmigration.projects.locations.sources.utilizationReports.get",
9811	//   "parameterOrder": [
9812	//     "name"
9813	//   ],
9814	//   "parameters": {
9815	//     "name": {
9816	//       "description": "Required. The Utilization Report name.",
9817	//       "location": "path",
9818	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/utilizationReports/[^/]+$",
9819	//       "required": true,
9820	//       "type": "string"
9821	//     },
9822	//     "view": {
9823	//       "description": "Optional. The level of details of the report. Defaults to FULL",
9824	//       "enum": [
9825	//         "UTILIZATION_REPORT_VIEW_UNSPECIFIED",
9826	//         "BASIC",
9827	//         "FULL"
9828	//       ],
9829	//       "enumDescriptions": [
9830	//         "The default / unset value. The API will default to FULL on single report request and BASIC for multiple reports request.",
9831	//         "Get the report metadata, without the list of VMs and their utilization info.",
9832	//         "Include everything."
9833	//       ],
9834	//       "location": "query",
9835	//       "type": "string"
9836	//     }
9837	//   },
9838	//   "path": "v1alpha1/{+name}",
9839	//   "response": {
9840	//     "$ref": "UtilizationReport"
9841	//   },
9842	//   "scopes": [
9843	//     "https://www.googleapis.com/auth/cloud-platform"
9844	//   ]
9845	// }
9846
9847}
9848
9849// method id "vmmigration.projects.locations.sources.utilizationReports.list":
9850
9851type ProjectsLocationsSourcesUtilizationReportsListCall struct {
9852	s            *Service
9853	parent       string
9854	urlParams_   gensupport.URLParams
9855	ifNoneMatch_ string
9856	ctx_         context.Context
9857	header_      http.Header
9858}
9859
9860// List: Lists Utilization Reports of the given Source.
9861//
9862// - parent: The Utilization Reports parent.
9863func (r *ProjectsLocationsSourcesUtilizationReportsService) List(parent string) *ProjectsLocationsSourcesUtilizationReportsListCall {
9864	c := &ProjectsLocationsSourcesUtilizationReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9865	c.parent = parent
9866	return c
9867}
9868
9869// Filter sets the optional parameter "filter": The filter request.
9870func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Filter(filter string) *ProjectsLocationsSourcesUtilizationReportsListCall {
9871	c.urlParams_.Set("filter", filter)
9872	return c
9873}
9874
9875// OrderBy sets the optional parameter "orderBy": the order by fields
9876// for the result.
9877func (c *ProjectsLocationsSourcesUtilizationReportsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesUtilizationReportsListCall {
9878	c.urlParams_.Set("orderBy", orderBy)
9879	return c
9880}
9881
9882// PageSize sets the optional parameter "pageSize": The maximum number
9883// of reports to return. The service may return fewer than this value.
9884// If unspecified, at most 500 reports will be returned. The maximum
9885// value is 1000; values above 1000 will be coerced to 1000.
9886func (c *ProjectsLocationsSourcesUtilizationReportsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesUtilizationReportsListCall {
9887	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9888	return c
9889}
9890
9891// PageToken sets the optional parameter "pageToken": Required. A page
9892// token, received from a previous `ListUtilizationReports` call.
9893// Provide this to retrieve the subsequent page. When paginating, all
9894// other parameters provided to `ListUtilizationReports` must match the
9895// call that provided the page token.
9896func (c *ProjectsLocationsSourcesUtilizationReportsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesUtilizationReportsListCall {
9897	c.urlParams_.Set("pageToken", pageToken)
9898	return c
9899}
9900
9901// View sets the optional parameter "view": The level of details of each
9902// report. Defaults to BASIC.
9903//
9904// Possible values:
9905//   "UTILIZATION_REPORT_VIEW_UNSPECIFIED" - The default / unset value.
9906// The API will default to FULL on single report request and BASIC for
9907// multiple reports request.
9908//   "BASIC" - Get the report metadata, without the list of VMs and
9909// their utilization info.
9910//   "FULL" - Include everything.
9911func (c *ProjectsLocationsSourcesUtilizationReportsListCall) View(view string) *ProjectsLocationsSourcesUtilizationReportsListCall {
9912	c.urlParams_.Set("view", view)
9913	return c
9914}
9915
9916// Fields allows partial responses to be retrieved. See
9917// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9918// for more information.
9919func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsListCall {
9920	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9921	return c
9922}
9923
9924// IfNoneMatch sets the optional parameter which makes the operation
9925// fail if the object's ETag matches the given value. This is useful for
9926// getting updates only after the object has changed since the last
9927// request. Use googleapi.IsNotModified to check whether the response
9928// error from Do is the result of In-None-Match.
9929func (c *ProjectsLocationsSourcesUtilizationReportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesUtilizationReportsListCall {
9930	c.ifNoneMatch_ = entityTag
9931	return c
9932}
9933
9934// Context sets the context to be used in this call's Do method. Any
9935// pending HTTP request will be aborted if the provided context is
9936// canceled.
9937func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsListCall {
9938	c.ctx_ = ctx
9939	return c
9940}
9941
9942// Header returns an http.Header that can be modified by the caller to
9943// add HTTP headers to the request.
9944func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Header() http.Header {
9945	if c.header_ == nil {
9946		c.header_ = make(http.Header)
9947	}
9948	return c.header_
9949}
9950
9951func (c *ProjectsLocationsSourcesUtilizationReportsListCall) doRequest(alt string) (*http.Response, error) {
9952	reqHeaders := make(http.Header)
9953	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
9954	for k, v := range c.header_ {
9955		reqHeaders[k] = v
9956	}
9957	reqHeaders.Set("User-Agent", c.s.userAgent())
9958	if c.ifNoneMatch_ != "" {
9959		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9960	}
9961	var body io.Reader = nil
9962	c.urlParams_.Set("alt", alt)
9963	c.urlParams_.Set("prettyPrint", "false")
9964	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/utilizationReports")
9965	urls += "?" + c.urlParams_.Encode()
9966	req, err := http.NewRequest("GET", urls, body)
9967	if err != nil {
9968		return nil, err
9969	}
9970	req.Header = reqHeaders
9971	googleapi.Expand(req.URL, map[string]string{
9972		"parent": c.parent,
9973	})
9974	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9975}
9976
9977// Do executes the "vmmigration.projects.locations.sources.utilizationReports.list" call.
9978// Exactly one of *ListUtilizationReportsResponse or error will be
9979// non-nil. Any non-2xx status code is an error. Response headers are in
9980// either *ListUtilizationReportsResponse.ServerResponse.Header or (if a
9981// response was returned at all) in error.(*googleapi.Error).Header. Use
9982// googleapi.IsNotModified to check whether the returned error was
9983// because http.StatusNotModified was returned.
9984func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Do(opts ...googleapi.CallOption) (*ListUtilizationReportsResponse, error) {
9985	gensupport.SetOptions(c.urlParams_, opts...)
9986	res, err := c.doRequest("json")
9987	if res != nil && res.StatusCode == http.StatusNotModified {
9988		if res.Body != nil {
9989			res.Body.Close()
9990		}
9991		return nil, &googleapi.Error{
9992			Code:   res.StatusCode,
9993			Header: res.Header,
9994		}
9995	}
9996	if err != nil {
9997		return nil, err
9998	}
9999	defer googleapi.CloseBody(res)
10000	if err := googleapi.CheckResponse(res); err != nil {
10001		return nil, err
10002	}
10003	ret := &ListUtilizationReportsResponse{
10004		ServerResponse: googleapi.ServerResponse{
10005			Header:         res.Header,
10006			HTTPStatusCode: res.StatusCode,
10007		},
10008	}
10009	target := &ret
10010	if err := gensupport.DecodeResponse(target, res); err != nil {
10011		return nil, err
10012	}
10013	return ret, nil
10014	// {
10015	//   "description": "Lists Utilization Reports of the given Source.",
10016	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports",
10017	//   "httpMethod": "GET",
10018	//   "id": "vmmigration.projects.locations.sources.utilizationReports.list",
10019	//   "parameterOrder": [
10020	//     "parent"
10021	//   ],
10022	//   "parameters": {
10023	//     "filter": {
10024	//       "description": "Optional. The filter request.",
10025	//       "location": "query",
10026	//       "type": "string"
10027	//     },
10028	//     "orderBy": {
10029	//       "description": "Optional. the order by fields for the result.",
10030	//       "location": "query",
10031	//       "type": "string"
10032	//     },
10033	//     "pageSize": {
10034	//       "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.",
10035	//       "format": "int32",
10036	//       "location": "query",
10037	//       "type": "integer"
10038	//     },
10039	//     "pageToken": {
10040	//       "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.",
10041	//       "location": "query",
10042	//       "type": "string"
10043	//     },
10044	//     "parent": {
10045	//       "description": "Required. The Utilization Reports parent.",
10046	//       "location": "path",
10047	//       "pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$",
10048	//       "required": true,
10049	//       "type": "string"
10050	//     },
10051	//     "view": {
10052	//       "description": "Optional. The level of details of each report. Defaults to BASIC.",
10053	//       "enum": [
10054	//         "UTILIZATION_REPORT_VIEW_UNSPECIFIED",
10055	//         "BASIC",
10056	//         "FULL"
10057	//       ],
10058	//       "enumDescriptions": [
10059	//         "The default / unset value. The API will default to FULL on single report request and BASIC for multiple reports request.",
10060	//         "Get the report metadata, without the list of VMs and their utilization info.",
10061	//         "Include everything."
10062	//       ],
10063	//       "location": "query",
10064	//       "type": "string"
10065	//     }
10066	//   },
10067	//   "path": "v1alpha1/{+parent}/utilizationReports",
10068	//   "response": {
10069	//     "$ref": "ListUtilizationReportsResponse"
10070	//   },
10071	//   "scopes": [
10072	//     "https://www.googleapis.com/auth/cloud-platform"
10073	//   ]
10074	// }
10075
10076}
10077
10078// Pages invokes f for each page of results.
10079// A non-nil error returned from f will halt the iteration.
10080// The provided context supersedes any context provided to the Context method.
10081func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Pages(ctx context.Context, f func(*ListUtilizationReportsResponse) error) error {
10082	c.ctx_ = ctx
10083	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10084	for {
10085		x, err := c.Do()
10086		if err != nil {
10087			return err
10088		}
10089		if err := f(x); err != nil {
10090			return err
10091		}
10092		if x.NextPageToken == "" {
10093			return nil
10094		}
10095		c.PageToken(x.NextPageToken)
10096	}
10097}
10098
10099// method id "vmmigration.projects.locations.targetProjects.create":
10100
10101type ProjectsLocationsTargetProjectsCreateCall struct {
10102	s             *Service
10103	parent        string
10104	targetproject *TargetProject
10105	urlParams_    gensupport.URLParams
10106	ctx_          context.Context
10107	header_       http.Header
10108}
10109
10110// Create: Creates a new TargetProject in a given project. NOTE:
10111// TargetProject is a global resource; hence the only supported value
10112// for location is `global`.
10113//
10114// - parent: The TargetProject's parent.
10115func (r *ProjectsLocationsTargetProjectsService) Create(parent string, targetproject *TargetProject) *ProjectsLocationsTargetProjectsCreateCall {
10116	c := &ProjectsLocationsTargetProjectsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10117	c.parent = parent
10118	c.targetproject = targetproject
10119	return c
10120}
10121
10122// RequestId sets the optional parameter "requestId": A request ID to
10123// identify requests. Specify a unique request ID so that if you must
10124// retry your request, the server will know to ignore the request if it
10125// has already been completed. The server will guarantee that for at
10126// least 60 minutes since the first request. For example, consider a
10127// situation where you make an initial request and t he request times
10128// out. If you make the request again with the same request ID, the
10129// server can check if original operation with the same request ID was
10130// received, and if so, will ignore the second request. This prevents
10131// clients from accidentally creating duplicate commitments. The request
10132// ID must be a valid UUID with the exception that zero UUID is not
10133// supported (00000000-0000-0000-0000-000000000000).
10134func (c *ProjectsLocationsTargetProjectsCreateCall) RequestId(requestId string) *ProjectsLocationsTargetProjectsCreateCall {
10135	c.urlParams_.Set("requestId", requestId)
10136	return c
10137}
10138
10139// TargetProjectId sets the optional parameter "targetProjectId":
10140// Required. The target_project identifier.
10141func (c *ProjectsLocationsTargetProjectsCreateCall) TargetProjectId(targetProjectId string) *ProjectsLocationsTargetProjectsCreateCall {
10142	c.urlParams_.Set("targetProjectId", targetProjectId)
10143	return c
10144}
10145
10146// Fields allows partial responses to be retrieved. See
10147// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10148// for more information.
10149func (c *ProjectsLocationsTargetProjectsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsCreateCall {
10150	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10151	return c
10152}
10153
10154// Context sets the context to be used in this call's Do method. Any
10155// pending HTTP request will be aborted if the provided context is
10156// canceled.
10157func (c *ProjectsLocationsTargetProjectsCreateCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsCreateCall {
10158	c.ctx_ = ctx
10159	return c
10160}
10161
10162// Header returns an http.Header that can be modified by the caller to
10163// add HTTP headers to the request.
10164func (c *ProjectsLocationsTargetProjectsCreateCall) Header() http.Header {
10165	if c.header_ == nil {
10166		c.header_ = make(http.Header)
10167	}
10168	return c.header_
10169}
10170
10171func (c *ProjectsLocationsTargetProjectsCreateCall) doRequest(alt string) (*http.Response, error) {
10172	reqHeaders := make(http.Header)
10173	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10174	for k, v := range c.header_ {
10175		reqHeaders[k] = v
10176	}
10177	reqHeaders.Set("User-Agent", c.s.userAgent())
10178	var body io.Reader = nil
10179	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetproject)
10180	if err != nil {
10181		return nil, err
10182	}
10183	reqHeaders.Set("Content-Type", "application/json")
10184	c.urlParams_.Set("alt", alt)
10185	c.urlParams_.Set("prettyPrint", "false")
10186	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/targetProjects")
10187	urls += "?" + c.urlParams_.Encode()
10188	req, err := http.NewRequest("POST", urls, body)
10189	if err != nil {
10190		return nil, err
10191	}
10192	req.Header = reqHeaders
10193	googleapi.Expand(req.URL, map[string]string{
10194		"parent": c.parent,
10195	})
10196	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10197}
10198
10199// Do executes the "vmmigration.projects.locations.targetProjects.create" call.
10200// Exactly one of *Operation or error will be non-nil. Any non-2xx
10201// status code is an error. Response headers are in either
10202// *Operation.ServerResponse.Header or (if a response was returned at
10203// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10204// to check whether the returned error was because
10205// http.StatusNotModified was returned.
10206func (c *ProjectsLocationsTargetProjectsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10207	gensupport.SetOptions(c.urlParams_, opts...)
10208	res, err := c.doRequest("json")
10209	if res != nil && res.StatusCode == http.StatusNotModified {
10210		if res.Body != nil {
10211			res.Body.Close()
10212		}
10213		return nil, &googleapi.Error{
10214			Code:   res.StatusCode,
10215			Header: res.Header,
10216		}
10217	}
10218	if err != nil {
10219		return nil, err
10220	}
10221	defer googleapi.CloseBody(res)
10222	if err := googleapi.CheckResponse(res); err != nil {
10223		return nil, err
10224	}
10225	ret := &Operation{
10226		ServerResponse: googleapi.ServerResponse{
10227			Header:         res.Header,
10228			HTTPStatusCode: res.StatusCode,
10229		},
10230	}
10231	target := &ret
10232	if err := gensupport.DecodeResponse(target, res); err != nil {
10233		return nil, err
10234	}
10235	return ret, nil
10236	// {
10237	//   "description": "Creates a new TargetProject in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.",
10238	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/targetProjects",
10239	//   "httpMethod": "POST",
10240	//   "id": "vmmigration.projects.locations.targetProjects.create",
10241	//   "parameterOrder": [
10242	//     "parent"
10243	//   ],
10244	//   "parameters": {
10245	//     "parent": {
10246	//       "description": "Required. The TargetProject's parent.",
10247	//       "location": "path",
10248	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
10249	//       "required": true,
10250	//       "type": "string"
10251	//     },
10252	//     "requestId": {
10253	//       "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).",
10254	//       "location": "query",
10255	//       "type": "string"
10256	//     },
10257	//     "targetProjectId": {
10258	//       "description": "Required. The target_project identifier.",
10259	//       "location": "query",
10260	//       "type": "string"
10261	//     }
10262	//   },
10263	//   "path": "v1alpha1/{+parent}/targetProjects",
10264	//   "request": {
10265	//     "$ref": "TargetProject"
10266	//   },
10267	//   "response": {
10268	//     "$ref": "Operation"
10269	//   },
10270	//   "scopes": [
10271	//     "https://www.googleapis.com/auth/cloud-platform"
10272	//   ]
10273	// }
10274
10275}
10276
10277// method id "vmmigration.projects.locations.targetProjects.delete":
10278
10279type ProjectsLocationsTargetProjectsDeleteCall struct {
10280	s          *Service
10281	name       string
10282	urlParams_ gensupport.URLParams
10283	ctx_       context.Context
10284	header_    http.Header
10285}
10286
10287// Delete: Deletes a single TargetProject. NOTE: TargetProject is a
10288// global resource; hence the only supported value for location is
10289// `global`.
10290//
10291// - name: The TargetProject name.
10292func (r *ProjectsLocationsTargetProjectsService) Delete(name string) *ProjectsLocationsTargetProjectsDeleteCall {
10293	c := &ProjectsLocationsTargetProjectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10294	c.name = name
10295	return c
10296}
10297
10298// RequestId sets the optional parameter "requestId": A request ID to
10299// identify requests. Specify a unique request ID so that if you must
10300// retry your request, the server will know to ignore the request if it
10301// has already been completed. The server will guarantee that for at
10302// least 60 minutes after the first request. For example, consider a
10303// situation where you make an initial request and t he request times
10304// out. If you make the request again with the same request ID, the
10305// server can check if original operation with the same request ID was
10306// received, and if so, will ignore the second request. This prevents
10307// clients from accidentally creating duplicate commitments. The request
10308// ID must be a valid UUID with the exception that zero UUID is not
10309// supported (00000000-0000-0000-0000-000000000000).
10310func (c *ProjectsLocationsTargetProjectsDeleteCall) RequestId(requestId string) *ProjectsLocationsTargetProjectsDeleteCall {
10311	c.urlParams_.Set("requestId", requestId)
10312	return c
10313}
10314
10315// Fields allows partial responses to be retrieved. See
10316// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10317// for more information.
10318func (c *ProjectsLocationsTargetProjectsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsDeleteCall {
10319	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10320	return c
10321}
10322
10323// Context sets the context to be used in this call's Do method. Any
10324// pending HTTP request will be aborted if the provided context is
10325// canceled.
10326func (c *ProjectsLocationsTargetProjectsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsDeleteCall {
10327	c.ctx_ = ctx
10328	return c
10329}
10330
10331// Header returns an http.Header that can be modified by the caller to
10332// add HTTP headers to the request.
10333func (c *ProjectsLocationsTargetProjectsDeleteCall) Header() http.Header {
10334	if c.header_ == nil {
10335		c.header_ = make(http.Header)
10336	}
10337	return c.header_
10338}
10339
10340func (c *ProjectsLocationsTargetProjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
10341	reqHeaders := make(http.Header)
10342	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10343	for k, v := range c.header_ {
10344		reqHeaders[k] = v
10345	}
10346	reqHeaders.Set("User-Agent", c.s.userAgent())
10347	var body io.Reader = nil
10348	c.urlParams_.Set("alt", alt)
10349	c.urlParams_.Set("prettyPrint", "false")
10350	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
10351	urls += "?" + c.urlParams_.Encode()
10352	req, err := http.NewRequest("DELETE", urls, body)
10353	if err != nil {
10354		return nil, err
10355	}
10356	req.Header = reqHeaders
10357	googleapi.Expand(req.URL, map[string]string{
10358		"name": c.name,
10359	})
10360	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10361}
10362
10363// Do executes the "vmmigration.projects.locations.targetProjects.delete" call.
10364// Exactly one of *Operation or error will be non-nil. Any non-2xx
10365// status code is an error. Response headers are in either
10366// *Operation.ServerResponse.Header or (if a response was returned at
10367// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10368// to check whether the returned error was because
10369// http.StatusNotModified was returned.
10370func (c *ProjectsLocationsTargetProjectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10371	gensupport.SetOptions(c.urlParams_, opts...)
10372	res, err := c.doRequest("json")
10373	if res != nil && res.StatusCode == http.StatusNotModified {
10374		if res.Body != nil {
10375			res.Body.Close()
10376		}
10377		return nil, &googleapi.Error{
10378			Code:   res.StatusCode,
10379			Header: res.Header,
10380		}
10381	}
10382	if err != nil {
10383		return nil, err
10384	}
10385	defer googleapi.CloseBody(res)
10386	if err := googleapi.CheckResponse(res); err != nil {
10387		return nil, err
10388	}
10389	ret := &Operation{
10390		ServerResponse: googleapi.ServerResponse{
10391			Header:         res.Header,
10392			HTTPStatusCode: res.StatusCode,
10393		},
10394	}
10395	target := &ret
10396	if err := gensupport.DecodeResponse(target, res); err != nil {
10397		return nil, err
10398	}
10399	return ret, nil
10400	// {
10401	//   "description": "Deletes a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.",
10402	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/targetProjects/{targetProjectsId}",
10403	//   "httpMethod": "DELETE",
10404	//   "id": "vmmigration.projects.locations.targetProjects.delete",
10405	//   "parameterOrder": [
10406	//     "name"
10407	//   ],
10408	//   "parameters": {
10409	//     "name": {
10410	//       "description": "Required. The TargetProject name.",
10411	//       "location": "path",
10412	//       "pattern": "^projects/[^/]+/locations/[^/]+/targetProjects/[^/]+$",
10413	//       "required": true,
10414	//       "type": "string"
10415	//     },
10416	//     "requestId": {
10417	//       "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).",
10418	//       "location": "query",
10419	//       "type": "string"
10420	//     }
10421	//   },
10422	//   "path": "v1alpha1/{+name}",
10423	//   "response": {
10424	//     "$ref": "Operation"
10425	//   },
10426	//   "scopes": [
10427	//     "https://www.googleapis.com/auth/cloud-platform"
10428	//   ]
10429	// }
10430
10431}
10432
10433// method id "vmmigration.projects.locations.targetProjects.get":
10434
10435type ProjectsLocationsTargetProjectsGetCall struct {
10436	s            *Service
10437	name         string
10438	urlParams_   gensupport.URLParams
10439	ifNoneMatch_ string
10440	ctx_         context.Context
10441	header_      http.Header
10442}
10443
10444// Get: Gets details of a single TargetProject. NOTE: TargetProject is a
10445// global resource; hence the only supported value for location is
10446// `global`.
10447//
10448// - name: The TargetProject name.
10449func (r *ProjectsLocationsTargetProjectsService) Get(name string) *ProjectsLocationsTargetProjectsGetCall {
10450	c := &ProjectsLocationsTargetProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10451	c.name = name
10452	return c
10453}
10454
10455// Fields allows partial responses to be retrieved. See
10456// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10457// for more information.
10458func (c *ProjectsLocationsTargetProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsGetCall {
10459	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10460	return c
10461}
10462
10463// IfNoneMatch sets the optional parameter which makes the operation
10464// fail if the object's ETag matches the given value. This is useful for
10465// getting updates only after the object has changed since the last
10466// request. Use googleapi.IsNotModified to check whether the response
10467// error from Do is the result of In-None-Match.
10468func (c *ProjectsLocationsTargetProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTargetProjectsGetCall {
10469	c.ifNoneMatch_ = entityTag
10470	return c
10471}
10472
10473// Context sets the context to be used in this call's Do method. Any
10474// pending HTTP request will be aborted if the provided context is
10475// canceled.
10476func (c *ProjectsLocationsTargetProjectsGetCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsGetCall {
10477	c.ctx_ = ctx
10478	return c
10479}
10480
10481// Header returns an http.Header that can be modified by the caller to
10482// add HTTP headers to the request.
10483func (c *ProjectsLocationsTargetProjectsGetCall) Header() http.Header {
10484	if c.header_ == nil {
10485		c.header_ = make(http.Header)
10486	}
10487	return c.header_
10488}
10489
10490func (c *ProjectsLocationsTargetProjectsGetCall) doRequest(alt string) (*http.Response, error) {
10491	reqHeaders := make(http.Header)
10492	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10493	for k, v := range c.header_ {
10494		reqHeaders[k] = v
10495	}
10496	reqHeaders.Set("User-Agent", c.s.userAgent())
10497	if c.ifNoneMatch_ != "" {
10498		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10499	}
10500	var body io.Reader = nil
10501	c.urlParams_.Set("alt", alt)
10502	c.urlParams_.Set("prettyPrint", "false")
10503	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
10504	urls += "?" + c.urlParams_.Encode()
10505	req, err := http.NewRequest("GET", urls, body)
10506	if err != nil {
10507		return nil, err
10508	}
10509	req.Header = reqHeaders
10510	googleapi.Expand(req.URL, map[string]string{
10511		"name": c.name,
10512	})
10513	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10514}
10515
10516// Do executes the "vmmigration.projects.locations.targetProjects.get" call.
10517// Exactly one of *TargetProject or error will be non-nil. Any non-2xx
10518// status code is an error. Response headers are in either
10519// *TargetProject.ServerResponse.Header or (if a response was returned
10520// at all) in error.(*googleapi.Error).Header. Use
10521// googleapi.IsNotModified to check whether the returned error was
10522// because http.StatusNotModified was returned.
10523func (c *ProjectsLocationsTargetProjectsGetCall) Do(opts ...googleapi.CallOption) (*TargetProject, error) {
10524	gensupport.SetOptions(c.urlParams_, opts...)
10525	res, err := c.doRequest("json")
10526	if res != nil && res.StatusCode == http.StatusNotModified {
10527		if res.Body != nil {
10528			res.Body.Close()
10529		}
10530		return nil, &googleapi.Error{
10531			Code:   res.StatusCode,
10532			Header: res.Header,
10533		}
10534	}
10535	if err != nil {
10536		return nil, err
10537	}
10538	defer googleapi.CloseBody(res)
10539	if err := googleapi.CheckResponse(res); err != nil {
10540		return nil, err
10541	}
10542	ret := &TargetProject{
10543		ServerResponse: googleapi.ServerResponse{
10544			Header:         res.Header,
10545			HTTPStatusCode: res.StatusCode,
10546		},
10547	}
10548	target := &ret
10549	if err := gensupport.DecodeResponse(target, res); err != nil {
10550		return nil, err
10551	}
10552	return ret, nil
10553	// {
10554	//   "description": "Gets details of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.",
10555	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/targetProjects/{targetProjectsId}",
10556	//   "httpMethod": "GET",
10557	//   "id": "vmmigration.projects.locations.targetProjects.get",
10558	//   "parameterOrder": [
10559	//     "name"
10560	//   ],
10561	//   "parameters": {
10562	//     "name": {
10563	//       "description": "Required. The TargetProject name.",
10564	//       "location": "path",
10565	//       "pattern": "^projects/[^/]+/locations/[^/]+/targetProjects/[^/]+$",
10566	//       "required": true,
10567	//       "type": "string"
10568	//     }
10569	//   },
10570	//   "path": "v1alpha1/{+name}",
10571	//   "response": {
10572	//     "$ref": "TargetProject"
10573	//   },
10574	//   "scopes": [
10575	//     "https://www.googleapis.com/auth/cloud-platform"
10576	//   ]
10577	// }
10578
10579}
10580
10581// method id "vmmigration.projects.locations.targetProjects.list":
10582
10583type ProjectsLocationsTargetProjectsListCall struct {
10584	s            *Service
10585	parent       string
10586	urlParams_   gensupport.URLParams
10587	ifNoneMatch_ string
10588	ctx_         context.Context
10589	header_      http.Header
10590}
10591
10592// List: Lists TargetProjects in a given project. NOTE: TargetProject is
10593// a global resource; hence the only supported value for location is
10594// `global`.
10595//
10596// - parent: The parent, which owns this collection of targets.
10597func (r *ProjectsLocationsTargetProjectsService) List(parent string) *ProjectsLocationsTargetProjectsListCall {
10598	c := &ProjectsLocationsTargetProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10599	c.parent = parent
10600	return c
10601}
10602
10603// Filter sets the optional parameter "filter": The filter request.
10604func (c *ProjectsLocationsTargetProjectsListCall) Filter(filter string) *ProjectsLocationsTargetProjectsListCall {
10605	c.urlParams_.Set("filter", filter)
10606	return c
10607}
10608
10609// OrderBy sets the optional parameter "orderBy": the order by fields
10610// for the result.
10611func (c *ProjectsLocationsTargetProjectsListCall) OrderBy(orderBy string) *ProjectsLocationsTargetProjectsListCall {
10612	c.urlParams_.Set("orderBy", orderBy)
10613	return c
10614}
10615
10616// PageSize sets the optional parameter "pageSize": The maximum number
10617// of targets to return. The service may return fewer than this value.
10618// If unspecified, at most 500 targets will be returned. The maximum
10619// value is 1000; values above 1000 will be coerced to 1000.
10620func (c *ProjectsLocationsTargetProjectsListCall) PageSize(pageSize int64) *ProjectsLocationsTargetProjectsListCall {
10621	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10622	return c
10623}
10624
10625// PageToken sets the optional parameter "pageToken": Required. A page
10626// token, received from a previous `ListTargets` call. Provide this to
10627// retrieve the subsequent page. When paginating, all other parameters
10628// provided to `ListTargets` must match the call that provided the page
10629// token.
10630func (c *ProjectsLocationsTargetProjectsListCall) PageToken(pageToken string) *ProjectsLocationsTargetProjectsListCall {
10631	c.urlParams_.Set("pageToken", pageToken)
10632	return c
10633}
10634
10635// Fields allows partial responses to be retrieved. See
10636// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10637// for more information.
10638func (c *ProjectsLocationsTargetProjectsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsListCall {
10639	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10640	return c
10641}
10642
10643// IfNoneMatch sets the optional parameter which makes the operation
10644// fail if the object's ETag matches the given value. This is useful for
10645// getting updates only after the object has changed since the last
10646// request. Use googleapi.IsNotModified to check whether the response
10647// error from Do is the result of In-None-Match.
10648func (c *ProjectsLocationsTargetProjectsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTargetProjectsListCall {
10649	c.ifNoneMatch_ = entityTag
10650	return c
10651}
10652
10653// Context sets the context to be used in this call's Do method. Any
10654// pending HTTP request will be aborted if the provided context is
10655// canceled.
10656func (c *ProjectsLocationsTargetProjectsListCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsListCall {
10657	c.ctx_ = ctx
10658	return c
10659}
10660
10661// Header returns an http.Header that can be modified by the caller to
10662// add HTTP headers to the request.
10663func (c *ProjectsLocationsTargetProjectsListCall) Header() http.Header {
10664	if c.header_ == nil {
10665		c.header_ = make(http.Header)
10666	}
10667	return c.header_
10668}
10669
10670func (c *ProjectsLocationsTargetProjectsListCall) doRequest(alt string) (*http.Response, error) {
10671	reqHeaders := make(http.Header)
10672	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10673	for k, v := range c.header_ {
10674		reqHeaders[k] = v
10675	}
10676	reqHeaders.Set("User-Agent", c.s.userAgent())
10677	if c.ifNoneMatch_ != "" {
10678		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10679	}
10680	var body io.Reader = nil
10681	c.urlParams_.Set("alt", alt)
10682	c.urlParams_.Set("prettyPrint", "false")
10683	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/targetProjects")
10684	urls += "?" + c.urlParams_.Encode()
10685	req, err := http.NewRequest("GET", urls, body)
10686	if err != nil {
10687		return nil, err
10688	}
10689	req.Header = reqHeaders
10690	googleapi.Expand(req.URL, map[string]string{
10691		"parent": c.parent,
10692	})
10693	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10694}
10695
10696// Do executes the "vmmigration.projects.locations.targetProjects.list" call.
10697// Exactly one of *ListTargetProjectsResponse or error will be non-nil.
10698// Any non-2xx status code is an error. Response headers are in either
10699// *ListTargetProjectsResponse.ServerResponse.Header or (if a response
10700// was returned at all) in error.(*googleapi.Error).Header. Use
10701// googleapi.IsNotModified to check whether the returned error was
10702// because http.StatusNotModified was returned.
10703func (c *ProjectsLocationsTargetProjectsListCall) Do(opts ...googleapi.CallOption) (*ListTargetProjectsResponse, error) {
10704	gensupport.SetOptions(c.urlParams_, opts...)
10705	res, err := c.doRequest("json")
10706	if res != nil && res.StatusCode == http.StatusNotModified {
10707		if res.Body != nil {
10708			res.Body.Close()
10709		}
10710		return nil, &googleapi.Error{
10711			Code:   res.StatusCode,
10712			Header: res.Header,
10713		}
10714	}
10715	if err != nil {
10716		return nil, err
10717	}
10718	defer googleapi.CloseBody(res)
10719	if err := googleapi.CheckResponse(res); err != nil {
10720		return nil, err
10721	}
10722	ret := &ListTargetProjectsResponse{
10723		ServerResponse: googleapi.ServerResponse{
10724			Header:         res.Header,
10725			HTTPStatusCode: res.StatusCode,
10726		},
10727	}
10728	target := &ret
10729	if err := gensupport.DecodeResponse(target, res); err != nil {
10730		return nil, err
10731	}
10732	return ret, nil
10733	// {
10734	//   "description": "Lists TargetProjects in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.",
10735	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/targetProjects",
10736	//   "httpMethod": "GET",
10737	//   "id": "vmmigration.projects.locations.targetProjects.list",
10738	//   "parameterOrder": [
10739	//     "parent"
10740	//   ],
10741	//   "parameters": {
10742	//     "filter": {
10743	//       "description": "Optional. The filter request.",
10744	//       "location": "query",
10745	//       "type": "string"
10746	//     },
10747	//     "orderBy": {
10748	//       "description": "Optional. the order by fields for the result.",
10749	//       "location": "query",
10750	//       "type": "string"
10751	//     },
10752	//     "pageSize": {
10753	//       "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.",
10754	//       "format": "int32",
10755	//       "location": "query",
10756	//       "type": "integer"
10757	//     },
10758	//     "pageToken": {
10759	//       "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.",
10760	//       "location": "query",
10761	//       "type": "string"
10762	//     },
10763	//     "parent": {
10764	//       "description": "Required. The parent, which owns this collection of targets.",
10765	//       "location": "path",
10766	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
10767	//       "required": true,
10768	//       "type": "string"
10769	//     }
10770	//   },
10771	//   "path": "v1alpha1/{+parent}/targetProjects",
10772	//   "response": {
10773	//     "$ref": "ListTargetProjectsResponse"
10774	//   },
10775	//   "scopes": [
10776	//     "https://www.googleapis.com/auth/cloud-platform"
10777	//   ]
10778	// }
10779
10780}
10781
10782// Pages invokes f for each page of results.
10783// A non-nil error returned from f will halt the iteration.
10784// The provided context supersedes any context provided to the Context method.
10785func (c *ProjectsLocationsTargetProjectsListCall) Pages(ctx context.Context, f func(*ListTargetProjectsResponse) error) error {
10786	c.ctx_ = ctx
10787	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10788	for {
10789		x, err := c.Do()
10790		if err != nil {
10791			return err
10792		}
10793		if err := f(x); err != nil {
10794			return err
10795		}
10796		if x.NextPageToken == "" {
10797			return nil
10798		}
10799		c.PageToken(x.NextPageToken)
10800	}
10801}
10802
10803// method id "vmmigration.projects.locations.targetProjects.patch":
10804
10805type ProjectsLocationsTargetProjectsPatchCall struct {
10806	s             *Service
10807	name          string
10808	targetproject *TargetProject
10809	urlParams_    gensupport.URLParams
10810	ctx_          context.Context
10811	header_       http.Header
10812}
10813
10814// Patch: Updates the parameters of a single TargetProject. NOTE:
10815// TargetProject is a global resource; hence the only supported value
10816// for location is `global`.
10817//
10818// - name: The name of the target project.
10819func (r *ProjectsLocationsTargetProjectsService) Patch(name string, targetproject *TargetProject) *ProjectsLocationsTargetProjectsPatchCall {
10820	c := &ProjectsLocationsTargetProjectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10821	c.name = name
10822	c.targetproject = targetproject
10823	return c
10824}
10825
10826// RequestId sets the optional parameter "requestId": A request ID to
10827// identify requests. Specify a unique request ID so that if you must
10828// retry your request, the server will know to ignore the request if it
10829// has already been completed. The server will guarantee that for at
10830// least 60 minutes since the first request. For example, consider a
10831// situation where you make an initial request and t he request times
10832// out. If you make the request again with the same request ID, the
10833// server can check if original operation with the same request ID was
10834// received, and if so, will ignore the second request. This prevents
10835// clients from accidentally creating duplicate commitments. The request
10836// ID must be a valid UUID with the exception that zero UUID is not
10837// supported (00000000-0000-0000-0000-000000000000).
10838func (c *ProjectsLocationsTargetProjectsPatchCall) RequestId(requestId string) *ProjectsLocationsTargetProjectsPatchCall {
10839	c.urlParams_.Set("requestId", requestId)
10840	return c
10841}
10842
10843// UpdateMask sets the optional parameter "updateMask": Field mask is
10844// used to specify the fields to be overwritten in the TargetProject
10845// resource by the update. The fields specified in the update_mask are
10846// relative to the resource, not the full request. A field will be
10847// overwritten if it is in the mask. If the user does not provide a mask
10848// then all fields will be overwritten.
10849func (c *ProjectsLocationsTargetProjectsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTargetProjectsPatchCall {
10850	c.urlParams_.Set("updateMask", updateMask)
10851	return c
10852}
10853
10854// Fields allows partial responses to be retrieved. See
10855// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10856// for more information.
10857func (c *ProjectsLocationsTargetProjectsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsPatchCall {
10858	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10859	return c
10860}
10861
10862// Context sets the context to be used in this call's Do method. Any
10863// pending HTTP request will be aborted if the provided context is
10864// canceled.
10865func (c *ProjectsLocationsTargetProjectsPatchCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsPatchCall {
10866	c.ctx_ = ctx
10867	return c
10868}
10869
10870// Header returns an http.Header that can be modified by the caller to
10871// add HTTP headers to the request.
10872func (c *ProjectsLocationsTargetProjectsPatchCall) Header() http.Header {
10873	if c.header_ == nil {
10874		c.header_ = make(http.Header)
10875	}
10876	return c.header_
10877}
10878
10879func (c *ProjectsLocationsTargetProjectsPatchCall) doRequest(alt string) (*http.Response, error) {
10880	reqHeaders := make(http.Header)
10881	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027")
10882	for k, v := range c.header_ {
10883		reqHeaders[k] = v
10884	}
10885	reqHeaders.Set("User-Agent", c.s.userAgent())
10886	var body io.Reader = nil
10887	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetproject)
10888	if err != nil {
10889		return nil, err
10890	}
10891	reqHeaders.Set("Content-Type", "application/json")
10892	c.urlParams_.Set("alt", alt)
10893	c.urlParams_.Set("prettyPrint", "false")
10894	urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}")
10895	urls += "?" + c.urlParams_.Encode()
10896	req, err := http.NewRequest("PATCH", urls, body)
10897	if err != nil {
10898		return nil, err
10899	}
10900	req.Header = reqHeaders
10901	googleapi.Expand(req.URL, map[string]string{
10902		"name": c.name,
10903	})
10904	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10905}
10906
10907// Do executes the "vmmigration.projects.locations.targetProjects.patch" call.
10908// Exactly one of *Operation or error will be non-nil. Any non-2xx
10909// status code is an error. Response headers are in either
10910// *Operation.ServerResponse.Header or (if a response was returned at
10911// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10912// to check whether the returned error was because
10913// http.StatusNotModified was returned.
10914func (c *ProjectsLocationsTargetProjectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10915	gensupport.SetOptions(c.urlParams_, opts...)
10916	res, err := c.doRequest("json")
10917	if res != nil && res.StatusCode == http.StatusNotModified {
10918		if res.Body != nil {
10919			res.Body.Close()
10920		}
10921		return nil, &googleapi.Error{
10922			Code:   res.StatusCode,
10923			Header: res.Header,
10924		}
10925	}
10926	if err != nil {
10927		return nil, err
10928	}
10929	defer googleapi.CloseBody(res)
10930	if err := googleapi.CheckResponse(res); err != nil {
10931		return nil, err
10932	}
10933	ret := &Operation{
10934		ServerResponse: googleapi.ServerResponse{
10935			Header:         res.Header,
10936			HTTPStatusCode: res.StatusCode,
10937		},
10938	}
10939	target := &ret
10940	if err := gensupport.DecodeResponse(target, res); err != nil {
10941		return nil, err
10942	}
10943	return ret, nil
10944	// {
10945	//   "description": "Updates the parameters of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.",
10946	//   "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/targetProjects/{targetProjectsId}",
10947	//   "httpMethod": "PATCH",
10948	//   "id": "vmmigration.projects.locations.targetProjects.patch",
10949	//   "parameterOrder": [
10950	//     "name"
10951	//   ],
10952	//   "parameters": {
10953	//     "name": {
10954	//       "description": "The name of the target project.",
10955	//       "location": "path",
10956	//       "pattern": "^projects/[^/]+/locations/[^/]+/targetProjects/[^/]+$",
10957	//       "required": true,
10958	//       "type": "string"
10959	//     },
10960	//     "requestId": {
10961	//       "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).",
10962	//       "location": "query",
10963	//       "type": "string"
10964	//     },
10965	//     "updateMask": {
10966	//       "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.",
10967	//       "format": "google-fieldmask",
10968	//       "location": "query",
10969	//       "type": "string"
10970	//     }
10971	//   },
10972	//   "path": "v1alpha1/{+name}",
10973	//   "request": {
10974	//     "$ref": "TargetProject"
10975	//   },
10976	//   "response": {
10977	//     "$ref": "Operation"
10978	//   },
10979	//   "scopes": [
10980	//     "https://www.googleapis.com/auth/cloud-platform"
10981	//   ]
10982	// }
10983
10984}
10985