...

Source file src/google.golang.org/api/datamigration/v1beta1/datamigration-gen.go

Documentation: google.golang.org/api/datamigration/v1beta1

     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 datamigration provides access to the Database Migration API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/database-migration/
    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/datamigration/v1beta1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	datamigrationService, err := datamigration.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  //	datamigrationService, err := datamigration.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  //	datamigrationService, err := datamigration.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package datamigration // import "google.golang.org/api/datamigration/v1beta1"
    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 = "datamigration:v1beta1"
    90  const apiName = "datamigration"
    91  const apiVersion = "v1beta1"
    92  const basePath = "https://datamigration.googleapis.com/"
    93  const basePathTemplate = "https://datamigration.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://datamigration.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.ConnectionProfiles = NewProjectsLocationsConnectionProfilesService(s)
   172  	rs.MigrationJobs = NewProjectsLocationsMigrationJobsService(s)
   173  	rs.Operations = NewProjectsLocationsOperationsService(s)
   174  	return rs
   175  }
   176  
   177  type ProjectsLocationsService struct {
   178  	s *Service
   179  
   180  	ConnectionProfiles *ProjectsLocationsConnectionProfilesService
   181  
   182  	MigrationJobs *ProjectsLocationsMigrationJobsService
   183  
   184  	Operations *ProjectsLocationsOperationsService
   185  }
   186  
   187  func NewProjectsLocationsConnectionProfilesService(s *Service) *ProjectsLocationsConnectionProfilesService {
   188  	rs := &ProjectsLocationsConnectionProfilesService{s: s}
   189  	return rs
   190  }
   191  
   192  type ProjectsLocationsConnectionProfilesService struct {
   193  	s *Service
   194  }
   195  
   196  func NewProjectsLocationsMigrationJobsService(s *Service) *ProjectsLocationsMigrationJobsService {
   197  	rs := &ProjectsLocationsMigrationJobsService{s: s}
   198  	return rs
   199  }
   200  
   201  type ProjectsLocationsMigrationJobsService struct {
   202  	s *Service
   203  }
   204  
   205  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   206  	rs := &ProjectsLocationsOperationsService{s: s}
   207  	return rs
   208  }
   209  
   210  type ProjectsLocationsOperationsService struct {
   211  	s *Service
   212  }
   213  
   214  // AuditConfig: Specifies the audit configuration for a service. The
   215  // configuration determines which permission types are logged, and what
   216  // identities, if any, are exempted from logging. An AuditConfig must have one
   217  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   218  // and a specific service, the union of the two AuditConfigs is used for that
   219  // service: the log_types specified in each AuditConfig are enabled, and the
   220  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   221  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   222  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   223  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   224  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   225  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   226  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   227  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   228  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   229  // `aliya@example.com` from DATA_WRITE logging.
   230  type AuditConfig struct {
   231  	// AuditLogConfigs: The configuration for logging of each type of permission.
   232  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   233  	// Service: Specifies a service that will be enabled for audit logging. For
   234  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   235  	// is a special value that covers all services.
   236  	Service string `json:"service,omitempty"`
   237  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   238  	// unconditionally include in API requests. By default, fields with empty or
   239  	// default values are omitted from API requests. See
   240  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   241  	// details.
   242  	ForceSendFields []string `json:"-"`
   243  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   244  	// API requests with the JSON null value. By default, fields with empty values
   245  	// are omitted from API requests. See
   246  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   247  	NullFields []string `json:"-"`
   248  }
   249  
   250  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   251  	type NoMethod AuditConfig
   252  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   253  }
   254  
   255  // AuditLogConfig: Provides the configuration for logging a type of
   256  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   257  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   258  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   259  // exempting jose@example.com from DATA_READ logging.
   260  type AuditLogConfig struct {
   261  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   262  	// type of permission. Follows the same format of Binding.members.
   263  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   264  	// LogType: The log type that this config enables.
   265  	//
   266  	// Possible values:
   267  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   268  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   269  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   270  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   271  	LogType string `json:"logType,omitempty"`
   272  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   273  	// unconditionally include in API requests. By default, fields with empty or
   274  	// default values are omitted from API requests. See
   275  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   276  	// details.
   277  	ForceSendFields []string `json:"-"`
   278  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   279  	// API requests with the JSON null value. By default, fields with empty values
   280  	// are omitted from API requests. See
   281  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   282  	NullFields []string `json:"-"`
   283  }
   284  
   285  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   286  	type NoMethod AuditLogConfig
   287  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   288  }
   289  
   290  // Binding: Associates `members`, or principals, with a `role`.
   291  type Binding struct {
   292  	// Condition: The condition that is associated with this binding. If the
   293  	// condition evaluates to `true`, then this binding applies to the current
   294  	// request. If the condition evaluates to `false`, then this binding does not
   295  	// apply to the current request. However, a different role binding might grant
   296  	// the same role to one or more of the principals in this binding. To learn
   297  	// which resources support conditions in their IAM policies, see the IAM
   298  	// documentation
   299  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   300  	Condition *Expr `json:"condition,omitempty"`
   301  	// Members: Specifies the principals requesting access for a Google Cloud
   302  	// resource. `members` can have the following values: * `allUsers`: A special
   303  	// identifier that represents anyone who is on the internet; with or without a
   304  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   305  	// represents anyone who is authenticated with a Google account or a service
   306  	// account. Does not include identities that come from external identity
   307  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   308  	// address that represents a specific Google account. For example,
   309  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   310  	// represents a Google service account. For example,
   311  	// `my-other-app@appspot.gserviceaccount.com`. *
   312  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   313  	// identifier for a Kubernetes service account
   314  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   315  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   316  	// `group:{emailid}`: An email address that represents a Google group. For
   317  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   318  	// (primary) that represents all the users of that domain. For example,
   319  	// `google.com` or `example.com`. *
   320  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   321  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   322  	// pool. *
   323  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   324  	// group/{group_id}`: All workforce identities in a group. *
   325  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   326  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   327  	// a specific attribute value. *
   328  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   329  	// *`: All identities in a workforce identity pool. *
   330  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   331  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   332  	// identity in a workload identity pool. *
   333  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   334  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   335  	// group. *
   336  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   337  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   338  	// `: All identities in a workload identity pool with a certain attribute. *
   339  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   340  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   341  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   342  	// unique identifier) representing a user that has been recently deleted. For
   343  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   344  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   345  	// retains the role in the binding. *
   346  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   347  	// unique identifier) representing a service account that has been recently
   348  	// deleted. For example,
   349  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   350  	// service account is undeleted, this value reverts to
   351  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   352  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   353  	// address (plus unique identifier) representing a Google group that has been
   354  	// recently deleted. For example,
   355  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   356  	// this value reverts to `group:{emailid}` and the recovered group retains the
   357  	// role in the binding. *
   358  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   359  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   360  	// workforce identity pool. For example,
   361  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   362  	// ol-id/subject/my-subject-attribute-value`.
   363  	Members []string `json:"members,omitempty"`
   364  	// Role: Role that is assigned to the list of `members`, or principals. For
   365  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   366  	// of the IAM roles and permissions, see the IAM documentation
   367  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   368  	// available pre-defined roles, see here
   369  	// (https://cloud.google.com/iam/docs/understanding-roles).
   370  	Role string `json:"role,omitempty"`
   371  	// ForceSendFields is a list of field names (e.g. "Condition") to
   372  	// unconditionally include in API requests. By default, fields with empty or
   373  	// default values are omitted from API requests. See
   374  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   375  	// details.
   376  	ForceSendFields []string `json:"-"`
   377  	// NullFields is a list of field names (e.g. "Condition") to include in API
   378  	// requests with the JSON null value. By default, fields with empty values are
   379  	// omitted from API requests. See
   380  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   381  	NullFields []string `json:"-"`
   382  }
   383  
   384  func (s *Binding) MarshalJSON() ([]byte, error) {
   385  	type NoMethod Binding
   386  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   387  }
   388  
   389  // CancelOperationRequest: The request message for Operations.CancelOperation.
   390  type CancelOperationRequest struct {
   391  }
   392  
   393  // CloudSqlConnectionProfile: Specifies required connection parameters, and,
   394  // optionally, the parameters required to create a Cloud SQL destination
   395  // database instance.
   396  type CloudSqlConnectionProfile struct {
   397  	// CloudSqlId: Output only. The Cloud SQL instance ID that this connection
   398  	// profile is associated with.
   399  	CloudSqlId string `json:"cloudSqlId,omitempty"`
   400  	// PrivateIp: Output only. The Cloud SQL database instance's private IP.
   401  	PrivateIp string `json:"privateIp,omitempty"`
   402  	// PublicIp: Output only. The Cloud SQL database instance's public IP.
   403  	PublicIp string `json:"publicIp,omitempty"`
   404  	// Settings: Immutable. Metadata used to create the destination Cloud SQL
   405  	// database.
   406  	Settings *CloudSqlSettings `json:"settings,omitempty"`
   407  	// ForceSendFields is a list of field names (e.g. "CloudSqlId") to
   408  	// unconditionally include in API requests. By default, fields with empty or
   409  	// default values are omitted from API requests. See
   410  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   411  	// details.
   412  	ForceSendFields []string `json:"-"`
   413  	// NullFields is a list of field names (e.g. "CloudSqlId") to include in API
   414  	// requests with the JSON null value. By default, fields with empty values are
   415  	// omitted from API requests. See
   416  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   417  	NullFields []string `json:"-"`
   418  }
   419  
   420  func (s *CloudSqlConnectionProfile) MarshalJSON() ([]byte, error) {
   421  	type NoMethod CloudSqlConnectionProfile
   422  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   423  }
   424  
   425  // CloudSqlSettings: Settings for creating a Cloud SQL database instance.
   426  type CloudSqlSettings struct {
   427  	// ActivationPolicy: The activation policy specifies when the instance is
   428  	// activated; it is applicable only when the instance state is 'RUNNABLE'.
   429  	// Valid values: 'ALWAYS': The instance is on, and remains so even in the
   430  	// absence of connection requests. `NEVER`: The instance is off; it is not
   431  	// activated, even if a connection request arrives.
   432  	//
   433  	// Possible values:
   434  	//   "SQL_ACTIVATION_POLICY_UNSPECIFIED" - unspecified policy.
   435  	//   "ALWAYS" - The instance is always up and running.
   436  	//   "NEVER" - The instance should never spin up.
   437  	ActivationPolicy string `json:"activationPolicy,omitempty"`
   438  	// AutoStorageIncrease: [default: ON] If you enable this setting, Cloud SQL
   439  	// checks your available storage every 30 seconds. If the available storage
   440  	// falls below a threshold size, Cloud SQL automatically adds additional
   441  	// storage capacity. If the available storage repeatedly falls below the
   442  	// threshold size, Cloud SQL continues to add storage until it reaches the
   443  	// maximum of 30 TB.
   444  	AutoStorageIncrease bool `json:"autoStorageIncrease,omitempty"`
   445  	// DataDiskSizeGb: The storage capacity available to the database, in GB. The
   446  	// minimum (and default) size is 10GB.
   447  	DataDiskSizeGb int64 `json:"dataDiskSizeGb,omitempty,string"`
   448  	// DataDiskType: The type of storage: `PD_SSD` (default) or `PD_HDD`.
   449  	//
   450  	// Possible values:
   451  	//   "SQL_DATA_DISK_TYPE_UNSPECIFIED" - Unspecified.
   452  	//   "PD_SSD" - SSD disk.
   453  	//   "PD_HDD" - HDD disk.
   454  	DataDiskType string `json:"dataDiskType,omitempty"`
   455  	// DatabaseFlags: The database flags passed to the Cloud SQL instance at
   456  	// startup. An object containing a list of "key": value pairs. Example: {
   457  	// "name": "wrench", "mass": "1.3kg", "count": "3" }.
   458  	DatabaseFlags map[string]string `json:"databaseFlags,omitempty"`
   459  	// DatabaseVersion: The database engine type and version.
   460  	//
   461  	// Possible values:
   462  	//   "SQL_DATABASE_VERSION_UNSPECIFIED" - Unspecified version.
   463  	//   "MYSQL_5_6" - MySQL 5.6.
   464  	//   "MYSQL_5_7" - MySQL 5.7.
   465  	//   "MYSQL_8_0" - MySQL 8.0.
   466  	DatabaseVersion string `json:"databaseVersion,omitempty"`
   467  	// IpConfig: The settings for IP Management. This allows to enable or disable
   468  	// the instance IP and manage which external networks can connect to the
   469  	// instance. The IPv4 address cannot be disabled.
   470  	IpConfig *SqlIpConfig `json:"ipConfig,omitempty"`
   471  	// RootPassword: Input only. Initial root password.
   472  	RootPassword string `json:"rootPassword,omitempty"`
   473  	// RootPasswordSet: Output only. Indicates If this connection profile root
   474  	// password is stored.
   475  	RootPasswordSet bool `json:"rootPasswordSet,omitempty"`
   476  	// SourceId: The Database Migration Service source connection profile ID, in
   477  	// the format:
   478  	// `projects/my_project_name/locations/us-central1/connectionProfiles/connection
   479  	// _profile_ID`
   480  	SourceId string `json:"sourceId,omitempty"`
   481  	// StorageAutoResizeLimit: The maximum size to which storage capacity can be
   482  	// automatically increased. The default value is 0, which specifies that there
   483  	// is no limit.
   484  	StorageAutoResizeLimit int64 `json:"storageAutoResizeLimit,omitempty,string"`
   485  	// Tier: The tier (or machine type) for this instance, for example:
   486  	// `db-n1-standard-1` (MySQL instances). For more information, see Cloud SQL
   487  	// Instance Settings
   488  	// (https://cloud.google.com/sql/docs/mysql/instance-settings).
   489  	Tier string `json:"tier,omitempty"`
   490  	// UserLabels: The resource labels for a Cloud SQL instance to use to annotate
   491  	// any related underlying resources such as Compute Engine VMs. An object
   492  	// containing a list of "key": "value" pairs. Example: `{ "name": "wrench",
   493  	// "mass": "18kg", "count": "3" }`.
   494  	UserLabels map[string]string `json:"userLabels,omitempty"`
   495  	// Zone: The Google Cloud Platform zone where your Cloud SQL database instance
   496  	// is located.
   497  	Zone string `json:"zone,omitempty"`
   498  	// ForceSendFields is a list of field names (e.g. "ActivationPolicy") to
   499  	// unconditionally include in API requests. By default, fields with empty or
   500  	// default values are omitted from API requests. See
   501  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   502  	// details.
   503  	ForceSendFields []string `json:"-"`
   504  	// NullFields is a list of field names (e.g. "ActivationPolicy") to include in
   505  	// API requests with the JSON null value. By default, fields with empty values
   506  	// are omitted from API requests. See
   507  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   508  	NullFields []string `json:"-"`
   509  }
   510  
   511  func (s *CloudSqlSettings) MarshalJSON() ([]byte, error) {
   512  	type NoMethod CloudSqlSettings
   513  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   514  }
   515  
   516  // ConnectionProfile: A connection profile definition.
   517  type ConnectionProfile struct {
   518  	// Cloudsql: A CloudSQL database connection profile.
   519  	Cloudsql *CloudSqlConnectionProfile `json:"cloudsql,omitempty"`
   520  	// CreateTime: Output only. The timestamp when the resource was created. A
   521  	// timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example:
   522  	// "2014-10-02T15:01:23.045123456Z".
   523  	CreateTime string `json:"createTime,omitempty"`
   524  	// DisplayName: The connection profile display name.
   525  	DisplayName string `json:"displayName,omitempty"`
   526  	// Error: Output only. The error details in case of state FAILED.
   527  	Error *Status `json:"error,omitempty"`
   528  	// Labels: The resource labels for connection profile to use to annotate any
   529  	// related underlying resources such as Compute Engine VMs. An object
   530  	// containing a list of "key": "value" pairs. Example: `{ "name": "wrench",
   531  	// "mass": "1.3kg", "count": "3" }`.
   532  	Labels map[string]string `json:"labels,omitempty"`
   533  	// Mysql: A MySQL database connection profile.
   534  	Mysql *MySqlConnectionProfile `json:"mysql,omitempty"`
   535  	// Name: The name of this connection profile resource in the form of
   536  	// projects/{project}/locations/{location}/connectionProfiles/{connectionProfile
   537  	// }.
   538  	Name string `json:"name,omitempty"`
   539  	// Provider: The database provider.
   540  	//
   541  	// Possible values:
   542  	//   "DATABASE_PROVIDER_UNSPECIFIED" - The database provider is unknown.
   543  	//   "CLOUDSQL" - CloudSQL runs the database.
   544  	//   "RDS" - RDS runs the database.
   545  	Provider string `json:"provider,omitempty"`
   546  	// State: The current connection profile state (e.g. DRAFT, READY, or FAILED).
   547  	//
   548  	// Possible values:
   549  	//   "STATE_UNSPECIFIED" - The state of the connection profile is unknown.
   550  	//   "DRAFT" - The connection profile is in draft mode and fully editable.
   551  	//   "CREATING" - The connection profile is being created.
   552  	//   "READY" - The connection profile is ready.
   553  	//   "UPDATING" - The connection profile is being updated.
   554  	//   "DELETING" - The connection profile is being deleted.
   555  	//   "DELETED" - The connection profile has been deleted.
   556  	//   "FAILED" - The last action on the connection profile failed.
   557  	State string `json:"state,omitempty"`
   558  	// UpdateTime: Output only. The timestamp when the resource was last updated. A
   559  	// timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example:
   560  	// "2014-10-02T15:01:23.045123456Z".
   561  	UpdateTime string `json:"updateTime,omitempty"`
   562  
   563  	// ServerResponse contains the HTTP response code and headers from the server.
   564  	googleapi.ServerResponse `json:"-"`
   565  	// ForceSendFields is a list of field names (e.g. "Cloudsql") to
   566  	// unconditionally include in API requests. By default, fields with empty or
   567  	// default values are omitted from API requests. See
   568  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   569  	// details.
   570  	ForceSendFields []string `json:"-"`
   571  	// NullFields is a list of field names (e.g. "Cloudsql") to include in API
   572  	// requests with the JSON null value. By default, fields with empty values are
   573  	// omitted from API requests. See
   574  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   575  	NullFields []string `json:"-"`
   576  }
   577  
   578  func (s *ConnectionProfile) MarshalJSON() ([]byte, error) {
   579  	type NoMethod ConnectionProfile
   580  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   581  }
   582  
   583  // DatabaseType: A message defining the database engine and provider.
   584  type DatabaseType struct {
   585  	// Engine: The database engine.
   586  	//
   587  	// Possible values:
   588  	//   "DATABASE_ENGINE_UNSPECIFIED" - The source database engine of the
   589  	// migration job is unknown.
   590  	//   "MYSQL" - The source engine is MySQL.
   591  	Engine string `json:"engine,omitempty"`
   592  	// Provider: The database provider.
   593  	//
   594  	// Possible values:
   595  	//   "DATABASE_PROVIDER_UNSPECIFIED" - The database provider is unknown.
   596  	//   "CLOUDSQL" - CloudSQL runs the database.
   597  	//   "RDS" - RDS runs the database.
   598  	Provider string `json:"provider,omitempty"`
   599  	// ForceSendFields is a list of field names (e.g. "Engine") to unconditionally
   600  	// include in API requests. By default, fields with empty or default values are
   601  	// omitted from API requests. See
   602  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   603  	// details.
   604  	ForceSendFields []string `json:"-"`
   605  	// NullFields is a list of field names (e.g. "Engine") to include in API
   606  	// requests with the JSON null value. By default, fields with empty values are
   607  	// omitted from API requests. See
   608  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   609  	NullFields []string `json:"-"`
   610  }
   611  
   612  func (s *DatabaseType) MarshalJSON() ([]byte, error) {
   613  	type NoMethod DatabaseType
   614  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   615  }
   616  
   617  // Empty: A generic empty message that you can re-use to avoid defining
   618  // duplicated empty messages in your APIs. A typical example is to use it as
   619  // the request or the response type of an API method. For instance: service Foo
   620  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   621  type Empty struct {
   622  	// ServerResponse contains the HTTP response code and headers from the server.
   623  	googleapi.ServerResponse `json:"-"`
   624  }
   625  
   626  // Expr: Represents a textual expression in the Common Expression Language
   627  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   628  // of CEL are documented at https://github.com/google/cel-spec. Example
   629  // (Comparison): title: "Summary size limit" description: "Determines if a
   630  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   631  // Example (Equality): title: "Requestor is owner" description: "Determines if
   632  // requestor is the document owner" expression: "document.owner ==
   633  // request.auth.claims.email" Example (Logic): title: "Public documents"
   634  // description: "Determine whether the document should be publicly visible"
   635  // expression: "document.type != 'private' && document.type != 'internal'"
   636  // Example (Data Manipulation): title: "Notification string" description:
   637  // "Create a notification string with a timestamp." expression: "'New message
   638  // received at ' + string(document.create_time)" The exact variables and
   639  // functions that may be referenced within an expression are determined by the
   640  // service that evaluates it. See the service documentation for additional
   641  // information.
   642  type Expr struct {
   643  	// Description: Optional. Description of the expression. This is a longer text
   644  	// which describes the expression, e.g. when hovered over it in a UI.
   645  	Description string `json:"description,omitempty"`
   646  	// Expression: Textual representation of an expression in Common Expression
   647  	// Language syntax.
   648  	Expression string `json:"expression,omitempty"`
   649  	// Location: Optional. String indicating the location of the expression for
   650  	// error reporting, e.g. a file name and a position in the file.
   651  	Location string `json:"location,omitempty"`
   652  	// Title: Optional. Title for the expression, i.e. a short string describing
   653  	// its purpose. This can be used e.g. in UIs which allow to enter the
   654  	// expression.
   655  	Title string `json:"title,omitempty"`
   656  	// ForceSendFields is a list of field names (e.g. "Description") to
   657  	// unconditionally include in API requests. By default, fields with empty or
   658  	// default values are omitted from API requests. See
   659  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   660  	// details.
   661  	ForceSendFields []string `json:"-"`
   662  	// NullFields is a list of field names (e.g. "Description") to include in API
   663  	// requests with the JSON null value. By default, fields with empty values are
   664  	// omitted from API requests. See
   665  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   666  	NullFields []string `json:"-"`
   667  }
   668  
   669  func (s *Expr) MarshalJSON() ([]byte, error) {
   670  	type NoMethod Expr
   671  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   672  }
   673  
   674  // GenerateSshScriptRequest: Request message for 'GenerateSshScript' request.
   675  type GenerateSshScriptRequest struct {
   676  	// Vm: Required. Bastion VM Instance name to use or to create.
   677  	Vm string `json:"vm,omitempty"`
   678  	// VmCreationConfig: The VM creation configuration
   679  	VmCreationConfig *VmCreationConfig `json:"vmCreationConfig,omitempty"`
   680  	// VmPort: The port that will be open on the bastion host
   681  	VmPort int64 `json:"vmPort,omitempty"`
   682  	// VmSelectionConfig: The VM selection configuration
   683  	VmSelectionConfig *VmSelectionConfig `json:"vmSelectionConfig,omitempty"`
   684  	// ForceSendFields is a list of field names (e.g. "Vm") to unconditionally
   685  	// include in API requests. By default, fields with empty or default values are
   686  	// omitted from API requests. See
   687  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   688  	// details.
   689  	ForceSendFields []string `json:"-"`
   690  	// NullFields is a list of field names (e.g. "Vm") to include in API requests
   691  	// with the JSON null value. By default, fields with empty values are omitted
   692  	// from API requests. See
   693  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   694  	NullFields []string `json:"-"`
   695  }
   696  
   697  func (s *GenerateSshScriptRequest) MarshalJSON() ([]byte, error) {
   698  	type NoMethod GenerateSshScriptRequest
   699  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   700  }
   701  
   702  // GoogleCloudClouddmsV1beta1OperationMetadata: Represents the metadata of the
   703  // long-running operation.
   704  type GoogleCloudClouddmsV1beta1OperationMetadata struct {
   705  	// ApiVersion: Output only. API version used to start the operation.
   706  	ApiVersion string `json:"apiVersion,omitempty"`
   707  	// CreateTime: Output only. The time the operation was created.
   708  	CreateTime string `json:"createTime,omitempty"`
   709  	// EndTime: Output only. The time the operation finished running.
   710  	EndTime string `json:"endTime,omitempty"`
   711  	// RequestedCancellation: Output only. Identifies whether the user has
   712  	// requested cancellation of the operation. Operations that have successfully
   713  	// been cancelled have Operation.error value with a google.rpc.Status.code of
   714  	// 1, corresponding to `Code.CANCELLED`.
   715  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
   716  	// StatusMessage: Output only. Human-readable status of the operation, if any.
   717  	StatusMessage string `json:"statusMessage,omitempty"`
   718  	// Target: Output only. Server-defined resource path for the target of the
   719  	// operation.
   720  	Target string `json:"target,omitempty"`
   721  	// Verb: Output only. Name of the verb executed by the operation.
   722  	Verb string `json:"verb,omitempty"`
   723  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
   724  	// unconditionally include in API requests. By default, fields with empty or
   725  	// default values are omitted from API requests. See
   726  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   727  	// details.
   728  	ForceSendFields []string `json:"-"`
   729  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
   730  	// requests with the JSON null value. By default, fields with empty values are
   731  	// omitted from API requests. See
   732  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   733  	NullFields []string `json:"-"`
   734  }
   735  
   736  func (s *GoogleCloudClouddmsV1beta1OperationMetadata) MarshalJSON() ([]byte, error) {
   737  	type NoMethod GoogleCloudClouddmsV1beta1OperationMetadata
   738  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   739  }
   740  
   741  // ListConnectionProfilesResponse: Response message for
   742  // 'ListConnectionProfiles' request.
   743  type ListConnectionProfilesResponse struct {
   744  	// ConnectionProfiles: The response list of connection profiles.
   745  	ConnectionProfiles []*ConnectionProfile `json:"connectionProfiles,omitempty"`
   746  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
   747  	// next page. If this field is omitted, there are no subsequent pages.
   748  	NextPageToken string `json:"nextPageToken,omitempty"`
   749  	// Unreachable: Locations that could not be reached.
   750  	Unreachable []string `json:"unreachable,omitempty"`
   751  
   752  	// ServerResponse contains the HTTP response code and headers from the server.
   753  	googleapi.ServerResponse `json:"-"`
   754  	// ForceSendFields is a list of field names (e.g. "ConnectionProfiles") to
   755  	// unconditionally include in API requests. By default, fields with empty or
   756  	// default values are omitted from API requests. See
   757  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   758  	// details.
   759  	ForceSendFields []string `json:"-"`
   760  	// NullFields is a list of field names (e.g. "ConnectionProfiles") to include
   761  	// in API requests with the JSON null value. By default, fields with empty
   762  	// values are omitted from API requests. See
   763  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   764  	NullFields []string `json:"-"`
   765  }
   766  
   767  func (s *ListConnectionProfilesResponse) MarshalJSON() ([]byte, error) {
   768  	type NoMethod ListConnectionProfilesResponse
   769  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   770  }
   771  
   772  // ListLocationsResponse: The response message for Locations.ListLocations.
   773  type ListLocationsResponse struct {
   774  	// Locations: A list of locations that matches the specified filter in the
   775  	// request.
   776  	Locations []*Location `json:"locations,omitempty"`
   777  	// NextPageToken: The standard List next-page token.
   778  	NextPageToken string `json:"nextPageToken,omitempty"`
   779  
   780  	// ServerResponse contains the HTTP response code and headers from the server.
   781  	googleapi.ServerResponse `json:"-"`
   782  	// ForceSendFields is a list of field names (e.g. "Locations") to
   783  	// unconditionally include in API requests. By default, fields with empty or
   784  	// default values are omitted from API requests. See
   785  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   786  	// details.
   787  	ForceSendFields []string `json:"-"`
   788  	// NullFields is a list of field names (e.g. "Locations") to include in API
   789  	// requests with the JSON null value. By default, fields with empty values are
   790  	// omitted from API requests. See
   791  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   792  	NullFields []string `json:"-"`
   793  }
   794  
   795  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
   796  	type NoMethod ListLocationsResponse
   797  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   798  }
   799  
   800  // ListMigrationJobsResponse: Response message for 'ListMigrationJobs' request.
   801  type ListMigrationJobsResponse struct {
   802  	// MigrationJobs: The list of migration jobs objects.
   803  	MigrationJobs []*MigrationJob `json:"migrationJobs,omitempty"`
   804  	// NextPageToken: A token, which can be sent as `page_token` to retrieve the
   805  	// next page. If this field is omitted, there are no subsequent pages.
   806  	NextPageToken string `json:"nextPageToken,omitempty"`
   807  	// Unreachable: Locations that could not be reached.
   808  	Unreachable []string `json:"unreachable,omitempty"`
   809  
   810  	// ServerResponse contains the HTTP response code and headers from the server.
   811  	googleapi.ServerResponse `json:"-"`
   812  	// ForceSendFields is a list of field names (e.g. "MigrationJobs") to
   813  	// unconditionally include in API requests. By default, fields with empty or
   814  	// default values are omitted from API requests. See
   815  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   816  	// details.
   817  	ForceSendFields []string `json:"-"`
   818  	// NullFields is a list of field names (e.g. "MigrationJobs") to include in API
   819  	// requests with the JSON null value. By default, fields with empty values are
   820  	// omitted from API requests. See
   821  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   822  	NullFields []string `json:"-"`
   823  }
   824  
   825  func (s *ListMigrationJobsResponse) MarshalJSON() ([]byte, error) {
   826  	type NoMethod ListMigrationJobsResponse
   827  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   828  }
   829  
   830  // ListOperationsResponse: The response message for Operations.ListOperations.
   831  type ListOperationsResponse struct {
   832  	// NextPageToken: The standard List next-page token.
   833  	NextPageToken string `json:"nextPageToken,omitempty"`
   834  	// Operations: A list of operations that matches the specified filter in the
   835  	// request.
   836  	Operations []*Operation `json:"operations,omitempty"`
   837  
   838  	// ServerResponse contains the HTTP response code and headers from the server.
   839  	googleapi.ServerResponse `json:"-"`
   840  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   841  	// unconditionally include in API requests. By default, fields with empty or
   842  	// default values are omitted from API requests. See
   843  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   844  	// details.
   845  	ForceSendFields []string `json:"-"`
   846  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   847  	// requests with the JSON null value. By default, fields with empty values are
   848  	// omitted from API requests. See
   849  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   850  	NullFields []string `json:"-"`
   851  }
   852  
   853  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
   854  	type NoMethod ListOperationsResponse
   855  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   856  }
   857  
   858  // Location: A resource that represents a Google Cloud location.
   859  type Location struct {
   860  	// DisplayName: The friendly name for this location, typically a nearby city
   861  	// name. For example, "Tokyo".
   862  	DisplayName string `json:"displayName,omitempty"`
   863  	// Labels: Cross-service attributes for the location. For example
   864  	// {"cloud.googleapis.com/region": "us-east1"}
   865  	Labels map[string]string `json:"labels,omitempty"`
   866  	// LocationId: The canonical id for this location. For example: "us-east1".
   867  	LocationId string `json:"locationId,omitempty"`
   868  	// Metadata: Service-specific metadata. For example the available capacity at
   869  	// the given location.
   870  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   871  	// Name: Resource name for the location, which may vary between
   872  	// implementations. For example:
   873  	// "projects/example-project/locations/us-east1"
   874  	Name string `json:"name,omitempty"`
   875  
   876  	// ServerResponse contains the HTTP response code and headers from the server.
   877  	googleapi.ServerResponse `json:"-"`
   878  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   879  	// unconditionally include in API requests. By default, fields with empty or
   880  	// default values are omitted from API requests. See
   881  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   882  	// details.
   883  	ForceSendFields []string `json:"-"`
   884  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   885  	// requests with the JSON null value. By default, fields with empty values are
   886  	// omitted from API requests. See
   887  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   888  	NullFields []string `json:"-"`
   889  }
   890  
   891  func (s *Location) MarshalJSON() ([]byte, error) {
   892  	type NoMethod Location
   893  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   894  }
   895  
   896  // MigrationJob: Represents a Database Migration Service migration job object.
   897  type MigrationJob struct {
   898  	// CreateTime: Output only. The timestamp when the migration job resource was
   899  	// created. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds.
   900  	// Example: "2014-10-02T15:01:23.045123456Z".
   901  	CreateTime string `json:"createTime,omitempty"`
   902  	// Destination: Required. The resource name (URI) of the destination connection
   903  	// profile.
   904  	Destination string `json:"destination,omitempty"`
   905  	// DestinationDatabase: The database engine type and provider of the
   906  	// destination.
   907  	DestinationDatabase *DatabaseType `json:"destinationDatabase,omitempty"`
   908  	// DisplayName: The migration job display name.
   909  	DisplayName string `json:"displayName,omitempty"`
   910  	// DumpPath: The path to the dump file in Google Cloud Storage, in the format:
   911  	// (gs://[BUCKET_NAME]/[OBJECT_NAME]).
   912  	DumpPath string `json:"dumpPath,omitempty"`
   913  	// Duration: Output only. The duration of the migration job (in seconds). A
   914  	// duration in seconds with up to nine fractional digits, terminated by 's'.
   915  	// Example: "3.5s".
   916  	Duration string `json:"duration,omitempty"`
   917  	// EndTime: Output only. If the migration job is completed, the time when it
   918  	// was completed.
   919  	EndTime string `json:"endTime,omitempty"`
   920  	// Error: Output only. The error details in case of state FAILED.
   921  	Error *Status `json:"error,omitempty"`
   922  	// Labels: The resource labels for migration job to use to annotate any related
   923  	// underlying resources such as Compute Engine VMs. An object containing a list
   924  	// of "key": "value" pairs. Example: `{ "name": "wrench", "mass": "1.3kg",
   925  	// "count": "3" }`.
   926  	Labels map[string]string `json:"labels,omitempty"`
   927  	// Name: The name (URI) of this migration job resource, in the form of:
   928  	// projects/{project}/locations/{location}/migrationJobs/{migrationJob}.
   929  	Name string `json:"name,omitempty"`
   930  	// Phase: Output only. The current migration job phase.
   931  	//
   932  	// Possible values:
   933  	//   "PHASE_UNSPECIFIED" - The phase of the migration job is unknown.
   934  	//   "FULL_DUMP" - The migration job is in the full dump phase.
   935  	//   "CDC" - The migration job is CDC phase.
   936  	//   "PROMOTE_IN_PROGRESS" - The migration job is running the promote phase.
   937  	//   "WAITING_FOR_SOURCE_WRITES_TO_STOP" - Only RDS flow - waiting for source
   938  	// writes to stop
   939  	//   "PREPARING_THE_DUMP" - Only RDS flow - the sources writes stopped, waiting
   940  	// for dump to begin
   941  	Phase string `json:"phase,omitempty"`
   942  	// ReverseSshConnectivity: The details needed to communicate to the source over
   943  	// Reverse SSH tunnel connectivity.
   944  	ReverseSshConnectivity *ReverseSshConnectivity `json:"reverseSshConnectivity,omitempty"`
   945  	// Source: Required. The resource name (URI) of the source connection profile.
   946  	Source string `json:"source,omitempty"`
   947  	// SourceDatabase: The database engine type and provider of the source.
   948  	SourceDatabase *DatabaseType `json:"sourceDatabase,omitempty"`
   949  	// State: The current migration job state.
   950  	//
   951  	// Possible values:
   952  	//   "STATE_UNSPECIFIED" - The state of the migration job is unknown.
   953  	//   "MAINTENANCE" - The migration job is down for maintenance.
   954  	//   "DRAFT" - The migration job is in draft mode and no resources are created.
   955  	//   "CREATING" - The migration job is being created.
   956  	//   "NOT_STARTED" - The migration job is created and not started.
   957  	//   "RUNNING" - The migration job is running.
   958  	//   "FAILED" - The migration job failed.
   959  	//   "COMPLETED" - The migration job has been completed.
   960  	//   "DELETING" - The migration job is being deleted.
   961  	//   "STOPPING" - The migration job is being stopped.
   962  	//   "STOPPED" - The migration job is currently stopped.
   963  	//   "DELETED" - The migration job has been deleted.
   964  	//   "UPDATING" - The migration job is being updated.
   965  	//   "STARTING" - The migration job is starting.
   966  	//   "RESTARTING" - The migration job is restarting.
   967  	//   "RESUMING" - The migration job is resuming.
   968  	State string `json:"state,omitempty"`
   969  	// StaticIpConnectivity: static ip connectivity data (default, no additional
   970  	// details needed).
   971  	StaticIpConnectivity *StaticIpConnectivity `json:"staticIpConnectivity,omitempty"`
   972  	// Type: Required. The migration job type.
   973  	//
   974  	// Possible values:
   975  	//   "TYPE_UNSPECIFIED" - The type of the migration job is unknown.
   976  	//   "ONE_TIME" - The migration job is a one time migration.
   977  	//   "CONTINUOUS" - The migration job is a continuous migration.
   978  	Type string `json:"type,omitempty"`
   979  	// UpdateTime: Output only. The timestamp when the migration job resource was
   980  	// last updated. A timestamp in RFC3339 UTC "Zulu" format, accurate to
   981  	// nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".
   982  	UpdateTime string `json:"updateTime,omitempty"`
   983  	// VpcPeeringConnectivity: The details of the VPC network that the source
   984  	// database is located in.
   985  	VpcPeeringConnectivity *VpcPeeringConnectivity `json:"vpcPeeringConnectivity,omitempty"`
   986  
   987  	// ServerResponse contains the HTTP response code and headers from the server.
   988  	googleapi.ServerResponse `json:"-"`
   989  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   990  	// unconditionally include in API requests. By default, fields with empty or
   991  	// default values are omitted from API requests. See
   992  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   993  	// details.
   994  	ForceSendFields []string `json:"-"`
   995  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   996  	// requests with the JSON null value. By default, fields with empty values are
   997  	// omitted from API requests. See
   998  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   999  	NullFields []string `json:"-"`
  1000  }
  1001  
  1002  func (s *MigrationJob) MarshalJSON() ([]byte, error) {
  1003  	type NoMethod MigrationJob
  1004  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1005  }
  1006  
  1007  // MigrationJobVerificationError: Error message of a verification Migration
  1008  // job.
  1009  type MigrationJobVerificationError struct {
  1010  	// ErrorCode: Output only. An instance of ErrorCode specifying the error that
  1011  	// occurred.
  1012  	//
  1013  	// Possible values:
  1014  	//   "ERROR_CODE_UNSPECIFIED" - An unknown error occurred
  1015  	//   "CONNECTION_FAILURE" - We failed to connect to one of the connection
  1016  	// profile.
  1017  	//   "AUTHENTICATION_FAILURE" - We failed to authenticate to one of the
  1018  	// connection profile.
  1019  	//   "INVALID_CONNECTION_PROFILE_CONFIG" - One of the involved connection
  1020  	// profiles has an invalid configuration.
  1021  	//   "VERSION_INCOMPATIBILITY" - The versions of the source and the destination
  1022  	// are incompatible.
  1023  	//   "CONNECTION_PROFILE_TYPES_INCOMPATIBILITY" - The types of the source and
  1024  	// the destination are incompatible.
  1025  	//   "UNSUPPORTED_GTID_MODE" - The gtid_mode is not supported, applicable for
  1026  	// MySQL.
  1027  	//   "UNSUPPORTED_DEFINER" - The definer is not supported.
  1028  	//   "CANT_RESTART_RUNNING_MIGRATION" - Migration is already running at the
  1029  	// time of restart request.
  1030  	//   "TABLES_WITH_LIMITED_SUPPORT" - The source has tables with limited
  1031  	// support. E.g. PostgreSQL tables without primary keys.
  1032  	//   "UNSUPPORTED_DATABASE_LOCALE" - The source uses an unsupported locale.
  1033  	//   "UNSUPPORTED_DATABASE_FDW_CONFIG" - The source uses an unsupported Foreign
  1034  	// Data Wrapper configuration.
  1035  	//   "ERROR_RDBMS" - There was an underlying RDBMS error.
  1036  	//   "SOURCE_SIZE_EXCEEDS_THRESHOLD" - The source DB size in Bytes exceeds a
  1037  	// certain threshold. The migration might require an increase of quota, or
  1038  	// might not be supported.
  1039  	//   "EXISTING_CONFLICTING_DATABASES" - The destination DB contains existing
  1040  	// databases that are conflicting with those in the source DB.
  1041  	//   "PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE" - Insufficient privilege to
  1042  	// enable the parallelism configuration.
  1043  	//   "EXISTING_DATA" - The destination instance contains existing data or user
  1044  	// defined entities (for example databases, tables, or functions). You can only
  1045  	// migrate to empty instances. Clear your destination instance and retry the
  1046  	// migration job.
  1047  	//   "SOURCE_MAX_SUBSCRIPTIONS" - The migration job is configured to use max
  1048  	// number of subscriptions to migrate data from the source to the destination.
  1049  	ErrorCode string `json:"errorCode,omitempty"`
  1050  	// ErrorDetailMessage: Output only. A specific detailed error message, if
  1051  	// supplied by the engine.
  1052  	ErrorDetailMessage string `json:"errorDetailMessage,omitempty"`
  1053  	// ErrorMessage: Output only. A formatted message with further details about
  1054  	// the error and a CTA.
  1055  	ErrorMessage string `json:"errorMessage,omitempty"`
  1056  	// ForceSendFields is a list of field names (e.g. "ErrorCode") to
  1057  	// unconditionally include in API requests. By default, fields with empty or
  1058  	// default values are omitted from API requests. See
  1059  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1060  	// details.
  1061  	ForceSendFields []string `json:"-"`
  1062  	// NullFields is a list of field names (e.g. "ErrorCode") to include in API
  1063  	// requests with the JSON null value. By default, fields with empty values are
  1064  	// omitted from API requests. See
  1065  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1066  	NullFields []string `json:"-"`
  1067  }
  1068  
  1069  func (s *MigrationJobVerificationError) MarshalJSON() ([]byte, error) {
  1070  	type NoMethod MigrationJobVerificationError
  1071  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1072  }
  1073  
  1074  // MySqlConnectionProfile: Specifies connection parameters required
  1075  // specifically for MySQL databases.
  1076  type MySqlConnectionProfile struct {
  1077  	// CloudSqlId: If the source is a Cloud SQL database, use this field to provide
  1078  	// the Cloud SQL instance ID of the source.
  1079  	CloudSqlId string `json:"cloudSqlId,omitempty"`
  1080  	// Host: Required. The IP or hostname of the source MySQL database.
  1081  	Host string `json:"host,omitempty"`
  1082  	// Password: Required. Input only. The password for the user that Database
  1083  	// Migration Service will be using to connect to the database. This field is
  1084  	// not returned on request, and the value is encrypted when stored in Database
  1085  	// Migration Service.
  1086  	Password string `json:"password,omitempty"`
  1087  	// PasswordSet: Output only. Indicates If this connection profile password is
  1088  	// stored.
  1089  	PasswordSet bool `json:"passwordSet,omitempty"`
  1090  	// Port: Required. The network port of the source MySQL database.
  1091  	Port int64 `json:"port,omitempty"`
  1092  	// Ssl: SSL configuration for the destination to connect to the source
  1093  	// database.
  1094  	Ssl *SslConfig `json:"ssl,omitempty"`
  1095  	// Username: Required. The username that Database Migration Service will use to
  1096  	// connect to the database. The value is encrypted when stored in Database
  1097  	// Migration Service.
  1098  	Username string `json:"username,omitempty"`
  1099  	// ForceSendFields is a list of field names (e.g. "CloudSqlId") to
  1100  	// unconditionally include in API requests. By default, fields with empty or
  1101  	// default values are omitted from API requests. See
  1102  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1103  	// details.
  1104  	ForceSendFields []string `json:"-"`
  1105  	// NullFields is a list of field names (e.g. "CloudSqlId") to include in API
  1106  	// requests with the JSON null value. By default, fields with empty values are
  1107  	// omitted from API requests. See
  1108  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1109  	NullFields []string `json:"-"`
  1110  }
  1111  
  1112  func (s *MySqlConnectionProfile) MarshalJSON() ([]byte, error) {
  1113  	type NoMethod MySqlConnectionProfile
  1114  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1115  }
  1116  
  1117  // Operation: This resource represents a long-running operation that is the
  1118  // result of a network API call.
  1119  type Operation struct {
  1120  	// Done: If the value is `false`, it means the operation is still in progress.
  1121  	// If `true`, the operation is completed, and either `error` or `response` is
  1122  	// available.
  1123  	Done bool `json:"done,omitempty"`
  1124  	// Error: The error result of the operation in case of failure or cancellation.
  1125  	Error *Status `json:"error,omitempty"`
  1126  	// Metadata: Service-specific metadata associated with the operation. It
  1127  	// typically contains progress information and common metadata such as create
  1128  	// time. Some services might not provide such metadata. Any method that returns
  1129  	// a long-running operation should document the metadata type, if any.
  1130  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1131  	// Name: The server-assigned name, which is only unique within the same service
  1132  	// that originally returns it. If you use the default HTTP mapping, the `name`
  1133  	// should be a resource name ending with `operations/{unique_id}`.
  1134  	Name string `json:"name,omitempty"`
  1135  	// Response: The normal, successful response of the operation. If the original
  1136  	// method returns no data on success, such as `Delete`, the response is
  1137  	// `google.protobuf.Empty`. If the original method is standard
  1138  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  1139  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  1140  	// original method name. For example, if the original method name is
  1141  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  1142  	Response googleapi.RawMessage `json:"response,omitempty"`
  1143  
  1144  	// ServerResponse contains the HTTP response code and headers from the server.
  1145  	googleapi.ServerResponse `json:"-"`
  1146  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1147  	// include in API requests. By default, fields with empty or default values are
  1148  	// omitted from API requests. See
  1149  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1150  	// details.
  1151  	ForceSendFields []string `json:"-"`
  1152  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1153  	// with the JSON null value. By default, fields with empty values are omitted
  1154  	// from API requests. See
  1155  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1156  	NullFields []string `json:"-"`
  1157  }
  1158  
  1159  func (s *Operation) MarshalJSON() ([]byte, error) {
  1160  	type NoMethod Operation
  1161  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1162  }
  1163  
  1164  // Policy: An Identity and Access Management (IAM) policy, which specifies
  1165  // access controls for Google Cloud resources. A `Policy` is a collection of
  1166  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  1167  // single `role`. Principals can be user accounts, service accounts, Google
  1168  // groups, and domains (such as G Suite). A `role` is a named list of
  1169  // permissions; each `role` can be an IAM predefined role or a user-created
  1170  // custom role. For some types of Google Cloud resources, a `binding` can also
  1171  // specify a `condition`, which is a logical expression that allows access to a
  1172  // resource only if the expression evaluates to `true`. A condition can add
  1173  // constraints based on attributes of the request, the resource, or both. To
  1174  // learn which resources support conditions in their IAM policies, see the IAM
  1175  // documentation
  1176  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  1177  // example:** ``` { "bindings": [ { "role":
  1178  // "roles/resourcemanager.organizationAdmin", "members": [
  1179  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1180  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1181  // "roles/resourcemanager.organizationViewer", "members": [
  1182  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1183  // "description": "Does not grant access after Sep 2020", "expression":
  1184  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1185  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  1186  // members: - user:mike@example.com - group:admins@example.com -
  1187  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  1188  // role: roles/resourcemanager.organizationAdmin - members: -
  1189  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  1190  // condition: title: expirable access description: Does not grant access after
  1191  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  1192  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  1193  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  1194  type Policy struct {
  1195  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  1196  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1197  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  1198  	// Optionally, may specify a `condition` that determines how and when the
  1199  	// `bindings` are applied. Each of the `bindings` must contain at least one
  1200  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  1201  	// up to 250 of these principals can be Google groups. Each occurrence of a
  1202  	// principal counts towards these limits. For example, if the `bindings` grant
  1203  	// 50 different roles to `user:alice@example.com`, and not to any other
  1204  	// principal, then you can add another 1,450 principals to the `bindings` in
  1205  	// the `Policy`.
  1206  	Bindings []*Binding `json:"bindings,omitempty"`
  1207  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  1208  	// prevent simultaneous updates of a policy from overwriting each other. It is
  1209  	// strongly suggested that systems make use of the `etag` in the
  1210  	// read-modify-write cycle to perform policy updates in order to avoid race
  1211  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  1212  	// systems are expected to put that etag in the request to `setIamPolicy` to
  1213  	// ensure that their change will be applied to the same version of the policy.
  1214  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1215  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1216  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1217  	// the conditions in the version `3` policy are lost.
  1218  	Etag string `json:"etag,omitempty"`
  1219  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  1220  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  1221  	// affects conditional role bindings must specify version `3`. This requirement
  1222  	// applies to the following operations: * Getting a policy that includes a
  1223  	// conditional role binding * Adding a conditional role binding to a policy *
  1224  	// Changing a conditional role binding in a policy * Removing any role binding,
  1225  	// with or without a condition, from a policy that includes conditions
  1226  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1227  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1228  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1229  	// the conditions in the version `3` policy are lost. If a policy does not
  1230  	// include any conditions, operations on that policy may specify any valid
  1231  	// version or leave the field unset. To learn which resources support
  1232  	// conditions in their IAM policies, see the IAM documentation
  1233  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1234  	Version int64 `json:"version,omitempty"`
  1235  
  1236  	// ServerResponse contains the HTTP response code and headers from the server.
  1237  	googleapi.ServerResponse `json:"-"`
  1238  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1239  	// unconditionally include in API requests. By default, fields with empty or
  1240  	// default values are omitted from API requests. See
  1241  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1242  	// details.
  1243  	ForceSendFields []string `json:"-"`
  1244  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  1245  	// requests with the JSON null value. By default, fields with empty values are
  1246  	// omitted from API requests. See
  1247  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1248  	NullFields []string `json:"-"`
  1249  }
  1250  
  1251  func (s *Policy) MarshalJSON() ([]byte, error) {
  1252  	type NoMethod Policy
  1253  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1254  }
  1255  
  1256  // PromoteMigrationJobRequest: Request message for 'PromoteMigrationJob'
  1257  // request.
  1258  type PromoteMigrationJobRequest struct {
  1259  }
  1260  
  1261  // RestartMigrationJobRequest: Request message for 'RestartMigrationJob'
  1262  // request.
  1263  type RestartMigrationJobRequest struct {
  1264  }
  1265  
  1266  // ResumeMigrationJobRequest: Request message for 'ResumeMigrationJob' request.
  1267  type ResumeMigrationJobRequest struct {
  1268  }
  1269  
  1270  // ReverseSshConnectivity: The details needed to configure a reverse SSH tunnel
  1271  // between the source and destination databases. These details will be used
  1272  // when calling the generateSshScript method (see
  1273  // https://cloud.google.com/database-migration/docs/reference/rest/v1beta1/projects.locations.migrationJobs/generateSshScript)
  1274  // to produce the script that will help set up the reverse SSH tunnel, and to
  1275  // set up the VPC peering between the Cloud SQL private network and the VPC.
  1276  type ReverseSshConnectivity struct {
  1277  	// Vm: The name of the virtual machine (Compute Engine) used as the bastion
  1278  	// server for the SSH tunnel.
  1279  	Vm string `json:"vm,omitempty"`
  1280  	// VmIp: Required. The IP of the virtual machine (Compute Engine) used as the
  1281  	// bastion server for the SSH tunnel.
  1282  	VmIp string `json:"vmIp,omitempty"`
  1283  	// VmPort: Required. The forwarding port of the virtual machine (Compute
  1284  	// Engine) used as the bastion server for the SSH tunnel.
  1285  	VmPort int64 `json:"vmPort,omitempty"`
  1286  	// Vpc: The name of the VPC to peer with the Cloud SQL private network.
  1287  	Vpc string `json:"vpc,omitempty"`
  1288  	// ForceSendFields is a list of field names (e.g. "Vm") to unconditionally
  1289  	// include in API requests. By default, fields with empty or default values are
  1290  	// omitted from API requests. See
  1291  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1292  	// details.
  1293  	ForceSendFields []string `json:"-"`
  1294  	// NullFields is a list of field names (e.g. "Vm") to include in API requests
  1295  	// with the JSON null value. By default, fields with empty values are omitted
  1296  	// from API requests. See
  1297  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1298  	NullFields []string `json:"-"`
  1299  }
  1300  
  1301  func (s *ReverseSshConnectivity) MarshalJSON() ([]byte, error) {
  1302  	type NoMethod ReverseSshConnectivity
  1303  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1304  }
  1305  
  1306  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1307  type SetIamPolicyRequest struct {
  1308  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  1309  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  1310  	// policy but certain Google Cloud services (such as Projects) might reject
  1311  	// them.
  1312  	Policy *Policy `json:"policy,omitempty"`
  1313  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  1314  	// modify. Only the fields in the mask will be modified. If no mask is
  1315  	// provided, the following default mask is used: `paths: "bindings, etag"
  1316  	UpdateMask string `json:"updateMask,omitempty"`
  1317  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1318  	// include in API requests. By default, fields with empty or default values are
  1319  	// omitted from API requests. See
  1320  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1321  	// details.
  1322  	ForceSendFields []string `json:"-"`
  1323  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1324  	// requests with the JSON null value. By default, fields with empty values are
  1325  	// omitted from API requests. See
  1326  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1327  	NullFields []string `json:"-"`
  1328  }
  1329  
  1330  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1331  	type NoMethod SetIamPolicyRequest
  1332  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1333  }
  1334  
  1335  // SqlAclEntry: An entry for an Access Control list.
  1336  type SqlAclEntry struct {
  1337  	// ExpireTime: The time when this access control entry expires in RFC 3339
  1338  	// (https://tools.ietf.org/html/rfc3339) format, for example:
  1339  	// `2012-11-15T16:19:00.094Z`.
  1340  	ExpireTime string `json:"expireTime,omitempty"`
  1341  	// Label: A label to identify this entry.
  1342  	Label string `json:"label,omitempty"`
  1343  	// Ttl: Input only. The time-to-leave of this access control entry.
  1344  	Ttl string `json:"ttl,omitempty"`
  1345  	// Value: The allowlisted value for the access control list.
  1346  	Value string `json:"value,omitempty"`
  1347  	// ForceSendFields is a list of field names (e.g. "ExpireTime") 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. "ExpireTime") 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 *SqlAclEntry) MarshalJSON() ([]byte, error) {
  1361  	type NoMethod SqlAclEntry
  1362  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1363  }
  1364  
  1365  // SqlIpConfig: IP Management configuration.
  1366  type SqlIpConfig struct {
  1367  	// AuthorizedNetworks: The list of external networks that are allowed to
  1368  	// connect to the instance using the IP. See
  1369  	// https://en.wikipedia.org/wiki/CIDR_notation#CIDR_notation, also known as
  1370  	// 'slash' notation (e.g. `192.168.100.0/24`).
  1371  	AuthorizedNetworks []*SqlAclEntry `json:"authorizedNetworks,omitempty"`
  1372  	// EnableIpv4: Whether the instance is assigned a public IP address or not.
  1373  	EnableIpv4 bool `json:"enableIpv4,omitempty"`
  1374  	// PrivateNetwork: The resource link for the VPC network from which the Cloud
  1375  	// SQL instance is accessible for private IP. For example,
  1376  	// `/projects/myProject/global/networks/default`. This setting can be updated,
  1377  	// but it cannot be removed after it is set.
  1378  	PrivateNetwork string `json:"privateNetwork,omitempty"`
  1379  	// RequireSsl: Whether SSL connections over IP should be enforced or not.
  1380  	RequireSsl bool `json:"requireSsl,omitempty"`
  1381  	// ForceSendFields is a list of field names (e.g. "AuthorizedNetworks") to
  1382  	// unconditionally include in API requests. By default, fields with empty or
  1383  	// default values are omitted from API requests. See
  1384  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1385  	// details.
  1386  	ForceSendFields []string `json:"-"`
  1387  	// NullFields is a list of field names (e.g. "AuthorizedNetworks") to include
  1388  	// in API requests with the JSON null value. By default, fields with empty
  1389  	// values are omitted from API requests. See
  1390  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1391  	NullFields []string `json:"-"`
  1392  }
  1393  
  1394  func (s *SqlIpConfig) MarshalJSON() ([]byte, error) {
  1395  	type NoMethod SqlIpConfig
  1396  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1397  }
  1398  
  1399  // SshScript: Response message for 'GenerateSshScript' request.
  1400  type SshScript struct {
  1401  	// Script: The ssh configuration script.
  1402  	Script string `json:"script,omitempty"`
  1403  
  1404  	// ServerResponse contains the HTTP response code and headers from the server.
  1405  	googleapi.ServerResponse `json:"-"`
  1406  	// ForceSendFields is a list of field names (e.g. "Script") to unconditionally
  1407  	// include in API requests. By default, fields with empty or default values are
  1408  	// omitted from API requests. See
  1409  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1410  	// details.
  1411  	ForceSendFields []string `json:"-"`
  1412  	// NullFields is a list of field names (e.g. "Script") to include in API
  1413  	// requests with the JSON null value. By default, fields with empty values are
  1414  	// omitted from API requests. See
  1415  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1416  	NullFields []string `json:"-"`
  1417  }
  1418  
  1419  func (s *SshScript) MarshalJSON() ([]byte, error) {
  1420  	type NoMethod SshScript
  1421  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1422  }
  1423  
  1424  // SslConfig: SSL configuration information.
  1425  type SslConfig struct {
  1426  	// CaCertificate: Required. Input only. The x509 PEM-encoded certificate of the
  1427  	// CA that signed the source database server's certificate. The replica will
  1428  	// use this certificate to verify it's connecting to the right host.
  1429  	CaCertificate string `json:"caCertificate,omitempty"`
  1430  	// ClientCertificate: Input only. The x509 PEM-encoded certificate that will be
  1431  	// used by the replica to authenticate against the source database server.If
  1432  	// this field is used then the 'client_key' field is mandatory.
  1433  	ClientCertificate string `json:"clientCertificate,omitempty"`
  1434  	// ClientKey: Input only. The unencrypted PKCS#1 or PKCS#8 PEM-encoded private
  1435  	// key associated with the Client Certificate. If this field is used then the
  1436  	// 'client_certificate' field is mandatory.
  1437  	ClientKey string `json:"clientKey,omitempty"`
  1438  	// Type: Output only. The ssl config type according to 'client_key',
  1439  	// 'client_certificate' and 'ca_certificate'.
  1440  	//
  1441  	// Possible values:
  1442  	//   "SSL_TYPE_UNSPECIFIED" - Unspecified.
  1443  	//   "SERVER_ONLY" - Only 'ca_certificate' specified.
  1444  	//   "SERVER_CLIENT" - Both server ('ca_certificate'), and client
  1445  	// ('client_key', 'client_certificate') specified.
  1446  	Type string `json:"type,omitempty"`
  1447  	// ForceSendFields is a list of field names (e.g. "CaCertificate") to
  1448  	// unconditionally include in API requests. By default, fields with empty or
  1449  	// default values are omitted from API requests. See
  1450  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1451  	// details.
  1452  	ForceSendFields []string `json:"-"`
  1453  	// NullFields is a list of field names (e.g. "CaCertificate") to include in API
  1454  	// requests with the JSON null value. By default, fields with empty values are
  1455  	// omitted from API requests. See
  1456  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1457  	NullFields []string `json:"-"`
  1458  }
  1459  
  1460  func (s *SslConfig) MarshalJSON() ([]byte, error) {
  1461  	type NoMethod SslConfig
  1462  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1463  }
  1464  
  1465  // StartMigrationJobRequest: Request message for 'StartMigrationJob' request.
  1466  type StartMigrationJobRequest struct {
  1467  }
  1468  
  1469  // StaticIpConnectivity: The source database will allow incoming connections
  1470  // from the destination database's public IP. You can retrieve the Cloud SQL
  1471  // instance's public IP from the Cloud SQL console or using Cloud SQL APIs. No
  1472  // additional configuration is required.
  1473  type StaticIpConnectivity struct {
  1474  }
  1475  
  1476  // Status: The `Status` type defines a logical error model that is suitable for
  1477  // different programming environments, including REST APIs and RPC APIs. It is
  1478  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  1479  // pieces of data: error code, error message, and error details. You can find
  1480  // out more about this error model and how to work with it in the API Design
  1481  // Guide (https://cloud.google.com/apis/design/errors).
  1482  type Status struct {
  1483  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1484  	Code int64 `json:"code,omitempty"`
  1485  	// Details: A list of messages that carry the error details. There is a common
  1486  	// set of message types for APIs to use.
  1487  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1488  	// Message: A developer-facing error message, which should be in English. Any
  1489  	// user-facing error message should be localized and sent in the
  1490  	// google.rpc.Status.details field, or localized by the client.
  1491  	Message string `json:"message,omitempty"`
  1492  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1493  	// include in API requests. By default, fields with empty or default values are
  1494  	// omitted from API requests. See
  1495  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1496  	// details.
  1497  	ForceSendFields []string `json:"-"`
  1498  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1499  	// with the JSON null value. By default, fields with empty values are omitted
  1500  	// from API requests. See
  1501  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1502  	NullFields []string `json:"-"`
  1503  }
  1504  
  1505  func (s *Status) MarshalJSON() ([]byte, error) {
  1506  	type NoMethod Status
  1507  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1508  }
  1509  
  1510  // StopMigrationJobRequest: Request message for 'StopMigrationJob' request.
  1511  type StopMigrationJobRequest struct {
  1512  }
  1513  
  1514  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  1515  type TestIamPermissionsRequest struct {
  1516  	// Permissions: The set of permissions to check for the `resource`. Permissions
  1517  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  1518  	// information see IAM Overview
  1519  	// (https://cloud.google.com/iam/docs/overview#permissions).
  1520  	Permissions []string `json:"permissions,omitempty"`
  1521  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1522  	// unconditionally include in API requests. By default, fields with empty or
  1523  	// default values are omitted from API requests. See
  1524  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1525  	// details.
  1526  	ForceSendFields []string `json:"-"`
  1527  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1528  	// requests with the JSON null value. By default, fields with empty values are
  1529  	// omitted from API requests. See
  1530  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1531  	NullFields []string `json:"-"`
  1532  }
  1533  
  1534  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  1535  	type NoMethod TestIamPermissionsRequest
  1536  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1537  }
  1538  
  1539  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  1540  // method.
  1541  type TestIamPermissionsResponse struct {
  1542  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  1543  	// caller is allowed.
  1544  	Permissions []string `json:"permissions,omitempty"`
  1545  
  1546  	// ServerResponse contains the HTTP response code and headers from the server.
  1547  	googleapi.ServerResponse `json:"-"`
  1548  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1549  	// unconditionally include in API requests. By default, fields with empty or
  1550  	// default values are omitted from API requests. See
  1551  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1552  	// details.
  1553  	ForceSendFields []string `json:"-"`
  1554  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1555  	// requests with the JSON null value. By default, fields with empty values are
  1556  	// omitted from API requests. See
  1557  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1558  	NullFields []string `json:"-"`
  1559  }
  1560  
  1561  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1562  	type NoMethod TestIamPermissionsResponse
  1563  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1564  }
  1565  
  1566  // VerifyMigrationJobRequest: Request message for 'VerifyMigrationJob' request.
  1567  type VerifyMigrationJobRequest struct {
  1568  }
  1569  
  1570  // VmCreationConfig: VM creation configuration message
  1571  type VmCreationConfig struct {
  1572  	// Subnet: The subnet name the vm needs to be created in.
  1573  	Subnet string `json:"subnet,omitempty"`
  1574  	// VmMachineType: Required. VM instance machine type to create.
  1575  	VmMachineType string `json:"vmMachineType,omitempty"`
  1576  	// VmZone: The Google Cloud Platform zone to create the VM in.
  1577  	VmZone string `json:"vmZone,omitempty"`
  1578  	// ForceSendFields is a list of field names (e.g. "Subnet") to unconditionally
  1579  	// include in API requests. By default, fields with empty or default values are
  1580  	// omitted from API requests. See
  1581  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1582  	// details.
  1583  	ForceSendFields []string `json:"-"`
  1584  	// NullFields is a list of field names (e.g. "Subnet") to include in API
  1585  	// requests with the JSON null value. By default, fields with empty values are
  1586  	// omitted from API requests. See
  1587  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1588  	NullFields []string `json:"-"`
  1589  }
  1590  
  1591  func (s *VmCreationConfig) MarshalJSON() ([]byte, error) {
  1592  	type NoMethod VmCreationConfig
  1593  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1594  }
  1595  
  1596  // VmSelectionConfig: VM selection configuration message
  1597  type VmSelectionConfig struct {
  1598  	// VmZone: Required. The Google Cloud Platform zone the VM is located.
  1599  	VmZone string `json:"vmZone,omitempty"`
  1600  	// ForceSendFields is a list of field names (e.g. "VmZone") to unconditionally
  1601  	// include in API requests. By default, fields with empty or default values are
  1602  	// omitted from API requests. See
  1603  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1604  	// details.
  1605  	ForceSendFields []string `json:"-"`
  1606  	// NullFields is a list of field names (e.g. "VmZone") to include in API
  1607  	// requests with the JSON null value. By default, fields with empty values are
  1608  	// omitted from API requests. See
  1609  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1610  	NullFields []string `json:"-"`
  1611  }
  1612  
  1613  func (s *VmSelectionConfig) MarshalJSON() ([]byte, error) {
  1614  	type NoMethod VmSelectionConfig
  1615  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1616  }
  1617  
  1618  // VpcPeeringConnectivity: The details of the VPC where the source database is
  1619  // located in Google Cloud. We will use this information to set up the VPC
  1620  // peering connection between Cloud SQL and this VPC.
  1621  type VpcPeeringConnectivity struct {
  1622  	// Vpc: The name of the VPC network to peer with the Cloud SQL private network.
  1623  	Vpc string `json:"vpc,omitempty"`
  1624  	// ForceSendFields is a list of field names (e.g. "Vpc") to unconditionally
  1625  	// include in API requests. By default, fields with empty or default values are
  1626  	// omitted from API requests. See
  1627  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1628  	// details.
  1629  	ForceSendFields []string `json:"-"`
  1630  	// NullFields is a list of field names (e.g. "Vpc") to include in API requests
  1631  	// with the JSON null value. By default, fields with empty values are omitted
  1632  	// from API requests. See
  1633  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1634  	NullFields []string `json:"-"`
  1635  }
  1636  
  1637  func (s *VpcPeeringConnectivity) MarshalJSON() ([]byte, error) {
  1638  	type NoMethod VpcPeeringConnectivity
  1639  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1640  }
  1641  
  1642  type ProjectsLocationsGetCall struct {
  1643  	s            *Service
  1644  	name         string
  1645  	urlParams_   gensupport.URLParams
  1646  	ifNoneMatch_ string
  1647  	ctx_         context.Context
  1648  	header_      http.Header
  1649  }
  1650  
  1651  // Get: Gets information about a location.
  1652  //
  1653  // - name: Resource name for the location.
  1654  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  1655  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1656  	c.name = name
  1657  	return c
  1658  }
  1659  
  1660  // Fields allows partial responses to be retrieved. See
  1661  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1662  // details.
  1663  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  1664  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1665  	return c
  1666  }
  1667  
  1668  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1669  // object's ETag matches the given value. This is useful for getting updates
  1670  // only after the object has changed since the last request.
  1671  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  1672  	c.ifNoneMatch_ = entityTag
  1673  	return c
  1674  }
  1675  
  1676  // Context sets the context to be used in this call's Do method.
  1677  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  1678  	c.ctx_ = ctx
  1679  	return c
  1680  }
  1681  
  1682  // Header returns a http.Header that can be modified by the caller to add
  1683  // headers to the request.
  1684  func (c *ProjectsLocationsGetCall) Header() http.Header {
  1685  	if c.header_ == nil {
  1686  		c.header_ = make(http.Header)
  1687  	}
  1688  	return c.header_
  1689  }
  1690  
  1691  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  1692  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1693  	if c.ifNoneMatch_ != "" {
  1694  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1695  	}
  1696  	var body io.Reader = nil
  1697  	c.urlParams_.Set("alt", alt)
  1698  	c.urlParams_.Set("prettyPrint", "false")
  1699  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  1700  	urls += "?" + c.urlParams_.Encode()
  1701  	req, err := http.NewRequest("GET", urls, body)
  1702  	if err != nil {
  1703  		return nil, err
  1704  	}
  1705  	req.Header = reqHeaders
  1706  	googleapi.Expand(req.URL, map[string]string{
  1707  		"name": c.name,
  1708  	})
  1709  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1710  }
  1711  
  1712  // Do executes the "datamigration.projects.locations.get" call.
  1713  // Any non-2xx status code is an error. Response headers are in either
  1714  // *Location.ServerResponse.Header or (if a response was returned at all) in
  1715  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1716  // whether the returned error was because http.StatusNotModified was returned.
  1717  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  1718  	gensupport.SetOptions(c.urlParams_, opts...)
  1719  	res, err := c.doRequest("json")
  1720  	if res != nil && res.StatusCode == http.StatusNotModified {
  1721  		if res.Body != nil {
  1722  			res.Body.Close()
  1723  		}
  1724  		return nil, gensupport.WrapError(&googleapi.Error{
  1725  			Code:   res.StatusCode,
  1726  			Header: res.Header,
  1727  		})
  1728  	}
  1729  	if err != nil {
  1730  		return nil, err
  1731  	}
  1732  	defer googleapi.CloseBody(res)
  1733  	if err := googleapi.CheckResponse(res); err != nil {
  1734  		return nil, gensupport.WrapError(err)
  1735  	}
  1736  	ret := &Location{
  1737  		ServerResponse: googleapi.ServerResponse{
  1738  			Header:         res.Header,
  1739  			HTTPStatusCode: res.StatusCode,
  1740  		},
  1741  	}
  1742  	target := &ret
  1743  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1744  		return nil, err
  1745  	}
  1746  	return ret, nil
  1747  }
  1748  
  1749  type ProjectsLocationsListCall struct {
  1750  	s            *Service
  1751  	name         string
  1752  	urlParams_   gensupport.URLParams
  1753  	ifNoneMatch_ string
  1754  	ctx_         context.Context
  1755  	header_      http.Header
  1756  }
  1757  
  1758  // List: Lists information about the supported locations for this service.
  1759  //
  1760  // - name: The resource that owns the locations collection, if applicable.
  1761  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  1762  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1763  	c.name = name
  1764  	return c
  1765  }
  1766  
  1767  // Filter sets the optional parameter "filter": A filter to narrow down results
  1768  // to a preferred subset. The filtering language accepts strings like
  1769  // "displayName=tokyo", and is documented in more detail in AIP-160
  1770  // (https://google.aip.dev/160).
  1771  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  1772  	c.urlParams_.Set("filter", filter)
  1773  	return c
  1774  }
  1775  
  1776  // PageSize sets the optional parameter "pageSize": The maximum number of
  1777  // results to return. If not set, the service selects a default.
  1778  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  1779  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1780  	return c
  1781  }
  1782  
  1783  // PageToken sets the optional parameter "pageToken": A page token received
  1784  // from the `next_page_token` field in the response. Send that page token to
  1785  // receive the subsequent page.
  1786  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  1787  	c.urlParams_.Set("pageToken", pageToken)
  1788  	return c
  1789  }
  1790  
  1791  // Fields allows partial responses to be retrieved. See
  1792  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1793  // details.
  1794  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  1795  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1796  	return c
  1797  }
  1798  
  1799  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1800  // object's ETag matches the given value. This is useful for getting updates
  1801  // only after the object has changed since the last request.
  1802  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  1803  	c.ifNoneMatch_ = entityTag
  1804  	return c
  1805  }
  1806  
  1807  // Context sets the context to be used in this call's Do method.
  1808  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  1809  	c.ctx_ = ctx
  1810  	return c
  1811  }
  1812  
  1813  // Header returns a http.Header that can be modified by the caller to add
  1814  // headers to the request.
  1815  func (c *ProjectsLocationsListCall) Header() http.Header {
  1816  	if c.header_ == nil {
  1817  		c.header_ = make(http.Header)
  1818  	}
  1819  	return c.header_
  1820  }
  1821  
  1822  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  1823  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1824  	if c.ifNoneMatch_ != "" {
  1825  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1826  	}
  1827  	var body io.Reader = nil
  1828  	c.urlParams_.Set("alt", alt)
  1829  	c.urlParams_.Set("prettyPrint", "false")
  1830  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations")
  1831  	urls += "?" + c.urlParams_.Encode()
  1832  	req, err := http.NewRequest("GET", urls, body)
  1833  	if err != nil {
  1834  		return nil, err
  1835  	}
  1836  	req.Header = reqHeaders
  1837  	googleapi.Expand(req.URL, map[string]string{
  1838  		"name": c.name,
  1839  	})
  1840  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1841  }
  1842  
  1843  // Do executes the "datamigration.projects.locations.list" call.
  1844  // Any non-2xx status code is an error. Response headers are in either
  1845  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  1846  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1847  // check whether the returned error was because http.StatusNotModified was
  1848  // returned.
  1849  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  1850  	gensupport.SetOptions(c.urlParams_, opts...)
  1851  	res, err := c.doRequest("json")
  1852  	if res != nil && res.StatusCode == http.StatusNotModified {
  1853  		if res.Body != nil {
  1854  			res.Body.Close()
  1855  		}
  1856  		return nil, gensupport.WrapError(&googleapi.Error{
  1857  			Code:   res.StatusCode,
  1858  			Header: res.Header,
  1859  		})
  1860  	}
  1861  	if err != nil {
  1862  		return nil, err
  1863  	}
  1864  	defer googleapi.CloseBody(res)
  1865  	if err := googleapi.CheckResponse(res); err != nil {
  1866  		return nil, gensupport.WrapError(err)
  1867  	}
  1868  	ret := &ListLocationsResponse{
  1869  		ServerResponse: googleapi.ServerResponse{
  1870  			Header:         res.Header,
  1871  			HTTPStatusCode: res.StatusCode,
  1872  		},
  1873  	}
  1874  	target := &ret
  1875  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1876  		return nil, err
  1877  	}
  1878  	return ret, nil
  1879  }
  1880  
  1881  // Pages invokes f for each page of results.
  1882  // A non-nil error returned from f will halt the iteration.
  1883  // The provided context supersedes any context provided to the Context method.
  1884  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  1885  	c.ctx_ = ctx
  1886  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1887  	for {
  1888  		x, err := c.Do()
  1889  		if err != nil {
  1890  			return err
  1891  		}
  1892  		if err := f(x); err != nil {
  1893  			return err
  1894  		}
  1895  		if x.NextPageToken == "" {
  1896  			return nil
  1897  		}
  1898  		c.PageToken(x.NextPageToken)
  1899  	}
  1900  }
  1901  
  1902  type ProjectsLocationsConnectionProfilesCreateCall struct {
  1903  	s                 *Service
  1904  	parent            string
  1905  	connectionprofile *ConnectionProfile
  1906  	urlParams_        gensupport.URLParams
  1907  	ctx_              context.Context
  1908  	header_           http.Header
  1909  }
  1910  
  1911  // Create: Creates a new connection profile in a given project and location.
  1912  //
  1913  // - parent: The parent, which owns this collection of connection profiles.
  1914  func (r *ProjectsLocationsConnectionProfilesService) Create(parent string, connectionprofile *ConnectionProfile) *ProjectsLocationsConnectionProfilesCreateCall {
  1915  	c := &ProjectsLocationsConnectionProfilesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1916  	c.parent = parent
  1917  	c.connectionprofile = connectionprofile
  1918  	return c
  1919  }
  1920  
  1921  // ConnectionProfileId sets the optional parameter "connectionProfileId":
  1922  // Required. The connection profile identifier.
  1923  func (c *ProjectsLocationsConnectionProfilesCreateCall) ConnectionProfileId(connectionProfileId string) *ProjectsLocationsConnectionProfilesCreateCall {
  1924  	c.urlParams_.Set("connectionProfileId", connectionProfileId)
  1925  	return c
  1926  }
  1927  
  1928  // RequestId sets the optional parameter "requestId": A unique id used to
  1929  // identify the request. If the server receives two requests with the same id,
  1930  // then the second request will be ignored. It is recommended to always set
  1931  // this value to a UUID. The id must contain only letters (a-z, A-Z), numbers
  1932  // (0-9), underscores (_), and hyphens (-). The maximum length is 40
  1933  // characters.
  1934  func (c *ProjectsLocationsConnectionProfilesCreateCall) RequestId(requestId string) *ProjectsLocationsConnectionProfilesCreateCall {
  1935  	c.urlParams_.Set("requestId", requestId)
  1936  	return c
  1937  }
  1938  
  1939  // Fields allows partial responses to be retrieved. See
  1940  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1941  // details.
  1942  func (c *ProjectsLocationsConnectionProfilesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesCreateCall {
  1943  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1944  	return c
  1945  }
  1946  
  1947  // Context sets the context to be used in this call's Do method.
  1948  func (c *ProjectsLocationsConnectionProfilesCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesCreateCall {
  1949  	c.ctx_ = ctx
  1950  	return c
  1951  }
  1952  
  1953  // Header returns a http.Header that can be modified by the caller to add
  1954  // headers to the request.
  1955  func (c *ProjectsLocationsConnectionProfilesCreateCall) Header() http.Header {
  1956  	if c.header_ == nil {
  1957  		c.header_ = make(http.Header)
  1958  	}
  1959  	return c.header_
  1960  }
  1961  
  1962  func (c *ProjectsLocationsConnectionProfilesCreateCall) doRequest(alt string) (*http.Response, error) {
  1963  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1964  	var body io.Reader = nil
  1965  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.connectionprofile)
  1966  	if err != nil {
  1967  		return nil, err
  1968  	}
  1969  	c.urlParams_.Set("alt", alt)
  1970  	c.urlParams_.Set("prettyPrint", "false")
  1971  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/connectionProfiles")
  1972  	urls += "?" + c.urlParams_.Encode()
  1973  	req, err := http.NewRequest("POST", urls, body)
  1974  	if err != nil {
  1975  		return nil, err
  1976  	}
  1977  	req.Header = reqHeaders
  1978  	googleapi.Expand(req.URL, map[string]string{
  1979  		"parent": c.parent,
  1980  	})
  1981  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1982  }
  1983  
  1984  // Do executes the "datamigration.projects.locations.connectionProfiles.create" call.
  1985  // Any non-2xx status code is an error. Response headers are in either
  1986  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  1987  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1988  // whether the returned error was because http.StatusNotModified was returned.
  1989  func (c *ProjectsLocationsConnectionProfilesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1990  	gensupport.SetOptions(c.urlParams_, opts...)
  1991  	res, err := c.doRequest("json")
  1992  	if res != nil && res.StatusCode == http.StatusNotModified {
  1993  		if res.Body != nil {
  1994  			res.Body.Close()
  1995  		}
  1996  		return nil, gensupport.WrapError(&googleapi.Error{
  1997  			Code:   res.StatusCode,
  1998  			Header: res.Header,
  1999  		})
  2000  	}
  2001  	if err != nil {
  2002  		return nil, err
  2003  	}
  2004  	defer googleapi.CloseBody(res)
  2005  	if err := googleapi.CheckResponse(res); err != nil {
  2006  		return nil, gensupport.WrapError(err)
  2007  	}
  2008  	ret := &Operation{
  2009  		ServerResponse: googleapi.ServerResponse{
  2010  			Header:         res.Header,
  2011  			HTTPStatusCode: res.StatusCode,
  2012  		},
  2013  	}
  2014  	target := &ret
  2015  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2016  		return nil, err
  2017  	}
  2018  	return ret, nil
  2019  }
  2020  
  2021  type ProjectsLocationsConnectionProfilesDeleteCall struct {
  2022  	s          *Service
  2023  	name       string
  2024  	urlParams_ gensupport.URLParams
  2025  	ctx_       context.Context
  2026  	header_    http.Header
  2027  }
  2028  
  2029  // Delete: Deletes a single Database Migration Service connection profile. A
  2030  // connection profile can only be deleted if it is not in use by any active
  2031  // migration jobs.
  2032  //
  2033  // - name: Name of the connection profile resource to delete.
  2034  func (r *ProjectsLocationsConnectionProfilesService) Delete(name string) *ProjectsLocationsConnectionProfilesDeleteCall {
  2035  	c := &ProjectsLocationsConnectionProfilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2036  	c.name = name
  2037  	return c
  2038  }
  2039  
  2040  // Force sets the optional parameter "force": In case of force delete, the
  2041  // CloudSQL replica database is also deleted (only for CloudSQL connection
  2042  // profile).
  2043  func (c *ProjectsLocationsConnectionProfilesDeleteCall) Force(force bool) *ProjectsLocationsConnectionProfilesDeleteCall {
  2044  	c.urlParams_.Set("force", fmt.Sprint(force))
  2045  	return c
  2046  }
  2047  
  2048  // RequestId sets the optional parameter "requestId": A unique id used to
  2049  // identify the request. If the server receives two requests with the same id,
  2050  // then the second request will be ignored. It is recommended to always set
  2051  // this value to a UUID. The id must contain only letters (a-z, A-Z), numbers
  2052  // (0-9), underscores (_), and hyphens (-). The maximum length is 40
  2053  // characters.
  2054  func (c *ProjectsLocationsConnectionProfilesDeleteCall) RequestId(requestId string) *ProjectsLocationsConnectionProfilesDeleteCall {
  2055  	c.urlParams_.Set("requestId", requestId)
  2056  	return c
  2057  }
  2058  
  2059  // Fields allows partial responses to be retrieved. See
  2060  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2061  // details.
  2062  func (c *ProjectsLocationsConnectionProfilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesDeleteCall {
  2063  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2064  	return c
  2065  }
  2066  
  2067  // Context sets the context to be used in this call's Do method.
  2068  func (c *ProjectsLocationsConnectionProfilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesDeleteCall {
  2069  	c.ctx_ = ctx
  2070  	return c
  2071  }
  2072  
  2073  // Header returns a http.Header that can be modified by the caller to add
  2074  // headers to the request.
  2075  func (c *ProjectsLocationsConnectionProfilesDeleteCall) Header() http.Header {
  2076  	if c.header_ == nil {
  2077  		c.header_ = make(http.Header)
  2078  	}
  2079  	return c.header_
  2080  }
  2081  
  2082  func (c *ProjectsLocationsConnectionProfilesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2083  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2084  	var body io.Reader = nil
  2085  	c.urlParams_.Set("alt", alt)
  2086  	c.urlParams_.Set("prettyPrint", "false")
  2087  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2088  	urls += "?" + c.urlParams_.Encode()
  2089  	req, err := http.NewRequest("DELETE", urls, body)
  2090  	if err != nil {
  2091  		return nil, err
  2092  	}
  2093  	req.Header = reqHeaders
  2094  	googleapi.Expand(req.URL, map[string]string{
  2095  		"name": c.name,
  2096  	})
  2097  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2098  }
  2099  
  2100  // Do executes the "datamigration.projects.locations.connectionProfiles.delete" call.
  2101  // Any non-2xx status code is an error. Response headers are in either
  2102  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2103  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2104  // whether the returned error was because http.StatusNotModified was returned.
  2105  func (c *ProjectsLocationsConnectionProfilesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2106  	gensupport.SetOptions(c.urlParams_, opts...)
  2107  	res, err := c.doRequest("json")
  2108  	if res != nil && res.StatusCode == http.StatusNotModified {
  2109  		if res.Body != nil {
  2110  			res.Body.Close()
  2111  		}
  2112  		return nil, gensupport.WrapError(&googleapi.Error{
  2113  			Code:   res.StatusCode,
  2114  			Header: res.Header,
  2115  		})
  2116  	}
  2117  	if err != nil {
  2118  		return nil, err
  2119  	}
  2120  	defer googleapi.CloseBody(res)
  2121  	if err := googleapi.CheckResponse(res); err != nil {
  2122  		return nil, gensupport.WrapError(err)
  2123  	}
  2124  	ret := &Operation{
  2125  		ServerResponse: googleapi.ServerResponse{
  2126  			Header:         res.Header,
  2127  			HTTPStatusCode: res.StatusCode,
  2128  		},
  2129  	}
  2130  	target := &ret
  2131  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2132  		return nil, err
  2133  	}
  2134  	return ret, nil
  2135  }
  2136  
  2137  type ProjectsLocationsConnectionProfilesGetCall struct {
  2138  	s            *Service
  2139  	name         string
  2140  	urlParams_   gensupport.URLParams
  2141  	ifNoneMatch_ string
  2142  	ctx_         context.Context
  2143  	header_      http.Header
  2144  }
  2145  
  2146  // Get: Gets details of a single connection profile.
  2147  //
  2148  // - name: Name of the connection profile resource to get.
  2149  func (r *ProjectsLocationsConnectionProfilesService) Get(name string) *ProjectsLocationsConnectionProfilesGetCall {
  2150  	c := &ProjectsLocationsConnectionProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2151  	c.name = name
  2152  	return c
  2153  }
  2154  
  2155  // Fields allows partial responses to be retrieved. See
  2156  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2157  // details.
  2158  func (c *ProjectsLocationsConnectionProfilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesGetCall {
  2159  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2160  	return c
  2161  }
  2162  
  2163  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2164  // object's ETag matches the given value. This is useful for getting updates
  2165  // only after the object has changed since the last request.
  2166  func (c *ProjectsLocationsConnectionProfilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionProfilesGetCall {
  2167  	c.ifNoneMatch_ = entityTag
  2168  	return c
  2169  }
  2170  
  2171  // Context sets the context to be used in this call's Do method.
  2172  func (c *ProjectsLocationsConnectionProfilesGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesGetCall {
  2173  	c.ctx_ = ctx
  2174  	return c
  2175  }
  2176  
  2177  // Header returns a http.Header that can be modified by the caller to add
  2178  // headers to the request.
  2179  func (c *ProjectsLocationsConnectionProfilesGetCall) Header() http.Header {
  2180  	if c.header_ == nil {
  2181  		c.header_ = make(http.Header)
  2182  	}
  2183  	return c.header_
  2184  }
  2185  
  2186  func (c *ProjectsLocationsConnectionProfilesGetCall) doRequest(alt string) (*http.Response, error) {
  2187  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2188  	if c.ifNoneMatch_ != "" {
  2189  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2190  	}
  2191  	var body io.Reader = nil
  2192  	c.urlParams_.Set("alt", alt)
  2193  	c.urlParams_.Set("prettyPrint", "false")
  2194  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2195  	urls += "?" + c.urlParams_.Encode()
  2196  	req, err := http.NewRequest("GET", urls, body)
  2197  	if err != nil {
  2198  		return nil, err
  2199  	}
  2200  	req.Header = reqHeaders
  2201  	googleapi.Expand(req.URL, map[string]string{
  2202  		"name": c.name,
  2203  	})
  2204  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2205  }
  2206  
  2207  // Do executes the "datamigration.projects.locations.connectionProfiles.get" call.
  2208  // Any non-2xx status code is an error. Response headers are in either
  2209  // *ConnectionProfile.ServerResponse.Header or (if a response was returned at
  2210  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2211  // check whether the returned error was because http.StatusNotModified was
  2212  // returned.
  2213  func (c *ProjectsLocationsConnectionProfilesGetCall) Do(opts ...googleapi.CallOption) (*ConnectionProfile, error) {
  2214  	gensupport.SetOptions(c.urlParams_, opts...)
  2215  	res, err := c.doRequest("json")
  2216  	if res != nil && res.StatusCode == http.StatusNotModified {
  2217  		if res.Body != nil {
  2218  			res.Body.Close()
  2219  		}
  2220  		return nil, gensupport.WrapError(&googleapi.Error{
  2221  			Code:   res.StatusCode,
  2222  			Header: res.Header,
  2223  		})
  2224  	}
  2225  	if err != nil {
  2226  		return nil, err
  2227  	}
  2228  	defer googleapi.CloseBody(res)
  2229  	if err := googleapi.CheckResponse(res); err != nil {
  2230  		return nil, gensupport.WrapError(err)
  2231  	}
  2232  	ret := &ConnectionProfile{
  2233  		ServerResponse: googleapi.ServerResponse{
  2234  			Header:         res.Header,
  2235  			HTTPStatusCode: res.StatusCode,
  2236  		},
  2237  	}
  2238  	target := &ret
  2239  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2240  		return nil, err
  2241  	}
  2242  	return ret, nil
  2243  }
  2244  
  2245  type ProjectsLocationsConnectionProfilesGetIamPolicyCall struct {
  2246  	s            *Service
  2247  	resource     string
  2248  	urlParams_   gensupport.URLParams
  2249  	ifNoneMatch_ string
  2250  	ctx_         context.Context
  2251  	header_      http.Header
  2252  }
  2253  
  2254  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  2255  // empty policy if the resource exists and does not have a policy set.
  2256  //
  2257  //   - resource: REQUIRED: The resource for which the policy is being requested.
  2258  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2259  //     for the appropriate value for this field.
  2260  func (r *ProjectsLocationsConnectionProfilesService) GetIamPolicy(resource string) *ProjectsLocationsConnectionProfilesGetIamPolicyCall {
  2261  	c := &ProjectsLocationsConnectionProfilesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2262  	c.resource = resource
  2263  	return c
  2264  }
  2265  
  2266  // OptionsRequestedPolicyVersion sets the optional parameter
  2267  // "options.requestedPolicyVersion": The maximum policy version that will be
  2268  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  2269  // an invalid value will be rejected. Requests for policies with any
  2270  // conditional role bindings must specify version 3. Policies with no
  2271  // conditional role bindings may specify any valid value or leave the field
  2272  // unset. The policy in the response might use the policy version that you
  2273  // specified, or it might use a lower policy version. For example, if you
  2274  // specify version 3, but the policy has no conditional role bindings, the
  2275  // response uses version 1. To learn which resources support conditions in
  2276  // their IAM policies, see the IAM documentation
  2277  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  2278  func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsConnectionProfilesGetIamPolicyCall {
  2279  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  2280  	return c
  2281  }
  2282  
  2283  // Fields allows partial responses to be retrieved. See
  2284  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2285  // details.
  2286  func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesGetIamPolicyCall {
  2287  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2288  	return c
  2289  }
  2290  
  2291  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2292  // object's ETag matches the given value. This is useful for getting updates
  2293  // only after the object has changed since the last request.
  2294  func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionProfilesGetIamPolicyCall {
  2295  	c.ifNoneMatch_ = entityTag
  2296  	return c
  2297  }
  2298  
  2299  // Context sets the context to be used in this call's Do method.
  2300  func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesGetIamPolicyCall {
  2301  	c.ctx_ = ctx
  2302  	return c
  2303  }
  2304  
  2305  // Header returns a http.Header that can be modified by the caller to add
  2306  // headers to the request.
  2307  func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Header() http.Header {
  2308  	if c.header_ == nil {
  2309  		c.header_ = make(http.Header)
  2310  	}
  2311  	return c.header_
  2312  }
  2313  
  2314  func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2315  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2316  	if c.ifNoneMatch_ != "" {
  2317  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2318  	}
  2319  	var body io.Reader = nil
  2320  	c.urlParams_.Set("alt", alt)
  2321  	c.urlParams_.Set("prettyPrint", "false")
  2322  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
  2323  	urls += "?" + c.urlParams_.Encode()
  2324  	req, err := http.NewRequest("GET", urls, body)
  2325  	if err != nil {
  2326  		return nil, err
  2327  	}
  2328  	req.Header = reqHeaders
  2329  	googleapi.Expand(req.URL, map[string]string{
  2330  		"resource": c.resource,
  2331  	})
  2332  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2333  }
  2334  
  2335  // Do executes the "datamigration.projects.locations.connectionProfiles.getIamPolicy" call.
  2336  // Any non-2xx status code is an error. Response headers are in either
  2337  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2338  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2339  // whether the returned error was because http.StatusNotModified was returned.
  2340  func (c *ProjectsLocationsConnectionProfilesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2341  	gensupport.SetOptions(c.urlParams_, opts...)
  2342  	res, err := c.doRequest("json")
  2343  	if res != nil && res.StatusCode == http.StatusNotModified {
  2344  		if res.Body != nil {
  2345  			res.Body.Close()
  2346  		}
  2347  		return nil, gensupport.WrapError(&googleapi.Error{
  2348  			Code:   res.StatusCode,
  2349  			Header: res.Header,
  2350  		})
  2351  	}
  2352  	if err != nil {
  2353  		return nil, err
  2354  	}
  2355  	defer googleapi.CloseBody(res)
  2356  	if err := googleapi.CheckResponse(res); err != nil {
  2357  		return nil, gensupport.WrapError(err)
  2358  	}
  2359  	ret := &Policy{
  2360  		ServerResponse: googleapi.ServerResponse{
  2361  			Header:         res.Header,
  2362  			HTTPStatusCode: res.StatusCode,
  2363  		},
  2364  	}
  2365  	target := &ret
  2366  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2367  		return nil, err
  2368  	}
  2369  	return ret, nil
  2370  }
  2371  
  2372  type ProjectsLocationsConnectionProfilesListCall struct {
  2373  	s            *Service
  2374  	parent       string
  2375  	urlParams_   gensupport.URLParams
  2376  	ifNoneMatch_ string
  2377  	ctx_         context.Context
  2378  	header_      http.Header
  2379  }
  2380  
  2381  // List: Retrieve a list of all connection profiles in a given project and
  2382  // location.
  2383  //
  2384  // - parent: The parent, which owns this collection of connection profiles.
  2385  func (r *ProjectsLocationsConnectionProfilesService) List(parent string) *ProjectsLocationsConnectionProfilesListCall {
  2386  	c := &ProjectsLocationsConnectionProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2387  	c.parent = parent
  2388  	return c
  2389  }
  2390  
  2391  // Filter sets the optional parameter "filter": A filter expression that
  2392  // filters connection profiles listed in the response. The expression must
  2393  // specify the field name, a comparison operator, and the value that you want
  2394  // to use for filtering. The value must be a string, a number, or a boolean.
  2395  // The comparison operator must be either =, !=, >, or <. For example, list
  2396  // connection profiles created this year by specifying **createTime %gt;
  2397  // 2020-01-01T00:00:00.000000000Z**. You can also filter nested fields. For
  2398  // example, you could specify **mySql.username = %lt;my_username%gt;** to list
  2399  // all connection profiles configured to connect with a specific username.
  2400  func (c *ProjectsLocationsConnectionProfilesListCall) Filter(filter string) *ProjectsLocationsConnectionProfilesListCall {
  2401  	c.urlParams_.Set("filter", filter)
  2402  	return c
  2403  }
  2404  
  2405  // OrderBy sets the optional parameter "orderBy": the order by fields for the
  2406  // result.
  2407  func (c *ProjectsLocationsConnectionProfilesListCall) OrderBy(orderBy string) *ProjectsLocationsConnectionProfilesListCall {
  2408  	c.urlParams_.Set("orderBy", orderBy)
  2409  	return c
  2410  }
  2411  
  2412  // PageSize sets the optional parameter "pageSize": The maximum number of
  2413  // connection profiles to return. The service may return fewer than this value.
  2414  // If unspecified, at most 50 connection profiles will be returned. The maximum
  2415  // value is 1000; values above 1000 will be coerced to 1000.
  2416  func (c *ProjectsLocationsConnectionProfilesListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionProfilesListCall {
  2417  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2418  	return c
  2419  }
  2420  
  2421  // PageToken sets the optional parameter "pageToken": A page token, received
  2422  // from a previous `ListConnectionProfiles` call. Provide this to retrieve the
  2423  // subsequent page. When paginating, all other parameters provided to
  2424  // `ListConnectionProfiles` must match the call that provided the page token.
  2425  func (c *ProjectsLocationsConnectionProfilesListCall) PageToken(pageToken string) *ProjectsLocationsConnectionProfilesListCall {
  2426  	c.urlParams_.Set("pageToken", pageToken)
  2427  	return c
  2428  }
  2429  
  2430  // Fields allows partial responses to be retrieved. See
  2431  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2432  // details.
  2433  func (c *ProjectsLocationsConnectionProfilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesListCall {
  2434  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2435  	return c
  2436  }
  2437  
  2438  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2439  // object's ETag matches the given value. This is useful for getting updates
  2440  // only after the object has changed since the last request.
  2441  func (c *ProjectsLocationsConnectionProfilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionProfilesListCall {
  2442  	c.ifNoneMatch_ = entityTag
  2443  	return c
  2444  }
  2445  
  2446  // Context sets the context to be used in this call's Do method.
  2447  func (c *ProjectsLocationsConnectionProfilesListCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesListCall {
  2448  	c.ctx_ = ctx
  2449  	return c
  2450  }
  2451  
  2452  // Header returns a http.Header that can be modified by the caller to add
  2453  // headers to the request.
  2454  func (c *ProjectsLocationsConnectionProfilesListCall) Header() http.Header {
  2455  	if c.header_ == nil {
  2456  		c.header_ = make(http.Header)
  2457  	}
  2458  	return c.header_
  2459  }
  2460  
  2461  func (c *ProjectsLocationsConnectionProfilesListCall) doRequest(alt string) (*http.Response, error) {
  2462  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2463  	if c.ifNoneMatch_ != "" {
  2464  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2465  	}
  2466  	var body io.Reader = nil
  2467  	c.urlParams_.Set("alt", alt)
  2468  	c.urlParams_.Set("prettyPrint", "false")
  2469  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/connectionProfiles")
  2470  	urls += "?" + c.urlParams_.Encode()
  2471  	req, err := http.NewRequest("GET", urls, body)
  2472  	if err != nil {
  2473  		return nil, err
  2474  	}
  2475  	req.Header = reqHeaders
  2476  	googleapi.Expand(req.URL, map[string]string{
  2477  		"parent": c.parent,
  2478  	})
  2479  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2480  }
  2481  
  2482  // Do executes the "datamigration.projects.locations.connectionProfiles.list" call.
  2483  // Any non-2xx status code is an error. Response headers are in either
  2484  // *ListConnectionProfilesResponse.ServerResponse.Header or (if a response was
  2485  // returned at all) in error.(*googleapi.Error).Header. Use
  2486  // googleapi.IsNotModified to check whether the returned error was because
  2487  // http.StatusNotModified was returned.
  2488  func (c *ProjectsLocationsConnectionProfilesListCall) Do(opts ...googleapi.CallOption) (*ListConnectionProfilesResponse, error) {
  2489  	gensupport.SetOptions(c.urlParams_, opts...)
  2490  	res, err := c.doRequest("json")
  2491  	if res != nil && res.StatusCode == http.StatusNotModified {
  2492  		if res.Body != nil {
  2493  			res.Body.Close()
  2494  		}
  2495  		return nil, gensupport.WrapError(&googleapi.Error{
  2496  			Code:   res.StatusCode,
  2497  			Header: res.Header,
  2498  		})
  2499  	}
  2500  	if err != nil {
  2501  		return nil, err
  2502  	}
  2503  	defer googleapi.CloseBody(res)
  2504  	if err := googleapi.CheckResponse(res); err != nil {
  2505  		return nil, gensupport.WrapError(err)
  2506  	}
  2507  	ret := &ListConnectionProfilesResponse{
  2508  		ServerResponse: googleapi.ServerResponse{
  2509  			Header:         res.Header,
  2510  			HTTPStatusCode: res.StatusCode,
  2511  		},
  2512  	}
  2513  	target := &ret
  2514  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2515  		return nil, err
  2516  	}
  2517  	return ret, nil
  2518  }
  2519  
  2520  // Pages invokes f for each page of results.
  2521  // A non-nil error returned from f will halt the iteration.
  2522  // The provided context supersedes any context provided to the Context method.
  2523  func (c *ProjectsLocationsConnectionProfilesListCall) Pages(ctx context.Context, f func(*ListConnectionProfilesResponse) error) error {
  2524  	c.ctx_ = ctx
  2525  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2526  	for {
  2527  		x, err := c.Do()
  2528  		if err != nil {
  2529  			return err
  2530  		}
  2531  		if err := f(x); err != nil {
  2532  			return err
  2533  		}
  2534  		if x.NextPageToken == "" {
  2535  			return nil
  2536  		}
  2537  		c.PageToken(x.NextPageToken)
  2538  	}
  2539  }
  2540  
  2541  type ProjectsLocationsConnectionProfilesPatchCall struct {
  2542  	s                 *Service
  2543  	name              string
  2544  	connectionprofile *ConnectionProfile
  2545  	urlParams_        gensupport.URLParams
  2546  	ctx_              context.Context
  2547  	header_           http.Header
  2548  }
  2549  
  2550  // Patch: Update the configuration of a single connection profile.
  2551  //
  2552  //   - name: The name of this connection profile resource in the form of
  2553  //     projects/{project}/locations/{location}/connectionProfiles/{connectionProfi
  2554  //     le}.
  2555  func (r *ProjectsLocationsConnectionProfilesService) Patch(name string, connectionprofile *ConnectionProfile) *ProjectsLocationsConnectionProfilesPatchCall {
  2556  	c := &ProjectsLocationsConnectionProfilesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2557  	c.name = name
  2558  	c.connectionprofile = connectionprofile
  2559  	return c
  2560  }
  2561  
  2562  // RequestId sets the optional parameter "requestId": A unique id used to
  2563  // identify the request. If the server receives two requests with the same id,
  2564  // then the second request will be ignored. It is recommended to always set
  2565  // this value to a UUID. The id must contain only letters (a-z, A-Z), numbers
  2566  // (0-9), underscores (_), and hyphens (-). The maximum length is 40
  2567  // characters.
  2568  func (c *ProjectsLocationsConnectionProfilesPatchCall) RequestId(requestId string) *ProjectsLocationsConnectionProfilesPatchCall {
  2569  	c.urlParams_.Set("requestId", requestId)
  2570  	return c
  2571  }
  2572  
  2573  // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
  2574  // used to specify the fields to be overwritten in the connection profile
  2575  // resource by the update.
  2576  func (c *ProjectsLocationsConnectionProfilesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionProfilesPatchCall {
  2577  	c.urlParams_.Set("updateMask", updateMask)
  2578  	return c
  2579  }
  2580  
  2581  // Fields allows partial responses to be retrieved. See
  2582  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2583  // details.
  2584  func (c *ProjectsLocationsConnectionProfilesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesPatchCall {
  2585  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2586  	return c
  2587  }
  2588  
  2589  // Context sets the context to be used in this call's Do method.
  2590  func (c *ProjectsLocationsConnectionProfilesPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesPatchCall {
  2591  	c.ctx_ = ctx
  2592  	return c
  2593  }
  2594  
  2595  // Header returns a http.Header that can be modified by the caller to add
  2596  // headers to the request.
  2597  func (c *ProjectsLocationsConnectionProfilesPatchCall) Header() http.Header {
  2598  	if c.header_ == nil {
  2599  		c.header_ = make(http.Header)
  2600  	}
  2601  	return c.header_
  2602  }
  2603  
  2604  func (c *ProjectsLocationsConnectionProfilesPatchCall) doRequest(alt string) (*http.Response, error) {
  2605  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2606  	var body io.Reader = nil
  2607  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.connectionprofile)
  2608  	if err != nil {
  2609  		return nil, err
  2610  	}
  2611  	c.urlParams_.Set("alt", alt)
  2612  	c.urlParams_.Set("prettyPrint", "false")
  2613  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  2614  	urls += "?" + c.urlParams_.Encode()
  2615  	req, err := http.NewRequest("PATCH", urls, body)
  2616  	if err != nil {
  2617  		return nil, err
  2618  	}
  2619  	req.Header = reqHeaders
  2620  	googleapi.Expand(req.URL, map[string]string{
  2621  		"name": c.name,
  2622  	})
  2623  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2624  }
  2625  
  2626  // Do executes the "datamigration.projects.locations.connectionProfiles.patch" call.
  2627  // Any non-2xx status code is an error. Response headers are in either
  2628  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2629  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2630  // whether the returned error was because http.StatusNotModified was returned.
  2631  func (c *ProjectsLocationsConnectionProfilesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2632  	gensupport.SetOptions(c.urlParams_, opts...)
  2633  	res, err := c.doRequest("json")
  2634  	if res != nil && res.StatusCode == http.StatusNotModified {
  2635  		if res.Body != nil {
  2636  			res.Body.Close()
  2637  		}
  2638  		return nil, gensupport.WrapError(&googleapi.Error{
  2639  			Code:   res.StatusCode,
  2640  			Header: res.Header,
  2641  		})
  2642  	}
  2643  	if err != nil {
  2644  		return nil, err
  2645  	}
  2646  	defer googleapi.CloseBody(res)
  2647  	if err := googleapi.CheckResponse(res); err != nil {
  2648  		return nil, gensupport.WrapError(err)
  2649  	}
  2650  	ret := &Operation{
  2651  		ServerResponse: googleapi.ServerResponse{
  2652  			Header:         res.Header,
  2653  			HTTPStatusCode: res.StatusCode,
  2654  		},
  2655  	}
  2656  	target := &ret
  2657  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2658  		return nil, err
  2659  	}
  2660  	return ret, nil
  2661  }
  2662  
  2663  type ProjectsLocationsConnectionProfilesSetIamPolicyCall struct {
  2664  	s                   *Service
  2665  	resource            string
  2666  	setiampolicyrequest *SetIamPolicyRequest
  2667  	urlParams_          gensupport.URLParams
  2668  	ctx_                context.Context
  2669  	header_             http.Header
  2670  }
  2671  
  2672  // SetIamPolicy: Sets the access control policy on the specified resource.
  2673  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  2674  // and `PERMISSION_DENIED` errors.
  2675  //
  2676  //   - resource: REQUIRED: The resource for which the policy is being specified.
  2677  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2678  //     for the appropriate value for this field.
  2679  func (r *ProjectsLocationsConnectionProfilesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsConnectionProfilesSetIamPolicyCall {
  2680  	c := &ProjectsLocationsConnectionProfilesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2681  	c.resource = resource
  2682  	c.setiampolicyrequest = setiampolicyrequest
  2683  	return c
  2684  }
  2685  
  2686  // Fields allows partial responses to be retrieved. See
  2687  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2688  // details.
  2689  func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesSetIamPolicyCall {
  2690  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2691  	return c
  2692  }
  2693  
  2694  // Context sets the context to be used in this call's Do method.
  2695  func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesSetIamPolicyCall {
  2696  	c.ctx_ = ctx
  2697  	return c
  2698  }
  2699  
  2700  // Header returns a http.Header that can be modified by the caller to add
  2701  // headers to the request.
  2702  func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Header() http.Header {
  2703  	if c.header_ == nil {
  2704  		c.header_ = make(http.Header)
  2705  	}
  2706  	return c.header_
  2707  }
  2708  
  2709  func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2710  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2711  	var body io.Reader = nil
  2712  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  2713  	if err != nil {
  2714  		return nil, err
  2715  	}
  2716  	c.urlParams_.Set("alt", alt)
  2717  	c.urlParams_.Set("prettyPrint", "false")
  2718  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
  2719  	urls += "?" + c.urlParams_.Encode()
  2720  	req, err := http.NewRequest("POST", urls, body)
  2721  	if err != nil {
  2722  		return nil, err
  2723  	}
  2724  	req.Header = reqHeaders
  2725  	googleapi.Expand(req.URL, map[string]string{
  2726  		"resource": c.resource,
  2727  	})
  2728  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2729  }
  2730  
  2731  // Do executes the "datamigration.projects.locations.connectionProfiles.setIamPolicy" call.
  2732  // Any non-2xx status code is an error. Response headers are in either
  2733  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2734  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2735  // whether the returned error was because http.StatusNotModified was returned.
  2736  func (c *ProjectsLocationsConnectionProfilesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2737  	gensupport.SetOptions(c.urlParams_, opts...)
  2738  	res, err := c.doRequest("json")
  2739  	if res != nil && res.StatusCode == http.StatusNotModified {
  2740  		if res.Body != nil {
  2741  			res.Body.Close()
  2742  		}
  2743  		return nil, gensupport.WrapError(&googleapi.Error{
  2744  			Code:   res.StatusCode,
  2745  			Header: res.Header,
  2746  		})
  2747  	}
  2748  	if err != nil {
  2749  		return nil, err
  2750  	}
  2751  	defer googleapi.CloseBody(res)
  2752  	if err := googleapi.CheckResponse(res); err != nil {
  2753  		return nil, gensupport.WrapError(err)
  2754  	}
  2755  	ret := &Policy{
  2756  		ServerResponse: googleapi.ServerResponse{
  2757  			Header:         res.Header,
  2758  			HTTPStatusCode: res.StatusCode,
  2759  		},
  2760  	}
  2761  	target := &ret
  2762  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2763  		return nil, err
  2764  	}
  2765  	return ret, nil
  2766  }
  2767  
  2768  type ProjectsLocationsConnectionProfilesTestIamPermissionsCall struct {
  2769  	s                         *Service
  2770  	resource                  string
  2771  	testiampermissionsrequest *TestIamPermissionsRequest
  2772  	urlParams_                gensupport.URLParams
  2773  	ctx_                      context.Context
  2774  	header_                   http.Header
  2775  }
  2776  
  2777  // TestIamPermissions: Returns permissions that a caller has on the specified
  2778  // resource. If the resource does not exist, this will return an empty set of
  2779  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  2780  // used for building permission-aware UIs and command-line tools, not for
  2781  // authorization checking. This operation may "fail open" without warning.
  2782  //
  2783  //   - resource: REQUIRED: The resource for which the policy detail is being
  2784  //     requested. See Resource names
  2785  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  2786  //     value for this field.
  2787  func (r *ProjectsLocationsConnectionProfilesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsConnectionProfilesTestIamPermissionsCall {
  2788  	c := &ProjectsLocationsConnectionProfilesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2789  	c.resource = resource
  2790  	c.testiampermissionsrequest = testiampermissionsrequest
  2791  	return c
  2792  }
  2793  
  2794  // Fields allows partial responses to be retrieved. See
  2795  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2796  // details.
  2797  func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionProfilesTestIamPermissionsCall {
  2798  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2799  	return c
  2800  }
  2801  
  2802  // Context sets the context to be used in this call's Do method.
  2803  func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsConnectionProfilesTestIamPermissionsCall {
  2804  	c.ctx_ = ctx
  2805  	return c
  2806  }
  2807  
  2808  // Header returns a http.Header that can be modified by the caller to add
  2809  // headers to the request.
  2810  func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Header() http.Header {
  2811  	if c.header_ == nil {
  2812  		c.header_ = make(http.Header)
  2813  	}
  2814  	return c.header_
  2815  }
  2816  
  2817  func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  2818  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2819  	var body io.Reader = nil
  2820  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  2821  	if err != nil {
  2822  		return nil, err
  2823  	}
  2824  	c.urlParams_.Set("alt", alt)
  2825  	c.urlParams_.Set("prettyPrint", "false")
  2826  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
  2827  	urls += "?" + c.urlParams_.Encode()
  2828  	req, err := http.NewRequest("POST", urls, body)
  2829  	if err != nil {
  2830  		return nil, err
  2831  	}
  2832  	req.Header = reqHeaders
  2833  	googleapi.Expand(req.URL, map[string]string{
  2834  		"resource": c.resource,
  2835  	})
  2836  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2837  }
  2838  
  2839  // Do executes the "datamigration.projects.locations.connectionProfiles.testIamPermissions" call.
  2840  // Any non-2xx status code is an error. Response headers are in either
  2841  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  2842  // returned at all) in error.(*googleapi.Error).Header. Use
  2843  // googleapi.IsNotModified to check whether the returned error was because
  2844  // http.StatusNotModified was returned.
  2845  func (c *ProjectsLocationsConnectionProfilesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  2846  	gensupport.SetOptions(c.urlParams_, opts...)
  2847  	res, err := c.doRequest("json")
  2848  	if res != nil && res.StatusCode == http.StatusNotModified {
  2849  		if res.Body != nil {
  2850  			res.Body.Close()
  2851  		}
  2852  		return nil, gensupport.WrapError(&googleapi.Error{
  2853  			Code:   res.StatusCode,
  2854  			Header: res.Header,
  2855  		})
  2856  	}
  2857  	if err != nil {
  2858  		return nil, err
  2859  	}
  2860  	defer googleapi.CloseBody(res)
  2861  	if err := googleapi.CheckResponse(res); err != nil {
  2862  		return nil, gensupport.WrapError(err)
  2863  	}
  2864  	ret := &TestIamPermissionsResponse{
  2865  		ServerResponse: googleapi.ServerResponse{
  2866  			Header:         res.Header,
  2867  			HTTPStatusCode: res.StatusCode,
  2868  		},
  2869  	}
  2870  	target := &ret
  2871  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2872  		return nil, err
  2873  	}
  2874  	return ret, nil
  2875  }
  2876  
  2877  type ProjectsLocationsMigrationJobsCreateCall struct {
  2878  	s            *Service
  2879  	parent       string
  2880  	migrationjob *MigrationJob
  2881  	urlParams_   gensupport.URLParams
  2882  	ctx_         context.Context
  2883  	header_      http.Header
  2884  }
  2885  
  2886  // Create: Creates a new migration job in a given project and location.
  2887  //
  2888  // - parent: The parent, which owns this collection of migration jobs.
  2889  func (r *ProjectsLocationsMigrationJobsService) Create(parent string, migrationjob *MigrationJob) *ProjectsLocationsMigrationJobsCreateCall {
  2890  	c := &ProjectsLocationsMigrationJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2891  	c.parent = parent
  2892  	c.migrationjob = migrationjob
  2893  	return c
  2894  }
  2895  
  2896  // MigrationJobId sets the optional parameter "migrationJobId": Required. The
  2897  // ID of the instance to create.
  2898  func (c *ProjectsLocationsMigrationJobsCreateCall) MigrationJobId(migrationJobId string) *ProjectsLocationsMigrationJobsCreateCall {
  2899  	c.urlParams_.Set("migrationJobId", migrationJobId)
  2900  	return c
  2901  }
  2902  
  2903  // RequestId sets the optional parameter "requestId": A unique id used to
  2904  // identify the request. If the server receives two requests with the same id,
  2905  // then the second request will be ignored. It is recommended to always set
  2906  // this value to a UUID. The id must contain only letters (a-z, A-Z), numbers
  2907  // (0-9), underscores (_), and hyphens (-). The maximum length is 40
  2908  // characters.
  2909  func (c *ProjectsLocationsMigrationJobsCreateCall) RequestId(requestId string) *ProjectsLocationsMigrationJobsCreateCall {
  2910  	c.urlParams_.Set("requestId", requestId)
  2911  	return c
  2912  }
  2913  
  2914  // Fields allows partial responses to be retrieved. See
  2915  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2916  // details.
  2917  func (c *ProjectsLocationsMigrationJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsCreateCall {
  2918  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2919  	return c
  2920  }
  2921  
  2922  // Context sets the context to be used in this call's Do method.
  2923  func (c *ProjectsLocationsMigrationJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsCreateCall {
  2924  	c.ctx_ = ctx
  2925  	return c
  2926  }
  2927  
  2928  // Header returns a http.Header that can be modified by the caller to add
  2929  // headers to the request.
  2930  func (c *ProjectsLocationsMigrationJobsCreateCall) Header() http.Header {
  2931  	if c.header_ == nil {
  2932  		c.header_ = make(http.Header)
  2933  	}
  2934  	return c.header_
  2935  }
  2936  
  2937  func (c *ProjectsLocationsMigrationJobsCreateCall) doRequest(alt string) (*http.Response, error) {
  2938  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2939  	var body io.Reader = nil
  2940  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.migrationjob)
  2941  	if err != nil {
  2942  		return nil, err
  2943  	}
  2944  	c.urlParams_.Set("alt", alt)
  2945  	c.urlParams_.Set("prettyPrint", "false")
  2946  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/migrationJobs")
  2947  	urls += "?" + c.urlParams_.Encode()
  2948  	req, err := http.NewRequest("POST", urls, body)
  2949  	if err != nil {
  2950  		return nil, err
  2951  	}
  2952  	req.Header = reqHeaders
  2953  	googleapi.Expand(req.URL, map[string]string{
  2954  		"parent": c.parent,
  2955  	})
  2956  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2957  }
  2958  
  2959  // Do executes the "datamigration.projects.locations.migrationJobs.create" call.
  2960  // Any non-2xx status code is an error. Response headers are in either
  2961  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2962  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2963  // whether the returned error was because http.StatusNotModified was returned.
  2964  func (c *ProjectsLocationsMigrationJobsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2965  	gensupport.SetOptions(c.urlParams_, opts...)
  2966  	res, err := c.doRequest("json")
  2967  	if res != nil && res.StatusCode == http.StatusNotModified {
  2968  		if res.Body != nil {
  2969  			res.Body.Close()
  2970  		}
  2971  		return nil, gensupport.WrapError(&googleapi.Error{
  2972  			Code:   res.StatusCode,
  2973  			Header: res.Header,
  2974  		})
  2975  	}
  2976  	if err != nil {
  2977  		return nil, err
  2978  	}
  2979  	defer googleapi.CloseBody(res)
  2980  	if err := googleapi.CheckResponse(res); err != nil {
  2981  		return nil, gensupport.WrapError(err)
  2982  	}
  2983  	ret := &Operation{
  2984  		ServerResponse: googleapi.ServerResponse{
  2985  			Header:         res.Header,
  2986  			HTTPStatusCode: res.StatusCode,
  2987  		},
  2988  	}
  2989  	target := &ret
  2990  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2991  		return nil, err
  2992  	}
  2993  	return ret, nil
  2994  }
  2995  
  2996  type ProjectsLocationsMigrationJobsDeleteCall struct {
  2997  	s          *Service
  2998  	name       string
  2999  	urlParams_ gensupport.URLParams
  3000  	ctx_       context.Context
  3001  	header_    http.Header
  3002  }
  3003  
  3004  // Delete: Deletes a single migration job.
  3005  //
  3006  // - name: Name of the migration job resource to delete.
  3007  func (r *ProjectsLocationsMigrationJobsService) Delete(name string) *ProjectsLocationsMigrationJobsDeleteCall {
  3008  	c := &ProjectsLocationsMigrationJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3009  	c.name = name
  3010  	return c
  3011  }
  3012  
  3013  // Force sets the optional parameter "force": The destination CloudSQL
  3014  // connection profile is always deleted with the migration job. In case of
  3015  // force delete, the destination CloudSQL replica database is also deleted.
  3016  func (c *ProjectsLocationsMigrationJobsDeleteCall) Force(force bool) *ProjectsLocationsMigrationJobsDeleteCall {
  3017  	c.urlParams_.Set("force", fmt.Sprint(force))
  3018  	return c
  3019  }
  3020  
  3021  // RequestId sets the optional parameter "requestId": A unique id used to
  3022  // identify the request. If the server receives two requests with the same id,
  3023  // then the second request will be ignored. It is recommended to always set
  3024  // this value to a UUID. The id must contain only letters (a-z, A-Z), numbers
  3025  // (0-9), underscores (_), and hyphens (-). The maximum length is 40
  3026  // characters.
  3027  func (c *ProjectsLocationsMigrationJobsDeleteCall) RequestId(requestId string) *ProjectsLocationsMigrationJobsDeleteCall {
  3028  	c.urlParams_.Set("requestId", requestId)
  3029  	return c
  3030  }
  3031  
  3032  // Fields allows partial responses to be retrieved. See
  3033  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3034  // details.
  3035  func (c *ProjectsLocationsMigrationJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsDeleteCall {
  3036  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3037  	return c
  3038  }
  3039  
  3040  // Context sets the context to be used in this call's Do method.
  3041  func (c *ProjectsLocationsMigrationJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsDeleteCall {
  3042  	c.ctx_ = ctx
  3043  	return c
  3044  }
  3045  
  3046  // Header returns a http.Header that can be modified by the caller to add
  3047  // headers to the request.
  3048  func (c *ProjectsLocationsMigrationJobsDeleteCall) Header() http.Header {
  3049  	if c.header_ == nil {
  3050  		c.header_ = make(http.Header)
  3051  	}
  3052  	return c.header_
  3053  }
  3054  
  3055  func (c *ProjectsLocationsMigrationJobsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3056  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3057  	var body io.Reader = nil
  3058  	c.urlParams_.Set("alt", alt)
  3059  	c.urlParams_.Set("prettyPrint", "false")
  3060  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3061  	urls += "?" + c.urlParams_.Encode()
  3062  	req, err := http.NewRequest("DELETE", urls, body)
  3063  	if err != nil {
  3064  		return nil, err
  3065  	}
  3066  	req.Header = reqHeaders
  3067  	googleapi.Expand(req.URL, map[string]string{
  3068  		"name": c.name,
  3069  	})
  3070  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3071  }
  3072  
  3073  // Do executes the "datamigration.projects.locations.migrationJobs.delete" call.
  3074  // Any non-2xx status code is an error. Response headers are in either
  3075  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3076  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3077  // whether the returned error was because http.StatusNotModified was returned.
  3078  func (c *ProjectsLocationsMigrationJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3079  	gensupport.SetOptions(c.urlParams_, opts...)
  3080  	res, err := c.doRequest("json")
  3081  	if res != nil && res.StatusCode == http.StatusNotModified {
  3082  		if res.Body != nil {
  3083  			res.Body.Close()
  3084  		}
  3085  		return nil, gensupport.WrapError(&googleapi.Error{
  3086  			Code:   res.StatusCode,
  3087  			Header: res.Header,
  3088  		})
  3089  	}
  3090  	if err != nil {
  3091  		return nil, err
  3092  	}
  3093  	defer googleapi.CloseBody(res)
  3094  	if err := googleapi.CheckResponse(res); err != nil {
  3095  		return nil, gensupport.WrapError(err)
  3096  	}
  3097  	ret := &Operation{
  3098  		ServerResponse: googleapi.ServerResponse{
  3099  			Header:         res.Header,
  3100  			HTTPStatusCode: res.StatusCode,
  3101  		},
  3102  	}
  3103  	target := &ret
  3104  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3105  		return nil, err
  3106  	}
  3107  	return ret, nil
  3108  }
  3109  
  3110  type ProjectsLocationsMigrationJobsGenerateSshScriptCall struct {
  3111  	s                        *Service
  3112  	migrationJob             string
  3113  	generatesshscriptrequest *GenerateSshScriptRequest
  3114  	urlParams_               gensupport.URLParams
  3115  	ctx_                     context.Context
  3116  	header_                  http.Header
  3117  }
  3118  
  3119  // GenerateSshScript: Generate a SSH configuration script to configure the
  3120  // reverse SSH connectivity.
  3121  //
  3122  //   - migrationJob: Name of the migration job resource to generate the SSH
  3123  //     script.
  3124  func (r *ProjectsLocationsMigrationJobsService) GenerateSshScript(migrationJob string, generatesshscriptrequest *GenerateSshScriptRequest) *ProjectsLocationsMigrationJobsGenerateSshScriptCall {
  3125  	c := &ProjectsLocationsMigrationJobsGenerateSshScriptCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3126  	c.migrationJob = migrationJob
  3127  	c.generatesshscriptrequest = generatesshscriptrequest
  3128  	return c
  3129  }
  3130  
  3131  // Fields allows partial responses to be retrieved. See
  3132  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3133  // details.
  3134  func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsGenerateSshScriptCall {
  3135  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3136  	return c
  3137  }
  3138  
  3139  // Context sets the context to be used in this call's Do method.
  3140  func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsGenerateSshScriptCall {
  3141  	c.ctx_ = ctx
  3142  	return c
  3143  }
  3144  
  3145  // Header returns a http.Header that can be modified by the caller to add
  3146  // headers to the request.
  3147  func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Header() http.Header {
  3148  	if c.header_ == nil {
  3149  		c.header_ = make(http.Header)
  3150  	}
  3151  	return c.header_
  3152  }
  3153  
  3154  func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) doRequest(alt string) (*http.Response, error) {
  3155  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3156  	var body io.Reader = nil
  3157  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.generatesshscriptrequest)
  3158  	if err != nil {
  3159  		return nil, err
  3160  	}
  3161  	c.urlParams_.Set("alt", alt)
  3162  	c.urlParams_.Set("prettyPrint", "false")
  3163  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+migrationJob}:generateSshScript")
  3164  	urls += "?" + c.urlParams_.Encode()
  3165  	req, err := http.NewRequest("POST", urls, body)
  3166  	if err != nil {
  3167  		return nil, err
  3168  	}
  3169  	req.Header = reqHeaders
  3170  	googleapi.Expand(req.URL, map[string]string{
  3171  		"migrationJob": c.migrationJob,
  3172  	})
  3173  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3174  }
  3175  
  3176  // Do executes the "datamigration.projects.locations.migrationJobs.generateSshScript" call.
  3177  // Any non-2xx status code is an error. Response headers are in either
  3178  // *SshScript.ServerResponse.Header or (if a response was returned at all) in
  3179  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3180  // whether the returned error was because http.StatusNotModified was returned.
  3181  func (c *ProjectsLocationsMigrationJobsGenerateSshScriptCall) Do(opts ...googleapi.CallOption) (*SshScript, error) {
  3182  	gensupport.SetOptions(c.urlParams_, opts...)
  3183  	res, err := c.doRequest("json")
  3184  	if res != nil && res.StatusCode == http.StatusNotModified {
  3185  		if res.Body != nil {
  3186  			res.Body.Close()
  3187  		}
  3188  		return nil, gensupport.WrapError(&googleapi.Error{
  3189  			Code:   res.StatusCode,
  3190  			Header: res.Header,
  3191  		})
  3192  	}
  3193  	if err != nil {
  3194  		return nil, err
  3195  	}
  3196  	defer googleapi.CloseBody(res)
  3197  	if err := googleapi.CheckResponse(res); err != nil {
  3198  		return nil, gensupport.WrapError(err)
  3199  	}
  3200  	ret := &SshScript{
  3201  		ServerResponse: googleapi.ServerResponse{
  3202  			Header:         res.Header,
  3203  			HTTPStatusCode: res.StatusCode,
  3204  		},
  3205  	}
  3206  	target := &ret
  3207  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3208  		return nil, err
  3209  	}
  3210  	return ret, nil
  3211  }
  3212  
  3213  type ProjectsLocationsMigrationJobsGetCall struct {
  3214  	s            *Service
  3215  	name         string
  3216  	urlParams_   gensupport.URLParams
  3217  	ifNoneMatch_ string
  3218  	ctx_         context.Context
  3219  	header_      http.Header
  3220  }
  3221  
  3222  // Get: Gets details of a single migration job.
  3223  //
  3224  // - name: Name of the migration job resource to get.
  3225  func (r *ProjectsLocationsMigrationJobsService) Get(name string) *ProjectsLocationsMigrationJobsGetCall {
  3226  	c := &ProjectsLocationsMigrationJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3227  	c.name = name
  3228  	return c
  3229  }
  3230  
  3231  // Fields allows partial responses to be retrieved. See
  3232  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3233  // details.
  3234  func (c *ProjectsLocationsMigrationJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsGetCall {
  3235  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3236  	return c
  3237  }
  3238  
  3239  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3240  // object's ETag matches the given value. This is useful for getting updates
  3241  // only after the object has changed since the last request.
  3242  func (c *ProjectsLocationsMigrationJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsGetCall {
  3243  	c.ifNoneMatch_ = entityTag
  3244  	return c
  3245  }
  3246  
  3247  // Context sets the context to be used in this call's Do method.
  3248  func (c *ProjectsLocationsMigrationJobsGetCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsGetCall {
  3249  	c.ctx_ = ctx
  3250  	return c
  3251  }
  3252  
  3253  // Header returns a http.Header that can be modified by the caller to add
  3254  // headers to the request.
  3255  func (c *ProjectsLocationsMigrationJobsGetCall) Header() http.Header {
  3256  	if c.header_ == nil {
  3257  		c.header_ = make(http.Header)
  3258  	}
  3259  	return c.header_
  3260  }
  3261  
  3262  func (c *ProjectsLocationsMigrationJobsGetCall) doRequest(alt string) (*http.Response, error) {
  3263  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3264  	if c.ifNoneMatch_ != "" {
  3265  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3266  	}
  3267  	var body io.Reader = nil
  3268  	c.urlParams_.Set("alt", alt)
  3269  	c.urlParams_.Set("prettyPrint", "false")
  3270  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3271  	urls += "?" + c.urlParams_.Encode()
  3272  	req, err := http.NewRequest("GET", urls, body)
  3273  	if err != nil {
  3274  		return nil, err
  3275  	}
  3276  	req.Header = reqHeaders
  3277  	googleapi.Expand(req.URL, map[string]string{
  3278  		"name": c.name,
  3279  	})
  3280  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3281  }
  3282  
  3283  // Do executes the "datamigration.projects.locations.migrationJobs.get" call.
  3284  // Any non-2xx status code is an error. Response headers are in either
  3285  // *MigrationJob.ServerResponse.Header or (if a response was returned at all)
  3286  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3287  // whether the returned error was because http.StatusNotModified was returned.
  3288  func (c *ProjectsLocationsMigrationJobsGetCall) Do(opts ...googleapi.CallOption) (*MigrationJob, error) {
  3289  	gensupport.SetOptions(c.urlParams_, opts...)
  3290  	res, err := c.doRequest("json")
  3291  	if res != nil && res.StatusCode == http.StatusNotModified {
  3292  		if res.Body != nil {
  3293  			res.Body.Close()
  3294  		}
  3295  		return nil, gensupport.WrapError(&googleapi.Error{
  3296  			Code:   res.StatusCode,
  3297  			Header: res.Header,
  3298  		})
  3299  	}
  3300  	if err != nil {
  3301  		return nil, err
  3302  	}
  3303  	defer googleapi.CloseBody(res)
  3304  	if err := googleapi.CheckResponse(res); err != nil {
  3305  		return nil, gensupport.WrapError(err)
  3306  	}
  3307  	ret := &MigrationJob{
  3308  		ServerResponse: googleapi.ServerResponse{
  3309  			Header:         res.Header,
  3310  			HTTPStatusCode: res.StatusCode,
  3311  		},
  3312  	}
  3313  	target := &ret
  3314  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3315  		return nil, err
  3316  	}
  3317  	return ret, nil
  3318  }
  3319  
  3320  type ProjectsLocationsMigrationJobsGetIamPolicyCall struct {
  3321  	s            *Service
  3322  	resource     string
  3323  	urlParams_   gensupport.URLParams
  3324  	ifNoneMatch_ string
  3325  	ctx_         context.Context
  3326  	header_      http.Header
  3327  }
  3328  
  3329  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  3330  // empty policy if the resource exists and does not have a policy set.
  3331  //
  3332  //   - resource: REQUIRED: The resource for which the policy is being requested.
  3333  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3334  //     for the appropriate value for this field.
  3335  func (r *ProjectsLocationsMigrationJobsService) GetIamPolicy(resource string) *ProjectsLocationsMigrationJobsGetIamPolicyCall {
  3336  	c := &ProjectsLocationsMigrationJobsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3337  	c.resource = resource
  3338  	return c
  3339  }
  3340  
  3341  // OptionsRequestedPolicyVersion sets the optional parameter
  3342  // "options.requestedPolicyVersion": The maximum policy version that will be
  3343  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  3344  // an invalid value will be rejected. Requests for policies with any
  3345  // conditional role bindings must specify version 3. Policies with no
  3346  // conditional role bindings may specify any valid value or leave the field
  3347  // unset. The policy in the response might use the policy version that you
  3348  // specified, or it might use a lower policy version. For example, if you
  3349  // specify version 3, but the policy has no conditional role bindings, the
  3350  // response uses version 1. To learn which resources support conditions in
  3351  // their IAM policies, see the IAM documentation
  3352  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  3353  func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMigrationJobsGetIamPolicyCall {
  3354  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  3355  	return c
  3356  }
  3357  
  3358  // Fields allows partial responses to be retrieved. See
  3359  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3360  // details.
  3361  func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsGetIamPolicyCall {
  3362  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3363  	return c
  3364  }
  3365  
  3366  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3367  // object's ETag matches the given value. This is useful for getting updates
  3368  // only after the object has changed since the last request.
  3369  func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsGetIamPolicyCall {
  3370  	c.ifNoneMatch_ = entityTag
  3371  	return c
  3372  }
  3373  
  3374  // Context sets the context to be used in this call's Do method.
  3375  func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsGetIamPolicyCall {
  3376  	c.ctx_ = ctx
  3377  	return c
  3378  }
  3379  
  3380  // Header returns a http.Header that can be modified by the caller to add
  3381  // headers to the request.
  3382  func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Header() http.Header {
  3383  	if c.header_ == nil {
  3384  		c.header_ = make(http.Header)
  3385  	}
  3386  	return c.header_
  3387  }
  3388  
  3389  func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3390  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3391  	if c.ifNoneMatch_ != "" {
  3392  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3393  	}
  3394  	var body io.Reader = nil
  3395  	c.urlParams_.Set("alt", alt)
  3396  	c.urlParams_.Set("prettyPrint", "false")
  3397  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
  3398  	urls += "?" + c.urlParams_.Encode()
  3399  	req, err := http.NewRequest("GET", urls, body)
  3400  	if err != nil {
  3401  		return nil, err
  3402  	}
  3403  	req.Header = reqHeaders
  3404  	googleapi.Expand(req.URL, map[string]string{
  3405  		"resource": c.resource,
  3406  	})
  3407  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3408  }
  3409  
  3410  // Do executes the "datamigration.projects.locations.migrationJobs.getIamPolicy" call.
  3411  // Any non-2xx status code is an error. Response headers are in either
  3412  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3413  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3414  // whether the returned error was because http.StatusNotModified was returned.
  3415  func (c *ProjectsLocationsMigrationJobsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3416  	gensupport.SetOptions(c.urlParams_, opts...)
  3417  	res, err := c.doRequest("json")
  3418  	if res != nil && res.StatusCode == http.StatusNotModified {
  3419  		if res.Body != nil {
  3420  			res.Body.Close()
  3421  		}
  3422  		return nil, gensupport.WrapError(&googleapi.Error{
  3423  			Code:   res.StatusCode,
  3424  			Header: res.Header,
  3425  		})
  3426  	}
  3427  	if err != nil {
  3428  		return nil, err
  3429  	}
  3430  	defer googleapi.CloseBody(res)
  3431  	if err := googleapi.CheckResponse(res); err != nil {
  3432  		return nil, gensupport.WrapError(err)
  3433  	}
  3434  	ret := &Policy{
  3435  		ServerResponse: googleapi.ServerResponse{
  3436  			Header:         res.Header,
  3437  			HTTPStatusCode: res.StatusCode,
  3438  		},
  3439  	}
  3440  	target := &ret
  3441  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3442  		return nil, err
  3443  	}
  3444  	return ret, nil
  3445  }
  3446  
  3447  type ProjectsLocationsMigrationJobsListCall struct {
  3448  	s            *Service
  3449  	parent       string
  3450  	urlParams_   gensupport.URLParams
  3451  	ifNoneMatch_ string
  3452  	ctx_         context.Context
  3453  	header_      http.Header
  3454  }
  3455  
  3456  // List: Lists migration jobs in a given project and location.
  3457  //
  3458  // - parent: The parent, which owns this collection of migrationJobs.
  3459  func (r *ProjectsLocationsMigrationJobsService) List(parent string) *ProjectsLocationsMigrationJobsListCall {
  3460  	c := &ProjectsLocationsMigrationJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3461  	c.parent = parent
  3462  	return c
  3463  }
  3464  
  3465  // Filter sets the optional parameter "filter": A filter expression that
  3466  // filters migration jobs listed in the response. The expression must specify
  3467  // the field name, a comparison operator, and the value that you want to use
  3468  // for filtering. The value must be a string, a number, or a boolean. The
  3469  // comparison operator must be either =, !=, >, or <. For example, list
  3470  // migration jobs created this year by specifying **createTime %gt;
  3471  // 2020-01-01T00:00:00.000000000Z.** You can also filter nested fields. For
  3472  // example, you could specify **reverseSshConnectivity.vmIp = "1.2.3.4"** to
  3473  // select all migration jobs connecting through the specific SSH tunnel
  3474  // bastion.
  3475  func (c *ProjectsLocationsMigrationJobsListCall) Filter(filter string) *ProjectsLocationsMigrationJobsListCall {
  3476  	c.urlParams_.Set("filter", filter)
  3477  	return c
  3478  }
  3479  
  3480  // OrderBy sets the optional parameter "orderBy": Sort the results based on the
  3481  // migration job name. Valid values are: "name", "name asc", and "name desc".
  3482  func (c *ProjectsLocationsMigrationJobsListCall) OrderBy(orderBy string) *ProjectsLocationsMigrationJobsListCall {
  3483  	c.urlParams_.Set("orderBy", orderBy)
  3484  	return c
  3485  }
  3486  
  3487  // PageSize sets the optional parameter "pageSize": The maximum number of
  3488  // migration jobs to return. The service may return fewer than this value. If
  3489  // unspecified, at most 50 migration jobs will be returned. The maximum value
  3490  // is 1000; values above 1000 will be coerced to 1000.
  3491  func (c *ProjectsLocationsMigrationJobsListCall) PageSize(pageSize int64) *ProjectsLocationsMigrationJobsListCall {
  3492  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3493  	return c
  3494  }
  3495  
  3496  // PageToken sets the optional parameter "pageToken": The nextPageToken value
  3497  // received in the previous call to migrationJobs.list, used in the subsequent
  3498  // request to retrieve the next page of results. On first call this should be
  3499  // left blank. When paginating, all other parameters provided to
  3500  // migrationJobs.list must match the call that provided the page token.
  3501  func (c *ProjectsLocationsMigrationJobsListCall) PageToken(pageToken string) *ProjectsLocationsMigrationJobsListCall {
  3502  	c.urlParams_.Set("pageToken", pageToken)
  3503  	return c
  3504  }
  3505  
  3506  // Fields allows partial responses to be retrieved. See
  3507  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3508  // details.
  3509  func (c *ProjectsLocationsMigrationJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsListCall {
  3510  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3511  	return c
  3512  }
  3513  
  3514  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3515  // object's ETag matches the given value. This is useful for getting updates
  3516  // only after the object has changed since the last request.
  3517  func (c *ProjectsLocationsMigrationJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsListCall {
  3518  	c.ifNoneMatch_ = entityTag
  3519  	return c
  3520  }
  3521  
  3522  // Context sets the context to be used in this call's Do method.
  3523  func (c *ProjectsLocationsMigrationJobsListCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsListCall {
  3524  	c.ctx_ = ctx
  3525  	return c
  3526  }
  3527  
  3528  // Header returns a http.Header that can be modified by the caller to add
  3529  // headers to the request.
  3530  func (c *ProjectsLocationsMigrationJobsListCall) Header() http.Header {
  3531  	if c.header_ == nil {
  3532  		c.header_ = make(http.Header)
  3533  	}
  3534  	return c.header_
  3535  }
  3536  
  3537  func (c *ProjectsLocationsMigrationJobsListCall) doRequest(alt string) (*http.Response, error) {
  3538  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3539  	if c.ifNoneMatch_ != "" {
  3540  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3541  	}
  3542  	var body io.Reader = nil
  3543  	c.urlParams_.Set("alt", alt)
  3544  	c.urlParams_.Set("prettyPrint", "false")
  3545  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/migrationJobs")
  3546  	urls += "?" + c.urlParams_.Encode()
  3547  	req, err := http.NewRequest("GET", urls, body)
  3548  	if err != nil {
  3549  		return nil, err
  3550  	}
  3551  	req.Header = reqHeaders
  3552  	googleapi.Expand(req.URL, map[string]string{
  3553  		"parent": c.parent,
  3554  	})
  3555  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3556  }
  3557  
  3558  // Do executes the "datamigration.projects.locations.migrationJobs.list" call.
  3559  // Any non-2xx status code is an error. Response headers are in either
  3560  // *ListMigrationJobsResponse.ServerResponse.Header or (if a response was
  3561  // returned at all) in error.(*googleapi.Error).Header. Use
  3562  // googleapi.IsNotModified to check whether the returned error was because
  3563  // http.StatusNotModified was returned.
  3564  func (c *ProjectsLocationsMigrationJobsListCall) Do(opts ...googleapi.CallOption) (*ListMigrationJobsResponse, error) {
  3565  	gensupport.SetOptions(c.urlParams_, opts...)
  3566  	res, err := c.doRequest("json")
  3567  	if res != nil && res.StatusCode == http.StatusNotModified {
  3568  		if res.Body != nil {
  3569  			res.Body.Close()
  3570  		}
  3571  		return nil, gensupport.WrapError(&googleapi.Error{
  3572  			Code:   res.StatusCode,
  3573  			Header: res.Header,
  3574  		})
  3575  	}
  3576  	if err != nil {
  3577  		return nil, err
  3578  	}
  3579  	defer googleapi.CloseBody(res)
  3580  	if err := googleapi.CheckResponse(res); err != nil {
  3581  		return nil, gensupport.WrapError(err)
  3582  	}
  3583  	ret := &ListMigrationJobsResponse{
  3584  		ServerResponse: googleapi.ServerResponse{
  3585  			Header:         res.Header,
  3586  			HTTPStatusCode: res.StatusCode,
  3587  		},
  3588  	}
  3589  	target := &ret
  3590  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3591  		return nil, err
  3592  	}
  3593  	return ret, nil
  3594  }
  3595  
  3596  // Pages invokes f for each page of results.
  3597  // A non-nil error returned from f will halt the iteration.
  3598  // The provided context supersedes any context provided to the Context method.
  3599  func (c *ProjectsLocationsMigrationJobsListCall) Pages(ctx context.Context, f func(*ListMigrationJobsResponse) error) error {
  3600  	c.ctx_ = ctx
  3601  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3602  	for {
  3603  		x, err := c.Do()
  3604  		if err != nil {
  3605  			return err
  3606  		}
  3607  		if err := f(x); err != nil {
  3608  			return err
  3609  		}
  3610  		if x.NextPageToken == "" {
  3611  			return nil
  3612  		}
  3613  		c.PageToken(x.NextPageToken)
  3614  	}
  3615  }
  3616  
  3617  type ProjectsLocationsMigrationJobsPatchCall struct {
  3618  	s            *Service
  3619  	name         string
  3620  	migrationjob *MigrationJob
  3621  	urlParams_   gensupport.URLParams
  3622  	ctx_         context.Context
  3623  	header_      http.Header
  3624  }
  3625  
  3626  // Patch: Updates the parameters of a single migration job.
  3627  //
  3628  //   - name: The name (URI) of this migration job resource, in the form of:
  3629  //     projects/{project}/locations/{location}/migrationJobs/{migrationJob}.
  3630  func (r *ProjectsLocationsMigrationJobsService) Patch(name string, migrationjob *MigrationJob) *ProjectsLocationsMigrationJobsPatchCall {
  3631  	c := &ProjectsLocationsMigrationJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3632  	c.name = name
  3633  	c.migrationjob = migrationjob
  3634  	return c
  3635  }
  3636  
  3637  // RequestId sets the optional parameter "requestId": A unique id used to
  3638  // identify the request. If the server receives two requests with the same id,
  3639  // then the second request will be ignored. It is recommended to always set
  3640  // this value to a UUID. The id must contain only letters (a-z, A-Z), numbers
  3641  // (0-9), underscores (_), and hyphens (-). The maximum length is 40
  3642  // characters.
  3643  func (c *ProjectsLocationsMigrationJobsPatchCall) RequestId(requestId string) *ProjectsLocationsMigrationJobsPatchCall {
  3644  	c.urlParams_.Set("requestId", requestId)
  3645  	return c
  3646  }
  3647  
  3648  // UpdateMask sets the optional parameter "updateMask": Required. Field mask is
  3649  // used to specify the fields to be overwritten in the migration job resource
  3650  // by the update.
  3651  func (c *ProjectsLocationsMigrationJobsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMigrationJobsPatchCall {
  3652  	c.urlParams_.Set("updateMask", updateMask)
  3653  	return c
  3654  }
  3655  
  3656  // Fields allows partial responses to be retrieved. See
  3657  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3658  // details.
  3659  func (c *ProjectsLocationsMigrationJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsPatchCall {
  3660  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3661  	return c
  3662  }
  3663  
  3664  // Context sets the context to be used in this call's Do method.
  3665  func (c *ProjectsLocationsMigrationJobsPatchCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsPatchCall {
  3666  	c.ctx_ = ctx
  3667  	return c
  3668  }
  3669  
  3670  // Header returns a http.Header that can be modified by the caller to add
  3671  // headers to the request.
  3672  func (c *ProjectsLocationsMigrationJobsPatchCall) Header() http.Header {
  3673  	if c.header_ == nil {
  3674  		c.header_ = make(http.Header)
  3675  	}
  3676  	return c.header_
  3677  }
  3678  
  3679  func (c *ProjectsLocationsMigrationJobsPatchCall) doRequest(alt string) (*http.Response, error) {
  3680  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3681  	var body io.Reader = nil
  3682  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.migrationjob)
  3683  	if err != nil {
  3684  		return nil, err
  3685  	}
  3686  	c.urlParams_.Set("alt", alt)
  3687  	c.urlParams_.Set("prettyPrint", "false")
  3688  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3689  	urls += "?" + c.urlParams_.Encode()
  3690  	req, err := http.NewRequest("PATCH", urls, body)
  3691  	if err != nil {
  3692  		return nil, err
  3693  	}
  3694  	req.Header = reqHeaders
  3695  	googleapi.Expand(req.URL, map[string]string{
  3696  		"name": c.name,
  3697  	})
  3698  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3699  }
  3700  
  3701  // Do executes the "datamigration.projects.locations.migrationJobs.patch" call.
  3702  // Any non-2xx status code is an error. Response headers are in either
  3703  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3704  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3705  // whether the returned error was because http.StatusNotModified was returned.
  3706  func (c *ProjectsLocationsMigrationJobsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3707  	gensupport.SetOptions(c.urlParams_, opts...)
  3708  	res, err := c.doRequest("json")
  3709  	if res != nil && res.StatusCode == http.StatusNotModified {
  3710  		if res.Body != nil {
  3711  			res.Body.Close()
  3712  		}
  3713  		return nil, gensupport.WrapError(&googleapi.Error{
  3714  			Code:   res.StatusCode,
  3715  			Header: res.Header,
  3716  		})
  3717  	}
  3718  	if err != nil {
  3719  		return nil, err
  3720  	}
  3721  	defer googleapi.CloseBody(res)
  3722  	if err := googleapi.CheckResponse(res); err != nil {
  3723  		return nil, gensupport.WrapError(err)
  3724  	}
  3725  	ret := &Operation{
  3726  		ServerResponse: googleapi.ServerResponse{
  3727  			Header:         res.Header,
  3728  			HTTPStatusCode: res.StatusCode,
  3729  		},
  3730  	}
  3731  	target := &ret
  3732  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3733  		return nil, err
  3734  	}
  3735  	return ret, nil
  3736  }
  3737  
  3738  type ProjectsLocationsMigrationJobsPromoteCall struct {
  3739  	s                          *Service
  3740  	name                       string
  3741  	promotemigrationjobrequest *PromoteMigrationJobRequest
  3742  	urlParams_                 gensupport.URLParams
  3743  	ctx_                       context.Context
  3744  	header_                    http.Header
  3745  }
  3746  
  3747  // Promote: Promote a migration job, stopping replication to the destination
  3748  // and promoting the destination to be a standalone database.
  3749  //
  3750  // - name: Name of the migration job resource to promote.
  3751  func (r *ProjectsLocationsMigrationJobsService) Promote(name string, promotemigrationjobrequest *PromoteMigrationJobRequest) *ProjectsLocationsMigrationJobsPromoteCall {
  3752  	c := &ProjectsLocationsMigrationJobsPromoteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3753  	c.name = name
  3754  	c.promotemigrationjobrequest = promotemigrationjobrequest
  3755  	return c
  3756  }
  3757  
  3758  // Fields allows partial responses to be retrieved. See
  3759  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3760  // details.
  3761  func (c *ProjectsLocationsMigrationJobsPromoteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsPromoteCall {
  3762  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3763  	return c
  3764  }
  3765  
  3766  // Context sets the context to be used in this call's Do method.
  3767  func (c *ProjectsLocationsMigrationJobsPromoteCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsPromoteCall {
  3768  	c.ctx_ = ctx
  3769  	return c
  3770  }
  3771  
  3772  // Header returns a http.Header that can be modified by the caller to add
  3773  // headers to the request.
  3774  func (c *ProjectsLocationsMigrationJobsPromoteCall) Header() http.Header {
  3775  	if c.header_ == nil {
  3776  		c.header_ = make(http.Header)
  3777  	}
  3778  	return c.header_
  3779  }
  3780  
  3781  func (c *ProjectsLocationsMigrationJobsPromoteCall) doRequest(alt string) (*http.Response, error) {
  3782  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3783  	var body io.Reader = nil
  3784  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.promotemigrationjobrequest)
  3785  	if err != nil {
  3786  		return nil, err
  3787  	}
  3788  	c.urlParams_.Set("alt", alt)
  3789  	c.urlParams_.Set("prettyPrint", "false")
  3790  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:promote")
  3791  	urls += "?" + c.urlParams_.Encode()
  3792  	req, err := http.NewRequest("POST", urls, body)
  3793  	if err != nil {
  3794  		return nil, err
  3795  	}
  3796  	req.Header = reqHeaders
  3797  	googleapi.Expand(req.URL, map[string]string{
  3798  		"name": c.name,
  3799  	})
  3800  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3801  }
  3802  
  3803  // Do executes the "datamigration.projects.locations.migrationJobs.promote" call.
  3804  // Any non-2xx status code is an error. Response headers are in either
  3805  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3806  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3807  // whether the returned error was because http.StatusNotModified was returned.
  3808  func (c *ProjectsLocationsMigrationJobsPromoteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3809  	gensupport.SetOptions(c.urlParams_, opts...)
  3810  	res, err := c.doRequest("json")
  3811  	if res != nil && res.StatusCode == http.StatusNotModified {
  3812  		if res.Body != nil {
  3813  			res.Body.Close()
  3814  		}
  3815  		return nil, gensupport.WrapError(&googleapi.Error{
  3816  			Code:   res.StatusCode,
  3817  			Header: res.Header,
  3818  		})
  3819  	}
  3820  	if err != nil {
  3821  		return nil, err
  3822  	}
  3823  	defer googleapi.CloseBody(res)
  3824  	if err := googleapi.CheckResponse(res); err != nil {
  3825  		return nil, gensupport.WrapError(err)
  3826  	}
  3827  	ret := &Operation{
  3828  		ServerResponse: googleapi.ServerResponse{
  3829  			Header:         res.Header,
  3830  			HTTPStatusCode: res.StatusCode,
  3831  		},
  3832  	}
  3833  	target := &ret
  3834  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3835  		return nil, err
  3836  	}
  3837  	return ret, nil
  3838  }
  3839  
  3840  type ProjectsLocationsMigrationJobsRestartCall struct {
  3841  	s                          *Service
  3842  	name                       string
  3843  	restartmigrationjobrequest *RestartMigrationJobRequest
  3844  	urlParams_                 gensupport.URLParams
  3845  	ctx_                       context.Context
  3846  	header_                    http.Header
  3847  }
  3848  
  3849  // Restart: Restart a stopped or failed migration job, resetting the
  3850  // destination instance to its original state and starting the migration
  3851  // process from scratch.
  3852  //
  3853  // - name: Name of the migration job resource to restart.
  3854  func (r *ProjectsLocationsMigrationJobsService) Restart(name string, restartmigrationjobrequest *RestartMigrationJobRequest) *ProjectsLocationsMigrationJobsRestartCall {
  3855  	c := &ProjectsLocationsMigrationJobsRestartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3856  	c.name = name
  3857  	c.restartmigrationjobrequest = restartmigrationjobrequest
  3858  	return c
  3859  }
  3860  
  3861  // Fields allows partial responses to be retrieved. See
  3862  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3863  // details.
  3864  func (c *ProjectsLocationsMigrationJobsRestartCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsRestartCall {
  3865  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3866  	return c
  3867  }
  3868  
  3869  // Context sets the context to be used in this call's Do method.
  3870  func (c *ProjectsLocationsMigrationJobsRestartCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsRestartCall {
  3871  	c.ctx_ = ctx
  3872  	return c
  3873  }
  3874  
  3875  // Header returns a http.Header that can be modified by the caller to add
  3876  // headers to the request.
  3877  func (c *ProjectsLocationsMigrationJobsRestartCall) Header() http.Header {
  3878  	if c.header_ == nil {
  3879  		c.header_ = make(http.Header)
  3880  	}
  3881  	return c.header_
  3882  }
  3883  
  3884  func (c *ProjectsLocationsMigrationJobsRestartCall) doRequest(alt string) (*http.Response, error) {
  3885  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3886  	var body io.Reader = nil
  3887  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.restartmigrationjobrequest)
  3888  	if err != nil {
  3889  		return nil, err
  3890  	}
  3891  	c.urlParams_.Set("alt", alt)
  3892  	c.urlParams_.Set("prettyPrint", "false")
  3893  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:restart")
  3894  	urls += "?" + c.urlParams_.Encode()
  3895  	req, err := http.NewRequest("POST", urls, body)
  3896  	if err != nil {
  3897  		return nil, err
  3898  	}
  3899  	req.Header = reqHeaders
  3900  	googleapi.Expand(req.URL, map[string]string{
  3901  		"name": c.name,
  3902  	})
  3903  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3904  }
  3905  
  3906  // Do executes the "datamigration.projects.locations.migrationJobs.restart" call.
  3907  // Any non-2xx status code is an error. Response headers are in either
  3908  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3909  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3910  // whether the returned error was because http.StatusNotModified was returned.
  3911  func (c *ProjectsLocationsMigrationJobsRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3912  	gensupport.SetOptions(c.urlParams_, opts...)
  3913  	res, err := c.doRequest("json")
  3914  	if res != nil && res.StatusCode == http.StatusNotModified {
  3915  		if res.Body != nil {
  3916  			res.Body.Close()
  3917  		}
  3918  		return nil, gensupport.WrapError(&googleapi.Error{
  3919  			Code:   res.StatusCode,
  3920  			Header: res.Header,
  3921  		})
  3922  	}
  3923  	if err != nil {
  3924  		return nil, err
  3925  	}
  3926  	defer googleapi.CloseBody(res)
  3927  	if err := googleapi.CheckResponse(res); err != nil {
  3928  		return nil, gensupport.WrapError(err)
  3929  	}
  3930  	ret := &Operation{
  3931  		ServerResponse: googleapi.ServerResponse{
  3932  			Header:         res.Header,
  3933  			HTTPStatusCode: res.StatusCode,
  3934  		},
  3935  	}
  3936  	target := &ret
  3937  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3938  		return nil, err
  3939  	}
  3940  	return ret, nil
  3941  }
  3942  
  3943  type ProjectsLocationsMigrationJobsResumeCall struct {
  3944  	s                         *Service
  3945  	name                      string
  3946  	resumemigrationjobrequest *ResumeMigrationJobRequest
  3947  	urlParams_                gensupport.URLParams
  3948  	ctx_                      context.Context
  3949  	header_                   http.Header
  3950  }
  3951  
  3952  // Resume: Resume a migration job that is currently stopped and is resumable
  3953  // (was stopped during CDC phase).
  3954  //
  3955  // - name: Name of the migration job resource to resume.
  3956  func (r *ProjectsLocationsMigrationJobsService) Resume(name string, resumemigrationjobrequest *ResumeMigrationJobRequest) *ProjectsLocationsMigrationJobsResumeCall {
  3957  	c := &ProjectsLocationsMigrationJobsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3958  	c.name = name
  3959  	c.resumemigrationjobrequest = resumemigrationjobrequest
  3960  	return c
  3961  }
  3962  
  3963  // Fields allows partial responses to be retrieved. See
  3964  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3965  // details.
  3966  func (c *ProjectsLocationsMigrationJobsResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsResumeCall {
  3967  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3968  	return c
  3969  }
  3970  
  3971  // Context sets the context to be used in this call's Do method.
  3972  func (c *ProjectsLocationsMigrationJobsResumeCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsResumeCall {
  3973  	c.ctx_ = ctx
  3974  	return c
  3975  }
  3976  
  3977  // Header returns a http.Header that can be modified by the caller to add
  3978  // headers to the request.
  3979  func (c *ProjectsLocationsMigrationJobsResumeCall) Header() http.Header {
  3980  	if c.header_ == nil {
  3981  		c.header_ = make(http.Header)
  3982  	}
  3983  	return c.header_
  3984  }
  3985  
  3986  func (c *ProjectsLocationsMigrationJobsResumeCall) doRequest(alt string) (*http.Response, error) {
  3987  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3988  	var body io.Reader = nil
  3989  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumemigrationjobrequest)
  3990  	if err != nil {
  3991  		return nil, err
  3992  	}
  3993  	c.urlParams_.Set("alt", alt)
  3994  	c.urlParams_.Set("prettyPrint", "false")
  3995  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:resume")
  3996  	urls += "?" + c.urlParams_.Encode()
  3997  	req, err := http.NewRequest("POST", urls, body)
  3998  	if err != nil {
  3999  		return nil, err
  4000  	}
  4001  	req.Header = reqHeaders
  4002  	googleapi.Expand(req.URL, map[string]string{
  4003  		"name": c.name,
  4004  	})
  4005  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4006  }
  4007  
  4008  // Do executes the "datamigration.projects.locations.migrationJobs.resume" call.
  4009  // Any non-2xx status code is an error. Response headers are in either
  4010  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4011  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4012  // whether the returned error was because http.StatusNotModified was returned.
  4013  func (c *ProjectsLocationsMigrationJobsResumeCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4014  	gensupport.SetOptions(c.urlParams_, opts...)
  4015  	res, err := c.doRequest("json")
  4016  	if res != nil && res.StatusCode == http.StatusNotModified {
  4017  		if res.Body != nil {
  4018  			res.Body.Close()
  4019  		}
  4020  		return nil, gensupport.WrapError(&googleapi.Error{
  4021  			Code:   res.StatusCode,
  4022  			Header: res.Header,
  4023  		})
  4024  	}
  4025  	if err != nil {
  4026  		return nil, err
  4027  	}
  4028  	defer googleapi.CloseBody(res)
  4029  	if err := googleapi.CheckResponse(res); err != nil {
  4030  		return nil, gensupport.WrapError(err)
  4031  	}
  4032  	ret := &Operation{
  4033  		ServerResponse: googleapi.ServerResponse{
  4034  			Header:         res.Header,
  4035  			HTTPStatusCode: res.StatusCode,
  4036  		},
  4037  	}
  4038  	target := &ret
  4039  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4040  		return nil, err
  4041  	}
  4042  	return ret, nil
  4043  }
  4044  
  4045  type ProjectsLocationsMigrationJobsSetIamPolicyCall struct {
  4046  	s                   *Service
  4047  	resource            string
  4048  	setiampolicyrequest *SetIamPolicyRequest
  4049  	urlParams_          gensupport.URLParams
  4050  	ctx_                context.Context
  4051  	header_             http.Header
  4052  }
  4053  
  4054  // SetIamPolicy: Sets the access control policy on the specified resource.
  4055  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4056  // and `PERMISSION_DENIED` errors.
  4057  //
  4058  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4059  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4060  //     for the appropriate value for this field.
  4061  func (r *ProjectsLocationsMigrationJobsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMigrationJobsSetIamPolicyCall {
  4062  	c := &ProjectsLocationsMigrationJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4063  	c.resource = resource
  4064  	c.setiampolicyrequest = setiampolicyrequest
  4065  	return c
  4066  }
  4067  
  4068  // Fields allows partial responses to be retrieved. See
  4069  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4070  // details.
  4071  func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsSetIamPolicyCall {
  4072  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4073  	return c
  4074  }
  4075  
  4076  // Context sets the context to be used in this call's Do method.
  4077  func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsSetIamPolicyCall {
  4078  	c.ctx_ = ctx
  4079  	return c
  4080  }
  4081  
  4082  // Header returns a http.Header that can be modified by the caller to add
  4083  // headers to the request.
  4084  func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Header() http.Header {
  4085  	if c.header_ == nil {
  4086  		c.header_ = make(http.Header)
  4087  	}
  4088  	return c.header_
  4089  }
  4090  
  4091  func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4092  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4093  	var body io.Reader = nil
  4094  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4095  	if err != nil {
  4096  		return nil, err
  4097  	}
  4098  	c.urlParams_.Set("alt", alt)
  4099  	c.urlParams_.Set("prettyPrint", "false")
  4100  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
  4101  	urls += "?" + c.urlParams_.Encode()
  4102  	req, err := http.NewRequest("POST", urls, body)
  4103  	if err != nil {
  4104  		return nil, err
  4105  	}
  4106  	req.Header = reqHeaders
  4107  	googleapi.Expand(req.URL, map[string]string{
  4108  		"resource": c.resource,
  4109  	})
  4110  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4111  }
  4112  
  4113  // Do executes the "datamigration.projects.locations.migrationJobs.setIamPolicy" call.
  4114  // Any non-2xx status code is an error. Response headers are in either
  4115  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4116  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4117  // whether the returned error was because http.StatusNotModified was returned.
  4118  func (c *ProjectsLocationsMigrationJobsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4119  	gensupport.SetOptions(c.urlParams_, opts...)
  4120  	res, err := c.doRequest("json")
  4121  	if res != nil && res.StatusCode == http.StatusNotModified {
  4122  		if res.Body != nil {
  4123  			res.Body.Close()
  4124  		}
  4125  		return nil, gensupport.WrapError(&googleapi.Error{
  4126  			Code:   res.StatusCode,
  4127  			Header: res.Header,
  4128  		})
  4129  	}
  4130  	if err != nil {
  4131  		return nil, err
  4132  	}
  4133  	defer googleapi.CloseBody(res)
  4134  	if err := googleapi.CheckResponse(res); err != nil {
  4135  		return nil, gensupport.WrapError(err)
  4136  	}
  4137  	ret := &Policy{
  4138  		ServerResponse: googleapi.ServerResponse{
  4139  			Header:         res.Header,
  4140  			HTTPStatusCode: res.StatusCode,
  4141  		},
  4142  	}
  4143  	target := &ret
  4144  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4145  		return nil, err
  4146  	}
  4147  	return ret, nil
  4148  }
  4149  
  4150  type ProjectsLocationsMigrationJobsStartCall struct {
  4151  	s                        *Service
  4152  	name                     string
  4153  	startmigrationjobrequest *StartMigrationJobRequest
  4154  	urlParams_               gensupport.URLParams
  4155  	ctx_                     context.Context
  4156  	header_                  http.Header
  4157  }
  4158  
  4159  // Start: Start an already created migration job.
  4160  //
  4161  // - name: Name of the migration job resource to start.
  4162  func (r *ProjectsLocationsMigrationJobsService) Start(name string, startmigrationjobrequest *StartMigrationJobRequest) *ProjectsLocationsMigrationJobsStartCall {
  4163  	c := &ProjectsLocationsMigrationJobsStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4164  	c.name = name
  4165  	c.startmigrationjobrequest = startmigrationjobrequest
  4166  	return c
  4167  }
  4168  
  4169  // Fields allows partial responses to be retrieved. See
  4170  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4171  // details.
  4172  func (c *ProjectsLocationsMigrationJobsStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsStartCall {
  4173  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4174  	return c
  4175  }
  4176  
  4177  // Context sets the context to be used in this call's Do method.
  4178  func (c *ProjectsLocationsMigrationJobsStartCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsStartCall {
  4179  	c.ctx_ = ctx
  4180  	return c
  4181  }
  4182  
  4183  // Header returns a http.Header that can be modified by the caller to add
  4184  // headers to the request.
  4185  func (c *ProjectsLocationsMigrationJobsStartCall) Header() http.Header {
  4186  	if c.header_ == nil {
  4187  		c.header_ = make(http.Header)
  4188  	}
  4189  	return c.header_
  4190  }
  4191  
  4192  func (c *ProjectsLocationsMigrationJobsStartCall) doRequest(alt string) (*http.Response, error) {
  4193  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4194  	var body io.Reader = nil
  4195  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.startmigrationjobrequest)
  4196  	if err != nil {
  4197  		return nil, err
  4198  	}
  4199  	c.urlParams_.Set("alt", alt)
  4200  	c.urlParams_.Set("prettyPrint", "false")
  4201  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:start")
  4202  	urls += "?" + c.urlParams_.Encode()
  4203  	req, err := http.NewRequest("POST", urls, body)
  4204  	if err != nil {
  4205  		return nil, err
  4206  	}
  4207  	req.Header = reqHeaders
  4208  	googleapi.Expand(req.URL, map[string]string{
  4209  		"name": c.name,
  4210  	})
  4211  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4212  }
  4213  
  4214  // Do executes the "datamigration.projects.locations.migrationJobs.start" call.
  4215  // Any non-2xx status code is an error. Response headers are in either
  4216  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4217  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4218  // whether the returned error was because http.StatusNotModified was returned.
  4219  func (c *ProjectsLocationsMigrationJobsStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4220  	gensupport.SetOptions(c.urlParams_, opts...)
  4221  	res, err := c.doRequest("json")
  4222  	if res != nil && res.StatusCode == http.StatusNotModified {
  4223  		if res.Body != nil {
  4224  			res.Body.Close()
  4225  		}
  4226  		return nil, gensupport.WrapError(&googleapi.Error{
  4227  			Code:   res.StatusCode,
  4228  			Header: res.Header,
  4229  		})
  4230  	}
  4231  	if err != nil {
  4232  		return nil, err
  4233  	}
  4234  	defer googleapi.CloseBody(res)
  4235  	if err := googleapi.CheckResponse(res); err != nil {
  4236  		return nil, gensupport.WrapError(err)
  4237  	}
  4238  	ret := &Operation{
  4239  		ServerResponse: googleapi.ServerResponse{
  4240  			Header:         res.Header,
  4241  			HTTPStatusCode: res.StatusCode,
  4242  		},
  4243  	}
  4244  	target := &ret
  4245  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4246  		return nil, err
  4247  	}
  4248  	return ret, nil
  4249  }
  4250  
  4251  type ProjectsLocationsMigrationJobsStopCall struct {
  4252  	s                       *Service
  4253  	name                    string
  4254  	stopmigrationjobrequest *StopMigrationJobRequest
  4255  	urlParams_              gensupport.URLParams
  4256  	ctx_                    context.Context
  4257  	header_                 http.Header
  4258  }
  4259  
  4260  // Stop: Stops a running migration job.
  4261  //
  4262  // - name: Name of the migration job resource to stop.
  4263  func (r *ProjectsLocationsMigrationJobsService) Stop(name string, stopmigrationjobrequest *StopMigrationJobRequest) *ProjectsLocationsMigrationJobsStopCall {
  4264  	c := &ProjectsLocationsMigrationJobsStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4265  	c.name = name
  4266  	c.stopmigrationjobrequest = stopmigrationjobrequest
  4267  	return c
  4268  }
  4269  
  4270  // Fields allows partial responses to be retrieved. See
  4271  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4272  // details.
  4273  func (c *ProjectsLocationsMigrationJobsStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsStopCall {
  4274  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4275  	return c
  4276  }
  4277  
  4278  // Context sets the context to be used in this call's Do method.
  4279  func (c *ProjectsLocationsMigrationJobsStopCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsStopCall {
  4280  	c.ctx_ = ctx
  4281  	return c
  4282  }
  4283  
  4284  // Header returns a http.Header that can be modified by the caller to add
  4285  // headers to the request.
  4286  func (c *ProjectsLocationsMigrationJobsStopCall) Header() http.Header {
  4287  	if c.header_ == nil {
  4288  		c.header_ = make(http.Header)
  4289  	}
  4290  	return c.header_
  4291  }
  4292  
  4293  func (c *ProjectsLocationsMigrationJobsStopCall) doRequest(alt string) (*http.Response, error) {
  4294  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4295  	var body io.Reader = nil
  4296  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopmigrationjobrequest)
  4297  	if err != nil {
  4298  		return nil, err
  4299  	}
  4300  	c.urlParams_.Set("alt", alt)
  4301  	c.urlParams_.Set("prettyPrint", "false")
  4302  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:stop")
  4303  	urls += "?" + c.urlParams_.Encode()
  4304  	req, err := http.NewRequest("POST", urls, body)
  4305  	if err != nil {
  4306  		return nil, err
  4307  	}
  4308  	req.Header = reqHeaders
  4309  	googleapi.Expand(req.URL, map[string]string{
  4310  		"name": c.name,
  4311  	})
  4312  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4313  }
  4314  
  4315  // Do executes the "datamigration.projects.locations.migrationJobs.stop" call.
  4316  // Any non-2xx status code is an error. Response headers are in either
  4317  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4318  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4319  // whether the returned error was because http.StatusNotModified was returned.
  4320  func (c *ProjectsLocationsMigrationJobsStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4321  	gensupport.SetOptions(c.urlParams_, opts...)
  4322  	res, err := c.doRequest("json")
  4323  	if res != nil && res.StatusCode == http.StatusNotModified {
  4324  		if res.Body != nil {
  4325  			res.Body.Close()
  4326  		}
  4327  		return nil, gensupport.WrapError(&googleapi.Error{
  4328  			Code:   res.StatusCode,
  4329  			Header: res.Header,
  4330  		})
  4331  	}
  4332  	if err != nil {
  4333  		return nil, err
  4334  	}
  4335  	defer googleapi.CloseBody(res)
  4336  	if err := googleapi.CheckResponse(res); err != nil {
  4337  		return nil, gensupport.WrapError(err)
  4338  	}
  4339  	ret := &Operation{
  4340  		ServerResponse: googleapi.ServerResponse{
  4341  			Header:         res.Header,
  4342  			HTTPStatusCode: res.StatusCode,
  4343  		},
  4344  	}
  4345  	target := &ret
  4346  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4347  		return nil, err
  4348  	}
  4349  	return ret, nil
  4350  }
  4351  
  4352  type ProjectsLocationsMigrationJobsTestIamPermissionsCall struct {
  4353  	s                         *Service
  4354  	resource                  string
  4355  	testiampermissionsrequest *TestIamPermissionsRequest
  4356  	urlParams_                gensupport.URLParams
  4357  	ctx_                      context.Context
  4358  	header_                   http.Header
  4359  }
  4360  
  4361  // TestIamPermissions: Returns permissions that a caller has on the specified
  4362  // resource. If the resource does not exist, this will return an empty set of
  4363  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  4364  // used for building permission-aware UIs and command-line tools, not for
  4365  // authorization checking. This operation may "fail open" without warning.
  4366  //
  4367  //   - resource: REQUIRED: The resource for which the policy detail is being
  4368  //     requested. See Resource names
  4369  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4370  //     value for this field.
  4371  func (r *ProjectsLocationsMigrationJobsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMigrationJobsTestIamPermissionsCall {
  4372  	c := &ProjectsLocationsMigrationJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4373  	c.resource = resource
  4374  	c.testiampermissionsrequest = testiampermissionsrequest
  4375  	return c
  4376  }
  4377  
  4378  // Fields allows partial responses to be retrieved. See
  4379  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4380  // details.
  4381  func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsTestIamPermissionsCall {
  4382  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4383  	return c
  4384  }
  4385  
  4386  // Context sets the context to be used in this call's Do method.
  4387  func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsTestIamPermissionsCall {
  4388  	c.ctx_ = ctx
  4389  	return c
  4390  }
  4391  
  4392  // Header returns a http.Header that can be modified by the caller to add
  4393  // headers to the request.
  4394  func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Header() http.Header {
  4395  	if c.header_ == nil {
  4396  		c.header_ = make(http.Header)
  4397  	}
  4398  	return c.header_
  4399  }
  4400  
  4401  func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4402  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4403  	var body io.Reader = nil
  4404  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4405  	if err != nil {
  4406  		return nil, err
  4407  	}
  4408  	c.urlParams_.Set("alt", alt)
  4409  	c.urlParams_.Set("prettyPrint", "false")
  4410  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
  4411  	urls += "?" + c.urlParams_.Encode()
  4412  	req, err := http.NewRequest("POST", urls, body)
  4413  	if err != nil {
  4414  		return nil, err
  4415  	}
  4416  	req.Header = reqHeaders
  4417  	googleapi.Expand(req.URL, map[string]string{
  4418  		"resource": c.resource,
  4419  	})
  4420  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4421  }
  4422  
  4423  // Do executes the "datamigration.projects.locations.migrationJobs.testIamPermissions" call.
  4424  // Any non-2xx status code is an error. Response headers are in either
  4425  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  4426  // returned at all) in error.(*googleapi.Error).Header. Use
  4427  // googleapi.IsNotModified to check whether the returned error was because
  4428  // http.StatusNotModified was returned.
  4429  func (c *ProjectsLocationsMigrationJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4430  	gensupport.SetOptions(c.urlParams_, opts...)
  4431  	res, err := c.doRequest("json")
  4432  	if res != nil && res.StatusCode == http.StatusNotModified {
  4433  		if res.Body != nil {
  4434  			res.Body.Close()
  4435  		}
  4436  		return nil, gensupport.WrapError(&googleapi.Error{
  4437  			Code:   res.StatusCode,
  4438  			Header: res.Header,
  4439  		})
  4440  	}
  4441  	if err != nil {
  4442  		return nil, err
  4443  	}
  4444  	defer googleapi.CloseBody(res)
  4445  	if err := googleapi.CheckResponse(res); err != nil {
  4446  		return nil, gensupport.WrapError(err)
  4447  	}
  4448  	ret := &TestIamPermissionsResponse{
  4449  		ServerResponse: googleapi.ServerResponse{
  4450  			Header:         res.Header,
  4451  			HTTPStatusCode: res.StatusCode,
  4452  		},
  4453  	}
  4454  	target := &ret
  4455  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4456  		return nil, err
  4457  	}
  4458  	return ret, nil
  4459  }
  4460  
  4461  type ProjectsLocationsMigrationJobsVerifyCall struct {
  4462  	s                         *Service
  4463  	name                      string
  4464  	verifymigrationjobrequest *VerifyMigrationJobRequest
  4465  	urlParams_                gensupport.URLParams
  4466  	ctx_                      context.Context
  4467  	header_                   http.Header
  4468  }
  4469  
  4470  // Verify: Verify a migration job, making sure the destination can reach the
  4471  // source and that all configuration and prerequisites are met.
  4472  //
  4473  // - name: Name of the migration job resource to verify.
  4474  func (r *ProjectsLocationsMigrationJobsService) Verify(name string, verifymigrationjobrequest *VerifyMigrationJobRequest) *ProjectsLocationsMigrationJobsVerifyCall {
  4475  	c := &ProjectsLocationsMigrationJobsVerifyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4476  	c.name = name
  4477  	c.verifymigrationjobrequest = verifymigrationjobrequest
  4478  	return c
  4479  }
  4480  
  4481  // Fields allows partial responses to be retrieved. See
  4482  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4483  // details.
  4484  func (c *ProjectsLocationsMigrationJobsVerifyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsVerifyCall {
  4485  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4486  	return c
  4487  }
  4488  
  4489  // Context sets the context to be used in this call's Do method.
  4490  func (c *ProjectsLocationsMigrationJobsVerifyCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsVerifyCall {
  4491  	c.ctx_ = ctx
  4492  	return c
  4493  }
  4494  
  4495  // Header returns a http.Header that can be modified by the caller to add
  4496  // headers to the request.
  4497  func (c *ProjectsLocationsMigrationJobsVerifyCall) Header() http.Header {
  4498  	if c.header_ == nil {
  4499  		c.header_ = make(http.Header)
  4500  	}
  4501  	return c.header_
  4502  }
  4503  
  4504  func (c *ProjectsLocationsMigrationJobsVerifyCall) doRequest(alt string) (*http.Response, error) {
  4505  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4506  	var body io.Reader = nil
  4507  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.verifymigrationjobrequest)
  4508  	if err != nil {
  4509  		return nil, err
  4510  	}
  4511  	c.urlParams_.Set("alt", alt)
  4512  	c.urlParams_.Set("prettyPrint", "false")
  4513  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:verify")
  4514  	urls += "?" + c.urlParams_.Encode()
  4515  	req, err := http.NewRequest("POST", urls, body)
  4516  	if err != nil {
  4517  		return nil, err
  4518  	}
  4519  	req.Header = reqHeaders
  4520  	googleapi.Expand(req.URL, map[string]string{
  4521  		"name": c.name,
  4522  	})
  4523  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4524  }
  4525  
  4526  // Do executes the "datamigration.projects.locations.migrationJobs.verify" call.
  4527  // Any non-2xx status code is an error. Response headers are in either
  4528  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4529  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4530  // whether the returned error was because http.StatusNotModified was returned.
  4531  func (c *ProjectsLocationsMigrationJobsVerifyCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4532  	gensupport.SetOptions(c.urlParams_, opts...)
  4533  	res, err := c.doRequest("json")
  4534  	if res != nil && res.StatusCode == http.StatusNotModified {
  4535  		if res.Body != nil {
  4536  			res.Body.Close()
  4537  		}
  4538  		return nil, gensupport.WrapError(&googleapi.Error{
  4539  			Code:   res.StatusCode,
  4540  			Header: res.Header,
  4541  		})
  4542  	}
  4543  	if err != nil {
  4544  		return nil, err
  4545  	}
  4546  	defer googleapi.CloseBody(res)
  4547  	if err := googleapi.CheckResponse(res); err != nil {
  4548  		return nil, gensupport.WrapError(err)
  4549  	}
  4550  	ret := &Operation{
  4551  		ServerResponse: googleapi.ServerResponse{
  4552  			Header:         res.Header,
  4553  			HTTPStatusCode: res.StatusCode,
  4554  		},
  4555  	}
  4556  	target := &ret
  4557  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4558  		return nil, err
  4559  	}
  4560  	return ret, nil
  4561  }
  4562  
  4563  type ProjectsLocationsOperationsCancelCall struct {
  4564  	s                      *Service
  4565  	name                   string
  4566  	canceloperationrequest *CancelOperationRequest
  4567  	urlParams_             gensupport.URLParams
  4568  	ctx_                   context.Context
  4569  	header_                http.Header
  4570  }
  4571  
  4572  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  4573  // server makes a best effort to cancel the operation, but success is not
  4574  // guaranteed. If the server doesn't support this method, it returns
  4575  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  4576  // other methods to check whether the cancellation succeeded or whether the
  4577  // operation completed despite cancellation. On successful cancellation, the
  4578  // operation is not deleted; instead, it becomes an operation with an
  4579  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  4580  // `Code.CANCELLED`.
  4581  //
  4582  // - name: The name of the operation resource to be cancelled.
  4583  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  4584  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4585  	c.name = name
  4586  	c.canceloperationrequest = canceloperationrequest
  4587  	return c
  4588  }
  4589  
  4590  // Fields allows partial responses to be retrieved. See
  4591  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4592  // details.
  4593  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  4594  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4595  	return c
  4596  }
  4597  
  4598  // Context sets the context to be used in this call's Do method.
  4599  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  4600  	c.ctx_ = ctx
  4601  	return c
  4602  }
  4603  
  4604  // Header returns a http.Header that can be modified by the caller to add
  4605  // headers to the request.
  4606  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  4607  	if c.header_ == nil {
  4608  		c.header_ = make(http.Header)
  4609  	}
  4610  	return c.header_
  4611  }
  4612  
  4613  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  4614  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4615  	var body io.Reader = nil
  4616  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  4617  	if err != nil {
  4618  		return nil, err
  4619  	}
  4620  	c.urlParams_.Set("alt", alt)
  4621  	c.urlParams_.Set("prettyPrint", "false")
  4622  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel")
  4623  	urls += "?" + c.urlParams_.Encode()
  4624  	req, err := http.NewRequest("POST", urls, body)
  4625  	if err != nil {
  4626  		return nil, err
  4627  	}
  4628  	req.Header = reqHeaders
  4629  	googleapi.Expand(req.URL, map[string]string{
  4630  		"name": c.name,
  4631  	})
  4632  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4633  }
  4634  
  4635  // Do executes the "datamigration.projects.locations.operations.cancel" call.
  4636  // Any non-2xx status code is an error. Response headers are in either
  4637  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4638  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4639  // whether the returned error was because http.StatusNotModified was returned.
  4640  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4641  	gensupport.SetOptions(c.urlParams_, opts...)
  4642  	res, err := c.doRequest("json")
  4643  	if res != nil && res.StatusCode == http.StatusNotModified {
  4644  		if res.Body != nil {
  4645  			res.Body.Close()
  4646  		}
  4647  		return nil, gensupport.WrapError(&googleapi.Error{
  4648  			Code:   res.StatusCode,
  4649  			Header: res.Header,
  4650  		})
  4651  	}
  4652  	if err != nil {
  4653  		return nil, err
  4654  	}
  4655  	defer googleapi.CloseBody(res)
  4656  	if err := googleapi.CheckResponse(res); err != nil {
  4657  		return nil, gensupport.WrapError(err)
  4658  	}
  4659  	ret := &Empty{
  4660  		ServerResponse: googleapi.ServerResponse{
  4661  			Header:         res.Header,
  4662  			HTTPStatusCode: res.StatusCode,
  4663  		},
  4664  	}
  4665  	target := &ret
  4666  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4667  		return nil, err
  4668  	}
  4669  	return ret, nil
  4670  }
  4671  
  4672  type ProjectsLocationsOperationsDeleteCall struct {
  4673  	s          *Service
  4674  	name       string
  4675  	urlParams_ gensupport.URLParams
  4676  	ctx_       context.Context
  4677  	header_    http.Header
  4678  }
  4679  
  4680  // Delete: Deletes a long-running operation. This method indicates that the
  4681  // client is no longer interested in the operation result. It does not cancel
  4682  // the operation. If the server doesn't support this method, it returns
  4683  // `google.rpc.Code.UNIMPLEMENTED`.
  4684  //
  4685  // - name: The name of the operation resource to be deleted.
  4686  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  4687  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4688  	c.name = name
  4689  	return c
  4690  }
  4691  
  4692  // Fields allows partial responses to be retrieved. See
  4693  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4694  // details.
  4695  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  4696  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4697  	return c
  4698  }
  4699  
  4700  // Context sets the context to be used in this call's Do method.
  4701  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  4702  	c.ctx_ = ctx
  4703  	return c
  4704  }
  4705  
  4706  // Header returns a http.Header that can be modified by the caller to add
  4707  // headers to the request.
  4708  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  4709  	if c.header_ == nil {
  4710  		c.header_ = make(http.Header)
  4711  	}
  4712  	return c.header_
  4713  }
  4714  
  4715  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4716  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4717  	var body io.Reader = nil
  4718  	c.urlParams_.Set("alt", alt)
  4719  	c.urlParams_.Set("prettyPrint", "false")
  4720  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4721  	urls += "?" + c.urlParams_.Encode()
  4722  	req, err := http.NewRequest("DELETE", urls, body)
  4723  	if err != nil {
  4724  		return nil, err
  4725  	}
  4726  	req.Header = reqHeaders
  4727  	googleapi.Expand(req.URL, map[string]string{
  4728  		"name": c.name,
  4729  	})
  4730  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4731  }
  4732  
  4733  // Do executes the "datamigration.projects.locations.operations.delete" call.
  4734  // Any non-2xx status code is an error. Response headers are in either
  4735  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4736  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4737  // whether the returned error was because http.StatusNotModified was returned.
  4738  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4739  	gensupport.SetOptions(c.urlParams_, opts...)
  4740  	res, err := c.doRequest("json")
  4741  	if res != nil && res.StatusCode == http.StatusNotModified {
  4742  		if res.Body != nil {
  4743  			res.Body.Close()
  4744  		}
  4745  		return nil, gensupport.WrapError(&googleapi.Error{
  4746  			Code:   res.StatusCode,
  4747  			Header: res.Header,
  4748  		})
  4749  	}
  4750  	if err != nil {
  4751  		return nil, err
  4752  	}
  4753  	defer googleapi.CloseBody(res)
  4754  	if err := googleapi.CheckResponse(res); err != nil {
  4755  		return nil, gensupport.WrapError(err)
  4756  	}
  4757  	ret := &Empty{
  4758  		ServerResponse: googleapi.ServerResponse{
  4759  			Header:         res.Header,
  4760  			HTTPStatusCode: res.StatusCode,
  4761  		},
  4762  	}
  4763  	target := &ret
  4764  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4765  		return nil, err
  4766  	}
  4767  	return ret, nil
  4768  }
  4769  
  4770  type ProjectsLocationsOperationsGetCall struct {
  4771  	s            *Service
  4772  	name         string
  4773  	urlParams_   gensupport.URLParams
  4774  	ifNoneMatch_ string
  4775  	ctx_         context.Context
  4776  	header_      http.Header
  4777  }
  4778  
  4779  // Get: Gets the latest state of a long-running operation. Clients can use this
  4780  // method to poll the operation result at intervals as recommended by the API
  4781  // service.
  4782  //
  4783  // - name: The name of the operation resource.
  4784  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  4785  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4786  	c.name = name
  4787  	return c
  4788  }
  4789  
  4790  // Fields allows partial responses to be retrieved. See
  4791  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4792  // details.
  4793  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  4794  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4795  	return c
  4796  }
  4797  
  4798  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4799  // object's ETag matches the given value. This is useful for getting updates
  4800  // only after the object has changed since the last request.
  4801  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  4802  	c.ifNoneMatch_ = entityTag
  4803  	return c
  4804  }
  4805  
  4806  // Context sets the context to be used in this call's Do method.
  4807  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  4808  	c.ctx_ = ctx
  4809  	return c
  4810  }
  4811  
  4812  // Header returns a http.Header that can be modified by the caller to add
  4813  // headers to the request.
  4814  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  4815  	if c.header_ == nil {
  4816  		c.header_ = make(http.Header)
  4817  	}
  4818  	return c.header_
  4819  }
  4820  
  4821  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4822  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4823  	if c.ifNoneMatch_ != "" {
  4824  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4825  	}
  4826  	var body io.Reader = nil
  4827  	c.urlParams_.Set("alt", alt)
  4828  	c.urlParams_.Set("prettyPrint", "false")
  4829  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4830  	urls += "?" + c.urlParams_.Encode()
  4831  	req, err := http.NewRequest("GET", urls, body)
  4832  	if err != nil {
  4833  		return nil, err
  4834  	}
  4835  	req.Header = reqHeaders
  4836  	googleapi.Expand(req.URL, map[string]string{
  4837  		"name": c.name,
  4838  	})
  4839  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4840  }
  4841  
  4842  // Do executes the "datamigration.projects.locations.operations.get" call.
  4843  // Any non-2xx status code is an error. Response headers are in either
  4844  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4845  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4846  // whether the returned error was because http.StatusNotModified was returned.
  4847  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4848  	gensupport.SetOptions(c.urlParams_, opts...)
  4849  	res, err := c.doRequest("json")
  4850  	if res != nil && res.StatusCode == http.StatusNotModified {
  4851  		if res.Body != nil {
  4852  			res.Body.Close()
  4853  		}
  4854  		return nil, gensupport.WrapError(&googleapi.Error{
  4855  			Code:   res.StatusCode,
  4856  			Header: res.Header,
  4857  		})
  4858  	}
  4859  	if err != nil {
  4860  		return nil, err
  4861  	}
  4862  	defer googleapi.CloseBody(res)
  4863  	if err := googleapi.CheckResponse(res); err != nil {
  4864  		return nil, gensupport.WrapError(err)
  4865  	}
  4866  	ret := &Operation{
  4867  		ServerResponse: googleapi.ServerResponse{
  4868  			Header:         res.Header,
  4869  			HTTPStatusCode: res.StatusCode,
  4870  		},
  4871  	}
  4872  	target := &ret
  4873  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4874  		return nil, err
  4875  	}
  4876  	return ret, nil
  4877  }
  4878  
  4879  type ProjectsLocationsOperationsListCall struct {
  4880  	s            *Service
  4881  	name         string
  4882  	urlParams_   gensupport.URLParams
  4883  	ifNoneMatch_ string
  4884  	ctx_         context.Context
  4885  	header_      http.Header
  4886  }
  4887  
  4888  // List: Lists operations that match the specified filter in the request. If
  4889  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  4890  //
  4891  // - name: The name of the operation's parent resource.
  4892  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  4893  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4894  	c.name = name
  4895  	return c
  4896  }
  4897  
  4898  // Filter sets the optional parameter "filter": The standard list filter.
  4899  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  4900  	c.urlParams_.Set("filter", filter)
  4901  	return c
  4902  }
  4903  
  4904  // PageSize sets the optional parameter "pageSize": The standard list page
  4905  // size.
  4906  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  4907  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4908  	return c
  4909  }
  4910  
  4911  // PageToken sets the optional parameter "pageToken": The standard list page
  4912  // token.
  4913  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  4914  	c.urlParams_.Set("pageToken", pageToken)
  4915  	return c
  4916  }
  4917  
  4918  // Fields allows partial responses to be retrieved. See
  4919  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4920  // details.
  4921  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  4922  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4923  	return c
  4924  }
  4925  
  4926  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4927  // object's ETag matches the given value. This is useful for getting updates
  4928  // only after the object has changed since the last request.
  4929  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  4930  	c.ifNoneMatch_ = entityTag
  4931  	return c
  4932  }
  4933  
  4934  // Context sets the context to be used in this call's Do method.
  4935  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  4936  	c.ctx_ = ctx
  4937  	return c
  4938  }
  4939  
  4940  // Header returns a http.Header that can be modified by the caller to add
  4941  // headers to the request.
  4942  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  4943  	if c.header_ == nil {
  4944  		c.header_ = make(http.Header)
  4945  	}
  4946  	return c.header_
  4947  }
  4948  
  4949  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  4950  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4951  	if c.ifNoneMatch_ != "" {
  4952  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4953  	}
  4954  	var body io.Reader = nil
  4955  	c.urlParams_.Set("alt", alt)
  4956  	c.urlParams_.Set("prettyPrint", "false")
  4957  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
  4958  	urls += "?" + c.urlParams_.Encode()
  4959  	req, err := http.NewRequest("GET", urls, body)
  4960  	if err != nil {
  4961  		return nil, err
  4962  	}
  4963  	req.Header = reqHeaders
  4964  	googleapi.Expand(req.URL, map[string]string{
  4965  		"name": c.name,
  4966  	})
  4967  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4968  }
  4969  
  4970  // Do executes the "datamigration.projects.locations.operations.list" call.
  4971  // Any non-2xx status code is an error. Response headers are in either
  4972  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  4973  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4974  // check whether the returned error was because http.StatusNotModified was
  4975  // returned.
  4976  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  4977  	gensupport.SetOptions(c.urlParams_, opts...)
  4978  	res, err := c.doRequest("json")
  4979  	if res != nil && res.StatusCode == http.StatusNotModified {
  4980  		if res.Body != nil {
  4981  			res.Body.Close()
  4982  		}
  4983  		return nil, gensupport.WrapError(&googleapi.Error{
  4984  			Code:   res.StatusCode,
  4985  			Header: res.Header,
  4986  		})
  4987  	}
  4988  	if err != nil {
  4989  		return nil, err
  4990  	}
  4991  	defer googleapi.CloseBody(res)
  4992  	if err := googleapi.CheckResponse(res); err != nil {
  4993  		return nil, gensupport.WrapError(err)
  4994  	}
  4995  	ret := &ListOperationsResponse{
  4996  		ServerResponse: googleapi.ServerResponse{
  4997  			Header:         res.Header,
  4998  			HTTPStatusCode: res.StatusCode,
  4999  		},
  5000  	}
  5001  	target := &ret
  5002  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5003  		return nil, err
  5004  	}
  5005  	return ret, nil
  5006  }
  5007  
  5008  // Pages invokes f for each page of results.
  5009  // A non-nil error returned from f will halt the iteration.
  5010  // The provided context supersedes any context provided to the Context method.
  5011  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  5012  	c.ctx_ = ctx
  5013  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5014  	for {
  5015  		x, err := c.Do()
  5016  		if err != nil {
  5017  			return err
  5018  		}
  5019  		if err := f(x); err != nil {
  5020  			return err
  5021  		}
  5022  		if x.NextPageToken == "" {
  5023  			return nil
  5024  		}
  5025  		c.PageToken(x.NextPageToken)
  5026  	}
  5027  }
  5028  

View as plain text