...

Source file src/google.golang.org/api/vmmigration/v1/vmmigration-gen.go

Documentation: google.golang.org/api/vmmigration/v1

     1  // Copyright 2024 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/virtual-machines
    10  //
    11  // # Library status
    12  //
    13  // These client libraries are officially supported by Google. However, this
    14  // library is considered complete and is in maintenance mode. This means
    15  // that we will address critical bugs and security issues but will not add
    16  // any new features.
    17  //
    18  // When possible, we recommend using our newer
    19  // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
    20  // that are still actively being worked and iterated on.
    21  //
    22  // # Creating a client
    23  //
    24  // Usage example:
    25  //
    26  //	import "google.golang.org/api/vmmigration/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	vmmigrationService, err := vmmigration.NewService(ctx)
    30  //
    31  // In this example, Google Application Default Credentials are used for
    32  // authentication. For information on how to create and obtain Application
    33  // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
    34  //
    35  // # Other authentication options
    36  //
    37  // To use an API key for authentication (note: some APIs do not support API
    38  // keys), use [google.golang.org/api/option.WithAPIKey]:
    39  //
    40  //	vmmigrationService, err := vmmigration.NewService(ctx, option.WithAPIKey("AIza..."))
    41  //
    42  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    43  // flow, use [google.golang.org/api/option.WithTokenSource]:
    44  //
    45  //	config := &oauth2.Config{...}
    46  //	// ...
    47  //	token, err := config.Exchange(ctx, ...)
    48  //	vmmigrationService, err := vmmigration.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package vmmigration // import "google.golang.org/api/vmmigration/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "vmmigration:v1"
    90  const apiName = "vmmigration"
    91  const apiVersion = "v1"
    92  const basePath = "https://vmmigration.googleapis.com/"
    93  const basePathTemplate = "https://vmmigration.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://vmmigration.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new Service. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service struct {
   143  	client    *http.Client
   144  	BasePath  string // API endpoint base URL
   145  	UserAgent string // optional additional User-Agent fragment
   146  
   147  	Projects *ProjectsService
   148  }
   149  
   150  func (s *Service) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewProjectsService(s *Service) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Locations = NewProjectsLocationsService(s)
   160  	return rs
   161  }
   162  
   163  type ProjectsService struct {
   164  	s *Service
   165  
   166  	Locations *ProjectsLocationsService
   167  }
   168  
   169  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   170  	rs := &ProjectsLocationsService{s: s}
   171  	rs.Groups = NewProjectsLocationsGroupsService(s)
   172  	rs.ImageImports = NewProjectsLocationsImageImportsService(s)
   173  	rs.Operations = NewProjectsLocationsOperationsService(s)
   174  	rs.Sources = NewProjectsLocationsSourcesService(s)
   175  	rs.TargetProjects = NewProjectsLocationsTargetProjectsService(s)
   176  	return rs
   177  }
   178  
   179  type ProjectsLocationsService struct {
   180  	s *Service
   181  
   182  	Groups *ProjectsLocationsGroupsService
   183  
   184  	ImageImports *ProjectsLocationsImageImportsService
   185  
   186  	Operations *ProjectsLocationsOperationsService
   187  
   188  	Sources *ProjectsLocationsSourcesService
   189  
   190  	TargetProjects *ProjectsLocationsTargetProjectsService
   191  }
   192  
   193  func NewProjectsLocationsGroupsService(s *Service) *ProjectsLocationsGroupsService {
   194  	rs := &ProjectsLocationsGroupsService{s: s}
   195  	return rs
   196  }
   197  
   198  type ProjectsLocationsGroupsService struct {
   199  	s *Service
   200  }
   201  
   202  func NewProjectsLocationsImageImportsService(s *Service) *ProjectsLocationsImageImportsService {
   203  	rs := &ProjectsLocationsImageImportsService{s: s}
   204  	rs.ImageImportJobs = NewProjectsLocationsImageImportsImageImportJobsService(s)
   205  	return rs
   206  }
   207  
   208  type ProjectsLocationsImageImportsService struct {
   209  	s *Service
   210  
   211  	ImageImportJobs *ProjectsLocationsImageImportsImageImportJobsService
   212  }
   213  
   214  func NewProjectsLocationsImageImportsImageImportJobsService(s *Service) *ProjectsLocationsImageImportsImageImportJobsService {
   215  	rs := &ProjectsLocationsImageImportsImageImportJobsService{s: s}
   216  	return rs
   217  }
   218  
   219  type ProjectsLocationsImageImportsImageImportJobsService struct {
   220  	s *Service
   221  }
   222  
   223  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   224  	rs := &ProjectsLocationsOperationsService{s: s}
   225  	return rs
   226  }
   227  
   228  type ProjectsLocationsOperationsService struct {
   229  	s *Service
   230  }
   231  
   232  func NewProjectsLocationsSourcesService(s *Service) *ProjectsLocationsSourcesService {
   233  	rs := &ProjectsLocationsSourcesService{s: s}
   234  	rs.DatacenterConnectors = NewProjectsLocationsSourcesDatacenterConnectorsService(s)
   235  	rs.MigratingVms = NewProjectsLocationsSourcesMigratingVmsService(s)
   236  	rs.UtilizationReports = NewProjectsLocationsSourcesUtilizationReportsService(s)
   237  	return rs
   238  }
   239  
   240  type ProjectsLocationsSourcesService struct {
   241  	s *Service
   242  
   243  	DatacenterConnectors *ProjectsLocationsSourcesDatacenterConnectorsService
   244  
   245  	MigratingVms *ProjectsLocationsSourcesMigratingVmsService
   246  
   247  	UtilizationReports *ProjectsLocationsSourcesUtilizationReportsService
   248  }
   249  
   250  func NewProjectsLocationsSourcesDatacenterConnectorsService(s *Service) *ProjectsLocationsSourcesDatacenterConnectorsService {
   251  	rs := &ProjectsLocationsSourcesDatacenterConnectorsService{s: s}
   252  	return rs
   253  }
   254  
   255  type ProjectsLocationsSourcesDatacenterConnectorsService struct {
   256  	s *Service
   257  }
   258  
   259  func NewProjectsLocationsSourcesMigratingVmsService(s *Service) *ProjectsLocationsSourcesMigratingVmsService {
   260  	rs := &ProjectsLocationsSourcesMigratingVmsService{s: s}
   261  	rs.CloneJobs = NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s)
   262  	rs.CutoverJobs = NewProjectsLocationsSourcesMigratingVmsCutoverJobsService(s)
   263  	rs.ReplicationCycles = NewProjectsLocationsSourcesMigratingVmsReplicationCyclesService(s)
   264  	return rs
   265  }
   266  
   267  type ProjectsLocationsSourcesMigratingVmsService struct {
   268  	s *Service
   269  
   270  	CloneJobs *ProjectsLocationsSourcesMigratingVmsCloneJobsService
   271  
   272  	CutoverJobs *ProjectsLocationsSourcesMigratingVmsCutoverJobsService
   273  
   274  	ReplicationCycles *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService
   275  }
   276  
   277  func NewProjectsLocationsSourcesMigratingVmsCloneJobsService(s *Service) *ProjectsLocationsSourcesMigratingVmsCloneJobsService {
   278  	rs := &ProjectsLocationsSourcesMigratingVmsCloneJobsService{s: s}
   279  	return rs
   280  }
   281  
   282  type ProjectsLocationsSourcesMigratingVmsCloneJobsService struct {
   283  	s *Service
   284  }
   285  
   286  func NewProjectsLocationsSourcesMigratingVmsCutoverJobsService(s *Service) *ProjectsLocationsSourcesMigratingVmsCutoverJobsService {
   287  	rs := &ProjectsLocationsSourcesMigratingVmsCutoverJobsService{s: s}
   288  	return rs
   289  }
   290  
   291  type ProjectsLocationsSourcesMigratingVmsCutoverJobsService struct {
   292  	s *Service
   293  }
   294  
   295  func NewProjectsLocationsSourcesMigratingVmsReplicationCyclesService(s *Service) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService {
   296  	rs := &ProjectsLocationsSourcesMigratingVmsReplicationCyclesService{s: s}
   297  	return rs
   298  }
   299  
   300  type ProjectsLocationsSourcesMigratingVmsReplicationCyclesService struct {
   301  	s *Service
   302  }
   303  
   304  func NewProjectsLocationsSourcesUtilizationReportsService(s *Service) *ProjectsLocationsSourcesUtilizationReportsService {
   305  	rs := &ProjectsLocationsSourcesUtilizationReportsService{s: s}
   306  	return rs
   307  }
   308  
   309  type ProjectsLocationsSourcesUtilizationReportsService struct {
   310  	s *Service
   311  }
   312  
   313  func NewProjectsLocationsTargetProjectsService(s *Service) *ProjectsLocationsTargetProjectsService {
   314  	rs := &ProjectsLocationsTargetProjectsService{s: s}
   315  	return rs
   316  }
   317  
   318  type ProjectsLocationsTargetProjectsService struct {
   319  	s *Service
   320  }
   321  
   322  // AccessKeyCredentials: Message describing AWS Credentials using access key id
   323  // and secret.
   324  type AccessKeyCredentials struct {
   325  	// AccessKeyId: AWS access key ID.
   326  	AccessKeyId string `json:"accessKeyId,omitempty"`
   327  	// SecretAccessKey: Input only. AWS secret access key.
   328  	SecretAccessKey string `json:"secretAccessKey,omitempty"`
   329  	// SessionToken: Input only. AWS session token. Used only when AWS security
   330  	// token service (STS) is responsible for creating the temporary credentials.
   331  	SessionToken string `json:"sessionToken,omitempty"`
   332  	// ForceSendFields is a list of field names (e.g. "AccessKeyId") to
   333  	// unconditionally include in API requests. By default, fields with empty or
   334  	// default values are omitted from API requests. See
   335  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   336  	// details.
   337  	ForceSendFields []string `json:"-"`
   338  	// NullFields is a list of field names (e.g. "AccessKeyId") to include in API
   339  	// requests with the JSON null value. By default, fields with empty values are
   340  	// omitted from API requests. See
   341  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   342  	NullFields []string `json:"-"`
   343  }
   344  
   345  func (s *AccessKeyCredentials) MarshalJSON() ([]byte, error) {
   346  	type NoMethod AccessKeyCredentials
   347  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   348  }
   349  
   350  // AdaptingOSStep: AdaptingOSStep contains specific step details.
   351  type AdaptingOSStep struct {
   352  }
   353  
   354  // AddGroupMigrationRequest: Request message for 'AddGroupMigration' request.
   355  type AddGroupMigrationRequest struct {
   356  	// MigratingVm: The full path name of the MigratingVm to add.
   357  	MigratingVm string `json:"migratingVm,omitempty"`
   358  	// ForceSendFields is a list of field names (e.g. "MigratingVm") to
   359  	// unconditionally include in API requests. By default, fields with empty or
   360  	// default values are omitted from API requests. See
   361  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   362  	// details.
   363  	ForceSendFields []string `json:"-"`
   364  	// NullFields is a list of field names (e.g. "MigratingVm") to include in API
   365  	// requests with the JSON null value. By default, fields with empty values are
   366  	// omitted from API requests. See
   367  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   368  	NullFields []string `json:"-"`
   369  }
   370  
   371  func (s *AddGroupMigrationRequest) MarshalJSON() ([]byte, error) {
   372  	type NoMethod AddGroupMigrationRequest
   373  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   374  }
   375  
   376  // ApplianceVersion: Describes an appliance version.
   377  type ApplianceVersion struct {
   378  	// Critical: Determine whether it's critical to upgrade the appliance to this
   379  	// version.
   380  	Critical bool `json:"critical,omitempty"`
   381  	// ReleaseNotesUri: Link to a page that contains the version release notes.
   382  	ReleaseNotesUri string `json:"releaseNotesUri,omitempty"`
   383  	// Uri: A link for downloading the version.
   384  	Uri string `json:"uri,omitempty"`
   385  	// Version: The appliance version.
   386  	Version string `json:"version,omitempty"`
   387  	// ForceSendFields is a list of field names (e.g. "Critical") to
   388  	// unconditionally include in API requests. By default, fields with empty or
   389  	// default values are omitted from API requests. See
   390  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   391  	// details.
   392  	ForceSendFields []string `json:"-"`
   393  	// NullFields is a list of field names (e.g. "Critical") to include in API
   394  	// requests with the JSON null value. By default, fields with empty values are
   395  	// omitted from API requests. See
   396  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   397  	NullFields []string `json:"-"`
   398  }
   399  
   400  func (s *ApplianceVersion) MarshalJSON() ([]byte, error) {
   401  	type NoMethod ApplianceVersion
   402  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   403  }
   404  
   405  // AppliedLicense: AppliedLicense holds the license data returned by adaptation
   406  // module report.
   407  type AppliedLicense struct {
   408  	// OsLicense: The OS license returned from the adaptation module's report.
   409  	OsLicense string `json:"osLicense,omitempty"`
   410  	// Type: The license type that was used in OS adaptation.
   411  	//
   412  	// Possible values:
   413  	//   "TYPE_UNSPECIFIED" - Unspecified license for the OS.
   414  	//   "NONE" - No license available for the OS.
   415  	//   "PAYG" - The license type is Pay As You Go license type.
   416  	//   "BYOL" - The license type is Bring Your Own License type.
   417  	Type string `json:"type,omitempty"`
   418  	// ForceSendFields is a list of field names (e.g. "OsLicense") to
   419  	// unconditionally include in API requests. By default, fields with empty or
   420  	// default values are omitted from API requests. See
   421  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   422  	// details.
   423  	ForceSendFields []string `json:"-"`
   424  	// NullFields is a list of field names (e.g. "OsLicense") to include in API
   425  	// requests with the JSON null value. By default, fields with empty values are
   426  	// omitted from API requests. See
   427  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   428  	NullFields []string `json:"-"`
   429  }
   430  
   431  func (s *AppliedLicense) MarshalJSON() ([]byte, error) {
   432  	type NoMethod AppliedLicense
   433  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   434  }
   435  
   436  // AvailableUpdates: Holds informatiom about the available versions for
   437  // upgrade.
   438  type AvailableUpdates struct {
   439  	// InPlaceUpdate: The latest version for in place update. The current appliance
   440  	// can be updated to this version using the API or m4c CLI.
   441  	InPlaceUpdate *ApplianceVersion `json:"inPlaceUpdate,omitempty"`
   442  	// NewDeployableAppliance: The newest deployable version of the appliance. The
   443  	// current appliance can't be updated into this version, and the owner must
   444  	// manually deploy this OVA to a new appliance.
   445  	NewDeployableAppliance *ApplianceVersion `json:"newDeployableAppliance,omitempty"`
   446  	// ForceSendFields is a list of field names (e.g. "InPlaceUpdate") to
   447  	// unconditionally include in API requests. By default, fields with empty or
   448  	// default values are omitted from API requests. See
   449  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   450  	// details.
   451  	ForceSendFields []string `json:"-"`
   452  	// NullFields is a list of field names (e.g. "InPlaceUpdate") to include in API
   453  	// requests with the JSON null value. By default, fields with empty values are
   454  	// omitted from API requests. See
   455  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   456  	NullFields []string `json:"-"`
   457  }
   458  
   459  func (s *AvailableUpdates) MarshalJSON() ([]byte, error) {
   460  	type NoMethod AvailableUpdates
   461  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   462  }
   463  
   464  // AwsDiskDetails: The details of an AWS instance disk.
   465  type AwsDiskDetails struct {
   466  	// DiskNumber: The ordinal number of the disk.
   467  	DiskNumber int64 `json:"diskNumber,omitempty"`
   468  	// SizeGb: Size in GB.
   469  	SizeGb int64 `json:"sizeGb,omitempty,string"`
   470  	// VolumeId: AWS volume ID.
   471  	VolumeId string `json:"volumeId,omitempty"`
   472  	// ForceSendFields is a list of field names (e.g. "DiskNumber") to
   473  	// unconditionally include in API requests. By default, fields with empty or
   474  	// default values are omitted from API requests. See
   475  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   476  	// details.
   477  	ForceSendFields []string `json:"-"`
   478  	// NullFields is a list of field names (e.g. "DiskNumber") to include in API
   479  	// requests with the JSON null value. By default, fields with empty values are
   480  	// omitted from API requests. See
   481  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   482  	NullFields []string `json:"-"`
   483  }
   484  
   485  func (s *AwsDiskDetails) MarshalJSON() ([]byte, error) {
   486  	type NoMethod AwsDiskDetails
   487  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   488  }
   489  
   490  // AwsSecurityGroup: AwsSecurityGroup describes a security group of an AWS VM.
   491  type AwsSecurityGroup struct {
   492  	// Id: The AWS security group id.
   493  	Id string `json:"id,omitempty"`
   494  	// Name: The AWS security group name.
   495  	Name string `json:"name,omitempty"`
   496  	// ForceSendFields is a list of field names (e.g. "Id") to unconditionally
   497  	// include in API requests. By default, fields with empty or default values are
   498  	// omitted from API requests. See
   499  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   500  	// details.
   501  	ForceSendFields []string `json:"-"`
   502  	// NullFields is a list of field names (e.g. "Id") to include in API requests
   503  	// with the JSON null value. By default, fields with empty values are omitted
   504  	// from API requests. See
   505  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   506  	NullFields []string `json:"-"`
   507  }
   508  
   509  func (s *AwsSecurityGroup) MarshalJSON() ([]byte, error) {
   510  	type NoMethod AwsSecurityGroup
   511  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   512  }
   513  
   514  // AwsSourceDetails: AwsSourceDetails message describes a specific source
   515  // details for the AWS source type.
   516  type AwsSourceDetails struct {
   517  	// AccessKeyCreds: AWS Credentials using access key id and secret.
   518  	AccessKeyCreds *AccessKeyCredentials `json:"accessKeyCreds,omitempty"`
   519  	// AwsRegion: Immutable. The AWS region that the source VMs will be migrated
   520  	// from.
   521  	AwsRegion string `json:"awsRegion,omitempty"`
   522  	// Error: Output only. Provides details on the state of the Source in case of
   523  	// an error.
   524  	Error *Status `json:"error,omitempty"`
   525  	// InventorySecurityGroupNames: AWS security group names to limit the scope of
   526  	// the source inventory.
   527  	InventorySecurityGroupNames []string `json:"inventorySecurityGroupNames,omitempty"`
   528  	// InventoryTagList: AWS resource tags to limit the scope of the source
   529  	// inventory.
   530  	InventoryTagList []*Tag `json:"inventoryTagList,omitempty"`
   531  	// MigrationResourcesUserTags: User specified tags to add to every M2VM
   532  	// generated resource in AWS. These tags will be set in addition to the default
   533  	// tags that are set as part of the migration process. The tags must not begin
   534  	// with the reserved prefix `m2vm`.
   535  	MigrationResourcesUserTags map[string]string `json:"migrationResourcesUserTags,omitempty"`
   536  	// PublicIp: Output only. The source's public IP. All communication initiated
   537  	// by this source will originate from this IP.
   538  	PublicIp string `json:"publicIp,omitempty"`
   539  	// State: Output only. State of the source as determined by the health check.
   540  	//
   541  	// Possible values:
   542  	//   "STATE_UNSPECIFIED" - The state is unknown. This is used for API
   543  	// compatibility only and is not used by the system.
   544  	//   "PENDING" - The state was not sampled by the health checks yet.
   545  	//   "FAILED" - The source is available but might not be usable yet due to
   546  	// invalid credentials or another reason. The error message will contain
   547  	// further details.
   548  	//   "ACTIVE" - The source exists and its credentials were verified.
   549  	State string `json:"state,omitempty"`
   550  	// ForceSendFields is a list of field names (e.g. "AccessKeyCreds") to
   551  	// unconditionally include in API requests. By default, fields with empty or
   552  	// default values are omitted from API requests. See
   553  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   554  	// details.
   555  	ForceSendFields []string `json:"-"`
   556  	// NullFields is a list of field names (e.g. "AccessKeyCreds") to include in
   557  	// API requests with the JSON null value. By default, fields with empty values
   558  	// are omitted from API requests. See
   559  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   560  	NullFields []string `json:"-"`
   561  }
   562  
   563  func (s *AwsSourceDetails) MarshalJSON() ([]byte, error) {
   564  	type NoMethod AwsSourceDetails
   565  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   566  }
   567  
   568  // AwsSourceVmDetails: Represent the source AWS VM details.
   569  type AwsSourceVmDetails struct {
   570  	// CommittedStorageBytes: The total size of the disks being migrated in bytes.
   571  	CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"`
   572  	// Disks: The disks attached to the source VM.
   573  	Disks []*AwsDiskDetails `json:"disks,omitempty"`
   574  	// Firmware: The firmware type of the source VM.
   575  	//
   576  	// Possible values:
   577  	//   "FIRMWARE_UNSPECIFIED" - The firmware is unknown.
   578  	//   "EFI" - The firmware is EFI.
   579  	//   "BIOS" - The firmware is BIOS.
   580  	Firmware string `json:"firmware,omitempty"`
   581  	// VmCapabilitiesInfo: Output only. Information about VM capabilities needed
   582  	// for some Compute Engine features.
   583  	VmCapabilitiesInfo *VmCapabilities `json:"vmCapabilitiesInfo,omitempty"`
   584  	// ForceSendFields is a list of field names (e.g. "CommittedStorageBytes") to
   585  	// unconditionally include in API requests. By default, fields with empty or
   586  	// default values are omitted from API requests. See
   587  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   588  	// details.
   589  	ForceSendFields []string `json:"-"`
   590  	// NullFields is a list of field names (e.g. "CommittedStorageBytes") to
   591  	// include in API requests with the JSON null value. By default, fields with
   592  	// empty values are omitted from API requests. See
   593  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   594  	NullFields []string `json:"-"`
   595  }
   596  
   597  func (s *AwsSourceVmDetails) MarshalJSON() ([]byte, error) {
   598  	type NoMethod AwsSourceVmDetails
   599  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   600  }
   601  
   602  // AwsVmDetails: AwsVmDetails describes a VM in AWS.
   603  type AwsVmDetails struct {
   604  	// Architecture: The CPU architecture.
   605  	//
   606  	// Possible values:
   607  	//   "VM_ARCHITECTURE_UNSPECIFIED" - The architecture is unknown.
   608  	//   "I386" - The architecture is I386.
   609  	//   "X86_64" - The architecture is X86_64.
   610  	//   "ARM64" - The architecture is ARM64.
   611  	//   "X86_64_MAC" - The architecture is X86_64_MAC.
   612  	Architecture string `json:"architecture,omitempty"`
   613  	// BootOption: The VM Boot Option.
   614  	//
   615  	// Possible values:
   616  	//   "BOOT_OPTION_UNSPECIFIED" - The boot option is unknown.
   617  	//   "EFI" - The boot option is UEFI.
   618  	//   "BIOS" - The boot option is LEGACY-BIOS.
   619  	BootOption string `json:"bootOption,omitempty"`
   620  	// CommittedStorageMb: The total size of the storage allocated to the VM in MB.
   621  	CommittedStorageMb int64 `json:"committedStorageMb,omitempty,string"`
   622  	// CpuCount: The number of cpus the VM has.
   623  	CpuCount int64 `json:"cpuCount,omitempty"`
   624  	// DiskCount: The number of disks the VM has.
   625  	DiskCount int64 `json:"diskCount,omitempty"`
   626  	// DisplayName: The display name of the VM. Note that this value is not
   627  	// necessarily unique.
   628  	DisplayName string `json:"displayName,omitempty"`
   629  	// InstanceType: The instance type of the VM.
   630  	InstanceType string `json:"instanceType,omitempty"`
   631  	// MemoryMb: The memory size of the VM in MB.
   632  	MemoryMb int64 `json:"memoryMb,omitempty"`
   633  	// OsDescription: The VM's OS.
   634  	OsDescription string `json:"osDescription,omitempty"`
   635  	// PowerState: Output only. The power state of the VM at the moment list was
   636  	// taken.
   637  	//
   638  	// Possible values:
   639  	//   "POWER_STATE_UNSPECIFIED" - Power state is not specified.
   640  	//   "ON" - The VM is turned on.
   641  	//   "OFF" - The VM is turned off.
   642  	//   "SUSPENDED" - The VM is suspended. This is similar to hibernation or sleep
   643  	// mode.
   644  	//   "PENDING" - The VM is starting.
   645  	PowerState string `json:"powerState,omitempty"`
   646  	// SecurityGroups: The security groups the VM belongs to.
   647  	SecurityGroups []*AwsSecurityGroup `json:"securityGroups,omitempty"`
   648  	// SourceDescription: The descriptive name of the AWS's source this VM is
   649  	// connected to.
   650  	SourceDescription string `json:"sourceDescription,omitempty"`
   651  	// SourceId: The id of the AWS's source this VM is connected to.
   652  	SourceId string `json:"sourceId,omitempty"`
   653  	// Tags: The tags of the VM.
   654  	Tags map[string]string `json:"tags,omitempty"`
   655  	// VirtualizationType: The virtualization type.
   656  	//
   657  	// Possible values:
   658  	//   "VM_VIRTUALIZATION_TYPE_UNSPECIFIED" - The virtualization type is unknown.
   659  	//   "HVM" - The virtualziation type is HVM.
   660  	//   "PARAVIRTUAL" - The virtualziation type is PARAVIRTUAL.
   661  	VirtualizationType string `json:"virtualizationType,omitempty"`
   662  	// VmId: The VM ID in AWS.
   663  	VmId string `json:"vmId,omitempty"`
   664  	// VpcId: The VPC ID the VM belongs to.
   665  	VpcId string `json:"vpcId,omitempty"`
   666  	// Zone: The AWS zone of the VM.
   667  	Zone string `json:"zone,omitempty"`
   668  	// ForceSendFields is a list of field names (e.g. "Architecture") to
   669  	// unconditionally include in API requests. By default, fields with empty or
   670  	// default values are omitted from API requests. See
   671  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   672  	// details.
   673  	ForceSendFields []string `json:"-"`
   674  	// NullFields is a list of field names (e.g. "Architecture") to include in API
   675  	// requests with the JSON null value. By default, fields with empty values are
   676  	// omitted from API requests. See
   677  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   678  	NullFields []string `json:"-"`
   679  }
   680  
   681  func (s *AwsVmDetails) MarshalJSON() ([]byte, error) {
   682  	type NoMethod AwsVmDetails
   683  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   684  }
   685  
   686  // AwsVmsDetails: AWSVmsDetails describes VMs in AWS.
   687  type AwsVmsDetails struct {
   688  	// Details: The details of the AWS VMs.
   689  	Details []*AwsVmDetails `json:"details,omitempty"`
   690  	// ForceSendFields is a list of field names (e.g. "Details") to unconditionally
   691  	// include in API requests. By default, fields with empty or default values are
   692  	// omitted from API requests. See
   693  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   694  	// details.
   695  	ForceSendFields []string `json:"-"`
   696  	// NullFields is a list of field names (e.g. "Details") to include in API
   697  	// requests with the JSON null value. By default, fields with empty values are
   698  	// omitted from API requests. See
   699  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   700  	NullFields []string `json:"-"`
   701  }
   702  
   703  func (s *AwsVmsDetails) MarshalJSON() ([]byte, error) {
   704  	type NoMethod AwsVmsDetails
   705  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   706  }
   707  
   708  // AzureDiskDetails: The details of an Azure VM disk.
   709  type AzureDiskDetails struct {
   710  	// DiskId: Azure disk ID.
   711  	DiskId string `json:"diskId,omitempty"`
   712  	// DiskNumber: The ordinal number of the disk.
   713  	DiskNumber int64 `json:"diskNumber,omitempty"`
   714  	// SizeGb: Size in GB.
   715  	SizeGb int64 `json:"sizeGb,omitempty,string"`
   716  	// ForceSendFields is a list of field names (e.g. "DiskId") to unconditionally
   717  	// include in API requests. By default, fields with empty or default values are
   718  	// omitted from API requests. See
   719  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   720  	// details.
   721  	ForceSendFields []string `json:"-"`
   722  	// NullFields is a list of field names (e.g. "DiskId") to include in API
   723  	// requests with the JSON null value. By default, fields with empty values are
   724  	// omitted from API requests. See
   725  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   726  	NullFields []string `json:"-"`
   727  }
   728  
   729  func (s *AzureDiskDetails) MarshalJSON() ([]byte, error) {
   730  	type NoMethod AzureDiskDetails
   731  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   732  }
   733  
   734  // AzureSourceDetails: AzureSourceDetails message describes a specific source
   735  // details for the Azure source type.
   736  type AzureSourceDetails struct {
   737  	// AzureLocation: Immutable. The Azure location (region) that the source VMs
   738  	// will be migrated from.
   739  	AzureLocation string `json:"azureLocation,omitempty"`
   740  	// ClientSecretCreds: Azure Credentials using tenant ID, client ID and secret.
   741  	ClientSecretCreds *ClientSecretCredentials `json:"clientSecretCreds,omitempty"`
   742  	// Error: Output only. Provides details on the state of the Source in case of
   743  	// an error.
   744  	Error *Status `json:"error,omitempty"`
   745  	// MigrationResourcesUserTags: User specified tags to add to every M2VM
   746  	// generated resource in Azure. These tags will be set in addition to the
   747  	// default tags that are set as part of the migration process. The tags must
   748  	// not begin with the reserved prefix `m4ce` or `m2vm`.
   749  	MigrationResourcesUserTags map[string]string `json:"migrationResourcesUserTags,omitempty"`
   750  	// ResourceGroupId: Output only. The ID of the Azure resource group that
   751  	// contains all resources related to the migration process of this source.
   752  	ResourceGroupId string `json:"resourceGroupId,omitempty"`
   753  	// State: Output only. State of the source as determined by the health check.
   754  	//
   755  	// Possible values:
   756  	//   "STATE_UNSPECIFIED" - The state is unknown. This is used for API
   757  	// compatibility only and is not used by the system.
   758  	//   "PENDING" - The state was not sampled by the health checks yet.
   759  	//   "FAILED" - The source is available but might not be usable yet due to
   760  	// invalid credentials or another reason. The error message will contain
   761  	// further details.
   762  	//   "ACTIVE" - The source exists and its credentials were verified.
   763  	State string `json:"state,omitempty"`
   764  	// SubscriptionId: Immutable. Azure subscription ID.
   765  	SubscriptionId string `json:"subscriptionId,omitempty"`
   766  	// ForceSendFields is a list of field names (e.g. "AzureLocation") to
   767  	// unconditionally include in API requests. By default, fields with empty or
   768  	// default values are omitted from API requests. See
   769  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   770  	// details.
   771  	ForceSendFields []string `json:"-"`
   772  	// NullFields is a list of field names (e.g. "AzureLocation") to include in API
   773  	// requests with the JSON null value. By default, fields with empty values are
   774  	// omitted from API requests. See
   775  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   776  	NullFields []string `json:"-"`
   777  }
   778  
   779  func (s *AzureSourceDetails) MarshalJSON() ([]byte, error) {
   780  	type NoMethod AzureSourceDetails
   781  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   782  }
   783  
   784  // AzureSourceVmDetails: Represent the source Azure VM details.
   785  type AzureSourceVmDetails struct {
   786  	// CommittedStorageBytes: The total size of the disks being migrated in bytes.
   787  	CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"`
   788  	// Disks: The disks attached to the source VM.
   789  	Disks []*AzureDiskDetails `json:"disks,omitempty"`
   790  	// Firmware: The firmware type of the source VM.
   791  	//
   792  	// Possible values:
   793  	//   "FIRMWARE_UNSPECIFIED" - The firmware is unknown.
   794  	//   "EFI" - The firmware is EFI.
   795  	//   "BIOS" - The firmware is BIOS.
   796  	Firmware string `json:"firmware,omitempty"`
   797  	// VmCapabilitiesInfo: Output only. Information about VM capabilities needed
   798  	// for some Compute Engine features.
   799  	VmCapabilitiesInfo *VmCapabilities `json:"vmCapabilitiesInfo,omitempty"`
   800  	// ForceSendFields is a list of field names (e.g. "CommittedStorageBytes") to
   801  	// unconditionally include in API requests. By default, fields with empty or
   802  	// default values are omitted from API requests. See
   803  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   804  	// details.
   805  	ForceSendFields []string `json:"-"`
   806  	// NullFields is a list of field names (e.g. "CommittedStorageBytes") to
   807  	// include in API requests with the JSON null value. By default, fields with
   808  	// empty values are omitted from API requests. See
   809  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   810  	NullFields []string `json:"-"`
   811  }
   812  
   813  func (s *AzureSourceVmDetails) MarshalJSON() ([]byte, error) {
   814  	type NoMethod AzureSourceVmDetails
   815  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   816  }
   817  
   818  // AzureVmDetails: AzureVmDetails describes a VM in Azure.
   819  type AzureVmDetails struct {
   820  	// BootOption: The VM Boot Option.
   821  	//
   822  	// Possible values:
   823  	//   "BOOT_OPTION_UNSPECIFIED" - The boot option is unknown.
   824  	//   "EFI" - The boot option is UEFI.
   825  	//   "BIOS" - The boot option is BIOS.
   826  	BootOption string `json:"bootOption,omitempty"`
   827  	// CommittedStorageMb: The total size of the storage allocated to the VM in MB.
   828  	CommittedStorageMb int64 `json:"committedStorageMb,omitempty,string"`
   829  	// ComputerName: The VM's ComputerName.
   830  	ComputerName string `json:"computerName,omitempty"`
   831  	// CpuCount: The number of cpus the VM has.
   832  	CpuCount int64 `json:"cpuCount,omitempty"`
   833  	// DiskCount: The number of disks the VM has, including OS disk.
   834  	DiskCount int64 `json:"diskCount,omitempty"`
   835  	// Disks: Description of the data disks.
   836  	Disks []*Disk `json:"disks,omitempty"`
   837  	// MemoryMb: The memory size of the VM in MB.
   838  	MemoryMb int64 `json:"memoryMb,omitempty"`
   839  	// OsDescription: Description of the OS.
   840  	OsDescription *OSDescription `json:"osDescription,omitempty"`
   841  	// OsDisk: Description of the OS disk.
   842  	OsDisk *OSDisk `json:"osDisk,omitempty"`
   843  	// PowerState: The power state of the VM at the moment list was taken.
   844  	//
   845  	// Possible values:
   846  	//   "POWER_STATE_UNSPECIFIED" - Power state is not specified.
   847  	//   "STARTING" - The VM is starting.
   848  	//   "RUNNING" - The VM is running.
   849  	//   "STOPPING" - The VM is stopping.
   850  	//   "STOPPED" - The VM is stopped.
   851  	//   "DEALLOCATING" - The VM is deallocating.
   852  	//   "DEALLOCATED" - The VM is deallocated.
   853  	//   "UNKNOWN" - The VM's power state is unknown.
   854  	PowerState string `json:"powerState,omitempty"`
   855  	// Tags: The tags of the VM.
   856  	Tags map[string]string `json:"tags,omitempty"`
   857  	// VmId: The VM full path in Azure.
   858  	VmId string `json:"vmId,omitempty"`
   859  	// VmSize: VM size as configured in Azure. Determines the VM's hardware spec.
   860  	VmSize string `json:"vmSize,omitempty"`
   861  	// ForceSendFields is a list of field names (e.g. "BootOption") to
   862  	// unconditionally include in API requests. By default, fields with empty or
   863  	// default values are omitted from API requests. See
   864  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   865  	// details.
   866  	ForceSendFields []string `json:"-"`
   867  	// NullFields is a list of field names (e.g. "BootOption") to include in API
   868  	// requests with the JSON null value. By default, fields with empty values are
   869  	// omitted from API requests. See
   870  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   871  	NullFields []string `json:"-"`
   872  }
   873  
   874  func (s *AzureVmDetails) MarshalJSON() ([]byte, error) {
   875  	type NoMethod AzureVmDetails
   876  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   877  }
   878  
   879  // AzureVmsDetails: AzureVmsDetails describes VMs in Azure.
   880  type AzureVmsDetails struct {
   881  	// Details: The details of the Azure VMs.
   882  	Details []*AzureVmDetails `json:"details,omitempty"`
   883  	// ForceSendFields is a list of field names (e.g. "Details") to unconditionally
   884  	// include in API requests. By default, fields with empty or default values are
   885  	// omitted from API requests. See
   886  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   887  	// details.
   888  	ForceSendFields []string `json:"-"`
   889  	// NullFields is a list of field names (e.g. "Details") to include in API
   890  	// requests with the JSON null value. By default, fields with empty values are
   891  	// omitted from API requests. See
   892  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   893  	NullFields []string `json:"-"`
   894  }
   895  
   896  func (s *AzureVmsDetails) MarshalJSON() ([]byte, error) {
   897  	type NoMethod AzureVmsDetails
   898  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   899  }
   900  
   901  // BootDiskDefaults: BootDiskDefaults hold information about the boot disk of a
   902  // VM.
   903  type BootDiskDefaults struct {
   904  	// DeviceName: Optional. Specifies a unique device name of your choice that is
   905  	// reflected into the /dev/disk/by-id/google-* tree of a Linux operating system
   906  	// running within the instance. If not specified, the server chooses a default
   907  	// device name to apply to this disk, in the form persistent-disk-x, where x is
   908  	// a number assigned by Google Compute Engine. This field is only applicable
   909  	// for persistent disks.
   910  	DeviceName string `json:"deviceName,omitempty"`
   911  	// DiskName: Optional. The name of the disk.
   912  	DiskName string `json:"diskName,omitempty"`
   913  	// DiskType: Optional. The type of disk provisioning to use for the VM.
   914  	//
   915  	// Possible values:
   916  	//   "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED" - An unspecified disk type. Will be
   917  	// used as STANDARD.
   918  	//   "COMPUTE_ENGINE_DISK_TYPE_STANDARD" - A Standard disk type.
   919  	//   "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type.
   920  	//   "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD persistent
   921  	// disks that balance performance and cost.
   922  	DiskType string `json:"diskType,omitempty"`
   923  	// Encryption: Optional. The encryption to apply to the boot disk.
   924  	Encryption *Encryption `json:"encryption,omitempty"`
   925  	// Image: The image to use when creating the disk.
   926  	Image *DiskImageDefaults `json:"image,omitempty"`
   927  	// ForceSendFields is a list of field names (e.g. "DeviceName") to
   928  	// unconditionally include in API requests. By default, fields with empty or
   929  	// default values are omitted from API requests. See
   930  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   931  	// details.
   932  	ForceSendFields []string `json:"-"`
   933  	// NullFields is a list of field names (e.g. "DeviceName") to include in API
   934  	// requests with the JSON null value. By default, fields with empty values are
   935  	// omitted from API requests. See
   936  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   937  	NullFields []string `json:"-"`
   938  }
   939  
   940  func (s *BootDiskDefaults) MarshalJSON() ([]byte, error) {
   941  	type NoMethod BootDiskDefaults
   942  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   943  }
   944  
   945  // CancelCloneJobRequest: Request message for 'CancelCloneJob' request.
   946  type CancelCloneJobRequest struct {
   947  }
   948  
   949  // CancelCutoverJobRequest: Request message for 'CancelCutoverJob' request.
   950  type CancelCutoverJobRequest struct {
   951  }
   952  
   953  // CancelImageImportJobRequest: Request message for 'CancelImageImportJob'
   954  // request.
   955  type CancelImageImportJobRequest struct {
   956  }
   957  
   958  // CancelOperationRequest: The request message for Operations.CancelOperation.
   959  type CancelOperationRequest struct {
   960  }
   961  
   962  // ClientSecretCredentials: Message describing Azure Credentials using tenant
   963  // ID, client ID and secret.
   964  type ClientSecretCredentials struct {
   965  	// ClientId: Azure client ID.
   966  	ClientId string `json:"clientId,omitempty"`
   967  	// ClientSecret: Input only. Azure client secret.
   968  	ClientSecret string `json:"clientSecret,omitempty"`
   969  	// TenantId: Azure tenant ID.
   970  	TenantId string `json:"tenantId,omitempty"`
   971  	// ForceSendFields is a list of field names (e.g. "ClientId") to
   972  	// unconditionally include in API requests. By default, fields with empty or
   973  	// default values are omitted from API requests. See
   974  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   975  	// details.
   976  	ForceSendFields []string `json:"-"`
   977  	// NullFields is a list of field names (e.g. "ClientId") to include in API
   978  	// requests with the JSON null value. By default, fields with empty values are
   979  	// omitted from API requests. See
   980  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   981  	NullFields []string `json:"-"`
   982  }
   983  
   984  func (s *ClientSecretCredentials) MarshalJSON() ([]byte, error) {
   985  	type NoMethod ClientSecretCredentials
   986  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   987  }
   988  
   989  // CloneJob: CloneJob describes the process of creating a clone of a
   990  // MigratingVM to the requested target based on the latest successful uploaded
   991  // snapshots. While the migration cycles of a MigratingVm take place, it is
   992  // possible to verify the uploaded VM can be started in the cloud, by creating
   993  // a clone. The clone can be created without any downtime, and it is created
   994  // using the latest snapshots which are already in the cloud. The cloneJob is
   995  // only responsible for its work, not its products, which means once it is
   996  // finished, it will never touch the instance it created. It will only delete
   997  // it in case of the CloneJob being cancelled or upon failure to clone.
   998  type CloneJob struct {
   999  	// ComputeEngineDisksTargetDetails: Output only. Details of the target
  1000  	// Persistent Disks in Compute Engine.
  1001  	ComputeEngineDisksTargetDetails *ComputeEngineDisksTargetDetails `json:"computeEngineDisksTargetDetails,omitempty"`
  1002  	// ComputeEngineTargetDetails: Output only. Details of the target VM in Compute
  1003  	// Engine.
  1004  	ComputeEngineTargetDetails *ComputeEngineTargetDetails `json:"computeEngineTargetDetails,omitempty"`
  1005  	// CreateTime: Output only. The time the clone job was created (as an API call,
  1006  	// not when it was actually created in the target).
  1007  	CreateTime string `json:"createTime,omitempty"`
  1008  	// EndTime: Output only. The time the clone job was ended.
  1009  	EndTime string `json:"endTime,omitempty"`
  1010  	// Error: Output only. Provides details for the errors that led to the Clone
  1011  	// Job's state.
  1012  	Error *Status `json:"error,omitempty"`
  1013  	// Name: Output only. The name of the clone.
  1014  	Name string `json:"name,omitempty"`
  1015  	// State: Output only. State of the clone job.
  1016  	//
  1017  	// Possible values:
  1018  	//   "STATE_UNSPECIFIED" - The state is unknown. This is used for API
  1019  	// compatibility only and is not used by the system.
  1020  	//   "PENDING" - The clone job has not yet started.
  1021  	//   "ACTIVE" - The clone job is active and running.
  1022  	//   "FAILED" - The clone job finished with errors.
  1023  	//   "SUCCEEDED" - The clone job finished successfully.
  1024  	//   "CANCELLED" - The clone job was cancelled.
  1025  	//   "CANCELLING" - The clone job is being cancelled.
  1026  	//   "ADAPTING_OS" - OS adaptation is running as part of the clone job to
  1027  	// generate license.
  1028  	State string `json:"state,omitempty"`
  1029  	// StateTime: Output only. The time the state was last updated.
  1030  	StateTime string `json:"stateTime,omitempty"`
  1031  	// Steps: Output only. The clone steps list representing its progress.
  1032  	Steps []*CloneStep `json:"steps,omitempty"`
  1033  
  1034  	// ServerResponse contains the HTTP response code and headers from the server.
  1035  	googleapi.ServerResponse `json:"-"`
  1036  	// ForceSendFields is a list of field names (e.g.
  1037  	// "ComputeEngineDisksTargetDetails") to unconditionally include in API
  1038  	// requests. By default, fields with empty or default values are omitted from
  1039  	// API requests. See
  1040  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1041  	// details.
  1042  	ForceSendFields []string `json:"-"`
  1043  	// NullFields is a list of field names (e.g. "ComputeEngineDisksTargetDetails")
  1044  	// to include in API requests with the JSON null value. By default, fields with
  1045  	// empty values are omitted from API requests. See
  1046  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1047  	NullFields []string `json:"-"`
  1048  }
  1049  
  1050  func (s *CloneJob) MarshalJSON() ([]byte, error) {
  1051  	type NoMethod CloneJob
  1052  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1053  }
  1054  
  1055  // CloneStep: CloneStep holds information about the clone step progress.
  1056  type CloneStep struct {
  1057  	// AdaptingOs: Adapting OS step.
  1058  	AdaptingOs *AdaptingOSStep `json:"adaptingOs,omitempty"`
  1059  	// EndTime: The time the step has ended.
  1060  	EndTime string `json:"endTime,omitempty"`
  1061  	// InstantiatingMigratedVm: Instantiating migrated VM step.
  1062  	InstantiatingMigratedVm *InstantiatingMigratedVMStep `json:"instantiatingMigratedVm,omitempty"`
  1063  	// PreparingVmDisks: Preparing VM disks step.
  1064  	PreparingVmDisks *PreparingVMDisksStep `json:"preparingVmDisks,omitempty"`
  1065  	// StartTime: The time the step has started.
  1066  	StartTime string `json:"startTime,omitempty"`
  1067  	// ForceSendFields is a list of field names (e.g. "AdaptingOs") to
  1068  	// unconditionally include in API requests. By default, fields with empty or
  1069  	// default values are omitted from API requests. See
  1070  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1071  	// details.
  1072  	ForceSendFields []string `json:"-"`
  1073  	// NullFields is a list of field names (e.g. "AdaptingOs") to include in API
  1074  	// requests with the JSON null value. By default, fields with empty values are
  1075  	// omitted from API requests. See
  1076  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1077  	NullFields []string `json:"-"`
  1078  }
  1079  
  1080  func (s *CloneStep) MarshalJSON() ([]byte, error) {
  1081  	type NoMethod CloneStep
  1082  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1083  }
  1084  
  1085  // ComputeEngineDisksTargetDefaults: ComputeEngineDisksTargetDefaults is a
  1086  // collection of details for creating Persistent Disks in a target Compute
  1087  // Engine project.
  1088  type ComputeEngineDisksTargetDefaults struct {
  1089  	// Disks: The details of each Persistent Disk to create.
  1090  	Disks []*PersistentDiskDefaults `json:"disks,omitempty"`
  1091  	// DisksTargetDefaults: Details of the disk only migration target.
  1092  	DisksTargetDefaults *DisksMigrationDisksTargetDefaults `json:"disksTargetDefaults,omitempty"`
  1093  	// TargetProject: The full path of the resource of type TargetProject which
  1094  	// represents the Compute Engine project in which to create the Persistent
  1095  	// Disks.
  1096  	TargetProject string `json:"targetProject,omitempty"`
  1097  	// VmTargetDefaults: Details of the VM migration target.
  1098  	VmTargetDefaults *DisksMigrationVmTargetDefaults `json:"vmTargetDefaults,omitempty"`
  1099  	// Zone: The zone in which to create the Persistent Disks.
  1100  	Zone string `json:"zone,omitempty"`
  1101  	// ForceSendFields is a list of field names (e.g. "Disks") to unconditionally
  1102  	// include in API requests. By default, fields with empty or default values are
  1103  	// omitted from API requests. See
  1104  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1105  	// details.
  1106  	ForceSendFields []string `json:"-"`
  1107  	// NullFields is a list of field names (e.g. "Disks") to include in API
  1108  	// requests with the JSON null value. By default, fields with empty values are
  1109  	// omitted from API requests. See
  1110  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1111  	NullFields []string `json:"-"`
  1112  }
  1113  
  1114  func (s *ComputeEngineDisksTargetDefaults) MarshalJSON() ([]byte, error) {
  1115  	type NoMethod ComputeEngineDisksTargetDefaults
  1116  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1117  }
  1118  
  1119  // ComputeEngineDisksTargetDetails: ComputeEngineDisksTargetDetails is a
  1120  // collection of created Persistent Disks details.
  1121  type ComputeEngineDisksTargetDetails struct {
  1122  	// Disks: The details of each created Persistent Disk.
  1123  	Disks []*PersistentDisk `json:"disks,omitempty"`
  1124  	// DisksTargetDetails: Details of the disks-only migration target.
  1125  	DisksTargetDetails *DisksMigrationDisksTargetDetails `json:"disksTargetDetails,omitempty"`
  1126  	// VmTargetDetails: Details for the VM the migrated data disks are attached to.
  1127  	VmTargetDetails *DisksMigrationVmTargetDetails `json:"vmTargetDetails,omitempty"`
  1128  	// ForceSendFields is a list of field names (e.g. "Disks") to unconditionally
  1129  	// include in API requests. By default, fields with empty or default values are
  1130  	// omitted from API requests. See
  1131  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1132  	// details.
  1133  	ForceSendFields []string `json:"-"`
  1134  	// NullFields is a list of field names (e.g. "Disks") to include in API
  1135  	// requests with the JSON null value. By default, fields with empty values are
  1136  	// omitted from API requests. See
  1137  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1138  	NullFields []string `json:"-"`
  1139  }
  1140  
  1141  func (s *ComputeEngineDisksTargetDetails) MarshalJSON() ([]byte, error) {
  1142  	type NoMethod ComputeEngineDisksTargetDetails
  1143  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1144  }
  1145  
  1146  // ComputeEngineTargetDefaults: ComputeEngineTargetDefaults is a collection of
  1147  // details for creating a VM in a target Compute Engine project.
  1148  type ComputeEngineTargetDefaults struct {
  1149  	// AdditionalLicenses: Additional licenses to assign to the VM.
  1150  	AdditionalLicenses []string `json:"additionalLicenses,omitempty"`
  1151  	// AppliedLicense: Output only. The OS license returned from the adaptation
  1152  	// module report.
  1153  	AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"`
  1154  	// BootOption: Output only. The VM Boot Option, as set in the source VM.
  1155  	//
  1156  	// Possible values:
  1157  	//   "COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED" - The boot option is unknown.
  1158  	//   "COMPUTE_ENGINE_BOOT_OPTION_EFI" - The boot option is EFI.
  1159  	//   "COMPUTE_ENGINE_BOOT_OPTION_BIOS" - The boot option is BIOS.
  1160  	BootOption string `json:"bootOption,omitempty"`
  1161  	// ComputeScheduling: Compute instance scheduling information (if empty default
  1162  	// is used).
  1163  	ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"`
  1164  	// DiskType: The disk type to use in the VM.
  1165  	//
  1166  	// Possible values:
  1167  	//   "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED" - An unspecified disk type. Will be
  1168  	// used as STANDARD.
  1169  	//   "COMPUTE_ENGINE_DISK_TYPE_STANDARD" - A Standard disk type.
  1170  	//   "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type.
  1171  	//   "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD persistent
  1172  	// disks that balance performance and cost.
  1173  	DiskType string `json:"diskType,omitempty"`
  1174  	// Encryption: Optional. Immutable. The encryption to apply to the VM disks.
  1175  	Encryption *Encryption `json:"encryption,omitempty"`
  1176  	// Hostname: The hostname to assign to the VM.
  1177  	Hostname string `json:"hostname,omitempty"`
  1178  	// Labels: A map of labels to associate with the VM.
  1179  	Labels map[string]string `json:"labels,omitempty"`
  1180  	// LicenseType: The license type to use in OS adaptation.
  1181  	//
  1182  	// Possible values:
  1183  	//   "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT" - The license type is the default
  1184  	// for the OS.
  1185  	//   "COMPUTE_ENGINE_LICENSE_TYPE_PAYG" - The license type is Pay As You Go
  1186  	// license type.
  1187  	//   "COMPUTE_ENGINE_LICENSE_TYPE_BYOL" - The license type is Bring Your Own
  1188  	// License type.
  1189  	LicenseType string `json:"licenseType,omitempty"`
  1190  	// MachineType: The machine type to create the VM with.
  1191  	MachineType string `json:"machineType,omitempty"`
  1192  	// MachineTypeSeries: The machine type series to create the VM with.
  1193  	MachineTypeSeries string `json:"machineTypeSeries,omitempty"`
  1194  	// Metadata: The metadata key/value pairs to assign to the VM.
  1195  	Metadata map[string]string `json:"metadata,omitempty"`
  1196  	// NetworkInterfaces: List of NICs connected to this VM.
  1197  	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
  1198  	// NetworkTags: A list of network tags to associate with the VM.
  1199  	NetworkTags []string `json:"networkTags,omitempty"`
  1200  	// SecureBoot: Defines whether the instance has Secure Boot enabled. This can
  1201  	// be set to true only if the VM boot option is EFI.
  1202  	SecureBoot bool `json:"secureBoot,omitempty"`
  1203  	// ServiceAccount: The service account to associate the VM with.
  1204  	ServiceAccount string `json:"serviceAccount,omitempty"`
  1205  	// TargetProject: The full path of the resource of type TargetProject which
  1206  	// represents the Compute Engine project in which to create this VM.
  1207  	TargetProject string `json:"targetProject,omitempty"`
  1208  	// VmName: The name of the VM to create.
  1209  	VmName string `json:"vmName,omitempty"`
  1210  	// Zone: The zone in which to create the VM.
  1211  	Zone string `json:"zone,omitempty"`
  1212  	// ForceSendFields is a list of field names (e.g. "AdditionalLicenses") to
  1213  	// unconditionally include in API requests. By default, fields with empty or
  1214  	// default values are omitted from API requests. See
  1215  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1216  	// details.
  1217  	ForceSendFields []string `json:"-"`
  1218  	// NullFields is a list of field names (e.g. "AdditionalLicenses") to include
  1219  	// in API requests with the JSON null value. By default, fields with empty
  1220  	// values are omitted from API requests. See
  1221  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1222  	NullFields []string `json:"-"`
  1223  }
  1224  
  1225  func (s *ComputeEngineTargetDefaults) MarshalJSON() ([]byte, error) {
  1226  	type NoMethod ComputeEngineTargetDefaults
  1227  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1228  }
  1229  
  1230  // ComputeEngineTargetDetails: ComputeEngineTargetDetails is a collection of
  1231  // details for creating a VM in a target Compute Engine project.
  1232  type ComputeEngineTargetDetails struct {
  1233  	// AdditionalLicenses: Additional licenses to assign to the VM.
  1234  	AdditionalLicenses []string `json:"additionalLicenses,omitempty"`
  1235  	// AppliedLicense: The OS license returned from the adaptation module report.
  1236  	AppliedLicense *AppliedLicense `json:"appliedLicense,omitempty"`
  1237  	// BootOption: The VM Boot Option, as set in the source VM.
  1238  	//
  1239  	// Possible values:
  1240  	//   "COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED" - The boot option is unknown.
  1241  	//   "COMPUTE_ENGINE_BOOT_OPTION_EFI" - The boot option is EFI.
  1242  	//   "COMPUTE_ENGINE_BOOT_OPTION_BIOS" - The boot option is BIOS.
  1243  	BootOption string `json:"bootOption,omitempty"`
  1244  	// ComputeScheduling: Compute instance scheduling information (if empty default
  1245  	// is used).
  1246  	ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"`
  1247  	// DiskType: The disk type to use in the VM.
  1248  	//
  1249  	// Possible values:
  1250  	//   "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED" - An unspecified disk type. Will be
  1251  	// used as STANDARD.
  1252  	//   "COMPUTE_ENGINE_DISK_TYPE_STANDARD" - A Standard disk type.
  1253  	//   "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type.
  1254  	//   "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD persistent
  1255  	// disks that balance performance and cost.
  1256  	DiskType string `json:"diskType,omitempty"`
  1257  	// Encryption: Optional. The encryption to apply to the VM disks.
  1258  	Encryption *Encryption `json:"encryption,omitempty"`
  1259  	// Hostname: The hostname to assign to the VM.
  1260  	Hostname string `json:"hostname,omitempty"`
  1261  	// Labels: A map of labels to associate with the VM.
  1262  	Labels map[string]string `json:"labels,omitempty"`
  1263  	// LicenseType: The license type to use in OS adaptation.
  1264  	//
  1265  	// Possible values:
  1266  	//   "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT" - The license type is the default
  1267  	// for the OS.
  1268  	//   "COMPUTE_ENGINE_LICENSE_TYPE_PAYG" - The license type is Pay As You Go
  1269  	// license type.
  1270  	//   "COMPUTE_ENGINE_LICENSE_TYPE_BYOL" - The license type is Bring Your Own
  1271  	// License type.
  1272  	LicenseType string `json:"licenseType,omitempty"`
  1273  	// MachineType: The machine type to create the VM with.
  1274  	MachineType string `json:"machineType,omitempty"`
  1275  	// MachineTypeSeries: The machine type series to create the VM with.
  1276  	MachineTypeSeries string `json:"machineTypeSeries,omitempty"`
  1277  	// Metadata: The metadata key/value pairs to assign to the VM.
  1278  	Metadata map[string]string `json:"metadata,omitempty"`
  1279  	// NetworkInterfaces: List of NICs connected to this VM.
  1280  	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
  1281  	// NetworkTags: A list of network tags to associate with the VM.
  1282  	NetworkTags []string `json:"networkTags,omitempty"`
  1283  	// Project: The Google Cloud target project ID or project name.
  1284  	Project string `json:"project,omitempty"`
  1285  	// SecureBoot: Defines whether the instance has Secure Boot enabled. This can
  1286  	// be set to true only if the VM boot option is EFI.
  1287  	SecureBoot bool `json:"secureBoot,omitempty"`
  1288  	// ServiceAccount: The service account to associate the VM with.
  1289  	ServiceAccount string `json:"serviceAccount,omitempty"`
  1290  	// VmName: The name of the VM to create.
  1291  	VmName string `json:"vmName,omitempty"`
  1292  	// Zone: The zone in which to create the VM.
  1293  	Zone string `json:"zone,omitempty"`
  1294  	// ForceSendFields is a list of field names (e.g. "AdditionalLicenses") to
  1295  	// unconditionally include in API requests. By default, fields with empty or
  1296  	// default values are omitted from API requests. See
  1297  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1298  	// details.
  1299  	ForceSendFields []string `json:"-"`
  1300  	// NullFields is a list of field names (e.g. "AdditionalLicenses") to include
  1301  	// in API requests with the JSON null value. By default, fields with empty
  1302  	// values are omitted from API requests. See
  1303  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1304  	NullFields []string `json:"-"`
  1305  }
  1306  
  1307  func (s *ComputeEngineTargetDetails) MarshalJSON() ([]byte, error) {
  1308  	type NoMethod ComputeEngineTargetDetails
  1309  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1310  }
  1311  
  1312  // ComputeScheduling: Scheduling information for VM on maintenance/restart
  1313  // behaviour and node allocation in sole tenant nodes.
  1314  type ComputeScheduling struct {
  1315  	// MinNodeCpus: The minimum number of virtual CPUs this instance will consume
  1316  	// when running on a sole-tenant node. Ignored if no node_affinites are
  1317  	// configured.
  1318  	MinNodeCpus int64 `json:"minNodeCpus,omitempty"`
  1319  	// NodeAffinities: A set of node affinity and anti-affinity configurations for
  1320  	// sole tenant nodes.
  1321  	NodeAffinities []*SchedulingNodeAffinity `json:"nodeAffinities,omitempty"`
  1322  	// OnHostMaintenance: How the instance should behave when the host machine
  1323  	// undergoes maintenance that may temporarily impact instance performance.
  1324  	//
  1325  	// Possible values:
  1326  	//   "ON_HOST_MAINTENANCE_UNSPECIFIED" - An unknown, unexpected behavior.
  1327  	//   "TERMINATE" - Terminate the instance when the host machine undergoes
  1328  	// maintenance.
  1329  	//   "MIGRATE" - Migrate the instance when the host machine undergoes
  1330  	// maintenance.
  1331  	OnHostMaintenance string `json:"onHostMaintenance,omitempty"`
  1332  	// RestartType: Whether the Instance should be automatically restarted whenever
  1333  	// it is terminated by Compute Engine (not terminated by user). This
  1334  	// configuration is identical to `automaticRestart` field in Compute Engine
  1335  	// create instance under scheduling. It was changed to an enum (instead of a
  1336  	// boolean) to match the default value in Compute Engine which is automatic
  1337  	// restart.
  1338  	//
  1339  	// Possible values:
  1340  	//   "RESTART_TYPE_UNSPECIFIED" - Unspecified behavior. This will use the
  1341  	// default.
  1342  	//   "AUTOMATIC_RESTART" - The Instance should be automatically restarted
  1343  	// whenever it is terminated by Compute Engine.
  1344  	//   "NO_AUTOMATIC_RESTART" - The Instance isn't automatically restarted
  1345  	// whenever it is terminated by Compute Engine.
  1346  	RestartType string `json:"restartType,omitempty"`
  1347  	// ForceSendFields is a list of field names (e.g. "MinNodeCpus") to
  1348  	// unconditionally include in API requests. By default, fields with empty or
  1349  	// default values are omitted from API requests. See
  1350  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1351  	// details.
  1352  	ForceSendFields []string `json:"-"`
  1353  	// NullFields is a list of field names (e.g. "MinNodeCpus") to include in API
  1354  	// requests with the JSON null value. By default, fields with empty values are
  1355  	// omitted from API requests. See
  1356  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1357  	NullFields []string `json:"-"`
  1358  }
  1359  
  1360  func (s *ComputeScheduling) MarshalJSON() ([]byte, error) {
  1361  	type NoMethod ComputeScheduling
  1362  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1363  }
  1364  
  1365  // CreatingImageStep: CreatingImageStep contains specific step details.
  1366  type CreatingImageStep struct {
  1367  }
  1368  
  1369  // CutoverForecast: CutoverForecast holds information about future CutoverJobs
  1370  // of a MigratingVm.
  1371  type CutoverForecast struct {
  1372  	// EstimatedCutoverJobDuration: Output only. Estimation of the CutoverJob
  1373  	// duration.
  1374  	EstimatedCutoverJobDuration string `json:"estimatedCutoverJobDuration,omitempty"`
  1375  	// ForceSendFields is a list of field names (e.g.
  1376  	// "EstimatedCutoverJobDuration") to unconditionally include in API requests.
  1377  	// By default, fields with empty or default values are omitted from API
  1378  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
  1379  	// for more details.
  1380  	ForceSendFields []string `json:"-"`
  1381  	// NullFields is a list of field names (e.g. "EstimatedCutoverJobDuration") to
  1382  	// include in API requests with the JSON null value. By default, fields with
  1383  	// empty values are omitted from API requests. See
  1384  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1385  	NullFields []string `json:"-"`
  1386  }
  1387  
  1388  func (s *CutoverForecast) MarshalJSON() ([]byte, error) {
  1389  	type NoMethod CutoverForecast
  1390  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1391  }
  1392  
  1393  // CutoverJob: CutoverJob message describes a cutover of a migrating VM. The
  1394  // CutoverJob is the operation of shutting down the VM, creating a snapshot and
  1395  // clonning the VM using the replicated snapshot.
  1396  type CutoverJob struct {
  1397  	// ComputeEngineDisksTargetDetails: Output only. Details of the target
  1398  	// Persistent Disks in Compute Engine.
  1399  	ComputeEngineDisksTargetDetails *ComputeEngineDisksTargetDetails `json:"computeEngineDisksTargetDetails,omitempty"`
  1400  	// ComputeEngineTargetDetails: Output only. Details of the target VM in Compute
  1401  	// Engine.
  1402  	ComputeEngineTargetDetails *ComputeEngineTargetDetails `json:"computeEngineTargetDetails,omitempty"`
  1403  	// CreateTime: Output only. The time the cutover job was created (as an API
  1404  	// call, not when it was actually created in the target).
  1405  	CreateTime string `json:"createTime,omitempty"`
  1406  	// EndTime: Output only. The time the cutover job had finished.
  1407  	EndTime string `json:"endTime,omitempty"`
  1408  	// Error: Output only. Provides details for the errors that led to the Cutover
  1409  	// Job's state.
  1410  	Error *Status `json:"error,omitempty"`
  1411  	// Name: Output only. The name of the cutover job.
  1412  	Name string `json:"name,omitempty"`
  1413  	// ProgressPercent: Output only. The current progress in percentage of the
  1414  	// cutover job.
  1415  	ProgressPercent int64 `json:"progressPercent,omitempty"`
  1416  	// State: Output only. State of the cutover job.
  1417  	//
  1418  	// Possible values:
  1419  	//   "STATE_UNSPECIFIED" - The state is unknown. This is used for API
  1420  	// compatibility only and is not used by the system.
  1421  	//   "PENDING" - The cutover job has not yet started.
  1422  	//   "FAILED" - The cutover job finished with errors.
  1423  	//   "SUCCEEDED" - The cutover job finished successfully.
  1424  	//   "CANCELLED" - The cutover job was cancelled.
  1425  	//   "CANCELLING" - The cutover job is being cancelled.
  1426  	//   "ACTIVE" - The cutover job is active and running.
  1427  	//   "ADAPTING_OS" - OS adaptation is running as part of the cutover job to
  1428  	// generate license.
  1429  	State string `json:"state,omitempty"`
  1430  	// StateMessage: Output only. A message providing possible extra details about
  1431  	// the current state.
  1432  	StateMessage string `json:"stateMessage,omitempty"`
  1433  	// StateTime: Output only. The time the state was last updated.
  1434  	StateTime string `json:"stateTime,omitempty"`
  1435  	// Steps: Output only. The cutover steps list representing its progress.
  1436  	Steps []*CutoverStep `json:"steps,omitempty"`
  1437  
  1438  	// ServerResponse contains the HTTP response code and headers from the server.
  1439  	googleapi.ServerResponse `json:"-"`
  1440  	// ForceSendFields is a list of field names (e.g.
  1441  	// "ComputeEngineDisksTargetDetails") to unconditionally include in API
  1442  	// requests. By default, fields with empty or default values are omitted from
  1443  	// API requests. See
  1444  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1445  	// details.
  1446  	ForceSendFields []string `json:"-"`
  1447  	// NullFields is a list of field names (e.g. "ComputeEngineDisksTargetDetails")
  1448  	// to include in API requests with the JSON null value. By default, fields with
  1449  	// empty values are omitted from API requests. See
  1450  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1451  	NullFields []string `json:"-"`
  1452  }
  1453  
  1454  func (s *CutoverJob) MarshalJSON() ([]byte, error) {
  1455  	type NoMethod CutoverJob
  1456  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1457  }
  1458  
  1459  // CutoverStep: CutoverStep holds information about the cutover step progress.
  1460  type CutoverStep struct {
  1461  	// EndTime: The time the step has ended.
  1462  	EndTime string `json:"endTime,omitempty"`
  1463  	// FinalSync: Final sync step.
  1464  	FinalSync *ReplicationCycle `json:"finalSync,omitempty"`
  1465  	// InstantiatingMigratedVm: Instantiating migrated VM step.
  1466  	InstantiatingMigratedVm *InstantiatingMigratedVMStep `json:"instantiatingMigratedVm,omitempty"`
  1467  	// PreparingVmDisks: Preparing VM disks step.
  1468  	PreparingVmDisks *PreparingVMDisksStep `json:"preparingVmDisks,omitempty"`
  1469  	// PreviousReplicationCycle: A replication cycle prior cutover step.
  1470  	PreviousReplicationCycle *ReplicationCycle `json:"previousReplicationCycle,omitempty"`
  1471  	// ShuttingDownSourceVm: Shutting down VM step.
  1472  	ShuttingDownSourceVm *ShuttingDownSourceVMStep `json:"shuttingDownSourceVm,omitempty"`
  1473  	// StartTime: The time the step has started.
  1474  	StartTime string `json:"startTime,omitempty"`
  1475  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  1476  	// include in API requests. By default, fields with empty or default values are
  1477  	// omitted from API requests. See
  1478  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1479  	// details.
  1480  	ForceSendFields []string `json:"-"`
  1481  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  1482  	// requests with the JSON null value. By default, fields with empty values are
  1483  	// omitted from API requests. See
  1484  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1485  	NullFields []string `json:"-"`
  1486  }
  1487  
  1488  func (s *CutoverStep) MarshalJSON() ([]byte, error) {
  1489  	type NoMethod CutoverStep
  1490  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1491  }
  1492  
  1493  // CycleStep: CycleStep holds information about a step progress.
  1494  type CycleStep struct {
  1495  	// EndTime: The time the cycle step has ended.
  1496  	EndTime string `json:"endTime,omitempty"`
  1497  	// InitializingReplication: Initializing replication step.
  1498  	InitializingReplication *InitializingReplicationStep `json:"initializingReplication,omitempty"`
  1499  	// PostProcessing: Post processing step.
  1500  	PostProcessing *PostProcessingStep `json:"postProcessing,omitempty"`
  1501  	// Replicating: Replicating step.
  1502  	Replicating *ReplicatingStep `json:"replicating,omitempty"`
  1503  	// StartTime: The time the cycle step has started.
  1504  	StartTime string `json:"startTime,omitempty"`
  1505  	// ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally
  1506  	// include in API requests. By default, fields with empty or default values are
  1507  	// omitted from API requests. See
  1508  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1509  	// details.
  1510  	ForceSendFields []string `json:"-"`
  1511  	// NullFields is a list of field names (e.g. "EndTime") to include in API
  1512  	// requests with the JSON null value. By default, fields with empty values are
  1513  	// omitted from API requests. See
  1514  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1515  	NullFields []string `json:"-"`
  1516  }
  1517  
  1518  func (s *CycleStep) MarshalJSON() ([]byte, error) {
  1519  	type NoMethod CycleStep
  1520  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1521  }
  1522  
  1523  // DataDiskImageImport: Mentions that the image import is not using OS
  1524  // adaptation process.
  1525  type DataDiskImageImport struct {
  1526  }
  1527  
  1528  // DatacenterConnector: DatacenterConnector message describes a connector
  1529  // between the Source and Google Cloud, which is installed on a vmware
  1530  // datacenter (an OVA vm installed by the user) to connect the Datacenter to
  1531  // Google Cloud and support vm migration data transfer.
  1532  type DatacenterConnector struct {
  1533  	// ApplianceInfrastructureVersion: Output only. Appliance OVA version. This is
  1534  	// the OVA which is manually installed by the user and contains the
  1535  	// infrastructure for the automatically updatable components on the appliance.
  1536  	ApplianceInfrastructureVersion string `json:"applianceInfrastructureVersion,omitempty"`
  1537  	// ApplianceSoftwareVersion: Output only. Appliance last installed update
  1538  	// bundle version. This is the version of the automatically updatable
  1539  	// components on the appliance.
  1540  	ApplianceSoftwareVersion string `json:"applianceSoftwareVersion,omitempty"`
  1541  	// AvailableVersions: Output only. The available versions for updating this
  1542  	// appliance.
  1543  	AvailableVersions *AvailableUpdates `json:"availableVersions,omitempty"`
  1544  	// Bucket: Output only. The communication channel between the datacenter
  1545  	// connector and Google Cloud.
  1546  	Bucket string `json:"bucket,omitempty"`
  1547  	// CreateTime: Output only. The time the connector was created (as an API call,
  1548  	// not when it was actually installed).
  1549  	CreateTime string `json:"createTime,omitempty"`
  1550  	// Error: Output only. Provides details on the state of the Datacenter
  1551  	// Connector in case of an error.
  1552  	Error *Status `json:"error,omitempty"`
  1553  	// Name: Output only. The connector's name.
  1554  	Name string `json:"name,omitempty"`
  1555  	// RegistrationId: Immutable. A unique key for this connector. This key is
  1556  	// internal to the OVA connector and is supplied with its creation during the
  1557  	// registration process and can not be modified.
  1558  	RegistrationId string `json:"registrationId,omitempty"`
  1559  	// ServiceAccount: The service account to use in the connector when
  1560  	// communicating with the cloud.
  1561  	ServiceAccount string `json:"serviceAccount,omitempty"`
  1562  	// State: Output only. State of the DatacenterConnector, as determined by the
  1563  	// health checks.
  1564  	//
  1565  	// Possible values:
  1566  	//   "STATE_UNSPECIFIED" - The state is unknown. This is used for API
  1567  	// compatibility only and is not used by the system.
  1568  	//   "PENDING" - The state was not sampled by the health checks yet.
  1569  	//   "OFFLINE" - The source was sampled by health checks and is not available.
  1570  	//   "FAILED" - The source is available but might not be usable yet due to
  1571  	// unvalidated credentials or another reason. The credentials referred to are
  1572  	// the ones to the Source. The error message will contain further details.
  1573  	//   "ACTIVE" - The source exists and its credentials were verified.
  1574  	State string `json:"state,omitempty"`
  1575  	// StateTime: Output only. The time the state was last set.
  1576  	StateTime string `json:"stateTime,omitempty"`
  1577  	// UpdateTime: Output only. The last time the connector was updated with an API
  1578  	// call.
  1579  	UpdateTime string `json:"updateTime,omitempty"`
  1580  	// UpgradeStatus: Output only. The status of the current / last
  1581  	// upgradeAppliance operation.
  1582  	UpgradeStatus *UpgradeStatus `json:"upgradeStatus,omitempty"`
  1583  	// Version: The version running in the DatacenterConnector. This is supplied by
  1584  	// the OVA connector during the registration process and can not be modified.
  1585  	Version string `json:"version,omitempty"`
  1586  
  1587  	// ServerResponse contains the HTTP response code and headers from the server.
  1588  	googleapi.ServerResponse `json:"-"`
  1589  	// ForceSendFields is a list of field names (e.g.
  1590  	// "ApplianceInfrastructureVersion") to unconditionally include in API
  1591  	// requests. By default, fields with empty or default values are omitted from
  1592  	// API requests. See
  1593  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1594  	// details.
  1595  	ForceSendFields []string `json:"-"`
  1596  	// NullFields is a list of field names (e.g. "ApplianceInfrastructureVersion")
  1597  	// to include in API requests with the JSON null value. By default, fields with
  1598  	// empty values are omitted from API requests. See
  1599  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1600  	NullFields []string `json:"-"`
  1601  }
  1602  
  1603  func (s *DatacenterConnector) MarshalJSON() ([]byte, error) {
  1604  	type NoMethod DatacenterConnector
  1605  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1606  }
  1607  
  1608  // Disk: A message describing a data disk.
  1609  type Disk struct {
  1610  	// Lun: The disk's Logical Unit Number (LUN).
  1611  	Lun int64 `json:"lun,omitempty"`
  1612  	// Name: The disk name.
  1613  	Name string `json:"name,omitempty"`
  1614  	// SizeGb: The disk size in GB.
  1615  	SizeGb int64 `json:"sizeGb,omitempty"`
  1616  	// ForceSendFields is a list of field names (e.g. "Lun") to unconditionally
  1617  	// include in API requests. By default, fields with empty or default values are
  1618  	// omitted from API requests. See
  1619  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1620  	// details.
  1621  	ForceSendFields []string `json:"-"`
  1622  	// NullFields is a list of field names (e.g. "Lun") to include in API requests
  1623  	// with the JSON null value. By default, fields with empty values are omitted
  1624  	// from API requests. See
  1625  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1626  	NullFields []string `json:"-"`
  1627  }
  1628  
  1629  func (s *Disk) MarshalJSON() ([]byte, error) {
  1630  	type NoMethod Disk
  1631  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1632  }
  1633  
  1634  // DiskImageDefaults: Contains details about the image source used to create
  1635  // the disk.
  1636  type DiskImageDefaults struct {
  1637  	// SourceImage: Required. The Image resource used when creating the disk.
  1638  	SourceImage string `json:"sourceImage,omitempty"`
  1639  	// ForceSendFields is a list of field names (e.g. "SourceImage") to
  1640  	// unconditionally include in API requests. By default, fields with empty or
  1641  	// default values are omitted from API requests. See
  1642  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1643  	// details.
  1644  	ForceSendFields []string `json:"-"`
  1645  	// NullFields is a list of field names (e.g. "SourceImage") to include in API
  1646  	// requests with the JSON null value. By default, fields with empty values are
  1647  	// omitted from API requests. See
  1648  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1649  	NullFields []string `json:"-"`
  1650  }
  1651  
  1652  func (s *DiskImageDefaults) MarshalJSON() ([]byte, error) {
  1653  	type NoMethod DiskImageDefaults
  1654  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1655  }
  1656  
  1657  // DiskImageTargetDetails: The target details of the image resource that will
  1658  // be created by the import job.
  1659  type DiskImageTargetDetails struct {
  1660  	// AdditionalLicenses: Optional. Additional licenses to assign to the image.
  1661  	AdditionalLicenses []string `json:"additionalLicenses,omitempty"`
  1662  	// DataDiskImageImport: Optional. Use to skip OS adaptation process.
  1663  	DataDiskImageImport *DataDiskImageImport `json:"dataDiskImageImport,omitempty"`
  1664  	// Description: Optional. An optional description of the image.
  1665  	Description string `json:"description,omitempty"`
  1666  	// Encryption: Immutable. The encryption to apply to the image.
  1667  	Encryption *Encryption `json:"encryption,omitempty"`
  1668  	// FamilyName: Optional. The name of the image family to which the new image
  1669  	// belongs.
  1670  	FamilyName string `json:"familyName,omitempty"`
  1671  	// ImageName: Required. The name of the image to be created.
  1672  	ImageName string `json:"imageName,omitempty"`
  1673  	// Labels: Optional. A map of labels to associate with the image.
  1674  	Labels map[string]string `json:"labels,omitempty"`
  1675  	// OsAdaptationParameters: Optional. Use to set the parameters relevant for the
  1676  	// OS adaptation process.
  1677  	OsAdaptationParameters *ImageImportOsAdaptationParameters `json:"osAdaptationParameters,omitempty"`
  1678  	// SingleRegionStorage: Optional. Set to true to set the image storageLocations
  1679  	// to the single region of the import job. When false, the closest multi-region
  1680  	// is selected.
  1681  	SingleRegionStorage bool `json:"singleRegionStorage,omitempty"`
  1682  	// TargetProject: Required. Reference to the TargetProject resource that
  1683  	// represents the target project in which the imported image will be created.
  1684  	TargetProject string `json:"targetProject,omitempty"`
  1685  	// ForceSendFields is a list of field names (e.g. "AdditionalLicenses") to
  1686  	// unconditionally include in API requests. By default, fields with empty or
  1687  	// default values are omitted from API requests. See
  1688  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1689  	// details.
  1690  	ForceSendFields []string `json:"-"`
  1691  	// NullFields is a list of field names (e.g. "AdditionalLicenses") to include
  1692  	// in API requests with the JSON null value. By default, fields with empty
  1693  	// values are omitted from API requests. See
  1694  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1695  	NullFields []string `json:"-"`
  1696  }
  1697  
  1698  func (s *DiskImageTargetDetails) MarshalJSON() ([]byte, error) {
  1699  	type NoMethod DiskImageTargetDetails
  1700  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1701  }
  1702  
  1703  // DisksMigrationDisksTargetDefaults: Details for a disk only migration.
  1704  type DisksMigrationDisksTargetDefaults struct {
  1705  }
  1706  
  1707  // DisksMigrationDisksTargetDetails: Details for a disks-only migration.
  1708  type DisksMigrationDisksTargetDetails struct {
  1709  }
  1710  
  1711  // DisksMigrationVmTargetDefaults: Details for creation of a VM that migrated
  1712  // data disks will be attached to.
  1713  type DisksMigrationVmTargetDefaults struct {
  1714  	// AdditionalLicenses: Optional. Additional licenses to assign to the VM.
  1715  	AdditionalLicenses []string `json:"additionalLicenses,omitempty"`
  1716  	// BootDiskDefaults: Optional. Details of the boot disk of the VM.
  1717  	BootDiskDefaults *BootDiskDefaults `json:"bootDiskDefaults,omitempty"`
  1718  	// ComputeScheduling: Optional. Compute instance scheduling information (if
  1719  	// empty default is used).
  1720  	ComputeScheduling *ComputeScheduling `json:"computeScheduling,omitempty"`
  1721  	// Encryption: Optional. The encryption to apply to the VM.
  1722  	Encryption *Encryption `json:"encryption,omitempty"`
  1723  	// Hostname: Optional. The hostname to assign to the VM.
  1724  	Hostname string `json:"hostname,omitempty"`
  1725  	// Labels: Optional. A map of labels to associate with the VM.
  1726  	Labels map[string]string `json:"labels,omitempty"`
  1727  	// MachineType: Required. The machine type to create the VM with.
  1728  	MachineType string `json:"machineType,omitempty"`
  1729  	// MachineTypeSeries: Optional. The machine type series to create the VM with.
  1730  	// For presentation only.
  1731  	MachineTypeSeries string `json:"machineTypeSeries,omitempty"`
  1732  	// Metadata: Optional. The metadata key/value pairs to assign to the VM.
  1733  	Metadata map[string]string `json:"metadata,omitempty"`
  1734  	// NetworkInterfaces: Optional. NICs to attach to the VM.
  1735  	NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"`
  1736  	// NetworkTags: Optional. A list of network tags to associate with the VM.
  1737  	NetworkTags []string `json:"networkTags,omitempty"`
  1738  	// SecureBoot: Optional. Defines whether the instance has Secure Boot enabled.
  1739  	// This can be set to true only if the VM boot option is EFI.
  1740  	SecureBoot bool `json:"secureBoot,omitempty"`
  1741  	// ServiceAccount: Optional. The service account to associate the VM with.
  1742  	ServiceAccount string `json:"serviceAccount,omitempty"`
  1743  	// VmName: Required. The name of the VM to create.
  1744  	VmName string `json:"vmName,omitempty"`
  1745  	// ForceSendFields is a list of field names (e.g. "AdditionalLicenses") to
  1746  	// unconditionally include in API requests. By default, fields with empty or
  1747  	// default values are omitted from API requests. See
  1748  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1749  	// details.
  1750  	ForceSendFields []string `json:"-"`
  1751  	// NullFields is a list of field names (e.g. "AdditionalLicenses") to include
  1752  	// in API requests with the JSON null value. By default, fields with empty
  1753  	// values are omitted from API requests. See
  1754  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1755  	NullFields []string `json:"-"`
  1756  }
  1757  
  1758  func (s *DisksMigrationVmTargetDefaults) MarshalJSON() ([]byte, error) {
  1759  	type NoMethod DisksMigrationVmTargetDefaults
  1760  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1761  }
  1762  
  1763  // DisksMigrationVmTargetDetails: Details for the VM created VM as part of
  1764  // disks migration.
  1765  type DisksMigrationVmTargetDetails struct {
  1766  	// VmUri: Output only. The URI of the Compute Engine VM.
  1767  	VmUri string `json:"vmUri,omitempty"`
  1768  	// ForceSendFields is a list of field names (e.g. "VmUri") to unconditionally
  1769  	// include in API requests. By default, fields with empty or default values are
  1770  	// omitted from API requests. See
  1771  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1772  	// details.
  1773  	ForceSendFields []string `json:"-"`
  1774  	// NullFields is a list of field names (e.g. "VmUri") to include in API
  1775  	// requests with the JSON null value. By default, fields with empty values are
  1776  	// omitted from API requests. See
  1777  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1778  	NullFields []string `json:"-"`
  1779  }
  1780  
  1781  func (s *DisksMigrationVmTargetDetails) MarshalJSON() ([]byte, error) {
  1782  	type NoMethod DisksMigrationVmTargetDetails
  1783  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1784  }
  1785  
  1786  // Empty: A generic empty message that you can re-use to avoid defining
  1787  // duplicated empty messages in your APIs. A typical example is to use it as
  1788  // the request or the response type of an API method. For instance: service Foo
  1789  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  1790  type Empty struct {
  1791  	// ServerResponse contains the HTTP response code and headers from the server.
  1792  	googleapi.ServerResponse `json:"-"`
  1793  }
  1794  
  1795  // Encryption: Encryption message describes the details of the applied
  1796  // encryption.
  1797  type Encryption struct {
  1798  	// KmsKey: Required. The name of the encryption key that is stored in Google
  1799  	// Cloud KMS.
  1800  	KmsKey string `json:"kmsKey,omitempty"`
  1801  	// ForceSendFields is a list of field names (e.g. "KmsKey") to unconditionally
  1802  	// include in API requests. By default, fields with empty or default values are
  1803  	// omitted from API requests. See
  1804  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1805  	// details.
  1806  	ForceSendFields []string `json:"-"`
  1807  	// NullFields is a list of field names (e.g. "KmsKey") to include in API
  1808  	// requests with the JSON null value. By default, fields with empty values are
  1809  	// omitted from API requests. See
  1810  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1811  	NullFields []string `json:"-"`
  1812  }
  1813  
  1814  func (s *Encryption) MarshalJSON() ([]byte, error) {
  1815  	type NoMethod Encryption
  1816  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1817  }
  1818  
  1819  // FetchInventoryResponse: Response message for fetchInventory.
  1820  type FetchInventoryResponse struct {
  1821  	// AwsVms: The description of the VMs in a Source of type AWS.
  1822  	AwsVms *AwsVmsDetails `json:"awsVms,omitempty"`
  1823  	// AzureVms: The description of the VMs in a Source of type Azure.
  1824  	AzureVms *AzureVmsDetails `json:"azureVms,omitempty"`
  1825  	// NextPageToken: Output only. A token, which can be sent as `page_token` to
  1826  	// retrieve the next page. If this field is omitted, there are no subsequent
  1827  	// pages.
  1828  	NextPageToken string `json:"nextPageToken,omitempty"`
  1829  	// UpdateTime: Output only. The timestamp when the source was last queried (if
  1830  	// the result is from the cache).
  1831  	UpdateTime string `json:"updateTime,omitempty"`
  1832  	// VmwareVms: The description of the VMs in a Source of type Vmware.
  1833  	VmwareVms *VmwareVmsDetails `json:"vmwareVms,omitempty"`
  1834  
  1835  	// ServerResponse contains the HTTP response code and headers from the server.
  1836  	googleapi.ServerResponse `json:"-"`
  1837  	// ForceSendFields is a list of field names (e.g. "AwsVms") to unconditionally
  1838  	// include in API requests. By default, fields with empty or default values are
  1839  	// omitted from API requests. See
  1840  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1841  	// details.
  1842  	ForceSendFields []string `json:"-"`
  1843  	// NullFields is a list of field names (e.g. "AwsVms") to include in API
  1844  	// requests with the JSON null value. By default, fields with empty values are
  1845  	// omitted from API requests. See
  1846  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1847  	NullFields []string `json:"-"`
  1848  }
  1849  
  1850  func (s *FetchInventoryResponse) MarshalJSON() ([]byte, error) {
  1851  	type NoMethod FetchInventoryResponse
  1852  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1853  }
  1854  
  1855  // FinalizeMigrationRequest: Request message for 'FinalizeMigration' request.
  1856  type FinalizeMigrationRequest struct {
  1857  }
  1858  
  1859  // Group: Describes message for 'Group' resource. The Group is a collections of
  1860  // several MigratingVms.
  1861  type Group struct {
  1862  	// CreateTime: Output only. The create time timestamp.
  1863  	CreateTime string `json:"createTime,omitempty"`
  1864  	// Description: User-provided description of the group.
  1865  	Description string `json:"description,omitempty"`
  1866  	// DisplayName: Display name is a user defined name for this group which can be
  1867  	// updated.
  1868  	DisplayName string `json:"displayName,omitempty"`
  1869  	// MigrationTargetType: Immutable. The target type of this group.
  1870  	//
  1871  	// Possible values:
  1872  	//   "MIGRATION_TARGET_TYPE_UNSPECIFIED" - Group type is not specified. This
  1873  	// defaults to Compute Engine targets.
  1874  	//   "MIGRATION_TARGET_TYPE_GCE" - All MigratingVMs in the group must have
  1875  	// Compute Engine targets.
  1876  	//   "MIGRATION_TARGET_TYPE_DISKS" - All MigratingVMs in the group must have
  1877  	// Compute Engine Disks targets.
  1878  	MigrationTargetType string `json:"migrationTargetType,omitempty"`
  1879  	// Name: Output only. The Group name.
  1880  	Name string `json:"name,omitempty"`
  1881  	// UpdateTime: Output only. The update time timestamp.
  1882  	UpdateTime string `json:"updateTime,omitempty"`
  1883  
  1884  	// ServerResponse contains the HTTP response code and headers from the server.
  1885  	googleapi.ServerResponse `json:"-"`
  1886  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1887  	// unconditionally include in API requests. By default, fields with empty or
  1888  	// default values are omitted from API requests. See
  1889  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1890  	// details.
  1891  	ForceSendFields []string `json:"-"`
  1892  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1893  	// requests with the JSON null value. By default, fields with empty values are
  1894  	// omitted from API requests. See
  1895  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1896  	NullFields []string `json:"-"`
  1897  }
  1898  
  1899  func (s *Group) MarshalJSON() ([]byte, error) {
  1900  	type NoMethod Group
  1901  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1902  }
  1903  
  1904  // ImageImport: ImageImport describes the configuration of the image import to
  1905  // run.
  1906  type ImageImport struct {
  1907  	// CloudStorageUri: Immutable. The path to the Cloud Storage file from which
  1908  	// the image should be imported.
  1909  	CloudStorageUri string `json:"cloudStorageUri,omitempty"`
  1910  	// CreateTime: Output only. The time the image import was created.
  1911  	CreateTime string `json:"createTime,omitempty"`
  1912  	// DiskImageTargetDefaults: Immutable. Target details for importing a disk
  1913  	// image, will be used by ImageImportJob.
  1914  	DiskImageTargetDefaults *DiskImageTargetDetails `json:"diskImageTargetDefaults,omitempty"`
  1915  	// Encryption: Immutable. The encryption details used by the image import
  1916  	// process during the image adaptation for Compute Engine.
  1917  	Encryption *Encryption `json:"encryption,omitempty"`
  1918  	// Name: Output only. The resource path of the ImageImport.
  1919  	Name string `json:"name,omitempty"`
  1920  	// RecentImageImportJobs: Output only. The result of the most recent runs for
  1921  	// this ImageImport. All jobs for this ImageImport can be listed via
  1922  	// ListImageImportJobs.
  1923  	RecentImageImportJobs []*ImageImportJob `json:"recentImageImportJobs,omitempty"`
  1924  
  1925  	// ServerResponse contains the HTTP response code and headers from the server.
  1926  	googleapi.ServerResponse `json:"-"`
  1927  	// ForceSendFields is a list of field names (e.g. "CloudStorageUri") to
  1928  	// unconditionally include in API requests. By default, fields with empty or
  1929  	// default values are omitted from API requests. See
  1930  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1931  	// details.
  1932  	ForceSendFields []string `json:"-"`
  1933  	// NullFields is a list of field names (e.g. "CloudStorageUri") to include in
  1934  	// API requests with the JSON null value. By default, fields with empty values
  1935  	// are omitted from API requests. See
  1936  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1937  	NullFields []string `json:"-"`
  1938  }
  1939  
  1940  func (s *ImageImport) MarshalJSON() ([]byte, error) {
  1941  	type NoMethod ImageImport
  1942  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1943  }
  1944  
  1945  // ImageImportJob: ImageImportJob describes the progress and result of an image
  1946  // import.
  1947  type ImageImportJob struct {
  1948  	// CloudStorageUri: Output only. The path to the Cloud Storage file from which
  1949  	// the image should be imported.
  1950  	CloudStorageUri string `json:"cloudStorageUri,omitempty"`
  1951  	// CreateTime: Output only. The time the image import was created (as an API
  1952  	// call, not when it was actually created in the target).
  1953  	CreateTime string `json:"createTime,omitempty"`
  1954  	// CreatedResources: Output only. The resource paths of the resources created
  1955  	// by the image import job.
  1956  	CreatedResources []string `json:"createdResources,omitempty"`
  1957  	// DiskImageTargetDetails: Output only. Target details used to import a disk
  1958  	// image.
  1959  	DiskImageTargetDetails *DiskImageTargetDetails `json:"diskImageTargetDetails,omitempty"`
  1960  	// EndTime: Output only. The time the image import was ended.
  1961  	EndTime string `json:"endTime,omitempty"`
  1962  	// Errors: Output only. Provides details on the error that led to the image
  1963  	// import state in case of an error.
  1964  	Errors []*Status `json:"errors,omitempty"`
  1965  	// Name: Output only. The resource path of the ImageImportJob.
  1966  	Name string `json:"name,omitempty"`
  1967  	// State: Output only. The state of the image import.
  1968  	//
  1969  	// Possible values:
  1970  	//   "STATE_UNSPECIFIED" - The state is unknown.
  1971  	//   "PENDING" - The image import has not yet started.
  1972  	//   "RUNNING" - The image import is active and running.
  1973  	//   "SUCCEEDED" - The image import has finished successfully.
  1974  	//   "FAILED" - The image import has finished with errors.
  1975  	//   "CANCELLING" - The image import is being cancelled.
  1976  	//   "CANCELLED" - The image import was cancelled.
  1977  	State string `json:"state,omitempty"`
  1978  	// Steps: Output only. The image import steps list representing its progress.
  1979  	Steps []*ImageImportStep `json:"steps,omitempty"`
  1980  	// Warnings: Output only. Warnings that occurred during the image import.
  1981  	Warnings []*MigrationWarning `json:"warnings,omitempty"`
  1982  
  1983  	// ServerResponse contains the HTTP response code and headers from the server.
  1984  	googleapi.ServerResponse `json:"-"`
  1985  	// ForceSendFields is a list of field names (e.g. "CloudStorageUri") to
  1986  	// unconditionally include in API requests. By default, fields with empty or
  1987  	// default values are omitted from API requests. See
  1988  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1989  	// details.
  1990  	ForceSendFields []string `json:"-"`
  1991  	// NullFields is a list of field names (e.g. "CloudStorageUri") to include in
  1992  	// API requests with the JSON null value. By default, fields with empty values
  1993  	// are omitted from API requests. See
  1994  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1995  	NullFields []string `json:"-"`
  1996  }
  1997  
  1998  func (s *ImageImportJob) MarshalJSON() ([]byte, error) {
  1999  	type NoMethod ImageImportJob
  2000  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2001  }
  2002  
  2003  // ImageImportOsAdaptationParameters: Parameters affecting the OS adaptation
  2004  // process.
  2005  type ImageImportOsAdaptationParameters struct {
  2006  	// Generalize: Optional. Set to true in order to generalize the imported image.
  2007  	// The generalization process enables co-existence of multiple VMs created from
  2008  	// the same image. For Windows, generalizing the image removes
  2009  	// computer-specific information such as installed drivers and the computer
  2010  	// security identifier (SID).
  2011  	Generalize bool `json:"generalize,omitempty"`
  2012  	// LicenseType: Optional. Choose which type of license to apply to the imported
  2013  	// image.
  2014  	//
  2015  	// Possible values:
  2016  	//   "COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT" - The license type is the default
  2017  	// for the OS.
  2018  	//   "COMPUTE_ENGINE_LICENSE_TYPE_PAYG" - The license type is Pay As You Go
  2019  	// license type.
  2020  	//   "COMPUTE_ENGINE_LICENSE_TYPE_BYOL" - The license type is Bring Your Own
  2021  	// License type.
  2022  	LicenseType string `json:"licenseType,omitempty"`
  2023  	// ForceSendFields is a list of field names (e.g. "Generalize") to
  2024  	// unconditionally include in API requests. By default, fields with empty or
  2025  	// default values are omitted from API requests. See
  2026  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2027  	// details.
  2028  	ForceSendFields []string `json:"-"`
  2029  	// NullFields is a list of field names (e.g. "Generalize") to include in API
  2030  	// requests with the JSON null value. By default, fields with empty values are
  2031  	// omitted from API requests. See
  2032  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2033  	NullFields []string `json:"-"`
  2034  }
  2035  
  2036  func (s *ImageImportOsAdaptationParameters) MarshalJSON() ([]byte, error) {
  2037  	type NoMethod ImageImportOsAdaptationParameters
  2038  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2039  }
  2040  
  2041  // ImageImportStep: ImageImportStep holds information about the image import
  2042  // step progress.
  2043  type ImageImportStep struct {
  2044  	// AdaptingOs: Adapting OS step.
  2045  	AdaptingOs *AdaptingOSStep `json:"adaptingOs,omitempty"`
  2046  	// CreatingImage: Creating image step.
  2047  	CreatingImage *CreatingImageStep `json:"creatingImage,omitempty"`
  2048  	// EndTime: Output only. The time the step has ended.
  2049  	EndTime string `json:"endTime,omitempty"`
  2050  	// Initializing: Initializing step.
  2051  	Initializing *InitializingImageImportStep `json:"initializing,omitempty"`
  2052  	// LoadingSourceFiles: Loading source files step.
  2053  	LoadingSourceFiles *LoadingImageSourceFilesStep `json:"loadingSourceFiles,omitempty"`
  2054  	// StartTime: Output only. The time the step has started.
  2055  	StartTime string `json:"startTime,omitempty"`
  2056  	// ForceSendFields is a list of field names (e.g. "AdaptingOs") to
  2057  	// unconditionally include in API requests. By default, fields with empty or
  2058  	// default values are omitted from API requests. See
  2059  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2060  	// details.
  2061  	ForceSendFields []string `json:"-"`
  2062  	// NullFields is a list of field names (e.g. "AdaptingOs") to include in API
  2063  	// requests with the JSON null value. By default, fields with empty values are
  2064  	// omitted from API requests. See
  2065  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2066  	NullFields []string `json:"-"`
  2067  }
  2068  
  2069  func (s *ImageImportStep) MarshalJSON() ([]byte, error) {
  2070  	type NoMethod ImageImportStep
  2071  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2072  }
  2073  
  2074  // InitializingImageImportStep: InitializingImageImportStep contains specific
  2075  // step details.
  2076  type InitializingImageImportStep struct {
  2077  }
  2078  
  2079  // InitializingReplicationStep: InitializingReplicationStep contains specific
  2080  // step details.
  2081  type InitializingReplicationStep struct {
  2082  }
  2083  
  2084  // InstantiatingMigratedVMStep: InstantiatingMigratedVMStep contains specific
  2085  // step details.
  2086  type InstantiatingMigratedVMStep struct {
  2087  }
  2088  
  2089  // Link: Describes a URL link.
  2090  type Link struct {
  2091  	// Description: Describes what the link offers.
  2092  	Description string `json:"description,omitempty"`
  2093  	// Url: The URL of the link.
  2094  	Url string `json:"url,omitempty"`
  2095  	// ForceSendFields is a list of field names (e.g. "Description") to
  2096  	// unconditionally include in API requests. By default, fields with empty or
  2097  	// default values are omitted from API requests. See
  2098  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2099  	// details.
  2100  	ForceSendFields []string `json:"-"`
  2101  	// NullFields is a list of field names (e.g. "Description") to include in API
  2102  	// requests with the JSON null value. By default, fields with empty values are
  2103  	// omitted from API requests. See
  2104  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2105  	NullFields []string `json:"-"`
  2106  }
  2107  
  2108  func (s *Link) MarshalJSON() ([]byte, error) {
  2109  	type NoMethod Link
  2110  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2111  }
  2112  
  2113  // ListCloneJobsResponse: Response message for 'ListCloneJobs' request.
  2114  type ListCloneJobsResponse struct {
  2115  	// CloneJobs: Output only. The list of clone jobs response.
  2116  	CloneJobs []*CloneJob `json:"cloneJobs,omitempty"`
  2117  	// NextPageToken: Output only. A token, which can be sent as `page_token` to
  2118  	// retrieve the next page. If this field is omitted, there are no subsequent
  2119  	// pages.
  2120  	NextPageToken string `json:"nextPageToken,omitempty"`
  2121  	// Unreachable: Output only. Locations that could not be reached.
  2122  	Unreachable []string `json:"unreachable,omitempty"`
  2123  
  2124  	// ServerResponse contains the HTTP response code and headers from the server.
  2125  	googleapi.ServerResponse `json:"-"`
  2126  	// ForceSendFields is a list of field names (e.g. "CloneJobs") to
  2127  	// unconditionally include in API requests. By default, fields with empty or
  2128  	// default values are omitted from API requests. See
  2129  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2130  	// details.
  2131  	ForceSendFields []string `json:"-"`
  2132  	// NullFields is a list of field names (e.g. "CloneJobs") to include in API
  2133  	// requests with the JSON null value. By default, fields with empty values are
  2134  	// omitted from API requests. See
  2135  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2136  	NullFields []string `json:"-"`
  2137  }
  2138  
  2139  func (s *ListCloneJobsResponse) MarshalJSON() ([]byte, error) {
  2140  	type NoMethod ListCloneJobsResponse
  2141  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2142  }
  2143  
  2144  // ListCutoverJobsResponse: Response message for 'ListCutoverJobs' request.
  2145  type ListCutoverJobsResponse struct {
  2146  	// CutoverJobs: Output only. The list of cutover jobs response.
  2147  	CutoverJobs []*CutoverJob `json:"cutoverJobs,omitempty"`
  2148  	// NextPageToken: Output only. A token, which can be sent as `page_token` to
  2149  	// retrieve the next page. If this field is omitted, there are no subsequent
  2150  	// pages.
  2151  	NextPageToken string `json:"nextPageToken,omitempty"`
  2152  	// Unreachable: Output only. Locations that could not be reached.
  2153  	Unreachable []string `json:"unreachable,omitempty"`
  2154  
  2155  	// ServerResponse contains the HTTP response code and headers from the server.
  2156  	googleapi.ServerResponse `json:"-"`
  2157  	// ForceSendFields is a list of field names (e.g. "CutoverJobs") to
  2158  	// unconditionally include in API requests. By default, fields with empty or
  2159  	// default values are omitted from API requests. See
  2160  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2161  	// details.
  2162  	ForceSendFields []string `json:"-"`
  2163  	// NullFields is a list of field names (e.g. "CutoverJobs") to include in API
  2164  	// requests with the JSON null value. By default, fields with empty values are
  2165  	// omitted from API requests. See
  2166  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2167  	NullFields []string `json:"-"`
  2168  }
  2169  
  2170  func (s *ListCutoverJobsResponse) MarshalJSON() ([]byte, error) {
  2171  	type NoMethod ListCutoverJobsResponse
  2172  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2173  }
  2174  
  2175  // ListDatacenterConnectorsResponse: Response message for
  2176  // 'ListDatacenterConnectors' request.
  2177  type ListDatacenterConnectorsResponse struct {
  2178  	// DatacenterConnectors: Output only. The list of sources response.
  2179  	DatacenterConnectors []*DatacenterConnector `json:"datacenterConnectors,omitempty"`
  2180  	// NextPageToken: Output only. A token, which can be sent as `page_token` to
  2181  	// retrieve the next page. If this field is omitted, there are no subsequent
  2182  	// pages.
  2183  	NextPageToken string `json:"nextPageToken,omitempty"`
  2184  	// Unreachable: Output only. Locations that could not be reached.
  2185  	Unreachable []string `json:"unreachable,omitempty"`
  2186  
  2187  	// ServerResponse contains the HTTP response code and headers from the server.
  2188  	googleapi.ServerResponse `json:"-"`
  2189  	// ForceSendFields is a list of field names (e.g. "DatacenterConnectors") to
  2190  	// unconditionally include in API requests. By default, fields with empty or
  2191  	// default values are omitted from API requests. See
  2192  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2193  	// details.
  2194  	ForceSendFields []string `json:"-"`
  2195  	// NullFields is a list of field names (e.g. "DatacenterConnectors") to include
  2196  	// in API requests with the JSON null value. By default, fields with empty
  2197  	// values are omitted from API requests. See
  2198  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2199  	NullFields []string `json:"-"`
  2200  }
  2201  
  2202  func (s *ListDatacenterConnectorsResponse) MarshalJSON() ([]byte, error) {
  2203  	type NoMethod ListDatacenterConnectorsResponse
  2204  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2205  }
  2206  
  2207  // ListGroupsResponse: Response message for 'ListGroups' request.
  2208  type ListGroupsResponse struct {
  2209  	// Groups: Output only. The list of groups response.
  2210  	Groups []*Group `json:"groups,omitempty"`
  2211  	// NextPageToken: Output only. A token, which can be sent as `page_token` to
  2212  	// retrieve the next page. If this field is omitted, there are no subsequent
  2213  	// pages.
  2214  	NextPageToken string `json:"nextPageToken,omitempty"`
  2215  	// Unreachable: Output only. Locations that could not be reached.
  2216  	Unreachable []string `json:"unreachable,omitempty"`
  2217  
  2218  	// ServerResponse contains the HTTP response code and headers from the server.
  2219  	googleapi.ServerResponse `json:"-"`
  2220  	// ForceSendFields is a list of field names (e.g. "Groups") to unconditionally
  2221  	// include in API requests. By default, fields with empty or default values are
  2222  	// omitted from API requests. See
  2223  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2224  	// details.
  2225  	ForceSendFields []string `json:"-"`
  2226  	// NullFields is a list of field names (e.g. "Groups") to include in API
  2227  	// requests with the JSON null value. By default, fields with empty values are
  2228  	// omitted from API requests. See
  2229  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2230  	NullFields []string `json:"-"`
  2231  }
  2232  
  2233  func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) {
  2234  	type NoMethod ListGroupsResponse
  2235  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2236  }
  2237  
  2238  // ListImageImportJobsResponse: Response message for 'ListImageImportJobs'
  2239  // call.
  2240  type ListImageImportJobsResponse struct {
  2241  	// ImageImportJobs: Output only. The list of target response.
  2242  	ImageImportJobs []*ImageImportJob `json:"imageImportJobs,omitempty"`
  2243  	// NextPageToken: Output only. A token, which can be sent as `page_token` to
  2244  	// retrieve the next page. If this field is omitted, there are no subsequent
  2245  	// pages.
  2246  	NextPageToken string `json:"nextPageToken,omitempty"`
  2247  	// Unreachable: Output only. Locations that could not be reached.
  2248  	Unreachable []string `json:"unreachable,omitempty"`
  2249  
  2250  	// ServerResponse contains the HTTP response code and headers from the server.
  2251  	googleapi.ServerResponse `json:"-"`
  2252  	// ForceSendFields is a list of field names (e.g. "ImageImportJobs") to
  2253  	// unconditionally include in API requests. By default, fields with empty or
  2254  	// default values are omitted from API requests. See
  2255  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2256  	// details.
  2257  	ForceSendFields []string `json:"-"`
  2258  	// NullFields is a list of field names (e.g. "ImageImportJobs") to include in
  2259  	// API requests with the JSON null value. By default, fields with empty values
  2260  	// are omitted from API requests. See
  2261  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2262  	NullFields []string `json:"-"`
  2263  }
  2264  
  2265  func (s *ListImageImportJobsResponse) MarshalJSON() ([]byte, error) {
  2266  	type NoMethod ListImageImportJobsResponse
  2267  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2268  }
  2269  
  2270  // ListImageImportsResponse: Response message for 'ListImageImports' call.
  2271  type ListImageImportsResponse struct {
  2272  	// ImageImports: Output only. The list of target response.
  2273  	ImageImports []*ImageImport `json:"imageImports,omitempty"`
  2274  	// NextPageToken: Output only. A token, which can be sent as `page_token` to
  2275  	// retrieve the next page. If this field is omitted, there are no subsequent
  2276  	// pages.
  2277  	NextPageToken string `json:"nextPageToken,omitempty"`
  2278  	// Unreachable: Output only. Locations that could not be reached.
  2279  	Unreachable []string `json:"unreachable,omitempty"`
  2280  
  2281  	// ServerResponse contains the HTTP response code and headers from the server.
  2282  	googleapi.ServerResponse `json:"-"`
  2283  	// ForceSendFields is a list of field names (e.g. "ImageImports") to
  2284  	// unconditionally include in API requests. By default, fields with empty or
  2285  	// default values are omitted from API requests. See
  2286  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2287  	// details.
  2288  	ForceSendFields []string `json:"-"`
  2289  	// NullFields is a list of field names (e.g. "ImageImports") to include in API
  2290  	// requests with the JSON null value. By default, fields with empty values are
  2291  	// omitted from API requests. See
  2292  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2293  	NullFields []string `json:"-"`
  2294  }
  2295  
  2296  func (s *ListImageImportsResponse) MarshalJSON() ([]byte, error) {
  2297  	type NoMethod ListImageImportsResponse
  2298  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2299  }
  2300  
  2301  // ListLocationsResponse: The response message for Locations.ListLocations.
  2302  type ListLocationsResponse struct {
  2303  	// Locations: A list of locations that matches the specified filter in the
  2304  	// request.
  2305  	Locations []*Location `json:"locations,omitempty"`
  2306  	// NextPageToken: The standard List next-page token.
  2307  	NextPageToken string `json:"nextPageToken,omitempty"`
  2308  
  2309  	// ServerResponse contains the HTTP response code and headers from the server.
  2310  	googleapi.ServerResponse `json:"-"`
  2311  	// ForceSendFields is a list of field names (e.g. "Locations") to
  2312  	// unconditionally include in API requests. By default, fields with empty or
  2313  	// default values are omitted from API requests. See
  2314  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2315  	// details.
  2316  	ForceSendFields []string `json:"-"`
  2317  	// NullFields is a list of field names (e.g. "Locations") to include in API
  2318  	// requests with the JSON null value. By default, fields with empty values are
  2319  	// omitted from API requests. See
  2320  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2321  	NullFields []string `json:"-"`
  2322  }
  2323  
  2324  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  2325  	type NoMethod ListLocationsResponse
  2326  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2327  }
  2328  
  2329  // ListMigratingVmsResponse: Response message for 'ListMigratingVms' request.
  2330  type ListMigratingVmsResponse struct {
  2331  	// MigratingVms: Output only. The list of Migrating VMs response.
  2332  	MigratingVms []*MigratingVm `json:"migratingVms,omitempty"`
  2333  	// NextPageToken: Output only. A token, which can be sent as `page_token` to
  2334  	// retrieve the next page. If this field is omitted, there are no subsequent
  2335  	// pages.
  2336  	NextPageToken string `json:"nextPageToken,omitempty"`
  2337  	// Unreachable: Output only. Locations that could not be reached.
  2338  	Unreachable []string `json:"unreachable,omitempty"`
  2339  
  2340  	// ServerResponse contains the HTTP response code and headers from the server.
  2341  	googleapi.ServerResponse `json:"-"`
  2342  	// ForceSendFields is a list of field names (e.g. "MigratingVms") to
  2343  	// unconditionally include in API requests. By default, fields with empty or
  2344  	// default values are omitted from API requests. See
  2345  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2346  	// details.
  2347  	ForceSendFields []string `json:"-"`
  2348  	// NullFields is a list of field names (e.g. "MigratingVms") to include in API
  2349  	// requests with the JSON null value. By default, fields with empty values are
  2350  	// omitted from API requests. See
  2351  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2352  	NullFields []string `json:"-"`
  2353  }
  2354  
  2355  func (s *ListMigratingVmsResponse) MarshalJSON() ([]byte, error) {
  2356  	type NoMethod ListMigratingVmsResponse
  2357  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2358  }
  2359  
  2360  // ListOperationsResponse: The response message for Operations.ListOperations.
  2361  type ListOperationsResponse struct {
  2362  	// NextPageToken: The standard List next-page token.
  2363  	NextPageToken string `json:"nextPageToken,omitempty"`
  2364  	// Operations: A list of operations that matches the specified filter in the
  2365  	// request.
  2366  	Operations []*Operation `json:"operations,omitempty"`
  2367  
  2368  	// ServerResponse contains the HTTP response code and headers from the server.
  2369  	googleapi.ServerResponse `json:"-"`
  2370  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2371  	// unconditionally include in API requests. By default, fields with empty or
  2372  	// default values are omitted from API requests. See
  2373  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2374  	// details.
  2375  	ForceSendFields []string `json:"-"`
  2376  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2377  	// requests with the JSON null value. By default, fields with empty values are
  2378  	// omitted from API requests. See
  2379  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2380  	NullFields []string `json:"-"`
  2381  }
  2382  
  2383  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  2384  	type NoMethod ListOperationsResponse
  2385  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2386  }
  2387  
  2388  // ListReplicationCyclesResponse: Response message for 'ListReplicationCycles'
  2389  // request.
  2390  type ListReplicationCyclesResponse struct {
  2391  	// NextPageToken: Output only. A token, which can be sent as `page_token` to
  2392  	// retrieve the next page. If this field is omitted, there are no subsequent
  2393  	// pages.
  2394  	NextPageToken string `json:"nextPageToken,omitempty"`
  2395  	// ReplicationCycles: Output only. The list of replication cycles response.
  2396  	ReplicationCycles []*ReplicationCycle `json:"replicationCycles,omitempty"`
  2397  	// Unreachable: Output only. Locations that could not be reached.
  2398  	Unreachable []string `json:"unreachable,omitempty"`
  2399  
  2400  	// ServerResponse contains the HTTP response code and headers from the server.
  2401  	googleapi.ServerResponse `json:"-"`
  2402  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2403  	// unconditionally include in API requests. By default, fields with empty or
  2404  	// default values are omitted from API requests. See
  2405  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2406  	// details.
  2407  	ForceSendFields []string `json:"-"`
  2408  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2409  	// requests with the JSON null value. By default, fields with empty values are
  2410  	// omitted from API requests. See
  2411  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2412  	NullFields []string `json:"-"`
  2413  }
  2414  
  2415  func (s *ListReplicationCyclesResponse) MarshalJSON() ([]byte, error) {
  2416  	type NoMethod ListReplicationCyclesResponse
  2417  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2418  }
  2419  
  2420  // ListSourcesResponse: Response message for 'ListSources' request.
  2421  type ListSourcesResponse struct {
  2422  	// NextPageToken: Output only. A token, which can be sent as `page_token` to
  2423  	// retrieve the next page. If this field is omitted, there are no subsequent
  2424  	// pages.
  2425  	NextPageToken string `json:"nextPageToken,omitempty"`
  2426  	// Sources: Output only. The list of sources response.
  2427  	Sources []*Source `json:"sources,omitempty"`
  2428  	// Unreachable: Output only. Locations that could not be reached.
  2429  	Unreachable []string `json:"unreachable,omitempty"`
  2430  
  2431  	// ServerResponse contains the HTTP response code and headers from the server.
  2432  	googleapi.ServerResponse `json:"-"`
  2433  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2434  	// unconditionally include in API requests. By default, fields with empty or
  2435  	// default values are omitted from API requests. See
  2436  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2437  	// details.
  2438  	ForceSendFields []string `json:"-"`
  2439  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2440  	// requests with the JSON null value. By default, fields with empty values are
  2441  	// omitted from API requests. See
  2442  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2443  	NullFields []string `json:"-"`
  2444  }
  2445  
  2446  func (s *ListSourcesResponse) MarshalJSON() ([]byte, error) {
  2447  	type NoMethod ListSourcesResponse
  2448  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2449  }
  2450  
  2451  // ListTargetProjectsResponse: Response message for 'ListTargetProjects' call.
  2452  type ListTargetProjectsResponse struct {
  2453  	// NextPageToken: Output only. A token, which can be sent as `page_token` to
  2454  	// retrieve the next page. If this field is omitted, there are no subsequent
  2455  	// pages.
  2456  	NextPageToken string `json:"nextPageToken,omitempty"`
  2457  	// TargetProjects: Output only. The list of target response.
  2458  	TargetProjects []*TargetProject `json:"targetProjects,omitempty"`
  2459  	// Unreachable: Output only. Locations that could not be reached.
  2460  	Unreachable []string `json:"unreachable,omitempty"`
  2461  
  2462  	// ServerResponse contains the HTTP response code and headers from the server.
  2463  	googleapi.ServerResponse `json:"-"`
  2464  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2465  	// unconditionally include in API requests. By default, fields with empty or
  2466  	// default values are omitted from API requests. See
  2467  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2468  	// details.
  2469  	ForceSendFields []string `json:"-"`
  2470  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2471  	// requests with the JSON null value. By default, fields with empty values are
  2472  	// omitted from API requests. See
  2473  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2474  	NullFields []string `json:"-"`
  2475  }
  2476  
  2477  func (s *ListTargetProjectsResponse) MarshalJSON() ([]byte, error) {
  2478  	type NoMethod ListTargetProjectsResponse
  2479  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2480  }
  2481  
  2482  // ListUtilizationReportsResponse: Response message for
  2483  // 'ListUtilizationReports' request.
  2484  type ListUtilizationReportsResponse struct {
  2485  	// NextPageToken: Output only. A token, which can be sent as `page_token` to
  2486  	// retrieve the next page. If this field is omitted, there are no subsequent
  2487  	// pages.
  2488  	NextPageToken string `json:"nextPageToken,omitempty"`
  2489  	// Unreachable: Output only. Locations that could not be reached.
  2490  	Unreachable []string `json:"unreachable,omitempty"`
  2491  	// UtilizationReports: Output only. The list of reports.
  2492  	UtilizationReports []*UtilizationReport `json:"utilizationReports,omitempty"`
  2493  
  2494  	// ServerResponse contains the HTTP response code and headers from the server.
  2495  	googleapi.ServerResponse `json:"-"`
  2496  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2497  	// unconditionally include in API requests. By default, fields with empty or
  2498  	// default values are omitted from API requests. See
  2499  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2500  	// details.
  2501  	ForceSendFields []string `json:"-"`
  2502  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2503  	// requests with the JSON null value. By default, fields with empty values are
  2504  	// omitted from API requests. See
  2505  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2506  	NullFields []string `json:"-"`
  2507  }
  2508  
  2509  func (s *ListUtilizationReportsResponse) MarshalJSON() ([]byte, error) {
  2510  	type NoMethod ListUtilizationReportsResponse
  2511  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2512  }
  2513  
  2514  // LoadingImageSourceFilesStep: LoadingImageSourceFilesStep contains specific
  2515  // step details.
  2516  type LoadingImageSourceFilesStep struct {
  2517  }
  2518  
  2519  // LocalizedMessage: Provides a localized error message that is safe to return
  2520  // to the user which can be attached to an RPC error.
  2521  type LocalizedMessage struct {
  2522  	// Locale: The locale used following the specification defined at
  2523  	// https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US",
  2524  	// "fr-CH", "es-MX"
  2525  	Locale string `json:"locale,omitempty"`
  2526  	// Message: The localized error message in the above locale.
  2527  	Message string `json:"message,omitempty"`
  2528  	// ForceSendFields is a list of field names (e.g. "Locale") to unconditionally
  2529  	// include in API requests. By default, fields with empty or default values are
  2530  	// omitted from API requests. See
  2531  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2532  	// details.
  2533  	ForceSendFields []string `json:"-"`
  2534  	// NullFields is a list of field names (e.g. "Locale") to include in API
  2535  	// requests with the JSON null value. By default, fields with empty values are
  2536  	// omitted from API requests. See
  2537  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2538  	NullFields []string `json:"-"`
  2539  }
  2540  
  2541  func (s *LocalizedMessage) MarshalJSON() ([]byte, error) {
  2542  	type NoMethod LocalizedMessage
  2543  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2544  }
  2545  
  2546  // Location: A resource that represents a Google Cloud location.
  2547  type Location struct {
  2548  	// DisplayName: The friendly name for this location, typically a nearby city
  2549  	// name. For example, "Tokyo".
  2550  	DisplayName string `json:"displayName,omitempty"`
  2551  	// Labels: Cross-service attributes for the location. For example
  2552  	// {"cloud.googleapis.com/region": "us-east1"}
  2553  	Labels map[string]string `json:"labels,omitempty"`
  2554  	// LocationId: The canonical id for this location. For example: "us-east1".
  2555  	LocationId string `json:"locationId,omitempty"`
  2556  	// Metadata: Service-specific metadata. For example the available capacity at
  2557  	// the given location.
  2558  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2559  	// Name: Resource name for the location, which may vary between
  2560  	// implementations. For example:
  2561  	// "projects/example-project/locations/us-east1"
  2562  	Name string `json:"name,omitempty"`
  2563  
  2564  	// ServerResponse contains the HTTP response code and headers from the server.
  2565  	googleapi.ServerResponse `json:"-"`
  2566  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  2567  	// unconditionally include in API requests. By default, fields with empty or
  2568  	// default values are omitted from API requests. See
  2569  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2570  	// details.
  2571  	ForceSendFields []string `json:"-"`
  2572  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  2573  	// requests with the JSON null value. By default, fields with empty values are
  2574  	// omitted from API requests. See
  2575  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2576  	NullFields []string `json:"-"`
  2577  }
  2578  
  2579  func (s *Location) MarshalJSON() ([]byte, error) {
  2580  	type NoMethod Location
  2581  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2582  }
  2583  
  2584  // MigratingVm: MigratingVm describes the VM that will be migrated from a
  2585  // Source environment and its replication state.
  2586  type MigratingVm struct {
  2587  	// AwsSourceVmDetails: Output only. Details of the VM from an AWS source.
  2588  	AwsSourceVmDetails *AwsSourceVmDetails `json:"awsSourceVmDetails,omitempty"`
  2589  	// AzureSourceVmDetails: Output only. Details of the VM from an Azure source.
  2590  	AzureSourceVmDetails *AzureSourceVmDetails `json:"azureSourceVmDetails,omitempty"`
  2591  	// ComputeEngineDisksTargetDefaults: Details of the target Persistent Disks in
  2592  	// Compute Engine.
  2593  	ComputeEngineDisksTargetDefaults *ComputeEngineDisksTargetDefaults `json:"computeEngineDisksTargetDefaults,omitempty"`
  2594  	// ComputeEngineTargetDefaults: Details of the target VM in Compute Engine.
  2595  	ComputeEngineTargetDefaults *ComputeEngineTargetDefaults `json:"computeEngineTargetDefaults,omitempty"`
  2596  	// CreateTime: Output only. The time the migrating VM was created (this refers
  2597  	// to this resource and not to the time it was installed in the source).
  2598  	CreateTime string `json:"createTime,omitempty"`
  2599  	// CurrentSyncInfo: Output only. Details of the current running replication
  2600  	// cycle.
  2601  	CurrentSyncInfo *ReplicationCycle `json:"currentSyncInfo,omitempty"`
  2602  	// CutoverForecast: Output only. Provides details of future CutoverJobs of a
  2603  	// MigratingVm. Set to empty when cutover forecast is unavailable.
  2604  	CutoverForecast *CutoverForecast `json:"cutoverForecast,omitempty"`
  2605  	// Description: The description attached to the migrating VM by the user.
  2606  	Description string `json:"description,omitempty"`
  2607  	// DisplayName: The display name attached to the MigratingVm by the user.
  2608  	DisplayName string `json:"displayName,omitempty"`
  2609  	// Error: Output only. Provides details on the state of the Migrating VM in
  2610  	// case of an error in replication.
  2611  	Error *Status `json:"error,omitempty"`
  2612  	// Group: Output only. The group this migrating vm is included in, if any. The
  2613  	// group is represented by the full path of the appropriate Group resource.
  2614  	Group string `json:"group,omitempty"`
  2615  	// Labels: The labels of the migrating VM.
  2616  	Labels map[string]string `json:"labels,omitempty"`
  2617  	// LastReplicationCycle: Output only. Details of the last replication cycle.
  2618  	// This will be updated whenever a replication cycle is finished and is not to
  2619  	// be confused with last_sync which is only updated on successful replication
  2620  	// cycles.
  2621  	LastReplicationCycle *ReplicationCycle `json:"lastReplicationCycle,omitempty"`
  2622  	// LastSync: Output only. The most updated snapshot created time in the source
  2623  	// that finished replication.
  2624  	LastSync *ReplicationSync `json:"lastSync,omitempty"`
  2625  	// Name: Output only. The identifier of the MigratingVm.
  2626  	Name string `json:"name,omitempty"`
  2627  	// Policy: The replication schedule policy.
  2628  	Policy *SchedulePolicy `json:"policy,omitempty"`
  2629  	// RecentCloneJobs: Output only. The recent clone jobs performed on the
  2630  	// migrating VM. This field holds the vm's last completed clone job and the
  2631  	// vm's running clone job, if one exists. Note: To have this field populated
  2632  	// you need to explicitly request it via the "view" parameter of the Get/List
  2633  	// request.
  2634  	RecentCloneJobs []*CloneJob `json:"recentCloneJobs,omitempty"`
  2635  	// RecentCutoverJobs: Output only. The recent cutover jobs performed on the
  2636  	// migrating VM. This field holds the vm's last completed cutover job and the
  2637  	// vm's running cutover job, if one exists. Note: To have this field populated
  2638  	// you need to explicitly request it via the "view" parameter of the Get/List
  2639  	// request.
  2640  	RecentCutoverJobs []*CutoverJob `json:"recentCutoverJobs,omitempty"`
  2641  	// SourceVmId: The unique ID of the VM in the source. The VM's name in vSphere
  2642  	// can be changed, so this is not the VM's name but rather its moRef id. This
  2643  	// id is of the form vm-.
  2644  	SourceVmId string `json:"sourceVmId,omitempty"`
  2645  	// State: Output only. State of the MigratingVm.
  2646  	//
  2647  	// Possible values:
  2648  	//   "STATE_UNSPECIFIED" - The state was not sampled by the health checks yet.
  2649  	//   "PENDING" - The VM in the source is being verified.
  2650  	//   "READY" - The source VM was verified, and it's ready to start replication.
  2651  	//   "FIRST_SYNC" - Migration is going through the first sync cycle.
  2652  	//   "ACTIVE" - The replication is active, and it's running or scheduled to
  2653  	// run.
  2654  	//   "CUTTING_OVER" - The source VM is being turned off, and a final
  2655  	// replication is currently running.
  2656  	//   "CUTOVER" - The source VM was stopped and replicated. The replication is
  2657  	// currently paused.
  2658  	//   "FINAL_SYNC" - A cutover job is active and replication cycle is running
  2659  	// the final sync.
  2660  	//   "PAUSED" - The replication was paused by the user and no cycles are
  2661  	// scheduled to run.
  2662  	//   "FINALIZING" - The migrating VM is being finalized and migration resources
  2663  	// are being removed.
  2664  	//   "FINALIZED" - The replication process is done. The migrating VM is
  2665  	// finalized and no longer consumes billable resources.
  2666  	//   "ERROR" - The replication process encountered an unrecoverable error and
  2667  	// was aborted.
  2668  	State string `json:"state,omitempty"`
  2669  	// StateTime: Output only. The last time the migrating VM state was updated.
  2670  	StateTime string `json:"stateTime,omitempty"`
  2671  	// UpdateTime: Output only. The last time the migrating VM resource was
  2672  	// updated.
  2673  	UpdateTime string `json:"updateTime,omitempty"`
  2674  	// VmwareSourceVmDetails: Output only. Details of the VM from a Vmware source.
  2675  	VmwareSourceVmDetails *VmwareSourceVmDetails `json:"vmwareSourceVmDetails,omitempty"`
  2676  
  2677  	// ServerResponse contains the HTTP response code and headers from the server.
  2678  	googleapi.ServerResponse `json:"-"`
  2679  	// ForceSendFields is a list of field names (e.g. "AwsSourceVmDetails") to
  2680  	// unconditionally include in API requests. By default, fields with empty or
  2681  	// default values are omitted from API requests. See
  2682  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2683  	// details.
  2684  	ForceSendFields []string `json:"-"`
  2685  	// NullFields is a list of field names (e.g. "AwsSourceVmDetails") to include
  2686  	// in API requests with the JSON null value. By default, fields with empty
  2687  	// values are omitted from API requests. See
  2688  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2689  	NullFields []string `json:"-"`
  2690  }
  2691  
  2692  func (s *MigratingVm) MarshalJSON() ([]byte, error) {
  2693  	type NoMethod MigratingVm
  2694  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2695  }
  2696  
  2697  // MigrationError: Represents migration resource error information that can be
  2698  // used with google.rpc.Status message. MigrationError is used to present the
  2699  // user with error information in migration operations.
  2700  type MigrationError struct {
  2701  	// ActionItem: Output only. Suggested action for solving the error.
  2702  	ActionItem *LocalizedMessage `json:"actionItem,omitempty"`
  2703  	// Code: Output only. The error code.
  2704  	//
  2705  	// Possible values:
  2706  	//   "ERROR_CODE_UNSPECIFIED" - Default value. This value is not used.
  2707  	//   "UNKNOWN_ERROR" - Migrate to Virtual Machines encountered an unknown
  2708  	// error.
  2709  	//   "SOURCE_VALIDATION_ERROR" - Migrate to Virtual Machines encountered an
  2710  	// error while validating replication source health.
  2711  	//   "SOURCE_REPLICATION_ERROR" - Migrate to Virtual Machines encountered an
  2712  	// error during source data operation.
  2713  	//   "TARGET_REPLICATION_ERROR" - Migrate to Virtual Machines encountered an
  2714  	// error during target data operation.
  2715  	//   "OS_ADAPTATION_ERROR" - Migrate to Virtual Machines encountered an error
  2716  	// during OS adaptation.
  2717  	//   "CLONE_ERROR" - Migrate to Virtual Machines encountered an error in clone
  2718  	// operation.
  2719  	//   "CUTOVER_ERROR" - Migrate to Virtual Machines encountered an error in
  2720  	// cutover operation.
  2721  	//   "UTILIZATION_REPORT_ERROR" - Migrate to Virtual Machines encountered an
  2722  	// error during utilization report creation.
  2723  	//   "APPLIANCE_UPGRADE_ERROR" - Migrate to Virtual Machines encountered an
  2724  	// error during appliance upgrade.
  2725  	//   "IMAGE_IMPORT_ERROR" - Migrate to Virtual Machines encountered an error in
  2726  	// image import operation.
  2727  	Code string `json:"code,omitempty"`
  2728  	// ErrorMessage: Output only. The localized error message.
  2729  	ErrorMessage *LocalizedMessage `json:"errorMessage,omitempty"`
  2730  	// ErrorTime: Output only. The time the error occurred.
  2731  	ErrorTime string `json:"errorTime,omitempty"`
  2732  	// HelpLinks: Output only. URL(s) pointing to additional information on
  2733  	// handling the current error.
  2734  	HelpLinks []*Link `json:"helpLinks,omitempty"`
  2735  	// ForceSendFields is a list of field names (e.g. "ActionItem") to
  2736  	// unconditionally include in API requests. By default, fields with empty or
  2737  	// default values are omitted from API requests. See
  2738  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2739  	// details.
  2740  	ForceSendFields []string `json:"-"`
  2741  	// NullFields is a list of field names (e.g. "ActionItem") to include in API
  2742  	// requests with the JSON null value. By default, fields with empty values are
  2743  	// omitted from API requests. See
  2744  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2745  	NullFields []string `json:"-"`
  2746  }
  2747  
  2748  func (s *MigrationError) MarshalJSON() ([]byte, error) {
  2749  	type NoMethod MigrationError
  2750  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2751  }
  2752  
  2753  // MigrationWarning: Represents migration resource warning information that can
  2754  // be used with google.rpc.Status message. MigrationWarning is used to present
  2755  // the user with warning information in migration operations.
  2756  type MigrationWarning struct {
  2757  	// ActionItem: Suggested action for solving the warning.
  2758  	ActionItem *LocalizedMessage `json:"actionItem,omitempty"`
  2759  	// Code: The warning code.
  2760  	//
  2761  	// Possible values:
  2762  	//   "WARNING_CODE_UNSPECIFIED" - Default value. This value is not used.
  2763  	//   "ADAPTATION_WARNING" - A warning originated from OS Adaptation.
  2764  	Code string `json:"code,omitempty"`
  2765  	// HelpLinks: URL(s) pointing to additional information on handling the current
  2766  	// warning.
  2767  	HelpLinks []*Link `json:"helpLinks,omitempty"`
  2768  	// WarningMessage: The localized warning message.
  2769  	WarningMessage *LocalizedMessage `json:"warningMessage,omitempty"`
  2770  	// WarningTime: The time the warning occurred.
  2771  	WarningTime string `json:"warningTime,omitempty"`
  2772  	// ForceSendFields is a list of field names (e.g. "ActionItem") to
  2773  	// unconditionally include in API requests. By default, fields with empty or
  2774  	// default values are omitted from API requests. See
  2775  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2776  	// details.
  2777  	ForceSendFields []string `json:"-"`
  2778  	// NullFields is a list of field names (e.g. "ActionItem") to include in API
  2779  	// requests with the JSON null value. By default, fields with empty values are
  2780  	// omitted from API requests. See
  2781  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2782  	NullFields []string `json:"-"`
  2783  }
  2784  
  2785  func (s *MigrationWarning) MarshalJSON() ([]byte, error) {
  2786  	type NoMethod MigrationWarning
  2787  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2788  }
  2789  
  2790  // NetworkInterface: NetworkInterface represents a NIC of a VM.
  2791  type NetworkInterface struct {
  2792  	// ExternalIp: The external IP to define in the NIC.
  2793  	ExternalIp string `json:"externalIp,omitempty"`
  2794  	// InternalIp: The internal IP to define in the NIC. The formats accepted are:
  2795  	// `ephemeral` \ ipv4 address \ a named address resource full path.
  2796  	InternalIp string `json:"internalIp,omitempty"`
  2797  	// Network: The network to connect the NIC to.
  2798  	Network string `json:"network,omitempty"`
  2799  	// Subnetwork: The subnetwork to connect the NIC to.
  2800  	Subnetwork string `json:"subnetwork,omitempty"`
  2801  	// ForceSendFields is a list of field names (e.g. "ExternalIp") to
  2802  	// unconditionally include in API requests. By default, fields with empty or
  2803  	// default values are omitted from API requests. See
  2804  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2805  	// details.
  2806  	ForceSendFields []string `json:"-"`
  2807  	// NullFields is a list of field names (e.g. "ExternalIp") to include in API
  2808  	// requests with the JSON null value. By default, fields with empty values are
  2809  	// omitted from API requests. See
  2810  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2811  	NullFields []string `json:"-"`
  2812  }
  2813  
  2814  func (s *NetworkInterface) MarshalJSON() ([]byte, error) {
  2815  	type NoMethod NetworkInterface
  2816  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2817  }
  2818  
  2819  // OSDescription: A message describing the VM's OS. Including OS, Publisher,
  2820  // Offer and Plan if applicable.
  2821  type OSDescription struct {
  2822  	// Offer: OS offer.
  2823  	Offer string `json:"offer,omitempty"`
  2824  	// Plan: OS plan.
  2825  	Plan string `json:"plan,omitempty"`
  2826  	// Publisher: OS publisher.
  2827  	Publisher string `json:"publisher,omitempty"`
  2828  	// Type: OS type.
  2829  	Type string `json:"type,omitempty"`
  2830  	// ForceSendFields is a list of field names (e.g. "Offer") to unconditionally
  2831  	// include in API requests. By default, fields with empty or default values are
  2832  	// omitted from API requests. See
  2833  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2834  	// details.
  2835  	ForceSendFields []string `json:"-"`
  2836  	// NullFields is a list of field names (e.g. "Offer") to include in API
  2837  	// requests with the JSON null value. By default, fields with empty values are
  2838  	// omitted from API requests. See
  2839  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2840  	NullFields []string `json:"-"`
  2841  }
  2842  
  2843  func (s *OSDescription) MarshalJSON() ([]byte, error) {
  2844  	type NoMethod OSDescription
  2845  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2846  }
  2847  
  2848  // OSDisk: A message describing the OS disk.
  2849  type OSDisk struct {
  2850  	// Name: The disk's full name.
  2851  	Name string `json:"name,omitempty"`
  2852  	// SizeGb: The disk's size in GB.
  2853  	SizeGb int64 `json:"sizeGb,omitempty"`
  2854  	// Type: The disk's type.
  2855  	Type string `json:"type,omitempty"`
  2856  	// ForceSendFields is a list of field names (e.g. "Name") to unconditionally
  2857  	// include in API requests. By default, fields with empty or default values are
  2858  	// omitted from API requests. See
  2859  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2860  	// details.
  2861  	ForceSendFields []string `json:"-"`
  2862  	// NullFields is a list of field names (e.g. "Name") to include in API requests
  2863  	// with the JSON null value. By default, fields with empty values are omitted
  2864  	// from API requests. See
  2865  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2866  	NullFields []string `json:"-"`
  2867  }
  2868  
  2869  func (s *OSDisk) MarshalJSON() ([]byte, error) {
  2870  	type NoMethod OSDisk
  2871  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2872  }
  2873  
  2874  // Operation: This resource represents a long-running operation that is the
  2875  // result of a network API call.
  2876  type Operation struct {
  2877  	// Done: If the value is `false`, it means the operation is still in progress.
  2878  	// If `true`, the operation is completed, and either `error` or `response` is
  2879  	// available.
  2880  	Done bool `json:"done,omitempty"`
  2881  	// Error: The error result of the operation in case of failure or cancellation.
  2882  	Error *Status `json:"error,omitempty"`
  2883  	// Metadata: Service-specific metadata associated with the operation. It
  2884  	// typically contains progress information and common metadata such as create
  2885  	// time. Some services might not provide such metadata. Any method that returns
  2886  	// a long-running operation should document the metadata type, if any.
  2887  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2888  	// Name: The server-assigned name, which is only unique within the same service
  2889  	// that originally returns it. If you use the default HTTP mapping, the `name`
  2890  	// should be a resource name ending with `operations/{unique_id}`.
  2891  	Name string `json:"name,omitempty"`
  2892  	// Response: The normal, successful response of the operation. If the original
  2893  	// method returns no data on success, such as `Delete`, the response is
  2894  	// `google.protobuf.Empty`. If the original method is standard
  2895  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  2896  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  2897  	// original method name. For example, if the original method name is
  2898  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  2899  	Response googleapi.RawMessage `json:"response,omitempty"`
  2900  
  2901  	// ServerResponse contains the HTTP response code and headers from the server.
  2902  	googleapi.ServerResponse `json:"-"`
  2903  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  2904  	// include in API requests. By default, fields with empty or default values are
  2905  	// omitted from API requests. See
  2906  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2907  	// details.
  2908  	ForceSendFields []string `json:"-"`
  2909  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  2910  	// with the JSON null value. By default, fields with empty values are omitted
  2911  	// from API requests. See
  2912  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2913  	NullFields []string `json:"-"`
  2914  }
  2915  
  2916  func (s *Operation) MarshalJSON() ([]byte, error) {
  2917  	type NoMethod Operation
  2918  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2919  }
  2920  
  2921  // OperationMetadata: Represents the metadata of the long-running operation.
  2922  type OperationMetadata struct {
  2923  	// ApiVersion: Output only. API version used to start the operation.
  2924  	ApiVersion string `json:"apiVersion,omitempty"`
  2925  	// CreateTime: Output only. The time the operation was created.
  2926  	CreateTime string `json:"createTime,omitempty"`
  2927  	// EndTime: Output only. The time the operation finished running.
  2928  	EndTime string `json:"endTime,omitempty"`
  2929  	// RequestedCancellation: Output only. Identifies whether the user has
  2930  	// requested cancellation of the operation. Operations that have successfully
  2931  	// been cancelled have Operation.error value with a google.rpc.Status.code of
  2932  	// 1, corresponding to `Code.CANCELLED`.
  2933  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  2934  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  2935  	StatusMessage string `json:"statusMessage,omitempty"`
  2936  	// Target: Output only. Server-defined resource path for the target of the
  2937  	// operation.
  2938  	Target string `json:"target,omitempty"`
  2939  	// Verb: Output only. Name of the verb executed by the operation.
  2940  	Verb string `json:"verb,omitempty"`
  2941  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  2942  	// unconditionally include in API requests. By default, fields with empty or
  2943  	// default values are omitted from API requests. See
  2944  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2945  	// details.
  2946  	ForceSendFields []string `json:"-"`
  2947  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  2948  	// requests with the JSON null value. By default, fields with empty values are
  2949  	// omitted from API requests. See
  2950  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2951  	NullFields []string `json:"-"`
  2952  }
  2953  
  2954  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  2955  	type NoMethod OperationMetadata
  2956  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2957  }
  2958  
  2959  // PauseMigrationRequest: Request message for 'PauseMigration' request.
  2960  type PauseMigrationRequest struct {
  2961  }
  2962  
  2963  // PersistentDisk: Details of a created Persistent Disk.
  2964  type PersistentDisk struct {
  2965  	// DiskUri: The URI of the Persistent Disk.
  2966  	DiskUri string `json:"diskUri,omitempty"`
  2967  	// SourceDiskNumber: The ordinal number of the source VM disk.
  2968  	SourceDiskNumber int64 `json:"sourceDiskNumber,omitempty"`
  2969  	// ForceSendFields is a list of field names (e.g. "DiskUri") to unconditionally
  2970  	// include in API requests. By default, fields with empty or default values are
  2971  	// omitted from API requests. See
  2972  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2973  	// details.
  2974  	ForceSendFields []string `json:"-"`
  2975  	// NullFields is a list of field names (e.g. "DiskUri") to include in API
  2976  	// requests with the JSON null value. By default, fields with empty values are
  2977  	// omitted from API requests. See
  2978  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2979  	NullFields []string `json:"-"`
  2980  }
  2981  
  2982  func (s *PersistentDisk) MarshalJSON() ([]byte, error) {
  2983  	type NoMethod PersistentDisk
  2984  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2985  }
  2986  
  2987  // PersistentDiskDefaults: Details for creation of a Persistent Disk.
  2988  type PersistentDiskDefaults struct {
  2989  	// AdditionalLabels: A map of labels to associate with the Persistent Disk.
  2990  	AdditionalLabels map[string]string `json:"additionalLabels,omitempty"`
  2991  	// DiskName: Optional. The name of the Persistent Disk to create.
  2992  	DiskName string `json:"diskName,omitempty"`
  2993  	// DiskType: The disk type to use.
  2994  	//
  2995  	// Possible values:
  2996  	//   "COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED" - An unspecified disk type. Will be
  2997  	// used as STANDARD.
  2998  	//   "COMPUTE_ENGINE_DISK_TYPE_STANDARD" - A Standard disk type.
  2999  	//   "COMPUTE_ENGINE_DISK_TYPE_SSD" - SSD hard disk type.
  3000  	//   "COMPUTE_ENGINE_DISK_TYPE_BALANCED" - An alternative to SSD persistent
  3001  	// disks that balance performance and cost.
  3002  	DiskType string `json:"diskType,omitempty"`
  3003  	// Encryption: Optional. The encryption to apply to the disk.
  3004  	Encryption *Encryption `json:"encryption,omitempty"`
  3005  	// SourceDiskNumber: Required. The ordinal number of the source VM disk.
  3006  	SourceDiskNumber int64 `json:"sourceDiskNumber,omitempty"`
  3007  	// VmAttachmentDetails: Optional. Details for attachment of the disk to a VM.
  3008  	// Used when the disk is set to be attacked to a target VM.
  3009  	VmAttachmentDetails *VmAttachmentDetails `json:"vmAttachmentDetails,omitempty"`
  3010  	// ForceSendFields is a list of field names (e.g. "AdditionalLabels") to
  3011  	// unconditionally include in API requests. By default, fields with empty or
  3012  	// default values are omitted from API requests. See
  3013  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3014  	// details.
  3015  	ForceSendFields []string `json:"-"`
  3016  	// NullFields is a list of field names (e.g. "AdditionalLabels") to include in
  3017  	// API requests with the JSON null value. By default, fields with empty values
  3018  	// are omitted from API requests. See
  3019  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3020  	NullFields []string `json:"-"`
  3021  }
  3022  
  3023  func (s *PersistentDiskDefaults) MarshalJSON() ([]byte, error) {
  3024  	type NoMethod PersistentDiskDefaults
  3025  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3026  }
  3027  
  3028  // PostProcessingStep: PostProcessingStep contains specific step details.
  3029  type PostProcessingStep struct {
  3030  }
  3031  
  3032  // PreparingVMDisksStep: PreparingVMDisksStep contains specific step details.
  3033  type PreparingVMDisksStep struct {
  3034  }
  3035  
  3036  // RemoveGroupMigrationRequest: Request message for 'RemoveMigration' request.
  3037  type RemoveGroupMigrationRequest struct {
  3038  	// MigratingVm: The MigratingVm to remove.
  3039  	MigratingVm string `json:"migratingVm,omitempty"`
  3040  	// ForceSendFields is a list of field names (e.g. "MigratingVm") to
  3041  	// unconditionally include in API requests. By default, fields with empty or
  3042  	// default values are omitted from API requests. See
  3043  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3044  	// details.
  3045  	ForceSendFields []string `json:"-"`
  3046  	// NullFields is a list of field names (e.g. "MigratingVm") to include in API
  3047  	// requests with the JSON null value. By default, fields with empty values are
  3048  	// omitted from API requests. See
  3049  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3050  	NullFields []string `json:"-"`
  3051  }
  3052  
  3053  func (s *RemoveGroupMigrationRequest) MarshalJSON() ([]byte, error) {
  3054  	type NoMethod RemoveGroupMigrationRequest
  3055  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3056  }
  3057  
  3058  // ReplicatingStep: ReplicatingStep contains specific step details.
  3059  type ReplicatingStep struct {
  3060  	// LastThirtyMinutesAverageBytesPerSecond: The source disks replication rate
  3061  	// for the last 30 minutes in bytes per second.
  3062  	LastThirtyMinutesAverageBytesPerSecond int64 `json:"lastThirtyMinutesAverageBytesPerSecond,omitempty,string"`
  3063  	// LastTwoMinutesAverageBytesPerSecond: The source disks replication rate for
  3064  	// the last 2 minutes in bytes per second.
  3065  	LastTwoMinutesAverageBytesPerSecond int64 `json:"lastTwoMinutesAverageBytesPerSecond,omitempty,string"`
  3066  	// ReplicatedBytes: Replicated bytes in the step.
  3067  	ReplicatedBytes int64 `json:"replicatedBytes,omitempty,string"`
  3068  	// TotalBytes: Total bytes to be handled in the step.
  3069  	TotalBytes int64 `json:"totalBytes,omitempty,string"`
  3070  	// ForceSendFields is a list of field names (e.g.
  3071  	// "LastThirtyMinutesAverageBytesPerSecond") to unconditionally include in API
  3072  	// requests. By default, fields with empty or default values are omitted from
  3073  	// API requests. See
  3074  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3075  	// details.
  3076  	ForceSendFields []string `json:"-"`
  3077  	// NullFields is a list of field names (e.g.
  3078  	// "LastThirtyMinutesAverageBytesPerSecond") to include in API requests with
  3079  	// the JSON null value. By default, fields with empty values are omitted from
  3080  	// API requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields
  3081  	// for more details.
  3082  	NullFields []string `json:"-"`
  3083  }
  3084  
  3085  func (s *ReplicatingStep) MarshalJSON() ([]byte, error) {
  3086  	type NoMethod ReplicatingStep
  3087  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3088  }
  3089  
  3090  // ReplicationCycle: ReplicationCycle contains information about the current
  3091  // replication cycle status.
  3092  type ReplicationCycle struct {
  3093  	// CycleNumber: The cycle's ordinal number.
  3094  	CycleNumber int64 `json:"cycleNumber,omitempty"`
  3095  	// EndTime: The time the replication cycle has ended.
  3096  	EndTime string `json:"endTime,omitempty"`
  3097  	// Error: Provides details on the state of the cycle in case of an error.
  3098  	Error *Status `json:"error,omitempty"`
  3099  	// Name: The identifier of the ReplicationCycle.
  3100  	Name string `json:"name,omitempty"`
  3101  	// ProgressPercent: The current progress in percentage of this cycle. Was
  3102  	// replaced by 'steps' field, which breaks down the cycle progression more
  3103  	// accurately.
  3104  	ProgressPercent int64 `json:"progressPercent,omitempty"`
  3105  	// StartTime: The time the replication cycle has started.
  3106  	StartTime string `json:"startTime,omitempty"`
  3107  	// State: State of the ReplicationCycle.
  3108  	//
  3109  	// Possible values:
  3110  	//   "STATE_UNSPECIFIED" - The state is unknown. This is used for API
  3111  	// compatibility only and is not used by the system.
  3112  	//   "RUNNING" - The replication cycle is running.
  3113  	//   "PAUSED" - The replication cycle is paused.
  3114  	//   "FAILED" - The replication cycle finished with errors.
  3115  	//   "SUCCEEDED" - The replication cycle finished successfully.
  3116  	State string `json:"state,omitempty"`
  3117  	// Steps: The cycle's steps list representing its progress.
  3118  	Steps []*CycleStep `json:"steps,omitempty"`
  3119  	// TotalPauseDuration: The accumulated duration the replication cycle was
  3120  	// paused.
  3121  	TotalPauseDuration string `json:"totalPauseDuration,omitempty"`
  3122  	// Warnings: Output only. Warnings that occurred during the cycle.
  3123  	Warnings []*MigrationWarning `json:"warnings,omitempty"`
  3124  
  3125  	// ServerResponse contains the HTTP response code and headers from the server.
  3126  	googleapi.ServerResponse `json:"-"`
  3127  	// ForceSendFields is a list of field names (e.g. "CycleNumber") to
  3128  	// unconditionally include in API requests. By default, fields with empty or
  3129  	// default values are omitted from API requests. See
  3130  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3131  	// details.
  3132  	ForceSendFields []string `json:"-"`
  3133  	// NullFields is a list of field names (e.g. "CycleNumber") to include in API
  3134  	// requests with the JSON null value. By default, fields with empty values are
  3135  	// omitted from API requests. See
  3136  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3137  	NullFields []string `json:"-"`
  3138  }
  3139  
  3140  func (s *ReplicationCycle) MarshalJSON() ([]byte, error) {
  3141  	type NoMethod ReplicationCycle
  3142  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3143  }
  3144  
  3145  // ReplicationSync: ReplicationSync contain information about the last replica
  3146  // sync to the cloud.
  3147  type ReplicationSync struct {
  3148  	// LastSyncTime: The most updated snapshot created time in the source that
  3149  	// finished replication.
  3150  	LastSyncTime string `json:"lastSyncTime,omitempty"`
  3151  	// ForceSendFields is a list of field names (e.g. "LastSyncTime") to
  3152  	// unconditionally include in API requests. By default, fields with empty or
  3153  	// default values are omitted from API requests. See
  3154  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3155  	// details.
  3156  	ForceSendFields []string `json:"-"`
  3157  	// NullFields is a list of field names (e.g. "LastSyncTime") to include in API
  3158  	// requests with the JSON null value. By default, fields with empty values are
  3159  	// omitted from API requests. See
  3160  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3161  	NullFields []string `json:"-"`
  3162  }
  3163  
  3164  func (s *ReplicationSync) MarshalJSON() ([]byte, error) {
  3165  	type NoMethod ReplicationSync
  3166  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3167  }
  3168  
  3169  // ResumeMigrationRequest: Request message for 'ResumeMigration' request.
  3170  type ResumeMigrationRequest struct {
  3171  }
  3172  
  3173  // SchedulePolicy: A policy for scheduling replications.
  3174  type SchedulePolicy struct {
  3175  	// IdleDuration: The idle duration between replication stages.
  3176  	IdleDuration string `json:"idleDuration,omitempty"`
  3177  	// SkipOsAdaptation: A flag to indicate whether to skip OS adaptation during
  3178  	// the replication sync. OS adaptation is a process where the VM's operating
  3179  	// system undergoes changes and adaptations to fully function on Compute
  3180  	// Engine.
  3181  	SkipOsAdaptation bool `json:"skipOsAdaptation,omitempty"`
  3182  	// ForceSendFields is a list of field names (e.g. "IdleDuration") to
  3183  	// unconditionally include in API requests. By default, fields with empty or
  3184  	// default values are omitted from API requests. See
  3185  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3186  	// details.
  3187  	ForceSendFields []string `json:"-"`
  3188  	// NullFields is a list of field names (e.g. "IdleDuration") to include in API
  3189  	// requests with the JSON null value. By default, fields with empty values are
  3190  	// omitted from API requests. See
  3191  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3192  	NullFields []string `json:"-"`
  3193  }
  3194  
  3195  func (s *SchedulePolicy) MarshalJSON() ([]byte, error) {
  3196  	type NoMethod SchedulePolicy
  3197  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3198  }
  3199  
  3200  // SchedulingNodeAffinity: Node Affinity: the configuration of desired nodes
  3201  // onto which this Instance could be scheduled. Based on
  3202  // https://cloud.google.com/compute/docs/reference/rest/v1/instances/setScheduling
  3203  type SchedulingNodeAffinity struct {
  3204  	// Key: The label key of Node resource to reference.
  3205  	Key string `json:"key,omitempty"`
  3206  	// Operator: The operator to use for the node resources specified in the
  3207  	// `values` parameter.
  3208  	//
  3209  	// Possible values:
  3210  	//   "OPERATOR_UNSPECIFIED" - An unknown, unexpected behavior.
  3211  	//   "IN" - The node resource group should be in these resources affinity.
  3212  	//   "NOT_IN" - The node resource group should not be in these resources
  3213  	// affinity.
  3214  	Operator string `json:"operator,omitempty"`
  3215  	// Values: Corresponds to the label values of Node resource.
  3216  	Values []string `json:"values,omitempty"`
  3217  	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
  3218  	// include in API requests. By default, fields with empty or default values are
  3219  	// omitted from API requests. See
  3220  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3221  	// details.
  3222  	ForceSendFields []string `json:"-"`
  3223  	// NullFields is a list of field names (e.g. "Key") to include in API requests
  3224  	// with the JSON null value. By default, fields with empty values are omitted
  3225  	// from API requests. See
  3226  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3227  	NullFields []string `json:"-"`
  3228  }
  3229  
  3230  func (s *SchedulingNodeAffinity) MarshalJSON() ([]byte, error) {
  3231  	type NoMethod SchedulingNodeAffinity
  3232  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3233  }
  3234  
  3235  // ShuttingDownSourceVMStep: ShuttingDownSourceVMStep contains specific step
  3236  // details.
  3237  type ShuttingDownSourceVMStep struct {
  3238  }
  3239  
  3240  // Source: Source message describes a specific vm migration Source resource. It
  3241  // contains the source environment information.
  3242  type Source struct {
  3243  	// Aws: AWS type source details.
  3244  	Aws *AwsSourceDetails `json:"aws,omitempty"`
  3245  	// Azure: Azure type source details.
  3246  	Azure *AzureSourceDetails `json:"azure,omitempty"`
  3247  	// CreateTime: Output only. The create time timestamp.
  3248  	CreateTime string `json:"createTime,omitempty"`
  3249  	// Description: User-provided description of the source.
  3250  	Description string `json:"description,omitempty"`
  3251  	// Encryption: Optional. Immutable. The encryption details of the source data
  3252  	// stored by the service.
  3253  	Encryption *Encryption `json:"encryption,omitempty"`
  3254  	// Labels: The labels of the source.
  3255  	Labels map[string]string `json:"labels,omitempty"`
  3256  	// Name: Output only. The Source name.
  3257  	Name string `json:"name,omitempty"`
  3258  	// UpdateTime: Output only. The update time timestamp.
  3259  	UpdateTime string `json:"updateTime,omitempty"`
  3260  	// Vmware: Vmware type source details.
  3261  	Vmware *VmwareSourceDetails `json:"vmware,omitempty"`
  3262  
  3263  	// ServerResponse contains the HTTP response code and headers from the server.
  3264  	googleapi.ServerResponse `json:"-"`
  3265  	// ForceSendFields is a list of field names (e.g. "Aws") to unconditionally
  3266  	// include in API requests. By default, fields with empty or default values are
  3267  	// omitted from API requests. See
  3268  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3269  	// details.
  3270  	ForceSendFields []string `json:"-"`
  3271  	// NullFields is a list of field names (e.g. "Aws") to include in API requests
  3272  	// with the JSON null value. By default, fields with empty values are omitted
  3273  	// from API requests. See
  3274  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3275  	NullFields []string `json:"-"`
  3276  }
  3277  
  3278  func (s *Source) MarshalJSON() ([]byte, error) {
  3279  	type NoMethod Source
  3280  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3281  }
  3282  
  3283  // StartMigrationRequest: Request message for 'StartMigrationRequest' request.
  3284  type StartMigrationRequest struct {
  3285  }
  3286  
  3287  // Status: The `Status` type defines a logical error model that is suitable for
  3288  // different programming environments, including REST APIs and RPC APIs. It is
  3289  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  3290  // pieces of data: error code, error message, and error details. You can find
  3291  // out more about this error model and how to work with it in the API Design
  3292  // Guide (https://cloud.google.com/apis/design/errors).
  3293  type Status struct {
  3294  	// Code: The status code, which should be an enum value of google.rpc.Code.
  3295  	Code int64 `json:"code,omitempty"`
  3296  	// Details: A list of messages that carry the error details. There is a common
  3297  	// set of message types for APIs to use.
  3298  	Details []googleapi.RawMessage `json:"details,omitempty"`
  3299  	// Message: A developer-facing error message, which should be in English. Any
  3300  	// user-facing error message should be localized and sent in the
  3301  	// google.rpc.Status.details field, or localized by the client.
  3302  	Message string `json:"message,omitempty"`
  3303  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  3304  	// include in API requests. By default, fields with empty or default values are
  3305  	// omitted from API requests. See
  3306  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3307  	// details.
  3308  	ForceSendFields []string `json:"-"`
  3309  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  3310  	// with the JSON null value. By default, fields with empty values are omitted
  3311  	// from API requests. See
  3312  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3313  	NullFields []string `json:"-"`
  3314  }
  3315  
  3316  func (s *Status) MarshalJSON() ([]byte, error) {
  3317  	type NoMethod Status
  3318  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3319  }
  3320  
  3321  // Tag: Tag is an AWS tag representation.
  3322  type Tag struct {
  3323  	// Key: Key of tag.
  3324  	Key string `json:"key,omitempty"`
  3325  	// Value: Value of tag.
  3326  	Value string `json:"value,omitempty"`
  3327  	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
  3328  	// include in API requests. By default, fields with empty or default values are
  3329  	// omitted from API requests. See
  3330  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3331  	// details.
  3332  	ForceSendFields []string `json:"-"`
  3333  	// NullFields is a list of field names (e.g. "Key") to include in API requests
  3334  	// with the JSON null value. By default, fields with empty values are omitted
  3335  	// from API requests. See
  3336  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3337  	NullFields []string `json:"-"`
  3338  }
  3339  
  3340  func (s *Tag) MarshalJSON() ([]byte, error) {
  3341  	type NoMethod Tag
  3342  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3343  }
  3344  
  3345  // TargetProject: TargetProject message represents a target Compute Engine
  3346  // project for a migration or a clone.
  3347  type TargetProject struct {
  3348  	// CreateTime: Output only. The time this target project resource was created
  3349  	// (not related to when the Compute Engine project it points to was created).
  3350  	CreateTime string `json:"createTime,omitempty"`
  3351  	// Description: The target project's description.
  3352  	Description string `json:"description,omitempty"`
  3353  	// Name: Output only. The name of the target project.
  3354  	Name string `json:"name,omitempty"`
  3355  	// Project: Required. The target project ID (number) or project name.
  3356  	Project string `json:"project,omitempty"`
  3357  	// UpdateTime: Output only. The last time the target project resource was
  3358  	// updated.
  3359  	UpdateTime string `json:"updateTime,omitempty"`
  3360  
  3361  	// ServerResponse contains the HTTP response code and headers from the server.
  3362  	googleapi.ServerResponse `json:"-"`
  3363  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  3364  	// unconditionally include in API requests. By default, fields with empty or
  3365  	// default values are omitted from API requests. See
  3366  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3367  	// details.
  3368  	ForceSendFields []string `json:"-"`
  3369  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  3370  	// requests with the JSON null value. By default, fields with empty values are
  3371  	// omitted from API requests. See
  3372  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3373  	NullFields []string `json:"-"`
  3374  }
  3375  
  3376  func (s *TargetProject) MarshalJSON() ([]byte, error) {
  3377  	type NoMethod TargetProject
  3378  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3379  }
  3380  
  3381  // UpgradeApplianceRequest: Request message for 'UpgradeAppliance' request.
  3382  type UpgradeApplianceRequest struct {
  3383  	// RequestId: A request ID to identify requests. Specify a unique request ID so
  3384  	// that if you must retry your request, the server will know to ignore the
  3385  	// request if it has already been completed. The server will guarantee that for
  3386  	// at least 60 minutes after the first request. For example, consider a
  3387  	// situation where you make an initial request and the request times out. If
  3388  	// you make the request again with the same request ID, the server can check if
  3389  	// original operation with the same request ID was received, and if so, will
  3390  	// ignore the second request. This prevents clients from accidentally creating
  3391  	// duplicate commitments. The request ID must be a valid UUID with the
  3392  	// exception that zero UUID is not supported
  3393  	// (00000000-0000-0000-0000-000000000000).
  3394  	RequestId string `json:"requestId,omitempty"`
  3395  	// ForceSendFields is a list of field names (e.g. "RequestId") to
  3396  	// unconditionally include in API requests. By default, fields with empty or
  3397  	// default values are omitted from API requests. See
  3398  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3399  	// details.
  3400  	ForceSendFields []string `json:"-"`
  3401  	// NullFields is a list of field names (e.g. "RequestId") to include in API
  3402  	// requests with the JSON null value. By default, fields with empty values are
  3403  	// omitted from API requests. See
  3404  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3405  	NullFields []string `json:"-"`
  3406  }
  3407  
  3408  func (s *UpgradeApplianceRequest) MarshalJSON() ([]byte, error) {
  3409  	type NoMethod UpgradeApplianceRequest
  3410  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3411  }
  3412  
  3413  // UpgradeStatus: UpgradeStatus contains information about upgradeAppliance
  3414  // operation.
  3415  type UpgradeStatus struct {
  3416  	// Error: Provides details on the state of the upgrade operation in case of an
  3417  	// error.
  3418  	Error *Status `json:"error,omitempty"`
  3419  	// PreviousVersion: The version from which we upgraded.
  3420  	PreviousVersion string `json:"previousVersion,omitempty"`
  3421  	// StartTime: The time the operation was started.
  3422  	StartTime string `json:"startTime,omitempty"`
  3423  	// State: The state of the upgradeAppliance operation.
  3424  	//
  3425  	// Possible values:
  3426  	//   "STATE_UNSPECIFIED" - The state was not sampled by the health checks yet.
  3427  	//   "RUNNING" - The upgrade has started.
  3428  	//   "FAILED" - The upgrade failed.
  3429  	//   "SUCCEEDED" - The upgrade finished successfully.
  3430  	State string `json:"state,omitempty"`
  3431  	// Version: The version to upgrade to.
  3432  	Version string `json:"version,omitempty"`
  3433  	// ForceSendFields is a list of field names (e.g. "Error") to unconditionally
  3434  	// include in API requests. By default, fields with empty or default values are
  3435  	// omitted from API requests. See
  3436  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3437  	// details.
  3438  	ForceSendFields []string `json:"-"`
  3439  	// NullFields is a list of field names (e.g. "Error") to include in API
  3440  	// requests with the JSON null value. By default, fields with empty values are
  3441  	// omitted from API requests. See
  3442  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3443  	NullFields []string `json:"-"`
  3444  }
  3445  
  3446  func (s *UpgradeStatus) MarshalJSON() ([]byte, error) {
  3447  	type NoMethod UpgradeStatus
  3448  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3449  }
  3450  
  3451  // UtilizationReport: Utilization report details the utilization (CPU, memory,
  3452  // etc.) of selected source VMs.
  3453  type UtilizationReport struct {
  3454  	// CreateTime: Output only. The time the report was created (this refers to the
  3455  	// time of the request, not the time the report creation completed).
  3456  	CreateTime string `json:"createTime,omitempty"`
  3457  	// DisplayName: The report display name, as assigned by the user.
  3458  	DisplayName string `json:"displayName,omitempty"`
  3459  	// Error: Output only. Provides details on the state of the report in case of
  3460  	// an error.
  3461  	Error *Status `json:"error,omitempty"`
  3462  	// FrameEndTime: Output only. The point in time when the time frame ends.
  3463  	// Notice that the time frame is counted backwards. For instance if the
  3464  	// "frame_end_time" value is 2021/01/20 and the time frame is WEEK then the
  3465  	// report covers the week between 2021/01/20 and 2021/01/14.
  3466  	FrameEndTime string `json:"frameEndTime,omitempty"`
  3467  	// Name: Output only. The report unique name.
  3468  	Name string `json:"name,omitempty"`
  3469  	// State: Output only. Current state of the report.
  3470  	//
  3471  	// Possible values:
  3472  	//   "STATE_UNSPECIFIED" - The state is unknown. This value is not in use.
  3473  	//   "CREATING" - The report is in the making.
  3474  	//   "SUCCEEDED" - Report creation completed successfully.
  3475  	//   "FAILED" - Report creation failed.
  3476  	State string `json:"state,omitempty"`
  3477  	// StateTime: Output only. The time the state was last set.
  3478  	StateTime string `json:"stateTime,omitempty"`
  3479  	// TimeFrame: Time frame of the report.
  3480  	//
  3481  	// Possible values:
  3482  	//   "TIME_FRAME_UNSPECIFIED" - The time frame was not specified and will
  3483  	// default to WEEK.
  3484  	//   "WEEK" - One week.
  3485  	//   "MONTH" - One month.
  3486  	//   "YEAR" - One year.
  3487  	TimeFrame string `json:"timeFrame,omitempty"`
  3488  	// VmCount: Output only. Total number of VMs included in the report.
  3489  	VmCount int64 `json:"vmCount,omitempty"`
  3490  	// Vms: List of utilization information per VM. When sent as part of the
  3491  	// request, the "vm_id" field is used in order to specify which VMs to include
  3492  	// in the report. In that case all other fields are ignored.
  3493  	Vms []*VmUtilizationInfo `json:"vms,omitempty"`
  3494  
  3495  	// ServerResponse contains the HTTP response code and headers from the server.
  3496  	googleapi.ServerResponse `json:"-"`
  3497  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  3498  	// unconditionally include in API requests. By default, fields with empty or
  3499  	// default values are omitted from API requests. See
  3500  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3501  	// details.
  3502  	ForceSendFields []string `json:"-"`
  3503  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  3504  	// requests with the JSON null value. By default, fields with empty values are
  3505  	// omitted from API requests. See
  3506  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3507  	NullFields []string `json:"-"`
  3508  }
  3509  
  3510  func (s *UtilizationReport) MarshalJSON() ([]byte, error) {
  3511  	type NoMethod UtilizationReport
  3512  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3513  }
  3514  
  3515  // VmAttachmentDetails: Details for attachment of the disk to a VM.
  3516  type VmAttachmentDetails struct {
  3517  	// DeviceName: Optional. Specifies a unique device name of your choice that is
  3518  	// reflected into the /dev/disk/by-id/google-* tree of a Linux operating system
  3519  	// running within the instance. If not specified, the server chooses a default
  3520  	// device name to apply to this disk, in the form persistent-disk-x, where x is
  3521  	// a number assigned by Google Compute Engine. This field is only applicable
  3522  	// for persistent disks.
  3523  	DeviceName string `json:"deviceName,omitempty"`
  3524  	// ForceSendFields is a list of field names (e.g. "DeviceName") to
  3525  	// unconditionally include in API requests. By default, fields with empty or
  3526  	// default values are omitted from API requests. See
  3527  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3528  	// details.
  3529  	ForceSendFields []string `json:"-"`
  3530  	// NullFields is a list of field names (e.g. "DeviceName") to include in API
  3531  	// requests with the JSON null value. By default, fields with empty values are
  3532  	// omitted from API requests. See
  3533  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3534  	NullFields []string `json:"-"`
  3535  }
  3536  
  3537  func (s *VmAttachmentDetails) MarshalJSON() ([]byte, error) {
  3538  	type NoMethod VmAttachmentDetails
  3539  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3540  }
  3541  
  3542  // VmCapabilities: Migrating VM source information about the VM capabilities
  3543  // needed for some Compute Engine features.
  3544  type VmCapabilities struct {
  3545  	// LastOsCapabilitiesUpdateTime: Output only. The last time OS capabilities
  3546  	// list was updated.
  3547  	LastOsCapabilitiesUpdateTime string `json:"lastOsCapabilitiesUpdateTime,omitempty"`
  3548  	// OsCapabilities: Output only. Unordered list. List of certain VM OS
  3549  	// capabilities needed for some Compute Engine features.
  3550  	//
  3551  	// Possible values:
  3552  	//   "OS_CAPABILITY_UNSPECIFIED" - This is for API compatibility only and is
  3553  	// not in use.
  3554  	//   "OS_CAPABILITY_NVME_STORAGE_ACCESS" - NVMe driver installed and the VM can
  3555  	// use NVMe PD or local SSD.
  3556  	//   "OS_CAPABILITY_GVNIC_NETWORK_INTERFACE" - gVNIC virtual NIC driver
  3557  	// supported.
  3558  	OsCapabilities []string `json:"osCapabilities,omitempty"`
  3559  	// ForceSendFields is a list of field names (e.g.
  3560  	// "LastOsCapabilitiesUpdateTime") to unconditionally include in API requests.
  3561  	// By default, fields with empty or default values are omitted from API
  3562  	// requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields
  3563  	// for more details.
  3564  	ForceSendFields []string `json:"-"`
  3565  	// NullFields is a list of field names (e.g. "LastOsCapabilitiesUpdateTime") to
  3566  	// include in API requests with the JSON null value. By default, fields with
  3567  	// empty values are omitted from API requests. See
  3568  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3569  	NullFields []string `json:"-"`
  3570  }
  3571  
  3572  func (s *VmCapabilities) MarshalJSON() ([]byte, error) {
  3573  	type NoMethod VmCapabilities
  3574  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3575  }
  3576  
  3577  // VmUtilizationInfo: Utilization information of a single VM.
  3578  type VmUtilizationInfo struct {
  3579  	// Utilization: Utilization metrics for this VM.
  3580  	Utilization *VmUtilizationMetrics `json:"utilization,omitempty"`
  3581  	// VmId: The VM's ID in the source.
  3582  	VmId string `json:"vmId,omitempty"`
  3583  	// VmwareVmDetails: The description of the VM in a Source of type Vmware.
  3584  	VmwareVmDetails *VmwareVmDetails `json:"vmwareVmDetails,omitempty"`
  3585  	// ForceSendFields is a list of field names (e.g. "Utilization") to
  3586  	// unconditionally include in API requests. By default, fields with empty or
  3587  	// default values are omitted from API requests. See
  3588  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3589  	// details.
  3590  	ForceSendFields []string `json:"-"`
  3591  	// NullFields is a list of field names (e.g. "Utilization") to include in API
  3592  	// requests with the JSON null value. By default, fields with empty values are
  3593  	// omitted from API requests. See
  3594  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3595  	NullFields []string `json:"-"`
  3596  }
  3597  
  3598  func (s *VmUtilizationInfo) MarshalJSON() ([]byte, error) {
  3599  	type NoMethod VmUtilizationInfo
  3600  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3601  }
  3602  
  3603  // VmUtilizationMetrics: Utilization metrics values for a single VM.
  3604  type VmUtilizationMetrics struct {
  3605  	// CpuAveragePercent: Average CPU usage, percent.
  3606  	CpuAveragePercent int64 `json:"cpuAveragePercent,omitempty"`
  3607  	// CpuMaxPercent: Max CPU usage, percent.
  3608  	CpuMaxPercent int64 `json:"cpuMaxPercent,omitempty"`
  3609  	// DiskIoRateAverageKbps: Average disk IO rate, in kilobytes per second.
  3610  	DiskIoRateAverageKbps int64 `json:"diskIoRateAverageKbps,omitempty,string"`
  3611  	// DiskIoRateMaxKbps: Max disk IO rate, in kilobytes per second.
  3612  	DiskIoRateMaxKbps int64 `json:"diskIoRateMaxKbps,omitempty,string"`
  3613  	// MemoryAveragePercent: Average memory usage, percent.
  3614  	MemoryAveragePercent int64 `json:"memoryAveragePercent,omitempty"`
  3615  	// MemoryMaxPercent: Max memory usage, percent.
  3616  	MemoryMaxPercent int64 `json:"memoryMaxPercent,omitempty"`
  3617  	// NetworkThroughputAverageKbps: Average network throughput (combined
  3618  	// transmit-rates and receive-rates), in kilobytes per second.
  3619  	NetworkThroughputAverageKbps int64 `json:"networkThroughputAverageKbps,omitempty,string"`
  3620  	// NetworkThroughputMaxKbps: Max network throughput (combined transmit-rates
  3621  	// and receive-rates), in kilobytes per second.
  3622  	NetworkThroughputMaxKbps int64 `json:"networkThroughputMaxKbps,omitempty,string"`
  3623  	// ForceSendFields is a list of field names (e.g. "CpuAveragePercent") to
  3624  	// unconditionally include in API requests. By default, fields with empty or
  3625  	// default values are omitted from API requests. See
  3626  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3627  	// details.
  3628  	ForceSendFields []string `json:"-"`
  3629  	// NullFields is a list of field names (e.g. "CpuAveragePercent") to include in
  3630  	// API requests with the JSON null value. By default, fields with empty values
  3631  	// are omitted from API requests. See
  3632  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3633  	NullFields []string `json:"-"`
  3634  }
  3635  
  3636  func (s *VmUtilizationMetrics) MarshalJSON() ([]byte, error) {
  3637  	type NoMethod VmUtilizationMetrics
  3638  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3639  }
  3640  
  3641  // VmwareDiskDetails: The details of a Vmware VM disk.
  3642  type VmwareDiskDetails struct {
  3643  	// DiskNumber: The ordinal number of the disk.
  3644  	DiskNumber int64 `json:"diskNumber,omitempty"`
  3645  	// Label: The disk label.
  3646  	Label string `json:"label,omitempty"`
  3647  	// SizeGb: Size in GB.
  3648  	SizeGb int64 `json:"sizeGb,omitempty,string"`
  3649  	// ForceSendFields is a list of field names (e.g. "DiskNumber") to
  3650  	// unconditionally include in API requests. By default, fields with empty or
  3651  	// default values are omitted from API requests. See
  3652  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3653  	// details.
  3654  	ForceSendFields []string `json:"-"`
  3655  	// NullFields is a list of field names (e.g. "DiskNumber") to include in API
  3656  	// requests with the JSON null value. By default, fields with empty values are
  3657  	// omitted from API requests. See
  3658  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3659  	NullFields []string `json:"-"`
  3660  }
  3661  
  3662  func (s *VmwareDiskDetails) MarshalJSON() ([]byte, error) {
  3663  	type NoMethod VmwareDiskDetails
  3664  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3665  }
  3666  
  3667  // VmwareSourceDetails: VmwareSourceDetails message describes a specific source
  3668  // details for the vmware source type.
  3669  type VmwareSourceDetails struct {
  3670  	// Password: Input only. The credentials password. This is write only and can
  3671  	// not be read in a GET operation.
  3672  	Password string `json:"password,omitempty"`
  3673  	// ResolvedVcenterHost: The hostname of the vcenter.
  3674  	ResolvedVcenterHost string `json:"resolvedVcenterHost,omitempty"`
  3675  	// Thumbprint: The thumbprint representing the certificate for the vcenter.
  3676  	Thumbprint string `json:"thumbprint,omitempty"`
  3677  	// Username: The credentials username.
  3678  	Username string `json:"username,omitempty"`
  3679  	// VcenterIp: The ip address of the vcenter this Source represents.
  3680  	VcenterIp string `json:"vcenterIp,omitempty"`
  3681  	// ForceSendFields is a list of field names (e.g. "Password") to
  3682  	// unconditionally include in API requests. By default, fields with empty or
  3683  	// default values are omitted from API requests. See
  3684  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3685  	// details.
  3686  	ForceSendFields []string `json:"-"`
  3687  	// NullFields is a list of field names (e.g. "Password") to include in API
  3688  	// requests with the JSON null value. By default, fields with empty values are
  3689  	// omitted from API requests. See
  3690  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3691  	NullFields []string `json:"-"`
  3692  }
  3693  
  3694  func (s *VmwareSourceDetails) MarshalJSON() ([]byte, error) {
  3695  	type NoMethod VmwareSourceDetails
  3696  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3697  }
  3698  
  3699  // VmwareSourceVmDetails: Represent the source Vmware VM details.
  3700  type VmwareSourceVmDetails struct {
  3701  	// CommittedStorageBytes: The total size of the disks being migrated in bytes.
  3702  	CommittedStorageBytes int64 `json:"committedStorageBytes,omitempty,string"`
  3703  	// Disks: The disks attached to the source VM.
  3704  	Disks []*VmwareDiskDetails `json:"disks,omitempty"`
  3705  	// Firmware: The firmware type of the source VM.
  3706  	//
  3707  	// Possible values:
  3708  	//   "FIRMWARE_UNSPECIFIED" - The firmware is unknown.
  3709  	//   "EFI" - The firmware is EFI.
  3710  	//   "BIOS" - The firmware is BIOS.
  3711  	Firmware string `json:"firmware,omitempty"`
  3712  	// VmCapabilitiesInfo: Output only. Information about VM capabilities needed
  3713  	// for some Compute Engine features.
  3714  	VmCapabilitiesInfo *VmCapabilities `json:"vmCapabilitiesInfo,omitempty"`
  3715  	// ForceSendFields is a list of field names (e.g. "CommittedStorageBytes") to
  3716  	// unconditionally include in API requests. By default, fields with empty or
  3717  	// default values are omitted from API requests. See
  3718  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3719  	// details.
  3720  	ForceSendFields []string `json:"-"`
  3721  	// NullFields is a list of field names (e.g. "CommittedStorageBytes") to
  3722  	// include in API requests with the JSON null value. By default, fields with
  3723  	// empty values are omitted from API requests. See
  3724  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3725  	NullFields []string `json:"-"`
  3726  }
  3727  
  3728  func (s *VmwareSourceVmDetails) MarshalJSON() ([]byte, error) {
  3729  	type NoMethod VmwareSourceVmDetails
  3730  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3731  }
  3732  
  3733  // VmwareVmDetails: VmwareVmDetails describes a VM in vCenter.
  3734  type VmwareVmDetails struct {
  3735  	// BootOption: Output only. The VM Boot Option.
  3736  	//
  3737  	// Possible values:
  3738  	//   "BOOT_OPTION_UNSPECIFIED" - The boot option is unknown.
  3739  	//   "EFI" - The boot option is EFI.
  3740  	//   "BIOS" - The boot option is BIOS.
  3741  	BootOption string `json:"bootOption,omitempty"`
  3742  	// CommittedStorageMb: The total size of the storage allocated to the VM in MB.
  3743  	CommittedStorageMb int64 `json:"committedStorageMb,omitempty,string"`
  3744  	// CpuCount: The number of cpus in the VM.
  3745  	CpuCount int64 `json:"cpuCount,omitempty"`
  3746  	// DatacenterDescription: The descriptive name of the vCenter's datacenter this
  3747  	// VM is contained in.
  3748  	DatacenterDescription string `json:"datacenterDescription,omitempty"`
  3749  	// DatacenterId: The id of the vCenter's datacenter this VM is contained in.
  3750  	DatacenterId string `json:"datacenterId,omitempty"`
  3751  	// DiskCount: The number of disks the VM has.
  3752  	DiskCount int64 `json:"diskCount,omitempty"`
  3753  	// DisplayName: The display name of the VM. Note that this is not necessarily
  3754  	// unique.
  3755  	DisplayName string `json:"displayName,omitempty"`
  3756  	// GuestDescription: The VM's OS. See for example
  3757  	// https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html
  3758  	// for types of strings this might hold.
  3759  	GuestDescription string `json:"guestDescription,omitempty"`
  3760  	// MemoryMb: The size of the memory of the VM in MB.
  3761  	MemoryMb int64 `json:"memoryMb,omitempty"`
  3762  	// PowerState: The power state of the VM at the moment list was taken.
  3763  	//
  3764  	// Possible values:
  3765  	//   "POWER_STATE_UNSPECIFIED" - Power state is not specified.
  3766  	//   "ON" - The VM is turned ON.
  3767  	//   "OFF" - The VM is turned OFF.
  3768  	//   "SUSPENDED" - The VM is suspended. This is similar to hibernation or sleep
  3769  	// mode.
  3770  	PowerState string `json:"powerState,omitempty"`
  3771  	// Uuid: The unique identifier of the VM in vCenter.
  3772  	Uuid string `json:"uuid,omitempty"`
  3773  	// VmId: The VM's id in the source (note that this is not the MigratingVm's
  3774  	// id). This is the moref id of the VM.
  3775  	VmId string `json:"vmId,omitempty"`
  3776  	// ForceSendFields is a list of field names (e.g. "BootOption") to
  3777  	// unconditionally include in API requests. By default, fields with empty or
  3778  	// default values are omitted from API requests. See
  3779  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3780  	// details.
  3781  	ForceSendFields []string `json:"-"`
  3782  	// NullFields is a list of field names (e.g. "BootOption") to include in API
  3783  	// requests with the JSON null value. By default, fields with empty values are
  3784  	// omitted from API requests. See
  3785  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3786  	NullFields []string `json:"-"`
  3787  }
  3788  
  3789  func (s *VmwareVmDetails) MarshalJSON() ([]byte, error) {
  3790  	type NoMethod VmwareVmDetails
  3791  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3792  }
  3793  
  3794  // VmwareVmsDetails: VmwareVmsDetails describes VMs in vCenter.
  3795  type VmwareVmsDetails struct {
  3796  	// Details: The details of the vmware VMs.
  3797  	Details []*VmwareVmDetails `json:"details,omitempty"`
  3798  	// ForceSendFields is a list of field names (e.g. "Details") to unconditionally
  3799  	// include in API requests. By default, fields with empty or default values are
  3800  	// omitted from API requests. See
  3801  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3802  	// details.
  3803  	ForceSendFields []string `json:"-"`
  3804  	// NullFields is a list of field names (e.g. "Details") to include in API
  3805  	// requests with the JSON null value. By default, fields with empty values are
  3806  	// omitted from API requests. See
  3807  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3808  	NullFields []string `json:"-"`
  3809  }
  3810  
  3811  func (s *VmwareVmsDetails) MarshalJSON() ([]byte, error) {
  3812  	type NoMethod VmwareVmsDetails
  3813  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3814  }
  3815  
  3816  type ProjectsLocationsGetCall struct {
  3817  	s            *Service
  3818  	name         string
  3819  	urlParams_   gensupport.URLParams
  3820  	ifNoneMatch_ string
  3821  	ctx_         context.Context
  3822  	header_      http.Header
  3823  }
  3824  
  3825  // Get: Gets information about a location.
  3826  //
  3827  // - name: Resource name for the location.
  3828  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  3829  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3830  	c.name = name
  3831  	return c
  3832  }
  3833  
  3834  // Fields allows partial responses to be retrieved. See
  3835  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3836  // details.
  3837  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  3838  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3839  	return c
  3840  }
  3841  
  3842  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3843  // object's ETag matches the given value. This is useful for getting updates
  3844  // only after the object has changed since the last request.
  3845  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  3846  	c.ifNoneMatch_ = entityTag
  3847  	return c
  3848  }
  3849  
  3850  // Context sets the context to be used in this call's Do method.
  3851  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  3852  	c.ctx_ = ctx
  3853  	return c
  3854  }
  3855  
  3856  // Header returns a http.Header that can be modified by the caller to add
  3857  // headers to the request.
  3858  func (c *ProjectsLocationsGetCall) Header() http.Header {
  3859  	if c.header_ == nil {
  3860  		c.header_ = make(http.Header)
  3861  	}
  3862  	return c.header_
  3863  }
  3864  
  3865  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  3866  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3867  	if c.ifNoneMatch_ != "" {
  3868  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3869  	}
  3870  	var body io.Reader = nil
  3871  	c.urlParams_.Set("alt", alt)
  3872  	c.urlParams_.Set("prettyPrint", "false")
  3873  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3874  	urls += "?" + c.urlParams_.Encode()
  3875  	req, err := http.NewRequest("GET", urls, body)
  3876  	if err != nil {
  3877  		return nil, err
  3878  	}
  3879  	req.Header = reqHeaders
  3880  	googleapi.Expand(req.URL, map[string]string{
  3881  		"name": c.name,
  3882  	})
  3883  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3884  }
  3885  
  3886  // Do executes the "vmmigration.projects.locations.get" call.
  3887  // Any non-2xx status code is an error. Response headers are in either
  3888  // *Location.ServerResponse.Header or (if a response was returned at all) in
  3889  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3890  // whether the returned error was because http.StatusNotModified was returned.
  3891  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  3892  	gensupport.SetOptions(c.urlParams_, opts...)
  3893  	res, err := c.doRequest("json")
  3894  	if res != nil && res.StatusCode == http.StatusNotModified {
  3895  		if res.Body != nil {
  3896  			res.Body.Close()
  3897  		}
  3898  		return nil, gensupport.WrapError(&googleapi.Error{
  3899  			Code:   res.StatusCode,
  3900  			Header: res.Header,
  3901  		})
  3902  	}
  3903  	if err != nil {
  3904  		return nil, err
  3905  	}
  3906  	defer googleapi.CloseBody(res)
  3907  	if err := googleapi.CheckResponse(res); err != nil {
  3908  		return nil, gensupport.WrapError(err)
  3909  	}
  3910  	ret := &Location{
  3911  		ServerResponse: googleapi.ServerResponse{
  3912  			Header:         res.Header,
  3913  			HTTPStatusCode: res.StatusCode,
  3914  		},
  3915  	}
  3916  	target := &ret
  3917  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3918  		return nil, err
  3919  	}
  3920  	return ret, nil
  3921  }
  3922  
  3923  type ProjectsLocationsListCall struct {
  3924  	s            *Service
  3925  	name         string
  3926  	urlParams_   gensupport.URLParams
  3927  	ifNoneMatch_ string
  3928  	ctx_         context.Context
  3929  	header_      http.Header
  3930  }
  3931  
  3932  // List: Lists information about the supported locations for this service.
  3933  //
  3934  // - name: The resource that owns the locations collection, if applicable.
  3935  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  3936  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3937  	c.name = name
  3938  	return c
  3939  }
  3940  
  3941  // Filter sets the optional parameter "filter": A filter to narrow down results
  3942  // to a preferred subset. The filtering language accepts strings like
  3943  // "displayName=tokyo", and is documented in more detail in AIP-160
  3944  // (https://google.aip.dev/160).
  3945  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  3946  	c.urlParams_.Set("filter", filter)
  3947  	return c
  3948  }
  3949  
  3950  // PageSize sets the optional parameter "pageSize": The maximum number of
  3951  // results to return. If not set, the service selects a default.
  3952  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  3953  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3954  	return c
  3955  }
  3956  
  3957  // PageToken sets the optional parameter "pageToken": A page token received
  3958  // from the `next_page_token` field in the response. Send that page token to
  3959  // receive the subsequent page.
  3960  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  3961  	c.urlParams_.Set("pageToken", pageToken)
  3962  	return c
  3963  }
  3964  
  3965  // Fields allows partial responses to be retrieved. See
  3966  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3967  // details.
  3968  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  3969  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3970  	return c
  3971  }
  3972  
  3973  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3974  // object's ETag matches the given value. This is useful for getting updates
  3975  // only after the object has changed since the last request.
  3976  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  3977  	c.ifNoneMatch_ = entityTag
  3978  	return c
  3979  }
  3980  
  3981  // Context sets the context to be used in this call's Do method.
  3982  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  3983  	c.ctx_ = ctx
  3984  	return c
  3985  }
  3986  
  3987  // Header returns a http.Header that can be modified by the caller to add
  3988  // headers to the request.
  3989  func (c *ProjectsLocationsListCall) Header() http.Header {
  3990  	if c.header_ == nil {
  3991  		c.header_ = make(http.Header)
  3992  	}
  3993  	return c.header_
  3994  }
  3995  
  3996  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  3997  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3998  	if c.ifNoneMatch_ != "" {
  3999  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4000  	}
  4001  	var body io.Reader = nil
  4002  	c.urlParams_.Set("alt", alt)
  4003  	c.urlParams_.Set("prettyPrint", "false")
  4004  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  4005  	urls += "?" + c.urlParams_.Encode()
  4006  	req, err := http.NewRequest("GET", urls, body)
  4007  	if err != nil {
  4008  		return nil, err
  4009  	}
  4010  	req.Header = reqHeaders
  4011  	googleapi.Expand(req.URL, map[string]string{
  4012  		"name": c.name,
  4013  	})
  4014  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4015  }
  4016  
  4017  // Do executes the "vmmigration.projects.locations.list" call.
  4018  // Any non-2xx status code is an error. Response headers are in either
  4019  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  4020  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4021  // check whether the returned error was because http.StatusNotModified was
  4022  // returned.
  4023  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  4024  	gensupport.SetOptions(c.urlParams_, opts...)
  4025  	res, err := c.doRequest("json")
  4026  	if res != nil && res.StatusCode == http.StatusNotModified {
  4027  		if res.Body != nil {
  4028  			res.Body.Close()
  4029  		}
  4030  		return nil, gensupport.WrapError(&googleapi.Error{
  4031  			Code:   res.StatusCode,
  4032  			Header: res.Header,
  4033  		})
  4034  	}
  4035  	if err != nil {
  4036  		return nil, err
  4037  	}
  4038  	defer googleapi.CloseBody(res)
  4039  	if err := googleapi.CheckResponse(res); err != nil {
  4040  		return nil, gensupport.WrapError(err)
  4041  	}
  4042  	ret := &ListLocationsResponse{
  4043  		ServerResponse: googleapi.ServerResponse{
  4044  			Header:         res.Header,
  4045  			HTTPStatusCode: res.StatusCode,
  4046  		},
  4047  	}
  4048  	target := &ret
  4049  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4050  		return nil, err
  4051  	}
  4052  	return ret, nil
  4053  }
  4054  
  4055  // Pages invokes f for each page of results.
  4056  // A non-nil error returned from f will halt the iteration.
  4057  // The provided context supersedes any context provided to the Context method.
  4058  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  4059  	c.ctx_ = ctx
  4060  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4061  	for {
  4062  		x, err := c.Do()
  4063  		if err != nil {
  4064  			return err
  4065  		}
  4066  		if err := f(x); err != nil {
  4067  			return err
  4068  		}
  4069  		if x.NextPageToken == "" {
  4070  			return nil
  4071  		}
  4072  		c.PageToken(x.NextPageToken)
  4073  	}
  4074  }
  4075  
  4076  type ProjectsLocationsGroupsAddGroupMigrationCall struct {
  4077  	s                        *Service
  4078  	group                    string
  4079  	addgroupmigrationrequest *AddGroupMigrationRequest
  4080  	urlParams_               gensupport.URLParams
  4081  	ctx_                     context.Context
  4082  	header_                  http.Header
  4083  }
  4084  
  4085  // AddGroupMigration: Adds a MigratingVm to a Group.
  4086  //
  4087  // - group: The full path name of the Group to add to.
  4088  func (r *ProjectsLocationsGroupsService) AddGroupMigration(group string, addgroupmigrationrequest *AddGroupMigrationRequest) *ProjectsLocationsGroupsAddGroupMigrationCall {
  4089  	c := &ProjectsLocationsGroupsAddGroupMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4090  	c.group = group
  4091  	c.addgroupmigrationrequest = addgroupmigrationrequest
  4092  	return c
  4093  }
  4094  
  4095  // Fields allows partial responses to be retrieved. See
  4096  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4097  // details.
  4098  func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsAddGroupMigrationCall {
  4099  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4100  	return c
  4101  }
  4102  
  4103  // Context sets the context to be used in this call's Do method.
  4104  func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Context(ctx context.Context) *ProjectsLocationsGroupsAddGroupMigrationCall {
  4105  	c.ctx_ = ctx
  4106  	return c
  4107  }
  4108  
  4109  // Header returns a http.Header that can be modified by the caller to add
  4110  // headers to the request.
  4111  func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Header() http.Header {
  4112  	if c.header_ == nil {
  4113  		c.header_ = make(http.Header)
  4114  	}
  4115  	return c.header_
  4116  }
  4117  
  4118  func (c *ProjectsLocationsGroupsAddGroupMigrationCall) doRequest(alt string) (*http.Response, error) {
  4119  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4120  	var body io.Reader = nil
  4121  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.addgroupmigrationrequest)
  4122  	if err != nil {
  4123  		return nil, err
  4124  	}
  4125  	c.urlParams_.Set("alt", alt)
  4126  	c.urlParams_.Set("prettyPrint", "false")
  4127  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+group}:addGroupMigration")
  4128  	urls += "?" + c.urlParams_.Encode()
  4129  	req, err := http.NewRequest("POST", urls, body)
  4130  	if err != nil {
  4131  		return nil, err
  4132  	}
  4133  	req.Header = reqHeaders
  4134  	googleapi.Expand(req.URL, map[string]string{
  4135  		"group": c.group,
  4136  	})
  4137  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4138  }
  4139  
  4140  // Do executes the "vmmigration.projects.locations.groups.addGroupMigration" call.
  4141  // Any non-2xx status code is an error. Response headers are in either
  4142  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4143  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4144  // whether the returned error was because http.StatusNotModified was returned.
  4145  func (c *ProjectsLocationsGroupsAddGroupMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4146  	gensupport.SetOptions(c.urlParams_, opts...)
  4147  	res, err := c.doRequest("json")
  4148  	if res != nil && res.StatusCode == http.StatusNotModified {
  4149  		if res.Body != nil {
  4150  			res.Body.Close()
  4151  		}
  4152  		return nil, gensupport.WrapError(&googleapi.Error{
  4153  			Code:   res.StatusCode,
  4154  			Header: res.Header,
  4155  		})
  4156  	}
  4157  	if err != nil {
  4158  		return nil, err
  4159  	}
  4160  	defer googleapi.CloseBody(res)
  4161  	if err := googleapi.CheckResponse(res); err != nil {
  4162  		return nil, gensupport.WrapError(err)
  4163  	}
  4164  	ret := &Operation{
  4165  		ServerResponse: googleapi.ServerResponse{
  4166  			Header:         res.Header,
  4167  			HTTPStatusCode: res.StatusCode,
  4168  		},
  4169  	}
  4170  	target := &ret
  4171  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4172  		return nil, err
  4173  	}
  4174  	return ret, nil
  4175  }
  4176  
  4177  type ProjectsLocationsGroupsCreateCall struct {
  4178  	s          *Service
  4179  	parent     string
  4180  	group      *Group
  4181  	urlParams_ gensupport.URLParams
  4182  	ctx_       context.Context
  4183  	header_    http.Header
  4184  }
  4185  
  4186  // Create: Creates a new Group in a given project and location.
  4187  //
  4188  // - parent: The Group's parent.
  4189  func (r *ProjectsLocationsGroupsService) Create(parent string, group *Group) *ProjectsLocationsGroupsCreateCall {
  4190  	c := &ProjectsLocationsGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4191  	c.parent = parent
  4192  	c.group = group
  4193  	return c
  4194  }
  4195  
  4196  // GroupId sets the optional parameter "groupId": Required. The group
  4197  // identifier.
  4198  func (c *ProjectsLocationsGroupsCreateCall) GroupId(groupId string) *ProjectsLocationsGroupsCreateCall {
  4199  	c.urlParams_.Set("groupId", groupId)
  4200  	return c
  4201  }
  4202  
  4203  // RequestId sets the optional parameter "requestId": A request ID to identify
  4204  // requests. Specify a unique request ID so that if you must retry your
  4205  // request, the server will know to ignore the request if it has already been
  4206  // completed. The server will guarantee that for at least 60 minutes since the
  4207  // first request. For example, consider a situation where you make an initial
  4208  // request and the request times out. If you make the request again with the
  4209  // same request ID, the server can check if original operation with the same
  4210  // request ID was received, and if so, will ignore the second request. This
  4211  // prevents clients from accidentally creating duplicate commitments. The
  4212  // request ID must be a valid UUID with the exception that zero UUID is not
  4213  // supported (00000000-0000-0000-0000-000000000000).
  4214  func (c *ProjectsLocationsGroupsCreateCall) RequestId(requestId string) *ProjectsLocationsGroupsCreateCall {
  4215  	c.urlParams_.Set("requestId", requestId)
  4216  	return c
  4217  }
  4218  
  4219  // Fields allows partial responses to be retrieved. See
  4220  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4221  // details.
  4222  func (c *ProjectsLocationsGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsCreateCall {
  4223  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4224  	return c
  4225  }
  4226  
  4227  // Context sets the context to be used in this call's Do method.
  4228  func (c *ProjectsLocationsGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsGroupsCreateCall {
  4229  	c.ctx_ = ctx
  4230  	return c
  4231  }
  4232  
  4233  // Header returns a http.Header that can be modified by the caller to add
  4234  // headers to the request.
  4235  func (c *ProjectsLocationsGroupsCreateCall) Header() http.Header {
  4236  	if c.header_ == nil {
  4237  		c.header_ = make(http.Header)
  4238  	}
  4239  	return c.header_
  4240  }
  4241  
  4242  func (c *ProjectsLocationsGroupsCreateCall) doRequest(alt string) (*http.Response, error) {
  4243  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4244  	var body io.Reader = nil
  4245  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
  4246  	if err != nil {
  4247  		return nil, err
  4248  	}
  4249  	c.urlParams_.Set("alt", alt)
  4250  	c.urlParams_.Set("prettyPrint", "false")
  4251  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/groups")
  4252  	urls += "?" + c.urlParams_.Encode()
  4253  	req, err := http.NewRequest("POST", urls, body)
  4254  	if err != nil {
  4255  		return nil, err
  4256  	}
  4257  	req.Header = reqHeaders
  4258  	googleapi.Expand(req.URL, map[string]string{
  4259  		"parent": c.parent,
  4260  	})
  4261  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4262  }
  4263  
  4264  // Do executes the "vmmigration.projects.locations.groups.create" call.
  4265  // Any non-2xx status code is an error. Response headers are in either
  4266  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4267  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4268  // whether the returned error was because http.StatusNotModified was returned.
  4269  func (c *ProjectsLocationsGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4270  	gensupport.SetOptions(c.urlParams_, opts...)
  4271  	res, err := c.doRequest("json")
  4272  	if res != nil && res.StatusCode == http.StatusNotModified {
  4273  		if res.Body != nil {
  4274  			res.Body.Close()
  4275  		}
  4276  		return nil, gensupport.WrapError(&googleapi.Error{
  4277  			Code:   res.StatusCode,
  4278  			Header: res.Header,
  4279  		})
  4280  	}
  4281  	if err != nil {
  4282  		return nil, err
  4283  	}
  4284  	defer googleapi.CloseBody(res)
  4285  	if err := googleapi.CheckResponse(res); err != nil {
  4286  		return nil, gensupport.WrapError(err)
  4287  	}
  4288  	ret := &Operation{
  4289  		ServerResponse: googleapi.ServerResponse{
  4290  			Header:         res.Header,
  4291  			HTTPStatusCode: res.StatusCode,
  4292  		},
  4293  	}
  4294  	target := &ret
  4295  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4296  		return nil, err
  4297  	}
  4298  	return ret, nil
  4299  }
  4300  
  4301  type ProjectsLocationsGroupsDeleteCall struct {
  4302  	s          *Service
  4303  	name       string
  4304  	urlParams_ gensupport.URLParams
  4305  	ctx_       context.Context
  4306  	header_    http.Header
  4307  }
  4308  
  4309  // Delete: Deletes a single Group.
  4310  //
  4311  // - name: The Group name.
  4312  func (r *ProjectsLocationsGroupsService) Delete(name string) *ProjectsLocationsGroupsDeleteCall {
  4313  	c := &ProjectsLocationsGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4314  	c.name = name
  4315  	return c
  4316  }
  4317  
  4318  // RequestId sets the optional parameter "requestId": A request ID to identify
  4319  // requests. Specify a unique request ID so that if you must retry your
  4320  // request, the server will know to ignore the request if it has already been
  4321  // completed. The server will guarantee that for at least 60 minutes after the
  4322  // first request. For example, consider a situation where you make an initial
  4323  // request and the request times out. If you make the request again with the
  4324  // same request ID, the server can check if original operation with the same
  4325  // request ID was received, and if so, will ignore the second request. This
  4326  // prevents clients from accidentally creating duplicate commitments. The
  4327  // request ID must be a valid UUID with the exception that zero UUID is not
  4328  // supported (00000000-0000-0000-0000-000000000000).
  4329  func (c *ProjectsLocationsGroupsDeleteCall) RequestId(requestId string) *ProjectsLocationsGroupsDeleteCall {
  4330  	c.urlParams_.Set("requestId", requestId)
  4331  	return c
  4332  }
  4333  
  4334  // Fields allows partial responses to be retrieved. See
  4335  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4336  // details.
  4337  func (c *ProjectsLocationsGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsDeleteCall {
  4338  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4339  	return c
  4340  }
  4341  
  4342  // Context sets the context to be used in this call's Do method.
  4343  func (c *ProjectsLocationsGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGroupsDeleteCall {
  4344  	c.ctx_ = ctx
  4345  	return c
  4346  }
  4347  
  4348  // Header returns a http.Header that can be modified by the caller to add
  4349  // headers to the request.
  4350  func (c *ProjectsLocationsGroupsDeleteCall) Header() http.Header {
  4351  	if c.header_ == nil {
  4352  		c.header_ = make(http.Header)
  4353  	}
  4354  	return c.header_
  4355  }
  4356  
  4357  func (c *ProjectsLocationsGroupsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4358  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4359  	var body io.Reader = nil
  4360  	c.urlParams_.Set("alt", alt)
  4361  	c.urlParams_.Set("prettyPrint", "false")
  4362  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4363  	urls += "?" + c.urlParams_.Encode()
  4364  	req, err := http.NewRequest("DELETE", urls, body)
  4365  	if err != nil {
  4366  		return nil, err
  4367  	}
  4368  	req.Header = reqHeaders
  4369  	googleapi.Expand(req.URL, map[string]string{
  4370  		"name": c.name,
  4371  	})
  4372  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4373  }
  4374  
  4375  // Do executes the "vmmigration.projects.locations.groups.delete" call.
  4376  // Any non-2xx status code is an error. Response headers are in either
  4377  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4378  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4379  // whether the returned error was because http.StatusNotModified was returned.
  4380  func (c *ProjectsLocationsGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4381  	gensupport.SetOptions(c.urlParams_, opts...)
  4382  	res, err := c.doRequest("json")
  4383  	if res != nil && res.StatusCode == http.StatusNotModified {
  4384  		if res.Body != nil {
  4385  			res.Body.Close()
  4386  		}
  4387  		return nil, gensupport.WrapError(&googleapi.Error{
  4388  			Code:   res.StatusCode,
  4389  			Header: res.Header,
  4390  		})
  4391  	}
  4392  	if err != nil {
  4393  		return nil, err
  4394  	}
  4395  	defer googleapi.CloseBody(res)
  4396  	if err := googleapi.CheckResponse(res); err != nil {
  4397  		return nil, gensupport.WrapError(err)
  4398  	}
  4399  	ret := &Operation{
  4400  		ServerResponse: googleapi.ServerResponse{
  4401  			Header:         res.Header,
  4402  			HTTPStatusCode: res.StatusCode,
  4403  		},
  4404  	}
  4405  	target := &ret
  4406  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4407  		return nil, err
  4408  	}
  4409  	return ret, nil
  4410  }
  4411  
  4412  type ProjectsLocationsGroupsGetCall struct {
  4413  	s            *Service
  4414  	name         string
  4415  	urlParams_   gensupport.URLParams
  4416  	ifNoneMatch_ string
  4417  	ctx_         context.Context
  4418  	header_      http.Header
  4419  }
  4420  
  4421  // Get: Gets details of a single Group.
  4422  //
  4423  // - name: The group name.
  4424  func (r *ProjectsLocationsGroupsService) Get(name string) *ProjectsLocationsGroupsGetCall {
  4425  	c := &ProjectsLocationsGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4426  	c.name = name
  4427  	return c
  4428  }
  4429  
  4430  // Fields allows partial responses to be retrieved. See
  4431  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4432  // details.
  4433  func (c *ProjectsLocationsGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsGetCall {
  4434  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4435  	return c
  4436  }
  4437  
  4438  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4439  // object's ETag matches the given value. This is useful for getting updates
  4440  // only after the object has changed since the last request.
  4441  func (c *ProjectsLocationsGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGroupsGetCall {
  4442  	c.ifNoneMatch_ = entityTag
  4443  	return c
  4444  }
  4445  
  4446  // Context sets the context to be used in this call's Do method.
  4447  func (c *ProjectsLocationsGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsGroupsGetCall {
  4448  	c.ctx_ = ctx
  4449  	return c
  4450  }
  4451  
  4452  // Header returns a http.Header that can be modified by the caller to add
  4453  // headers to the request.
  4454  func (c *ProjectsLocationsGroupsGetCall) Header() http.Header {
  4455  	if c.header_ == nil {
  4456  		c.header_ = make(http.Header)
  4457  	}
  4458  	return c.header_
  4459  }
  4460  
  4461  func (c *ProjectsLocationsGroupsGetCall) doRequest(alt string) (*http.Response, error) {
  4462  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4463  	if c.ifNoneMatch_ != "" {
  4464  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4465  	}
  4466  	var body io.Reader = nil
  4467  	c.urlParams_.Set("alt", alt)
  4468  	c.urlParams_.Set("prettyPrint", "false")
  4469  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4470  	urls += "?" + c.urlParams_.Encode()
  4471  	req, err := http.NewRequest("GET", urls, body)
  4472  	if err != nil {
  4473  		return nil, err
  4474  	}
  4475  	req.Header = reqHeaders
  4476  	googleapi.Expand(req.URL, map[string]string{
  4477  		"name": c.name,
  4478  	})
  4479  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4480  }
  4481  
  4482  // Do executes the "vmmigration.projects.locations.groups.get" call.
  4483  // Any non-2xx status code is an error. Response headers are in either
  4484  // *Group.ServerResponse.Header or (if a response was returned at all) in
  4485  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4486  // whether the returned error was because http.StatusNotModified was returned.
  4487  func (c *ProjectsLocationsGroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) {
  4488  	gensupport.SetOptions(c.urlParams_, opts...)
  4489  	res, err := c.doRequest("json")
  4490  	if res != nil && res.StatusCode == http.StatusNotModified {
  4491  		if res.Body != nil {
  4492  			res.Body.Close()
  4493  		}
  4494  		return nil, gensupport.WrapError(&googleapi.Error{
  4495  			Code:   res.StatusCode,
  4496  			Header: res.Header,
  4497  		})
  4498  	}
  4499  	if err != nil {
  4500  		return nil, err
  4501  	}
  4502  	defer googleapi.CloseBody(res)
  4503  	if err := googleapi.CheckResponse(res); err != nil {
  4504  		return nil, gensupport.WrapError(err)
  4505  	}
  4506  	ret := &Group{
  4507  		ServerResponse: googleapi.ServerResponse{
  4508  			Header:         res.Header,
  4509  			HTTPStatusCode: res.StatusCode,
  4510  		},
  4511  	}
  4512  	target := &ret
  4513  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4514  		return nil, err
  4515  	}
  4516  	return ret, nil
  4517  }
  4518  
  4519  type ProjectsLocationsGroupsListCall struct {
  4520  	s            *Service
  4521  	parent       string
  4522  	urlParams_   gensupport.URLParams
  4523  	ifNoneMatch_ string
  4524  	ctx_         context.Context
  4525  	header_      http.Header
  4526  }
  4527  
  4528  // List: Lists Groups in a given project and location.
  4529  //
  4530  // - parent: The parent, which owns this collection of groups.
  4531  func (r *ProjectsLocationsGroupsService) List(parent string) *ProjectsLocationsGroupsListCall {
  4532  	c := &ProjectsLocationsGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4533  	c.parent = parent
  4534  	return c
  4535  }
  4536  
  4537  // Filter sets the optional parameter "filter": The filter request.
  4538  func (c *ProjectsLocationsGroupsListCall) Filter(filter string) *ProjectsLocationsGroupsListCall {
  4539  	c.urlParams_.Set("filter", filter)
  4540  	return c
  4541  }
  4542  
  4543  // OrderBy sets the optional parameter "orderBy": the order by fields for the
  4544  // result.
  4545  func (c *ProjectsLocationsGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsGroupsListCall {
  4546  	c.urlParams_.Set("orderBy", orderBy)
  4547  	return c
  4548  }
  4549  
  4550  // PageSize sets the optional parameter "pageSize": The maximum number of
  4551  // groups to return. The service may return fewer than this value. If
  4552  // unspecified, at most 500 groups will be returned. The maximum value is 1000;
  4553  // values above 1000 will be coerced to 1000.
  4554  func (c *ProjectsLocationsGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsGroupsListCall {
  4555  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4556  	return c
  4557  }
  4558  
  4559  // PageToken sets the optional parameter "pageToken": Required. A page token,
  4560  // received from a previous `ListGroups` call. Provide this to retrieve the
  4561  // subsequent page. When paginating, all other parameters provided to
  4562  // `ListGroups` must match the call that provided the page token.
  4563  func (c *ProjectsLocationsGroupsListCall) PageToken(pageToken string) *ProjectsLocationsGroupsListCall {
  4564  	c.urlParams_.Set("pageToken", pageToken)
  4565  	return c
  4566  }
  4567  
  4568  // Fields allows partial responses to be retrieved. See
  4569  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4570  // details.
  4571  func (c *ProjectsLocationsGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsListCall {
  4572  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4573  	return c
  4574  }
  4575  
  4576  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4577  // object's ETag matches the given value. This is useful for getting updates
  4578  // only after the object has changed since the last request.
  4579  func (c *ProjectsLocationsGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGroupsListCall {
  4580  	c.ifNoneMatch_ = entityTag
  4581  	return c
  4582  }
  4583  
  4584  // Context sets the context to be used in this call's Do method.
  4585  func (c *ProjectsLocationsGroupsListCall) Context(ctx context.Context) *ProjectsLocationsGroupsListCall {
  4586  	c.ctx_ = ctx
  4587  	return c
  4588  }
  4589  
  4590  // Header returns a http.Header that can be modified by the caller to add
  4591  // headers to the request.
  4592  func (c *ProjectsLocationsGroupsListCall) Header() http.Header {
  4593  	if c.header_ == nil {
  4594  		c.header_ = make(http.Header)
  4595  	}
  4596  	return c.header_
  4597  }
  4598  
  4599  func (c *ProjectsLocationsGroupsListCall) doRequest(alt string) (*http.Response, error) {
  4600  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4601  	if c.ifNoneMatch_ != "" {
  4602  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4603  	}
  4604  	var body io.Reader = nil
  4605  	c.urlParams_.Set("alt", alt)
  4606  	c.urlParams_.Set("prettyPrint", "false")
  4607  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/groups")
  4608  	urls += "?" + c.urlParams_.Encode()
  4609  	req, err := http.NewRequest("GET", urls, body)
  4610  	if err != nil {
  4611  		return nil, err
  4612  	}
  4613  	req.Header = reqHeaders
  4614  	googleapi.Expand(req.URL, map[string]string{
  4615  		"parent": c.parent,
  4616  	})
  4617  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4618  }
  4619  
  4620  // Do executes the "vmmigration.projects.locations.groups.list" call.
  4621  // Any non-2xx status code is an error. Response headers are in either
  4622  // *ListGroupsResponse.ServerResponse.Header or (if a response was returned at
  4623  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4624  // check whether the returned error was because http.StatusNotModified was
  4625  // returned.
  4626  func (c *ProjectsLocationsGroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsResponse, error) {
  4627  	gensupport.SetOptions(c.urlParams_, opts...)
  4628  	res, err := c.doRequest("json")
  4629  	if res != nil && res.StatusCode == http.StatusNotModified {
  4630  		if res.Body != nil {
  4631  			res.Body.Close()
  4632  		}
  4633  		return nil, gensupport.WrapError(&googleapi.Error{
  4634  			Code:   res.StatusCode,
  4635  			Header: res.Header,
  4636  		})
  4637  	}
  4638  	if err != nil {
  4639  		return nil, err
  4640  	}
  4641  	defer googleapi.CloseBody(res)
  4642  	if err := googleapi.CheckResponse(res); err != nil {
  4643  		return nil, gensupport.WrapError(err)
  4644  	}
  4645  	ret := &ListGroupsResponse{
  4646  		ServerResponse: googleapi.ServerResponse{
  4647  			Header:         res.Header,
  4648  			HTTPStatusCode: res.StatusCode,
  4649  		},
  4650  	}
  4651  	target := &ret
  4652  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4653  		return nil, err
  4654  	}
  4655  	return ret, nil
  4656  }
  4657  
  4658  // Pages invokes f for each page of results.
  4659  // A non-nil error returned from f will halt the iteration.
  4660  // The provided context supersedes any context provided to the Context method.
  4661  func (c *ProjectsLocationsGroupsListCall) Pages(ctx context.Context, f func(*ListGroupsResponse) error) error {
  4662  	c.ctx_ = ctx
  4663  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4664  	for {
  4665  		x, err := c.Do()
  4666  		if err != nil {
  4667  			return err
  4668  		}
  4669  		if err := f(x); err != nil {
  4670  			return err
  4671  		}
  4672  		if x.NextPageToken == "" {
  4673  			return nil
  4674  		}
  4675  		c.PageToken(x.NextPageToken)
  4676  	}
  4677  }
  4678  
  4679  type ProjectsLocationsGroupsPatchCall struct {
  4680  	s          *Service
  4681  	name       string
  4682  	group      *Group
  4683  	urlParams_ gensupport.URLParams
  4684  	ctx_       context.Context
  4685  	header_    http.Header
  4686  }
  4687  
  4688  // Patch: Updates the parameters of a single Group.
  4689  //
  4690  // - name: Output only. The Group name.
  4691  func (r *ProjectsLocationsGroupsService) Patch(name string, group *Group) *ProjectsLocationsGroupsPatchCall {
  4692  	c := &ProjectsLocationsGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4693  	c.name = name
  4694  	c.group = group
  4695  	return c
  4696  }
  4697  
  4698  // RequestId sets the optional parameter "requestId": A request ID to identify
  4699  // requests. Specify a unique request ID so that if you must retry your
  4700  // request, the server will know to ignore the request if it has already been
  4701  // completed. The server will guarantee that for at least 60 minutes since the
  4702  // first request. For example, consider a situation where you make an initial
  4703  // request and the request times out. If you make the request again with the
  4704  // same request ID, the server can check if original operation with the same
  4705  // request ID was received, and if so, will ignore the second request. This
  4706  // prevents clients from accidentally creating duplicate commitments. The
  4707  // request ID must be a valid UUID with the exception that zero UUID is not
  4708  // supported (00000000-0000-0000-0000-000000000000).
  4709  func (c *ProjectsLocationsGroupsPatchCall) RequestId(requestId string) *ProjectsLocationsGroupsPatchCall {
  4710  	c.urlParams_.Set("requestId", requestId)
  4711  	return c
  4712  }
  4713  
  4714  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  4715  // specify the fields to be overwritten in the Group resource by the update.
  4716  // The fields specified in the update_mask are relative to the resource, not
  4717  // the full request. A field will be overwritten if it is in the mask. If the
  4718  // user does not provide a mask then all fields will be overwritten.
  4719  func (c *ProjectsLocationsGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGroupsPatchCall {
  4720  	c.urlParams_.Set("updateMask", updateMask)
  4721  	return c
  4722  }
  4723  
  4724  // Fields allows partial responses to be retrieved. See
  4725  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4726  // details.
  4727  func (c *ProjectsLocationsGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsPatchCall {
  4728  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4729  	return c
  4730  }
  4731  
  4732  // Context sets the context to be used in this call's Do method.
  4733  func (c *ProjectsLocationsGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsGroupsPatchCall {
  4734  	c.ctx_ = ctx
  4735  	return c
  4736  }
  4737  
  4738  // Header returns a http.Header that can be modified by the caller to add
  4739  // headers to the request.
  4740  func (c *ProjectsLocationsGroupsPatchCall) Header() http.Header {
  4741  	if c.header_ == nil {
  4742  		c.header_ = make(http.Header)
  4743  	}
  4744  	return c.header_
  4745  }
  4746  
  4747  func (c *ProjectsLocationsGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
  4748  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4749  	var body io.Reader = nil
  4750  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
  4751  	if err != nil {
  4752  		return nil, err
  4753  	}
  4754  	c.urlParams_.Set("alt", alt)
  4755  	c.urlParams_.Set("prettyPrint", "false")
  4756  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4757  	urls += "?" + c.urlParams_.Encode()
  4758  	req, err := http.NewRequest("PATCH", urls, body)
  4759  	if err != nil {
  4760  		return nil, err
  4761  	}
  4762  	req.Header = reqHeaders
  4763  	googleapi.Expand(req.URL, map[string]string{
  4764  		"name": c.name,
  4765  	})
  4766  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4767  }
  4768  
  4769  // Do executes the "vmmigration.projects.locations.groups.patch" call.
  4770  // Any non-2xx status code is an error. Response headers are in either
  4771  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4772  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4773  // whether the returned error was because http.StatusNotModified was returned.
  4774  func (c *ProjectsLocationsGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4775  	gensupport.SetOptions(c.urlParams_, opts...)
  4776  	res, err := c.doRequest("json")
  4777  	if res != nil && res.StatusCode == http.StatusNotModified {
  4778  		if res.Body != nil {
  4779  			res.Body.Close()
  4780  		}
  4781  		return nil, gensupport.WrapError(&googleapi.Error{
  4782  			Code:   res.StatusCode,
  4783  			Header: res.Header,
  4784  		})
  4785  	}
  4786  	if err != nil {
  4787  		return nil, err
  4788  	}
  4789  	defer googleapi.CloseBody(res)
  4790  	if err := googleapi.CheckResponse(res); err != nil {
  4791  		return nil, gensupport.WrapError(err)
  4792  	}
  4793  	ret := &Operation{
  4794  		ServerResponse: googleapi.ServerResponse{
  4795  			Header:         res.Header,
  4796  			HTTPStatusCode: res.StatusCode,
  4797  		},
  4798  	}
  4799  	target := &ret
  4800  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4801  		return nil, err
  4802  	}
  4803  	return ret, nil
  4804  }
  4805  
  4806  type ProjectsLocationsGroupsRemoveGroupMigrationCall struct {
  4807  	s                           *Service
  4808  	group                       string
  4809  	removegroupmigrationrequest *RemoveGroupMigrationRequest
  4810  	urlParams_                  gensupport.URLParams
  4811  	ctx_                        context.Context
  4812  	header_                     http.Header
  4813  }
  4814  
  4815  // RemoveGroupMigration: Removes a MigratingVm from a Group.
  4816  //
  4817  // - group: The name of the Group.
  4818  func (r *ProjectsLocationsGroupsService) RemoveGroupMigration(group string, removegroupmigrationrequest *RemoveGroupMigrationRequest) *ProjectsLocationsGroupsRemoveGroupMigrationCall {
  4819  	c := &ProjectsLocationsGroupsRemoveGroupMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4820  	c.group = group
  4821  	c.removegroupmigrationrequest = removegroupmigrationrequest
  4822  	return c
  4823  }
  4824  
  4825  // Fields allows partial responses to be retrieved. See
  4826  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4827  // details.
  4828  func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroupsRemoveGroupMigrationCall {
  4829  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4830  	return c
  4831  }
  4832  
  4833  // Context sets the context to be used in this call's Do method.
  4834  func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Context(ctx context.Context) *ProjectsLocationsGroupsRemoveGroupMigrationCall {
  4835  	c.ctx_ = ctx
  4836  	return c
  4837  }
  4838  
  4839  // Header returns a http.Header that can be modified by the caller to add
  4840  // headers to the request.
  4841  func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Header() http.Header {
  4842  	if c.header_ == nil {
  4843  		c.header_ = make(http.Header)
  4844  	}
  4845  	return c.header_
  4846  }
  4847  
  4848  func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) doRequest(alt string) (*http.Response, error) {
  4849  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4850  	var body io.Reader = nil
  4851  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.removegroupmigrationrequest)
  4852  	if err != nil {
  4853  		return nil, err
  4854  	}
  4855  	c.urlParams_.Set("alt", alt)
  4856  	c.urlParams_.Set("prettyPrint", "false")
  4857  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+group}:removeGroupMigration")
  4858  	urls += "?" + c.urlParams_.Encode()
  4859  	req, err := http.NewRequest("POST", urls, body)
  4860  	if err != nil {
  4861  		return nil, err
  4862  	}
  4863  	req.Header = reqHeaders
  4864  	googleapi.Expand(req.URL, map[string]string{
  4865  		"group": c.group,
  4866  	})
  4867  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4868  }
  4869  
  4870  // Do executes the "vmmigration.projects.locations.groups.removeGroupMigration" call.
  4871  // Any non-2xx status code is an error. Response headers are in either
  4872  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4873  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4874  // whether the returned error was because http.StatusNotModified was returned.
  4875  func (c *ProjectsLocationsGroupsRemoveGroupMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4876  	gensupport.SetOptions(c.urlParams_, opts...)
  4877  	res, err := c.doRequest("json")
  4878  	if res != nil && res.StatusCode == http.StatusNotModified {
  4879  		if res.Body != nil {
  4880  			res.Body.Close()
  4881  		}
  4882  		return nil, gensupport.WrapError(&googleapi.Error{
  4883  			Code:   res.StatusCode,
  4884  			Header: res.Header,
  4885  		})
  4886  	}
  4887  	if err != nil {
  4888  		return nil, err
  4889  	}
  4890  	defer googleapi.CloseBody(res)
  4891  	if err := googleapi.CheckResponse(res); err != nil {
  4892  		return nil, gensupport.WrapError(err)
  4893  	}
  4894  	ret := &Operation{
  4895  		ServerResponse: googleapi.ServerResponse{
  4896  			Header:         res.Header,
  4897  			HTTPStatusCode: res.StatusCode,
  4898  		},
  4899  	}
  4900  	target := &ret
  4901  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4902  		return nil, err
  4903  	}
  4904  	return ret, nil
  4905  }
  4906  
  4907  type ProjectsLocationsImageImportsCreateCall struct {
  4908  	s           *Service
  4909  	parent      string
  4910  	imageimport *ImageImport
  4911  	urlParams_  gensupport.URLParams
  4912  	ctx_        context.Context
  4913  	header_     http.Header
  4914  }
  4915  
  4916  // Create: Creates a new ImageImport in a given project.
  4917  //
  4918  // - parent: The ImageImport's parent.
  4919  func (r *ProjectsLocationsImageImportsService) Create(parent string, imageimport *ImageImport) *ProjectsLocationsImageImportsCreateCall {
  4920  	c := &ProjectsLocationsImageImportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4921  	c.parent = parent
  4922  	c.imageimport = imageimport
  4923  	return c
  4924  }
  4925  
  4926  // ImageImportId sets the optional parameter "imageImportId": Required. The
  4927  // image import identifier. This value maximum length is 63 characters, and
  4928  // valid characters are /a-z-/. It must start with an english letter and must
  4929  // not end with a hyphen.
  4930  func (c *ProjectsLocationsImageImportsCreateCall) ImageImportId(imageImportId string) *ProjectsLocationsImageImportsCreateCall {
  4931  	c.urlParams_.Set("imageImportId", imageImportId)
  4932  	return c
  4933  }
  4934  
  4935  // RequestId sets the optional parameter "requestId": A request ID to identify
  4936  // requests. Specify a unique request ID so that if you must retry your
  4937  // request, the server will know to ignore the request if it has already been
  4938  // completed. The server will guarantee that for at least 60 minutes since the
  4939  // first request. For example, consider a situation where you make an initial
  4940  // request and the request times out. If you make the request again with the
  4941  // same request ID, the server can check if original operation with the same
  4942  // request ID was received, and if so, will ignore the second request. This
  4943  // prevents clients from accidentally creating duplicate commitments. The
  4944  // request ID must be a valid UUID with the exception that zero UUID is not
  4945  // supported (00000000-0000-0000-0000-000000000000).
  4946  func (c *ProjectsLocationsImageImportsCreateCall) RequestId(requestId string) *ProjectsLocationsImageImportsCreateCall {
  4947  	c.urlParams_.Set("requestId", requestId)
  4948  	return c
  4949  }
  4950  
  4951  // Fields allows partial responses to be retrieved. See
  4952  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4953  // details.
  4954  func (c *ProjectsLocationsImageImportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsCreateCall {
  4955  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4956  	return c
  4957  }
  4958  
  4959  // Context sets the context to be used in this call's Do method.
  4960  func (c *ProjectsLocationsImageImportsCreateCall) Context(ctx context.Context) *ProjectsLocationsImageImportsCreateCall {
  4961  	c.ctx_ = ctx
  4962  	return c
  4963  }
  4964  
  4965  // Header returns a http.Header that can be modified by the caller to add
  4966  // headers to the request.
  4967  func (c *ProjectsLocationsImageImportsCreateCall) Header() http.Header {
  4968  	if c.header_ == nil {
  4969  		c.header_ = make(http.Header)
  4970  	}
  4971  	return c.header_
  4972  }
  4973  
  4974  func (c *ProjectsLocationsImageImportsCreateCall) doRequest(alt string) (*http.Response, error) {
  4975  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4976  	var body io.Reader = nil
  4977  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.imageimport)
  4978  	if err != nil {
  4979  		return nil, err
  4980  	}
  4981  	c.urlParams_.Set("alt", alt)
  4982  	c.urlParams_.Set("prettyPrint", "false")
  4983  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/imageImports")
  4984  	urls += "?" + c.urlParams_.Encode()
  4985  	req, err := http.NewRequest("POST", urls, body)
  4986  	if err != nil {
  4987  		return nil, err
  4988  	}
  4989  	req.Header = reqHeaders
  4990  	googleapi.Expand(req.URL, map[string]string{
  4991  		"parent": c.parent,
  4992  	})
  4993  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4994  }
  4995  
  4996  // Do executes the "vmmigration.projects.locations.imageImports.create" call.
  4997  // Any non-2xx status code is an error. Response headers are in either
  4998  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4999  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5000  // whether the returned error was because http.StatusNotModified was returned.
  5001  func (c *ProjectsLocationsImageImportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5002  	gensupport.SetOptions(c.urlParams_, opts...)
  5003  	res, err := c.doRequest("json")
  5004  	if res != nil && res.StatusCode == http.StatusNotModified {
  5005  		if res.Body != nil {
  5006  			res.Body.Close()
  5007  		}
  5008  		return nil, gensupport.WrapError(&googleapi.Error{
  5009  			Code:   res.StatusCode,
  5010  			Header: res.Header,
  5011  		})
  5012  	}
  5013  	if err != nil {
  5014  		return nil, err
  5015  	}
  5016  	defer googleapi.CloseBody(res)
  5017  	if err := googleapi.CheckResponse(res); err != nil {
  5018  		return nil, gensupport.WrapError(err)
  5019  	}
  5020  	ret := &Operation{
  5021  		ServerResponse: googleapi.ServerResponse{
  5022  			Header:         res.Header,
  5023  			HTTPStatusCode: res.StatusCode,
  5024  		},
  5025  	}
  5026  	target := &ret
  5027  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5028  		return nil, err
  5029  	}
  5030  	return ret, nil
  5031  }
  5032  
  5033  type ProjectsLocationsImageImportsDeleteCall struct {
  5034  	s          *Service
  5035  	name       string
  5036  	urlParams_ gensupport.URLParams
  5037  	ctx_       context.Context
  5038  	header_    http.Header
  5039  }
  5040  
  5041  // Delete: Deletes a single ImageImport.
  5042  //
  5043  // - name: The ImageImport name.
  5044  func (r *ProjectsLocationsImageImportsService) Delete(name string) *ProjectsLocationsImageImportsDeleteCall {
  5045  	c := &ProjectsLocationsImageImportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5046  	c.name = name
  5047  	return c
  5048  }
  5049  
  5050  // RequestId sets the optional parameter "requestId": A request ID to identify
  5051  // requests. Specify a unique request ID so that if you must retry your
  5052  // request, the server will know to ignore the request if it has already been
  5053  // completed. The server will guarantee that for at least 60 minutes after the
  5054  // first request. For example, consider a situation where you make an initial
  5055  // request and t he request times out. If you make the request again with the
  5056  // same request ID, the server can check if original operation with the same
  5057  // request ID was received, and if so, will ignore the second request. This
  5058  // prevents clients from accidentally creating duplicate commitments. The
  5059  // request ID must be a valid UUID with the exception that zero UUID is not
  5060  // supported (00000000-0000-0000-0000-000000000000).
  5061  func (c *ProjectsLocationsImageImportsDeleteCall) RequestId(requestId string) *ProjectsLocationsImageImportsDeleteCall {
  5062  	c.urlParams_.Set("requestId", requestId)
  5063  	return c
  5064  }
  5065  
  5066  // Fields allows partial responses to be retrieved. See
  5067  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5068  // details.
  5069  func (c *ProjectsLocationsImageImportsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsDeleteCall {
  5070  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5071  	return c
  5072  }
  5073  
  5074  // Context sets the context to be used in this call's Do method.
  5075  func (c *ProjectsLocationsImageImportsDeleteCall) Context(ctx context.Context) *ProjectsLocationsImageImportsDeleteCall {
  5076  	c.ctx_ = ctx
  5077  	return c
  5078  }
  5079  
  5080  // Header returns a http.Header that can be modified by the caller to add
  5081  // headers to the request.
  5082  func (c *ProjectsLocationsImageImportsDeleteCall) Header() http.Header {
  5083  	if c.header_ == nil {
  5084  		c.header_ = make(http.Header)
  5085  	}
  5086  	return c.header_
  5087  }
  5088  
  5089  func (c *ProjectsLocationsImageImportsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5090  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5091  	var body io.Reader = nil
  5092  	c.urlParams_.Set("alt", alt)
  5093  	c.urlParams_.Set("prettyPrint", "false")
  5094  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5095  	urls += "?" + c.urlParams_.Encode()
  5096  	req, err := http.NewRequest("DELETE", urls, body)
  5097  	if err != nil {
  5098  		return nil, err
  5099  	}
  5100  	req.Header = reqHeaders
  5101  	googleapi.Expand(req.URL, map[string]string{
  5102  		"name": c.name,
  5103  	})
  5104  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5105  }
  5106  
  5107  // Do executes the "vmmigration.projects.locations.imageImports.delete" call.
  5108  // Any non-2xx status code is an error. Response headers are in either
  5109  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5110  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5111  // whether the returned error was because http.StatusNotModified was returned.
  5112  func (c *ProjectsLocationsImageImportsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5113  	gensupport.SetOptions(c.urlParams_, opts...)
  5114  	res, err := c.doRequest("json")
  5115  	if res != nil && res.StatusCode == http.StatusNotModified {
  5116  		if res.Body != nil {
  5117  			res.Body.Close()
  5118  		}
  5119  		return nil, gensupport.WrapError(&googleapi.Error{
  5120  			Code:   res.StatusCode,
  5121  			Header: res.Header,
  5122  		})
  5123  	}
  5124  	if err != nil {
  5125  		return nil, err
  5126  	}
  5127  	defer googleapi.CloseBody(res)
  5128  	if err := googleapi.CheckResponse(res); err != nil {
  5129  		return nil, gensupport.WrapError(err)
  5130  	}
  5131  	ret := &Operation{
  5132  		ServerResponse: googleapi.ServerResponse{
  5133  			Header:         res.Header,
  5134  			HTTPStatusCode: res.StatusCode,
  5135  		},
  5136  	}
  5137  	target := &ret
  5138  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5139  		return nil, err
  5140  	}
  5141  	return ret, nil
  5142  }
  5143  
  5144  type ProjectsLocationsImageImportsGetCall struct {
  5145  	s            *Service
  5146  	name         string
  5147  	urlParams_   gensupport.URLParams
  5148  	ifNoneMatch_ string
  5149  	ctx_         context.Context
  5150  	header_      http.Header
  5151  }
  5152  
  5153  // Get: Gets details of a single ImageImport.
  5154  //
  5155  // - name: The ImageImport name.
  5156  func (r *ProjectsLocationsImageImportsService) Get(name string) *ProjectsLocationsImageImportsGetCall {
  5157  	c := &ProjectsLocationsImageImportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5158  	c.name = name
  5159  	return c
  5160  }
  5161  
  5162  // Fields allows partial responses to be retrieved. See
  5163  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5164  // details.
  5165  func (c *ProjectsLocationsImageImportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsGetCall {
  5166  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5167  	return c
  5168  }
  5169  
  5170  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5171  // object's ETag matches the given value. This is useful for getting updates
  5172  // only after the object has changed since the last request.
  5173  func (c *ProjectsLocationsImageImportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsGetCall {
  5174  	c.ifNoneMatch_ = entityTag
  5175  	return c
  5176  }
  5177  
  5178  // Context sets the context to be used in this call's Do method.
  5179  func (c *ProjectsLocationsImageImportsGetCall) Context(ctx context.Context) *ProjectsLocationsImageImportsGetCall {
  5180  	c.ctx_ = ctx
  5181  	return c
  5182  }
  5183  
  5184  // Header returns a http.Header that can be modified by the caller to add
  5185  // headers to the request.
  5186  func (c *ProjectsLocationsImageImportsGetCall) Header() http.Header {
  5187  	if c.header_ == nil {
  5188  		c.header_ = make(http.Header)
  5189  	}
  5190  	return c.header_
  5191  }
  5192  
  5193  func (c *ProjectsLocationsImageImportsGetCall) doRequest(alt string) (*http.Response, error) {
  5194  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5195  	if c.ifNoneMatch_ != "" {
  5196  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5197  	}
  5198  	var body io.Reader = nil
  5199  	c.urlParams_.Set("alt", alt)
  5200  	c.urlParams_.Set("prettyPrint", "false")
  5201  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5202  	urls += "?" + c.urlParams_.Encode()
  5203  	req, err := http.NewRequest("GET", urls, body)
  5204  	if err != nil {
  5205  		return nil, err
  5206  	}
  5207  	req.Header = reqHeaders
  5208  	googleapi.Expand(req.URL, map[string]string{
  5209  		"name": c.name,
  5210  	})
  5211  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5212  }
  5213  
  5214  // Do executes the "vmmigration.projects.locations.imageImports.get" call.
  5215  // Any non-2xx status code is an error. Response headers are in either
  5216  // *ImageImport.ServerResponse.Header or (if a response was returned at all) in
  5217  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5218  // whether the returned error was because http.StatusNotModified was returned.
  5219  func (c *ProjectsLocationsImageImportsGetCall) Do(opts ...googleapi.CallOption) (*ImageImport, error) {
  5220  	gensupport.SetOptions(c.urlParams_, opts...)
  5221  	res, err := c.doRequest("json")
  5222  	if res != nil && res.StatusCode == http.StatusNotModified {
  5223  		if res.Body != nil {
  5224  			res.Body.Close()
  5225  		}
  5226  		return nil, gensupport.WrapError(&googleapi.Error{
  5227  			Code:   res.StatusCode,
  5228  			Header: res.Header,
  5229  		})
  5230  	}
  5231  	if err != nil {
  5232  		return nil, err
  5233  	}
  5234  	defer googleapi.CloseBody(res)
  5235  	if err := googleapi.CheckResponse(res); err != nil {
  5236  		return nil, gensupport.WrapError(err)
  5237  	}
  5238  	ret := &ImageImport{
  5239  		ServerResponse: googleapi.ServerResponse{
  5240  			Header:         res.Header,
  5241  			HTTPStatusCode: res.StatusCode,
  5242  		},
  5243  	}
  5244  	target := &ret
  5245  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5246  		return nil, err
  5247  	}
  5248  	return ret, nil
  5249  }
  5250  
  5251  type ProjectsLocationsImageImportsListCall struct {
  5252  	s            *Service
  5253  	parent       string
  5254  	urlParams_   gensupport.URLParams
  5255  	ifNoneMatch_ string
  5256  	ctx_         context.Context
  5257  	header_      http.Header
  5258  }
  5259  
  5260  // List: Lists ImageImports in a given project.
  5261  //
  5262  // - parent: The parent, which owns this collection of targets.
  5263  func (r *ProjectsLocationsImageImportsService) List(parent string) *ProjectsLocationsImageImportsListCall {
  5264  	c := &ProjectsLocationsImageImportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5265  	c.parent = parent
  5266  	return c
  5267  }
  5268  
  5269  // Filter sets the optional parameter "filter": The filter request (according
  5270  // to https://google.aip.dev/160).
  5271  func (c *ProjectsLocationsImageImportsListCall) Filter(filter string) *ProjectsLocationsImageImportsListCall {
  5272  	c.urlParams_.Set("filter", filter)
  5273  	return c
  5274  }
  5275  
  5276  // OrderBy sets the optional parameter "orderBy": The order by fields for the
  5277  // result (according to https://google.aip.dev/132#ordering). Currently
  5278  // ordering is only possible by "name" field.
  5279  func (c *ProjectsLocationsImageImportsListCall) OrderBy(orderBy string) *ProjectsLocationsImageImportsListCall {
  5280  	c.urlParams_.Set("orderBy", orderBy)
  5281  	return c
  5282  }
  5283  
  5284  // PageSize sets the optional parameter "pageSize": The maximum number of
  5285  // targets to return. The service may return fewer than this value. If
  5286  // unspecified, at most 500 targets will be returned. The maximum value is
  5287  // 1000; values above 1000 will be coerced to 1000.
  5288  func (c *ProjectsLocationsImageImportsListCall) PageSize(pageSize int64) *ProjectsLocationsImageImportsListCall {
  5289  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5290  	return c
  5291  }
  5292  
  5293  // PageToken sets the optional parameter "pageToken": A page token, received
  5294  // from a previous `ListImageImports` call. Provide this to retrieve the
  5295  // subsequent page. When paginating, all other parameters provided to
  5296  // `ListImageImports` must match the call that provided the page token.
  5297  func (c *ProjectsLocationsImageImportsListCall) PageToken(pageToken string) *ProjectsLocationsImageImportsListCall {
  5298  	c.urlParams_.Set("pageToken", pageToken)
  5299  	return c
  5300  }
  5301  
  5302  // Fields allows partial responses to be retrieved. See
  5303  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5304  // details.
  5305  func (c *ProjectsLocationsImageImportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsListCall {
  5306  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5307  	return c
  5308  }
  5309  
  5310  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5311  // object's ETag matches the given value. This is useful for getting updates
  5312  // only after the object has changed since the last request.
  5313  func (c *ProjectsLocationsImageImportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsListCall {
  5314  	c.ifNoneMatch_ = entityTag
  5315  	return c
  5316  }
  5317  
  5318  // Context sets the context to be used in this call's Do method.
  5319  func (c *ProjectsLocationsImageImportsListCall) Context(ctx context.Context) *ProjectsLocationsImageImportsListCall {
  5320  	c.ctx_ = ctx
  5321  	return c
  5322  }
  5323  
  5324  // Header returns a http.Header that can be modified by the caller to add
  5325  // headers to the request.
  5326  func (c *ProjectsLocationsImageImportsListCall) Header() http.Header {
  5327  	if c.header_ == nil {
  5328  		c.header_ = make(http.Header)
  5329  	}
  5330  	return c.header_
  5331  }
  5332  
  5333  func (c *ProjectsLocationsImageImportsListCall) doRequest(alt string) (*http.Response, error) {
  5334  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5335  	if c.ifNoneMatch_ != "" {
  5336  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5337  	}
  5338  	var body io.Reader = nil
  5339  	c.urlParams_.Set("alt", alt)
  5340  	c.urlParams_.Set("prettyPrint", "false")
  5341  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/imageImports")
  5342  	urls += "?" + c.urlParams_.Encode()
  5343  	req, err := http.NewRequest("GET", urls, body)
  5344  	if err != nil {
  5345  		return nil, err
  5346  	}
  5347  	req.Header = reqHeaders
  5348  	googleapi.Expand(req.URL, map[string]string{
  5349  		"parent": c.parent,
  5350  	})
  5351  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5352  }
  5353  
  5354  // Do executes the "vmmigration.projects.locations.imageImports.list" call.
  5355  // Any non-2xx status code is an error. Response headers are in either
  5356  // *ListImageImportsResponse.ServerResponse.Header or (if a response was
  5357  // returned at all) in error.(*googleapi.Error).Header. Use
  5358  // googleapi.IsNotModified to check whether the returned error was because
  5359  // http.StatusNotModified was returned.
  5360  func (c *ProjectsLocationsImageImportsListCall) Do(opts ...googleapi.CallOption) (*ListImageImportsResponse, error) {
  5361  	gensupport.SetOptions(c.urlParams_, opts...)
  5362  	res, err := c.doRequest("json")
  5363  	if res != nil && res.StatusCode == http.StatusNotModified {
  5364  		if res.Body != nil {
  5365  			res.Body.Close()
  5366  		}
  5367  		return nil, gensupport.WrapError(&googleapi.Error{
  5368  			Code:   res.StatusCode,
  5369  			Header: res.Header,
  5370  		})
  5371  	}
  5372  	if err != nil {
  5373  		return nil, err
  5374  	}
  5375  	defer googleapi.CloseBody(res)
  5376  	if err := googleapi.CheckResponse(res); err != nil {
  5377  		return nil, gensupport.WrapError(err)
  5378  	}
  5379  	ret := &ListImageImportsResponse{
  5380  		ServerResponse: googleapi.ServerResponse{
  5381  			Header:         res.Header,
  5382  			HTTPStatusCode: res.StatusCode,
  5383  		},
  5384  	}
  5385  	target := &ret
  5386  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5387  		return nil, err
  5388  	}
  5389  	return ret, nil
  5390  }
  5391  
  5392  // Pages invokes f for each page of results.
  5393  // A non-nil error returned from f will halt the iteration.
  5394  // The provided context supersedes any context provided to the Context method.
  5395  func (c *ProjectsLocationsImageImportsListCall) Pages(ctx context.Context, f func(*ListImageImportsResponse) error) error {
  5396  	c.ctx_ = ctx
  5397  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5398  	for {
  5399  		x, err := c.Do()
  5400  		if err != nil {
  5401  			return err
  5402  		}
  5403  		if err := f(x); err != nil {
  5404  			return err
  5405  		}
  5406  		if x.NextPageToken == "" {
  5407  			return nil
  5408  		}
  5409  		c.PageToken(x.NextPageToken)
  5410  	}
  5411  }
  5412  
  5413  type ProjectsLocationsImageImportsImageImportJobsCancelCall struct {
  5414  	s                           *Service
  5415  	name                        string
  5416  	cancelimageimportjobrequest *CancelImageImportJobRequest
  5417  	urlParams_                  gensupport.URLParams
  5418  	ctx_                        context.Context
  5419  	header_                     http.Header
  5420  }
  5421  
  5422  // Cancel: Initiates the cancellation of a running clone job.
  5423  //
  5424  // - name: The image import job id.
  5425  func (r *ProjectsLocationsImageImportsImageImportJobsService) Cancel(name string, cancelimageimportjobrequest *CancelImageImportJobRequest) *ProjectsLocationsImageImportsImageImportJobsCancelCall {
  5426  	c := &ProjectsLocationsImageImportsImageImportJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5427  	c.name = name
  5428  	c.cancelimageimportjobrequest = cancelimageimportjobrequest
  5429  	return c
  5430  }
  5431  
  5432  // Fields allows partial responses to be retrieved. See
  5433  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5434  // details.
  5435  func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsImageImportJobsCancelCall {
  5436  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5437  	return c
  5438  }
  5439  
  5440  // Context sets the context to be used in this call's Do method.
  5441  func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsImageImportsImageImportJobsCancelCall {
  5442  	c.ctx_ = ctx
  5443  	return c
  5444  }
  5445  
  5446  // Header returns a http.Header that can be modified by the caller to add
  5447  // headers to the request.
  5448  func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) Header() http.Header {
  5449  	if c.header_ == nil {
  5450  		c.header_ = make(http.Header)
  5451  	}
  5452  	return c.header_
  5453  }
  5454  
  5455  func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) doRequest(alt string) (*http.Response, error) {
  5456  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5457  	var body io.Reader = nil
  5458  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelimageimportjobrequest)
  5459  	if err != nil {
  5460  		return nil, err
  5461  	}
  5462  	c.urlParams_.Set("alt", alt)
  5463  	c.urlParams_.Set("prettyPrint", "false")
  5464  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  5465  	urls += "?" + c.urlParams_.Encode()
  5466  	req, err := http.NewRequest("POST", urls, body)
  5467  	if err != nil {
  5468  		return nil, err
  5469  	}
  5470  	req.Header = reqHeaders
  5471  	googleapi.Expand(req.URL, map[string]string{
  5472  		"name": c.name,
  5473  	})
  5474  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5475  }
  5476  
  5477  // Do executes the "vmmigration.projects.locations.imageImports.imageImportJobs.cancel" call.
  5478  // Any non-2xx status code is an error. Response headers are in either
  5479  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5480  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5481  // whether the returned error was because http.StatusNotModified was returned.
  5482  func (c *ProjectsLocationsImageImportsImageImportJobsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5483  	gensupport.SetOptions(c.urlParams_, opts...)
  5484  	res, err := c.doRequest("json")
  5485  	if res != nil && res.StatusCode == http.StatusNotModified {
  5486  		if res.Body != nil {
  5487  			res.Body.Close()
  5488  		}
  5489  		return nil, gensupport.WrapError(&googleapi.Error{
  5490  			Code:   res.StatusCode,
  5491  			Header: res.Header,
  5492  		})
  5493  	}
  5494  	if err != nil {
  5495  		return nil, err
  5496  	}
  5497  	defer googleapi.CloseBody(res)
  5498  	if err := googleapi.CheckResponse(res); err != nil {
  5499  		return nil, gensupport.WrapError(err)
  5500  	}
  5501  	ret := &Operation{
  5502  		ServerResponse: googleapi.ServerResponse{
  5503  			Header:         res.Header,
  5504  			HTTPStatusCode: res.StatusCode,
  5505  		},
  5506  	}
  5507  	target := &ret
  5508  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5509  		return nil, err
  5510  	}
  5511  	return ret, nil
  5512  }
  5513  
  5514  type ProjectsLocationsImageImportsImageImportJobsGetCall struct {
  5515  	s            *Service
  5516  	name         string
  5517  	urlParams_   gensupport.URLParams
  5518  	ifNoneMatch_ string
  5519  	ctx_         context.Context
  5520  	header_      http.Header
  5521  }
  5522  
  5523  // Get: Gets details of a single ImageImportJob.
  5524  //
  5525  // - name: The ImageImportJob name.
  5526  func (r *ProjectsLocationsImageImportsImageImportJobsService) Get(name string) *ProjectsLocationsImageImportsImageImportJobsGetCall {
  5527  	c := &ProjectsLocationsImageImportsImageImportJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5528  	c.name = name
  5529  	return c
  5530  }
  5531  
  5532  // Fields allows partial responses to be retrieved. See
  5533  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5534  // details.
  5535  func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsImageImportJobsGetCall {
  5536  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5537  	return c
  5538  }
  5539  
  5540  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5541  // object's ETag matches the given value. This is useful for getting updates
  5542  // only after the object has changed since the last request.
  5543  func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsImageImportJobsGetCall {
  5544  	c.ifNoneMatch_ = entityTag
  5545  	return c
  5546  }
  5547  
  5548  // Context sets the context to be used in this call's Do method.
  5549  func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) Context(ctx context.Context) *ProjectsLocationsImageImportsImageImportJobsGetCall {
  5550  	c.ctx_ = ctx
  5551  	return c
  5552  }
  5553  
  5554  // Header returns a http.Header that can be modified by the caller to add
  5555  // headers to the request.
  5556  func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) Header() http.Header {
  5557  	if c.header_ == nil {
  5558  		c.header_ = make(http.Header)
  5559  	}
  5560  	return c.header_
  5561  }
  5562  
  5563  func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) doRequest(alt string) (*http.Response, error) {
  5564  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5565  	if c.ifNoneMatch_ != "" {
  5566  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5567  	}
  5568  	var body io.Reader = nil
  5569  	c.urlParams_.Set("alt", alt)
  5570  	c.urlParams_.Set("prettyPrint", "false")
  5571  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5572  	urls += "?" + c.urlParams_.Encode()
  5573  	req, err := http.NewRequest("GET", urls, body)
  5574  	if err != nil {
  5575  		return nil, err
  5576  	}
  5577  	req.Header = reqHeaders
  5578  	googleapi.Expand(req.URL, map[string]string{
  5579  		"name": c.name,
  5580  	})
  5581  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5582  }
  5583  
  5584  // Do executes the "vmmigration.projects.locations.imageImports.imageImportJobs.get" call.
  5585  // Any non-2xx status code is an error. Response headers are in either
  5586  // *ImageImportJob.ServerResponse.Header or (if a response was returned at all)
  5587  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5588  // whether the returned error was because http.StatusNotModified was returned.
  5589  func (c *ProjectsLocationsImageImportsImageImportJobsGetCall) Do(opts ...googleapi.CallOption) (*ImageImportJob, error) {
  5590  	gensupport.SetOptions(c.urlParams_, opts...)
  5591  	res, err := c.doRequest("json")
  5592  	if res != nil && res.StatusCode == http.StatusNotModified {
  5593  		if res.Body != nil {
  5594  			res.Body.Close()
  5595  		}
  5596  		return nil, gensupport.WrapError(&googleapi.Error{
  5597  			Code:   res.StatusCode,
  5598  			Header: res.Header,
  5599  		})
  5600  	}
  5601  	if err != nil {
  5602  		return nil, err
  5603  	}
  5604  	defer googleapi.CloseBody(res)
  5605  	if err := googleapi.CheckResponse(res); err != nil {
  5606  		return nil, gensupport.WrapError(err)
  5607  	}
  5608  	ret := &ImageImportJob{
  5609  		ServerResponse: googleapi.ServerResponse{
  5610  			Header:         res.Header,
  5611  			HTTPStatusCode: res.StatusCode,
  5612  		},
  5613  	}
  5614  	target := &ret
  5615  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5616  		return nil, err
  5617  	}
  5618  	return ret, nil
  5619  }
  5620  
  5621  type ProjectsLocationsImageImportsImageImportJobsListCall struct {
  5622  	s            *Service
  5623  	parent       string
  5624  	urlParams_   gensupport.URLParams
  5625  	ifNoneMatch_ string
  5626  	ctx_         context.Context
  5627  	header_      http.Header
  5628  }
  5629  
  5630  // List: Lists ImageImportJobs in a given project.
  5631  //
  5632  // - parent: The parent, which owns this collection of targets.
  5633  func (r *ProjectsLocationsImageImportsImageImportJobsService) List(parent string) *ProjectsLocationsImageImportsImageImportJobsListCall {
  5634  	c := &ProjectsLocationsImageImportsImageImportJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5635  	c.parent = parent
  5636  	return c
  5637  }
  5638  
  5639  // Filter sets the optional parameter "filter": The filter request (according
  5640  // to https://google.aip.dev/160).
  5641  func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Filter(filter string) *ProjectsLocationsImageImportsImageImportJobsListCall {
  5642  	c.urlParams_.Set("filter", filter)
  5643  	return c
  5644  }
  5645  
  5646  // OrderBy sets the optional parameter "orderBy": The order by fields for the
  5647  // result (according to https://google.aip.dev/132#ordering). Currently
  5648  // ordering is only possible by "name" field.
  5649  func (c *ProjectsLocationsImageImportsImageImportJobsListCall) OrderBy(orderBy string) *ProjectsLocationsImageImportsImageImportJobsListCall {
  5650  	c.urlParams_.Set("orderBy", orderBy)
  5651  	return c
  5652  }
  5653  
  5654  // PageSize sets the optional parameter "pageSize": The maximum number of
  5655  // targets to return. The service may return fewer than this value. If
  5656  // unspecified, at most 500 targets will be returned. The maximum value is
  5657  // 1000; values above 1000 will be coerced to 1000.
  5658  func (c *ProjectsLocationsImageImportsImageImportJobsListCall) PageSize(pageSize int64) *ProjectsLocationsImageImportsImageImportJobsListCall {
  5659  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5660  	return c
  5661  }
  5662  
  5663  // PageToken sets the optional parameter "pageToken": A page token, received
  5664  // from a previous `ListImageImportJobs` call. Provide this to retrieve the
  5665  // subsequent page. When paginating, all other parameters provided to
  5666  // `ListImageImportJobs` must match the call that provided the page token.
  5667  func (c *ProjectsLocationsImageImportsImageImportJobsListCall) PageToken(pageToken string) *ProjectsLocationsImageImportsImageImportJobsListCall {
  5668  	c.urlParams_.Set("pageToken", pageToken)
  5669  	return c
  5670  }
  5671  
  5672  // Fields allows partial responses to be retrieved. See
  5673  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5674  // details.
  5675  func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsImageImportsImageImportJobsListCall {
  5676  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5677  	return c
  5678  }
  5679  
  5680  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5681  // object's ETag matches the given value. This is useful for getting updates
  5682  // only after the object has changed since the last request.
  5683  func (c *ProjectsLocationsImageImportsImageImportJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsImageImportsImageImportJobsListCall {
  5684  	c.ifNoneMatch_ = entityTag
  5685  	return c
  5686  }
  5687  
  5688  // Context sets the context to be used in this call's Do method.
  5689  func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Context(ctx context.Context) *ProjectsLocationsImageImportsImageImportJobsListCall {
  5690  	c.ctx_ = ctx
  5691  	return c
  5692  }
  5693  
  5694  // Header returns a http.Header that can be modified by the caller to add
  5695  // headers to the request.
  5696  func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Header() http.Header {
  5697  	if c.header_ == nil {
  5698  		c.header_ = make(http.Header)
  5699  	}
  5700  	return c.header_
  5701  }
  5702  
  5703  func (c *ProjectsLocationsImageImportsImageImportJobsListCall) doRequest(alt string) (*http.Response, error) {
  5704  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5705  	if c.ifNoneMatch_ != "" {
  5706  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5707  	}
  5708  	var body io.Reader = nil
  5709  	c.urlParams_.Set("alt", alt)
  5710  	c.urlParams_.Set("prettyPrint", "false")
  5711  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/imageImportJobs")
  5712  	urls += "?" + c.urlParams_.Encode()
  5713  	req, err := http.NewRequest("GET", urls, body)
  5714  	if err != nil {
  5715  		return nil, err
  5716  	}
  5717  	req.Header = reqHeaders
  5718  	googleapi.Expand(req.URL, map[string]string{
  5719  		"parent": c.parent,
  5720  	})
  5721  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5722  }
  5723  
  5724  // Do executes the "vmmigration.projects.locations.imageImports.imageImportJobs.list" call.
  5725  // Any non-2xx status code is an error. Response headers are in either
  5726  // *ListImageImportJobsResponse.ServerResponse.Header or (if a response was
  5727  // returned at all) in error.(*googleapi.Error).Header. Use
  5728  // googleapi.IsNotModified to check whether the returned error was because
  5729  // http.StatusNotModified was returned.
  5730  func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Do(opts ...googleapi.CallOption) (*ListImageImportJobsResponse, error) {
  5731  	gensupport.SetOptions(c.urlParams_, opts...)
  5732  	res, err := c.doRequest("json")
  5733  	if res != nil && res.StatusCode == http.StatusNotModified {
  5734  		if res.Body != nil {
  5735  			res.Body.Close()
  5736  		}
  5737  		return nil, gensupport.WrapError(&googleapi.Error{
  5738  			Code:   res.StatusCode,
  5739  			Header: res.Header,
  5740  		})
  5741  	}
  5742  	if err != nil {
  5743  		return nil, err
  5744  	}
  5745  	defer googleapi.CloseBody(res)
  5746  	if err := googleapi.CheckResponse(res); err != nil {
  5747  		return nil, gensupport.WrapError(err)
  5748  	}
  5749  	ret := &ListImageImportJobsResponse{
  5750  		ServerResponse: googleapi.ServerResponse{
  5751  			Header:         res.Header,
  5752  			HTTPStatusCode: res.StatusCode,
  5753  		},
  5754  	}
  5755  	target := &ret
  5756  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5757  		return nil, err
  5758  	}
  5759  	return ret, nil
  5760  }
  5761  
  5762  // Pages invokes f for each page of results.
  5763  // A non-nil error returned from f will halt the iteration.
  5764  // The provided context supersedes any context provided to the Context method.
  5765  func (c *ProjectsLocationsImageImportsImageImportJobsListCall) Pages(ctx context.Context, f func(*ListImageImportJobsResponse) error) error {
  5766  	c.ctx_ = ctx
  5767  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5768  	for {
  5769  		x, err := c.Do()
  5770  		if err != nil {
  5771  			return err
  5772  		}
  5773  		if err := f(x); err != nil {
  5774  			return err
  5775  		}
  5776  		if x.NextPageToken == "" {
  5777  			return nil
  5778  		}
  5779  		c.PageToken(x.NextPageToken)
  5780  	}
  5781  }
  5782  
  5783  type ProjectsLocationsOperationsCancelCall struct {
  5784  	s                      *Service
  5785  	name                   string
  5786  	canceloperationrequest *CancelOperationRequest
  5787  	urlParams_             gensupport.URLParams
  5788  	ctx_                   context.Context
  5789  	header_                http.Header
  5790  }
  5791  
  5792  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  5793  // server makes a best effort to cancel the operation, but success is not
  5794  // guaranteed. If the server doesn't support this method, it returns
  5795  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  5796  // other methods to check whether the cancellation succeeded or whether the
  5797  // operation completed despite cancellation. On successful cancellation, the
  5798  // operation is not deleted; instead, it becomes an operation with an
  5799  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  5800  // `Code.CANCELLED`.
  5801  //
  5802  // - name: The name of the operation resource to be cancelled.
  5803  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  5804  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5805  	c.name = name
  5806  	c.canceloperationrequest = canceloperationrequest
  5807  	return c
  5808  }
  5809  
  5810  // Fields allows partial responses to be retrieved. See
  5811  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5812  // details.
  5813  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  5814  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5815  	return c
  5816  }
  5817  
  5818  // Context sets the context to be used in this call's Do method.
  5819  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  5820  	c.ctx_ = ctx
  5821  	return c
  5822  }
  5823  
  5824  // Header returns a http.Header that can be modified by the caller to add
  5825  // headers to the request.
  5826  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  5827  	if c.header_ == nil {
  5828  		c.header_ = make(http.Header)
  5829  	}
  5830  	return c.header_
  5831  }
  5832  
  5833  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  5834  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5835  	var body io.Reader = nil
  5836  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  5837  	if err != nil {
  5838  		return nil, err
  5839  	}
  5840  	c.urlParams_.Set("alt", alt)
  5841  	c.urlParams_.Set("prettyPrint", "false")
  5842  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  5843  	urls += "?" + c.urlParams_.Encode()
  5844  	req, err := http.NewRequest("POST", urls, body)
  5845  	if err != nil {
  5846  		return nil, err
  5847  	}
  5848  	req.Header = reqHeaders
  5849  	googleapi.Expand(req.URL, map[string]string{
  5850  		"name": c.name,
  5851  	})
  5852  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5853  }
  5854  
  5855  // Do executes the "vmmigration.projects.locations.operations.cancel" call.
  5856  // Any non-2xx status code is an error. Response headers are in either
  5857  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5858  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5859  // whether the returned error was because http.StatusNotModified was returned.
  5860  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5861  	gensupport.SetOptions(c.urlParams_, opts...)
  5862  	res, err := c.doRequest("json")
  5863  	if res != nil && res.StatusCode == http.StatusNotModified {
  5864  		if res.Body != nil {
  5865  			res.Body.Close()
  5866  		}
  5867  		return nil, gensupport.WrapError(&googleapi.Error{
  5868  			Code:   res.StatusCode,
  5869  			Header: res.Header,
  5870  		})
  5871  	}
  5872  	if err != nil {
  5873  		return nil, err
  5874  	}
  5875  	defer googleapi.CloseBody(res)
  5876  	if err := googleapi.CheckResponse(res); err != nil {
  5877  		return nil, gensupport.WrapError(err)
  5878  	}
  5879  	ret := &Empty{
  5880  		ServerResponse: googleapi.ServerResponse{
  5881  			Header:         res.Header,
  5882  			HTTPStatusCode: res.StatusCode,
  5883  		},
  5884  	}
  5885  	target := &ret
  5886  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5887  		return nil, err
  5888  	}
  5889  	return ret, nil
  5890  }
  5891  
  5892  type ProjectsLocationsOperationsDeleteCall struct {
  5893  	s          *Service
  5894  	name       string
  5895  	urlParams_ gensupport.URLParams
  5896  	ctx_       context.Context
  5897  	header_    http.Header
  5898  }
  5899  
  5900  // Delete: Deletes a long-running operation. This method indicates that the
  5901  // client is no longer interested in the operation result. It does not cancel
  5902  // the operation. If the server doesn't support this method, it returns
  5903  // `google.rpc.Code.UNIMPLEMENTED`.
  5904  //
  5905  // - name: The name of the operation resource to be deleted.
  5906  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  5907  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5908  	c.name = name
  5909  	return c
  5910  }
  5911  
  5912  // Fields allows partial responses to be retrieved. See
  5913  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5914  // details.
  5915  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  5916  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5917  	return c
  5918  }
  5919  
  5920  // Context sets the context to be used in this call's Do method.
  5921  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  5922  	c.ctx_ = ctx
  5923  	return c
  5924  }
  5925  
  5926  // Header returns a http.Header that can be modified by the caller to add
  5927  // headers to the request.
  5928  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  5929  	if c.header_ == nil {
  5930  		c.header_ = make(http.Header)
  5931  	}
  5932  	return c.header_
  5933  }
  5934  
  5935  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5936  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5937  	var body io.Reader = nil
  5938  	c.urlParams_.Set("alt", alt)
  5939  	c.urlParams_.Set("prettyPrint", "false")
  5940  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5941  	urls += "?" + c.urlParams_.Encode()
  5942  	req, err := http.NewRequest("DELETE", urls, body)
  5943  	if err != nil {
  5944  		return nil, err
  5945  	}
  5946  	req.Header = reqHeaders
  5947  	googleapi.Expand(req.URL, map[string]string{
  5948  		"name": c.name,
  5949  	})
  5950  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5951  }
  5952  
  5953  // Do executes the "vmmigration.projects.locations.operations.delete" call.
  5954  // Any non-2xx status code is an error. Response headers are in either
  5955  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  5956  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5957  // whether the returned error was because http.StatusNotModified was returned.
  5958  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5959  	gensupport.SetOptions(c.urlParams_, opts...)
  5960  	res, err := c.doRequest("json")
  5961  	if res != nil && res.StatusCode == http.StatusNotModified {
  5962  		if res.Body != nil {
  5963  			res.Body.Close()
  5964  		}
  5965  		return nil, gensupport.WrapError(&googleapi.Error{
  5966  			Code:   res.StatusCode,
  5967  			Header: res.Header,
  5968  		})
  5969  	}
  5970  	if err != nil {
  5971  		return nil, err
  5972  	}
  5973  	defer googleapi.CloseBody(res)
  5974  	if err := googleapi.CheckResponse(res); err != nil {
  5975  		return nil, gensupport.WrapError(err)
  5976  	}
  5977  	ret := &Empty{
  5978  		ServerResponse: googleapi.ServerResponse{
  5979  			Header:         res.Header,
  5980  			HTTPStatusCode: res.StatusCode,
  5981  		},
  5982  	}
  5983  	target := &ret
  5984  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5985  		return nil, err
  5986  	}
  5987  	return ret, nil
  5988  }
  5989  
  5990  type ProjectsLocationsOperationsGetCall struct {
  5991  	s            *Service
  5992  	name         string
  5993  	urlParams_   gensupport.URLParams
  5994  	ifNoneMatch_ string
  5995  	ctx_         context.Context
  5996  	header_      http.Header
  5997  }
  5998  
  5999  // Get: Gets the latest state of a long-running operation. Clients can use this
  6000  // method to poll the operation result at intervals as recommended by the API
  6001  // service.
  6002  //
  6003  // - name: The name of the operation resource.
  6004  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  6005  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6006  	c.name = name
  6007  	return c
  6008  }
  6009  
  6010  // Fields allows partial responses to be retrieved. See
  6011  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6012  // details.
  6013  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  6014  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6015  	return c
  6016  }
  6017  
  6018  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6019  // object's ETag matches the given value. This is useful for getting updates
  6020  // only after the object has changed since the last request.
  6021  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  6022  	c.ifNoneMatch_ = entityTag
  6023  	return c
  6024  }
  6025  
  6026  // Context sets the context to be used in this call's Do method.
  6027  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  6028  	c.ctx_ = ctx
  6029  	return c
  6030  }
  6031  
  6032  // Header returns a http.Header that can be modified by the caller to add
  6033  // headers to the request.
  6034  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  6035  	if c.header_ == nil {
  6036  		c.header_ = make(http.Header)
  6037  	}
  6038  	return c.header_
  6039  }
  6040  
  6041  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  6042  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6043  	if c.ifNoneMatch_ != "" {
  6044  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6045  	}
  6046  	var body io.Reader = nil
  6047  	c.urlParams_.Set("alt", alt)
  6048  	c.urlParams_.Set("prettyPrint", "false")
  6049  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6050  	urls += "?" + c.urlParams_.Encode()
  6051  	req, err := http.NewRequest("GET", urls, body)
  6052  	if err != nil {
  6053  		return nil, err
  6054  	}
  6055  	req.Header = reqHeaders
  6056  	googleapi.Expand(req.URL, map[string]string{
  6057  		"name": c.name,
  6058  	})
  6059  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6060  }
  6061  
  6062  // Do executes the "vmmigration.projects.locations.operations.get" call.
  6063  // Any non-2xx status code is an error. Response headers are in either
  6064  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6065  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6066  // whether the returned error was because http.StatusNotModified was returned.
  6067  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6068  	gensupport.SetOptions(c.urlParams_, opts...)
  6069  	res, err := c.doRequest("json")
  6070  	if res != nil && res.StatusCode == http.StatusNotModified {
  6071  		if res.Body != nil {
  6072  			res.Body.Close()
  6073  		}
  6074  		return nil, gensupport.WrapError(&googleapi.Error{
  6075  			Code:   res.StatusCode,
  6076  			Header: res.Header,
  6077  		})
  6078  	}
  6079  	if err != nil {
  6080  		return nil, err
  6081  	}
  6082  	defer googleapi.CloseBody(res)
  6083  	if err := googleapi.CheckResponse(res); err != nil {
  6084  		return nil, gensupport.WrapError(err)
  6085  	}
  6086  	ret := &Operation{
  6087  		ServerResponse: googleapi.ServerResponse{
  6088  			Header:         res.Header,
  6089  			HTTPStatusCode: res.StatusCode,
  6090  		},
  6091  	}
  6092  	target := &ret
  6093  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6094  		return nil, err
  6095  	}
  6096  	return ret, nil
  6097  }
  6098  
  6099  type ProjectsLocationsOperationsListCall struct {
  6100  	s            *Service
  6101  	name         string
  6102  	urlParams_   gensupport.URLParams
  6103  	ifNoneMatch_ string
  6104  	ctx_         context.Context
  6105  	header_      http.Header
  6106  }
  6107  
  6108  // List: Lists operations that match the specified filter in the request. If
  6109  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  6110  //
  6111  // - name: The name of the operation's parent resource.
  6112  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  6113  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6114  	c.name = name
  6115  	return c
  6116  }
  6117  
  6118  // Filter sets the optional parameter "filter": The standard list filter.
  6119  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  6120  	c.urlParams_.Set("filter", filter)
  6121  	return c
  6122  }
  6123  
  6124  // PageSize sets the optional parameter "pageSize": The standard list page
  6125  // size.
  6126  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  6127  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6128  	return c
  6129  }
  6130  
  6131  // PageToken sets the optional parameter "pageToken": The standard list page
  6132  // token.
  6133  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  6134  	c.urlParams_.Set("pageToken", pageToken)
  6135  	return c
  6136  }
  6137  
  6138  // Fields allows partial responses to be retrieved. See
  6139  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6140  // details.
  6141  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  6142  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6143  	return c
  6144  }
  6145  
  6146  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6147  // object's ETag matches the given value. This is useful for getting updates
  6148  // only after the object has changed since the last request.
  6149  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  6150  	c.ifNoneMatch_ = entityTag
  6151  	return c
  6152  }
  6153  
  6154  // Context sets the context to be used in this call's Do method.
  6155  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  6156  	c.ctx_ = ctx
  6157  	return c
  6158  }
  6159  
  6160  // Header returns a http.Header that can be modified by the caller to add
  6161  // headers to the request.
  6162  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  6163  	if c.header_ == nil {
  6164  		c.header_ = make(http.Header)
  6165  	}
  6166  	return c.header_
  6167  }
  6168  
  6169  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  6170  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6171  	if c.ifNoneMatch_ != "" {
  6172  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6173  	}
  6174  	var body io.Reader = nil
  6175  	c.urlParams_.Set("alt", alt)
  6176  	c.urlParams_.Set("prettyPrint", "false")
  6177  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  6178  	urls += "?" + c.urlParams_.Encode()
  6179  	req, err := http.NewRequest("GET", urls, body)
  6180  	if err != nil {
  6181  		return nil, err
  6182  	}
  6183  	req.Header = reqHeaders
  6184  	googleapi.Expand(req.URL, map[string]string{
  6185  		"name": c.name,
  6186  	})
  6187  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6188  }
  6189  
  6190  // Do executes the "vmmigration.projects.locations.operations.list" call.
  6191  // Any non-2xx status code is an error. Response headers are in either
  6192  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  6193  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6194  // check whether the returned error was because http.StatusNotModified was
  6195  // returned.
  6196  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  6197  	gensupport.SetOptions(c.urlParams_, opts...)
  6198  	res, err := c.doRequest("json")
  6199  	if res != nil && res.StatusCode == http.StatusNotModified {
  6200  		if res.Body != nil {
  6201  			res.Body.Close()
  6202  		}
  6203  		return nil, gensupport.WrapError(&googleapi.Error{
  6204  			Code:   res.StatusCode,
  6205  			Header: res.Header,
  6206  		})
  6207  	}
  6208  	if err != nil {
  6209  		return nil, err
  6210  	}
  6211  	defer googleapi.CloseBody(res)
  6212  	if err := googleapi.CheckResponse(res); err != nil {
  6213  		return nil, gensupport.WrapError(err)
  6214  	}
  6215  	ret := &ListOperationsResponse{
  6216  		ServerResponse: googleapi.ServerResponse{
  6217  			Header:         res.Header,
  6218  			HTTPStatusCode: res.StatusCode,
  6219  		},
  6220  	}
  6221  	target := &ret
  6222  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6223  		return nil, err
  6224  	}
  6225  	return ret, nil
  6226  }
  6227  
  6228  // Pages invokes f for each page of results.
  6229  // A non-nil error returned from f will halt the iteration.
  6230  // The provided context supersedes any context provided to the Context method.
  6231  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  6232  	c.ctx_ = ctx
  6233  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6234  	for {
  6235  		x, err := c.Do()
  6236  		if err != nil {
  6237  			return err
  6238  		}
  6239  		if err := f(x); err != nil {
  6240  			return err
  6241  		}
  6242  		if x.NextPageToken == "" {
  6243  			return nil
  6244  		}
  6245  		c.PageToken(x.NextPageToken)
  6246  	}
  6247  }
  6248  
  6249  type ProjectsLocationsSourcesCreateCall struct {
  6250  	s          *Service
  6251  	parent     string
  6252  	source     *Source
  6253  	urlParams_ gensupport.URLParams
  6254  	ctx_       context.Context
  6255  	header_    http.Header
  6256  }
  6257  
  6258  // Create: Creates a new Source in a given project and location.
  6259  //
  6260  // - parent: The Source's parent.
  6261  func (r *ProjectsLocationsSourcesService) Create(parent string, source *Source) *ProjectsLocationsSourcesCreateCall {
  6262  	c := &ProjectsLocationsSourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6263  	c.parent = parent
  6264  	c.source = source
  6265  	return c
  6266  }
  6267  
  6268  // RequestId sets the optional parameter "requestId": A request ID to identify
  6269  // requests. Specify a unique request ID so that if you must retry your
  6270  // request, the server will know to ignore the request if it has already been
  6271  // completed. The server will guarantee that for at least 60 minutes since the
  6272  // first request. For example, consider a situation where you make an initial
  6273  // request and the request times out. If you make the request again with the
  6274  // same request ID, the server can check if original operation with the same
  6275  // request ID was received, and if so, will ignore the second request. This
  6276  // prevents clients from accidentally creating duplicate commitments. The
  6277  // request ID must be a valid UUID with the exception that zero UUID is not
  6278  // supported (00000000-0000-0000-0000-000000000000).
  6279  func (c *ProjectsLocationsSourcesCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesCreateCall {
  6280  	c.urlParams_.Set("requestId", requestId)
  6281  	return c
  6282  }
  6283  
  6284  // SourceId sets the optional parameter "sourceId": Required. The source
  6285  // identifier.
  6286  func (c *ProjectsLocationsSourcesCreateCall) SourceId(sourceId string) *ProjectsLocationsSourcesCreateCall {
  6287  	c.urlParams_.Set("sourceId", sourceId)
  6288  	return c
  6289  }
  6290  
  6291  // Fields allows partial responses to be retrieved. See
  6292  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6293  // details.
  6294  func (c *ProjectsLocationsSourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesCreateCall {
  6295  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6296  	return c
  6297  }
  6298  
  6299  // Context sets the context to be used in this call's Do method.
  6300  func (c *ProjectsLocationsSourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesCreateCall {
  6301  	c.ctx_ = ctx
  6302  	return c
  6303  }
  6304  
  6305  // Header returns a http.Header that can be modified by the caller to add
  6306  // headers to the request.
  6307  func (c *ProjectsLocationsSourcesCreateCall) Header() http.Header {
  6308  	if c.header_ == nil {
  6309  		c.header_ = make(http.Header)
  6310  	}
  6311  	return c.header_
  6312  }
  6313  
  6314  func (c *ProjectsLocationsSourcesCreateCall) doRequest(alt string) (*http.Response, error) {
  6315  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6316  	var body io.Reader = nil
  6317  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.source)
  6318  	if err != nil {
  6319  		return nil, err
  6320  	}
  6321  	c.urlParams_.Set("alt", alt)
  6322  	c.urlParams_.Set("prettyPrint", "false")
  6323  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sources")
  6324  	urls += "?" + c.urlParams_.Encode()
  6325  	req, err := http.NewRequest("POST", urls, body)
  6326  	if err != nil {
  6327  		return nil, err
  6328  	}
  6329  	req.Header = reqHeaders
  6330  	googleapi.Expand(req.URL, map[string]string{
  6331  		"parent": c.parent,
  6332  	})
  6333  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6334  }
  6335  
  6336  // Do executes the "vmmigration.projects.locations.sources.create" call.
  6337  // Any non-2xx status code is an error. Response headers are in either
  6338  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6339  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6340  // whether the returned error was because http.StatusNotModified was returned.
  6341  func (c *ProjectsLocationsSourcesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6342  	gensupport.SetOptions(c.urlParams_, opts...)
  6343  	res, err := c.doRequest("json")
  6344  	if res != nil && res.StatusCode == http.StatusNotModified {
  6345  		if res.Body != nil {
  6346  			res.Body.Close()
  6347  		}
  6348  		return nil, gensupport.WrapError(&googleapi.Error{
  6349  			Code:   res.StatusCode,
  6350  			Header: res.Header,
  6351  		})
  6352  	}
  6353  	if err != nil {
  6354  		return nil, err
  6355  	}
  6356  	defer googleapi.CloseBody(res)
  6357  	if err := googleapi.CheckResponse(res); err != nil {
  6358  		return nil, gensupport.WrapError(err)
  6359  	}
  6360  	ret := &Operation{
  6361  		ServerResponse: googleapi.ServerResponse{
  6362  			Header:         res.Header,
  6363  			HTTPStatusCode: res.StatusCode,
  6364  		},
  6365  	}
  6366  	target := &ret
  6367  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6368  		return nil, err
  6369  	}
  6370  	return ret, nil
  6371  }
  6372  
  6373  type ProjectsLocationsSourcesDeleteCall struct {
  6374  	s          *Service
  6375  	name       string
  6376  	urlParams_ gensupport.URLParams
  6377  	ctx_       context.Context
  6378  	header_    http.Header
  6379  }
  6380  
  6381  // Delete: Deletes a single Source.
  6382  //
  6383  // - name: The Source name.
  6384  func (r *ProjectsLocationsSourcesService) Delete(name string) *ProjectsLocationsSourcesDeleteCall {
  6385  	c := &ProjectsLocationsSourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6386  	c.name = name
  6387  	return c
  6388  }
  6389  
  6390  // RequestId sets the optional parameter "requestId": A request ID to identify
  6391  // requests. Specify a unique request ID so that if you must retry your
  6392  // request, the server will know to ignore the request if it has already been
  6393  // completed. The server will guarantee that for at least 60 minutes after the
  6394  // first request. For example, consider a situation where you make an initial
  6395  // request and the request times out. If you make the request again with the
  6396  // same request ID, the server can check if original operation with the same
  6397  // request ID was received, and if so, will ignore the second request. This
  6398  // prevents clients from accidentally creating duplicate commitments. The
  6399  // request ID must be a valid UUID with the exception that zero UUID is not
  6400  // supported (00000000-0000-0000-0000-000000000000).
  6401  func (c *ProjectsLocationsSourcesDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesDeleteCall {
  6402  	c.urlParams_.Set("requestId", requestId)
  6403  	return c
  6404  }
  6405  
  6406  // Fields allows partial responses to be retrieved. See
  6407  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6408  // details.
  6409  func (c *ProjectsLocationsSourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDeleteCall {
  6410  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6411  	return c
  6412  }
  6413  
  6414  // Context sets the context to be used in this call's Do method.
  6415  func (c *ProjectsLocationsSourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesDeleteCall {
  6416  	c.ctx_ = ctx
  6417  	return c
  6418  }
  6419  
  6420  // Header returns a http.Header that can be modified by the caller to add
  6421  // headers to the request.
  6422  func (c *ProjectsLocationsSourcesDeleteCall) Header() http.Header {
  6423  	if c.header_ == nil {
  6424  		c.header_ = make(http.Header)
  6425  	}
  6426  	return c.header_
  6427  }
  6428  
  6429  func (c *ProjectsLocationsSourcesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6430  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6431  	var body io.Reader = nil
  6432  	c.urlParams_.Set("alt", alt)
  6433  	c.urlParams_.Set("prettyPrint", "false")
  6434  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6435  	urls += "?" + c.urlParams_.Encode()
  6436  	req, err := http.NewRequest("DELETE", urls, body)
  6437  	if err != nil {
  6438  		return nil, err
  6439  	}
  6440  	req.Header = reqHeaders
  6441  	googleapi.Expand(req.URL, map[string]string{
  6442  		"name": c.name,
  6443  	})
  6444  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6445  }
  6446  
  6447  // Do executes the "vmmigration.projects.locations.sources.delete" call.
  6448  // Any non-2xx status code is an error. Response headers are in either
  6449  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6450  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6451  // whether the returned error was because http.StatusNotModified was returned.
  6452  func (c *ProjectsLocationsSourcesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6453  	gensupport.SetOptions(c.urlParams_, opts...)
  6454  	res, err := c.doRequest("json")
  6455  	if res != nil && res.StatusCode == http.StatusNotModified {
  6456  		if res.Body != nil {
  6457  			res.Body.Close()
  6458  		}
  6459  		return nil, gensupport.WrapError(&googleapi.Error{
  6460  			Code:   res.StatusCode,
  6461  			Header: res.Header,
  6462  		})
  6463  	}
  6464  	if err != nil {
  6465  		return nil, err
  6466  	}
  6467  	defer googleapi.CloseBody(res)
  6468  	if err := googleapi.CheckResponse(res); err != nil {
  6469  		return nil, gensupport.WrapError(err)
  6470  	}
  6471  	ret := &Operation{
  6472  		ServerResponse: googleapi.ServerResponse{
  6473  			Header:         res.Header,
  6474  			HTTPStatusCode: res.StatusCode,
  6475  		},
  6476  	}
  6477  	target := &ret
  6478  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6479  		return nil, err
  6480  	}
  6481  	return ret, nil
  6482  }
  6483  
  6484  type ProjectsLocationsSourcesFetchInventoryCall struct {
  6485  	s            *Service
  6486  	source       string
  6487  	urlParams_   gensupport.URLParams
  6488  	ifNoneMatch_ string
  6489  	ctx_         context.Context
  6490  	header_      http.Header
  6491  }
  6492  
  6493  // FetchInventory: List remote source's inventory of VMs. The remote source is
  6494  // the onprem vCenter (remote in the sense it's not in Compute Engine). The
  6495  // inventory describes the list of existing VMs in that source. Note that this
  6496  // operation lists the VMs on the remote source, as opposed to listing the
  6497  // MigratingVms resources in the vmmigration service.
  6498  //
  6499  // - source: The name of the Source.
  6500  func (r *ProjectsLocationsSourcesService) FetchInventory(source string) *ProjectsLocationsSourcesFetchInventoryCall {
  6501  	c := &ProjectsLocationsSourcesFetchInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6502  	c.source = source
  6503  	return c
  6504  }
  6505  
  6506  // ForceRefresh sets the optional parameter "forceRefresh": If this flag is set
  6507  // to true, the source will be queried instead of using cached results. Using
  6508  // this flag will make the call slower.
  6509  func (c *ProjectsLocationsSourcesFetchInventoryCall) ForceRefresh(forceRefresh bool) *ProjectsLocationsSourcesFetchInventoryCall {
  6510  	c.urlParams_.Set("forceRefresh", fmt.Sprint(forceRefresh))
  6511  	return c
  6512  }
  6513  
  6514  // PageSize sets the optional parameter "pageSize": The maximum number of VMs
  6515  // to return. The service may return fewer than this value. For AWS source: If
  6516  // unspecified, at most 500 VMs will be returned. The maximum value is 1000;
  6517  // values above 1000 will be coerced to 1000. For VMWare source: If
  6518  // unspecified, all VMs will be returned. There is no limit for maximum value.
  6519  func (c *ProjectsLocationsSourcesFetchInventoryCall) PageSize(pageSize int64) *ProjectsLocationsSourcesFetchInventoryCall {
  6520  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6521  	return c
  6522  }
  6523  
  6524  // PageToken sets the optional parameter "pageToken": A page token, received
  6525  // from a previous `FetchInventory` call. Provide this to retrieve the
  6526  // subsequent page. When paginating, all other parameters provided to
  6527  // `FetchInventory` must match the call that provided the page token.
  6528  func (c *ProjectsLocationsSourcesFetchInventoryCall) PageToken(pageToken string) *ProjectsLocationsSourcesFetchInventoryCall {
  6529  	c.urlParams_.Set("pageToken", pageToken)
  6530  	return c
  6531  }
  6532  
  6533  // Fields allows partial responses to be retrieved. See
  6534  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6535  // details.
  6536  func (c *ProjectsLocationsSourcesFetchInventoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesFetchInventoryCall {
  6537  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6538  	return c
  6539  }
  6540  
  6541  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6542  // object's ETag matches the given value. This is useful for getting updates
  6543  // only after the object has changed since the last request.
  6544  func (c *ProjectsLocationsSourcesFetchInventoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesFetchInventoryCall {
  6545  	c.ifNoneMatch_ = entityTag
  6546  	return c
  6547  }
  6548  
  6549  // Context sets the context to be used in this call's Do method.
  6550  func (c *ProjectsLocationsSourcesFetchInventoryCall) Context(ctx context.Context) *ProjectsLocationsSourcesFetchInventoryCall {
  6551  	c.ctx_ = ctx
  6552  	return c
  6553  }
  6554  
  6555  // Header returns a http.Header that can be modified by the caller to add
  6556  // headers to the request.
  6557  func (c *ProjectsLocationsSourcesFetchInventoryCall) Header() http.Header {
  6558  	if c.header_ == nil {
  6559  		c.header_ = make(http.Header)
  6560  	}
  6561  	return c.header_
  6562  }
  6563  
  6564  func (c *ProjectsLocationsSourcesFetchInventoryCall) doRequest(alt string) (*http.Response, error) {
  6565  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6566  	if c.ifNoneMatch_ != "" {
  6567  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6568  	}
  6569  	var body io.Reader = nil
  6570  	c.urlParams_.Set("alt", alt)
  6571  	c.urlParams_.Set("prettyPrint", "false")
  6572  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+source}:fetchInventory")
  6573  	urls += "?" + c.urlParams_.Encode()
  6574  	req, err := http.NewRequest("GET", urls, body)
  6575  	if err != nil {
  6576  		return nil, err
  6577  	}
  6578  	req.Header = reqHeaders
  6579  	googleapi.Expand(req.URL, map[string]string{
  6580  		"source": c.source,
  6581  	})
  6582  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6583  }
  6584  
  6585  // Do executes the "vmmigration.projects.locations.sources.fetchInventory" call.
  6586  // Any non-2xx status code is an error. Response headers are in either
  6587  // *FetchInventoryResponse.ServerResponse.Header or (if a response was returned
  6588  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6589  // check whether the returned error was because http.StatusNotModified was
  6590  // returned.
  6591  func (c *ProjectsLocationsSourcesFetchInventoryCall) Do(opts ...googleapi.CallOption) (*FetchInventoryResponse, error) {
  6592  	gensupport.SetOptions(c.urlParams_, opts...)
  6593  	res, err := c.doRequest("json")
  6594  	if res != nil && res.StatusCode == http.StatusNotModified {
  6595  		if res.Body != nil {
  6596  			res.Body.Close()
  6597  		}
  6598  		return nil, gensupport.WrapError(&googleapi.Error{
  6599  			Code:   res.StatusCode,
  6600  			Header: res.Header,
  6601  		})
  6602  	}
  6603  	if err != nil {
  6604  		return nil, err
  6605  	}
  6606  	defer googleapi.CloseBody(res)
  6607  	if err := googleapi.CheckResponse(res); err != nil {
  6608  		return nil, gensupport.WrapError(err)
  6609  	}
  6610  	ret := &FetchInventoryResponse{
  6611  		ServerResponse: googleapi.ServerResponse{
  6612  			Header:         res.Header,
  6613  			HTTPStatusCode: res.StatusCode,
  6614  		},
  6615  	}
  6616  	target := &ret
  6617  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6618  		return nil, err
  6619  	}
  6620  	return ret, nil
  6621  }
  6622  
  6623  // Pages invokes f for each page of results.
  6624  // A non-nil error returned from f will halt the iteration.
  6625  // The provided context supersedes any context provided to the Context method.
  6626  func (c *ProjectsLocationsSourcesFetchInventoryCall) Pages(ctx context.Context, f func(*FetchInventoryResponse) error) error {
  6627  	c.ctx_ = ctx
  6628  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6629  	for {
  6630  		x, err := c.Do()
  6631  		if err != nil {
  6632  			return err
  6633  		}
  6634  		if err := f(x); err != nil {
  6635  			return err
  6636  		}
  6637  		if x.NextPageToken == "" {
  6638  			return nil
  6639  		}
  6640  		c.PageToken(x.NextPageToken)
  6641  	}
  6642  }
  6643  
  6644  type ProjectsLocationsSourcesGetCall struct {
  6645  	s            *Service
  6646  	name         string
  6647  	urlParams_   gensupport.URLParams
  6648  	ifNoneMatch_ string
  6649  	ctx_         context.Context
  6650  	header_      http.Header
  6651  }
  6652  
  6653  // Get: Gets details of a single Source.
  6654  //
  6655  // - name: The Source name.
  6656  func (r *ProjectsLocationsSourcesService) Get(name string) *ProjectsLocationsSourcesGetCall {
  6657  	c := &ProjectsLocationsSourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6658  	c.name = name
  6659  	return c
  6660  }
  6661  
  6662  // Fields allows partial responses to be retrieved. See
  6663  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6664  // details.
  6665  func (c *ProjectsLocationsSourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesGetCall {
  6666  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6667  	return c
  6668  }
  6669  
  6670  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6671  // object's ETag matches the given value. This is useful for getting updates
  6672  // only after the object has changed since the last request.
  6673  func (c *ProjectsLocationsSourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesGetCall {
  6674  	c.ifNoneMatch_ = entityTag
  6675  	return c
  6676  }
  6677  
  6678  // Context sets the context to be used in this call's Do method.
  6679  func (c *ProjectsLocationsSourcesGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesGetCall {
  6680  	c.ctx_ = ctx
  6681  	return c
  6682  }
  6683  
  6684  // Header returns a http.Header that can be modified by the caller to add
  6685  // headers to the request.
  6686  func (c *ProjectsLocationsSourcesGetCall) Header() http.Header {
  6687  	if c.header_ == nil {
  6688  		c.header_ = make(http.Header)
  6689  	}
  6690  	return c.header_
  6691  }
  6692  
  6693  func (c *ProjectsLocationsSourcesGetCall) doRequest(alt string) (*http.Response, error) {
  6694  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6695  	if c.ifNoneMatch_ != "" {
  6696  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6697  	}
  6698  	var body io.Reader = nil
  6699  	c.urlParams_.Set("alt", alt)
  6700  	c.urlParams_.Set("prettyPrint", "false")
  6701  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6702  	urls += "?" + c.urlParams_.Encode()
  6703  	req, err := http.NewRequest("GET", urls, body)
  6704  	if err != nil {
  6705  		return nil, err
  6706  	}
  6707  	req.Header = reqHeaders
  6708  	googleapi.Expand(req.URL, map[string]string{
  6709  		"name": c.name,
  6710  	})
  6711  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6712  }
  6713  
  6714  // Do executes the "vmmigration.projects.locations.sources.get" call.
  6715  // Any non-2xx status code is an error. Response headers are in either
  6716  // *Source.ServerResponse.Header or (if a response was returned at all) in
  6717  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6718  // whether the returned error was because http.StatusNotModified was returned.
  6719  func (c *ProjectsLocationsSourcesGetCall) Do(opts ...googleapi.CallOption) (*Source, error) {
  6720  	gensupport.SetOptions(c.urlParams_, opts...)
  6721  	res, err := c.doRequest("json")
  6722  	if res != nil && res.StatusCode == http.StatusNotModified {
  6723  		if res.Body != nil {
  6724  			res.Body.Close()
  6725  		}
  6726  		return nil, gensupport.WrapError(&googleapi.Error{
  6727  			Code:   res.StatusCode,
  6728  			Header: res.Header,
  6729  		})
  6730  	}
  6731  	if err != nil {
  6732  		return nil, err
  6733  	}
  6734  	defer googleapi.CloseBody(res)
  6735  	if err := googleapi.CheckResponse(res); err != nil {
  6736  		return nil, gensupport.WrapError(err)
  6737  	}
  6738  	ret := &Source{
  6739  		ServerResponse: googleapi.ServerResponse{
  6740  			Header:         res.Header,
  6741  			HTTPStatusCode: res.StatusCode,
  6742  		},
  6743  	}
  6744  	target := &ret
  6745  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6746  		return nil, err
  6747  	}
  6748  	return ret, nil
  6749  }
  6750  
  6751  type ProjectsLocationsSourcesListCall struct {
  6752  	s            *Service
  6753  	parent       string
  6754  	urlParams_   gensupport.URLParams
  6755  	ifNoneMatch_ string
  6756  	ctx_         context.Context
  6757  	header_      http.Header
  6758  }
  6759  
  6760  // List: Lists Sources in a given project and location.
  6761  //
  6762  // - parent: The parent, which owns this collection of sources.
  6763  func (r *ProjectsLocationsSourcesService) List(parent string) *ProjectsLocationsSourcesListCall {
  6764  	c := &ProjectsLocationsSourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6765  	c.parent = parent
  6766  	return c
  6767  }
  6768  
  6769  // Filter sets the optional parameter "filter": The filter request.
  6770  func (c *ProjectsLocationsSourcesListCall) Filter(filter string) *ProjectsLocationsSourcesListCall {
  6771  	c.urlParams_.Set("filter", filter)
  6772  	return c
  6773  }
  6774  
  6775  // OrderBy sets the optional parameter "orderBy": the order by fields for the
  6776  // result.
  6777  func (c *ProjectsLocationsSourcesListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesListCall {
  6778  	c.urlParams_.Set("orderBy", orderBy)
  6779  	return c
  6780  }
  6781  
  6782  // PageSize sets the optional parameter "pageSize": The maximum number of
  6783  // sources to return. The service may return fewer than this value. If
  6784  // unspecified, at most 500 sources will be returned. The maximum value is
  6785  // 1000; values above 1000 will be coerced to 1000.
  6786  func (c *ProjectsLocationsSourcesListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesListCall {
  6787  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6788  	return c
  6789  }
  6790  
  6791  // PageToken sets the optional parameter "pageToken": Required. A page token,
  6792  // received from a previous `ListSources` call. Provide this to retrieve the
  6793  // subsequent page. When paginating, all other parameters provided to
  6794  // `ListSources` must match the call that provided the page token.
  6795  func (c *ProjectsLocationsSourcesListCall) PageToken(pageToken string) *ProjectsLocationsSourcesListCall {
  6796  	c.urlParams_.Set("pageToken", pageToken)
  6797  	return c
  6798  }
  6799  
  6800  // Fields allows partial responses to be retrieved. See
  6801  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6802  // details.
  6803  func (c *ProjectsLocationsSourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesListCall {
  6804  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6805  	return c
  6806  }
  6807  
  6808  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6809  // object's ETag matches the given value. This is useful for getting updates
  6810  // only after the object has changed since the last request.
  6811  func (c *ProjectsLocationsSourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesListCall {
  6812  	c.ifNoneMatch_ = entityTag
  6813  	return c
  6814  }
  6815  
  6816  // Context sets the context to be used in this call's Do method.
  6817  func (c *ProjectsLocationsSourcesListCall) Context(ctx context.Context) *ProjectsLocationsSourcesListCall {
  6818  	c.ctx_ = ctx
  6819  	return c
  6820  }
  6821  
  6822  // Header returns a http.Header that can be modified by the caller to add
  6823  // headers to the request.
  6824  func (c *ProjectsLocationsSourcesListCall) Header() http.Header {
  6825  	if c.header_ == nil {
  6826  		c.header_ = make(http.Header)
  6827  	}
  6828  	return c.header_
  6829  }
  6830  
  6831  func (c *ProjectsLocationsSourcesListCall) doRequest(alt string) (*http.Response, error) {
  6832  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6833  	if c.ifNoneMatch_ != "" {
  6834  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6835  	}
  6836  	var body io.Reader = nil
  6837  	c.urlParams_.Set("alt", alt)
  6838  	c.urlParams_.Set("prettyPrint", "false")
  6839  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sources")
  6840  	urls += "?" + c.urlParams_.Encode()
  6841  	req, err := http.NewRequest("GET", urls, body)
  6842  	if err != nil {
  6843  		return nil, err
  6844  	}
  6845  	req.Header = reqHeaders
  6846  	googleapi.Expand(req.URL, map[string]string{
  6847  		"parent": c.parent,
  6848  	})
  6849  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6850  }
  6851  
  6852  // Do executes the "vmmigration.projects.locations.sources.list" call.
  6853  // Any non-2xx status code is an error. Response headers are in either
  6854  // *ListSourcesResponse.ServerResponse.Header or (if a response was returned at
  6855  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6856  // check whether the returned error was because http.StatusNotModified was
  6857  // returned.
  6858  func (c *ProjectsLocationsSourcesListCall) Do(opts ...googleapi.CallOption) (*ListSourcesResponse, error) {
  6859  	gensupport.SetOptions(c.urlParams_, opts...)
  6860  	res, err := c.doRequest("json")
  6861  	if res != nil && res.StatusCode == http.StatusNotModified {
  6862  		if res.Body != nil {
  6863  			res.Body.Close()
  6864  		}
  6865  		return nil, gensupport.WrapError(&googleapi.Error{
  6866  			Code:   res.StatusCode,
  6867  			Header: res.Header,
  6868  		})
  6869  	}
  6870  	if err != nil {
  6871  		return nil, err
  6872  	}
  6873  	defer googleapi.CloseBody(res)
  6874  	if err := googleapi.CheckResponse(res); err != nil {
  6875  		return nil, gensupport.WrapError(err)
  6876  	}
  6877  	ret := &ListSourcesResponse{
  6878  		ServerResponse: googleapi.ServerResponse{
  6879  			Header:         res.Header,
  6880  			HTTPStatusCode: res.StatusCode,
  6881  		},
  6882  	}
  6883  	target := &ret
  6884  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6885  		return nil, err
  6886  	}
  6887  	return ret, nil
  6888  }
  6889  
  6890  // Pages invokes f for each page of results.
  6891  // A non-nil error returned from f will halt the iteration.
  6892  // The provided context supersedes any context provided to the Context method.
  6893  func (c *ProjectsLocationsSourcesListCall) Pages(ctx context.Context, f func(*ListSourcesResponse) error) error {
  6894  	c.ctx_ = ctx
  6895  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6896  	for {
  6897  		x, err := c.Do()
  6898  		if err != nil {
  6899  			return err
  6900  		}
  6901  		if err := f(x); err != nil {
  6902  			return err
  6903  		}
  6904  		if x.NextPageToken == "" {
  6905  			return nil
  6906  		}
  6907  		c.PageToken(x.NextPageToken)
  6908  	}
  6909  }
  6910  
  6911  type ProjectsLocationsSourcesPatchCall struct {
  6912  	s          *Service
  6913  	name       string
  6914  	source     *Source
  6915  	urlParams_ gensupport.URLParams
  6916  	ctx_       context.Context
  6917  	header_    http.Header
  6918  }
  6919  
  6920  // Patch: Updates the parameters of a single Source.
  6921  //
  6922  // - name: Output only. The Source name.
  6923  func (r *ProjectsLocationsSourcesService) Patch(name string, source *Source) *ProjectsLocationsSourcesPatchCall {
  6924  	c := &ProjectsLocationsSourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6925  	c.name = name
  6926  	c.source = source
  6927  	return c
  6928  }
  6929  
  6930  // RequestId sets the optional parameter "requestId": A request ID to identify
  6931  // requests. Specify a unique request ID so that if you must retry your
  6932  // request, the server will know to ignore the request if it has already been
  6933  // completed. The server will guarantee that for at least 60 minutes since the
  6934  // first request. For example, consider a situation where you make an initial
  6935  // request and the request times out. If you make the request again with the
  6936  // same request ID, the server can check if original operation with the same
  6937  // request ID was received, and if so, will ignore the second request. This
  6938  // prevents clients from accidentally creating duplicate commitments. The
  6939  // request ID must be a valid UUID with the exception that zero UUID is not
  6940  // supported (00000000-0000-0000-0000-000000000000).
  6941  func (c *ProjectsLocationsSourcesPatchCall) RequestId(requestId string) *ProjectsLocationsSourcesPatchCall {
  6942  	c.urlParams_.Set("requestId", requestId)
  6943  	return c
  6944  }
  6945  
  6946  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  6947  // specify the fields to be overwritten in the Source resource by the update.
  6948  // The fields specified in the update_mask are relative to the resource, not
  6949  // the full request. A field will be overwritten if it is in the mask. If the
  6950  // user does not provide a mask then all fields will be overwritten.
  6951  func (c *ProjectsLocationsSourcesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSourcesPatchCall {
  6952  	c.urlParams_.Set("updateMask", updateMask)
  6953  	return c
  6954  }
  6955  
  6956  // Fields allows partial responses to be retrieved. See
  6957  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6958  // details.
  6959  func (c *ProjectsLocationsSourcesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesPatchCall {
  6960  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6961  	return c
  6962  }
  6963  
  6964  // Context sets the context to be used in this call's Do method.
  6965  func (c *ProjectsLocationsSourcesPatchCall) Context(ctx context.Context) *ProjectsLocationsSourcesPatchCall {
  6966  	c.ctx_ = ctx
  6967  	return c
  6968  }
  6969  
  6970  // Header returns a http.Header that can be modified by the caller to add
  6971  // headers to the request.
  6972  func (c *ProjectsLocationsSourcesPatchCall) Header() http.Header {
  6973  	if c.header_ == nil {
  6974  		c.header_ = make(http.Header)
  6975  	}
  6976  	return c.header_
  6977  }
  6978  
  6979  func (c *ProjectsLocationsSourcesPatchCall) doRequest(alt string) (*http.Response, error) {
  6980  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6981  	var body io.Reader = nil
  6982  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.source)
  6983  	if err != nil {
  6984  		return nil, err
  6985  	}
  6986  	c.urlParams_.Set("alt", alt)
  6987  	c.urlParams_.Set("prettyPrint", "false")
  6988  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6989  	urls += "?" + c.urlParams_.Encode()
  6990  	req, err := http.NewRequest("PATCH", urls, body)
  6991  	if err != nil {
  6992  		return nil, err
  6993  	}
  6994  	req.Header = reqHeaders
  6995  	googleapi.Expand(req.URL, map[string]string{
  6996  		"name": c.name,
  6997  	})
  6998  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6999  }
  7000  
  7001  // Do executes the "vmmigration.projects.locations.sources.patch" call.
  7002  // Any non-2xx status code is an error. Response headers are in either
  7003  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7004  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7005  // whether the returned error was because http.StatusNotModified was returned.
  7006  func (c *ProjectsLocationsSourcesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7007  	gensupport.SetOptions(c.urlParams_, opts...)
  7008  	res, err := c.doRequest("json")
  7009  	if res != nil && res.StatusCode == http.StatusNotModified {
  7010  		if res.Body != nil {
  7011  			res.Body.Close()
  7012  		}
  7013  		return nil, gensupport.WrapError(&googleapi.Error{
  7014  			Code:   res.StatusCode,
  7015  			Header: res.Header,
  7016  		})
  7017  	}
  7018  	if err != nil {
  7019  		return nil, err
  7020  	}
  7021  	defer googleapi.CloseBody(res)
  7022  	if err := googleapi.CheckResponse(res); err != nil {
  7023  		return nil, gensupport.WrapError(err)
  7024  	}
  7025  	ret := &Operation{
  7026  		ServerResponse: googleapi.ServerResponse{
  7027  			Header:         res.Header,
  7028  			HTTPStatusCode: res.StatusCode,
  7029  		},
  7030  	}
  7031  	target := &ret
  7032  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7033  		return nil, err
  7034  	}
  7035  	return ret, nil
  7036  }
  7037  
  7038  type ProjectsLocationsSourcesDatacenterConnectorsCreateCall struct {
  7039  	s                   *Service
  7040  	parent              string
  7041  	datacenterconnector *DatacenterConnector
  7042  	urlParams_          gensupport.URLParams
  7043  	ctx_                context.Context
  7044  	header_             http.Header
  7045  }
  7046  
  7047  // Create: Creates a new DatacenterConnector in a given Source.
  7048  //
  7049  //   - parent: The DatacenterConnector's parent. Required. The Source in where
  7050  //     the new DatacenterConnector will be created. For example:
  7051  //     `projects/my-project/locations/us-central1/sources/my-source`.
  7052  func (r *ProjectsLocationsSourcesDatacenterConnectorsService) Create(parent string, datacenterconnector *DatacenterConnector) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
  7053  	c := &ProjectsLocationsSourcesDatacenterConnectorsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7054  	c.parent = parent
  7055  	c.datacenterconnector = datacenterconnector
  7056  	return c
  7057  }
  7058  
  7059  // DatacenterConnectorId sets the optional parameter "datacenterConnectorId":
  7060  // Required. The datacenterConnector identifier.
  7061  func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) DatacenterConnectorId(datacenterConnectorId string) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
  7062  	c.urlParams_.Set("datacenterConnectorId", datacenterConnectorId)
  7063  	return c
  7064  }
  7065  
  7066  // RequestId sets the optional parameter "requestId": A request ID to identify
  7067  // requests. Specify a unique request ID so that if you must retry your
  7068  // request, the server will know to ignore the request if it has already been
  7069  // completed. The server will guarantee that for at least 60 minutes since the
  7070  // first request. For example, consider a situation where you make an initial
  7071  // request and the request times out. If you make the request again with the
  7072  // same request ID, the server can check if original operation with the same
  7073  // request ID was received, and if so, will ignore the second request. This
  7074  // prevents clients from accidentally creating duplicate commitments. The
  7075  // request ID must be a valid UUID with the exception that zero UUID is not
  7076  // supported (00000000-0000-0000-0000-000000000000).
  7077  func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
  7078  	c.urlParams_.Set("requestId", requestId)
  7079  	return c
  7080  }
  7081  
  7082  // Fields allows partial responses to be retrieved. See
  7083  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7084  // details.
  7085  func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
  7086  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7087  	return c
  7088  }
  7089  
  7090  // Context sets the context to be used in this call's Do method.
  7091  func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsCreateCall {
  7092  	c.ctx_ = ctx
  7093  	return c
  7094  }
  7095  
  7096  // Header returns a http.Header that can be modified by the caller to add
  7097  // headers to the request.
  7098  func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Header() http.Header {
  7099  	if c.header_ == nil {
  7100  		c.header_ = make(http.Header)
  7101  	}
  7102  	return c.header_
  7103  }
  7104  
  7105  func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) doRequest(alt string) (*http.Response, error) {
  7106  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7107  	var body io.Reader = nil
  7108  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.datacenterconnector)
  7109  	if err != nil {
  7110  		return nil, err
  7111  	}
  7112  	c.urlParams_.Set("alt", alt)
  7113  	c.urlParams_.Set("prettyPrint", "false")
  7114  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datacenterConnectors")
  7115  	urls += "?" + c.urlParams_.Encode()
  7116  	req, err := http.NewRequest("POST", urls, body)
  7117  	if err != nil {
  7118  		return nil, err
  7119  	}
  7120  	req.Header = reqHeaders
  7121  	googleapi.Expand(req.URL, map[string]string{
  7122  		"parent": c.parent,
  7123  	})
  7124  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7125  }
  7126  
  7127  // Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.create" call.
  7128  // Any non-2xx status code is an error. Response headers are in either
  7129  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7130  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7131  // whether the returned error was because http.StatusNotModified was returned.
  7132  func (c *ProjectsLocationsSourcesDatacenterConnectorsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7133  	gensupport.SetOptions(c.urlParams_, opts...)
  7134  	res, err := c.doRequest("json")
  7135  	if res != nil && res.StatusCode == http.StatusNotModified {
  7136  		if res.Body != nil {
  7137  			res.Body.Close()
  7138  		}
  7139  		return nil, gensupport.WrapError(&googleapi.Error{
  7140  			Code:   res.StatusCode,
  7141  			Header: res.Header,
  7142  		})
  7143  	}
  7144  	if err != nil {
  7145  		return nil, err
  7146  	}
  7147  	defer googleapi.CloseBody(res)
  7148  	if err := googleapi.CheckResponse(res); err != nil {
  7149  		return nil, gensupport.WrapError(err)
  7150  	}
  7151  	ret := &Operation{
  7152  		ServerResponse: googleapi.ServerResponse{
  7153  			Header:         res.Header,
  7154  			HTTPStatusCode: res.StatusCode,
  7155  		},
  7156  	}
  7157  	target := &ret
  7158  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7159  		return nil, err
  7160  	}
  7161  	return ret, nil
  7162  }
  7163  
  7164  type ProjectsLocationsSourcesDatacenterConnectorsDeleteCall struct {
  7165  	s          *Service
  7166  	name       string
  7167  	urlParams_ gensupport.URLParams
  7168  	ctx_       context.Context
  7169  	header_    http.Header
  7170  }
  7171  
  7172  // Delete: Deletes a single DatacenterConnector.
  7173  //
  7174  // - name: The DatacenterConnector name.
  7175  func (r *ProjectsLocationsSourcesDatacenterConnectorsService) Delete(name string) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
  7176  	c := &ProjectsLocationsSourcesDatacenterConnectorsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7177  	c.name = name
  7178  	return c
  7179  }
  7180  
  7181  // RequestId sets the optional parameter "requestId": A request ID to identify
  7182  // requests. Specify a unique request ID so that if you must retry your
  7183  // request, the server will know to ignore the request if it has already been
  7184  // completed. The server will guarantee that for at least 60 minutes after the
  7185  // first request. For example, consider a situation where you make an initial
  7186  // request and the request times out. If you make the request again with the
  7187  // same request ID, the server can check if original operation with the same
  7188  // request ID was received, and if so, will ignore the second request. This
  7189  // prevents clients from accidentally creating duplicate commitments. The
  7190  // request ID must be a valid UUID with the exception that zero UUID is not
  7191  // supported (00000000-0000-0000-0000-000000000000).
  7192  func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
  7193  	c.urlParams_.Set("requestId", requestId)
  7194  	return c
  7195  }
  7196  
  7197  // Fields allows partial responses to be retrieved. See
  7198  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7199  // details.
  7200  func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
  7201  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7202  	return c
  7203  }
  7204  
  7205  // Context sets the context to be used in this call's Do method.
  7206  func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall {
  7207  	c.ctx_ = ctx
  7208  	return c
  7209  }
  7210  
  7211  // Header returns a http.Header that can be modified by the caller to add
  7212  // headers to the request.
  7213  func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Header() http.Header {
  7214  	if c.header_ == nil {
  7215  		c.header_ = make(http.Header)
  7216  	}
  7217  	return c.header_
  7218  }
  7219  
  7220  func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7221  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7222  	var body io.Reader = nil
  7223  	c.urlParams_.Set("alt", alt)
  7224  	c.urlParams_.Set("prettyPrint", "false")
  7225  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7226  	urls += "?" + c.urlParams_.Encode()
  7227  	req, err := http.NewRequest("DELETE", urls, body)
  7228  	if err != nil {
  7229  		return nil, err
  7230  	}
  7231  	req.Header = reqHeaders
  7232  	googleapi.Expand(req.URL, map[string]string{
  7233  		"name": c.name,
  7234  	})
  7235  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7236  }
  7237  
  7238  // Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.delete" call.
  7239  // Any non-2xx status code is an error. Response headers are in either
  7240  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7241  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7242  // whether the returned error was because http.StatusNotModified was returned.
  7243  func (c *ProjectsLocationsSourcesDatacenterConnectorsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7244  	gensupport.SetOptions(c.urlParams_, opts...)
  7245  	res, err := c.doRequest("json")
  7246  	if res != nil && res.StatusCode == http.StatusNotModified {
  7247  		if res.Body != nil {
  7248  			res.Body.Close()
  7249  		}
  7250  		return nil, gensupport.WrapError(&googleapi.Error{
  7251  			Code:   res.StatusCode,
  7252  			Header: res.Header,
  7253  		})
  7254  	}
  7255  	if err != nil {
  7256  		return nil, err
  7257  	}
  7258  	defer googleapi.CloseBody(res)
  7259  	if err := googleapi.CheckResponse(res); err != nil {
  7260  		return nil, gensupport.WrapError(err)
  7261  	}
  7262  	ret := &Operation{
  7263  		ServerResponse: googleapi.ServerResponse{
  7264  			Header:         res.Header,
  7265  			HTTPStatusCode: res.StatusCode,
  7266  		},
  7267  	}
  7268  	target := &ret
  7269  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7270  		return nil, err
  7271  	}
  7272  	return ret, nil
  7273  }
  7274  
  7275  type ProjectsLocationsSourcesDatacenterConnectorsGetCall struct {
  7276  	s            *Service
  7277  	name         string
  7278  	urlParams_   gensupport.URLParams
  7279  	ifNoneMatch_ string
  7280  	ctx_         context.Context
  7281  	header_      http.Header
  7282  }
  7283  
  7284  // Get: Gets details of a single DatacenterConnector.
  7285  //
  7286  // - name: The name of the DatacenterConnector.
  7287  func (r *ProjectsLocationsSourcesDatacenterConnectorsService) Get(name string) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
  7288  	c := &ProjectsLocationsSourcesDatacenterConnectorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7289  	c.name = name
  7290  	return c
  7291  }
  7292  
  7293  // Fields allows partial responses to be retrieved. See
  7294  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7295  // details.
  7296  func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
  7297  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7298  	return c
  7299  }
  7300  
  7301  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7302  // object's ETag matches the given value. This is useful for getting updates
  7303  // only after the object has changed since the last request.
  7304  func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
  7305  	c.ifNoneMatch_ = entityTag
  7306  	return c
  7307  }
  7308  
  7309  // Context sets the context to be used in this call's Do method.
  7310  func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsGetCall {
  7311  	c.ctx_ = ctx
  7312  	return c
  7313  }
  7314  
  7315  // Header returns a http.Header that can be modified by the caller to add
  7316  // headers to the request.
  7317  func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Header() http.Header {
  7318  	if c.header_ == nil {
  7319  		c.header_ = make(http.Header)
  7320  	}
  7321  	return c.header_
  7322  }
  7323  
  7324  func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) doRequest(alt string) (*http.Response, error) {
  7325  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7326  	if c.ifNoneMatch_ != "" {
  7327  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7328  	}
  7329  	var body io.Reader = nil
  7330  	c.urlParams_.Set("alt", alt)
  7331  	c.urlParams_.Set("prettyPrint", "false")
  7332  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7333  	urls += "?" + c.urlParams_.Encode()
  7334  	req, err := http.NewRequest("GET", urls, body)
  7335  	if err != nil {
  7336  		return nil, err
  7337  	}
  7338  	req.Header = reqHeaders
  7339  	googleapi.Expand(req.URL, map[string]string{
  7340  		"name": c.name,
  7341  	})
  7342  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7343  }
  7344  
  7345  // Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.get" call.
  7346  // Any non-2xx status code is an error. Response headers are in either
  7347  // *DatacenterConnector.ServerResponse.Header or (if a response was returned at
  7348  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7349  // check whether the returned error was because http.StatusNotModified was
  7350  // returned.
  7351  func (c *ProjectsLocationsSourcesDatacenterConnectorsGetCall) Do(opts ...googleapi.CallOption) (*DatacenterConnector, error) {
  7352  	gensupport.SetOptions(c.urlParams_, opts...)
  7353  	res, err := c.doRequest("json")
  7354  	if res != nil && res.StatusCode == http.StatusNotModified {
  7355  		if res.Body != nil {
  7356  			res.Body.Close()
  7357  		}
  7358  		return nil, gensupport.WrapError(&googleapi.Error{
  7359  			Code:   res.StatusCode,
  7360  			Header: res.Header,
  7361  		})
  7362  	}
  7363  	if err != nil {
  7364  		return nil, err
  7365  	}
  7366  	defer googleapi.CloseBody(res)
  7367  	if err := googleapi.CheckResponse(res); err != nil {
  7368  		return nil, gensupport.WrapError(err)
  7369  	}
  7370  	ret := &DatacenterConnector{
  7371  		ServerResponse: googleapi.ServerResponse{
  7372  			Header:         res.Header,
  7373  			HTTPStatusCode: res.StatusCode,
  7374  		},
  7375  	}
  7376  	target := &ret
  7377  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7378  		return nil, err
  7379  	}
  7380  	return ret, nil
  7381  }
  7382  
  7383  type ProjectsLocationsSourcesDatacenterConnectorsListCall struct {
  7384  	s            *Service
  7385  	parent       string
  7386  	urlParams_   gensupport.URLParams
  7387  	ifNoneMatch_ string
  7388  	ctx_         context.Context
  7389  	header_      http.Header
  7390  }
  7391  
  7392  // List: Lists DatacenterConnectors in a given Source.
  7393  //
  7394  // - parent: The parent, which owns this collection of connectors.
  7395  func (r *ProjectsLocationsSourcesDatacenterConnectorsService) List(parent string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
  7396  	c := &ProjectsLocationsSourcesDatacenterConnectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7397  	c.parent = parent
  7398  	return c
  7399  }
  7400  
  7401  // Filter sets the optional parameter "filter": The filter request.
  7402  func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Filter(filter string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
  7403  	c.urlParams_.Set("filter", filter)
  7404  	return c
  7405  }
  7406  
  7407  // OrderBy sets the optional parameter "orderBy": the order by fields for the
  7408  // result.
  7409  func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
  7410  	c.urlParams_.Set("orderBy", orderBy)
  7411  	return c
  7412  }
  7413  
  7414  // PageSize sets the optional parameter "pageSize": The maximum number of
  7415  // connectors to return. The service may return fewer than this value. If
  7416  // unspecified, at most 500 sources will be returned. The maximum value is
  7417  // 1000; values above 1000 will be coerced to 1000.
  7418  func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
  7419  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7420  	return c
  7421  }
  7422  
  7423  // PageToken sets the optional parameter "pageToken": Required. A page token,
  7424  // received from a previous `ListDatacenterConnectors` call. Provide this to
  7425  // retrieve the subsequent page. When paginating, all other parameters provided
  7426  // to `ListDatacenterConnectors` must match the call that provided the page
  7427  // token.
  7428  func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
  7429  	c.urlParams_.Set("pageToken", pageToken)
  7430  	return c
  7431  }
  7432  
  7433  // Fields allows partial responses to be retrieved. See
  7434  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7435  // details.
  7436  func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
  7437  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7438  	return c
  7439  }
  7440  
  7441  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7442  // object's ETag matches the given value. This is useful for getting updates
  7443  // only after the object has changed since the last request.
  7444  func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
  7445  	c.ifNoneMatch_ = entityTag
  7446  	return c
  7447  }
  7448  
  7449  // Context sets the context to be used in this call's Do method.
  7450  func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsListCall {
  7451  	c.ctx_ = ctx
  7452  	return c
  7453  }
  7454  
  7455  // Header returns a http.Header that can be modified by the caller to add
  7456  // headers to the request.
  7457  func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Header() http.Header {
  7458  	if c.header_ == nil {
  7459  		c.header_ = make(http.Header)
  7460  	}
  7461  	return c.header_
  7462  }
  7463  
  7464  func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) doRequest(alt string) (*http.Response, error) {
  7465  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7466  	if c.ifNoneMatch_ != "" {
  7467  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7468  	}
  7469  	var body io.Reader = nil
  7470  	c.urlParams_.Set("alt", alt)
  7471  	c.urlParams_.Set("prettyPrint", "false")
  7472  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datacenterConnectors")
  7473  	urls += "?" + c.urlParams_.Encode()
  7474  	req, err := http.NewRequest("GET", urls, body)
  7475  	if err != nil {
  7476  		return nil, err
  7477  	}
  7478  	req.Header = reqHeaders
  7479  	googleapi.Expand(req.URL, map[string]string{
  7480  		"parent": c.parent,
  7481  	})
  7482  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7483  }
  7484  
  7485  // Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.list" call.
  7486  // Any non-2xx status code is an error. Response headers are in either
  7487  // *ListDatacenterConnectorsResponse.ServerResponse.Header or (if a response
  7488  // was returned at all) in error.(*googleapi.Error).Header. Use
  7489  // googleapi.IsNotModified to check whether the returned error was because
  7490  // http.StatusNotModified was returned.
  7491  func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Do(opts ...googleapi.CallOption) (*ListDatacenterConnectorsResponse, error) {
  7492  	gensupport.SetOptions(c.urlParams_, opts...)
  7493  	res, err := c.doRequest("json")
  7494  	if res != nil && res.StatusCode == http.StatusNotModified {
  7495  		if res.Body != nil {
  7496  			res.Body.Close()
  7497  		}
  7498  		return nil, gensupport.WrapError(&googleapi.Error{
  7499  			Code:   res.StatusCode,
  7500  			Header: res.Header,
  7501  		})
  7502  	}
  7503  	if err != nil {
  7504  		return nil, err
  7505  	}
  7506  	defer googleapi.CloseBody(res)
  7507  	if err := googleapi.CheckResponse(res); err != nil {
  7508  		return nil, gensupport.WrapError(err)
  7509  	}
  7510  	ret := &ListDatacenterConnectorsResponse{
  7511  		ServerResponse: googleapi.ServerResponse{
  7512  			Header:         res.Header,
  7513  			HTTPStatusCode: res.StatusCode,
  7514  		},
  7515  	}
  7516  	target := &ret
  7517  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7518  		return nil, err
  7519  	}
  7520  	return ret, nil
  7521  }
  7522  
  7523  // Pages invokes f for each page of results.
  7524  // A non-nil error returned from f will halt the iteration.
  7525  // The provided context supersedes any context provided to the Context method.
  7526  func (c *ProjectsLocationsSourcesDatacenterConnectorsListCall) Pages(ctx context.Context, f func(*ListDatacenterConnectorsResponse) error) error {
  7527  	c.ctx_ = ctx
  7528  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7529  	for {
  7530  		x, err := c.Do()
  7531  		if err != nil {
  7532  			return err
  7533  		}
  7534  		if err := f(x); err != nil {
  7535  			return err
  7536  		}
  7537  		if x.NextPageToken == "" {
  7538  			return nil
  7539  		}
  7540  		c.PageToken(x.NextPageToken)
  7541  	}
  7542  }
  7543  
  7544  type ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall struct {
  7545  	s                       *Service
  7546  	datacenterConnector     string
  7547  	upgradeappliancerequest *UpgradeApplianceRequest
  7548  	urlParams_              gensupport.URLParams
  7549  	ctx_                    context.Context
  7550  	header_                 http.Header
  7551  }
  7552  
  7553  // UpgradeAppliance: Upgrades the appliance relate to this DatacenterConnector
  7554  // to the in-place updateable version.
  7555  //
  7556  // - datacenterConnector: The DatacenterConnector name.
  7557  func (r *ProjectsLocationsSourcesDatacenterConnectorsService) UpgradeAppliance(datacenterConnector string, upgradeappliancerequest *UpgradeApplianceRequest) *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall {
  7558  	c := &ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7559  	c.datacenterConnector = datacenterConnector
  7560  	c.upgradeappliancerequest = upgradeappliancerequest
  7561  	return c
  7562  }
  7563  
  7564  // Fields allows partial responses to be retrieved. See
  7565  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7566  // details.
  7567  func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall {
  7568  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7569  	return c
  7570  }
  7571  
  7572  // Context sets the context to be used in this call's Do method.
  7573  func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) Context(ctx context.Context) *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall {
  7574  	c.ctx_ = ctx
  7575  	return c
  7576  }
  7577  
  7578  // Header returns a http.Header that can be modified by the caller to add
  7579  // headers to the request.
  7580  func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) Header() http.Header {
  7581  	if c.header_ == nil {
  7582  		c.header_ = make(http.Header)
  7583  	}
  7584  	return c.header_
  7585  }
  7586  
  7587  func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) doRequest(alt string) (*http.Response, error) {
  7588  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7589  	var body io.Reader = nil
  7590  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.upgradeappliancerequest)
  7591  	if err != nil {
  7592  		return nil, err
  7593  	}
  7594  	c.urlParams_.Set("alt", alt)
  7595  	c.urlParams_.Set("prettyPrint", "false")
  7596  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+datacenterConnector}:upgradeAppliance")
  7597  	urls += "?" + c.urlParams_.Encode()
  7598  	req, err := http.NewRequest("POST", urls, body)
  7599  	if err != nil {
  7600  		return nil, err
  7601  	}
  7602  	req.Header = reqHeaders
  7603  	googleapi.Expand(req.URL, map[string]string{
  7604  		"datacenterConnector": c.datacenterConnector,
  7605  	})
  7606  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7607  }
  7608  
  7609  // Do executes the "vmmigration.projects.locations.sources.datacenterConnectors.upgradeAppliance" call.
  7610  // Any non-2xx status code is an error. Response headers are in either
  7611  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7612  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7613  // whether the returned error was because http.StatusNotModified was returned.
  7614  func (c *ProjectsLocationsSourcesDatacenterConnectorsUpgradeApplianceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7615  	gensupport.SetOptions(c.urlParams_, opts...)
  7616  	res, err := c.doRequest("json")
  7617  	if res != nil && res.StatusCode == http.StatusNotModified {
  7618  		if res.Body != nil {
  7619  			res.Body.Close()
  7620  		}
  7621  		return nil, gensupport.WrapError(&googleapi.Error{
  7622  			Code:   res.StatusCode,
  7623  			Header: res.Header,
  7624  		})
  7625  	}
  7626  	if err != nil {
  7627  		return nil, err
  7628  	}
  7629  	defer googleapi.CloseBody(res)
  7630  	if err := googleapi.CheckResponse(res); err != nil {
  7631  		return nil, gensupport.WrapError(err)
  7632  	}
  7633  	ret := &Operation{
  7634  		ServerResponse: googleapi.ServerResponse{
  7635  			Header:         res.Header,
  7636  			HTTPStatusCode: res.StatusCode,
  7637  		},
  7638  	}
  7639  	target := &ret
  7640  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7641  		return nil, err
  7642  	}
  7643  	return ret, nil
  7644  }
  7645  
  7646  type ProjectsLocationsSourcesMigratingVmsCreateCall struct {
  7647  	s           *Service
  7648  	parent      string
  7649  	migratingvm *MigratingVm
  7650  	urlParams_  gensupport.URLParams
  7651  	ctx_        context.Context
  7652  	header_     http.Header
  7653  }
  7654  
  7655  // Create: Creates a new MigratingVm in a given Source.
  7656  //
  7657  // - parent: The MigratingVm's parent.
  7658  func (r *ProjectsLocationsSourcesMigratingVmsService) Create(parent string, migratingvm *MigratingVm) *ProjectsLocationsSourcesMigratingVmsCreateCall {
  7659  	c := &ProjectsLocationsSourcesMigratingVmsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7660  	c.parent = parent
  7661  	c.migratingvm = migratingvm
  7662  	return c
  7663  }
  7664  
  7665  // MigratingVmId sets the optional parameter "migratingVmId": Required. The
  7666  // migratingVm identifier.
  7667  func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) MigratingVmId(migratingVmId string) *ProjectsLocationsSourcesMigratingVmsCreateCall {
  7668  	c.urlParams_.Set("migratingVmId", migratingVmId)
  7669  	return c
  7670  }
  7671  
  7672  // RequestId sets the optional parameter "requestId": A request ID to identify
  7673  // requests. Specify a unique request ID so that if you must retry your
  7674  // request, the server will know to ignore the request if it has already been
  7675  // completed. The server will guarantee that for at least 60 minutes since the
  7676  // first request. For example, consider a situation where you make an initial
  7677  // request and the request times out. If you make the request again with the
  7678  // same request ID, the server can check if original operation with the same
  7679  // request ID was received, and if so, will ignore the second request. This
  7680  // prevents clients from accidentally creating duplicate commitments. The
  7681  // request ID must be a valid UUID with the exception that zero UUID is not
  7682  // supported (00000000-0000-0000-0000-000000000000).
  7683  func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsCreateCall {
  7684  	c.urlParams_.Set("requestId", requestId)
  7685  	return c
  7686  }
  7687  
  7688  // Fields allows partial responses to be retrieved. See
  7689  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7690  // details.
  7691  func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCreateCall {
  7692  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7693  	return c
  7694  }
  7695  
  7696  // Context sets the context to be used in this call's Do method.
  7697  func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCreateCall {
  7698  	c.ctx_ = ctx
  7699  	return c
  7700  }
  7701  
  7702  // Header returns a http.Header that can be modified by the caller to add
  7703  // headers to the request.
  7704  func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Header() http.Header {
  7705  	if c.header_ == nil {
  7706  		c.header_ = make(http.Header)
  7707  	}
  7708  	return c.header_
  7709  }
  7710  
  7711  func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) doRequest(alt string) (*http.Response, error) {
  7712  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7713  	var body io.Reader = nil
  7714  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.migratingvm)
  7715  	if err != nil {
  7716  		return nil, err
  7717  	}
  7718  	c.urlParams_.Set("alt", alt)
  7719  	c.urlParams_.Set("prettyPrint", "false")
  7720  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratingVms")
  7721  	urls += "?" + c.urlParams_.Encode()
  7722  	req, err := http.NewRequest("POST", urls, body)
  7723  	if err != nil {
  7724  		return nil, err
  7725  	}
  7726  	req.Header = reqHeaders
  7727  	googleapi.Expand(req.URL, map[string]string{
  7728  		"parent": c.parent,
  7729  	})
  7730  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7731  }
  7732  
  7733  // Do executes the "vmmigration.projects.locations.sources.migratingVms.create" call.
  7734  // Any non-2xx status code is an error. Response headers are in either
  7735  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7736  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7737  // whether the returned error was because http.StatusNotModified was returned.
  7738  func (c *ProjectsLocationsSourcesMigratingVmsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7739  	gensupport.SetOptions(c.urlParams_, opts...)
  7740  	res, err := c.doRequest("json")
  7741  	if res != nil && res.StatusCode == http.StatusNotModified {
  7742  		if res.Body != nil {
  7743  			res.Body.Close()
  7744  		}
  7745  		return nil, gensupport.WrapError(&googleapi.Error{
  7746  			Code:   res.StatusCode,
  7747  			Header: res.Header,
  7748  		})
  7749  	}
  7750  	if err != nil {
  7751  		return nil, err
  7752  	}
  7753  	defer googleapi.CloseBody(res)
  7754  	if err := googleapi.CheckResponse(res); err != nil {
  7755  		return nil, gensupport.WrapError(err)
  7756  	}
  7757  	ret := &Operation{
  7758  		ServerResponse: googleapi.ServerResponse{
  7759  			Header:         res.Header,
  7760  			HTTPStatusCode: res.StatusCode,
  7761  		},
  7762  	}
  7763  	target := &ret
  7764  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7765  		return nil, err
  7766  	}
  7767  	return ret, nil
  7768  }
  7769  
  7770  type ProjectsLocationsSourcesMigratingVmsDeleteCall struct {
  7771  	s          *Service
  7772  	name       string
  7773  	urlParams_ gensupport.URLParams
  7774  	ctx_       context.Context
  7775  	header_    http.Header
  7776  }
  7777  
  7778  // Delete: Deletes a single MigratingVm.
  7779  //
  7780  // - name: The name of the MigratingVm.
  7781  func (r *ProjectsLocationsSourcesMigratingVmsService) Delete(name string) *ProjectsLocationsSourcesMigratingVmsDeleteCall {
  7782  	c := &ProjectsLocationsSourcesMigratingVmsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7783  	c.name = name
  7784  	return c
  7785  }
  7786  
  7787  // Fields allows partial responses to be retrieved. See
  7788  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7789  // details.
  7790  func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsDeleteCall {
  7791  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7792  	return c
  7793  }
  7794  
  7795  // Context sets the context to be used in this call's Do method.
  7796  func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsDeleteCall {
  7797  	c.ctx_ = ctx
  7798  	return c
  7799  }
  7800  
  7801  // Header returns a http.Header that can be modified by the caller to add
  7802  // headers to the request.
  7803  func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Header() http.Header {
  7804  	if c.header_ == nil {
  7805  		c.header_ = make(http.Header)
  7806  	}
  7807  	return c.header_
  7808  }
  7809  
  7810  func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7811  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7812  	var body io.Reader = nil
  7813  	c.urlParams_.Set("alt", alt)
  7814  	c.urlParams_.Set("prettyPrint", "false")
  7815  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7816  	urls += "?" + c.urlParams_.Encode()
  7817  	req, err := http.NewRequest("DELETE", urls, body)
  7818  	if err != nil {
  7819  		return nil, err
  7820  	}
  7821  	req.Header = reqHeaders
  7822  	googleapi.Expand(req.URL, map[string]string{
  7823  		"name": c.name,
  7824  	})
  7825  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7826  }
  7827  
  7828  // Do executes the "vmmigration.projects.locations.sources.migratingVms.delete" call.
  7829  // Any non-2xx status code is an error. Response headers are in either
  7830  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7831  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7832  // whether the returned error was because http.StatusNotModified was returned.
  7833  func (c *ProjectsLocationsSourcesMigratingVmsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7834  	gensupport.SetOptions(c.urlParams_, opts...)
  7835  	res, err := c.doRequest("json")
  7836  	if res != nil && res.StatusCode == http.StatusNotModified {
  7837  		if res.Body != nil {
  7838  			res.Body.Close()
  7839  		}
  7840  		return nil, gensupport.WrapError(&googleapi.Error{
  7841  			Code:   res.StatusCode,
  7842  			Header: res.Header,
  7843  		})
  7844  	}
  7845  	if err != nil {
  7846  		return nil, err
  7847  	}
  7848  	defer googleapi.CloseBody(res)
  7849  	if err := googleapi.CheckResponse(res); err != nil {
  7850  		return nil, gensupport.WrapError(err)
  7851  	}
  7852  	ret := &Operation{
  7853  		ServerResponse: googleapi.ServerResponse{
  7854  			Header:         res.Header,
  7855  			HTTPStatusCode: res.StatusCode,
  7856  		},
  7857  	}
  7858  	target := &ret
  7859  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7860  		return nil, err
  7861  	}
  7862  	return ret, nil
  7863  }
  7864  
  7865  type ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall struct {
  7866  	s                        *Service
  7867  	migratingVm              string
  7868  	finalizemigrationrequest *FinalizeMigrationRequest
  7869  	urlParams_               gensupport.URLParams
  7870  	ctx_                     context.Context
  7871  	header_                  http.Header
  7872  }
  7873  
  7874  // FinalizeMigration: Marks a migration as completed, deleting migration
  7875  // resources that are no longer being used. Only applicable after cutover is
  7876  // done.
  7877  //
  7878  // - migratingVm: The name of the MigratingVm.
  7879  func (r *ProjectsLocationsSourcesMigratingVmsService) FinalizeMigration(migratingVm string, finalizemigrationrequest *FinalizeMigrationRequest) *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall {
  7880  	c := &ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7881  	c.migratingVm = migratingVm
  7882  	c.finalizemigrationrequest = finalizemigrationrequest
  7883  	return c
  7884  }
  7885  
  7886  // Fields allows partial responses to be retrieved. See
  7887  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7888  // details.
  7889  func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall {
  7890  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7891  	return c
  7892  }
  7893  
  7894  // Context sets the context to be used in this call's Do method.
  7895  func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall {
  7896  	c.ctx_ = ctx
  7897  	return c
  7898  }
  7899  
  7900  // Header returns a http.Header that can be modified by the caller to add
  7901  // headers to the request.
  7902  func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Header() http.Header {
  7903  	if c.header_ == nil {
  7904  		c.header_ = make(http.Header)
  7905  	}
  7906  	return c.header_
  7907  }
  7908  
  7909  func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) doRequest(alt string) (*http.Response, error) {
  7910  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7911  	var body io.Reader = nil
  7912  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.finalizemigrationrequest)
  7913  	if err != nil {
  7914  		return nil, err
  7915  	}
  7916  	c.urlParams_.Set("alt", alt)
  7917  	c.urlParams_.Set("prettyPrint", "false")
  7918  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migratingVm}:finalizeMigration")
  7919  	urls += "?" + c.urlParams_.Encode()
  7920  	req, err := http.NewRequest("POST", urls, body)
  7921  	if err != nil {
  7922  		return nil, err
  7923  	}
  7924  	req.Header = reqHeaders
  7925  	googleapi.Expand(req.URL, map[string]string{
  7926  		"migratingVm": c.migratingVm,
  7927  	})
  7928  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7929  }
  7930  
  7931  // Do executes the "vmmigration.projects.locations.sources.migratingVms.finalizeMigration" call.
  7932  // Any non-2xx status code is an error. Response headers are in either
  7933  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7934  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7935  // whether the returned error was because http.StatusNotModified was returned.
  7936  func (c *ProjectsLocationsSourcesMigratingVmsFinalizeMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7937  	gensupport.SetOptions(c.urlParams_, opts...)
  7938  	res, err := c.doRequest("json")
  7939  	if res != nil && res.StatusCode == http.StatusNotModified {
  7940  		if res.Body != nil {
  7941  			res.Body.Close()
  7942  		}
  7943  		return nil, gensupport.WrapError(&googleapi.Error{
  7944  			Code:   res.StatusCode,
  7945  			Header: res.Header,
  7946  		})
  7947  	}
  7948  	if err != nil {
  7949  		return nil, err
  7950  	}
  7951  	defer googleapi.CloseBody(res)
  7952  	if err := googleapi.CheckResponse(res); err != nil {
  7953  		return nil, gensupport.WrapError(err)
  7954  	}
  7955  	ret := &Operation{
  7956  		ServerResponse: googleapi.ServerResponse{
  7957  			Header:         res.Header,
  7958  			HTTPStatusCode: res.StatusCode,
  7959  		},
  7960  	}
  7961  	target := &ret
  7962  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7963  		return nil, err
  7964  	}
  7965  	return ret, nil
  7966  }
  7967  
  7968  type ProjectsLocationsSourcesMigratingVmsGetCall struct {
  7969  	s            *Service
  7970  	name         string
  7971  	urlParams_   gensupport.URLParams
  7972  	ifNoneMatch_ string
  7973  	ctx_         context.Context
  7974  	header_      http.Header
  7975  }
  7976  
  7977  // Get: Gets details of a single MigratingVm.
  7978  //
  7979  // - name: The name of the MigratingVm.
  7980  func (r *ProjectsLocationsSourcesMigratingVmsService) Get(name string) *ProjectsLocationsSourcesMigratingVmsGetCall {
  7981  	c := &ProjectsLocationsSourcesMigratingVmsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7982  	c.name = name
  7983  	return c
  7984  }
  7985  
  7986  // View sets the optional parameter "view": The level of details of the
  7987  // migrating VM.
  7988  //
  7989  // Possible values:
  7990  //
  7991  //	"MIGRATING_VM_VIEW_UNSPECIFIED" - View is unspecified. The API will
  7992  //
  7993  // fallback to the default value.
  7994  //
  7995  //	"MIGRATING_VM_VIEW_BASIC" - Get the migrating VM basic details. The basic
  7996  //
  7997  // details do not include the recent clone jobs and recent cutover jobs lists.
  7998  //
  7999  //	"MIGRATING_VM_VIEW_FULL" - Include everything.
  8000  func (c *ProjectsLocationsSourcesMigratingVmsGetCall) View(view string) *ProjectsLocationsSourcesMigratingVmsGetCall {
  8001  	c.urlParams_.Set("view", view)
  8002  	return c
  8003  }
  8004  
  8005  // Fields allows partial responses to be retrieved. See
  8006  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8007  // details.
  8008  func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsGetCall {
  8009  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8010  	return c
  8011  }
  8012  
  8013  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8014  // object's ETag matches the given value. This is useful for getting updates
  8015  // only after the object has changed since the last request.
  8016  func (c *ProjectsLocationsSourcesMigratingVmsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsGetCall {
  8017  	c.ifNoneMatch_ = entityTag
  8018  	return c
  8019  }
  8020  
  8021  // Context sets the context to be used in this call's Do method.
  8022  func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsGetCall {
  8023  	c.ctx_ = ctx
  8024  	return c
  8025  }
  8026  
  8027  // Header returns a http.Header that can be modified by the caller to add
  8028  // headers to the request.
  8029  func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Header() http.Header {
  8030  	if c.header_ == nil {
  8031  		c.header_ = make(http.Header)
  8032  	}
  8033  	return c.header_
  8034  }
  8035  
  8036  func (c *ProjectsLocationsSourcesMigratingVmsGetCall) doRequest(alt string) (*http.Response, error) {
  8037  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8038  	if c.ifNoneMatch_ != "" {
  8039  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8040  	}
  8041  	var body io.Reader = nil
  8042  	c.urlParams_.Set("alt", alt)
  8043  	c.urlParams_.Set("prettyPrint", "false")
  8044  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8045  	urls += "?" + c.urlParams_.Encode()
  8046  	req, err := http.NewRequest("GET", urls, body)
  8047  	if err != nil {
  8048  		return nil, err
  8049  	}
  8050  	req.Header = reqHeaders
  8051  	googleapi.Expand(req.URL, map[string]string{
  8052  		"name": c.name,
  8053  	})
  8054  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8055  }
  8056  
  8057  // Do executes the "vmmigration.projects.locations.sources.migratingVms.get" call.
  8058  // Any non-2xx status code is an error. Response headers are in either
  8059  // *MigratingVm.ServerResponse.Header or (if a response was returned at all) in
  8060  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8061  // whether the returned error was because http.StatusNotModified was returned.
  8062  func (c *ProjectsLocationsSourcesMigratingVmsGetCall) Do(opts ...googleapi.CallOption) (*MigratingVm, error) {
  8063  	gensupport.SetOptions(c.urlParams_, opts...)
  8064  	res, err := c.doRequest("json")
  8065  	if res != nil && res.StatusCode == http.StatusNotModified {
  8066  		if res.Body != nil {
  8067  			res.Body.Close()
  8068  		}
  8069  		return nil, gensupport.WrapError(&googleapi.Error{
  8070  			Code:   res.StatusCode,
  8071  			Header: res.Header,
  8072  		})
  8073  	}
  8074  	if err != nil {
  8075  		return nil, err
  8076  	}
  8077  	defer googleapi.CloseBody(res)
  8078  	if err := googleapi.CheckResponse(res); err != nil {
  8079  		return nil, gensupport.WrapError(err)
  8080  	}
  8081  	ret := &MigratingVm{
  8082  		ServerResponse: googleapi.ServerResponse{
  8083  			Header:         res.Header,
  8084  			HTTPStatusCode: res.StatusCode,
  8085  		},
  8086  	}
  8087  	target := &ret
  8088  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8089  		return nil, err
  8090  	}
  8091  	return ret, nil
  8092  }
  8093  
  8094  type ProjectsLocationsSourcesMigratingVmsListCall struct {
  8095  	s            *Service
  8096  	parent       string
  8097  	urlParams_   gensupport.URLParams
  8098  	ifNoneMatch_ string
  8099  	ctx_         context.Context
  8100  	header_      http.Header
  8101  }
  8102  
  8103  // List: Lists MigratingVms in a given Source.
  8104  //
  8105  // - parent: The parent, which owns this collection of MigratingVms.
  8106  func (r *ProjectsLocationsSourcesMigratingVmsService) List(parent string) *ProjectsLocationsSourcesMigratingVmsListCall {
  8107  	c := &ProjectsLocationsSourcesMigratingVmsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8108  	c.parent = parent
  8109  	return c
  8110  }
  8111  
  8112  // Filter sets the optional parameter "filter": The filter request.
  8113  func (c *ProjectsLocationsSourcesMigratingVmsListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsListCall {
  8114  	c.urlParams_.Set("filter", filter)
  8115  	return c
  8116  }
  8117  
  8118  // OrderBy sets the optional parameter "orderBy": the order by fields for the
  8119  // result.
  8120  func (c *ProjectsLocationsSourcesMigratingVmsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsListCall {
  8121  	c.urlParams_.Set("orderBy", orderBy)
  8122  	return c
  8123  }
  8124  
  8125  // PageSize sets the optional parameter "pageSize": The maximum number of
  8126  // migrating VMs to return. The service may return fewer than this value. If
  8127  // unspecified, at most 500 migrating VMs will be returned. The maximum value
  8128  // is 1000; values above 1000 will be coerced to 1000.
  8129  func (c *ProjectsLocationsSourcesMigratingVmsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsListCall {
  8130  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8131  	return c
  8132  }
  8133  
  8134  // PageToken sets the optional parameter "pageToken": Required. A page token,
  8135  // received from a previous `ListMigratingVms` call. Provide this to retrieve
  8136  // the subsequent page. When paginating, all other parameters provided to
  8137  // `ListMigratingVms` must match the call that provided the page token.
  8138  func (c *ProjectsLocationsSourcesMigratingVmsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsListCall {
  8139  	c.urlParams_.Set("pageToken", pageToken)
  8140  	return c
  8141  }
  8142  
  8143  // View sets the optional parameter "view": The level of details of each
  8144  // migrating VM.
  8145  //
  8146  // Possible values:
  8147  //
  8148  //	"MIGRATING_VM_VIEW_UNSPECIFIED" - View is unspecified. The API will
  8149  //
  8150  // fallback to the default value.
  8151  //
  8152  //	"MIGRATING_VM_VIEW_BASIC" - Get the migrating VM basic details. The basic
  8153  //
  8154  // details do not include the recent clone jobs and recent cutover jobs lists.
  8155  //
  8156  //	"MIGRATING_VM_VIEW_FULL" - Include everything.
  8157  func (c *ProjectsLocationsSourcesMigratingVmsListCall) View(view string) *ProjectsLocationsSourcesMigratingVmsListCall {
  8158  	c.urlParams_.Set("view", view)
  8159  	return c
  8160  }
  8161  
  8162  // Fields allows partial responses to be retrieved. See
  8163  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8164  // details.
  8165  func (c *ProjectsLocationsSourcesMigratingVmsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsListCall {
  8166  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8167  	return c
  8168  }
  8169  
  8170  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8171  // object's ETag matches the given value. This is useful for getting updates
  8172  // only after the object has changed since the last request.
  8173  func (c *ProjectsLocationsSourcesMigratingVmsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsListCall {
  8174  	c.ifNoneMatch_ = entityTag
  8175  	return c
  8176  }
  8177  
  8178  // Context sets the context to be used in this call's Do method.
  8179  func (c *ProjectsLocationsSourcesMigratingVmsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsListCall {
  8180  	c.ctx_ = ctx
  8181  	return c
  8182  }
  8183  
  8184  // Header returns a http.Header that can be modified by the caller to add
  8185  // headers to the request.
  8186  func (c *ProjectsLocationsSourcesMigratingVmsListCall) Header() http.Header {
  8187  	if c.header_ == nil {
  8188  		c.header_ = make(http.Header)
  8189  	}
  8190  	return c.header_
  8191  }
  8192  
  8193  func (c *ProjectsLocationsSourcesMigratingVmsListCall) doRequest(alt string) (*http.Response, error) {
  8194  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8195  	if c.ifNoneMatch_ != "" {
  8196  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8197  	}
  8198  	var body io.Reader = nil
  8199  	c.urlParams_.Set("alt", alt)
  8200  	c.urlParams_.Set("prettyPrint", "false")
  8201  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratingVms")
  8202  	urls += "?" + c.urlParams_.Encode()
  8203  	req, err := http.NewRequest("GET", urls, body)
  8204  	if err != nil {
  8205  		return nil, err
  8206  	}
  8207  	req.Header = reqHeaders
  8208  	googleapi.Expand(req.URL, map[string]string{
  8209  		"parent": c.parent,
  8210  	})
  8211  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8212  }
  8213  
  8214  // Do executes the "vmmigration.projects.locations.sources.migratingVms.list" call.
  8215  // Any non-2xx status code is an error. Response headers are in either
  8216  // *ListMigratingVmsResponse.ServerResponse.Header or (if a response was
  8217  // returned at all) in error.(*googleapi.Error).Header. Use
  8218  // googleapi.IsNotModified to check whether the returned error was because
  8219  // http.StatusNotModified was returned.
  8220  func (c *ProjectsLocationsSourcesMigratingVmsListCall) Do(opts ...googleapi.CallOption) (*ListMigratingVmsResponse, error) {
  8221  	gensupport.SetOptions(c.urlParams_, opts...)
  8222  	res, err := c.doRequest("json")
  8223  	if res != nil && res.StatusCode == http.StatusNotModified {
  8224  		if res.Body != nil {
  8225  			res.Body.Close()
  8226  		}
  8227  		return nil, gensupport.WrapError(&googleapi.Error{
  8228  			Code:   res.StatusCode,
  8229  			Header: res.Header,
  8230  		})
  8231  	}
  8232  	if err != nil {
  8233  		return nil, err
  8234  	}
  8235  	defer googleapi.CloseBody(res)
  8236  	if err := googleapi.CheckResponse(res); err != nil {
  8237  		return nil, gensupport.WrapError(err)
  8238  	}
  8239  	ret := &ListMigratingVmsResponse{
  8240  		ServerResponse: googleapi.ServerResponse{
  8241  			Header:         res.Header,
  8242  			HTTPStatusCode: res.StatusCode,
  8243  		},
  8244  	}
  8245  	target := &ret
  8246  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8247  		return nil, err
  8248  	}
  8249  	return ret, nil
  8250  }
  8251  
  8252  // Pages invokes f for each page of results.
  8253  // A non-nil error returned from f will halt the iteration.
  8254  // The provided context supersedes any context provided to the Context method.
  8255  func (c *ProjectsLocationsSourcesMigratingVmsListCall) Pages(ctx context.Context, f func(*ListMigratingVmsResponse) error) error {
  8256  	c.ctx_ = ctx
  8257  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8258  	for {
  8259  		x, err := c.Do()
  8260  		if err != nil {
  8261  			return err
  8262  		}
  8263  		if err := f(x); err != nil {
  8264  			return err
  8265  		}
  8266  		if x.NextPageToken == "" {
  8267  			return nil
  8268  		}
  8269  		c.PageToken(x.NextPageToken)
  8270  	}
  8271  }
  8272  
  8273  type ProjectsLocationsSourcesMigratingVmsPatchCall struct {
  8274  	s           *Service
  8275  	nameid      string
  8276  	migratingvm *MigratingVm
  8277  	urlParams_  gensupport.URLParams
  8278  	ctx_        context.Context
  8279  	header_     http.Header
  8280  }
  8281  
  8282  // Patch: Updates the parameters of a single MigratingVm.
  8283  //
  8284  // - name: Output only. The identifier of the MigratingVm.
  8285  func (r *ProjectsLocationsSourcesMigratingVmsService) Patch(nameid string, migratingvm *MigratingVm) *ProjectsLocationsSourcesMigratingVmsPatchCall {
  8286  	c := &ProjectsLocationsSourcesMigratingVmsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8287  	c.nameid = nameid
  8288  	c.migratingvm = migratingvm
  8289  	return c
  8290  }
  8291  
  8292  // RequestId sets the optional parameter "requestId": A request ID to identify
  8293  // requests. Specify a unique request ID so that if you must retry your
  8294  // request, the server will know to ignore the request if it has already been
  8295  // completed. The server will guarantee that for at least 60 minutes since the
  8296  // first request. For example, consider a situation where you make an initial
  8297  // request and the request times out. If you make the request again with the
  8298  // same request ID, the server can check if original operation with the same
  8299  // request ID was received, and if so, will ignore the second request. This
  8300  // prevents clients from accidentally creating duplicate commitments. The
  8301  // request ID must be a valid UUID with the exception that zero UUID is not
  8302  // supported (00000000-0000-0000-0000-000000000000).
  8303  func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsPatchCall {
  8304  	c.urlParams_.Set("requestId", requestId)
  8305  	return c
  8306  }
  8307  
  8308  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  8309  // specify the fields to be overwritten in the MigratingVm resource by the
  8310  // update. The fields specified in the update_mask are relative to the
  8311  // resource, not the full request. A field will be overwritten if it is in the
  8312  // mask. If the user does not provide a mask then all fields will be
  8313  // overwritten.
  8314  func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSourcesMigratingVmsPatchCall {
  8315  	c.urlParams_.Set("updateMask", updateMask)
  8316  	return c
  8317  }
  8318  
  8319  // Fields allows partial responses to be retrieved. See
  8320  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8321  // details.
  8322  func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsPatchCall {
  8323  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8324  	return c
  8325  }
  8326  
  8327  // Context sets the context to be used in this call's Do method.
  8328  func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsPatchCall {
  8329  	c.ctx_ = ctx
  8330  	return c
  8331  }
  8332  
  8333  // Header returns a http.Header that can be modified by the caller to add
  8334  // headers to the request.
  8335  func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Header() http.Header {
  8336  	if c.header_ == nil {
  8337  		c.header_ = make(http.Header)
  8338  	}
  8339  	return c.header_
  8340  }
  8341  
  8342  func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) doRequest(alt string) (*http.Response, error) {
  8343  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8344  	var body io.Reader = nil
  8345  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.migratingvm)
  8346  	if err != nil {
  8347  		return nil, err
  8348  	}
  8349  	c.urlParams_.Set("alt", alt)
  8350  	c.urlParams_.Set("prettyPrint", "false")
  8351  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8352  	urls += "?" + c.urlParams_.Encode()
  8353  	req, err := http.NewRequest("PATCH", urls, body)
  8354  	if err != nil {
  8355  		return nil, err
  8356  	}
  8357  	req.Header = reqHeaders
  8358  	googleapi.Expand(req.URL, map[string]string{
  8359  		"name": c.nameid,
  8360  	})
  8361  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8362  }
  8363  
  8364  // Do executes the "vmmigration.projects.locations.sources.migratingVms.patch" call.
  8365  // Any non-2xx status code is an error. Response headers are in either
  8366  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8367  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8368  // whether the returned error was because http.StatusNotModified was returned.
  8369  func (c *ProjectsLocationsSourcesMigratingVmsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8370  	gensupport.SetOptions(c.urlParams_, opts...)
  8371  	res, err := c.doRequest("json")
  8372  	if res != nil && res.StatusCode == http.StatusNotModified {
  8373  		if res.Body != nil {
  8374  			res.Body.Close()
  8375  		}
  8376  		return nil, gensupport.WrapError(&googleapi.Error{
  8377  			Code:   res.StatusCode,
  8378  			Header: res.Header,
  8379  		})
  8380  	}
  8381  	if err != nil {
  8382  		return nil, err
  8383  	}
  8384  	defer googleapi.CloseBody(res)
  8385  	if err := googleapi.CheckResponse(res); err != nil {
  8386  		return nil, gensupport.WrapError(err)
  8387  	}
  8388  	ret := &Operation{
  8389  		ServerResponse: googleapi.ServerResponse{
  8390  			Header:         res.Header,
  8391  			HTTPStatusCode: res.StatusCode,
  8392  		},
  8393  	}
  8394  	target := &ret
  8395  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8396  		return nil, err
  8397  	}
  8398  	return ret, nil
  8399  }
  8400  
  8401  type ProjectsLocationsSourcesMigratingVmsPauseMigrationCall struct {
  8402  	s                     *Service
  8403  	migratingVm           string
  8404  	pausemigrationrequest *PauseMigrationRequest
  8405  	urlParams_            gensupport.URLParams
  8406  	ctx_                  context.Context
  8407  	header_               http.Header
  8408  }
  8409  
  8410  // PauseMigration: Pauses a migration for a VM. If cycle tasks are running they
  8411  // will be cancelled, preserving source task data. Further replication cycles
  8412  // will not be triggered while the VM is paused.
  8413  //
  8414  // - migratingVm: The name of the MigratingVm.
  8415  func (r *ProjectsLocationsSourcesMigratingVmsService) PauseMigration(migratingVm string, pausemigrationrequest *PauseMigrationRequest) *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall {
  8416  	c := &ProjectsLocationsSourcesMigratingVmsPauseMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8417  	c.migratingVm = migratingVm
  8418  	c.pausemigrationrequest = pausemigrationrequest
  8419  	return c
  8420  }
  8421  
  8422  // Fields allows partial responses to be retrieved. See
  8423  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8424  // details.
  8425  func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall {
  8426  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8427  	return c
  8428  }
  8429  
  8430  // Context sets the context to be used in this call's Do method.
  8431  func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall {
  8432  	c.ctx_ = ctx
  8433  	return c
  8434  }
  8435  
  8436  // Header returns a http.Header that can be modified by the caller to add
  8437  // headers to the request.
  8438  func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Header() http.Header {
  8439  	if c.header_ == nil {
  8440  		c.header_ = make(http.Header)
  8441  	}
  8442  	return c.header_
  8443  }
  8444  
  8445  func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) doRequest(alt string) (*http.Response, error) {
  8446  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8447  	var body io.Reader = nil
  8448  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pausemigrationrequest)
  8449  	if err != nil {
  8450  		return nil, err
  8451  	}
  8452  	c.urlParams_.Set("alt", alt)
  8453  	c.urlParams_.Set("prettyPrint", "false")
  8454  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migratingVm}:pauseMigration")
  8455  	urls += "?" + c.urlParams_.Encode()
  8456  	req, err := http.NewRequest("POST", urls, body)
  8457  	if err != nil {
  8458  		return nil, err
  8459  	}
  8460  	req.Header = reqHeaders
  8461  	googleapi.Expand(req.URL, map[string]string{
  8462  		"migratingVm": c.migratingVm,
  8463  	})
  8464  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8465  }
  8466  
  8467  // Do executes the "vmmigration.projects.locations.sources.migratingVms.pauseMigration" call.
  8468  // Any non-2xx status code is an error. Response headers are in either
  8469  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8470  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8471  // whether the returned error was because http.StatusNotModified was returned.
  8472  func (c *ProjectsLocationsSourcesMigratingVmsPauseMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8473  	gensupport.SetOptions(c.urlParams_, opts...)
  8474  	res, err := c.doRequest("json")
  8475  	if res != nil && res.StatusCode == http.StatusNotModified {
  8476  		if res.Body != nil {
  8477  			res.Body.Close()
  8478  		}
  8479  		return nil, gensupport.WrapError(&googleapi.Error{
  8480  			Code:   res.StatusCode,
  8481  			Header: res.Header,
  8482  		})
  8483  	}
  8484  	if err != nil {
  8485  		return nil, err
  8486  	}
  8487  	defer googleapi.CloseBody(res)
  8488  	if err := googleapi.CheckResponse(res); err != nil {
  8489  		return nil, gensupport.WrapError(err)
  8490  	}
  8491  	ret := &Operation{
  8492  		ServerResponse: googleapi.ServerResponse{
  8493  			Header:         res.Header,
  8494  			HTTPStatusCode: res.StatusCode,
  8495  		},
  8496  	}
  8497  	target := &ret
  8498  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8499  		return nil, err
  8500  	}
  8501  	return ret, nil
  8502  }
  8503  
  8504  type ProjectsLocationsSourcesMigratingVmsResumeMigrationCall struct {
  8505  	s                      *Service
  8506  	migratingVm            string
  8507  	resumemigrationrequest *ResumeMigrationRequest
  8508  	urlParams_             gensupport.URLParams
  8509  	ctx_                   context.Context
  8510  	header_                http.Header
  8511  }
  8512  
  8513  // ResumeMigration: Resumes a migration for a VM. When called on a paused
  8514  // migration, will start the process of uploading data and creating snapshots;
  8515  // when called on a completed cut-over migration, will update the migration to
  8516  // active state and start the process of uploading data and creating snapshots.
  8517  //
  8518  // - migratingVm: The name of the MigratingVm.
  8519  func (r *ProjectsLocationsSourcesMigratingVmsService) ResumeMigration(migratingVm string, resumemigrationrequest *ResumeMigrationRequest) *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall {
  8520  	c := &ProjectsLocationsSourcesMigratingVmsResumeMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8521  	c.migratingVm = migratingVm
  8522  	c.resumemigrationrequest = resumemigrationrequest
  8523  	return c
  8524  }
  8525  
  8526  // Fields allows partial responses to be retrieved. See
  8527  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8528  // details.
  8529  func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall {
  8530  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8531  	return c
  8532  }
  8533  
  8534  // Context sets the context to be used in this call's Do method.
  8535  func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall {
  8536  	c.ctx_ = ctx
  8537  	return c
  8538  }
  8539  
  8540  // Header returns a http.Header that can be modified by the caller to add
  8541  // headers to the request.
  8542  func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Header() http.Header {
  8543  	if c.header_ == nil {
  8544  		c.header_ = make(http.Header)
  8545  	}
  8546  	return c.header_
  8547  }
  8548  
  8549  func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) doRequest(alt string) (*http.Response, error) {
  8550  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8551  	var body io.Reader = nil
  8552  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumemigrationrequest)
  8553  	if err != nil {
  8554  		return nil, err
  8555  	}
  8556  	c.urlParams_.Set("alt", alt)
  8557  	c.urlParams_.Set("prettyPrint", "false")
  8558  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migratingVm}:resumeMigration")
  8559  	urls += "?" + c.urlParams_.Encode()
  8560  	req, err := http.NewRequest("POST", urls, body)
  8561  	if err != nil {
  8562  		return nil, err
  8563  	}
  8564  	req.Header = reqHeaders
  8565  	googleapi.Expand(req.URL, map[string]string{
  8566  		"migratingVm": c.migratingVm,
  8567  	})
  8568  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8569  }
  8570  
  8571  // Do executes the "vmmigration.projects.locations.sources.migratingVms.resumeMigration" call.
  8572  // Any non-2xx status code is an error. Response headers are in either
  8573  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8574  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8575  // whether the returned error was because http.StatusNotModified was returned.
  8576  func (c *ProjectsLocationsSourcesMigratingVmsResumeMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8577  	gensupport.SetOptions(c.urlParams_, opts...)
  8578  	res, err := c.doRequest("json")
  8579  	if res != nil && res.StatusCode == http.StatusNotModified {
  8580  		if res.Body != nil {
  8581  			res.Body.Close()
  8582  		}
  8583  		return nil, gensupport.WrapError(&googleapi.Error{
  8584  			Code:   res.StatusCode,
  8585  			Header: res.Header,
  8586  		})
  8587  	}
  8588  	if err != nil {
  8589  		return nil, err
  8590  	}
  8591  	defer googleapi.CloseBody(res)
  8592  	if err := googleapi.CheckResponse(res); err != nil {
  8593  		return nil, gensupport.WrapError(err)
  8594  	}
  8595  	ret := &Operation{
  8596  		ServerResponse: googleapi.ServerResponse{
  8597  			Header:         res.Header,
  8598  			HTTPStatusCode: res.StatusCode,
  8599  		},
  8600  	}
  8601  	target := &ret
  8602  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8603  		return nil, err
  8604  	}
  8605  	return ret, nil
  8606  }
  8607  
  8608  type ProjectsLocationsSourcesMigratingVmsStartMigrationCall struct {
  8609  	s                     *Service
  8610  	migratingVm           string
  8611  	startmigrationrequest *StartMigrationRequest
  8612  	urlParams_            gensupport.URLParams
  8613  	ctx_                  context.Context
  8614  	header_               http.Header
  8615  }
  8616  
  8617  // StartMigration: Starts migration for a VM. Starts the process of uploading
  8618  // data and creating snapshots, in replication cycles scheduled by the policy.
  8619  //
  8620  // - migratingVm: The name of the MigratingVm.
  8621  func (r *ProjectsLocationsSourcesMigratingVmsService) StartMigration(migratingVm string, startmigrationrequest *StartMigrationRequest) *ProjectsLocationsSourcesMigratingVmsStartMigrationCall {
  8622  	c := &ProjectsLocationsSourcesMigratingVmsStartMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8623  	c.migratingVm = migratingVm
  8624  	c.startmigrationrequest = startmigrationrequest
  8625  	return c
  8626  }
  8627  
  8628  // Fields allows partial responses to be retrieved. See
  8629  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8630  // details.
  8631  func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsStartMigrationCall {
  8632  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8633  	return c
  8634  }
  8635  
  8636  // Context sets the context to be used in this call's Do method.
  8637  func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsStartMigrationCall {
  8638  	c.ctx_ = ctx
  8639  	return c
  8640  }
  8641  
  8642  // Header returns a http.Header that can be modified by the caller to add
  8643  // headers to the request.
  8644  func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Header() http.Header {
  8645  	if c.header_ == nil {
  8646  		c.header_ = make(http.Header)
  8647  	}
  8648  	return c.header_
  8649  }
  8650  
  8651  func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) doRequest(alt string) (*http.Response, error) {
  8652  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8653  	var body io.Reader = nil
  8654  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.startmigrationrequest)
  8655  	if err != nil {
  8656  		return nil, err
  8657  	}
  8658  	c.urlParams_.Set("alt", alt)
  8659  	c.urlParams_.Set("prettyPrint", "false")
  8660  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+migratingVm}:startMigration")
  8661  	urls += "?" + c.urlParams_.Encode()
  8662  	req, err := http.NewRequest("POST", urls, body)
  8663  	if err != nil {
  8664  		return nil, err
  8665  	}
  8666  	req.Header = reqHeaders
  8667  	googleapi.Expand(req.URL, map[string]string{
  8668  		"migratingVm": c.migratingVm,
  8669  	})
  8670  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8671  }
  8672  
  8673  // Do executes the "vmmigration.projects.locations.sources.migratingVms.startMigration" call.
  8674  // Any non-2xx status code is an error. Response headers are in either
  8675  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8676  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8677  // whether the returned error was because http.StatusNotModified was returned.
  8678  func (c *ProjectsLocationsSourcesMigratingVmsStartMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8679  	gensupport.SetOptions(c.urlParams_, opts...)
  8680  	res, err := c.doRequest("json")
  8681  	if res != nil && res.StatusCode == http.StatusNotModified {
  8682  		if res.Body != nil {
  8683  			res.Body.Close()
  8684  		}
  8685  		return nil, gensupport.WrapError(&googleapi.Error{
  8686  			Code:   res.StatusCode,
  8687  			Header: res.Header,
  8688  		})
  8689  	}
  8690  	if err != nil {
  8691  		return nil, err
  8692  	}
  8693  	defer googleapi.CloseBody(res)
  8694  	if err := googleapi.CheckResponse(res); err != nil {
  8695  		return nil, gensupport.WrapError(err)
  8696  	}
  8697  	ret := &Operation{
  8698  		ServerResponse: googleapi.ServerResponse{
  8699  			Header:         res.Header,
  8700  			HTTPStatusCode: res.StatusCode,
  8701  		},
  8702  	}
  8703  	target := &ret
  8704  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8705  		return nil, err
  8706  	}
  8707  	return ret, nil
  8708  }
  8709  
  8710  type ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall struct {
  8711  	s                     *Service
  8712  	name                  string
  8713  	cancelclonejobrequest *CancelCloneJobRequest
  8714  	urlParams_            gensupport.URLParams
  8715  	ctx_                  context.Context
  8716  	header_               http.Header
  8717  }
  8718  
  8719  // Cancel: Initiates the cancellation of a running clone job.
  8720  //
  8721  // - name: The clone job id.
  8722  func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) Cancel(name string, cancelclonejobrequest *CancelCloneJobRequest) *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall {
  8723  	c := &ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8724  	c.name = name
  8725  	c.cancelclonejobrequest = cancelclonejobrequest
  8726  	return c
  8727  }
  8728  
  8729  // Fields allows partial responses to be retrieved. See
  8730  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8731  // details.
  8732  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall {
  8733  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8734  	return c
  8735  }
  8736  
  8737  // Context sets the context to be used in this call's Do method.
  8738  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall {
  8739  	c.ctx_ = ctx
  8740  	return c
  8741  }
  8742  
  8743  // Header returns a http.Header that can be modified by the caller to add
  8744  // headers to the request.
  8745  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Header() http.Header {
  8746  	if c.header_ == nil {
  8747  		c.header_ = make(http.Header)
  8748  	}
  8749  	return c.header_
  8750  }
  8751  
  8752  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) doRequest(alt string) (*http.Response, error) {
  8753  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8754  	var body io.Reader = nil
  8755  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelclonejobrequest)
  8756  	if err != nil {
  8757  		return nil, err
  8758  	}
  8759  	c.urlParams_.Set("alt", alt)
  8760  	c.urlParams_.Set("prettyPrint", "false")
  8761  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  8762  	urls += "?" + c.urlParams_.Encode()
  8763  	req, err := http.NewRequest("POST", urls, body)
  8764  	if err != nil {
  8765  		return nil, err
  8766  	}
  8767  	req.Header = reqHeaders
  8768  	googleapi.Expand(req.URL, map[string]string{
  8769  		"name": c.name,
  8770  	})
  8771  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8772  }
  8773  
  8774  // Do executes the "vmmigration.projects.locations.sources.migratingVms.cloneJobs.cancel" call.
  8775  // Any non-2xx status code is an error. Response headers are in either
  8776  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8777  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8778  // whether the returned error was because http.StatusNotModified was returned.
  8779  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8780  	gensupport.SetOptions(c.urlParams_, opts...)
  8781  	res, err := c.doRequest("json")
  8782  	if res != nil && res.StatusCode == http.StatusNotModified {
  8783  		if res.Body != nil {
  8784  			res.Body.Close()
  8785  		}
  8786  		return nil, gensupport.WrapError(&googleapi.Error{
  8787  			Code:   res.StatusCode,
  8788  			Header: res.Header,
  8789  		})
  8790  	}
  8791  	if err != nil {
  8792  		return nil, err
  8793  	}
  8794  	defer googleapi.CloseBody(res)
  8795  	if err := googleapi.CheckResponse(res); err != nil {
  8796  		return nil, gensupport.WrapError(err)
  8797  	}
  8798  	ret := &Operation{
  8799  		ServerResponse: googleapi.ServerResponse{
  8800  			Header:         res.Header,
  8801  			HTTPStatusCode: res.StatusCode,
  8802  		},
  8803  	}
  8804  	target := &ret
  8805  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8806  		return nil, err
  8807  	}
  8808  	return ret, nil
  8809  }
  8810  
  8811  type ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall struct {
  8812  	s          *Service
  8813  	parent     string
  8814  	clonejob   *CloneJob
  8815  	urlParams_ gensupport.URLParams
  8816  	ctx_       context.Context
  8817  	header_    http.Header
  8818  }
  8819  
  8820  // Create: Initiates a Clone of a specific migrating VM.
  8821  //
  8822  // - parent: The Clone's parent.
  8823  func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) Create(parent string, clonejob *CloneJob) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
  8824  	c := &ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8825  	c.parent = parent
  8826  	c.clonejob = clonejob
  8827  	return c
  8828  }
  8829  
  8830  // CloneJobId sets the optional parameter "cloneJobId": Required. The clone job
  8831  // identifier.
  8832  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) CloneJobId(cloneJobId string) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
  8833  	c.urlParams_.Set("cloneJobId", cloneJobId)
  8834  	return c
  8835  }
  8836  
  8837  // RequestId sets the optional parameter "requestId": A request ID to identify
  8838  // requests. Specify a unique request ID so that if you must retry your
  8839  // request, the server will know to ignore the request if it has already been
  8840  // completed. The server will guarantee that for at least 60 minutes since the
  8841  // first request. For example, consider a situation where you make an initial
  8842  // request and the request times out. If you make the request again with the
  8843  // same request ID, the server can check if original operation with the same
  8844  // request ID was received, and if so, will ignore the second request. This
  8845  // prevents clients from accidentally creating duplicate commitments. The
  8846  // request ID must be a valid UUID with the exception that zero UUID is not
  8847  // supported (00000000-0000-0000-0000-000000000000).
  8848  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
  8849  	c.urlParams_.Set("requestId", requestId)
  8850  	return c
  8851  }
  8852  
  8853  // Fields allows partial responses to be retrieved. See
  8854  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8855  // details.
  8856  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
  8857  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8858  	return c
  8859  }
  8860  
  8861  // Context sets the context to be used in this call's Do method.
  8862  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall {
  8863  	c.ctx_ = ctx
  8864  	return c
  8865  }
  8866  
  8867  // Header returns a http.Header that can be modified by the caller to add
  8868  // headers to the request.
  8869  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Header() http.Header {
  8870  	if c.header_ == nil {
  8871  		c.header_ = make(http.Header)
  8872  	}
  8873  	return c.header_
  8874  }
  8875  
  8876  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) doRequest(alt string) (*http.Response, error) {
  8877  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8878  	var body io.Reader = nil
  8879  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.clonejob)
  8880  	if err != nil {
  8881  		return nil, err
  8882  	}
  8883  	c.urlParams_.Set("alt", alt)
  8884  	c.urlParams_.Set("prettyPrint", "false")
  8885  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cloneJobs")
  8886  	urls += "?" + c.urlParams_.Encode()
  8887  	req, err := http.NewRequest("POST", urls, body)
  8888  	if err != nil {
  8889  		return nil, err
  8890  	}
  8891  	req.Header = reqHeaders
  8892  	googleapi.Expand(req.URL, map[string]string{
  8893  		"parent": c.parent,
  8894  	})
  8895  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8896  }
  8897  
  8898  // Do executes the "vmmigration.projects.locations.sources.migratingVms.cloneJobs.create" call.
  8899  // Any non-2xx status code is an error. Response headers are in either
  8900  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8901  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8902  // whether the returned error was because http.StatusNotModified was returned.
  8903  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8904  	gensupport.SetOptions(c.urlParams_, opts...)
  8905  	res, err := c.doRequest("json")
  8906  	if res != nil && res.StatusCode == http.StatusNotModified {
  8907  		if res.Body != nil {
  8908  			res.Body.Close()
  8909  		}
  8910  		return nil, gensupport.WrapError(&googleapi.Error{
  8911  			Code:   res.StatusCode,
  8912  			Header: res.Header,
  8913  		})
  8914  	}
  8915  	if err != nil {
  8916  		return nil, err
  8917  	}
  8918  	defer googleapi.CloseBody(res)
  8919  	if err := googleapi.CheckResponse(res); err != nil {
  8920  		return nil, gensupport.WrapError(err)
  8921  	}
  8922  	ret := &Operation{
  8923  		ServerResponse: googleapi.ServerResponse{
  8924  			Header:         res.Header,
  8925  			HTTPStatusCode: res.StatusCode,
  8926  		},
  8927  	}
  8928  	target := &ret
  8929  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8930  		return nil, err
  8931  	}
  8932  	return ret, nil
  8933  }
  8934  
  8935  type ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall struct {
  8936  	s            *Service
  8937  	name         string
  8938  	urlParams_   gensupport.URLParams
  8939  	ifNoneMatch_ string
  8940  	ctx_         context.Context
  8941  	header_      http.Header
  8942  }
  8943  
  8944  // Get: Gets details of a single CloneJob.
  8945  //
  8946  // - name: The name of the CloneJob.
  8947  func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) Get(name string) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
  8948  	c := &ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8949  	c.name = name
  8950  	return c
  8951  }
  8952  
  8953  // Fields allows partial responses to be retrieved. See
  8954  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8955  // details.
  8956  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
  8957  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8958  	return c
  8959  }
  8960  
  8961  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8962  // object's ETag matches the given value. This is useful for getting updates
  8963  // only after the object has changed since the last request.
  8964  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
  8965  	c.ifNoneMatch_ = entityTag
  8966  	return c
  8967  }
  8968  
  8969  // Context sets the context to be used in this call's Do method.
  8970  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall {
  8971  	c.ctx_ = ctx
  8972  	return c
  8973  }
  8974  
  8975  // Header returns a http.Header that can be modified by the caller to add
  8976  // headers to the request.
  8977  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Header() http.Header {
  8978  	if c.header_ == nil {
  8979  		c.header_ = make(http.Header)
  8980  	}
  8981  	return c.header_
  8982  }
  8983  
  8984  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) doRequest(alt string) (*http.Response, error) {
  8985  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8986  	if c.ifNoneMatch_ != "" {
  8987  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8988  	}
  8989  	var body io.Reader = nil
  8990  	c.urlParams_.Set("alt", alt)
  8991  	c.urlParams_.Set("prettyPrint", "false")
  8992  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8993  	urls += "?" + c.urlParams_.Encode()
  8994  	req, err := http.NewRequest("GET", urls, body)
  8995  	if err != nil {
  8996  		return nil, err
  8997  	}
  8998  	req.Header = reqHeaders
  8999  	googleapi.Expand(req.URL, map[string]string{
  9000  		"name": c.name,
  9001  	})
  9002  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9003  }
  9004  
  9005  // Do executes the "vmmigration.projects.locations.sources.migratingVms.cloneJobs.get" call.
  9006  // Any non-2xx status code is an error. Response headers are in either
  9007  // *CloneJob.ServerResponse.Header or (if a response was returned at all) in
  9008  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9009  // whether the returned error was because http.StatusNotModified was returned.
  9010  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsGetCall) Do(opts ...googleapi.CallOption) (*CloneJob, error) {
  9011  	gensupport.SetOptions(c.urlParams_, opts...)
  9012  	res, err := c.doRequest("json")
  9013  	if res != nil && res.StatusCode == http.StatusNotModified {
  9014  		if res.Body != nil {
  9015  			res.Body.Close()
  9016  		}
  9017  		return nil, gensupport.WrapError(&googleapi.Error{
  9018  			Code:   res.StatusCode,
  9019  			Header: res.Header,
  9020  		})
  9021  	}
  9022  	if err != nil {
  9023  		return nil, err
  9024  	}
  9025  	defer googleapi.CloseBody(res)
  9026  	if err := googleapi.CheckResponse(res); err != nil {
  9027  		return nil, gensupport.WrapError(err)
  9028  	}
  9029  	ret := &CloneJob{
  9030  		ServerResponse: googleapi.ServerResponse{
  9031  			Header:         res.Header,
  9032  			HTTPStatusCode: res.StatusCode,
  9033  		},
  9034  	}
  9035  	target := &ret
  9036  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9037  		return nil, err
  9038  	}
  9039  	return ret, nil
  9040  }
  9041  
  9042  type ProjectsLocationsSourcesMigratingVmsCloneJobsListCall struct {
  9043  	s            *Service
  9044  	parent       string
  9045  	urlParams_   gensupport.URLParams
  9046  	ifNoneMatch_ string
  9047  	ctx_         context.Context
  9048  	header_      http.Header
  9049  }
  9050  
  9051  // List: Lists the CloneJobs of a migrating VM. Only 25 most recent CloneJobs
  9052  // are listed.
  9053  //
  9054  // - parent: The parent, which owns this collection of source VMs.
  9055  func (r *ProjectsLocationsSourcesMigratingVmsCloneJobsService) List(parent string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
  9056  	c := &ProjectsLocationsSourcesMigratingVmsCloneJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9057  	c.parent = parent
  9058  	return c
  9059  }
  9060  
  9061  // Filter sets the optional parameter "filter": The filter request.
  9062  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
  9063  	c.urlParams_.Set("filter", filter)
  9064  	return c
  9065  }
  9066  
  9067  // OrderBy sets the optional parameter "orderBy": the order by fields for the
  9068  // result.
  9069  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
  9070  	c.urlParams_.Set("orderBy", orderBy)
  9071  	return c
  9072  }
  9073  
  9074  // PageSize sets the optional parameter "pageSize": The maximum number of clone
  9075  // jobs to return. The service may return fewer than this value. If
  9076  // unspecified, at most 500 clone jobs will be returned. The maximum value is
  9077  // 1000; values above 1000 will be coerced to 1000.
  9078  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
  9079  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9080  	return c
  9081  }
  9082  
  9083  // PageToken sets the optional parameter "pageToken": Required. A page token,
  9084  // received from a previous `ListCloneJobs` call. Provide this to retrieve the
  9085  // subsequent page. When paginating, all other parameters provided to
  9086  // `ListCloneJobs` must match the call that provided the page token.
  9087  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
  9088  	c.urlParams_.Set("pageToken", pageToken)
  9089  	return c
  9090  }
  9091  
  9092  // Fields allows partial responses to be retrieved. See
  9093  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9094  // details.
  9095  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
  9096  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9097  	return c
  9098  }
  9099  
  9100  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9101  // object's ETag matches the given value. This is useful for getting updates
  9102  // only after the object has changed since the last request.
  9103  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
  9104  	c.ifNoneMatch_ = entityTag
  9105  	return c
  9106  }
  9107  
  9108  // Context sets the context to be used in this call's Do method.
  9109  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall {
  9110  	c.ctx_ = ctx
  9111  	return c
  9112  }
  9113  
  9114  // Header returns a http.Header that can be modified by the caller to add
  9115  // headers to the request.
  9116  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Header() http.Header {
  9117  	if c.header_ == nil {
  9118  		c.header_ = make(http.Header)
  9119  	}
  9120  	return c.header_
  9121  }
  9122  
  9123  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) doRequest(alt string) (*http.Response, error) {
  9124  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9125  	if c.ifNoneMatch_ != "" {
  9126  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9127  	}
  9128  	var body io.Reader = nil
  9129  	c.urlParams_.Set("alt", alt)
  9130  	c.urlParams_.Set("prettyPrint", "false")
  9131  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cloneJobs")
  9132  	urls += "?" + c.urlParams_.Encode()
  9133  	req, err := http.NewRequest("GET", urls, body)
  9134  	if err != nil {
  9135  		return nil, err
  9136  	}
  9137  	req.Header = reqHeaders
  9138  	googleapi.Expand(req.URL, map[string]string{
  9139  		"parent": c.parent,
  9140  	})
  9141  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9142  }
  9143  
  9144  // Do executes the "vmmigration.projects.locations.sources.migratingVms.cloneJobs.list" call.
  9145  // Any non-2xx status code is an error. Response headers are in either
  9146  // *ListCloneJobsResponse.ServerResponse.Header or (if a response was returned
  9147  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9148  // check whether the returned error was because http.StatusNotModified was
  9149  // returned.
  9150  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Do(opts ...googleapi.CallOption) (*ListCloneJobsResponse, error) {
  9151  	gensupport.SetOptions(c.urlParams_, opts...)
  9152  	res, err := c.doRequest("json")
  9153  	if res != nil && res.StatusCode == http.StatusNotModified {
  9154  		if res.Body != nil {
  9155  			res.Body.Close()
  9156  		}
  9157  		return nil, gensupport.WrapError(&googleapi.Error{
  9158  			Code:   res.StatusCode,
  9159  			Header: res.Header,
  9160  		})
  9161  	}
  9162  	if err != nil {
  9163  		return nil, err
  9164  	}
  9165  	defer googleapi.CloseBody(res)
  9166  	if err := googleapi.CheckResponse(res); err != nil {
  9167  		return nil, gensupport.WrapError(err)
  9168  	}
  9169  	ret := &ListCloneJobsResponse{
  9170  		ServerResponse: googleapi.ServerResponse{
  9171  			Header:         res.Header,
  9172  			HTTPStatusCode: res.StatusCode,
  9173  		},
  9174  	}
  9175  	target := &ret
  9176  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9177  		return nil, err
  9178  	}
  9179  	return ret, nil
  9180  }
  9181  
  9182  // Pages invokes f for each page of results.
  9183  // A non-nil error returned from f will halt the iteration.
  9184  // The provided context supersedes any context provided to the Context method.
  9185  func (c *ProjectsLocationsSourcesMigratingVmsCloneJobsListCall) Pages(ctx context.Context, f func(*ListCloneJobsResponse) error) error {
  9186  	c.ctx_ = ctx
  9187  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9188  	for {
  9189  		x, err := c.Do()
  9190  		if err != nil {
  9191  			return err
  9192  		}
  9193  		if err := f(x); err != nil {
  9194  			return err
  9195  		}
  9196  		if x.NextPageToken == "" {
  9197  			return nil
  9198  		}
  9199  		c.PageToken(x.NextPageToken)
  9200  	}
  9201  }
  9202  
  9203  type ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall struct {
  9204  	s                       *Service
  9205  	name                    string
  9206  	cancelcutoverjobrequest *CancelCutoverJobRequest
  9207  	urlParams_              gensupport.URLParams
  9208  	ctx_                    context.Context
  9209  	header_                 http.Header
  9210  }
  9211  
  9212  // Cancel: Initiates the cancellation of a running cutover job.
  9213  //
  9214  // - name: The cutover job id.
  9215  func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) Cancel(name string, cancelcutoverjobrequest *CancelCutoverJobRequest) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall {
  9216  	c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9217  	c.name = name
  9218  	c.cancelcutoverjobrequest = cancelcutoverjobrequest
  9219  	return c
  9220  }
  9221  
  9222  // Fields allows partial responses to be retrieved. See
  9223  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9224  // details.
  9225  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall {
  9226  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9227  	return c
  9228  }
  9229  
  9230  // Context sets the context to be used in this call's Do method.
  9231  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall {
  9232  	c.ctx_ = ctx
  9233  	return c
  9234  }
  9235  
  9236  // Header returns a http.Header that can be modified by the caller to add
  9237  // headers to the request.
  9238  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Header() http.Header {
  9239  	if c.header_ == nil {
  9240  		c.header_ = make(http.Header)
  9241  	}
  9242  	return c.header_
  9243  }
  9244  
  9245  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) doRequest(alt string) (*http.Response, error) {
  9246  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9247  	var body io.Reader = nil
  9248  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cancelcutoverjobrequest)
  9249  	if err != nil {
  9250  		return nil, err
  9251  	}
  9252  	c.urlParams_.Set("alt", alt)
  9253  	c.urlParams_.Set("prettyPrint", "false")
  9254  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  9255  	urls += "?" + c.urlParams_.Encode()
  9256  	req, err := http.NewRequest("POST", urls, body)
  9257  	if err != nil {
  9258  		return nil, err
  9259  	}
  9260  	req.Header = reqHeaders
  9261  	googleapi.Expand(req.URL, map[string]string{
  9262  		"name": c.name,
  9263  	})
  9264  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9265  }
  9266  
  9267  // Do executes the "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.cancel" call.
  9268  // Any non-2xx status code is an error. Response headers are in either
  9269  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9270  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9271  // whether the returned error was because http.StatusNotModified was returned.
  9272  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCancelCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9273  	gensupport.SetOptions(c.urlParams_, opts...)
  9274  	res, err := c.doRequest("json")
  9275  	if res != nil && res.StatusCode == http.StatusNotModified {
  9276  		if res.Body != nil {
  9277  			res.Body.Close()
  9278  		}
  9279  		return nil, gensupport.WrapError(&googleapi.Error{
  9280  			Code:   res.StatusCode,
  9281  			Header: res.Header,
  9282  		})
  9283  	}
  9284  	if err != nil {
  9285  		return nil, err
  9286  	}
  9287  	defer googleapi.CloseBody(res)
  9288  	if err := googleapi.CheckResponse(res); err != nil {
  9289  		return nil, gensupport.WrapError(err)
  9290  	}
  9291  	ret := &Operation{
  9292  		ServerResponse: googleapi.ServerResponse{
  9293  			Header:         res.Header,
  9294  			HTTPStatusCode: res.StatusCode,
  9295  		},
  9296  	}
  9297  	target := &ret
  9298  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9299  		return nil, err
  9300  	}
  9301  	return ret, nil
  9302  }
  9303  
  9304  type ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall struct {
  9305  	s          *Service
  9306  	parent     string
  9307  	cutoverjob *CutoverJob
  9308  	urlParams_ gensupport.URLParams
  9309  	ctx_       context.Context
  9310  	header_    http.Header
  9311  }
  9312  
  9313  // Create: Initiates a Cutover of a specific migrating VM. The returned LRO is
  9314  // completed when the cutover job resource is created and the job is initiated.
  9315  //
  9316  // - parent: The Cutover's parent.
  9317  func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) Create(parent string, cutoverjob *CutoverJob) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
  9318  	c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9319  	c.parent = parent
  9320  	c.cutoverjob = cutoverjob
  9321  	return c
  9322  }
  9323  
  9324  // CutoverJobId sets the optional parameter "cutoverJobId": Required. The
  9325  // cutover job identifier.
  9326  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) CutoverJobId(cutoverJobId string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
  9327  	c.urlParams_.Set("cutoverJobId", cutoverJobId)
  9328  	return c
  9329  }
  9330  
  9331  // RequestId sets the optional parameter "requestId": A request ID to identify
  9332  // requests. Specify a unique request ID so that if you must retry your
  9333  // request, the server will know to ignore the request if it has already been
  9334  // completed. The server will guarantee that for at least 60 minutes since the
  9335  // first request. For example, consider a situation where you make an initial
  9336  // request and the request times out. If you make the request again with the
  9337  // same request ID, the server can check if original operation with the same
  9338  // request ID was received, and if so, will ignore the second request. This
  9339  // prevents clients from accidentally creating duplicate commitments. The
  9340  // request ID must be a valid UUID with the exception that zero UUID is not
  9341  // supported (00000000-0000-0000-0000-000000000000).
  9342  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
  9343  	c.urlParams_.Set("requestId", requestId)
  9344  	return c
  9345  }
  9346  
  9347  // Fields allows partial responses to be retrieved. See
  9348  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9349  // details.
  9350  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
  9351  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9352  	return c
  9353  }
  9354  
  9355  // Context sets the context to be used in this call's Do method.
  9356  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall {
  9357  	c.ctx_ = ctx
  9358  	return c
  9359  }
  9360  
  9361  // Header returns a http.Header that can be modified by the caller to add
  9362  // headers to the request.
  9363  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Header() http.Header {
  9364  	if c.header_ == nil {
  9365  		c.header_ = make(http.Header)
  9366  	}
  9367  	return c.header_
  9368  }
  9369  
  9370  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) doRequest(alt string) (*http.Response, error) {
  9371  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9372  	var body io.Reader = nil
  9373  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cutoverjob)
  9374  	if err != nil {
  9375  		return nil, err
  9376  	}
  9377  	c.urlParams_.Set("alt", alt)
  9378  	c.urlParams_.Set("prettyPrint", "false")
  9379  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cutoverJobs")
  9380  	urls += "?" + c.urlParams_.Encode()
  9381  	req, err := http.NewRequest("POST", urls, body)
  9382  	if err != nil {
  9383  		return nil, err
  9384  	}
  9385  	req.Header = reqHeaders
  9386  	googleapi.Expand(req.URL, map[string]string{
  9387  		"parent": c.parent,
  9388  	})
  9389  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9390  }
  9391  
  9392  // Do executes the "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.create" call.
  9393  // Any non-2xx status code is an error. Response headers are in either
  9394  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9395  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9396  // whether the returned error was because http.StatusNotModified was returned.
  9397  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9398  	gensupport.SetOptions(c.urlParams_, opts...)
  9399  	res, err := c.doRequest("json")
  9400  	if res != nil && res.StatusCode == http.StatusNotModified {
  9401  		if res.Body != nil {
  9402  			res.Body.Close()
  9403  		}
  9404  		return nil, gensupport.WrapError(&googleapi.Error{
  9405  			Code:   res.StatusCode,
  9406  			Header: res.Header,
  9407  		})
  9408  	}
  9409  	if err != nil {
  9410  		return nil, err
  9411  	}
  9412  	defer googleapi.CloseBody(res)
  9413  	if err := googleapi.CheckResponse(res); err != nil {
  9414  		return nil, gensupport.WrapError(err)
  9415  	}
  9416  	ret := &Operation{
  9417  		ServerResponse: googleapi.ServerResponse{
  9418  			Header:         res.Header,
  9419  			HTTPStatusCode: res.StatusCode,
  9420  		},
  9421  	}
  9422  	target := &ret
  9423  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9424  		return nil, err
  9425  	}
  9426  	return ret, nil
  9427  }
  9428  
  9429  type ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall struct {
  9430  	s            *Service
  9431  	name         string
  9432  	urlParams_   gensupport.URLParams
  9433  	ifNoneMatch_ string
  9434  	ctx_         context.Context
  9435  	header_      http.Header
  9436  }
  9437  
  9438  // Get: Gets details of a single CutoverJob.
  9439  //
  9440  // - name: The name of the CutoverJob.
  9441  func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) Get(name string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
  9442  	c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9443  	c.name = name
  9444  	return c
  9445  }
  9446  
  9447  // Fields allows partial responses to be retrieved. See
  9448  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9449  // details.
  9450  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
  9451  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9452  	return c
  9453  }
  9454  
  9455  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9456  // object's ETag matches the given value. This is useful for getting updates
  9457  // only after the object has changed since the last request.
  9458  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
  9459  	c.ifNoneMatch_ = entityTag
  9460  	return c
  9461  }
  9462  
  9463  // Context sets the context to be used in this call's Do method.
  9464  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall {
  9465  	c.ctx_ = ctx
  9466  	return c
  9467  }
  9468  
  9469  // Header returns a http.Header that can be modified by the caller to add
  9470  // headers to the request.
  9471  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Header() http.Header {
  9472  	if c.header_ == nil {
  9473  		c.header_ = make(http.Header)
  9474  	}
  9475  	return c.header_
  9476  }
  9477  
  9478  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) doRequest(alt string) (*http.Response, error) {
  9479  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9480  	if c.ifNoneMatch_ != "" {
  9481  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9482  	}
  9483  	var body io.Reader = nil
  9484  	c.urlParams_.Set("alt", alt)
  9485  	c.urlParams_.Set("prettyPrint", "false")
  9486  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9487  	urls += "?" + c.urlParams_.Encode()
  9488  	req, err := http.NewRequest("GET", urls, body)
  9489  	if err != nil {
  9490  		return nil, err
  9491  	}
  9492  	req.Header = reqHeaders
  9493  	googleapi.Expand(req.URL, map[string]string{
  9494  		"name": c.name,
  9495  	})
  9496  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9497  }
  9498  
  9499  // Do executes the "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.get" call.
  9500  // Any non-2xx status code is an error. Response headers are in either
  9501  // *CutoverJob.ServerResponse.Header or (if a response was returned at all) in
  9502  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9503  // whether the returned error was because http.StatusNotModified was returned.
  9504  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsGetCall) Do(opts ...googleapi.CallOption) (*CutoverJob, error) {
  9505  	gensupport.SetOptions(c.urlParams_, opts...)
  9506  	res, err := c.doRequest("json")
  9507  	if res != nil && res.StatusCode == http.StatusNotModified {
  9508  		if res.Body != nil {
  9509  			res.Body.Close()
  9510  		}
  9511  		return nil, gensupport.WrapError(&googleapi.Error{
  9512  			Code:   res.StatusCode,
  9513  			Header: res.Header,
  9514  		})
  9515  	}
  9516  	if err != nil {
  9517  		return nil, err
  9518  	}
  9519  	defer googleapi.CloseBody(res)
  9520  	if err := googleapi.CheckResponse(res); err != nil {
  9521  		return nil, gensupport.WrapError(err)
  9522  	}
  9523  	ret := &CutoverJob{
  9524  		ServerResponse: googleapi.ServerResponse{
  9525  			Header:         res.Header,
  9526  			HTTPStatusCode: res.StatusCode,
  9527  		},
  9528  	}
  9529  	target := &ret
  9530  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9531  		return nil, err
  9532  	}
  9533  	return ret, nil
  9534  }
  9535  
  9536  type ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall struct {
  9537  	s            *Service
  9538  	parent       string
  9539  	urlParams_   gensupport.URLParams
  9540  	ifNoneMatch_ string
  9541  	ctx_         context.Context
  9542  	header_      http.Header
  9543  }
  9544  
  9545  // List: Lists the CutoverJobs of a migrating VM. Only 25 most recent
  9546  // CutoverJobs are listed.
  9547  //
  9548  // - parent: The parent, which owns this collection of migrating VMs.
  9549  func (r *ProjectsLocationsSourcesMigratingVmsCutoverJobsService) List(parent string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
  9550  	c := &ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9551  	c.parent = parent
  9552  	return c
  9553  }
  9554  
  9555  // Filter sets the optional parameter "filter": The filter request.
  9556  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
  9557  	c.urlParams_.Set("filter", filter)
  9558  	return c
  9559  }
  9560  
  9561  // OrderBy sets the optional parameter "orderBy": the order by fields for the
  9562  // result.
  9563  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
  9564  	c.urlParams_.Set("orderBy", orderBy)
  9565  	return c
  9566  }
  9567  
  9568  // PageSize sets the optional parameter "pageSize": The maximum number of
  9569  // cutover jobs to return. The service may return fewer than this value. If
  9570  // unspecified, at most 500 cutover jobs will be returned. The maximum value is
  9571  // 1000; values above 1000 will be coerced to 1000.
  9572  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
  9573  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9574  	return c
  9575  }
  9576  
  9577  // PageToken sets the optional parameter "pageToken": Required. A page token,
  9578  // received from a previous `ListCutoverJobs` call. Provide this to retrieve
  9579  // the subsequent page. When paginating, all other parameters provided to
  9580  // `ListCutoverJobs` must match the call that provided the page token.
  9581  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
  9582  	c.urlParams_.Set("pageToken", pageToken)
  9583  	return c
  9584  }
  9585  
  9586  // Fields allows partial responses to be retrieved. See
  9587  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9588  // details.
  9589  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
  9590  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9591  	return c
  9592  }
  9593  
  9594  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9595  // object's ETag matches the given value. This is useful for getting updates
  9596  // only after the object has changed since the last request.
  9597  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
  9598  	c.ifNoneMatch_ = entityTag
  9599  	return c
  9600  }
  9601  
  9602  // Context sets the context to be used in this call's Do method.
  9603  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall {
  9604  	c.ctx_ = ctx
  9605  	return c
  9606  }
  9607  
  9608  // Header returns a http.Header that can be modified by the caller to add
  9609  // headers to the request.
  9610  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Header() http.Header {
  9611  	if c.header_ == nil {
  9612  		c.header_ = make(http.Header)
  9613  	}
  9614  	return c.header_
  9615  }
  9616  
  9617  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) doRequest(alt string) (*http.Response, error) {
  9618  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9619  	if c.ifNoneMatch_ != "" {
  9620  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9621  	}
  9622  	var body io.Reader = nil
  9623  	c.urlParams_.Set("alt", alt)
  9624  	c.urlParams_.Set("prettyPrint", "false")
  9625  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cutoverJobs")
  9626  	urls += "?" + c.urlParams_.Encode()
  9627  	req, err := http.NewRequest("GET", urls, body)
  9628  	if err != nil {
  9629  		return nil, err
  9630  	}
  9631  	req.Header = reqHeaders
  9632  	googleapi.Expand(req.URL, map[string]string{
  9633  		"parent": c.parent,
  9634  	})
  9635  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9636  }
  9637  
  9638  // Do executes the "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.list" call.
  9639  // Any non-2xx status code is an error. Response headers are in either
  9640  // *ListCutoverJobsResponse.ServerResponse.Header or (if a response was
  9641  // returned at all) in error.(*googleapi.Error).Header. Use
  9642  // googleapi.IsNotModified to check whether the returned error was because
  9643  // http.StatusNotModified was returned.
  9644  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Do(opts ...googleapi.CallOption) (*ListCutoverJobsResponse, error) {
  9645  	gensupport.SetOptions(c.urlParams_, opts...)
  9646  	res, err := c.doRequest("json")
  9647  	if res != nil && res.StatusCode == http.StatusNotModified {
  9648  		if res.Body != nil {
  9649  			res.Body.Close()
  9650  		}
  9651  		return nil, gensupport.WrapError(&googleapi.Error{
  9652  			Code:   res.StatusCode,
  9653  			Header: res.Header,
  9654  		})
  9655  	}
  9656  	if err != nil {
  9657  		return nil, err
  9658  	}
  9659  	defer googleapi.CloseBody(res)
  9660  	if err := googleapi.CheckResponse(res); err != nil {
  9661  		return nil, gensupport.WrapError(err)
  9662  	}
  9663  	ret := &ListCutoverJobsResponse{
  9664  		ServerResponse: googleapi.ServerResponse{
  9665  			Header:         res.Header,
  9666  			HTTPStatusCode: res.StatusCode,
  9667  		},
  9668  	}
  9669  	target := &ret
  9670  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9671  		return nil, err
  9672  	}
  9673  	return ret, nil
  9674  }
  9675  
  9676  // Pages invokes f for each page of results.
  9677  // A non-nil error returned from f will halt the iteration.
  9678  // The provided context supersedes any context provided to the Context method.
  9679  func (c *ProjectsLocationsSourcesMigratingVmsCutoverJobsListCall) Pages(ctx context.Context, f func(*ListCutoverJobsResponse) error) error {
  9680  	c.ctx_ = ctx
  9681  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9682  	for {
  9683  		x, err := c.Do()
  9684  		if err != nil {
  9685  			return err
  9686  		}
  9687  		if err := f(x); err != nil {
  9688  			return err
  9689  		}
  9690  		if x.NextPageToken == "" {
  9691  			return nil
  9692  		}
  9693  		c.PageToken(x.NextPageToken)
  9694  	}
  9695  }
  9696  
  9697  type ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall struct {
  9698  	s            *Service
  9699  	name         string
  9700  	urlParams_   gensupport.URLParams
  9701  	ifNoneMatch_ string
  9702  	ctx_         context.Context
  9703  	header_      http.Header
  9704  }
  9705  
  9706  // Get: Gets details of a single ReplicationCycle.
  9707  //
  9708  // - name: The name of the ReplicationCycle.
  9709  func (r *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService) Get(name string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall {
  9710  	c := &ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9711  	c.name = name
  9712  	return c
  9713  }
  9714  
  9715  // Fields allows partial responses to be retrieved. See
  9716  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9717  // details.
  9718  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall {
  9719  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9720  	return c
  9721  }
  9722  
  9723  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9724  // object's ETag matches the given value. This is useful for getting updates
  9725  // only after the object has changed since the last request.
  9726  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall {
  9727  	c.ifNoneMatch_ = entityTag
  9728  	return c
  9729  }
  9730  
  9731  // Context sets the context to be used in this call's Do method.
  9732  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall {
  9733  	c.ctx_ = ctx
  9734  	return c
  9735  }
  9736  
  9737  // Header returns a http.Header that can be modified by the caller to add
  9738  // headers to the request.
  9739  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Header() http.Header {
  9740  	if c.header_ == nil {
  9741  		c.header_ = make(http.Header)
  9742  	}
  9743  	return c.header_
  9744  }
  9745  
  9746  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) doRequest(alt string) (*http.Response, error) {
  9747  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9748  	if c.ifNoneMatch_ != "" {
  9749  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9750  	}
  9751  	var body io.Reader = nil
  9752  	c.urlParams_.Set("alt", alt)
  9753  	c.urlParams_.Set("prettyPrint", "false")
  9754  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9755  	urls += "?" + c.urlParams_.Encode()
  9756  	req, err := http.NewRequest("GET", urls, body)
  9757  	if err != nil {
  9758  		return nil, err
  9759  	}
  9760  	req.Header = reqHeaders
  9761  	googleapi.Expand(req.URL, map[string]string{
  9762  		"name": c.name,
  9763  	})
  9764  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9765  }
  9766  
  9767  // Do executes the "vmmigration.projects.locations.sources.migratingVms.replicationCycles.get" call.
  9768  // Any non-2xx status code is an error. Response headers are in either
  9769  // *ReplicationCycle.ServerResponse.Header or (if a response was returned at
  9770  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9771  // check whether the returned error was because http.StatusNotModified was
  9772  // returned.
  9773  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesGetCall) Do(opts ...googleapi.CallOption) (*ReplicationCycle, error) {
  9774  	gensupport.SetOptions(c.urlParams_, opts...)
  9775  	res, err := c.doRequest("json")
  9776  	if res != nil && res.StatusCode == http.StatusNotModified {
  9777  		if res.Body != nil {
  9778  			res.Body.Close()
  9779  		}
  9780  		return nil, gensupport.WrapError(&googleapi.Error{
  9781  			Code:   res.StatusCode,
  9782  			Header: res.Header,
  9783  		})
  9784  	}
  9785  	if err != nil {
  9786  		return nil, err
  9787  	}
  9788  	defer googleapi.CloseBody(res)
  9789  	if err := googleapi.CheckResponse(res); err != nil {
  9790  		return nil, gensupport.WrapError(err)
  9791  	}
  9792  	ret := &ReplicationCycle{
  9793  		ServerResponse: googleapi.ServerResponse{
  9794  			Header:         res.Header,
  9795  			HTTPStatusCode: res.StatusCode,
  9796  		},
  9797  	}
  9798  	target := &ret
  9799  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9800  		return nil, err
  9801  	}
  9802  	return ret, nil
  9803  }
  9804  
  9805  type ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall struct {
  9806  	s            *Service
  9807  	parent       string
  9808  	urlParams_   gensupport.URLParams
  9809  	ifNoneMatch_ string
  9810  	ctx_         context.Context
  9811  	header_      http.Header
  9812  }
  9813  
  9814  // List: Lists ReplicationCycles in a given MigratingVM.
  9815  //
  9816  // - parent: The parent, which owns this collection of ReplicationCycles.
  9817  func (r *ProjectsLocationsSourcesMigratingVmsReplicationCyclesService) List(parent string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
  9818  	c := &ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9819  	c.parent = parent
  9820  	return c
  9821  }
  9822  
  9823  // Filter sets the optional parameter "filter": The filter request.
  9824  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Filter(filter string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
  9825  	c.urlParams_.Set("filter", filter)
  9826  	return c
  9827  }
  9828  
  9829  // OrderBy sets the optional parameter "orderBy": the order by fields for the
  9830  // result.
  9831  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
  9832  	c.urlParams_.Set("orderBy", orderBy)
  9833  	return c
  9834  }
  9835  
  9836  // PageSize sets the optional parameter "pageSize": The maximum number of
  9837  // replication cycles to return. The service may return fewer than this value.
  9838  // If unspecified, at most 100 migrating VMs will be returned. The maximum
  9839  // value is 100; values above 100 will be coerced to 100.
  9840  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
  9841  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9842  	return c
  9843  }
  9844  
  9845  // PageToken sets the optional parameter "pageToken": Required. A page token,
  9846  // received from a previous `ListReplicationCycles` call. Provide this to
  9847  // retrieve the subsequent page. When paginating, all other parameters provided
  9848  // to `ListReplicationCycles` must match the call that provided the page token.
  9849  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) PageToken(pageToken string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
  9850  	c.urlParams_.Set("pageToken", pageToken)
  9851  	return c
  9852  }
  9853  
  9854  // Fields allows partial responses to be retrieved. See
  9855  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9856  // details.
  9857  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
  9858  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9859  	return c
  9860  }
  9861  
  9862  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9863  // object's ETag matches the given value. This is useful for getting updates
  9864  // only after the object has changed since the last request.
  9865  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
  9866  	c.ifNoneMatch_ = entityTag
  9867  	return c
  9868  }
  9869  
  9870  // Context sets the context to be used in this call's Do method.
  9871  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Context(ctx context.Context) *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall {
  9872  	c.ctx_ = ctx
  9873  	return c
  9874  }
  9875  
  9876  // Header returns a http.Header that can be modified by the caller to add
  9877  // headers to the request.
  9878  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Header() http.Header {
  9879  	if c.header_ == nil {
  9880  		c.header_ = make(http.Header)
  9881  	}
  9882  	return c.header_
  9883  }
  9884  
  9885  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) doRequest(alt string) (*http.Response, error) {
  9886  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9887  	if c.ifNoneMatch_ != "" {
  9888  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9889  	}
  9890  	var body io.Reader = nil
  9891  	c.urlParams_.Set("alt", alt)
  9892  	c.urlParams_.Set("prettyPrint", "false")
  9893  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/replicationCycles")
  9894  	urls += "?" + c.urlParams_.Encode()
  9895  	req, err := http.NewRequest("GET", urls, body)
  9896  	if err != nil {
  9897  		return nil, err
  9898  	}
  9899  	req.Header = reqHeaders
  9900  	googleapi.Expand(req.URL, map[string]string{
  9901  		"parent": c.parent,
  9902  	})
  9903  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9904  }
  9905  
  9906  // Do executes the "vmmigration.projects.locations.sources.migratingVms.replicationCycles.list" call.
  9907  // Any non-2xx status code is an error. Response headers are in either
  9908  // *ListReplicationCyclesResponse.ServerResponse.Header or (if a response was
  9909  // returned at all) in error.(*googleapi.Error).Header. Use
  9910  // googleapi.IsNotModified to check whether the returned error was because
  9911  // http.StatusNotModified was returned.
  9912  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Do(opts ...googleapi.CallOption) (*ListReplicationCyclesResponse, error) {
  9913  	gensupport.SetOptions(c.urlParams_, opts...)
  9914  	res, err := c.doRequest("json")
  9915  	if res != nil && res.StatusCode == http.StatusNotModified {
  9916  		if res.Body != nil {
  9917  			res.Body.Close()
  9918  		}
  9919  		return nil, gensupport.WrapError(&googleapi.Error{
  9920  			Code:   res.StatusCode,
  9921  			Header: res.Header,
  9922  		})
  9923  	}
  9924  	if err != nil {
  9925  		return nil, err
  9926  	}
  9927  	defer googleapi.CloseBody(res)
  9928  	if err := googleapi.CheckResponse(res); err != nil {
  9929  		return nil, gensupport.WrapError(err)
  9930  	}
  9931  	ret := &ListReplicationCyclesResponse{
  9932  		ServerResponse: googleapi.ServerResponse{
  9933  			Header:         res.Header,
  9934  			HTTPStatusCode: res.StatusCode,
  9935  		},
  9936  	}
  9937  	target := &ret
  9938  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9939  		return nil, err
  9940  	}
  9941  	return ret, nil
  9942  }
  9943  
  9944  // Pages invokes f for each page of results.
  9945  // A non-nil error returned from f will halt the iteration.
  9946  // The provided context supersedes any context provided to the Context method.
  9947  func (c *ProjectsLocationsSourcesMigratingVmsReplicationCyclesListCall) Pages(ctx context.Context, f func(*ListReplicationCyclesResponse) error) error {
  9948  	c.ctx_ = ctx
  9949  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9950  	for {
  9951  		x, err := c.Do()
  9952  		if err != nil {
  9953  			return err
  9954  		}
  9955  		if err := f(x); err != nil {
  9956  			return err
  9957  		}
  9958  		if x.NextPageToken == "" {
  9959  			return nil
  9960  		}
  9961  		c.PageToken(x.NextPageToken)
  9962  	}
  9963  }
  9964  
  9965  type ProjectsLocationsSourcesUtilizationReportsCreateCall struct {
  9966  	s                 *Service
  9967  	parent            string
  9968  	utilizationreport *UtilizationReport
  9969  	urlParams_        gensupport.URLParams
  9970  	ctx_              context.Context
  9971  	header_           http.Header
  9972  }
  9973  
  9974  // Create: Creates a new UtilizationReport.
  9975  //
  9976  // - parent: The Utilization Report's parent.
  9977  func (r *ProjectsLocationsSourcesUtilizationReportsService) Create(parent string, utilizationreport *UtilizationReport) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
  9978  	c := &ProjectsLocationsSourcesUtilizationReportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9979  	c.parent = parent
  9980  	c.utilizationreport = utilizationreport
  9981  	return c
  9982  }
  9983  
  9984  // RequestId sets the optional parameter "requestId": A request ID to identify
  9985  // requests. Specify a unique request ID so that if you must retry your
  9986  // request, the server will know to ignore the request if it has already been
  9987  // completed. The server will guarantee that for at least 60 minutes since the
  9988  // first request. For example, consider a situation where you make an initial
  9989  // request and the request times out. If you make the request again with the
  9990  // same request ID, the server can check if original operation with the same
  9991  // request ID was received, and if so, will ignore the second request. This
  9992  // prevents clients from accidentally creating duplicate commitments. The
  9993  // request ID must be a valid UUID with the exception that zero UUID is not
  9994  // supported (00000000-0000-0000-0000-000000000000).
  9995  func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) RequestId(requestId string) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
  9996  	c.urlParams_.Set("requestId", requestId)
  9997  	return c
  9998  }
  9999  
 10000  // UtilizationReportId sets the optional parameter "utilizationReportId":
 10001  // Required. The ID to use for the report, which will become the final
 10002  // component of the reports's resource name. This value maximum length is 63
 10003  // characters, and valid characters are /a-z-/. It must start with an english
 10004  // letter and must not end with a hyphen.
 10005  func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) UtilizationReportId(utilizationReportId string) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
 10006  	c.urlParams_.Set("utilizationReportId", utilizationReportId)
 10007  	return c
 10008  }
 10009  
 10010  // Fields allows partial responses to be retrieved. See
 10011  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10012  // details.
 10013  func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
 10014  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10015  	return c
 10016  }
 10017  
 10018  // Context sets the context to be used in this call's Do method.
 10019  func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsCreateCall {
 10020  	c.ctx_ = ctx
 10021  	return c
 10022  }
 10023  
 10024  // Header returns a http.Header that can be modified by the caller to add
 10025  // headers to the request.
 10026  func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Header() http.Header {
 10027  	if c.header_ == nil {
 10028  		c.header_ = make(http.Header)
 10029  	}
 10030  	return c.header_
 10031  }
 10032  
 10033  func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) doRequest(alt string) (*http.Response, error) {
 10034  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10035  	var body io.Reader = nil
 10036  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.utilizationreport)
 10037  	if err != nil {
 10038  		return nil, err
 10039  	}
 10040  	c.urlParams_.Set("alt", alt)
 10041  	c.urlParams_.Set("prettyPrint", "false")
 10042  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/utilizationReports")
 10043  	urls += "?" + c.urlParams_.Encode()
 10044  	req, err := http.NewRequest("POST", urls, body)
 10045  	if err != nil {
 10046  		return nil, err
 10047  	}
 10048  	req.Header = reqHeaders
 10049  	googleapi.Expand(req.URL, map[string]string{
 10050  		"parent": c.parent,
 10051  	})
 10052  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10053  }
 10054  
 10055  // Do executes the "vmmigration.projects.locations.sources.utilizationReports.create" call.
 10056  // Any non-2xx status code is an error. Response headers are in either
 10057  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 10058  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10059  // whether the returned error was because http.StatusNotModified was returned.
 10060  func (c *ProjectsLocationsSourcesUtilizationReportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 10061  	gensupport.SetOptions(c.urlParams_, opts...)
 10062  	res, err := c.doRequest("json")
 10063  	if res != nil && res.StatusCode == http.StatusNotModified {
 10064  		if res.Body != nil {
 10065  			res.Body.Close()
 10066  		}
 10067  		return nil, gensupport.WrapError(&googleapi.Error{
 10068  			Code:   res.StatusCode,
 10069  			Header: res.Header,
 10070  		})
 10071  	}
 10072  	if err != nil {
 10073  		return nil, err
 10074  	}
 10075  	defer googleapi.CloseBody(res)
 10076  	if err := googleapi.CheckResponse(res); err != nil {
 10077  		return nil, gensupport.WrapError(err)
 10078  	}
 10079  	ret := &Operation{
 10080  		ServerResponse: googleapi.ServerResponse{
 10081  			Header:         res.Header,
 10082  			HTTPStatusCode: res.StatusCode,
 10083  		},
 10084  	}
 10085  	target := &ret
 10086  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10087  		return nil, err
 10088  	}
 10089  	return ret, nil
 10090  }
 10091  
 10092  type ProjectsLocationsSourcesUtilizationReportsDeleteCall struct {
 10093  	s          *Service
 10094  	name       string
 10095  	urlParams_ gensupport.URLParams
 10096  	ctx_       context.Context
 10097  	header_    http.Header
 10098  }
 10099  
 10100  // Delete: Deletes a single Utilization Report.
 10101  //
 10102  // - name: The Utilization Report name.
 10103  func (r *ProjectsLocationsSourcesUtilizationReportsService) Delete(name string) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
 10104  	c := &ProjectsLocationsSourcesUtilizationReportsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10105  	c.name = name
 10106  	return c
 10107  }
 10108  
 10109  // RequestId sets the optional parameter "requestId": A request ID to identify
 10110  // requests. Specify a unique request ID so that if you must retry your
 10111  // request, the server will know to ignore the request if it has already been
 10112  // completed. The server will guarantee that for at least 60 minutes after the
 10113  // first request. For example, consider a situation where you make an initial
 10114  // request and the request times out. If you make the request again with the
 10115  // same request ID, the server can check if original operation with the same
 10116  // request ID was received, and if so, will ignore the second request. This
 10117  // prevents clients from accidentally creating duplicate commitments. The
 10118  // request ID must be a valid UUID with the exception that zero UUID is not
 10119  // supported (00000000-0000-0000-0000-000000000000).
 10120  func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) RequestId(requestId string) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
 10121  	c.urlParams_.Set("requestId", requestId)
 10122  	return c
 10123  }
 10124  
 10125  // Fields allows partial responses to be retrieved. See
 10126  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10127  // details.
 10128  func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
 10129  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10130  	return c
 10131  }
 10132  
 10133  // Context sets the context to be used in this call's Do method.
 10134  func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsDeleteCall {
 10135  	c.ctx_ = ctx
 10136  	return c
 10137  }
 10138  
 10139  // Header returns a http.Header that can be modified by the caller to add
 10140  // headers to the request.
 10141  func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Header() http.Header {
 10142  	if c.header_ == nil {
 10143  		c.header_ = make(http.Header)
 10144  	}
 10145  	return c.header_
 10146  }
 10147  
 10148  func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) doRequest(alt string) (*http.Response, error) {
 10149  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10150  	var body io.Reader = nil
 10151  	c.urlParams_.Set("alt", alt)
 10152  	c.urlParams_.Set("prettyPrint", "false")
 10153  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10154  	urls += "?" + c.urlParams_.Encode()
 10155  	req, err := http.NewRequest("DELETE", urls, body)
 10156  	if err != nil {
 10157  		return nil, err
 10158  	}
 10159  	req.Header = reqHeaders
 10160  	googleapi.Expand(req.URL, map[string]string{
 10161  		"name": c.name,
 10162  	})
 10163  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10164  }
 10165  
 10166  // Do executes the "vmmigration.projects.locations.sources.utilizationReports.delete" call.
 10167  // Any non-2xx status code is an error. Response headers are in either
 10168  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 10169  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10170  // whether the returned error was because http.StatusNotModified was returned.
 10171  func (c *ProjectsLocationsSourcesUtilizationReportsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 10172  	gensupport.SetOptions(c.urlParams_, opts...)
 10173  	res, err := c.doRequest("json")
 10174  	if res != nil && res.StatusCode == http.StatusNotModified {
 10175  		if res.Body != nil {
 10176  			res.Body.Close()
 10177  		}
 10178  		return nil, gensupport.WrapError(&googleapi.Error{
 10179  			Code:   res.StatusCode,
 10180  			Header: res.Header,
 10181  		})
 10182  	}
 10183  	if err != nil {
 10184  		return nil, err
 10185  	}
 10186  	defer googleapi.CloseBody(res)
 10187  	if err := googleapi.CheckResponse(res); err != nil {
 10188  		return nil, gensupport.WrapError(err)
 10189  	}
 10190  	ret := &Operation{
 10191  		ServerResponse: googleapi.ServerResponse{
 10192  			Header:         res.Header,
 10193  			HTTPStatusCode: res.StatusCode,
 10194  		},
 10195  	}
 10196  	target := &ret
 10197  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10198  		return nil, err
 10199  	}
 10200  	return ret, nil
 10201  }
 10202  
 10203  type ProjectsLocationsSourcesUtilizationReportsGetCall struct {
 10204  	s            *Service
 10205  	name         string
 10206  	urlParams_   gensupport.URLParams
 10207  	ifNoneMatch_ string
 10208  	ctx_         context.Context
 10209  	header_      http.Header
 10210  }
 10211  
 10212  // Get: Gets a single Utilization Report.
 10213  //
 10214  // - name: The Utilization Report name.
 10215  func (r *ProjectsLocationsSourcesUtilizationReportsService) Get(name string) *ProjectsLocationsSourcesUtilizationReportsGetCall {
 10216  	c := &ProjectsLocationsSourcesUtilizationReportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10217  	c.name = name
 10218  	return c
 10219  }
 10220  
 10221  // View sets the optional parameter "view": The level of details of the report.
 10222  // Defaults to FULL
 10223  //
 10224  // Possible values:
 10225  //
 10226  //	"UTILIZATION_REPORT_VIEW_UNSPECIFIED" - The default / unset value. The API
 10227  //
 10228  // will default to FULL on single report request and BASIC for multiple reports
 10229  // request.
 10230  //
 10231  //	"BASIC" - Get the report metadata, without the list of VMs and their
 10232  //
 10233  // utilization info.
 10234  //
 10235  //	"FULL" - Include everything.
 10236  func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) View(view string) *ProjectsLocationsSourcesUtilizationReportsGetCall {
 10237  	c.urlParams_.Set("view", view)
 10238  	return c
 10239  }
 10240  
 10241  // Fields allows partial responses to be retrieved. See
 10242  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10243  // details.
 10244  func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsGetCall {
 10245  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10246  	return c
 10247  }
 10248  
 10249  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10250  // object's ETag matches the given value. This is useful for getting updates
 10251  // only after the object has changed since the last request.
 10252  func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesUtilizationReportsGetCall {
 10253  	c.ifNoneMatch_ = entityTag
 10254  	return c
 10255  }
 10256  
 10257  // Context sets the context to be used in this call's Do method.
 10258  func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsGetCall {
 10259  	c.ctx_ = ctx
 10260  	return c
 10261  }
 10262  
 10263  // Header returns a http.Header that can be modified by the caller to add
 10264  // headers to the request.
 10265  func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Header() http.Header {
 10266  	if c.header_ == nil {
 10267  		c.header_ = make(http.Header)
 10268  	}
 10269  	return c.header_
 10270  }
 10271  
 10272  func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) doRequest(alt string) (*http.Response, error) {
 10273  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10274  	if c.ifNoneMatch_ != "" {
 10275  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10276  	}
 10277  	var body io.Reader = nil
 10278  	c.urlParams_.Set("alt", alt)
 10279  	c.urlParams_.Set("prettyPrint", "false")
 10280  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10281  	urls += "?" + c.urlParams_.Encode()
 10282  	req, err := http.NewRequest("GET", urls, body)
 10283  	if err != nil {
 10284  		return nil, err
 10285  	}
 10286  	req.Header = reqHeaders
 10287  	googleapi.Expand(req.URL, map[string]string{
 10288  		"name": c.name,
 10289  	})
 10290  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10291  }
 10292  
 10293  // Do executes the "vmmigration.projects.locations.sources.utilizationReports.get" call.
 10294  // Any non-2xx status code is an error. Response headers are in either
 10295  // *UtilizationReport.ServerResponse.Header or (if a response was returned at
 10296  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10297  // check whether the returned error was because http.StatusNotModified was
 10298  // returned.
 10299  func (c *ProjectsLocationsSourcesUtilizationReportsGetCall) Do(opts ...googleapi.CallOption) (*UtilizationReport, error) {
 10300  	gensupport.SetOptions(c.urlParams_, opts...)
 10301  	res, err := c.doRequest("json")
 10302  	if res != nil && res.StatusCode == http.StatusNotModified {
 10303  		if res.Body != nil {
 10304  			res.Body.Close()
 10305  		}
 10306  		return nil, gensupport.WrapError(&googleapi.Error{
 10307  			Code:   res.StatusCode,
 10308  			Header: res.Header,
 10309  		})
 10310  	}
 10311  	if err != nil {
 10312  		return nil, err
 10313  	}
 10314  	defer googleapi.CloseBody(res)
 10315  	if err := googleapi.CheckResponse(res); err != nil {
 10316  		return nil, gensupport.WrapError(err)
 10317  	}
 10318  	ret := &UtilizationReport{
 10319  		ServerResponse: googleapi.ServerResponse{
 10320  			Header:         res.Header,
 10321  			HTTPStatusCode: res.StatusCode,
 10322  		},
 10323  	}
 10324  	target := &ret
 10325  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10326  		return nil, err
 10327  	}
 10328  	return ret, nil
 10329  }
 10330  
 10331  type ProjectsLocationsSourcesUtilizationReportsListCall struct {
 10332  	s            *Service
 10333  	parent       string
 10334  	urlParams_   gensupport.URLParams
 10335  	ifNoneMatch_ string
 10336  	ctx_         context.Context
 10337  	header_      http.Header
 10338  }
 10339  
 10340  // List: Lists Utilization Reports of the given Source.
 10341  //
 10342  // - parent: The Utilization Reports parent.
 10343  func (r *ProjectsLocationsSourcesUtilizationReportsService) List(parent string) *ProjectsLocationsSourcesUtilizationReportsListCall {
 10344  	c := &ProjectsLocationsSourcesUtilizationReportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10345  	c.parent = parent
 10346  	return c
 10347  }
 10348  
 10349  // Filter sets the optional parameter "filter": The filter request.
 10350  func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Filter(filter string) *ProjectsLocationsSourcesUtilizationReportsListCall {
 10351  	c.urlParams_.Set("filter", filter)
 10352  	return c
 10353  }
 10354  
 10355  // OrderBy sets the optional parameter "orderBy": the order by fields for the
 10356  // result.
 10357  func (c *ProjectsLocationsSourcesUtilizationReportsListCall) OrderBy(orderBy string) *ProjectsLocationsSourcesUtilizationReportsListCall {
 10358  	c.urlParams_.Set("orderBy", orderBy)
 10359  	return c
 10360  }
 10361  
 10362  // PageSize sets the optional parameter "pageSize": The maximum number of
 10363  // reports to return. The service may return fewer than this value. If
 10364  // unspecified, at most 500 reports will be returned. The maximum value is
 10365  // 1000; values above 1000 will be coerced to 1000.
 10366  func (c *ProjectsLocationsSourcesUtilizationReportsListCall) PageSize(pageSize int64) *ProjectsLocationsSourcesUtilizationReportsListCall {
 10367  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 10368  	return c
 10369  }
 10370  
 10371  // PageToken sets the optional parameter "pageToken": Required. A page token,
 10372  // received from a previous `ListUtilizationReports` call. Provide this to
 10373  // retrieve the subsequent page. When paginating, all other parameters provided
 10374  // to `ListUtilizationReports` must match the call that provided the page
 10375  // token.
 10376  func (c *ProjectsLocationsSourcesUtilizationReportsListCall) PageToken(pageToken string) *ProjectsLocationsSourcesUtilizationReportsListCall {
 10377  	c.urlParams_.Set("pageToken", pageToken)
 10378  	return c
 10379  }
 10380  
 10381  // View sets the optional parameter "view": The level of details of each
 10382  // report. Defaults to BASIC.
 10383  //
 10384  // Possible values:
 10385  //
 10386  //	"UTILIZATION_REPORT_VIEW_UNSPECIFIED" - The default / unset value. The API
 10387  //
 10388  // will default to FULL on single report request and BASIC for multiple reports
 10389  // request.
 10390  //
 10391  //	"BASIC" - Get the report metadata, without the list of VMs and their
 10392  //
 10393  // utilization info.
 10394  //
 10395  //	"FULL" - Include everything.
 10396  func (c *ProjectsLocationsSourcesUtilizationReportsListCall) View(view string) *ProjectsLocationsSourcesUtilizationReportsListCall {
 10397  	c.urlParams_.Set("view", view)
 10398  	return c
 10399  }
 10400  
 10401  // Fields allows partial responses to be retrieved. See
 10402  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10403  // details.
 10404  func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSourcesUtilizationReportsListCall {
 10405  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10406  	return c
 10407  }
 10408  
 10409  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10410  // object's ETag matches the given value. This is useful for getting updates
 10411  // only after the object has changed since the last request.
 10412  func (c *ProjectsLocationsSourcesUtilizationReportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSourcesUtilizationReportsListCall {
 10413  	c.ifNoneMatch_ = entityTag
 10414  	return c
 10415  }
 10416  
 10417  // Context sets the context to be used in this call's Do method.
 10418  func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Context(ctx context.Context) *ProjectsLocationsSourcesUtilizationReportsListCall {
 10419  	c.ctx_ = ctx
 10420  	return c
 10421  }
 10422  
 10423  // Header returns a http.Header that can be modified by the caller to add
 10424  // headers to the request.
 10425  func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Header() http.Header {
 10426  	if c.header_ == nil {
 10427  		c.header_ = make(http.Header)
 10428  	}
 10429  	return c.header_
 10430  }
 10431  
 10432  func (c *ProjectsLocationsSourcesUtilizationReportsListCall) doRequest(alt string) (*http.Response, error) {
 10433  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10434  	if c.ifNoneMatch_ != "" {
 10435  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10436  	}
 10437  	var body io.Reader = nil
 10438  	c.urlParams_.Set("alt", alt)
 10439  	c.urlParams_.Set("prettyPrint", "false")
 10440  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/utilizationReports")
 10441  	urls += "?" + c.urlParams_.Encode()
 10442  	req, err := http.NewRequest("GET", urls, body)
 10443  	if err != nil {
 10444  		return nil, err
 10445  	}
 10446  	req.Header = reqHeaders
 10447  	googleapi.Expand(req.URL, map[string]string{
 10448  		"parent": c.parent,
 10449  	})
 10450  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10451  }
 10452  
 10453  // Do executes the "vmmigration.projects.locations.sources.utilizationReports.list" call.
 10454  // Any non-2xx status code is an error. Response headers are in either
 10455  // *ListUtilizationReportsResponse.ServerResponse.Header or (if a response was
 10456  // returned at all) in error.(*googleapi.Error).Header. Use
 10457  // googleapi.IsNotModified to check whether the returned error was because
 10458  // http.StatusNotModified was returned.
 10459  func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Do(opts ...googleapi.CallOption) (*ListUtilizationReportsResponse, error) {
 10460  	gensupport.SetOptions(c.urlParams_, opts...)
 10461  	res, err := c.doRequest("json")
 10462  	if res != nil && res.StatusCode == http.StatusNotModified {
 10463  		if res.Body != nil {
 10464  			res.Body.Close()
 10465  		}
 10466  		return nil, gensupport.WrapError(&googleapi.Error{
 10467  			Code:   res.StatusCode,
 10468  			Header: res.Header,
 10469  		})
 10470  	}
 10471  	if err != nil {
 10472  		return nil, err
 10473  	}
 10474  	defer googleapi.CloseBody(res)
 10475  	if err := googleapi.CheckResponse(res); err != nil {
 10476  		return nil, gensupport.WrapError(err)
 10477  	}
 10478  	ret := &ListUtilizationReportsResponse{
 10479  		ServerResponse: googleapi.ServerResponse{
 10480  			Header:         res.Header,
 10481  			HTTPStatusCode: res.StatusCode,
 10482  		},
 10483  	}
 10484  	target := &ret
 10485  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10486  		return nil, err
 10487  	}
 10488  	return ret, nil
 10489  }
 10490  
 10491  // Pages invokes f for each page of results.
 10492  // A non-nil error returned from f will halt the iteration.
 10493  // The provided context supersedes any context provided to the Context method.
 10494  func (c *ProjectsLocationsSourcesUtilizationReportsListCall) Pages(ctx context.Context, f func(*ListUtilizationReportsResponse) error) error {
 10495  	c.ctx_ = ctx
 10496  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10497  	for {
 10498  		x, err := c.Do()
 10499  		if err != nil {
 10500  			return err
 10501  		}
 10502  		if err := f(x); err != nil {
 10503  			return err
 10504  		}
 10505  		if x.NextPageToken == "" {
 10506  			return nil
 10507  		}
 10508  		c.PageToken(x.NextPageToken)
 10509  	}
 10510  }
 10511  
 10512  type ProjectsLocationsTargetProjectsCreateCall struct {
 10513  	s             *Service
 10514  	parent        string
 10515  	targetproject *TargetProject
 10516  	urlParams_    gensupport.URLParams
 10517  	ctx_          context.Context
 10518  	header_       http.Header
 10519  }
 10520  
 10521  // Create: Creates a new TargetProject in a given project. NOTE: TargetProject
 10522  // is a global resource; hence the only supported value for location is
 10523  // `global`.
 10524  //
 10525  // - parent: The TargetProject's parent.
 10526  func (r *ProjectsLocationsTargetProjectsService) Create(parent string, targetproject *TargetProject) *ProjectsLocationsTargetProjectsCreateCall {
 10527  	c := &ProjectsLocationsTargetProjectsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10528  	c.parent = parent
 10529  	c.targetproject = targetproject
 10530  	return c
 10531  }
 10532  
 10533  // RequestId sets the optional parameter "requestId": A request ID to identify
 10534  // requests. Specify a unique request ID so that if you must retry your
 10535  // request, the server will know to ignore the request if it has already been
 10536  // completed. The server will guarantee that for at least 60 minutes since the
 10537  // first request. For example, consider a situation where you make an initial
 10538  // request and the request times out. If you make the request again with the
 10539  // same request ID, the server can check if original operation with the same
 10540  // request ID was received, and if so, will ignore the second request. This
 10541  // prevents clients from accidentally creating duplicate commitments. The
 10542  // request ID must be a valid UUID with the exception that zero UUID is not
 10543  // supported (00000000-0000-0000-0000-000000000000).
 10544  func (c *ProjectsLocationsTargetProjectsCreateCall) RequestId(requestId string) *ProjectsLocationsTargetProjectsCreateCall {
 10545  	c.urlParams_.Set("requestId", requestId)
 10546  	return c
 10547  }
 10548  
 10549  // TargetProjectId sets the optional parameter "targetProjectId": Required. The
 10550  // target_project identifier.
 10551  func (c *ProjectsLocationsTargetProjectsCreateCall) TargetProjectId(targetProjectId string) *ProjectsLocationsTargetProjectsCreateCall {
 10552  	c.urlParams_.Set("targetProjectId", targetProjectId)
 10553  	return c
 10554  }
 10555  
 10556  // Fields allows partial responses to be retrieved. See
 10557  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10558  // details.
 10559  func (c *ProjectsLocationsTargetProjectsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsCreateCall {
 10560  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10561  	return c
 10562  }
 10563  
 10564  // Context sets the context to be used in this call's Do method.
 10565  func (c *ProjectsLocationsTargetProjectsCreateCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsCreateCall {
 10566  	c.ctx_ = ctx
 10567  	return c
 10568  }
 10569  
 10570  // Header returns a http.Header that can be modified by the caller to add
 10571  // headers to the request.
 10572  func (c *ProjectsLocationsTargetProjectsCreateCall) Header() http.Header {
 10573  	if c.header_ == nil {
 10574  		c.header_ = make(http.Header)
 10575  	}
 10576  	return c.header_
 10577  }
 10578  
 10579  func (c *ProjectsLocationsTargetProjectsCreateCall) doRequest(alt string) (*http.Response, error) {
 10580  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10581  	var body io.Reader = nil
 10582  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetproject)
 10583  	if err != nil {
 10584  		return nil, err
 10585  	}
 10586  	c.urlParams_.Set("alt", alt)
 10587  	c.urlParams_.Set("prettyPrint", "false")
 10588  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetProjects")
 10589  	urls += "?" + c.urlParams_.Encode()
 10590  	req, err := http.NewRequest("POST", urls, body)
 10591  	if err != nil {
 10592  		return nil, err
 10593  	}
 10594  	req.Header = reqHeaders
 10595  	googleapi.Expand(req.URL, map[string]string{
 10596  		"parent": c.parent,
 10597  	})
 10598  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10599  }
 10600  
 10601  // Do executes the "vmmigration.projects.locations.targetProjects.create" call.
 10602  // Any non-2xx status code is an error. Response headers are in either
 10603  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 10604  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10605  // whether the returned error was because http.StatusNotModified was returned.
 10606  func (c *ProjectsLocationsTargetProjectsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 10607  	gensupport.SetOptions(c.urlParams_, opts...)
 10608  	res, err := c.doRequest("json")
 10609  	if res != nil && res.StatusCode == http.StatusNotModified {
 10610  		if res.Body != nil {
 10611  			res.Body.Close()
 10612  		}
 10613  		return nil, gensupport.WrapError(&googleapi.Error{
 10614  			Code:   res.StatusCode,
 10615  			Header: res.Header,
 10616  		})
 10617  	}
 10618  	if err != nil {
 10619  		return nil, err
 10620  	}
 10621  	defer googleapi.CloseBody(res)
 10622  	if err := googleapi.CheckResponse(res); err != nil {
 10623  		return nil, gensupport.WrapError(err)
 10624  	}
 10625  	ret := &Operation{
 10626  		ServerResponse: googleapi.ServerResponse{
 10627  			Header:         res.Header,
 10628  			HTTPStatusCode: res.StatusCode,
 10629  		},
 10630  	}
 10631  	target := &ret
 10632  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10633  		return nil, err
 10634  	}
 10635  	return ret, nil
 10636  }
 10637  
 10638  type ProjectsLocationsTargetProjectsDeleteCall struct {
 10639  	s          *Service
 10640  	name       string
 10641  	urlParams_ gensupport.URLParams
 10642  	ctx_       context.Context
 10643  	header_    http.Header
 10644  }
 10645  
 10646  // Delete: Deletes a single TargetProject. NOTE: TargetProject is a global
 10647  // resource; hence the only supported value for location is `global`.
 10648  //
 10649  // - name: The TargetProject name.
 10650  func (r *ProjectsLocationsTargetProjectsService) Delete(name string) *ProjectsLocationsTargetProjectsDeleteCall {
 10651  	c := &ProjectsLocationsTargetProjectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10652  	c.name = name
 10653  	return c
 10654  }
 10655  
 10656  // RequestId sets the optional parameter "requestId": A request ID to identify
 10657  // requests. Specify a unique request ID so that if you must retry your
 10658  // request, the server will know to ignore the request if it has already been
 10659  // completed. The server will guarantee that for at least 60 minutes after the
 10660  // first request. For example, consider a situation where you make an initial
 10661  // request and the request times out. If you make the request again with the
 10662  // same request ID, the server can check if original operation with the same
 10663  // request ID was received, and if so, will ignore the second request. This
 10664  // prevents clients from accidentally creating duplicate commitments. The
 10665  // request ID must be a valid UUID with the exception that zero UUID is not
 10666  // supported (00000000-0000-0000-0000-000000000000).
 10667  func (c *ProjectsLocationsTargetProjectsDeleteCall) RequestId(requestId string) *ProjectsLocationsTargetProjectsDeleteCall {
 10668  	c.urlParams_.Set("requestId", requestId)
 10669  	return c
 10670  }
 10671  
 10672  // Fields allows partial responses to be retrieved. See
 10673  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10674  // details.
 10675  func (c *ProjectsLocationsTargetProjectsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsDeleteCall {
 10676  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10677  	return c
 10678  }
 10679  
 10680  // Context sets the context to be used in this call's Do method.
 10681  func (c *ProjectsLocationsTargetProjectsDeleteCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsDeleteCall {
 10682  	c.ctx_ = ctx
 10683  	return c
 10684  }
 10685  
 10686  // Header returns a http.Header that can be modified by the caller to add
 10687  // headers to the request.
 10688  func (c *ProjectsLocationsTargetProjectsDeleteCall) Header() http.Header {
 10689  	if c.header_ == nil {
 10690  		c.header_ = make(http.Header)
 10691  	}
 10692  	return c.header_
 10693  }
 10694  
 10695  func (c *ProjectsLocationsTargetProjectsDeleteCall) doRequest(alt string) (*http.Response, error) {
 10696  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10697  	var body io.Reader = nil
 10698  	c.urlParams_.Set("alt", alt)
 10699  	c.urlParams_.Set("prettyPrint", "false")
 10700  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10701  	urls += "?" + c.urlParams_.Encode()
 10702  	req, err := http.NewRequest("DELETE", urls, body)
 10703  	if err != nil {
 10704  		return nil, err
 10705  	}
 10706  	req.Header = reqHeaders
 10707  	googleapi.Expand(req.URL, map[string]string{
 10708  		"name": c.name,
 10709  	})
 10710  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10711  }
 10712  
 10713  // Do executes the "vmmigration.projects.locations.targetProjects.delete" call.
 10714  // Any non-2xx status code is an error. Response headers are in either
 10715  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 10716  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10717  // whether the returned error was because http.StatusNotModified was returned.
 10718  func (c *ProjectsLocationsTargetProjectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 10719  	gensupport.SetOptions(c.urlParams_, opts...)
 10720  	res, err := c.doRequest("json")
 10721  	if res != nil && res.StatusCode == http.StatusNotModified {
 10722  		if res.Body != nil {
 10723  			res.Body.Close()
 10724  		}
 10725  		return nil, gensupport.WrapError(&googleapi.Error{
 10726  			Code:   res.StatusCode,
 10727  			Header: res.Header,
 10728  		})
 10729  	}
 10730  	if err != nil {
 10731  		return nil, err
 10732  	}
 10733  	defer googleapi.CloseBody(res)
 10734  	if err := googleapi.CheckResponse(res); err != nil {
 10735  		return nil, gensupport.WrapError(err)
 10736  	}
 10737  	ret := &Operation{
 10738  		ServerResponse: googleapi.ServerResponse{
 10739  			Header:         res.Header,
 10740  			HTTPStatusCode: res.StatusCode,
 10741  		},
 10742  	}
 10743  	target := &ret
 10744  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10745  		return nil, err
 10746  	}
 10747  	return ret, nil
 10748  }
 10749  
 10750  type ProjectsLocationsTargetProjectsGetCall struct {
 10751  	s            *Service
 10752  	name         string
 10753  	urlParams_   gensupport.URLParams
 10754  	ifNoneMatch_ string
 10755  	ctx_         context.Context
 10756  	header_      http.Header
 10757  }
 10758  
 10759  // Get: Gets details of a single TargetProject. NOTE: TargetProject is a global
 10760  // resource; hence the only supported value for location is `global`.
 10761  //
 10762  // - name: The TargetProject name.
 10763  func (r *ProjectsLocationsTargetProjectsService) Get(name string) *ProjectsLocationsTargetProjectsGetCall {
 10764  	c := &ProjectsLocationsTargetProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10765  	c.name = name
 10766  	return c
 10767  }
 10768  
 10769  // Fields allows partial responses to be retrieved. See
 10770  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10771  // details.
 10772  func (c *ProjectsLocationsTargetProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsGetCall {
 10773  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10774  	return c
 10775  }
 10776  
 10777  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10778  // object's ETag matches the given value. This is useful for getting updates
 10779  // only after the object has changed since the last request.
 10780  func (c *ProjectsLocationsTargetProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTargetProjectsGetCall {
 10781  	c.ifNoneMatch_ = entityTag
 10782  	return c
 10783  }
 10784  
 10785  // Context sets the context to be used in this call's Do method.
 10786  func (c *ProjectsLocationsTargetProjectsGetCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsGetCall {
 10787  	c.ctx_ = ctx
 10788  	return c
 10789  }
 10790  
 10791  // Header returns a http.Header that can be modified by the caller to add
 10792  // headers to the request.
 10793  func (c *ProjectsLocationsTargetProjectsGetCall) Header() http.Header {
 10794  	if c.header_ == nil {
 10795  		c.header_ = make(http.Header)
 10796  	}
 10797  	return c.header_
 10798  }
 10799  
 10800  func (c *ProjectsLocationsTargetProjectsGetCall) doRequest(alt string) (*http.Response, error) {
 10801  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10802  	if c.ifNoneMatch_ != "" {
 10803  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10804  	}
 10805  	var body io.Reader = nil
 10806  	c.urlParams_.Set("alt", alt)
 10807  	c.urlParams_.Set("prettyPrint", "false")
 10808  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10809  	urls += "?" + c.urlParams_.Encode()
 10810  	req, err := http.NewRequest("GET", urls, body)
 10811  	if err != nil {
 10812  		return nil, err
 10813  	}
 10814  	req.Header = reqHeaders
 10815  	googleapi.Expand(req.URL, map[string]string{
 10816  		"name": c.name,
 10817  	})
 10818  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10819  }
 10820  
 10821  // Do executes the "vmmigration.projects.locations.targetProjects.get" call.
 10822  // Any non-2xx status code is an error. Response headers are in either
 10823  // *TargetProject.ServerResponse.Header or (if a response was returned at all)
 10824  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10825  // whether the returned error was because http.StatusNotModified was returned.
 10826  func (c *ProjectsLocationsTargetProjectsGetCall) Do(opts ...googleapi.CallOption) (*TargetProject, error) {
 10827  	gensupport.SetOptions(c.urlParams_, opts...)
 10828  	res, err := c.doRequest("json")
 10829  	if res != nil && res.StatusCode == http.StatusNotModified {
 10830  		if res.Body != nil {
 10831  			res.Body.Close()
 10832  		}
 10833  		return nil, gensupport.WrapError(&googleapi.Error{
 10834  			Code:   res.StatusCode,
 10835  			Header: res.Header,
 10836  		})
 10837  	}
 10838  	if err != nil {
 10839  		return nil, err
 10840  	}
 10841  	defer googleapi.CloseBody(res)
 10842  	if err := googleapi.CheckResponse(res); err != nil {
 10843  		return nil, gensupport.WrapError(err)
 10844  	}
 10845  	ret := &TargetProject{
 10846  		ServerResponse: googleapi.ServerResponse{
 10847  			Header:         res.Header,
 10848  			HTTPStatusCode: res.StatusCode,
 10849  		},
 10850  	}
 10851  	target := &ret
 10852  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10853  		return nil, err
 10854  	}
 10855  	return ret, nil
 10856  }
 10857  
 10858  type ProjectsLocationsTargetProjectsListCall struct {
 10859  	s            *Service
 10860  	parent       string
 10861  	urlParams_   gensupport.URLParams
 10862  	ifNoneMatch_ string
 10863  	ctx_         context.Context
 10864  	header_      http.Header
 10865  }
 10866  
 10867  // List: Lists TargetProjects in a given project. NOTE: TargetProject is a
 10868  // global resource; hence the only supported value for location is `global`.
 10869  //
 10870  // - parent: The parent, which owns this collection of targets.
 10871  func (r *ProjectsLocationsTargetProjectsService) List(parent string) *ProjectsLocationsTargetProjectsListCall {
 10872  	c := &ProjectsLocationsTargetProjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10873  	c.parent = parent
 10874  	return c
 10875  }
 10876  
 10877  // Filter sets the optional parameter "filter": The filter request.
 10878  func (c *ProjectsLocationsTargetProjectsListCall) Filter(filter string) *ProjectsLocationsTargetProjectsListCall {
 10879  	c.urlParams_.Set("filter", filter)
 10880  	return c
 10881  }
 10882  
 10883  // OrderBy sets the optional parameter "orderBy": the order by fields for the
 10884  // result.
 10885  func (c *ProjectsLocationsTargetProjectsListCall) OrderBy(orderBy string) *ProjectsLocationsTargetProjectsListCall {
 10886  	c.urlParams_.Set("orderBy", orderBy)
 10887  	return c
 10888  }
 10889  
 10890  // PageSize sets the optional parameter "pageSize": The maximum number of
 10891  // targets to return. The service may return fewer than this value. If
 10892  // unspecified, at most 500 targets will be returned. The maximum value is
 10893  // 1000; values above 1000 will be coerced to 1000.
 10894  func (c *ProjectsLocationsTargetProjectsListCall) PageSize(pageSize int64) *ProjectsLocationsTargetProjectsListCall {
 10895  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 10896  	return c
 10897  }
 10898  
 10899  // PageToken sets the optional parameter "pageToken": Required. A page token,
 10900  // received from a previous `ListTargets` call. Provide this to retrieve the
 10901  // subsequent page. When paginating, all other parameters provided to
 10902  // `ListTargets` must match the call that provided the page token.
 10903  func (c *ProjectsLocationsTargetProjectsListCall) PageToken(pageToken string) *ProjectsLocationsTargetProjectsListCall {
 10904  	c.urlParams_.Set("pageToken", pageToken)
 10905  	return c
 10906  }
 10907  
 10908  // Fields allows partial responses to be retrieved. See
 10909  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10910  // details.
 10911  func (c *ProjectsLocationsTargetProjectsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsListCall {
 10912  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10913  	return c
 10914  }
 10915  
 10916  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10917  // object's ETag matches the given value. This is useful for getting updates
 10918  // only after the object has changed since the last request.
 10919  func (c *ProjectsLocationsTargetProjectsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTargetProjectsListCall {
 10920  	c.ifNoneMatch_ = entityTag
 10921  	return c
 10922  }
 10923  
 10924  // Context sets the context to be used in this call's Do method.
 10925  func (c *ProjectsLocationsTargetProjectsListCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsListCall {
 10926  	c.ctx_ = ctx
 10927  	return c
 10928  }
 10929  
 10930  // Header returns a http.Header that can be modified by the caller to add
 10931  // headers to the request.
 10932  func (c *ProjectsLocationsTargetProjectsListCall) Header() http.Header {
 10933  	if c.header_ == nil {
 10934  		c.header_ = make(http.Header)
 10935  	}
 10936  	return c.header_
 10937  }
 10938  
 10939  func (c *ProjectsLocationsTargetProjectsListCall) doRequest(alt string) (*http.Response, error) {
 10940  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10941  	if c.ifNoneMatch_ != "" {
 10942  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10943  	}
 10944  	var body io.Reader = nil
 10945  	c.urlParams_.Set("alt", alt)
 10946  	c.urlParams_.Set("prettyPrint", "false")
 10947  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetProjects")
 10948  	urls += "?" + c.urlParams_.Encode()
 10949  	req, err := http.NewRequest("GET", urls, body)
 10950  	if err != nil {
 10951  		return nil, err
 10952  	}
 10953  	req.Header = reqHeaders
 10954  	googleapi.Expand(req.URL, map[string]string{
 10955  		"parent": c.parent,
 10956  	})
 10957  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10958  }
 10959  
 10960  // Do executes the "vmmigration.projects.locations.targetProjects.list" call.
 10961  // Any non-2xx status code is an error. Response headers are in either
 10962  // *ListTargetProjectsResponse.ServerResponse.Header or (if a response was
 10963  // returned at all) in error.(*googleapi.Error).Header. Use
 10964  // googleapi.IsNotModified to check whether the returned error was because
 10965  // http.StatusNotModified was returned.
 10966  func (c *ProjectsLocationsTargetProjectsListCall) Do(opts ...googleapi.CallOption) (*ListTargetProjectsResponse, error) {
 10967  	gensupport.SetOptions(c.urlParams_, opts...)
 10968  	res, err := c.doRequest("json")
 10969  	if res != nil && res.StatusCode == http.StatusNotModified {
 10970  		if res.Body != nil {
 10971  			res.Body.Close()
 10972  		}
 10973  		return nil, gensupport.WrapError(&googleapi.Error{
 10974  			Code:   res.StatusCode,
 10975  			Header: res.Header,
 10976  		})
 10977  	}
 10978  	if err != nil {
 10979  		return nil, err
 10980  	}
 10981  	defer googleapi.CloseBody(res)
 10982  	if err := googleapi.CheckResponse(res); err != nil {
 10983  		return nil, gensupport.WrapError(err)
 10984  	}
 10985  	ret := &ListTargetProjectsResponse{
 10986  		ServerResponse: googleapi.ServerResponse{
 10987  			Header:         res.Header,
 10988  			HTTPStatusCode: res.StatusCode,
 10989  		},
 10990  	}
 10991  	target := &ret
 10992  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10993  		return nil, err
 10994  	}
 10995  	return ret, nil
 10996  }
 10997  
 10998  // Pages invokes f for each page of results.
 10999  // A non-nil error returned from f will halt the iteration.
 11000  // The provided context supersedes any context provided to the Context method.
 11001  func (c *ProjectsLocationsTargetProjectsListCall) Pages(ctx context.Context, f func(*ListTargetProjectsResponse) error) error {
 11002  	c.ctx_ = ctx
 11003  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 11004  	for {
 11005  		x, err := c.Do()
 11006  		if err != nil {
 11007  			return err
 11008  		}
 11009  		if err := f(x); err != nil {
 11010  			return err
 11011  		}
 11012  		if x.NextPageToken == "" {
 11013  			return nil
 11014  		}
 11015  		c.PageToken(x.NextPageToken)
 11016  	}
 11017  }
 11018  
 11019  type ProjectsLocationsTargetProjectsPatchCall struct {
 11020  	s             *Service
 11021  	name          string
 11022  	targetproject *TargetProject
 11023  	urlParams_    gensupport.URLParams
 11024  	ctx_          context.Context
 11025  	header_       http.Header
 11026  }
 11027  
 11028  // Patch: Updates the parameters of a single TargetProject. NOTE: TargetProject
 11029  // is a global resource; hence the only supported value for location is
 11030  // `global`.
 11031  //
 11032  // - name: Output only. The name of the target project.
 11033  func (r *ProjectsLocationsTargetProjectsService) Patch(name string, targetproject *TargetProject) *ProjectsLocationsTargetProjectsPatchCall {
 11034  	c := &ProjectsLocationsTargetProjectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11035  	c.name = name
 11036  	c.targetproject = targetproject
 11037  	return c
 11038  }
 11039  
 11040  // RequestId sets the optional parameter "requestId": A request ID to identify
 11041  // requests. Specify a unique request ID so that if you must retry your
 11042  // request, the server will know to ignore the request if it has already been
 11043  // completed. The server will guarantee that for at least 60 minutes since the
 11044  // first request. For example, consider a situation where you make an initial
 11045  // request and the request times out. If you make the request again with the
 11046  // same request ID, the server can check if original operation with the same
 11047  // request ID was received, and if so, will ignore the second request. This
 11048  // prevents clients from accidentally creating duplicate commitments. The
 11049  // request ID must be a valid UUID with the exception that zero UUID is not
 11050  // supported (00000000-0000-0000-0000-000000000000).
 11051  func (c *ProjectsLocationsTargetProjectsPatchCall) RequestId(requestId string) *ProjectsLocationsTargetProjectsPatchCall {
 11052  	c.urlParams_.Set("requestId", requestId)
 11053  	return c
 11054  }
 11055  
 11056  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
 11057  // specify the fields to be overwritten in the TargetProject resource by the
 11058  // update. The fields specified in the update_mask are relative to the
 11059  // resource, not the full request. A field will be overwritten if it is in the
 11060  // mask. If the user does not provide a mask then all fields will be
 11061  // overwritten.
 11062  func (c *ProjectsLocationsTargetProjectsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTargetProjectsPatchCall {
 11063  	c.urlParams_.Set("updateMask", updateMask)
 11064  	return c
 11065  }
 11066  
 11067  // Fields allows partial responses to be retrieved. See
 11068  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11069  // details.
 11070  func (c *ProjectsLocationsTargetProjectsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTargetProjectsPatchCall {
 11071  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11072  	return c
 11073  }
 11074  
 11075  // Context sets the context to be used in this call's Do method.
 11076  func (c *ProjectsLocationsTargetProjectsPatchCall) Context(ctx context.Context) *ProjectsLocationsTargetProjectsPatchCall {
 11077  	c.ctx_ = ctx
 11078  	return c
 11079  }
 11080  
 11081  // Header returns a http.Header that can be modified by the caller to add
 11082  // headers to the request.
 11083  func (c *ProjectsLocationsTargetProjectsPatchCall) Header() http.Header {
 11084  	if c.header_ == nil {
 11085  		c.header_ = make(http.Header)
 11086  	}
 11087  	return c.header_
 11088  }
 11089  
 11090  func (c *ProjectsLocationsTargetProjectsPatchCall) doRequest(alt string) (*http.Response, error) {
 11091  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11092  	var body io.Reader = nil
 11093  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetproject)
 11094  	if err != nil {
 11095  		return nil, err
 11096  	}
 11097  	c.urlParams_.Set("alt", alt)
 11098  	c.urlParams_.Set("prettyPrint", "false")
 11099  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 11100  	urls += "?" + c.urlParams_.Encode()
 11101  	req, err := http.NewRequest("PATCH", urls, body)
 11102  	if err != nil {
 11103  		return nil, err
 11104  	}
 11105  	req.Header = reqHeaders
 11106  	googleapi.Expand(req.URL, map[string]string{
 11107  		"name": c.name,
 11108  	})
 11109  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11110  }
 11111  
 11112  // Do executes the "vmmigration.projects.locations.targetProjects.patch" call.
 11113  // Any non-2xx status code is an error. Response headers are in either
 11114  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 11115  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11116  // whether the returned error was because http.StatusNotModified was returned.
 11117  func (c *ProjectsLocationsTargetProjectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 11118  	gensupport.SetOptions(c.urlParams_, opts...)
 11119  	res, err := c.doRequest("json")
 11120  	if res != nil && res.StatusCode == http.StatusNotModified {
 11121  		if res.Body != nil {
 11122  			res.Body.Close()
 11123  		}
 11124  		return nil, gensupport.WrapError(&googleapi.Error{
 11125  			Code:   res.StatusCode,
 11126  			Header: res.Header,
 11127  		})
 11128  	}
 11129  	if err != nil {
 11130  		return nil, err
 11131  	}
 11132  	defer googleapi.CloseBody(res)
 11133  	if err := googleapi.CheckResponse(res); err != nil {
 11134  		return nil, gensupport.WrapError(err)
 11135  	}
 11136  	ret := &Operation{
 11137  		ServerResponse: googleapi.ServerResponse{
 11138  			Header:         res.Header,
 11139  			HTTPStatusCode: res.StatusCode,
 11140  		},
 11141  	}
 11142  	target := &ret
 11143  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11144  		return nil, err
 11145  	}
 11146  	return ret, nil
 11147  }
 11148  

View as plain text