1// Copyright 2021 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package sqladmin provides access to the Cloud SQL Admin API.
8//
9// For product documentation, see: https://developers.google.com/cloud-sql/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/sqladmin/v1"
16//   ...
17//   ctx := context.Background()
18//   sqladminService, err := sqladmin.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
27//
28//   sqladminService, err := sqladmin.NewService(ctx, option.WithScopes(sqladmin.SqlserviceAdminScope))
29//
30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
31//
32//   sqladminService, err := sqladmin.NewService(ctx, option.WithAPIKey("AIza..."))
33//
34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
35//
36//   config := &oauth2.Config{...}
37//   // ...
38//   token, err := config.Exchange(ctx, ...)
39//   sqladminService, err := sqladmin.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
40//
41// See https://godoc.org/google.golang.org/api/option/ for details on options.
42package sqladmin // import "google.golang.org/api/sqladmin/v1"
43
44import (
45	"bytes"
46	"context"
47	"encoding/json"
48	"errors"
49	"fmt"
50	"io"
51	"net/http"
52	"net/url"
53	"strconv"
54	"strings"
55
56	googleapi "google.golang.org/api/googleapi"
57	gensupport "google.golang.org/api/internal/gensupport"
58	option "google.golang.org/api/option"
59	internaloption "google.golang.org/api/option/internaloption"
60	htransport "google.golang.org/api/transport/http"
61)
62
63// Always reference these packages, just in case the auto-generated code
64// below doesn't.
65var _ = bytes.NewBuffer
66var _ = strconv.Itoa
67var _ = fmt.Sprintf
68var _ = json.NewDecoder
69var _ = io.Copy
70var _ = url.Parse
71var _ = gensupport.MarshalJSON
72var _ = googleapi.Version
73var _ = errors.New
74var _ = strings.Replace
75var _ = context.Canceled
76var _ = internaloption.WithDefaultEndpoint
77
78const apiId = "sqladmin:v1"
79const apiName = "sqladmin"
80const apiVersion = "v1"
81const basePath = "https://sqladmin.googleapis.com/"
82const mtlsBasePath = "https://sqladmin.mtls.googleapis.com/"
83
84// OAuth2 scopes used by this API.
85const (
86	// See, edit, configure, and delete your Google Cloud data and see the
87	// email address for your Google Account.
88	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
89
90	// Manage your Google SQL Service instances
91	SqlserviceAdminScope = "https://www.googleapis.com/auth/sqlservice.admin"
92)
93
94// NewService creates a new Service.
95func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
96	scopesOption := option.WithScopes(
97		"https://www.googleapis.com/auth/cloud-platform",
98		"https://www.googleapis.com/auth/sqlservice.admin",
99	)
100	// NOTE: prepend, so we don't override user-specified scopes.
101	opts = append([]option.ClientOption{scopesOption}, opts...)
102	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
103	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
104	client, endpoint, err := htransport.NewClient(ctx, opts...)
105	if err != nil {
106		return nil, err
107	}
108	s, err := New(client)
109	if err != nil {
110		return nil, err
111	}
112	if endpoint != "" {
113		s.BasePath = endpoint
114	}
115	return s, nil
116}
117
118// New creates a new Service. It uses the provided http.Client for requests.
119//
120// Deprecated: please use NewService instead.
121// To provide a custom HTTP client, use option.WithHTTPClient.
122// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
123func New(client *http.Client) (*Service, error) {
124	if client == nil {
125		return nil, errors.New("client is nil")
126	}
127	s := &Service{client: client, BasePath: basePath}
128	s.BackupRuns = NewBackupRunsService(s)
129	s.Connect = NewConnectService(s)
130	s.Databases = NewDatabasesService(s)
131	s.Flags = NewFlagsService(s)
132	s.Instances = NewInstancesService(s)
133	s.Operations = NewOperationsService(s)
134	s.Projects = NewProjectsService(s)
135	s.SslCerts = NewSslCertsService(s)
136	s.Tiers = NewTiersService(s)
137	s.Users = NewUsersService(s)
138	return s, nil
139}
140
141type Service struct {
142	client    *http.Client
143	BasePath  string // API endpoint base URL
144	UserAgent string // optional additional User-Agent fragment
145
146	BackupRuns *BackupRunsService
147
148	Connect *ConnectService
149
150	Databases *DatabasesService
151
152	Flags *FlagsService
153
154	Instances *InstancesService
155
156	Operations *OperationsService
157
158	Projects *ProjectsService
159
160	SslCerts *SslCertsService
161
162	Tiers *TiersService
163
164	Users *UsersService
165}
166
167func (s *Service) userAgent() string {
168	if s.UserAgent == "" {
169		return googleapi.UserAgent
170	}
171	return googleapi.UserAgent + " " + s.UserAgent
172}
173
174func NewBackupRunsService(s *Service) *BackupRunsService {
175	rs := &BackupRunsService{s: s}
176	return rs
177}
178
179type BackupRunsService struct {
180	s *Service
181}
182
183func NewConnectService(s *Service) *ConnectService {
184	rs := &ConnectService{s: s}
185	return rs
186}
187
188type ConnectService struct {
189	s *Service
190}
191
192func NewDatabasesService(s *Service) *DatabasesService {
193	rs := &DatabasesService{s: s}
194	return rs
195}
196
197type DatabasesService struct {
198	s *Service
199}
200
201func NewFlagsService(s *Service) *FlagsService {
202	rs := &FlagsService{s: s}
203	return rs
204}
205
206type FlagsService struct {
207	s *Service
208}
209
210func NewInstancesService(s *Service) *InstancesService {
211	rs := &InstancesService{s: s}
212	return rs
213}
214
215type InstancesService struct {
216	s *Service
217}
218
219func NewOperationsService(s *Service) *OperationsService {
220	rs := &OperationsService{s: s}
221	return rs
222}
223
224type OperationsService struct {
225	s *Service
226}
227
228func NewProjectsService(s *Service) *ProjectsService {
229	rs := &ProjectsService{s: s}
230	rs.Instances = NewProjectsInstancesService(s)
231	return rs
232}
233
234type ProjectsService struct {
235	s *Service
236
237	Instances *ProjectsInstancesService
238}
239
240func NewProjectsInstancesService(s *Service) *ProjectsInstancesService {
241	rs := &ProjectsInstancesService{s: s}
242	return rs
243}
244
245type ProjectsInstancesService struct {
246	s *Service
247}
248
249func NewSslCertsService(s *Service) *SslCertsService {
250	rs := &SslCertsService{s: s}
251	return rs
252}
253
254type SslCertsService struct {
255	s *Service
256}
257
258func NewTiersService(s *Service) *TiersService {
259	rs := &TiersService{s: s}
260	return rs
261}
262
263type TiersService struct {
264	s *Service
265}
266
267func NewUsersService(s *Service) *UsersService {
268	rs := &UsersService{s: s}
269	return rs
270}
271
272type UsersService struct {
273	s *Service
274}
275
276// AclEntry: An entry for an Access Control list.
277type AclEntry struct {
278	// ExpirationTime: The time when this access control entry expires in
279	// RFC 3339 (https://tools.ietf.org/html/rfc3339) format, for example
280	// **2012-11-15T16:19:00.094Z**.
281	ExpirationTime string `json:"expirationTime,omitempty"`
282
283	// Kind: This is always **sql#aclEntry**.
284	Kind string `json:"kind,omitempty"`
285
286	// Name: Optional. A label to identify this entry.
287	Name string `json:"name,omitempty"`
288
289	// Value: The allowlisted value for the access control list.
290	Value string `json:"value,omitempty"`
291
292	// ForceSendFields is a list of field names (e.g. "ExpirationTime") to
293	// unconditionally include in API requests. By default, fields with
294	// empty or default values are omitted from API requests. However, any
295	// non-pointer, non-interface field appearing in ForceSendFields will be
296	// sent to the server regardless of whether the field is empty or not.
297	// This may be used to include empty fields in Patch requests.
298	ForceSendFields []string `json:"-"`
299
300	// NullFields is a list of field names (e.g. "ExpirationTime") to
301	// include in API requests with the JSON null value. By default, fields
302	// with empty values are omitted from API requests. However, any field
303	// with an empty value appearing in NullFields will be sent to the
304	// server as null. It is an error if a field in this list has a
305	// non-empty value. This may be used to include null fields in Patch
306	// requests.
307	NullFields []string `json:"-"`
308}
309
310func (s *AclEntry) MarshalJSON() ([]byte, error) {
311	type NoMethod AclEntry
312	raw := NoMethod(*s)
313	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
314}
315
316// ApiWarning: An Admin API warning message.
317type ApiWarning struct {
318	// Code: Code to uniquely identify the warning type.
319	//
320	// Possible values:
321	//   "SQL_API_WARNING_CODE_UNSPECIFIED" - An unknown or unset warning
322	// type from Cloud SQL API.
323	//   "REGION_UNREACHABLE" - Warning when one or more regions are not
324	// reachable. The returned result set may be incomplete.
325	Code string `json:"code,omitempty"`
326
327	// Message: The warning message.
328	Message string `json:"message,omitempty"`
329
330	// Region: The region name for REGION_UNREACHABLE warning.
331	Region string `json:"region,omitempty"`
332
333	// ForceSendFields is a list of field names (e.g. "Code") to
334	// unconditionally include in API requests. By default, fields with
335	// empty or default values are omitted from API requests. However, any
336	// non-pointer, non-interface field appearing in ForceSendFields will be
337	// sent to the server regardless of whether the field is empty or not.
338	// This may be used to include empty fields in Patch requests.
339	ForceSendFields []string `json:"-"`
340
341	// NullFields is a list of field names (e.g. "Code") to include in API
342	// requests with the JSON null value. By default, fields with empty
343	// values are omitted from API requests. However, any field with an
344	// empty value appearing in NullFields will be sent to the server as
345	// null. It is an error if a field in this list has a non-empty value.
346	// This may be used to include null fields in Patch requests.
347	NullFields []string `json:"-"`
348}
349
350func (s *ApiWarning) MarshalJSON() ([]byte, error) {
351	type NoMethod ApiWarning
352	raw := NoMethod(*s)
353	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
354}
355
356// BackupConfiguration: Database instance backup configuration.
357type BackupConfiguration struct {
358	// BackupRetentionSettings: Backup retention settings.
359	BackupRetentionSettings *BackupRetentionSettings `json:"backupRetentionSettings,omitempty"`
360
361	// BinaryLogEnabled: (MySQL only) Whether binary log is enabled. If
362	// backup configuration is disabled, binarylog must be disabled as well.
363	BinaryLogEnabled bool `json:"binaryLogEnabled,omitempty"`
364
365	// Enabled: Whether this configuration is enabled.
366	Enabled bool `json:"enabled,omitempty"`
367
368	// Kind: This is always **sql#backupConfiguration**.
369	Kind string `json:"kind,omitempty"`
370
371	// Location: Location of the backup
372	Location string `json:"location,omitempty"`
373
374	// PointInTimeRecoveryEnabled: (Postgres only) Whether point in time
375	// recovery is enabled.
376	PointInTimeRecoveryEnabled bool `json:"pointInTimeRecoveryEnabled,omitempty"`
377
378	// ReplicationLogArchivingEnabled: Reserved for future use.
379	ReplicationLogArchivingEnabled bool `json:"replicationLogArchivingEnabled,omitempty"`
380
381	// StartTime: Start time for the daily backup configuration in UTC
382	// timezone in the 24 hour format - **HH:MM**.
383	StartTime string `json:"startTime,omitempty"`
384
385	// TransactionLogRetentionDays: The number of days of transaction logs
386	// we retain for point in time restore, from 1-7.
387	TransactionLogRetentionDays int64 `json:"transactionLogRetentionDays,omitempty"`
388
389	// ForceSendFields is a list of field names (e.g.
390	// "BackupRetentionSettings") to unconditionally include in API
391	// requests. By default, fields with empty or default values are omitted
392	// from API requests. However, any non-pointer, non-interface field
393	// appearing in ForceSendFields will be sent to the server regardless of
394	// whether the field is empty or not. This may be used to include empty
395	// fields in Patch requests.
396	ForceSendFields []string `json:"-"`
397
398	// NullFields is a list of field names (e.g. "BackupRetentionSettings")
399	// to include in API requests with the JSON null value. By default,
400	// fields with empty values are omitted from API requests. However, any
401	// field with an empty value appearing in NullFields will be sent to the
402	// server as null. It is an error if a field in this list has a
403	// non-empty value. This may be used to include null fields in Patch
404	// requests.
405	NullFields []string `json:"-"`
406}
407
408func (s *BackupConfiguration) MarshalJSON() ([]byte, error) {
409	type NoMethod BackupConfiguration
410	raw := NoMethod(*s)
411	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
412}
413
414// BackupContext: Backup context.
415type BackupContext struct {
416	// BackupId: The identifier of the backup.
417	BackupId int64 `json:"backupId,omitempty,string"`
418
419	// Kind: This is always **sql#backupContext**.
420	Kind string `json:"kind,omitempty"`
421
422	// ForceSendFields is a list of field names (e.g. "BackupId") to
423	// unconditionally include in API requests. By default, fields with
424	// empty or default values are omitted from API requests. However, any
425	// non-pointer, non-interface field appearing in ForceSendFields will be
426	// sent to the server regardless of whether the field is empty or not.
427	// This may be used to include empty fields in Patch requests.
428	ForceSendFields []string `json:"-"`
429
430	// NullFields is a list of field names (e.g. "BackupId") to include in
431	// API requests with the JSON null value. By default, fields with empty
432	// values are omitted from API requests. However, any field with an
433	// empty value appearing in NullFields will be sent to the server as
434	// null. It is an error if a field in this list has a non-empty value.
435	// This may be used to include null fields in Patch requests.
436	NullFields []string `json:"-"`
437}
438
439func (s *BackupContext) MarshalJSON() ([]byte, error) {
440	type NoMethod BackupContext
441	raw := NoMethod(*s)
442	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
443}
444
445// BackupRetentionSettings: We currently only support backup retention
446// by specifying the number of backups we will retain.
447type BackupRetentionSettings struct {
448	// RetainedBackups: Depending on the value of retention_unit, this is
449	// used to determine if a backup needs to be deleted. If retention_unit
450	// is 'COUNT', we will retain this many backups.
451	RetainedBackups int64 `json:"retainedBackups,omitempty"`
452
453	// RetentionUnit: The unit that 'retained_backups' represents.
454	//
455	// Possible values:
456	//   "RETENTION_UNIT_UNSPECIFIED" - Backup retention unit is
457	// unspecified, will be treated as COUNT.
458	//   "COUNT" - Retention will be by count, eg. "retain the most recent 7
459	// backups".
460	RetentionUnit string `json:"retentionUnit,omitempty"`
461
462	// ForceSendFields is a list of field names (e.g. "RetainedBackups") to
463	// unconditionally include in API requests. By default, fields with
464	// empty or default values are omitted from API requests. However, any
465	// non-pointer, non-interface field appearing in ForceSendFields will be
466	// sent to the server regardless of whether the field is empty or not.
467	// This may be used to include empty fields in Patch requests.
468	ForceSendFields []string `json:"-"`
469
470	// NullFields is a list of field names (e.g. "RetainedBackups") to
471	// include in API requests with the JSON null value. By default, fields
472	// with empty values are omitted from API requests. However, any field
473	// with an empty value appearing in NullFields will be sent to the
474	// server as null. It is an error if a field in this list has a
475	// non-empty value. This may be used to include null fields in Patch
476	// requests.
477	NullFields []string `json:"-"`
478}
479
480func (s *BackupRetentionSettings) MarshalJSON() ([]byte, error) {
481	type NoMethod BackupRetentionSettings
482	raw := NoMethod(*s)
483	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
484}
485
486// BackupRun: A BackupRun resource.
487type BackupRun struct {
488	// BackupKind: Specifies the kind of backup, PHYSICAL or
489	// DEFAULT_SNAPSHOT.
490	//
491	// Possible values:
492	//   "SQL_BACKUP_KIND_UNSPECIFIED" - This is an unknown BackupKind.
493	//   "SNAPSHOT" - The snapshot based backups
494	//   "PHYSICAL" - Physical backups
495	BackupKind string `json:"backupKind,omitempty"`
496
497	// Description: The description of this run, only applicable to
498	// on-demand backups.
499	Description string `json:"description,omitempty"`
500
501	// DiskEncryptionConfiguration: Encryption configuration specific to a
502	// backup.
503	DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"`
504
505	// DiskEncryptionStatus: Encryption status specific to a backup.
506	DiskEncryptionStatus *DiskEncryptionStatus `json:"diskEncryptionStatus,omitempty"`
507
508	// EndTime: The time the backup operation completed in UTC timezone in
509	// RFC 3339 (https://tools.ietf.org/html/rfc3339) format, for example
510	// **2012-11-15T16:19:00.094Z**.
511	EndTime string `json:"endTime,omitempty"`
512
513	// EnqueuedTime: The time the run was enqueued in UTC timezone in RFC
514	// 3339 (https://tools.ietf.org/html/rfc3339) format, for example
515	// **2012-11-15T16:19:00.094Z**.
516	EnqueuedTime string `json:"enqueuedTime,omitempty"`
517
518	// Error: Information about why the backup operation failed. This is
519	// only present if the run has the FAILED status.
520	Error *OperationError `json:"error,omitempty"`
521
522	// Id: The identifier for this backup run. Unique only for a specific
523	// Cloud SQL instance.
524	Id int64 `json:"id,omitempty,string"`
525
526	// Instance: Name of the database instance.
527	Instance string `json:"instance,omitempty"`
528
529	// Kind: This is always **sql#backupRun**.
530	Kind string `json:"kind,omitempty"`
531
532	// Location: Location of the backups.
533	Location string `json:"location,omitempty"`
534
535	// SelfLink: The URI of this resource.
536	SelfLink string `json:"selfLink,omitempty"`
537
538	// StartTime: The time the backup operation actually started in UTC
539	// timezone in RFC 3339 (https://tools.ietf.org/html/rfc3339) format,
540	// for example **2012-11-15T16:19:00.094Z**.
541	StartTime string `json:"startTime,omitempty"`
542
543	// Status: The status of this run.
544	//
545	// Possible values:
546	//   "SQL_BACKUP_RUN_STATUS_UNSPECIFIED" - The status of the run is
547	// unknown.
548	//   "ENQUEUED" - The backup operation was enqueued.
549	//   "OVERDUE" - The backup is overdue across a given backup window.
550	// Indicates a problem. Example: Long-running operation in progress
551	// during the whole window.
552	//   "RUNNING" - The backup is in progress.
553	//   "FAILED" - The backup failed.
554	//   "SUCCESSFUL" - The backup was successful.
555	//   "SKIPPED" - The backup was skipped (without problems) for a given
556	// backup window. Example: Instance was idle.
557	//   "DELETION_PENDING" - The backup is about to be deleted.
558	//   "DELETION_FAILED" - The backup deletion failed.
559	//   "DELETED" - The backup has been deleted.
560	Status string `json:"status,omitempty"`
561
562	// Type: The type of this run; can be either "AUTOMATED" or "ON_DEMAND".
563	// This field defaults to "ON_DEMAND" and is ignored, when specified for
564	// insert requests.
565	//
566	// Possible values:
567	//   "SQL_BACKUP_RUN_TYPE_UNSPECIFIED" - This is an unknown BackupRun
568	// type.
569	//   "AUTOMATED" - The backup schedule automatically triggers a backup.
570	//   "ON_DEMAND" - The user manually triggers a backup.
571	Type string `json:"type,omitempty"`
572
573	// WindowStartTime: The start time of the backup window during which
574	// this the backup was attempted in RFC 3339
575	// (https://tools.ietf.org/html/rfc3339) format, for example
576	// **2012-11-15T16:19:00.094Z**.
577	WindowStartTime string `json:"windowStartTime,omitempty"`
578
579	// ServerResponse contains the HTTP response code and headers from the
580	// server.
581	googleapi.ServerResponse `json:"-"`
582
583	// ForceSendFields is a list of field names (e.g. "BackupKind") to
584	// unconditionally include in API requests. By default, fields with
585	// empty or default values are omitted from API requests. However, any
586	// non-pointer, non-interface field appearing in ForceSendFields will be
587	// sent to the server regardless of whether the field is empty or not.
588	// This may be used to include empty fields in Patch requests.
589	ForceSendFields []string `json:"-"`
590
591	// NullFields is a list of field names (e.g. "BackupKind") to include in
592	// API requests with the JSON null value. By default, fields with empty
593	// values are omitted from API requests. However, any field with an
594	// empty value appearing in NullFields will be sent to the server as
595	// null. It is an error if a field in this list has a non-empty value.
596	// This may be used to include null fields in Patch requests.
597	NullFields []string `json:"-"`
598}
599
600func (s *BackupRun) MarshalJSON() ([]byte, error) {
601	type NoMethod BackupRun
602	raw := NoMethod(*s)
603	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
604}
605
606// BackupRunsListResponse: Backup run list results.
607type BackupRunsListResponse struct {
608	// Items: A list of backup runs in reverse chronological order of the
609	// enqueued time.
610	Items []*BackupRun `json:"items,omitempty"`
611
612	// Kind: This is always **sql#backupRunsList**.
613	Kind string `json:"kind,omitempty"`
614
615	// NextPageToken: The continuation token, used to page through large
616	// result sets. Provide this value in a subsequent request to return the
617	// next page of results.
618	NextPageToken string `json:"nextPageToken,omitempty"`
619
620	// ServerResponse contains the HTTP response code and headers from the
621	// server.
622	googleapi.ServerResponse `json:"-"`
623
624	// ForceSendFields is a list of field names (e.g. "Items") to
625	// unconditionally include in API requests. By default, fields with
626	// empty or default values are omitted from API requests. However, any
627	// non-pointer, non-interface field appearing in ForceSendFields will be
628	// sent to the server regardless of whether the field is empty or not.
629	// This may be used to include empty fields in Patch requests.
630	ForceSendFields []string `json:"-"`
631
632	// NullFields is a list of field names (e.g. "Items") to include in API
633	// requests with the JSON null value. By default, fields with empty
634	// values are omitted from API requests. However, any field with an
635	// empty value appearing in NullFields will be sent to the server as
636	// null. It is an error if a field in this list has a non-empty value.
637	// This may be used to include null fields in Patch requests.
638	NullFields []string `json:"-"`
639}
640
641func (s *BackupRunsListResponse) MarshalJSON() ([]byte, error) {
642	type NoMethod BackupRunsListResponse
643	raw := NoMethod(*s)
644	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
645}
646
647// BinLogCoordinates: Binary log coordinates.
648type BinLogCoordinates struct {
649	// BinLogFileName: Name of the binary log file for a Cloud SQL instance.
650	BinLogFileName string `json:"binLogFileName,omitempty"`
651
652	// BinLogPosition: Position (offset) within the binary log file.
653	BinLogPosition int64 `json:"binLogPosition,omitempty,string"`
654
655	// Kind: This is always **sql#binLogCoordinates**.
656	Kind string `json:"kind,omitempty"`
657
658	// ForceSendFields is a list of field names (e.g. "BinLogFileName") to
659	// unconditionally include in API requests. By default, fields with
660	// empty or default values are omitted from API requests. However, any
661	// non-pointer, non-interface field appearing in ForceSendFields will be
662	// sent to the server regardless of whether the field is empty or not.
663	// This may be used to include empty fields in Patch requests.
664	ForceSendFields []string `json:"-"`
665
666	// NullFields is a list of field names (e.g. "BinLogFileName") to
667	// include in API requests with the JSON null value. By default, fields
668	// with empty values are omitted from API requests. However, any field
669	// with an empty value appearing in NullFields will be sent to the
670	// server as null. It is an error if a field in this list has a
671	// non-empty value. This may be used to include null fields in Patch
672	// requests.
673	NullFields []string `json:"-"`
674}
675
676func (s *BinLogCoordinates) MarshalJSON() ([]byte, error) {
677	type NoMethod BinLogCoordinates
678	raw := NoMethod(*s)
679	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
680}
681
682// CloneContext: Database instance clone context.
683type CloneContext struct {
684	// BinLogCoordinates: Binary log coordinates, if specified, identify the
685	// position up to which the source instance is cloned. If not specified,
686	// the source instance is cloned up to the most recent binary log
687	// coordinates.
688	BinLogCoordinates *BinLogCoordinates `json:"binLogCoordinates,omitempty"`
689
690	// DestinationInstanceName: Name of the Cloud SQL instance to be created
691	// as a clone.
692	DestinationInstanceName string `json:"destinationInstanceName,omitempty"`
693
694	// Kind: This is always **sql#cloneContext**.
695	Kind string `json:"kind,omitempty"`
696
697	// PitrTimestampMs: Reserved for future use.
698	PitrTimestampMs int64 `json:"pitrTimestampMs,omitempty,string"`
699
700	// PointInTime: Timestamp, if specified, identifies the time to which
701	// the source instance is cloned.
702	PointInTime string `json:"pointInTime,omitempty"`
703
704	// ForceSendFields is a list of field names (e.g. "BinLogCoordinates")
705	// to unconditionally include in API requests. By default, fields with
706	// empty or default values are omitted from API requests. However, any
707	// non-pointer, non-interface field appearing in ForceSendFields will be
708	// sent to the server regardless of whether the field is empty or not.
709	// This may be used to include empty fields in Patch requests.
710	ForceSendFields []string `json:"-"`
711
712	// NullFields is a list of field names (e.g. "BinLogCoordinates") to
713	// include in API requests with the JSON null value. By default, fields
714	// with empty values are omitted from API requests. However, any field
715	// with an empty value appearing in NullFields will be sent to the
716	// server as null. It is an error if a field in this list has a
717	// non-empty value. This may be used to include null fields in Patch
718	// requests.
719	NullFields []string `json:"-"`
720}
721
722func (s *CloneContext) MarshalJSON() ([]byte, error) {
723	type NoMethod CloneContext
724	raw := NoMethod(*s)
725	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
726}
727
728// ConnectSettings: Connect settings retrieval response.
729type ConnectSettings struct {
730	// BackendType: **SECOND_GEN**: Cloud SQL database instance.
731	// **EXTERNAL**: A database server that is not managed by Google. This
732	// property is read-only; use the **tier** property in the **settings**
733	// object to determine the database type.
734	//
735	// Possible values:
736	//   "SQL_BACKEND_TYPE_UNSPECIFIED" - This is an unknown backend type
737	// for instance.
738	//   "FIRST_GEN" - V1 speckle instance.
739	//   "SECOND_GEN" - V2 speckle instance.
740	//   "EXTERNAL" - On premises instance.
741	BackendType string `json:"backendType,omitempty"`
742
743	// DatabaseVersion: The database engine type and version. The
744	// **databaseVersion** field cannot be changed after instance creation.
745	// MySQL instances: **MYSQL_8_0**, **MYSQL_5_7** (default), or
746	// **MYSQL_5_6**. PostgreSQL instances: **POSTGRES_9_6**,
747	// **POSTGRES_10**, **POSTGRES_11** or **POSTGRES_12** (default). SQL
748	// Server instances: **SQLSERVER_2017_STANDARD** (default),
749	// **SQLSERVER_2017_ENTERPRISE**, **SQLSERVER_2017_EXPRESS**, or
750	// **SQLSERVER_2017_WEB**.
751	//
752	// Possible values:
753	//   "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database
754	// version.
755	//   "MYSQL_5_1" - The database version is MySQL 5.1.
756	//   "MYSQL_5_5" - The database version is MySQL 5.5.
757	//   "MYSQL_5_6" - The database version is MySQL 5.6.
758	//   "MYSQL_5_7" - The database version is MySQL 5.7.
759	//   "POSTGRES_9_6" - The database version is PostgreSQL 9.6.
760	//   "POSTGRES_11" - The database version is PostgreSQL 11.
761	//   "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017
762	// Standard.
763	//   "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server
764	// 2017 Enterprise.
765	//   "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017
766	// Express.
767	//   "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web.
768	//   "POSTGRES_10" - The database version is PostgreSQL 10.
769	//   "POSTGRES_12" - The database version is PostgreSQL 12.
770	//   "MYSQL_8_0" - The database version is MySQL 8.
771	//   "MYSQL_8_0_18" - The database major version is MySQL 8.0 and the
772	// minor version is 18.
773	//   "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the
774	// minor version is 26.
775	//   "POSTGRES_13" - The database version is PostgreSQL 13.
776	//   "POSTGRES_14" - The database version is PostgreSQL 14.
777	//   "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019
778	// Standard.
779	//   "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server
780	// 2019 Enterprise.
781	//   "SQLSERVER_2019_EXPRESS" - The database version is SQL Server 2019
782	// Express.
783	//   "SQLSERVER_2019_WEB" - The database version is SQL Server 2019 Web.
784	DatabaseVersion string `json:"databaseVersion,omitempty"`
785
786	// IpAddresses: The assigned IP addresses for the instance.
787	IpAddresses []*IpMapping `json:"ipAddresses,omitempty"`
788
789	// Kind: This is always `sql#connectSettings`.
790	Kind string `json:"kind,omitempty"`
791
792	// Region: The cloud region for the instance. e.g. **us-central1**,
793	// **europe-west1**. The region cannot be changed after instance
794	// creation.
795	Region string `json:"region,omitempty"`
796
797	// ServerCaCert: SSL configuration.
798	ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
799
800	// ServerResponse contains the HTTP response code and headers from the
801	// server.
802	googleapi.ServerResponse `json:"-"`
803
804	// ForceSendFields is a list of field names (e.g. "BackendType") to
805	// unconditionally include in API requests. By default, fields with
806	// empty or default values are omitted from API requests. However, any
807	// non-pointer, non-interface field appearing in ForceSendFields will be
808	// sent to the server regardless of whether the field is empty or not.
809	// This may be used to include empty fields in Patch requests.
810	ForceSendFields []string `json:"-"`
811
812	// NullFields is a list of field names (e.g. "BackendType") to include
813	// in API requests with the JSON null value. By default, fields with
814	// empty values are omitted from API requests. However, any field with
815	// an empty value appearing in NullFields will be sent to the server as
816	// null. It is an error if a field in this list has a non-empty value.
817	// This may be used to include null fields in Patch requests.
818	NullFields []string `json:"-"`
819}
820
821func (s *ConnectSettings) MarshalJSON() ([]byte, error) {
822	type NoMethod ConnectSettings
823	raw := NoMethod(*s)
824	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
825}
826
827// Database: Represents a SQL database on the Cloud SQL instance.
828type Database struct {
829	// Charset: The Cloud SQL charset value.
830	Charset string `json:"charset,omitempty"`
831
832	// Collation: The Cloud SQL collation value.
833	Collation string `json:"collation,omitempty"`
834
835	// Etag: This field is deprecated and will be removed from a future
836	// version of the API.
837	Etag string `json:"etag,omitempty"`
838
839	// Instance: The name of the Cloud SQL instance. This does not include
840	// the project ID.
841	Instance string `json:"instance,omitempty"`
842
843	// Kind: This is always **sql#database**.
844	Kind string `json:"kind,omitempty"`
845
846	// Name: The name of the database in the Cloud SQL instance. This does
847	// not include the project ID or instance name.
848	Name string `json:"name,omitempty"`
849
850	// Project: The project ID of the project containing the Cloud SQL
851	// database. The Google apps domain is prefixed if applicable.
852	Project string `json:"project,omitempty"`
853
854	// SelfLink: The URI of this resource.
855	SelfLink string `json:"selfLink,omitempty"`
856
857	SqlserverDatabaseDetails *SqlServerDatabaseDetails `json:"sqlserverDatabaseDetails,omitempty"`
858
859	// ServerResponse contains the HTTP response code and headers from the
860	// server.
861	googleapi.ServerResponse `json:"-"`
862
863	// ForceSendFields is a list of field names (e.g. "Charset") to
864	// unconditionally include in API requests. By default, fields with
865	// empty or default values are omitted from API requests. However, any
866	// non-pointer, non-interface field appearing in ForceSendFields will be
867	// sent to the server regardless of whether the field is empty or not.
868	// This may be used to include empty fields in Patch requests.
869	ForceSendFields []string `json:"-"`
870
871	// NullFields is a list of field names (e.g. "Charset") to include in
872	// API requests with the JSON null value. By default, fields with empty
873	// values are omitted from API requests. However, any field with an
874	// empty value appearing in NullFields will be sent to the server as
875	// null. It is an error if a field in this list has a non-empty value.
876	// This may be used to include null fields in Patch requests.
877	NullFields []string `json:"-"`
878}
879
880func (s *Database) MarshalJSON() ([]byte, error) {
881	type NoMethod Database
882	raw := NoMethod(*s)
883	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
884}
885
886// DatabaseFlags: Database flags for Cloud SQL instances.
887type DatabaseFlags struct {
888	// Name: The name of the flag. These flags are passed at instance
889	// startup, so include both server options and system variables. Flags
890	// are specified with underscores, not hyphens. For more information,
891	// see Configuring Database Flags
892	// (https://cloud.google.com/sql/docs/mysql/flags) in the Cloud SQL
893	// documentation.
894	Name string `json:"name,omitempty"`
895
896	// Value: The value of the flag. Booleans are set to **on** for true and
897	// **off** for false. This field must be omitted if the flag doesn't
898	// take a value.
899	Value string `json:"value,omitempty"`
900
901	// ForceSendFields is a list of field names (e.g. "Name") to
902	// unconditionally include in API requests. By default, fields with
903	// empty or default values are omitted from API requests. However, any
904	// non-pointer, non-interface field appearing in ForceSendFields will be
905	// sent to the server regardless of whether the field is empty or not.
906	// This may be used to include empty fields in Patch requests.
907	ForceSendFields []string `json:"-"`
908
909	// NullFields is a list of field names (e.g. "Name") to include in API
910	// requests with the JSON null value. By default, fields with empty
911	// values are omitted from API requests. However, any field with an
912	// empty value appearing in NullFields will be sent to the server as
913	// null. It is an error if a field in this list has a non-empty value.
914	// This may be used to include null fields in Patch requests.
915	NullFields []string `json:"-"`
916}
917
918func (s *DatabaseFlags) MarshalJSON() ([]byte, error) {
919	type NoMethod DatabaseFlags
920	raw := NoMethod(*s)
921	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
922}
923
924// DatabaseInstance: A Cloud SQL instance resource.
925type DatabaseInstance struct {
926	// BackendType: The backend type. **SECOND_GEN**: Cloud SQL database
927	// instance. **EXTERNAL**: A database server that is not managed by
928	// Google. This property is read-only; use the **tier** property in the
929	// **settings** object to determine the database type.
930	//
931	// Possible values:
932	//   "SQL_BACKEND_TYPE_UNSPECIFIED" - This is an unknown backend type
933	// for instance.
934	//   "FIRST_GEN" - V1 speckle instance.
935	//   "SECOND_GEN" - V2 speckle instance.
936	//   "EXTERNAL" - On premises instance.
937	BackendType string `json:"backendType,omitempty"`
938
939	// ConnectionName: Connection name of the Cloud SQL instance used in
940	// connection strings.
941	ConnectionName string `json:"connectionName,omitempty"`
942
943	// CreateTime: Output only. The time when the instance was created in
944	// RFC 3339 (https://tools.ietf.org/html/rfc3339) format, for example
945	// **2012-11-15T16:19:00.094Z**.
946	CreateTime string `json:"createTime,omitempty"`
947
948	// CurrentDiskSize: The current disk usage of the instance in bytes.
949	// This property has been deprecated. Use the
950	// "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud
951	// Monitoring API instead. Please see this announcement
952	// (https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ)
953	// for details.
954	CurrentDiskSize int64 `json:"currentDiskSize,omitempty,string"`
955
956	// DatabaseInstalledVersion: Output only. The databaseInstalledVersion
957	// stores the current fully resolved database version running on the
958	// instance including minor version such as MYSQL_5_6_50
959	DatabaseInstalledVersion string `json:"databaseInstalledVersion,omitempty"`
960
961	// DatabaseVersion: The database engine type and version. The
962	// **databaseVersion** field cannot be changed after instance creation.
963	//
964	// Possible values:
965	//   "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database
966	// version.
967	//   "MYSQL_5_1" - The database version is MySQL 5.1.
968	//   "MYSQL_5_5" - The database version is MySQL 5.5.
969	//   "MYSQL_5_6" - The database version is MySQL 5.6.
970	//   "MYSQL_5_7" - The database version is MySQL 5.7.
971	//   "POSTGRES_9_6" - The database version is PostgreSQL 9.6.
972	//   "POSTGRES_11" - The database version is PostgreSQL 11.
973	//   "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017
974	// Standard.
975	//   "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server
976	// 2017 Enterprise.
977	//   "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017
978	// Express.
979	//   "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web.
980	//   "POSTGRES_10" - The database version is PostgreSQL 10.
981	//   "POSTGRES_12" - The database version is PostgreSQL 12.
982	//   "MYSQL_8_0" - The database version is MySQL 8.
983	//   "MYSQL_8_0_18" - The database major version is MySQL 8.0 and the
984	// minor version is 18.
985	//   "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the
986	// minor version is 26.
987	//   "POSTGRES_13" - The database version is PostgreSQL 13.
988	//   "POSTGRES_14" - The database version is PostgreSQL 14.
989	//   "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019
990	// Standard.
991	//   "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server
992	// 2019 Enterprise.
993	//   "SQLSERVER_2019_EXPRESS" - The database version is SQL Server 2019
994	// Express.
995	//   "SQLSERVER_2019_WEB" - The database version is SQL Server 2019 Web.
996	DatabaseVersion string `json:"databaseVersion,omitempty"`
997
998	// DiskEncryptionConfiguration: Disk encryption configuration specific
999	// to an instance.
1000	DiskEncryptionConfiguration *DiskEncryptionConfiguration `json:"diskEncryptionConfiguration,omitempty"`
1001
1002	// DiskEncryptionStatus: Disk encryption status specific to an instance.
1003	DiskEncryptionStatus *DiskEncryptionStatus `json:"diskEncryptionStatus,omitempty"`
1004
1005	// Etag: This field is deprecated and will be removed from a future
1006	// version of the API. Use the **settings.settingsVersion** field
1007	// instead.
1008	Etag string `json:"etag,omitempty"`
1009
1010	// FailoverReplica: The name and status of the failover replica.
1011	FailoverReplica *DatabaseInstanceFailoverReplica `json:"failoverReplica,omitempty"`
1012
1013	// GceZone: The Compute Engine zone that the instance is currently
1014	// serving from. This value could be different from the zone that was
1015	// specified when the instance was created if the instance has failed
1016	// over to its secondary zone.
1017	GceZone string `json:"gceZone,omitempty"`
1018
1019	// InstanceType: The instance type.
1020	//
1021	// Possible values:
1022	//   "SQL_INSTANCE_TYPE_UNSPECIFIED" - This is an unknown Cloud SQL
1023	// instance type.
1024	//   "CLOUD_SQL_INSTANCE" - A regular Cloud SQL instance that is not
1025	// replicating from a primary instance.
1026	//   "ON_PREMISES_INSTANCE" - An instance running on the customer's
1027	// premises that is not managed by Cloud SQL.
1028	//   "READ_REPLICA_INSTANCE" - A Cloud SQL instance acting as a
1029	// read-replica.
1030	InstanceType string `json:"instanceType,omitempty"`
1031
1032	// IpAddresses: The assigned IP addresses for the instance.
1033	IpAddresses []*IpMapping `json:"ipAddresses,omitempty"`
1034
1035	// Ipv6Address: The IPv6 address assigned to the instance. (Deprecated)
1036	// This property was applicable only to First Generation instances.
1037	Ipv6Address string `json:"ipv6Address,omitempty"`
1038
1039	// Kind: This is always **sql#instance**.
1040	Kind string `json:"kind,omitempty"`
1041
1042	// MasterInstanceName: The name of the instance which will act as
1043	// primary in the replication setup.
1044	MasterInstanceName string `json:"masterInstanceName,omitempty"`
1045
1046	// MaxDiskSize: The maximum disk size of the instance in bytes.
1047	MaxDiskSize int64 `json:"maxDiskSize,omitempty,string"`
1048
1049	// Name: Name of the Cloud SQL instance. This does not include the
1050	// project ID.
1051	Name string `json:"name,omitempty"`
1052
1053	// OnPremisesConfiguration: Configuration specific to on-premises
1054	// instances.
1055	OnPremisesConfiguration *OnPremisesConfiguration `json:"onPremisesConfiguration,omitempty"`
1056
1057	// OutOfDiskReport: This field represents the report generated by the
1058	// proactive database wellness job for OutOfDisk issues. * Writers: *
1059	// the proactive database wellness job for OOD. * Readers: * the
1060	// proactive database wellness job
1061	OutOfDiskReport *SqlOutOfDiskReport `json:"outOfDiskReport,omitempty"`
1062
1063	// Project: The project ID of the project containing the Cloud SQL
1064	// instance. The Google apps domain is prefixed if applicable.
1065	Project string `json:"project,omitempty"`
1066
1067	// Region: The geographical region. Can be: * **us-central**
1068	// (**FIRST_GEN** instances only) * **us-central1** (**SECOND_GEN**
1069	// instances only) * **asia-east1** or **europe-west1**. Defaults to
1070	// **us-central** or **us-central1** depending on the instance type. The
1071	// region cannot be changed after instance creation.
1072	Region string `json:"region,omitempty"`
1073
1074	// ReplicaConfiguration: Configuration specific to failover replicas and
1075	// read replicas.
1076	ReplicaConfiguration *ReplicaConfiguration `json:"replicaConfiguration,omitempty"`
1077
1078	// ReplicaNames: The replicas of the instance.
1079	ReplicaNames []string `json:"replicaNames,omitempty"`
1080
1081	// RootPassword: Initial root password. Use only on creation.
1082	RootPassword string `json:"rootPassword,omitempty"`
1083
1084	// SatisfiesPzs: The status indicating if instance satisfiesPzs.
1085	// Reserved for future use.
1086	SatisfiesPzs bool `json:"satisfiesPzs,omitempty"`
1087
1088	// ScheduledMaintenance: The start time of any upcoming scheduled
1089	// maintenance for this instance.
1090	ScheduledMaintenance *SqlScheduledMaintenance `json:"scheduledMaintenance,omitempty"`
1091
1092	// SecondaryGceZone: The Compute Engine zone that the failover instance
1093	// is currently serving from for a regional instance. This value could
1094	// be different from the zone that was specified when the instance was
1095	// created if the instance has failed over to its secondary/failover
1096	// zone. Reserved for future use.
1097	SecondaryGceZone string `json:"secondaryGceZone,omitempty"`
1098
1099	// SelfLink: The URI of this resource.
1100	SelfLink string `json:"selfLink,omitempty"`
1101
1102	// ServerCaCert: SSL configuration.
1103	ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
1104
1105	// ServiceAccountEmailAddress: The service account email address
1106	// assigned to the instance. This property is read-only.
1107	ServiceAccountEmailAddress string `json:"serviceAccountEmailAddress,omitempty"`
1108
1109	// Settings: The user settings.
1110	Settings *Settings `json:"settings,omitempty"`
1111
1112	// State: The current serving state of the Cloud SQL instance.
1113	//
1114	// Possible values:
1115	//   "SQL_INSTANCE_STATE_UNSPECIFIED" - The state of the instance is
1116	// unknown.
1117	//   "RUNNABLE" - The instance is running, or has been stopped by owner.
1118	//   "SUSPENDED" - The instance is not available, for example due to
1119	// problems with billing.
1120	//   "PENDING_DELETE" - The instance is being deleted.
1121	//   "PENDING_CREATE" - The instance is being created.
1122	//   "MAINTENANCE" - The instance is down for maintenance.
1123	//   "FAILED" - The creation of the instance failed or a fatal error
1124	// occurred during maintenance.
1125	//   "ONLINE_MAINTENANCE" - Deprecated
1126	State string `json:"state,omitempty"`
1127
1128	// SuspensionReason: If the instance state is SUSPENDED, the reason for
1129	// the suspension.
1130	//
1131	// Possible values:
1132	//   "SQL_SUSPENSION_REASON_UNSPECIFIED" - This is an unknown suspension
1133	// reason.
1134	//   "BILLING_ISSUE" - The instance is suspended due to billing issues
1135	// (for example:, GCP account issue)
1136	//   "LEGAL_ISSUE" - The instance is suspended due to illegal content
1137	// (for example:, child pornography, copyrighted material, etc.).
1138	//   "OPERATIONAL_ISSUE" - The instance is causing operational issues
1139	// (for example:, causing the database to crash).
1140	//   "KMS_KEY_ISSUE" - The KMS key used by the instance is either
1141	// revoked or denied access to
1142	SuspensionReason []string `json:"suspensionReason,omitempty"`
1143
1144	// ServerResponse contains the HTTP response code and headers from the
1145	// server.
1146	googleapi.ServerResponse `json:"-"`
1147
1148	// ForceSendFields is a list of field names (e.g. "BackendType") to
1149	// unconditionally include in API requests. By default, fields with
1150	// empty or default values are omitted from API requests. However, any
1151	// non-pointer, non-interface field appearing in ForceSendFields will be
1152	// sent to the server regardless of whether the field is empty or not.
1153	// This may be used to include empty fields in Patch requests.
1154	ForceSendFields []string `json:"-"`
1155
1156	// NullFields is a list of field names (e.g. "BackendType") to include
1157	// in API requests with the JSON null value. By default, fields with
1158	// empty values are omitted from API requests. However, any field with
1159	// an empty value appearing in NullFields will be sent to the server as
1160	// null. It is an error if a field in this list has a non-empty value.
1161	// This may be used to include null fields in Patch requests.
1162	NullFields []string `json:"-"`
1163}
1164
1165func (s *DatabaseInstance) MarshalJSON() ([]byte, error) {
1166	type NoMethod DatabaseInstance
1167	raw := NoMethod(*s)
1168	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1169}
1170
1171// DatabaseInstanceFailoverReplica: The name and status of the failover
1172// replica.
1173type DatabaseInstanceFailoverReplica struct {
1174	// Available: The availability status of the failover replica. A false
1175	// status indicates that the failover replica is out of sync. The
1176	// primary instance can only failover to the failover replica when the
1177	// status is true.
1178	Available bool `json:"available,omitempty"`
1179
1180	// Name: The name of the failover replica. If specified at instance
1181	// creation, a failover replica is created for the instance. The name
1182	// doesn't include the project ID.
1183	Name string `json:"name,omitempty"`
1184
1185	// ForceSendFields is a list of field names (e.g. "Available") to
1186	// unconditionally include in API requests. By default, fields with
1187	// empty or default values are omitted from API requests. However, any
1188	// non-pointer, non-interface field appearing in ForceSendFields will be
1189	// sent to the server regardless of whether the field is empty or not.
1190	// This may be used to include empty fields in Patch requests.
1191	ForceSendFields []string `json:"-"`
1192
1193	// NullFields is a list of field names (e.g. "Available") to include in
1194	// API requests with the JSON null value. By default, fields with empty
1195	// values are omitted from API requests. However, any field with an
1196	// empty value appearing in NullFields will be sent to the server as
1197	// null. It is an error if a field in this list has a non-empty value.
1198	// This may be used to include null fields in Patch requests.
1199	NullFields []string `json:"-"`
1200}
1201
1202func (s *DatabaseInstanceFailoverReplica) MarshalJSON() ([]byte, error) {
1203	type NoMethod DatabaseInstanceFailoverReplica
1204	raw := NoMethod(*s)
1205	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1206}
1207
1208// DatabasesListResponse: Database list response.
1209type DatabasesListResponse struct {
1210	// Items: List of database resources in the instance.
1211	Items []*Database `json:"items,omitempty"`
1212
1213	// Kind: This is always **sql#databasesList**.
1214	Kind string `json:"kind,omitempty"`
1215
1216	// ServerResponse contains the HTTP response code and headers from the
1217	// server.
1218	googleapi.ServerResponse `json:"-"`
1219
1220	// ForceSendFields is a list of field names (e.g. "Items") to
1221	// unconditionally include in API requests. By default, fields with
1222	// empty or default values are omitted from API requests. However, any
1223	// non-pointer, non-interface field appearing in ForceSendFields will be
1224	// sent to the server regardless of whether the field is empty or not.
1225	// This may be used to include empty fields in Patch requests.
1226	ForceSendFields []string `json:"-"`
1227
1228	// NullFields is a list of field names (e.g. "Items") to include in API
1229	// requests with the JSON null value. By default, fields with empty
1230	// values are omitted from API requests. However, any field with an
1231	// empty value appearing in NullFields will be sent to the server as
1232	// null. It is an error if a field in this list has a non-empty value.
1233	// This may be used to include null fields in Patch requests.
1234	NullFields []string `json:"-"`
1235}
1236
1237func (s *DatabasesListResponse) MarshalJSON() ([]byte, error) {
1238	type NoMethod DatabasesListResponse
1239	raw := NoMethod(*s)
1240	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1241}
1242
1243// DemoteMasterConfiguration: Read-replica configuration for connecting
1244// to the on-premises primary instance.
1245type DemoteMasterConfiguration struct {
1246	// Kind: This is always **sql#demoteMasterConfiguration**.
1247	Kind string `json:"kind,omitempty"`
1248
1249	// MysqlReplicaConfiguration: MySQL specific configuration when
1250	// replicating from a MySQL on-premises primary instance. Replication
1251	// configuration information such as the username, password,
1252	// certificates, and keys are not stored in the instance metadata. The
1253	// configuration information is used only to set up the replication
1254	// connection and is stored by MySQL in a file named **master.info** in
1255	// the data directory.
1256	MysqlReplicaConfiguration *DemoteMasterMySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"`
1257
1258	// ForceSendFields is a list of field names (e.g. "Kind") to
1259	// unconditionally include in API requests. By default, fields with
1260	// empty or default values are omitted from API requests. However, any
1261	// non-pointer, non-interface field appearing in ForceSendFields will be
1262	// sent to the server regardless of whether the field is empty or not.
1263	// This may be used to include empty fields in Patch requests.
1264	ForceSendFields []string `json:"-"`
1265
1266	// NullFields is a list of field names (e.g. "Kind") to include in API
1267	// requests with the JSON null value. By default, fields with empty
1268	// values are omitted from API requests. However, any field with an
1269	// empty value appearing in NullFields will be sent to the server as
1270	// null. It is an error if a field in this list has a non-empty value.
1271	// This may be used to include null fields in Patch requests.
1272	NullFields []string `json:"-"`
1273}
1274
1275func (s *DemoteMasterConfiguration) MarshalJSON() ([]byte, error) {
1276	type NoMethod DemoteMasterConfiguration
1277	raw := NoMethod(*s)
1278	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1279}
1280
1281// DemoteMasterContext: Database instance demote primary instance
1282// context.
1283type DemoteMasterContext struct {
1284	// Kind: This is always **sql#demoteMasterContext**.
1285	Kind string `json:"kind,omitempty"`
1286
1287	// MasterInstanceName: The name of the instance which will act as
1288	// on-premises primary instance in the replication setup.
1289	MasterInstanceName string `json:"masterInstanceName,omitempty"`
1290
1291	// ReplicaConfiguration: Configuration specific to read-replicas
1292	// replicating from the on-premises primary instance.
1293	ReplicaConfiguration *DemoteMasterConfiguration `json:"replicaConfiguration,omitempty"`
1294
1295	// SkipReplicationSetup: Flag to skip replication setup on the instance.
1296	SkipReplicationSetup bool `json:"skipReplicationSetup,omitempty"`
1297
1298	// VerifyGtidConsistency: Verify GTID consistency for demote operation.
1299	// Default value: **True**. Setting this flag to false enables you to
1300	// bypass GTID consistency check between on-premises primary instance
1301	// and Cloud SQL instance during the demotion operation but also exposes
1302	// you to the risk of future replication failures. Change the value only
1303	// if you know the reason for the GTID divergence and are confident that
1304	// doing so will not cause any replication issues.
1305	VerifyGtidConsistency bool `json:"verifyGtidConsistency,omitempty"`
1306
1307	// ForceSendFields is a list of field names (e.g. "Kind") to
1308	// unconditionally include in API requests. By default, fields with
1309	// empty or default values are omitted from API requests. However, any
1310	// non-pointer, non-interface field appearing in ForceSendFields will be
1311	// sent to the server regardless of whether the field is empty or not.
1312	// This may be used to include empty fields in Patch requests.
1313	ForceSendFields []string `json:"-"`
1314
1315	// NullFields is a list of field names (e.g. "Kind") to include in API
1316	// requests with the JSON null value. By default, fields with empty
1317	// values are omitted from API requests. However, any field with an
1318	// empty value appearing in NullFields will be sent to the server as
1319	// null. It is an error if a field in this list has a non-empty value.
1320	// This may be used to include null fields in Patch requests.
1321	NullFields []string `json:"-"`
1322}
1323
1324func (s *DemoteMasterContext) MarshalJSON() ([]byte, error) {
1325	type NoMethod DemoteMasterContext
1326	raw := NoMethod(*s)
1327	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1328}
1329
1330// DemoteMasterMySqlReplicaConfiguration: Read-replica configuration
1331// specific to MySQL databases.
1332type DemoteMasterMySqlReplicaConfiguration struct {
1333	// CaCertificate: PEM representation of the trusted CA's x509
1334	// certificate.
1335	CaCertificate string `json:"caCertificate,omitempty"`
1336
1337	// ClientCertificate: PEM representation of the replica's x509
1338	// certificate.
1339	ClientCertificate string `json:"clientCertificate,omitempty"`
1340
1341	// ClientKey: PEM representation of the replica's private key. The
1342	// corresponsing public key is encoded in the client's certificate. The
1343	// format of the replica's private key can be either PKCS #1 or PKCS #8.
1344	ClientKey string `json:"clientKey,omitempty"`
1345
1346	// Kind: This is always **sql#demoteMasterMysqlReplicaConfiguration**.
1347	Kind string `json:"kind,omitempty"`
1348
1349	// Password: The password for the replication connection.
1350	Password string `json:"password,omitempty"`
1351
1352	// Username: The username for the replication connection.
1353	Username string `json:"username,omitempty"`
1354
1355	// ForceSendFields is a list of field names (e.g. "CaCertificate") to
1356	// unconditionally include in API requests. By default, fields with
1357	// empty or default values are omitted from API requests. However, any
1358	// non-pointer, non-interface field appearing in ForceSendFields will be
1359	// sent to the server regardless of whether the field is empty or not.
1360	// This may be used to include empty fields in Patch requests.
1361	ForceSendFields []string `json:"-"`
1362
1363	// NullFields is a list of field names (e.g. "CaCertificate") to include
1364	// in API requests with the JSON null value. By default, fields with
1365	// empty values are omitted from API requests. However, any field with
1366	// an empty value appearing in NullFields will be sent to the server as
1367	// null. It is an error if a field in this list has a non-empty value.
1368	// This may be used to include null fields in Patch requests.
1369	NullFields []string `json:"-"`
1370}
1371
1372func (s *DemoteMasterMySqlReplicaConfiguration) MarshalJSON() ([]byte, error) {
1373	type NoMethod DemoteMasterMySqlReplicaConfiguration
1374	raw := NoMethod(*s)
1375	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1376}
1377
1378// DenyMaintenancePeriod: Deny maintenance Periods. This specifies a
1379// date range during when all CSA rollout will be denied.
1380type DenyMaintenancePeriod struct {
1381	// EndDate: "deny maintenance period" end date. If the year of the end
1382	// date is empty, the year of the start date also must be empty. In this
1383	// case, it means the no maintenance interval recurs every year. The
1384	// date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01
1385	EndDate string `json:"endDate,omitempty"`
1386
1387	// StartDate: "deny maintenance period" start date. If the year of the
1388	// start date is empty, the year of the end date also must be empty. In
1389	// this case, it means the deny maintenance period recurs every year.
1390	// The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e.,
1391	// 11-01
1392	StartDate string `json:"startDate,omitempty"`
1393
1394	// Time: Time in UTC when the "deny maintenance period" starts on
1395	// start_date and ends on end_date. The time is in format: HH:mm:SS,
1396	// i.e., 00:00:00
1397	Time string `json:"time,omitempty"`
1398
1399	// ForceSendFields is a list of field names (e.g. "EndDate") to
1400	// unconditionally include in API requests. By default, fields with
1401	// empty or default values are omitted from API requests. However, any
1402	// non-pointer, non-interface field appearing in ForceSendFields will be
1403	// sent to the server regardless of whether the field is empty or not.
1404	// This may be used to include empty fields in Patch requests.
1405	ForceSendFields []string `json:"-"`
1406
1407	// NullFields is a list of field names (e.g. "EndDate") to include in
1408	// API requests with the JSON null value. By default, fields with empty
1409	// values are omitted from API requests. However, any field with an
1410	// empty value appearing in NullFields will be sent to the server as
1411	// null. It is an error if a field in this list has a non-empty value.
1412	// This may be used to include null fields in Patch requests.
1413	NullFields []string `json:"-"`
1414}
1415
1416func (s *DenyMaintenancePeriod) MarshalJSON() ([]byte, error) {
1417	type NoMethod DenyMaintenancePeriod
1418	raw := NoMethod(*s)
1419	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1420}
1421
1422// DiskEncryptionConfiguration: Disk encryption configuration for an
1423// instance.
1424type DiskEncryptionConfiguration struct {
1425	// Kind: This is always **sql#diskEncryptionConfiguration**.
1426	Kind string `json:"kind,omitempty"`
1427
1428	// KmsKeyName: Resource name of KMS key for disk encryption
1429	KmsKeyName string `json:"kmsKeyName,omitempty"`
1430
1431	// ForceSendFields is a list of field names (e.g. "Kind") to
1432	// unconditionally include in API requests. By default, fields with
1433	// empty or default values are omitted from API requests. However, any
1434	// non-pointer, non-interface field appearing in ForceSendFields will be
1435	// sent to the server regardless of whether the field is empty or not.
1436	// This may be used to include empty fields in Patch requests.
1437	ForceSendFields []string `json:"-"`
1438
1439	// NullFields is a list of field names (e.g. "Kind") to include in API
1440	// requests with the JSON null value. By default, fields with empty
1441	// values are omitted from API requests. However, any field with an
1442	// empty value appearing in NullFields will be sent to the server as
1443	// null. It is an error if a field in this list has a non-empty value.
1444	// This may be used to include null fields in Patch requests.
1445	NullFields []string `json:"-"`
1446}
1447
1448func (s *DiskEncryptionConfiguration) MarshalJSON() ([]byte, error) {
1449	type NoMethod DiskEncryptionConfiguration
1450	raw := NoMethod(*s)
1451	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1452}
1453
1454// DiskEncryptionStatus: Disk encryption status for an instance.
1455type DiskEncryptionStatus struct {
1456	// Kind: This is always **sql#diskEncryptionStatus**.
1457	Kind string `json:"kind,omitempty"`
1458
1459	// KmsKeyVersionName: KMS key version used to encrypt the Cloud SQL
1460	// instance resource
1461	KmsKeyVersionName string `json:"kmsKeyVersionName,omitempty"`
1462
1463	// ForceSendFields is a list of field names (e.g. "Kind") to
1464	// unconditionally include in API requests. By default, fields with
1465	// empty or default values are omitted from API requests. However, any
1466	// non-pointer, non-interface field appearing in ForceSendFields will be
1467	// sent to the server regardless of whether the field is empty or not.
1468	// This may be used to include empty fields in Patch requests.
1469	ForceSendFields []string `json:"-"`
1470
1471	// NullFields is a list of field names (e.g. "Kind") to include in API
1472	// requests with the JSON null value. By default, fields with empty
1473	// values are omitted from API requests. However, any field with an
1474	// empty value appearing in NullFields will be sent to the server as
1475	// null. It is an error if a field in this list has a non-empty value.
1476	// This may be used to include null fields in Patch requests.
1477	NullFields []string `json:"-"`
1478}
1479
1480func (s *DiskEncryptionStatus) MarshalJSON() ([]byte, error) {
1481	type NoMethod DiskEncryptionStatus
1482	raw := NoMethod(*s)
1483	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1484}
1485
1486// ExportContext: Database instance export context.
1487type ExportContext struct {
1488	// CsvExportOptions: Options for exporting data as CSV. **MySQL** and
1489	// **PostgreSQL** instances only.
1490	CsvExportOptions *ExportContextCsvExportOptions `json:"csvExportOptions,omitempty"`
1491
1492	// Databases: Databases to be exported. **MySQL instances:** If
1493	// **fileType** is **SQL** and no database is specified, all databases
1494	// are exported, except for the **mysql** system database. If
1495	// **fileType** is **CSV**, you can specify one database, either by
1496	// using this property or by using the **csvExportOptions.selectQuery**
1497	// property, which takes precedence over this property. **PostgreSQL
1498	// instances:** You must specify one database to be exported. If
1499	// **fileType** is **CSV**, this database must match the one specified
1500	// in the **csvExportOptions.selectQuery** property. **SQL Server
1501	// instances:** You must specify one database to be exported, and the
1502	// **fileType** must be **BAK**.
1503	Databases []string `json:"databases,omitempty"`
1504
1505	// FileType: The file type for the specified uri.
1506	//
1507	// Possible values:
1508	//   "SQL_FILE_TYPE_UNSPECIFIED" - Unknown file type.
1509	//   "SQL" - File containing SQL statements.
1510	//   "CSV" - File in CSV format.
1511	//   "BAK"
1512	FileType string `json:"fileType,omitempty"`
1513
1514	// Kind: This is always **sql#exportContext**.
1515	Kind string `json:"kind,omitempty"`
1516
1517	// Offload: Option for export offload.
1518	Offload bool `json:"offload,omitempty"`
1519
1520	// SqlExportOptions: Options for exporting data as SQL statements.
1521	SqlExportOptions *ExportContextSqlExportOptions `json:"sqlExportOptions,omitempty"`
1522
1523	// Uri: The path to the file in Google Cloud Storage where the export
1524	// will be stored. The URI is in the form **gs://bucketName/fileName**.
1525	// If the file already exists, the request succeeds, but the operation
1526	// fails. If **fileType** is **SQL** and the filename ends with .gz, the
1527	// contents are compressed.
1528	Uri string `json:"uri,omitempty"`
1529
1530	// ForceSendFields is a list of field names (e.g. "CsvExportOptions") to
1531	// unconditionally include in API requests. By default, fields with
1532	// empty or default values are omitted from API requests. However, any
1533	// non-pointer, non-interface field appearing in ForceSendFields will be
1534	// sent to the server regardless of whether the field is empty or not.
1535	// This may be used to include empty fields in Patch requests.
1536	ForceSendFields []string `json:"-"`
1537
1538	// NullFields is a list of field names (e.g. "CsvExportOptions") to
1539	// include in API requests with the JSON null value. By default, fields
1540	// with empty values are omitted from API requests. However, any field
1541	// with an empty value appearing in NullFields will be sent to the
1542	// server as null. It is an error if a field in this list has a
1543	// non-empty value. This may be used to include null fields in Patch
1544	// requests.
1545	NullFields []string `json:"-"`
1546}
1547
1548func (s *ExportContext) MarshalJSON() ([]byte, error) {
1549	type NoMethod ExportContext
1550	raw := NoMethod(*s)
1551	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1552}
1553
1554// ExportContextCsvExportOptions: Options for exporting data as CSV.
1555// **MySQL** and **PostgreSQL** instances only.
1556type ExportContextCsvExportOptions struct {
1557	// EscapeCharacter: Specifies the character that should appear before a
1558	// data character that needs to be escaped.
1559	EscapeCharacter string `json:"escapeCharacter,omitempty"`
1560
1561	// FieldsTerminatedBy: Specifies the character that separates columns
1562	// within each row (line) of the file.
1563	FieldsTerminatedBy string `json:"fieldsTerminatedBy,omitempty"`
1564
1565	// LinesTerminatedBy: This is used to separate lines. If a line does not
1566	// contain all fields, the rest of the columns are set to their default
1567	// values.
1568	LinesTerminatedBy string `json:"linesTerminatedBy,omitempty"`
1569
1570	// QuoteCharacter: Specifies the quoting character to be used when a
1571	// data value is quoted.
1572	QuoteCharacter string `json:"quoteCharacter,omitempty"`
1573
1574	// SelectQuery: The select query used to extract the data.
1575	SelectQuery string `json:"selectQuery,omitempty"`
1576
1577	// ForceSendFields is a list of field names (e.g. "EscapeCharacter") to
1578	// unconditionally include in API requests. By default, fields with
1579	// empty or default values are omitted from API requests. However, any
1580	// non-pointer, non-interface field appearing in ForceSendFields will be
1581	// sent to the server regardless of whether the field is empty or not.
1582	// This may be used to include empty fields in Patch requests.
1583	ForceSendFields []string `json:"-"`
1584
1585	// NullFields is a list of field names (e.g. "EscapeCharacter") to
1586	// include in API requests with the JSON null value. By default, fields
1587	// with empty values are omitted from API requests. However, any field
1588	// with an empty value appearing in NullFields will be sent to the
1589	// server as null. It is an error if a field in this list has a
1590	// non-empty value. This may be used to include null fields in Patch
1591	// requests.
1592	NullFields []string `json:"-"`
1593}
1594
1595func (s *ExportContextCsvExportOptions) MarshalJSON() ([]byte, error) {
1596	type NoMethod ExportContextCsvExportOptions
1597	raw := NoMethod(*s)
1598	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1599}
1600
1601// ExportContextSqlExportOptions: Options for exporting data as SQL
1602// statements.
1603type ExportContextSqlExportOptions struct {
1604	// MysqlExportOptions: Options for exporting from MySQL.
1605	MysqlExportOptions *ExportContextSqlExportOptionsMysqlExportOptions `json:"mysqlExportOptions,omitempty"`
1606
1607	// SchemaOnly: Export only schemas.
1608	SchemaOnly bool `json:"schemaOnly,omitempty"`
1609
1610	// Tables: Tables to export, or that were exported, from the specified
1611	// database. If you specify tables, specify one and only one database.
1612	// For PostgreSQL instances, you can specify only one table.
1613	Tables []string `json:"tables,omitempty"`
1614
1615	// ForceSendFields is a list of field names (e.g. "MysqlExportOptions")
1616	// to unconditionally include in API requests. By default, fields with
1617	// empty or default values are omitted from API requests. However, any
1618	// non-pointer, non-interface field appearing in ForceSendFields will be
1619	// sent to the server regardless of whether the field is empty or not.
1620	// This may be used to include empty fields in Patch requests.
1621	ForceSendFields []string `json:"-"`
1622
1623	// NullFields is a list of field names (e.g. "MysqlExportOptions") to
1624	// include in API requests with the JSON null value. By default, fields
1625	// with empty values are omitted from API requests. However, any field
1626	// with an empty value appearing in NullFields will be sent to the
1627	// server as null. It is an error if a field in this list has a
1628	// non-empty value. This may be used to include null fields in Patch
1629	// requests.
1630	NullFields []string `json:"-"`
1631}
1632
1633func (s *ExportContextSqlExportOptions) MarshalJSON() ([]byte, error) {
1634	type NoMethod ExportContextSqlExportOptions
1635	raw := NoMethod(*s)
1636	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1637}
1638
1639// ExportContextSqlExportOptionsMysqlExportOptions: Options for
1640// exporting from MySQL.
1641type ExportContextSqlExportOptionsMysqlExportOptions struct {
1642	// MasterData: Option to include SQL statement required to set up
1643	// replication. If set to **1**, the dump file includes a CHANGE MASTER
1644	// TO statement with the binary log coordinates, and --set-gtid-purged
1645	// is set to ON. If set to **2**, the CHANGE MASTER TO statement is
1646	// written as a SQL comment and has no effect. If set to any value other
1647	// than **1**, --set-gtid-purged is set to OFF.
1648	MasterData int64 `json:"masterData,omitempty"`
1649
1650	// ForceSendFields is a list of field names (e.g. "MasterData") to
1651	// unconditionally include in API requests. By default, fields with
1652	// empty or default values are omitted from API requests. However, any
1653	// non-pointer, non-interface field appearing in ForceSendFields will be
1654	// sent to the server regardless of whether the field is empty or not.
1655	// This may be used to include empty fields in Patch requests.
1656	ForceSendFields []string `json:"-"`
1657
1658	// NullFields is a list of field names (e.g. "MasterData") to include in
1659	// API requests with the JSON null value. By default, fields with empty
1660	// values are omitted from API requests. However, any field with an
1661	// empty value appearing in NullFields will be sent to the server as
1662	// null. It is an error if a field in this list has a non-empty value.
1663	// This may be used to include null fields in Patch requests.
1664	NullFields []string `json:"-"`
1665}
1666
1667func (s *ExportContextSqlExportOptionsMysqlExportOptions) MarshalJSON() ([]byte, error) {
1668	type NoMethod ExportContextSqlExportOptionsMysqlExportOptions
1669	raw := NoMethod(*s)
1670	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1671}
1672
1673// FailoverContext: Database instance failover context.
1674type FailoverContext struct {
1675	// Kind: This is always **sql#failoverContext**.
1676	Kind string `json:"kind,omitempty"`
1677
1678	// SettingsVersion: The current settings version of this instance.
1679	// Request will be rejected if this version doesn't match the current
1680	// settings version.
1681	SettingsVersion int64 `json:"settingsVersion,omitempty,string"`
1682
1683	// ForceSendFields is a list of field names (e.g. "Kind") to
1684	// unconditionally include in API requests. By default, fields with
1685	// empty or default values are omitted from API requests. However, any
1686	// non-pointer, non-interface field appearing in ForceSendFields will be
1687	// sent to the server regardless of whether the field is empty or not.
1688	// This may be used to include empty fields in Patch requests.
1689	ForceSendFields []string `json:"-"`
1690
1691	// NullFields is a list of field names (e.g. "Kind") to include in API
1692	// requests with the JSON null value. By default, fields with empty
1693	// values are omitted from API requests. However, any field with an
1694	// empty value appearing in NullFields will be sent to the server as
1695	// null. It is an error if a field in this list has a non-empty value.
1696	// This may be used to include null fields in Patch requests.
1697	NullFields []string `json:"-"`
1698}
1699
1700func (s *FailoverContext) MarshalJSON() ([]byte, error) {
1701	type NoMethod FailoverContext
1702	raw := NoMethod(*s)
1703	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1704}
1705
1706// Flag: A flag resource.
1707type Flag struct {
1708	// AllowedIntValues: Use this field if only certain integers are
1709	// accepted. Can be combined with min_value and max_value to add
1710	// additional values.
1711	AllowedIntValues googleapi.Int64s `json:"allowedIntValues,omitempty"`
1712
1713	// AllowedStringValues: For **STRING** flags, a list of strings that the
1714	// value can be set to.
1715	AllowedStringValues []string `json:"allowedStringValues,omitempty"`
1716
1717	// AppliesTo: The database version this flag applies to. Can be
1718	// **MYSQL_8_0**, **MYSQL_5_6**, or **MYSQL_5_7**.
1719	//
1720	// Possible values:
1721	//   "SQL_DATABASE_VERSION_UNSPECIFIED" - This is an unknown database
1722	// version.
1723	//   "MYSQL_5_1" - The database version is MySQL 5.1.
1724	//   "MYSQL_5_5" - The database version is MySQL 5.5.
1725	//   "MYSQL_5_6" - The database version is MySQL 5.6.
1726	//   "MYSQL_5_7" - The database version is MySQL 5.7.
1727	//   "POSTGRES_9_6" - The database version is PostgreSQL 9.6.
1728	//   "POSTGRES_11" - The database version is PostgreSQL 11.
1729	//   "SQLSERVER_2017_STANDARD" - The database version is SQL Server 2017
1730	// Standard.
1731	//   "SQLSERVER_2017_ENTERPRISE" - The database version is SQL Server
1732	// 2017 Enterprise.
1733	//   "SQLSERVER_2017_EXPRESS" - The database version is SQL Server 2017
1734	// Express.
1735	//   "SQLSERVER_2017_WEB" - The database version is SQL Server 2017 Web.
1736	//   "POSTGRES_10" - The database version is PostgreSQL 10.
1737	//   "POSTGRES_12" - The database version is PostgreSQL 12.
1738	//   "MYSQL_8_0" - The database version is MySQL 8.
1739	//   "MYSQL_8_0_18" - The database major version is MySQL 8.0 and the
1740	// minor version is 18.
1741	//   "MYSQL_8_0_26" - The database major version is MySQL 8.0 and the
1742	// minor version is 26.
1743	//   "POSTGRES_13" - The database version is PostgreSQL 13.
1744	//   "POSTGRES_14" - The database version is PostgreSQL 14.
1745	//   "SQLSERVER_2019_STANDARD" - The database version is SQL Server 2019
1746	// Standard.
1747	//   "SQLSERVER_2019_ENTERPRISE" - The database version is SQL Server
1748	// 2019 Enterprise.
1749	//   "SQLSERVER_2019_EXPRESS" - The database version is SQL Server 2019
1750	// Express.
1751	//   "SQLSERVER_2019_WEB" - The database version is SQL Server 2019 Web.
1752	AppliesTo []string `json:"appliesTo,omitempty"`
1753
1754	// InBeta: Whether or not the flag is considered in beta.
1755	InBeta bool `json:"inBeta,omitempty"`
1756
1757	// Kind: This is always **sql#flag**.
1758	Kind string `json:"kind,omitempty"`
1759
1760	// MaxValue: For **INTEGER** flags, the maximum allowed value.
1761	MaxValue int64 `json:"maxValue,omitempty,string"`
1762
1763	// MinValue: For **INTEGER** flags, the minimum allowed value.
1764	MinValue int64 `json:"minValue,omitempty,string"`
1765
1766	// Name: This is the name of the flag. Flag names always use
1767	// underscores, not hyphens, for example: **max_allowed_packet**
1768	Name string `json:"name,omitempty"`
1769
1770	// RequiresRestart: Indicates whether changing this flag will trigger a
1771	// database restart. Only applicable to Second Generation instances.
1772	RequiresRestart bool `json:"requiresRestart,omitempty"`
1773
1774	// Type: The type of the flag. Flags are typed to being **BOOLEAN**,
1775	// **STRING**, **INTEGER** or **NONE**. **NONE** is used for flags which
1776	// do not take a value, such as **skip_grant_tables**.
1777	//
1778	// Possible values:
1779	//   "SQL_FLAG_TYPE_UNSPECIFIED" - This is an unknown flag type.
1780	//   "BOOLEAN" - Boolean type flag.
1781	//   "STRING" - String type flag.
1782	//   "INTEGER" - Integer type flag.
1783	//   "NONE" - Flag type used for a server startup option.
1784	//   "MYSQL_TIMEZONE_OFFSET" - Type introduced specially for MySQL
1785	// TimeZone offset. Accept a string value with the format [-12:59,
1786	// 13:00].
1787	//   "FLOAT" - Float type flag.
1788	//   "REPEATED_STRING" - Comma-separated list of the strings in a
1789	// SqlFlagType enum.
1790	Type string `json:"type,omitempty"`
1791
1792	// ForceSendFields is a list of field names (e.g. "AllowedIntValues") to
1793	// unconditionally include in API requests. By default, fields with
1794	// empty or default values are omitted from API requests. However, any
1795	// non-pointer, non-interface field appearing in ForceSendFields will be
1796	// sent to the server regardless of whether the field is empty or not.
1797	// This may be used to include empty fields in Patch requests.
1798	ForceSendFields []string `json:"-"`
1799
1800	// NullFields is a list of field names (e.g. "AllowedIntValues") to
1801	// include in API requests with the JSON null value. By default, fields
1802	// with empty values are omitted from API requests. However, any field
1803	// with an empty value appearing in NullFields will be sent to the
1804	// server as null. It is an error if a field in this list has a
1805	// non-empty value. This may be used to include null fields in Patch
1806	// requests.
1807	NullFields []string `json:"-"`
1808}
1809
1810func (s *Flag) MarshalJSON() ([]byte, error) {
1811	type NoMethod Flag
1812	raw := NoMethod(*s)
1813	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1814}
1815
1816// FlagsListResponse: Flags list response.
1817type FlagsListResponse struct {
1818	// Items: List of flags.
1819	Items []*Flag `json:"items,omitempty"`
1820
1821	// Kind: This is always **sql#flagsList**.
1822	Kind string `json:"kind,omitempty"`
1823
1824	// ServerResponse contains the HTTP response code and headers from the
1825	// server.
1826	googleapi.ServerResponse `json:"-"`
1827
1828	// ForceSendFields is a list of field names (e.g. "Items") to
1829	// unconditionally include in API requests. By default, fields with
1830	// empty or default values are omitted from API requests. However, any
1831	// non-pointer, non-interface field appearing in ForceSendFields will be
1832	// sent to the server regardless of whether the field is empty or not.
1833	// This may be used to include empty fields in Patch requests.
1834	ForceSendFields []string `json:"-"`
1835
1836	// NullFields is a list of field names (e.g. "Items") to include in API
1837	// requests with the JSON null value. By default, fields with empty
1838	// values are omitted from API requests. However, any field with an
1839	// empty value appearing in NullFields will be sent to the server as
1840	// null. It is an error if a field in this list has a non-empty value.
1841	// This may be used to include null fields in Patch requests.
1842	NullFields []string `json:"-"`
1843}
1844
1845func (s *FlagsListResponse) MarshalJSON() ([]byte, error) {
1846	type NoMethod FlagsListResponse
1847	raw := NoMethod(*s)
1848	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1849}
1850
1851// GenerateEphemeralCertRequest: Ephemeral certificate creation request.
1852type GenerateEphemeralCertRequest struct {
1853	// AccessToken: Optional. Access token to include in the signed
1854	// certificate.
1855	AccessToken string `json:"access_token,omitempty"`
1856
1857	// PublicKey: PEM encoded public key to include in the signed
1858	// certificate.
1859	PublicKey string `json:"public_key,omitempty"`
1860
1861	// ReadTime: Optional. Optional snapshot read timestamp to trade
1862	// freshness for performance.
1863	ReadTime string `json:"readTime,omitempty"`
1864
1865	// ValidDuration: Optional. If set, it will contain the cert valid
1866	// duration.
1867	ValidDuration string `json:"validDuration,omitempty"`
1868
1869	// ForceSendFields is a list of field names (e.g. "AccessToken") to
1870	// unconditionally include in API requests. By default, fields with
1871	// empty or default values are omitted from API requests. However, any
1872	// non-pointer, non-interface field appearing in ForceSendFields will be
1873	// sent to the server regardless of whether the field is empty or not.
1874	// This may be used to include empty fields in Patch requests.
1875	ForceSendFields []string `json:"-"`
1876
1877	// NullFields is a list of field names (e.g. "AccessToken") to include
1878	// in API requests with the JSON null value. By default, fields with
1879	// empty values are omitted from API requests. However, any field with
1880	// an empty value appearing in NullFields will be sent to the server as
1881	// null. It is an error if a field in this list has a non-empty value.
1882	// This may be used to include null fields in Patch requests.
1883	NullFields []string `json:"-"`
1884}
1885
1886func (s *GenerateEphemeralCertRequest) MarshalJSON() ([]byte, error) {
1887	type NoMethod GenerateEphemeralCertRequest
1888	raw := NoMethod(*s)
1889	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1890}
1891
1892// GenerateEphemeralCertResponse: Ephemeral certificate creation
1893// request.
1894type GenerateEphemeralCertResponse struct {
1895	// EphemeralCert: Generated cert
1896	EphemeralCert *SslCert `json:"ephemeralCert,omitempty"`
1897
1898	// ServerResponse contains the HTTP response code and headers from the
1899	// server.
1900	googleapi.ServerResponse `json:"-"`
1901
1902	// ForceSendFields is a list of field names (e.g. "EphemeralCert") to
1903	// unconditionally include in API requests. By default, fields with
1904	// empty or default values are omitted from API requests. However, any
1905	// non-pointer, non-interface field appearing in ForceSendFields will be
1906	// sent to the server regardless of whether the field is empty or not.
1907	// This may be used to include empty fields in Patch requests.
1908	ForceSendFields []string `json:"-"`
1909
1910	// NullFields is a list of field names (e.g. "EphemeralCert") to include
1911	// in API requests with the JSON null value. By default, fields with
1912	// empty values are omitted from API requests. However, any field with
1913	// an empty value appearing in NullFields will be sent to the server as
1914	// null. It is an error if a field in this list has a non-empty value.
1915	// This may be used to include null fields in Patch requests.
1916	NullFields []string `json:"-"`
1917}
1918
1919func (s *GenerateEphemeralCertResponse) MarshalJSON() ([]byte, error) {
1920	type NoMethod GenerateEphemeralCertResponse
1921	raw := NoMethod(*s)
1922	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1923}
1924
1925// ImportContext: Database instance import context.
1926type ImportContext struct {
1927	// BakImportOptions: Import parameters specific to SQL Server .BAK files
1928	BakImportOptions *ImportContextBakImportOptions `json:"bakImportOptions,omitempty"`
1929
1930	// CsvImportOptions: Options for importing data as CSV.
1931	CsvImportOptions *ImportContextCsvImportOptions `json:"csvImportOptions,omitempty"`
1932
1933	// Database: The target database for the import. If **fileType** is
1934	// **SQL**, this field is required only if the import file does not
1935	// specify a database, and is overridden by any database specification
1936	// in the import file. If **fileType** is **CSV**, one database must be
1937	// specified.
1938	Database string `json:"database,omitempty"`
1939
1940	// FileType: The file type for the specified uri. **SQL**: The file
1941	// contains SQL statements. **CSV**: The file contains CSV data.
1942	//
1943	// Possible values:
1944	//   "SQL_FILE_TYPE_UNSPECIFIED" - Unknown file type.
1945	//   "SQL" - File containing SQL statements.
1946	//   "CSV" - File in CSV format.
1947	//   "BAK"
1948	FileType string `json:"fileType,omitempty"`
1949
1950	// ImportUser: The PostgreSQL user for this import operation. PostgreSQL
1951	// instances only.
1952	ImportUser string `json:"importUser,omitempty"`
1953
1954	// Kind: This is always **sql#importContext**.
1955	Kind string `json:"kind,omitempty"`
1956
1957	// Uri: Path to the import file in Cloud Storage, in the form
1958	// **gs://bucketName/fileName**. Compressed gzip files (.gz) are
1959	// supported when **fileType** is **SQL**. The instance must have write
1960	// permissions to the bucket and read access to the file.
1961	Uri string `json:"uri,omitempty"`
1962
1963	// ForceSendFields is a list of field names (e.g. "BakImportOptions") to
1964	// unconditionally include in API requests. By default, fields with
1965	// empty or default values are omitted from API requests. However, any
1966	// non-pointer, non-interface field appearing in ForceSendFields will be
1967	// sent to the server regardless of whether the field is empty or not.
1968	// This may be used to include empty fields in Patch requests.
1969	ForceSendFields []string `json:"-"`
1970
1971	// NullFields is a list of field names (e.g. "BakImportOptions") to
1972	// include in API requests with the JSON null value. By default, fields
1973	// with empty values are omitted from API requests. However, any field
1974	// with an empty value appearing in NullFields will be sent to the
1975	// server as null. It is an error if a field in this list has a
1976	// non-empty value. This may be used to include null fields in Patch
1977	// requests.
1978	NullFields []string `json:"-"`
1979}
1980
1981func (s *ImportContext) MarshalJSON() ([]byte, error) {
1982	type NoMethod ImportContext
1983	raw := NoMethod(*s)
1984	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1985}
1986
1987// ImportContextBakImportOptions: Import parameters specific to SQL
1988// Server .BAK files
1989type ImportContextBakImportOptions struct {
1990	EncryptionOptions *ImportContextBakImportOptionsEncryptionOptions `json:"encryptionOptions,omitempty"`
1991
1992	// ForceSendFields is a list of field names (e.g. "EncryptionOptions")
1993	// to unconditionally include in API requests. By default, fields with
1994	// empty or default values are omitted from API requests. However, any
1995	// non-pointer, non-interface field appearing in ForceSendFields will be
1996	// sent to the server regardless of whether the field is empty or not.
1997	// This may be used to include empty fields in Patch requests.
1998	ForceSendFields []string `json:"-"`
1999
2000	// NullFields is a list of field names (e.g. "EncryptionOptions") to
2001	// include in API requests with the JSON null value. By default, fields
2002	// with empty values are omitted from API requests. However, any field
2003	// with an empty value appearing in NullFields will be sent to the
2004	// server as null. It is an error if a field in this list has a
2005	// non-empty value. This may be used to include null fields in Patch
2006	// requests.
2007	NullFields []string `json:"-"`
2008}
2009
2010func (s *ImportContextBakImportOptions) MarshalJSON() ([]byte, error) {
2011	type NoMethod ImportContextBakImportOptions
2012	raw := NoMethod(*s)
2013	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2014}
2015
2016type ImportContextBakImportOptionsEncryptionOptions struct {
2017	// CertPath: Path to the Certificate (.cer) in Cloud Storage, in the
2018	// form **gs://bucketName/fileName**. The instance must have write
2019	// permissions to the bucket and read access to the file.
2020	CertPath string `json:"certPath,omitempty"`
2021
2022	// PvkPassword: Password that encrypts the private key
2023	PvkPassword string `json:"pvkPassword,omitempty"`
2024
2025	// PvkPath: Path to the Certificate Private Key (.pvk) in Cloud Storage,
2026	// in the form **gs://bucketName/fileName**. The instance must have
2027	// write permissions to the bucket and read access to the file.
2028	PvkPath string `json:"pvkPath,omitempty"`
2029
2030	// ForceSendFields is a list of field names (e.g. "CertPath") to
2031	// unconditionally include in API requests. By default, fields with
2032	// empty or default values are omitted from API requests. However, any
2033	// non-pointer, non-interface field appearing in ForceSendFields will be
2034	// sent to the server regardless of whether the field is empty or not.
2035	// This may be used to include empty fields in Patch requests.
2036	ForceSendFields []string `json:"-"`
2037
2038	// NullFields is a list of field names (e.g. "CertPath") to include in
2039	// API requests with the JSON null value. By default, fields with empty
2040	// values are omitted from API requests. However, any field with an
2041	// empty value appearing in NullFields will be sent to the server as
2042	// null. It is an error if a field in this list has a non-empty value.
2043	// This may be used to include null fields in Patch requests.
2044	NullFields []string `json:"-"`
2045}
2046
2047func (s *ImportContextBakImportOptionsEncryptionOptions) MarshalJSON() ([]byte, error) {
2048	type NoMethod ImportContextBakImportOptionsEncryptionOptions
2049	raw := NoMethod(*s)
2050	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2051}
2052
2053// ImportContextCsvImportOptions: Options for importing data as CSV.
2054type ImportContextCsvImportOptions struct {
2055	// Columns: The columns to which CSV data is imported. If not specified,
2056	// all columns of the database table are loaded with CSV data.
2057	Columns []string `json:"columns,omitempty"`
2058
2059	// EscapeCharacter: Specifies the character that should appear before a
2060	// data character that needs to be escaped.
2061	EscapeCharacter string `json:"escapeCharacter,omitempty"`
2062
2063	// FieldsTerminatedBy: Specifies the character that separates columns
2064	// within each row (line) of the file.
2065	FieldsTerminatedBy string `json:"fieldsTerminatedBy,omitempty"`
2066
2067	// LinesTerminatedBy: This is used to separate lines. If a line does not
2068	// contain all fields, the rest of the columns are set to their default
2069	// values.
2070	LinesTerminatedBy string `json:"linesTerminatedBy,omitempty"`
2071
2072	// QuoteCharacter: Specifies the quoting character to be used when a
2073	// data value is quoted.
2074	QuoteCharacter string `json:"quoteCharacter,omitempty"`
2075
2076	// Table: The table to which CSV data is imported.
2077	Table string `json:"table,omitempty"`
2078
2079	// ForceSendFields is a list of field names (e.g. "Columns") to
2080	// unconditionally include in API requests. By default, fields with
2081	// empty or default values are omitted from API requests. However, any
2082	// non-pointer, non-interface field appearing in ForceSendFields will be
2083	// sent to the server regardless of whether the field is empty or not.
2084	// This may be used to include empty fields in Patch requests.
2085	ForceSendFields []string `json:"-"`
2086
2087	// NullFields is a list of field names (e.g. "Columns") to include in
2088	// API requests with the JSON null value. By default, fields with empty
2089	// values are omitted from API requests. However, any field with an
2090	// empty value appearing in NullFields will be sent to the server as
2091	// null. It is an error if a field in this list has a non-empty value.
2092	// This may be used to include null fields in Patch requests.
2093	NullFields []string `json:"-"`
2094}
2095
2096func (s *ImportContextCsvImportOptions) MarshalJSON() ([]byte, error) {
2097	type NoMethod ImportContextCsvImportOptions
2098	raw := NoMethod(*s)
2099	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2100}
2101
2102// InsightsConfig: Insights configuration. This specifies when Cloud SQL
2103// Insights feature is enabled and optional configuration.
2104type InsightsConfig struct {
2105	// QueryInsightsEnabled: Whether Query Insights feature is enabled.
2106	QueryInsightsEnabled bool `json:"queryInsightsEnabled,omitempty"`
2107
2108	// QueryPlansPerMinute: Number of query execution plans captured by
2109	// Insights per minute for all queries combined. Default is 5.
2110	QueryPlansPerMinute int64 `json:"queryPlansPerMinute,omitempty"`
2111
2112	// QueryStringLength: Maximum query length stored in bytes. Default
2113	// value: 1024 bytes. Range: 256-4500 bytes. Query length more than this
2114	// field value will be truncated to this value. When unset, query length
2115	// will be the default value. Changing query length will restart the
2116	// database.
2117	QueryStringLength int64 `json:"queryStringLength,omitempty"`
2118
2119	// RecordApplicationTags: Whether Query Insights will record application
2120	// tags from query when enabled.
2121	RecordApplicationTags bool `json:"recordApplicationTags,omitempty"`
2122
2123	// RecordClientAddress: Whether Query Insights will record client
2124	// address when enabled.
2125	RecordClientAddress bool `json:"recordClientAddress,omitempty"`
2126
2127	// ForceSendFields is a list of field names (e.g.
2128	// "QueryInsightsEnabled") to unconditionally include in API requests.
2129	// By default, fields with empty or default values are omitted from API
2130	// requests. However, any non-pointer, non-interface field appearing in
2131	// ForceSendFields will be sent to the server regardless of whether the
2132	// field is empty or not. This may be used to include empty fields in
2133	// Patch requests.
2134	ForceSendFields []string `json:"-"`
2135
2136	// NullFields is a list of field names (e.g. "QueryInsightsEnabled") to
2137	// include in API requests with the JSON null value. By default, fields
2138	// with empty values are omitted from API requests. However, any field
2139	// with an empty value appearing in NullFields will be sent to the
2140	// server as null. It is an error if a field in this list has a
2141	// non-empty value. This may be used to include null fields in Patch
2142	// requests.
2143	NullFields []string `json:"-"`
2144}
2145
2146func (s *InsightsConfig) MarshalJSON() ([]byte, error) {
2147	type NoMethod InsightsConfig
2148	raw := NoMethod(*s)
2149	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2150}
2151
2152// InstanceReference: Reference to another Cloud SQL instance.
2153type InstanceReference struct {
2154	// Name: The name of the Cloud SQL instance being referenced. This does
2155	// not include the project ID.
2156	Name string `json:"name,omitempty"`
2157
2158	// Project: The project ID of the Cloud SQL instance being referenced.
2159	// The default is the same project ID as the instance references it.
2160	Project string `json:"project,omitempty"`
2161
2162	// Region: The region of the Cloud SQL instance being referenced.
2163	Region string `json:"region,omitempty"`
2164
2165	// ForceSendFields is a list of field names (e.g. "Name") to
2166	// unconditionally include in API requests. By default, fields with
2167	// empty or default values are omitted from API requests. However, any
2168	// non-pointer, non-interface field appearing in ForceSendFields will be
2169	// sent to the server regardless of whether the field is empty or not.
2170	// This may be used to include empty fields in Patch requests.
2171	ForceSendFields []string `json:"-"`
2172
2173	// NullFields is a list of field names (e.g. "Name") to include in API
2174	// requests with the JSON null value. By default, fields with empty
2175	// values are omitted from API requests. However, any field with an
2176	// empty value appearing in NullFields will be sent to the server as
2177	// null. It is an error if a field in this list has a non-empty value.
2178	// This may be used to include null fields in Patch requests.
2179	NullFields []string `json:"-"`
2180}
2181
2182func (s *InstanceReference) MarshalJSON() ([]byte, error) {
2183	type NoMethod InstanceReference
2184	raw := NoMethod(*s)
2185	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2186}
2187
2188// InstancesCloneRequest: Database instance clone request.
2189type InstancesCloneRequest struct {
2190	// CloneContext: Contains details about the clone operation.
2191	CloneContext *CloneContext `json:"cloneContext,omitempty"`
2192
2193	// ForceSendFields is a list of field names (e.g. "CloneContext") to
2194	// unconditionally include in API requests. By default, fields with
2195	// empty or default values are omitted from API requests. However, any
2196	// non-pointer, non-interface field appearing in ForceSendFields will be
2197	// sent to the server regardless of whether the field is empty or not.
2198	// This may be used to include empty fields in Patch requests.
2199	ForceSendFields []string `json:"-"`
2200
2201	// NullFields is a list of field names (e.g. "CloneContext") to include
2202	// in API requests with the JSON null value. By default, fields with
2203	// empty values are omitted from API requests. However, any field with
2204	// an empty value appearing in NullFields will be sent to the server as
2205	// null. It is an error if a field in this list has a non-empty value.
2206	// This may be used to include null fields in Patch requests.
2207	NullFields []string `json:"-"`
2208}
2209
2210func (s *InstancesCloneRequest) MarshalJSON() ([]byte, error) {
2211	type NoMethod InstancesCloneRequest
2212	raw := NoMethod(*s)
2213	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2214}
2215
2216// InstancesDemoteMasterRequest: Database demote primary instance
2217// request.
2218type InstancesDemoteMasterRequest struct {
2219	// DemoteMasterContext: Contains details about the demoteMaster
2220	// operation.
2221	DemoteMasterContext *DemoteMasterContext `json:"demoteMasterContext,omitempty"`
2222
2223	// ForceSendFields is a list of field names (e.g. "DemoteMasterContext")
2224	// to unconditionally include in API requests. By default, fields with
2225	// empty or default values are omitted from API requests. However, any
2226	// non-pointer, non-interface field appearing in ForceSendFields will be
2227	// sent to the server regardless of whether the field is empty or not.
2228	// This may be used to include empty fields in Patch requests.
2229	ForceSendFields []string `json:"-"`
2230
2231	// NullFields is a list of field names (e.g. "DemoteMasterContext") to
2232	// include in API requests with the JSON null value. By default, fields
2233	// with empty values are omitted from API requests. However, any field
2234	// with an empty value appearing in NullFields will be sent to the
2235	// server as null. It is an error if a field in this list has a
2236	// non-empty value. This may be used to include null fields in Patch
2237	// requests.
2238	NullFields []string `json:"-"`
2239}
2240
2241func (s *InstancesDemoteMasterRequest) MarshalJSON() ([]byte, error) {
2242	type NoMethod InstancesDemoteMasterRequest
2243	raw := NoMethod(*s)
2244	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2245}
2246
2247// InstancesExportRequest: Database instance export request.
2248type InstancesExportRequest struct {
2249	// ExportContext: Contains details about the export operation.
2250	ExportContext *ExportContext `json:"exportContext,omitempty"`
2251
2252	// ForceSendFields is a list of field names (e.g. "ExportContext") to
2253	// unconditionally include in API requests. By default, fields with
2254	// empty or default values are omitted from API requests. However, any
2255	// non-pointer, non-interface field appearing in ForceSendFields will be
2256	// sent to the server regardless of whether the field is empty or not.
2257	// This may be used to include empty fields in Patch requests.
2258	ForceSendFields []string `json:"-"`
2259
2260	// NullFields is a list of field names (e.g. "ExportContext") to include
2261	// in API requests with the JSON null value. By default, fields with
2262	// empty values are omitted from API requests. However, any field with
2263	// an empty value appearing in NullFields will be sent to the server as
2264	// null. It is an error if a field in this list has a non-empty value.
2265	// This may be used to include null fields in Patch requests.
2266	NullFields []string `json:"-"`
2267}
2268
2269func (s *InstancesExportRequest) MarshalJSON() ([]byte, error) {
2270	type NoMethod InstancesExportRequest
2271	raw := NoMethod(*s)
2272	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2273}
2274
2275// InstancesFailoverRequest: Instance failover request.
2276type InstancesFailoverRequest struct {
2277	// FailoverContext: Failover Context.
2278	FailoverContext *FailoverContext `json:"failoverContext,omitempty"`
2279
2280	// ForceSendFields is a list of field names (e.g. "FailoverContext") to
2281	// unconditionally include in API requests. By default, fields with
2282	// empty or default values are omitted from API requests. However, any
2283	// non-pointer, non-interface field appearing in ForceSendFields will be
2284	// sent to the server regardless of whether the field is empty or not.
2285	// This may be used to include empty fields in Patch requests.
2286	ForceSendFields []string `json:"-"`
2287
2288	// NullFields is a list of field names (e.g. "FailoverContext") to
2289	// include in API requests with the JSON null value. By default, fields
2290	// with empty values are omitted from API requests. However, any field
2291	// with an empty value appearing in NullFields will be sent to the
2292	// server as null. It is an error if a field in this list has a
2293	// non-empty value. This may be used to include null fields in Patch
2294	// requests.
2295	NullFields []string `json:"-"`
2296}
2297
2298func (s *InstancesFailoverRequest) MarshalJSON() ([]byte, error) {
2299	type NoMethod InstancesFailoverRequest
2300	raw := NoMethod(*s)
2301	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2302}
2303
2304// InstancesImportRequest: Database instance import request.
2305type InstancesImportRequest struct {
2306	// ImportContext: Contains details about the import operation.
2307	ImportContext *ImportContext `json:"importContext,omitempty"`
2308
2309	// ForceSendFields is a list of field names (e.g. "ImportContext") to
2310	// unconditionally include in API requests. By default, fields with
2311	// empty or default values are omitted from API requests. However, any
2312	// non-pointer, non-interface field appearing in ForceSendFields will be
2313	// sent to the server regardless of whether the field is empty or not.
2314	// This may be used to include empty fields in Patch requests.
2315	ForceSendFields []string `json:"-"`
2316
2317	// NullFields is a list of field names (e.g. "ImportContext") to include
2318	// in API requests with the JSON null value. By default, fields with
2319	// empty values are omitted from API requests. However, any field with
2320	// an empty value appearing in NullFields will be sent to the server as
2321	// null. It is an error if a field in this list has a non-empty value.
2322	// This may be used to include null fields in Patch requests.
2323	NullFields []string `json:"-"`
2324}
2325
2326func (s *InstancesImportRequest) MarshalJSON() ([]byte, error) {
2327	type NoMethod InstancesImportRequest
2328	raw := NoMethod(*s)
2329	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2330}
2331
2332// InstancesListResponse: Database instances list response.
2333type InstancesListResponse struct {
2334	// Items: List of database instance resources.
2335	Items []*DatabaseInstance `json:"items,omitempty"`
2336
2337	// Kind: This is always **sql#instancesList**.
2338	Kind string `json:"kind,omitempty"`
2339
2340	// NextPageToken: The continuation token, used to page through large
2341	// result sets. Provide this value in a subsequent request to return the
2342	// next page of results.
2343	NextPageToken string `json:"nextPageToken,omitempty"`
2344
2345	// Warnings: List of warnings that occurred while handling the request.
2346	Warnings []*ApiWarning `json:"warnings,omitempty"`
2347
2348	// ServerResponse contains the HTTP response code and headers from the
2349	// server.
2350	googleapi.ServerResponse `json:"-"`
2351
2352	// ForceSendFields is a list of field names (e.g. "Items") to
2353	// unconditionally include in API requests. By default, fields with
2354	// empty or default values are omitted from API requests. However, any
2355	// non-pointer, non-interface field appearing in ForceSendFields will be
2356	// sent to the server regardless of whether the field is empty or not.
2357	// This may be used to include empty fields in Patch requests.
2358	ForceSendFields []string `json:"-"`
2359
2360	// NullFields is a list of field names (e.g. "Items") to include in API
2361	// requests with the JSON null value. By default, fields with empty
2362	// values are omitted from API requests. However, any field with an
2363	// empty value appearing in NullFields will be sent to the server as
2364	// null. It is an error if a field in this list has a non-empty value.
2365	// This may be used to include null fields in Patch requests.
2366	NullFields []string `json:"-"`
2367}
2368
2369func (s *InstancesListResponse) MarshalJSON() ([]byte, error) {
2370	type NoMethod InstancesListResponse
2371	raw := NoMethod(*s)
2372	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2373}
2374
2375// InstancesListServerCasResponse: Instances ListServerCas response.
2376type InstancesListServerCasResponse struct {
2377	ActiveVersion string `json:"activeVersion,omitempty"`
2378
2379	// Certs: List of server CA certificates for the instance.
2380	Certs []*SslCert `json:"certs,omitempty"`
2381
2382	// Kind: This is always **sql#instancesListServerCas**.
2383	Kind string `json:"kind,omitempty"`
2384
2385	// ServerResponse contains the HTTP response code and headers from the
2386	// server.
2387	googleapi.ServerResponse `json:"-"`
2388
2389	// ForceSendFields is a list of field names (e.g. "ActiveVersion") to
2390	// unconditionally include in API requests. By default, fields with
2391	// empty or default values are omitted from API requests. However, any
2392	// non-pointer, non-interface field appearing in ForceSendFields will be
2393	// sent to the server regardless of whether the field is empty or not.
2394	// This may be used to include empty fields in Patch requests.
2395	ForceSendFields []string `json:"-"`
2396
2397	// NullFields is a list of field names (e.g. "ActiveVersion") to include
2398	// in API requests with the JSON null value. By default, fields with
2399	// empty values are omitted from API requests. However, any field with
2400	// an empty value appearing in NullFields will be sent to the server as
2401	// null. It is an error if a field in this list has a non-empty value.
2402	// This may be used to include null fields in Patch requests.
2403	NullFields []string `json:"-"`
2404}
2405
2406func (s *InstancesListServerCasResponse) MarshalJSON() ([]byte, error) {
2407	type NoMethod InstancesListServerCasResponse
2408	raw := NoMethod(*s)
2409	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2410}
2411
2412// InstancesRestoreBackupRequest: Database instance restore backup
2413// request.
2414type InstancesRestoreBackupRequest struct {
2415	// RestoreBackupContext: Parameters required to perform the restore
2416	// backup operation.
2417	RestoreBackupContext *RestoreBackupContext `json:"restoreBackupContext,omitempty"`
2418
2419	// ForceSendFields is a list of field names (e.g.
2420	// "RestoreBackupContext") to unconditionally include in API requests.
2421	// By default, fields with empty or default values are omitted from API
2422	// requests. However, any non-pointer, non-interface field appearing in
2423	// ForceSendFields will be sent to the server regardless of whether the
2424	// field is empty or not. This may be used to include empty fields in
2425	// Patch requests.
2426	ForceSendFields []string `json:"-"`
2427
2428	// NullFields is a list of field names (e.g. "RestoreBackupContext") to
2429	// include in API requests with the JSON null value. By default, fields
2430	// with empty values are omitted from API requests. However, any field
2431	// with an empty value appearing in NullFields will be sent to the
2432	// server as null. It is an error if a field in this list has a
2433	// non-empty value. This may be used to include null fields in Patch
2434	// requests.
2435	NullFields []string `json:"-"`
2436}
2437
2438func (s *InstancesRestoreBackupRequest) MarshalJSON() ([]byte, error) {
2439	type NoMethod InstancesRestoreBackupRequest
2440	raw := NoMethod(*s)
2441	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2442}
2443
2444// InstancesRotateServerCaRequest: Rotate server CA request.
2445type InstancesRotateServerCaRequest struct {
2446	// RotateServerCaContext: Contains details about the rotate server CA
2447	// operation.
2448	RotateServerCaContext *RotateServerCaContext `json:"rotateServerCaContext,omitempty"`
2449
2450	// ForceSendFields is a list of field names (e.g.
2451	// "RotateServerCaContext") to unconditionally include in API requests.
2452	// By default, fields with empty or default values are omitted from API
2453	// requests. However, any non-pointer, non-interface field appearing in
2454	// ForceSendFields will be sent to the server regardless of whether the
2455	// field is empty or not. This may be used to include empty fields in
2456	// Patch requests.
2457	ForceSendFields []string `json:"-"`
2458
2459	// NullFields is a list of field names (e.g. "RotateServerCaContext") to
2460	// include in API requests with the JSON null value. By default, fields
2461	// with empty values are omitted from API requests. However, any field
2462	// with an empty value appearing in NullFields will be sent to the
2463	// server as null. It is an error if a field in this list has a
2464	// non-empty value. This may be used to include null fields in Patch
2465	// requests.
2466	NullFields []string `json:"-"`
2467}
2468
2469func (s *InstancesRotateServerCaRequest) MarshalJSON() ([]byte, error) {
2470	type NoMethod InstancesRotateServerCaRequest
2471	raw := NoMethod(*s)
2472	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2473}
2474
2475// InstancesTruncateLogRequest: Instance truncate log request.
2476type InstancesTruncateLogRequest struct {
2477	// TruncateLogContext: Contains details about the truncate log
2478	// operation.
2479	TruncateLogContext *TruncateLogContext `json:"truncateLogContext,omitempty"`
2480
2481	// ForceSendFields is a list of field names (e.g. "TruncateLogContext")
2482	// to unconditionally include in API requests. By default, fields with
2483	// empty or default values are omitted from API requests. However, any
2484	// non-pointer, non-interface field appearing in ForceSendFields will be
2485	// sent to the server regardless of whether the field is empty or not.
2486	// This may be used to include empty fields in Patch requests.
2487	ForceSendFields []string `json:"-"`
2488
2489	// NullFields is a list of field names (e.g. "TruncateLogContext") to
2490	// include in API requests with the JSON null value. By default, fields
2491	// with empty values are omitted from API requests. However, any field
2492	// with an empty value appearing in NullFields will be sent to the
2493	// server as null. It is an error if a field in this list has a
2494	// non-empty value. This may be used to include null fields in Patch
2495	// requests.
2496	NullFields []string `json:"-"`
2497}
2498
2499func (s *InstancesTruncateLogRequest) MarshalJSON() ([]byte, error) {
2500	type NoMethod InstancesTruncateLogRequest
2501	raw := NoMethod(*s)
2502	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2503}
2504
2505// IpConfiguration: IP Management configuration.
2506type IpConfiguration struct {
2507	// AllocatedIpRange: The name of the allocated ip range for the private
2508	// ip CloudSQL instance. For example: "google-managed-services-default".
2509	// If set, the instance ip will be created in the allocated range. The
2510	// range name must comply with RFC 1035
2511	// (https://tools.ietf.org/html/rfc1035). Specifically, the name must be
2512	// 1-63 characters long and match the regular expression
2513	// `[a-z]([-a-z0-9]*[a-z0-9])?.`
2514	AllocatedIpRange string `json:"allocatedIpRange,omitempty"`
2515
2516	// AuthorizedNetworks: The list of external networks that are allowed to
2517	// connect to the instance using the IP. In 'CIDR' notation, also known
2518	// as 'slash' notation (for example: **192.168.100.0/24**).
2519	AuthorizedNetworks []*AclEntry `json:"authorizedNetworks,omitempty"`
2520
2521	// Ipv4Enabled: Whether the instance is assigned a public IP address or
2522	// not.
2523	Ipv4Enabled bool `json:"ipv4Enabled,omitempty"`
2524
2525	// PrivateNetwork: The resource link for the VPC network from which the
2526	// Cloud SQL instance is accessible for private IP. For example,
2527	// **/projects/myProject/global/networks/default**. This setting can be
2528	// updated, but it cannot be removed after it is set.
2529	PrivateNetwork string `json:"privateNetwork,omitempty"`
2530
2531	// RequireSsl: Whether SSL connections over IP are enforced or not.
2532	RequireSsl bool `json:"requireSsl,omitempty"`
2533
2534	// ForceSendFields is a list of field names (e.g. "AllocatedIpRange") to
2535	// unconditionally include in API requests. By default, fields with
2536	// empty or default values are omitted from API requests. However, any
2537	// non-pointer, non-interface field appearing in ForceSendFields will be
2538	// sent to the server regardless of whether the field is empty or not.
2539	// This may be used to include empty fields in Patch requests.
2540	ForceSendFields []string `json:"-"`
2541
2542	// NullFields is a list of field names (e.g. "AllocatedIpRange") to
2543	// include in API requests with the JSON null value. By default, fields
2544	// with empty values are omitted from API requests. However, any field
2545	// with an empty value appearing in NullFields will be sent to the
2546	// server as null. It is an error if a field in this list has a
2547	// non-empty value. This may be used to include null fields in Patch
2548	// requests.
2549	NullFields []string `json:"-"`
2550}
2551
2552func (s *IpConfiguration) MarshalJSON() ([]byte, error) {
2553	type NoMethod IpConfiguration
2554	raw := NoMethod(*s)
2555	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2556}
2557
2558// IpMapping: Database instance IP Mapping.
2559type IpMapping struct {
2560	// IpAddress: The IP address assigned.
2561	IpAddress string `json:"ipAddress,omitempty"`
2562
2563	// TimeToRetire: The due time for this IP to be retired in RFC 3339
2564	// (https://tools.ietf.org/html/rfc3339) format, for example
2565	// **2012-11-15T16:19:00.094Z**. This field is only available when the
2566	// IP is scheduled to be retired.
2567	TimeToRetire string `json:"timeToRetire,omitempty"`
2568
2569	// Type: The type of this IP address. A **PRIMARY** address is a public
2570	// address that can accept incoming connections. A **PRIVATE** address
2571	// is a private address that can accept incoming connections. An
2572	// **OUTGOING** address is the source address of connections originating
2573	// from the instance, if supported.
2574	//
2575	// Possible values:
2576	//   "SQL_IP_ADDRESS_TYPE_UNSPECIFIED" - This is an unknown IP address
2577	// type.
2578	//   "PRIMARY" - IP address the customer is supposed to connect to.
2579	// Usually this is the load balancer's IP address
2580	//   "OUTGOING" - Source IP address of the connection a read replica
2581	// establishes to its external primary instance. This IP address can be
2582	// allowlisted by the customer in case it has a firewall that filters
2583	// incoming connection to its on premises primary instance.
2584	//   "PRIVATE" - Private IP used when using private IPs and network
2585	// peering.
2586	//   "MIGRATED_1ST_GEN" - V1 IP of a migrated instance. We want the user
2587	// to decommission this IP as soon as the migration is complete. Note:
2588	// V1 instances with V1 ip addresses will be counted as PRIMARY.
2589	Type string `json:"type,omitempty"`
2590
2591	// ForceSendFields is a list of field names (e.g. "IpAddress") to
2592	// unconditionally include in API requests. By default, fields with
2593	// empty or default values are omitted from API requests. However, any
2594	// non-pointer, non-interface field appearing in ForceSendFields will be
2595	// sent to the server regardless of whether the field is empty or not.
2596	// This may be used to include empty fields in Patch requests.
2597	ForceSendFields []string `json:"-"`
2598
2599	// NullFields is a list of field names (e.g. "IpAddress") to include in
2600	// API requests with the JSON null value. By default, fields with empty
2601	// values are omitted from API requests. However, any field with an
2602	// empty value appearing in NullFields will be sent to the server as
2603	// null. It is an error if a field in this list has a non-empty value.
2604	// This may be used to include null fields in Patch requests.
2605	NullFields []string `json:"-"`
2606}
2607
2608func (s *IpMapping) MarshalJSON() ([]byte, error) {
2609	type NoMethod IpMapping
2610	raw := NoMethod(*s)
2611	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2612}
2613
2614// LocationPreference: Preferred location. This specifies where a Cloud
2615// SQL instance is located. Note that if the preferred location is not
2616// available, the instance will be located as close as possible within
2617// the region. Only one location may be specified.
2618type LocationPreference struct {
2619	// FollowGaeApplication: The App Engine application to follow, it must
2620	// be in the same region as the Cloud SQL instance.
2621	FollowGaeApplication string `json:"followGaeApplication,omitempty"`
2622
2623	// Kind: This is always **sql#locationPreference**.
2624	Kind string `json:"kind,omitempty"`
2625
2626	// SecondaryZone: The preferred Compute Engine zone for the
2627	// secondary/failover (for example: us-central1-a, us-central1-b, etc.).
2628	// Reserved for future use.
2629	SecondaryZone string `json:"secondaryZone,omitempty"`
2630
2631	// Zone: The preferred Compute Engine zone (for example: us-central1-a,
2632	// us-central1-b, etc.).
2633	Zone string `json:"zone,omitempty"`
2634
2635	// ForceSendFields is a list of field names (e.g.
2636	// "FollowGaeApplication") to unconditionally include in API requests.
2637	// By default, fields with empty or default values are omitted from API
2638	// requests. However, any non-pointer, non-interface field appearing in
2639	// ForceSendFields will be sent to the server regardless of whether the
2640	// field is empty or not. This may be used to include empty fields in
2641	// Patch requests.
2642	ForceSendFields []string `json:"-"`
2643
2644	// NullFields is a list of field names (e.g. "FollowGaeApplication") to
2645	// include in API requests with the JSON null value. By default, fields
2646	// with empty values are omitted from API requests. However, any field
2647	// with an empty value appearing in NullFields will be sent to the
2648	// server as null. It is an error if a field in this list has a
2649	// non-empty value. This may be used to include null fields in Patch
2650	// requests.
2651	NullFields []string `json:"-"`
2652}
2653
2654func (s *LocationPreference) MarshalJSON() ([]byte, error) {
2655	type NoMethod LocationPreference
2656	raw := NoMethod(*s)
2657	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2658}
2659
2660// MaintenanceWindow: Maintenance window. This specifies when a Cloud
2661// SQL instance is restarted for system maintenance purposes.
2662type MaintenanceWindow struct {
2663	// Day: day of week (1-7), starting on Monday.
2664	Day int64 `json:"day,omitempty"`
2665
2666	// Hour: hour of day - 0 to 23.
2667	Hour int64 `json:"hour,omitempty"`
2668
2669	// Kind: This is always **sql#maintenanceWindow**.
2670	Kind string `json:"kind,omitempty"`
2671
2672	// UpdateTrack: Maintenance timing setting: **canary** (Earlier) or
2673	// **stable** (Later). Learn more
2674	// (https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen).
2675	//
2676	// Possible values:
2677	//   "SQL_UPDATE_TRACK_UNSPECIFIED" - This is an unknown maintenance
2678	// timing preference.
2679	//   "canary" - For instance update that requires a restart, this update
2680	// track indicates your instance prefer to restart for new version early
2681	// in maintenance window.
2682	//   "stable" - For instance update that requires a restart, this update
2683	// track indicates your instance prefer to let Cloud SQL choose the
2684	// timing of restart (within its Maintenance window, if applicable).
2685	UpdateTrack string `json:"updateTrack,omitempty"`
2686
2687	// ForceSendFields is a list of field names (e.g. "Day") to
2688	// unconditionally include in API requests. By default, fields with
2689	// empty or default values are omitted from API requests. However, any
2690	// non-pointer, non-interface field appearing in ForceSendFields will be
2691	// sent to the server regardless of whether the field is empty or not.
2692	// This may be used to include empty fields in Patch requests.
2693	ForceSendFields []string `json:"-"`
2694
2695	// NullFields is a list of field names (e.g. "Day") to include in API
2696	// requests with the JSON null value. By default, fields with empty
2697	// values are omitted from API requests. However, any field with an
2698	// empty value appearing in NullFields will be sent to the server as
2699	// null. It is an error if a field in this list has a non-empty value.
2700	// This may be used to include null fields in Patch requests.
2701	NullFields []string `json:"-"`
2702}
2703
2704func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) {
2705	type NoMethod MaintenanceWindow
2706	raw := NoMethod(*s)
2707	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2708}
2709
2710// MySqlReplicaConfiguration: Read-replica configuration specific to
2711// MySQL databases.
2712type MySqlReplicaConfiguration struct {
2713	// CaCertificate: PEM representation of the trusted CA's x509
2714	// certificate.
2715	CaCertificate string `json:"caCertificate,omitempty"`
2716
2717	// ClientCertificate: PEM representation of the replica's x509
2718	// certificate.
2719	ClientCertificate string `json:"clientCertificate,omitempty"`
2720
2721	// ClientKey: PEM representation of the replica's private key. The
2722	// corresponsing public key is encoded in the client's certificate.
2723	ClientKey string `json:"clientKey,omitempty"`
2724
2725	// ConnectRetryInterval: Seconds to wait between connect retries.
2726	// MySQL's default is 60 seconds.
2727	ConnectRetryInterval int64 `json:"connectRetryInterval,omitempty"`
2728
2729	// DumpFilePath: Path to a SQL dump file in Google Cloud Storage from
2730	// which the replica instance is to be created. The URI is in the form
2731	// gs://bucketName/fileName. Compressed gzip files (.gz) are also
2732	// supported. Dumps have the binlog co-ordinates from which replication
2733	// begins. This can be accomplished by setting --master-data to 1 when
2734	// using mysqldump.
2735	DumpFilePath string `json:"dumpFilePath,omitempty"`
2736
2737	// Kind: This is always **sql#mysqlReplicaConfiguration**.
2738	Kind string `json:"kind,omitempty"`
2739
2740	// MasterHeartbeatPeriod: Interval in milliseconds between replication
2741	// heartbeats.
2742	MasterHeartbeatPeriod int64 `json:"masterHeartbeatPeriod,omitempty,string"`
2743
2744	// Password: The password for the replication connection.
2745	Password string `json:"password,omitempty"`
2746
2747	// SslCipher: A list of permissible ciphers to use for SSL encryption.
2748	SslCipher string `json:"sslCipher,omitempty"`
2749
2750	// Username: The username for the replication connection.
2751	Username string `json:"username,omitempty"`
2752
2753	// VerifyServerCertificate: Whether or not to check the primary
2754	// instance's Common Name value in the certificate that it sends during
2755	// the SSL handshake.
2756	VerifyServerCertificate bool `json:"verifyServerCertificate,omitempty"`
2757
2758	// ForceSendFields is a list of field names (e.g. "CaCertificate") to
2759	// unconditionally include in API requests. By default, fields with
2760	// empty or default values are omitted from API requests. However, any
2761	// non-pointer, non-interface field appearing in ForceSendFields will be
2762	// sent to the server regardless of whether the field is empty or not.
2763	// This may be used to include empty fields in Patch requests.
2764	ForceSendFields []string `json:"-"`
2765
2766	// NullFields is a list of field names (e.g. "CaCertificate") to include
2767	// in API requests with the JSON null value. By default, fields with
2768	// empty values are omitted from API requests. However, any field with
2769	// an empty value appearing in NullFields will be sent to the server as
2770	// null. It is an error if a field in this list has a non-empty value.
2771	// This may be used to include null fields in Patch requests.
2772	NullFields []string `json:"-"`
2773}
2774
2775func (s *MySqlReplicaConfiguration) MarshalJSON() ([]byte, error) {
2776	type NoMethod MySqlReplicaConfiguration
2777	raw := NoMethod(*s)
2778	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2779}
2780
2781// MySqlSyncConfig: MySQL-specific external server sync settings.
2782type MySqlSyncConfig struct {
2783	// InitialSyncFlags: Flags to use for the initial dump.
2784	InitialSyncFlags []*SyncFlags `json:"initialSyncFlags,omitempty"`
2785
2786	// ForceSendFields is a list of field names (e.g. "InitialSyncFlags") to
2787	// unconditionally include in API requests. By default, fields with
2788	// empty or default values are omitted from API requests. However, any
2789	// non-pointer, non-interface field appearing in ForceSendFields will be
2790	// sent to the server regardless of whether the field is empty or not.
2791	// This may be used to include empty fields in Patch requests.
2792	ForceSendFields []string `json:"-"`
2793
2794	// NullFields is a list of field names (e.g. "InitialSyncFlags") to
2795	// include in API requests with the JSON null value. By default, fields
2796	// with empty values are omitted from API requests. However, any field
2797	// with an empty value appearing in NullFields will be sent to the
2798	// server as null. It is an error if a field in this list has a
2799	// non-empty value. This may be used to include null fields in Patch
2800	// requests.
2801	NullFields []string `json:"-"`
2802}
2803
2804func (s *MySqlSyncConfig) MarshalJSON() ([]byte, error) {
2805	type NoMethod MySqlSyncConfig
2806	raw := NoMethod(*s)
2807	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2808}
2809
2810// OnPremisesConfiguration: On-premises instance configuration.
2811type OnPremisesConfiguration struct {
2812	// CaCertificate: PEM representation of the trusted CA's x509
2813	// certificate.
2814	CaCertificate string `json:"caCertificate,omitempty"`
2815
2816	// ClientCertificate: PEM representation of the replica's x509
2817	// certificate.
2818	ClientCertificate string `json:"clientCertificate,omitempty"`
2819
2820	// ClientKey: PEM representation of the replica's private key. The
2821	// corresponsing public key is encoded in the client's certificate.
2822	ClientKey string `json:"clientKey,omitempty"`
2823
2824	// DumpFilePath: The dump file to create the Cloud SQL replica.
2825	DumpFilePath string `json:"dumpFilePath,omitempty"`
2826
2827	// HostPort: The host and port of the on-premises instance in host:port
2828	// format
2829	HostPort string `json:"hostPort,omitempty"`
2830
2831	// Kind: This is always **sql#onPremisesConfiguration**.
2832	Kind string `json:"kind,omitempty"`
2833
2834	// Password: The password for connecting to on-premises instance.
2835	Password string `json:"password,omitempty"`
2836
2837	// SourceInstance: The reference to Cloud SQL instance if the source is
2838	// Cloud SQL.
2839	SourceInstance *InstanceReference `json:"sourceInstance,omitempty"`
2840
2841	// Username: The username for connecting to on-premises instance.
2842	Username string `json:"username,omitempty"`
2843
2844	// ForceSendFields is a list of field names (e.g. "CaCertificate") to
2845	// unconditionally include in API requests. By default, fields with
2846	// empty or default values are omitted from API requests. However, any
2847	// non-pointer, non-interface field appearing in ForceSendFields will be
2848	// sent to the server regardless of whether the field is empty or not.
2849	// This may be used to include empty fields in Patch requests.
2850	ForceSendFields []string `json:"-"`
2851
2852	// NullFields is a list of field names (e.g. "CaCertificate") to include
2853	// in API requests with the JSON null value. By default, fields with
2854	// empty values are omitted from API requests. However, any field with
2855	// an empty value appearing in NullFields will be sent to the server as
2856	// null. It is an error if a field in this list has a non-empty value.
2857	// This may be used to include null fields in Patch requests.
2858	NullFields []string `json:"-"`
2859}
2860
2861func (s *OnPremisesConfiguration) MarshalJSON() ([]byte, error) {
2862	type NoMethod OnPremisesConfiguration
2863	raw := NoMethod(*s)
2864	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2865}
2866
2867// Operation: An Operation resource. For successful operations that
2868// return an Operation resource, only the fields relevant to the
2869// operation are populated in the resource.
2870type Operation struct {
2871	// BackupContext: The context for backup operation, if applicable.
2872	BackupContext *BackupContext `json:"backupContext,omitempty"`
2873
2874	// EndTime: The time this operation finished in UTC timezone in RFC 3339
2875	// (https://tools.ietf.org/html/rfc3339) format, for example
2876	// **2012-11-15T16:19:00.094Z**.
2877	EndTime string `json:"endTime,omitempty"`
2878
2879	// Error: If errors occurred during processing of this operation, this
2880	// field will be populated.
2881	Error *OperationErrors `json:"error,omitempty"`
2882
2883	// ExportContext: The context for export operation, if applicable.
2884	ExportContext *ExportContext `json:"exportContext,omitempty"`
2885
2886	// ImportContext: The context for import operation, if applicable.
2887	ImportContext *ImportContext `json:"importContext,omitempty"`
2888
2889	// InsertTime: The time this operation was enqueued in UTC timezone in
2890	// RFC 3339 (https://tools.ietf.org/html/rfc3339) format, for example
2891	// **2012-11-15T16:19:00.094Z**.
2892	InsertTime string `json:"insertTime,omitempty"`
2893
2894	// Kind: This is always **sql#operation**.
2895	Kind string `json:"kind,omitempty"`
2896
2897	// Name: An identifier that uniquely identifies the operation. You can
2898	// use this identifier to retrieve the Operations resource that has
2899	// information about the operation.
2900	Name string `json:"name,omitempty"`
2901
2902	// OperationType: The type of the operation. Valid values are: *
2903	// **CREATE** * **DELETE** * **UPDATE** * **RESTART** * **IMPORT** *
2904	// **EXPORT** * **BACKUP_VOLUME** * **RESTORE_VOLUME** * **CREATE_USER**
2905	// * **DELETE_USER** * **CREATE_DATABASE** * **DELETE_DATABASE**
2906	//
2907	// Possible values:
2908	//   "SQL_OPERATION_TYPE_UNSPECIFIED" - Unknown operation type.
2909	//   "IMPORT" - Imports data into a Cloud SQL instance.
2910	//   "EXPORT" - Exports data from a Cloud SQL instance to a Cloud
2911	// Storage bucket.
2912	//   "CREATE" - Creates a new Cloud SQL instance.
2913	//   "UPDATE" - Updates the settings of a Cloud SQL instance.
2914	//   "DELETE" - Deletes a Cloud SQL instance.
2915	//   "RESTART" - Restarts the Cloud SQL instance.
2916	//   "BACKUP"
2917	//   "SNAPSHOT"
2918	//   "BACKUP_VOLUME" - Performs instance backup.
2919	//   "DELETE_VOLUME" - Deletes an instance backup.
2920	//   "RESTORE_VOLUME" - Restores an instance backup.
2921	//   "INJECT_USER" - Injects a privileged user in mysql for MOB
2922	// instances.
2923	//   "CLONE" - Clones a Cloud SQL instance.
2924	//   "STOP_REPLICA" - Stops replication on a Cloud SQL read replica
2925	// instance.
2926	//   "START_REPLICA" - Starts replication on a Cloud SQL read replica
2927	// instance.
2928	//   "PROMOTE_REPLICA" - Promotes a Cloud SQL replica instance.
2929	//   "CREATE_REPLICA" - Creates a Cloud SQL replica instance.
2930	//   "CREATE_USER" - Creates a new user in a Cloud SQL instance.
2931	//   "DELETE_USER" - Deletes a user from a Cloud SQL instance.
2932	//   "UPDATE_USER" - Updates an existing user in a Cloud SQL instance.
2933	//   "CREATE_DATABASE" - Creates a database in the Cloud SQL instance.
2934	//   "DELETE_DATABASE" - Deletes a database in the Cloud SQL instance.
2935	//   "UPDATE_DATABASE" - Updates a database in the Cloud SQL instance.
2936	//   "FAILOVER" - Performs failover of an HA-enabled Cloud SQL failover
2937	// replica.
2938	//   "DELETE_BACKUP" - Deletes the backup taken by a backup run.
2939	//   "RECREATE_REPLICA"
2940	//   "TRUNCATE_LOG" - Truncates a general or slow log table in MySQL.
2941	//   "DEMOTE_MASTER" - Demotes the stand-alone instance to be a Cloud
2942	// SQL read replica for an external database server.
2943	//   "MAINTENANCE" - Indicates that the instance is currently in
2944	// maintenance. Maintenance typically causes the instance to be
2945	// unavailable for 1-3 minutes.
2946	//   "ENABLE_PRIVATE_IP" - This field is deprecated, and will be removed
2947	// in future version of API.
2948	//   "DEFER_MAINTENANCE"
2949	//   "CREATE_CLONE" - Creates clone instance.
2950	//   "RESCHEDULE_MAINTENANCE" - Reschedule maintenance to another time.
2951	//   "START_EXTERNAL_SYNC" - Starts external sync of a Cloud SQL EM
2952	// replica to an external primary instance.
2953	OperationType string `json:"operationType,omitempty"`
2954
2955	// SelfLink: The URI of this resource.
2956	SelfLink string `json:"selfLink,omitempty"`
2957
2958	// StartTime: The time this operation actually started in UTC timezone
2959	// in RFC 3339 (https://tools.ietf.org/html/rfc3339) format, for example
2960	// **2012-11-15T16:19:00.094Z**.
2961	StartTime string `json:"startTime,omitempty"`
2962
2963	// Status: The status of an operation.
2964	//
2965	// Possible values:
2966	//   "SQL_OPERATION_STATUS_UNSPECIFIED" - The state of the operation is
2967	// unknown.
2968	//   "PENDING" - The operation has been queued, but has not started yet.
2969	//   "RUNNING" - The operation is running.
2970	//   "DONE" - The operation completed.
2971	Status string `json:"status,omitempty"`
2972
2973	// TargetId: Name of the database instance related to this operation.
2974	TargetId string `json:"targetId,omitempty"`
2975
2976	TargetLink string `json:"targetLink,omitempty"`
2977
2978	// TargetProject: The project ID of the target instance related to this
2979	// operation.
2980	TargetProject string `json:"targetProject,omitempty"`
2981
2982	// User: The email address of the user who initiated this operation.
2983	User string `json:"user,omitempty"`
2984
2985	// ServerResponse contains the HTTP response code and headers from the
2986	// server.
2987	googleapi.ServerResponse `json:"-"`
2988
2989	// ForceSendFields is a list of field names (e.g. "BackupContext") to
2990	// unconditionally include in API requests. By default, fields with
2991	// empty or default values are omitted from API requests. However, any
2992	// non-pointer, non-interface field appearing in ForceSendFields will be
2993	// sent to the server regardless of whether the field is empty or not.
2994	// This may be used to include empty fields in Patch requests.
2995	ForceSendFields []string `json:"-"`
2996
2997	// NullFields is a list of field names (e.g. "BackupContext") to include
2998	// in API requests with the JSON null value. By default, fields with
2999	// empty values are omitted from API requests. However, any field with
3000	// an empty value appearing in NullFields will be sent to the server as
3001	// null. It is an error if a field in this list has a non-empty value.
3002	// This may be used to include null fields in Patch requests.
3003	NullFields []string `json:"-"`
3004}
3005
3006func (s *Operation) MarshalJSON() ([]byte, error) {
3007	type NoMethod Operation
3008	raw := NoMethod(*s)
3009	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3010}
3011
3012// OperationError: Database instance operation error.
3013type OperationError struct {
3014	// Code: Identifies the specific error that occurred.
3015	Code string `json:"code,omitempty"`
3016
3017	// Kind: This is always **sql#operationError**.
3018	Kind string `json:"kind,omitempty"`
3019
3020	// Message: Additional information about the error encountered.
3021	Message string `json:"message,omitempty"`
3022
3023	// ForceSendFields is a list of field names (e.g. "Code") to
3024	// unconditionally include in API requests. By default, fields with
3025	// empty or default values are omitted from API requests. However, any
3026	// non-pointer, non-interface field appearing in ForceSendFields will be
3027	// sent to the server regardless of whether the field is empty or not.
3028	// This may be used to include empty fields in Patch requests.
3029	ForceSendFields []string `json:"-"`
3030
3031	// NullFields is a list of field names (e.g. "Code") to include in API
3032	// requests with the JSON null value. By default, fields with empty
3033	// values are omitted from API requests. However, any field with an
3034	// empty value appearing in NullFields will be sent to the server as
3035	// null. It is an error if a field in this list has a non-empty value.
3036	// This may be used to include null fields in Patch requests.
3037	NullFields []string `json:"-"`
3038}
3039
3040func (s *OperationError) MarshalJSON() ([]byte, error) {
3041	type NoMethod OperationError
3042	raw := NoMethod(*s)
3043	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3044}
3045
3046// OperationErrors: Database instance operation errors list wrapper.
3047type OperationErrors struct {
3048	// Errors: The list of errors encountered while processing this
3049	// operation.
3050	Errors []*OperationError `json:"errors,omitempty"`
3051
3052	// Kind: This is always **sql#operationErrors**.
3053	Kind string `json:"kind,omitempty"`
3054
3055	// ForceSendFields is a list of field names (e.g. "Errors") to
3056	// unconditionally include in API requests. By default, fields with
3057	// empty or default values are omitted from API requests. However, any
3058	// non-pointer, non-interface field appearing in ForceSendFields will be
3059	// sent to the server regardless of whether the field is empty or not.
3060	// This may be used to include empty fields in Patch requests.
3061	ForceSendFields []string `json:"-"`
3062
3063	// NullFields is a list of field names (e.g. "Errors") to include in API
3064	// requests with the JSON null value. By default, fields with empty
3065	// values are omitted from API requests. However, any field with an
3066	// empty value appearing in NullFields will be sent to the server as
3067	// null. It is an error if a field in this list has a non-empty value.
3068	// This may be used to include null fields in Patch requests.
3069	NullFields []string `json:"-"`
3070}
3071
3072func (s *OperationErrors) MarshalJSON() ([]byte, error) {
3073	type NoMethod OperationErrors
3074	raw := NoMethod(*s)
3075	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3076}
3077
3078// OperationsListResponse: Operations list response.
3079type OperationsListResponse struct {
3080	// Items: List of operation resources.
3081	Items []*Operation `json:"items,omitempty"`
3082
3083	// Kind: This is always **sql#operationsList**.
3084	Kind string `json:"kind,omitempty"`
3085
3086	// NextPageToken: The continuation token, used to page through large
3087	// result sets. Provide this value in a subsequent request to return the
3088	// next page of results.
3089	NextPageToken string `json:"nextPageToken,omitempty"`
3090
3091	// ServerResponse contains the HTTP response code and headers from the
3092	// server.
3093	googleapi.ServerResponse `json:"-"`
3094
3095	// ForceSendFields is a list of field names (e.g. "Items") to
3096	// unconditionally include in API requests. By default, fields with
3097	// empty or default values are omitted from API requests. However, any
3098	// non-pointer, non-interface field appearing in ForceSendFields will be
3099	// sent to the server regardless of whether the field is empty or not.
3100	// This may be used to include empty fields in Patch requests.
3101	ForceSendFields []string `json:"-"`
3102
3103	// NullFields is a list of field names (e.g. "Items") to include in API
3104	// requests with the JSON null value. By default, fields with empty
3105	// values are omitted from API requests. However, any field with an
3106	// empty value appearing in NullFields will be sent to the server as
3107	// null. It is an error if a field in this list has a non-empty value.
3108	// This may be used to include null fields in Patch requests.
3109	NullFields []string `json:"-"`
3110}
3111
3112func (s *OperationsListResponse) MarshalJSON() ([]byte, error) {
3113	type NoMethod OperationsListResponse
3114	raw := NoMethod(*s)
3115	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3116}
3117
3118// PasswordStatus: Read-only password status.
3119type PasswordStatus struct {
3120	// Locked: If true, user does not have login privileges.
3121	Locked bool `json:"locked,omitempty"`
3122
3123	// PasswordExpirationTime: The expiration time of the current password.
3124	PasswordExpirationTime string `json:"passwordExpirationTime,omitempty"`
3125
3126	// ForceSendFields is a list of field names (e.g. "Locked") to
3127	// unconditionally include in API requests. By default, fields with
3128	// empty or default values are omitted from API requests. However, any
3129	// non-pointer, non-interface field appearing in ForceSendFields will be
3130	// sent to the server regardless of whether the field is empty or not.
3131	// This may be used to include empty fields in Patch requests.
3132	ForceSendFields []string `json:"-"`
3133
3134	// NullFields is a list of field names (e.g. "Locked") to include in API
3135	// requests with the JSON null value. By default, fields with empty
3136	// values are omitted from API requests. However, any field with an
3137	// empty value appearing in NullFields will be sent to the server as
3138	// null. It is an error if a field in this list has a non-empty value.
3139	// This may be used to include null fields in Patch requests.
3140	NullFields []string `json:"-"`
3141}
3142
3143func (s *PasswordStatus) MarshalJSON() ([]byte, error) {
3144	type NoMethod PasswordStatus
3145	raw := NoMethod(*s)
3146	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3147}
3148
3149// PasswordValidationPolicy: Database instance local user password
3150// validation policy
3151type PasswordValidationPolicy struct {
3152	// Complexity: The complexity of the password.
3153	//
3154	// Possible values:
3155	//   "COMPLEXITY_UNSPECIFIED" - Complexity check is not specified.
3156	//   "COMPLEXITY_DEFAULT" - A combination of lowercase, uppercase,
3157	// numeric, and non-alphanumeric characters.
3158	Complexity string `json:"complexity,omitempty"`
3159
3160	// DisallowUsernameSubstring: Disallow username as a part of the
3161	// password.
3162	DisallowUsernameSubstring bool `json:"disallowUsernameSubstring,omitempty"`
3163
3164	// MinLength: Minimum number of characters allowed.
3165	MinLength int64 `json:"minLength,omitempty"`
3166
3167	// PasswordChangeInterval: Minimum interval after which the password can
3168	// be changed.
3169	PasswordChangeInterval string `json:"passwordChangeInterval,omitempty"`
3170
3171	// ReuseInterval: Number of previous passwords that cannot be reused.
3172	ReuseInterval int64 `json:"reuseInterval,omitempty"`
3173
3174	// ForceSendFields is a list of field names (e.g. "Complexity") to
3175	// unconditionally include in API requests. By default, fields with
3176	// empty or default values are omitted from API requests. However, any
3177	// non-pointer, non-interface field appearing in ForceSendFields will be
3178	// sent to the server regardless of whether the field is empty or not.
3179	// This may be used to include empty fields in Patch requests.
3180	ForceSendFields []string `json:"-"`
3181
3182	// NullFields is a list of field names (e.g. "Complexity") to include in
3183	// API requests with the JSON null value. By default, fields with empty
3184	// values are omitted from API requests. However, any field with an
3185	// empty value appearing in NullFields will be sent to the server as
3186	// null. It is an error if a field in this list has a non-empty value.
3187	// This may be used to include null fields in Patch requests.
3188	NullFields []string `json:"-"`
3189}
3190
3191func (s *PasswordValidationPolicy) MarshalJSON() ([]byte, error) {
3192	type NoMethod PasswordValidationPolicy
3193	raw := NoMethod(*s)
3194	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3195}
3196
3197// ReplicaConfiguration: Read-replica configuration for connecting to
3198// the primary instance.
3199type ReplicaConfiguration struct {
3200	// FailoverTarget: Specifies if the replica is the failover target. If
3201	// the field is set to **true** the replica will be designated as a
3202	// failover replica. In case the primary instance fails, the replica
3203	// instance will be promoted as the new primary instance. Only one
3204	// replica can be specified as failover target, and the replica has to
3205	// be in different zone with the primary instance.
3206	FailoverTarget bool `json:"failoverTarget,omitempty"`
3207
3208	// Kind: This is always **sql#replicaConfiguration**.
3209	Kind string `json:"kind,omitempty"`
3210
3211	// MysqlReplicaConfiguration: MySQL specific configuration when
3212	// replicating from a MySQL on-premises primary instance. Replication
3213	// configuration information such as the username, password,
3214	// certificates, and keys are not stored in the instance metadata. The
3215	// configuration information is used only to set up the replication
3216	// connection and is stored by MySQL in a file named **master.info** in
3217	// the data directory.
3218	MysqlReplicaConfiguration *MySqlReplicaConfiguration `json:"mysqlReplicaConfiguration,omitempty"`
3219
3220	// ForceSendFields is a list of field names (e.g. "FailoverTarget") to
3221	// unconditionally include in API requests. By default, fields with
3222	// empty or default values are omitted from API requests. However, any
3223	// non-pointer, non-interface field appearing in ForceSendFields will be
3224	// sent to the server regardless of whether the field is empty or not.
3225	// This may be used to include empty fields in Patch requests.
3226	ForceSendFields []string `json:"-"`
3227
3228	// NullFields is a list of field names (e.g. "FailoverTarget") to
3229	// include in API requests with the JSON null value. By default, fields
3230	// with empty values are omitted from API requests. However, any field
3231	// with an empty value appearing in NullFields will be sent to the
3232	// server as null. It is an error if a field in this list has a
3233	// non-empty value. This may be used to include null fields in Patch
3234	// requests.
3235	NullFields []string `json:"-"`
3236}
3237
3238func (s *ReplicaConfiguration) MarshalJSON() ([]byte, error) {
3239	type NoMethod ReplicaConfiguration
3240	raw := NoMethod(*s)
3241	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3242}
3243
3244type Reschedule struct {
3245	// RescheduleType: Required. The type of the reschedule.
3246	//
3247	// Possible values:
3248	//   "RESCHEDULE_TYPE_UNSPECIFIED"
3249	//   "IMMEDIATE" - Reschedules maintenance to happen now (within 5
3250	// minutes).
3251	//   "NEXT_AVAILABLE_WINDOW" - Reschedules maintenance to occur within
3252	// one week from the originally scheduled day and time.
3253	//   "SPECIFIC_TIME" - Reschedules maintenance to a specific time and
3254	// day.
3255	RescheduleType string `json:"rescheduleType,omitempty"`
3256
3257	// ScheduleTime: Optional. Timestamp when the maintenance shall be
3258	// rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339
3259	// (https://tools.ietf.org/html/rfc3339) format, for example
3260	// **2012-11-15T16:19:00.094Z**.
3261	ScheduleTime string `json:"scheduleTime,omitempty"`
3262
3263	// ForceSendFields is a list of field names (e.g. "RescheduleType") to
3264	// unconditionally include in API requests. By default, fields with
3265	// empty or default values are omitted from API requests. However, any
3266	// non-pointer, non-interface field appearing in ForceSendFields will be
3267	// sent to the server regardless of whether the field is empty or not.
3268	// This may be used to include empty fields in Patch requests.
3269	ForceSendFields []string `json:"-"`
3270
3271	// NullFields is a list of field names (e.g. "RescheduleType") to
3272	// include in API requests with the JSON null value. By default, fields
3273	// with empty values are omitted from API requests. However, any field
3274	// with an empty value appearing in NullFields will be sent to the
3275	// server as null. It is an error if a field in this list has a
3276	// non-empty value. This may be used to include null fields in Patch
3277	// requests.
3278	NullFields []string `json:"-"`
3279}
3280
3281func (s *Reschedule) MarshalJSON() ([]byte, error) {
3282	type NoMethod Reschedule
3283	raw := NoMethod(*s)
3284	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3285}
3286
3287// RestoreBackupContext: Database instance restore from backup context.
3288// Backup context contains source instance id and project id.
3289type RestoreBackupContext struct {
3290	// BackupRunId: The ID of the backup run to restore from.
3291	BackupRunId int64 `json:"backupRunId,omitempty,string"`
3292
3293	// InstanceId: The ID of the instance that the backup was taken from.
3294	InstanceId string `json:"instanceId,omitempty"`
3295
3296	// Kind: This is always **sql#restoreBackupContext**.
3297	Kind string `json:"kind,omitempty"`
3298
3299	// Project: The full project ID of the source instance.
3300	Project string `json:"project,omitempty"`
3301
3302	// ForceSendFields is a list of field names (e.g. "BackupRunId") to
3303	// unconditionally include in API requests. By default, fields with
3304	// empty or default values are omitted from API requests. However, any
3305	// non-pointer, non-interface field appearing in ForceSendFields will be
3306	// sent to the server regardless of whether the field is empty or not.
3307	// This may be used to include empty fields in Patch requests.
3308	ForceSendFields []string `json:"-"`
3309
3310	// NullFields is a list of field names (e.g. "BackupRunId") to include
3311	// in API requests with the JSON null value. By default, fields with
3312	// empty values are omitted from API requests. However, any field with
3313	// an empty value appearing in NullFields will be sent to the server as
3314	// null. It is an error if a field in this list has a non-empty value.
3315	// This may be used to include null fields in Patch requests.
3316	NullFields []string `json:"-"`
3317}
3318
3319func (s *RestoreBackupContext) MarshalJSON() ([]byte, error) {
3320	type NoMethod RestoreBackupContext
3321	raw := NoMethod(*s)
3322	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3323}
3324
3325// RotateServerCaContext: Instance rotate server CA context.
3326type RotateServerCaContext struct {
3327	// Kind: This is always **sql#rotateServerCaContext**.
3328	Kind string `json:"kind,omitempty"`
3329
3330	// NextVersion: The fingerprint of the next version to be rotated to. If
3331	// left unspecified, will be rotated to the most recently added server
3332	// CA version.
3333	NextVersion string `json:"nextVersion,omitempty"`
3334
3335	// ForceSendFields is a list of field names (e.g. "Kind") to
3336	// unconditionally include in API requests. By default, fields with
3337	// empty or default values are omitted from API requests. However, any
3338	// non-pointer, non-interface field appearing in ForceSendFields will be
3339	// sent to the server regardless of whether the field is empty or not.
3340	// This may be used to include empty fields in Patch requests.
3341	ForceSendFields []string `json:"-"`
3342
3343	// NullFields is a list of field names (e.g. "Kind") to include in API
3344	// requests with the JSON null value. By default, fields with empty
3345	// values are omitted from API requests. However, any field with an
3346	// empty value appearing in NullFields will be sent to the server as
3347	// null. It is an error if a field in this list has a non-empty value.
3348	// This may be used to include null fields in Patch requests.
3349	NullFields []string `json:"-"`
3350}
3351
3352func (s *RotateServerCaContext) MarshalJSON() ([]byte, error) {
3353	type NoMethod RotateServerCaContext
3354	raw := NoMethod(*s)
3355	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3356}
3357
3358// Settings: Database instance settings.
3359type Settings struct {
3360	// ActivationPolicy: The activation policy specifies when the instance
3361	// is activated; it is applicable only when the instance state is
3362	// RUNNABLE. Valid values: * **ALWAYS**: The instance is on, and remains
3363	// so even in the absence of connection requests. * **NEVER**: The
3364	// instance is off; it is not activated, even if a connection request
3365	// arrives.
3366	//
3367	// Possible values:
3368	//   "SQL_ACTIVATION_POLICY_UNSPECIFIED" - Unknown activation plan.
3369	//   "ALWAYS" - The instance is always up and running.
3370	//   "NEVER" - The instance never starts.
3371	//   "ON_DEMAND" - The instance starts upon receiving requests.
3372	ActivationPolicy string `json:"activationPolicy,omitempty"`
3373
3374	// ActiveDirectoryConfig: Active Directory configuration, relevant only
3375	// for Cloud SQL for SQL Server.
3376	ActiveDirectoryConfig *SqlActiveDirectoryConfig `json:"activeDirectoryConfig,omitempty"`
3377
3378	// AuthorizedGaeApplications: The App Engine app IDs that can access
3379	// this instance. (Deprecated) Applied to First Generation instances
3380	// only.
3381	AuthorizedGaeApplications []string `json:"authorizedGaeApplications,omitempty"`
3382
3383	// AvailabilityType: Availability type. Potential values: * **ZONAL**:
3384	// The instance serves data from only one zone. Outages in that zone
3385	// affect data accessibility. * **REGIONAL**: The instance can serve
3386	// data from more than one zone in a region (it is highly available)./
3387	// For more information, see Overview of the High Availability
3388	// Configuration
3389	// (https://cloud.google.com/sql/docs/mysql/high-availability).
3390	//
3391	// Possible values:
3392	//   "SQL_AVAILABILITY_TYPE_UNSPECIFIED" - This is an unknown
3393	// Availability type.
3394	//   "ZONAL" - Zonal available instance.
3395	//   "REGIONAL" - Regional available instance.
3396	AvailabilityType string `json:"availabilityType,omitempty"`
3397
3398	// BackupConfiguration: The daily backup configuration for the instance.
3399	BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"`
3400
3401	// Collation: The name of server Instance collation.
3402	Collation string `json:"collation,omitempty"`
3403
3404	// CrashSafeReplicationEnabled: Configuration specific to read replica
3405	// instances. Indicates whether database flags for crash-safe
3406	// replication are enabled. This property was only applicable to First
3407	// Generation instances.
3408	CrashSafeReplicationEnabled bool `json:"crashSafeReplicationEnabled,omitempty"`
3409
3410	// DataDiskSizeGb: The size of data disk, in GB. The data disk size
3411	// minimum is 10GB.
3412	DataDiskSizeGb int64 `json:"dataDiskSizeGb,omitempty,string"`
3413
3414	// DataDiskType: The type of data disk: **PD_SSD** (default) or
3415	// **PD_HDD**. Not used for First Generation instances.
3416	//
3417	// Possible values:
3418	//   "SQL_DATA_DISK_TYPE_UNSPECIFIED" - This is an unknown data disk
3419	// type.
3420	//   "PD_SSD" - An SSD data disk.
3421	//   "PD_HDD" - An HDD data disk.
3422	//   "OBSOLETE_LOCAL_SSD" - This field is deprecated and will be removed
3423	// from a future version of the API.
3424	DataDiskType string `json:"dataDiskType,omitempty"`
3425
3426	// DatabaseFlags: The database flags passed to the instance at startup.
3427	DatabaseFlags []*DatabaseFlags `json:"databaseFlags,omitempty"`
3428
3429	// DatabaseReplicationEnabled: Configuration specific to read replica
3430	// instances. Indicates whether replication is enabled or not.
3431	DatabaseReplicationEnabled bool `json:"databaseReplicationEnabled,omitempty"`
3432
3433	// DenyMaintenancePeriods: Deny maintenance periods
3434	DenyMaintenancePeriods []*DenyMaintenancePeriod `json:"denyMaintenancePeriods,omitempty"`
3435
3436	// InsightsConfig: Insights configuration, for now relevant only for
3437	// Postgres.
3438	InsightsConfig *InsightsConfig `json:"insightsConfig,omitempty"`
3439
3440	// IpConfiguration: The settings for IP Management. This allows to
3441	// enable or disable the instance IP and manage which external networks
3442	// can connect to the instance. The IPv4 address cannot be disabled for
3443	// Second Generation instances.
3444	IpConfiguration *IpConfiguration `json:"ipConfiguration,omitempty"`
3445
3446	// Kind: This is always **sql#settings**.
3447	Kind string `json:"kind,omitempty"`
3448
3449	// LocationPreference: The location preference settings. This allows the
3450	// instance to be located as near as possible to either an App Engine
3451	// app or Compute Engine zone for better performance. App Engine
3452	// co-location was only applicable to First Generation instances.
3453	LocationPreference *LocationPreference `json:"locationPreference,omitempty"`
3454
3455	// MaintenanceWindow: The maintenance window for this instance. This
3456	// specifies when the instance can be restarted for maintenance
3457	// purposes.
3458	MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
3459
3460	// PasswordValidationPolicy: The local user password validation policy
3461	// of the instance.
3462	PasswordValidationPolicy *PasswordValidationPolicy `json:"passwordValidationPolicy,omitempty"`
3463
3464	// PricingPlan: The pricing plan for this instance. This can be either
3465	// **PER_USE** or **PACKAGE**. Only **PER_USE** is supported for Second
3466	// Generation instances.
3467	//
3468	// Possible values:
3469	//   "SQL_PRICING_PLAN_UNSPECIFIED" - This is an unknown pricing plan
3470	// for this instance.
3471	//   "PACKAGE" - The instance is billed at a monthly flat rate.
3472	//   "PER_USE" - The instance is billed per usage.
3473	PricingPlan string `json:"pricingPlan,omitempty"`
3474
3475	// ReplicationType: The type of replication this instance uses. This can
3476	// be either **ASYNCHRONOUS** or **SYNCHRONOUS**. (Deprecated) This
3477	// property was only applicable to First Generation instances.
3478	//
3479	// Possible values:
3480	//   "SQL_REPLICATION_TYPE_UNSPECIFIED" - This is an unknown replication
3481	// type for a Cloud SQL instance.
3482	//   "SYNCHRONOUS" - The synchronous replication mode for First
3483	// Generation instances. It is the default value.
3484	//   "ASYNCHRONOUS" - The asynchronous replication mode for First
3485	// Generation instances. It provides a slight performance gain, but if
3486	// an outage occurs while this option is set to asynchronous, you can
3487	// lose up to a few seconds of updates to your data.
3488	ReplicationType string `json:"replicationType,omitempty"`
3489
3490	// SettingsVersion: The version of instance settings. This is a required
3491	// field for update method to make sure concurrent updates are handled
3492	// properly. During update, use the most recent settingsVersion value
3493	// for this instance and do not try to update this value.
3494	SettingsVersion int64 `json:"settingsVersion,omitempty,string"`
3495
3496	// SqlServerAuditConfig: SQL Server specific audit configuration.
3497	SqlServerAuditConfig *SqlServerAuditConfig `json:"sqlServerAuditConfig,omitempty"`
3498
3499	// StorageAutoResize: Configuration to increase storage size
3500	// automatically. The default value is true.
3501	StorageAutoResize *bool `json:"storageAutoResize,omitempty"`
3502
3503	// StorageAutoResizeLimit: The maximum size to which storage capacity
3504	// can be automatically increased. The default value is 0, which
3505	// specifies that there is no limit.
3506	StorageAutoResizeLimit int64 `json:"storageAutoResizeLimit,omitempty,string"`
3507
3508	// Tier: The tier (or machine type) for this instance, for example
3509	// **db-custom-1-3840**.
3510	Tier string `json:"tier,omitempty"`
3511
3512	// UserLabels: User-provided labels, represented as a dictionary where
3513	// each label is a single key value pair.
3514	UserLabels map[string]string `json:"userLabels,omitempty"`
3515
3516	// ForceSendFields is a list of field names (e.g. "ActivationPolicy") to
3517	// unconditionally include in API requests. By default, fields with
3518	// empty or default values are omitted from API requests. However, any
3519	// non-pointer, non-interface field appearing in ForceSendFields will be
3520	// sent to the server regardless of whether the field is empty or not.
3521	// This may be used to include empty fields in Patch requests.
3522	ForceSendFields []string `json:"-"`
3523
3524	// NullFields is a list of field names (e.g. "ActivationPolicy") to
3525	// include in API requests with the JSON null value. By default, fields
3526	// with empty values are omitted from API requests. However, any field
3527	// with an empty value appearing in NullFields will be sent to the
3528	// server as null. It is an error if a field in this list has a
3529	// non-empty value. This may be used to include null fields in Patch
3530	// requests.
3531	NullFields []string `json:"-"`
3532}
3533
3534func (s *Settings) MarshalJSON() ([]byte, error) {
3535	type NoMethod Settings
3536	raw := NoMethod(*s)
3537	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3538}
3539
3540// SqlActiveDirectoryConfig: Active Directory configuration, relevant
3541// only for Cloud SQL for SQL Server.
3542type SqlActiveDirectoryConfig struct {
3543	// Domain: The name of the domain (e.g., mydomain.com).
3544	Domain string `json:"domain,omitempty"`
3545
3546	// Kind: This is always sql#activeDirectoryConfig.
3547	Kind string `json:"kind,omitempty"`
3548
3549	// ForceSendFields is a list of field names (e.g. "Domain") to
3550	// unconditionally include in API requests. By default, fields with
3551	// empty or default values are omitted from API requests. However, any
3552	// non-pointer, non-interface field appearing in ForceSendFields will be
3553	// sent to the server regardless of whether the field is empty or not.
3554	// This may be used to include empty fields in Patch requests.
3555	ForceSendFields []string `json:"-"`
3556
3557	// NullFields is a list of field names (e.g. "Domain") to include in API
3558	// requests with the JSON null value. By default, fields with empty
3559	// values are omitted from API requests. However, any field with an
3560	// empty value appearing in NullFields will be sent to the server as
3561	// null. It is an error if a field in this list has a non-empty value.
3562	// This may be used to include null fields in Patch requests.
3563	NullFields []string `json:"-"`
3564}
3565
3566func (s *SqlActiveDirectoryConfig) MarshalJSON() ([]byte, error) {
3567	type NoMethod SqlActiveDirectoryConfig
3568	raw := NoMethod(*s)
3569	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3570}
3571
3572// SqlExternalSyncSettingError: External primary instance migration
3573// setting error/warning.
3574type SqlExternalSyncSettingError struct {
3575	// Detail: Additional information about the error encountered.
3576	Detail string `json:"detail,omitempty"`
3577
3578	// Kind: Can be **sql#externalSyncSettingError** or
3579	// **sql#externalSyncSettingWarning**.
3580	Kind string `json:"kind,omitempty"`
3581
3582	// Type: Identifies the specific error that occurred.
3583	//
3584	// Possible values:
3585	//   "SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED"
3586	//   "CONNECTION_FAILURE"
3587	//   "BINLOG_NOT_ENABLED"
3588	//   "INCOMPATIBLE_DATABASE_VERSION"
3589	//   "REPLICA_ALREADY_SETUP"
3590	//   "INSUFFICIENT_PRIVILEGE"
3591	//   "UNSUPPORTED_MIGRATION_TYPE" - Unsupported migration type.
3592	//   "NO_PGLOGICAL_INSTALLED" - No pglogical extension installed on
3593	// databases, applicable for postgres.
3594	//   "PGLOGICAL_NODE_ALREADY_EXISTS" - pglogical node already exists on
3595	// databases, applicable for postgres.
3596	//   "INVALID_WAL_LEVEL" - The value of parameter wal_level is not set
3597	// to logical.
3598	//   "INVALID_SHARED_PRELOAD_LIBRARY" - The value of parameter
3599	// shared_preload_libraries does not include pglogical.
3600	//   "INSUFFICIENT_MAX_REPLICATION_SLOTS" - The value of parameter
3601	// max_replication_slots is not sufficient.
3602	//   "INSUFFICIENT_MAX_WAL_SENDERS" - The value of parameter
3603	// max_wal_senders is not sufficient.
3604	//   "INSUFFICIENT_MAX_WORKER_PROCESSES" - The value of parameter
3605	// max_worker_processes is not sufficient.
3606	//   "UNSUPPORTED_EXTENSIONS" - Extensions installed are either not
3607	// supported or having unsupported versions
3608	//   "INVALID_RDS_LOGICAL_REPLICATION" - The value of parameter
3609	// rds.logical_replication is not set to 1.
3610	//   "INVALID_LOGGING_SETUP" - The primary instance logging setup
3611	// doesn't allow EM sync.
3612	//   "INVALID_DB_PARAM" - The primary instance database parameter setup
3613	// doesn't allow EM sync.
3614	//   "UNSUPPORTED_GTID_MODE" - The gtid_mode is not supported,
3615	// applicable for MySQL.
3616	//   "SQLSERVER_AGENT_NOT_RUNNING" - SQL Server Agent is not running.
3617	//   "UNSUPPORTED_TABLE_DEFINITION" - The table definition is not
3618	// support due to missing primary key or replica identity, applicable
3619	// for postgres.
3620	//   "UNSUPPORTED_DEFINER" - The customer has a definer that will break
3621	// EM setup.
3622	//   "SQLSERVER_SERVERNAME_MISMATCH" - SQL Server @@SERVERNAME does not
3623	// match actual host name
3624	//   "PRIMARY_ALREADY_SETUP" - The primary instance has been setup and
3625	// will fail the setup.
3626	//   "UNSUPPORTED_BINLOG_FORMAT" - The primary instance has unsupported
3627	// binary log format.
3628	//   "BINLOG_RETENTION_SETTING" - The primary instance's binary log
3629	// retention setting.
3630	Type string `json:"type,omitempty"`
3631
3632	// ForceSendFields is a list of field names (e.g. "Detail") to
3633	// unconditionally include in API requests. By default, fields with
3634	// empty or default values are omitted from API requests. However, any
3635	// non-pointer, non-interface field appearing in ForceSendFields will be
3636	// sent to the server regardless of whether the field is empty or not.
3637	// This may be used to include empty fields in Patch requests.
3638	ForceSendFields []string `json:"-"`
3639
3640	// NullFields is a list of field names (e.g. "Detail") to include in API
3641	// requests with the JSON null value. By default, fields with empty
3642	// values are omitted from API requests. However, any field with an
3643	// empty value appearing in NullFields will be sent to the server as
3644	// null. It is an error if a field in this list has a non-empty value.
3645	// This may be used to include null fields in Patch requests.
3646	NullFields []string `json:"-"`
3647}
3648
3649func (s *SqlExternalSyncSettingError) MarshalJSON() ([]byte, error) {
3650	type NoMethod SqlExternalSyncSettingError
3651	raw := NoMethod(*s)
3652	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3653}
3654
3655// SqlInstancesRescheduleMaintenanceRequestBody: Reschedule options for
3656// maintenance windows.
3657type SqlInstancesRescheduleMaintenanceRequestBody struct {
3658	// Reschedule: Required. The type of the reschedule the user wants.
3659	Reschedule *Reschedule `json:"reschedule,omitempty"`
3660
3661	// ForceSendFields is a list of field names (e.g. "Reschedule") to
3662	// unconditionally include in API requests. By default, fields with
3663	// empty or default values are omitted from API requests. However, any
3664	// non-pointer, non-interface field appearing in ForceSendFields will be
3665	// sent to the server regardless of whether the field is empty or not.
3666	// This may be used to include empty fields in Patch requests.
3667	ForceSendFields []string `json:"-"`
3668
3669	// NullFields is a list of field names (e.g. "Reschedule") to include in
3670	// API requests with the JSON null value. By default, fields with empty
3671	// values are omitted from API requests. However, any field with an
3672	// empty value appearing in NullFields will be sent to the server as
3673	// null. It is an error if a field in this list has a non-empty value.
3674	// This may be used to include null fields in Patch requests.
3675	NullFields []string `json:"-"`
3676}
3677
3678func (s *SqlInstancesRescheduleMaintenanceRequestBody) MarshalJSON() ([]byte, error) {
3679	type NoMethod SqlInstancesRescheduleMaintenanceRequestBody
3680	raw := NoMethod(*s)
3681	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3682}
3683
3684// SqlInstancesStartExternalSyncRequest: Instance start external sync
3685// request.
3686type SqlInstancesStartExternalSyncRequest struct {
3687	// MysqlSyncConfig: MySQL-specific settings for start external sync.
3688	MysqlSyncConfig *MySqlSyncConfig `json:"mysqlSyncConfig,omitempty"`
3689
3690	// SkipVerification: Whether to skip the verification step (VESS).
3691	SkipVerification bool `json:"skipVerification,omitempty"`
3692
3693	// SyncMode: External sync mode.
3694	//
3695	// Possible values:
3696	//   "EXTERNAL_SYNC_MODE_UNSPECIFIED" - Unknown external sync mode, will
3697	// be defaulted to ONLINE mode
3698	//   "ONLINE" - Online external sync will set up replication after
3699	// initial data external sync
3700	//   "OFFLINE" - Offline external sync only dumps and loads a one-time
3701	// snapshot of the primary instance's data
3702	SyncMode string `json:"syncMode,omitempty"`
3703
3704	// ForceSendFields is a list of field names (e.g. "MysqlSyncConfig") to
3705	// unconditionally include in API requests. By default, fields with
3706	// empty or default values are omitted from API requests. However, any
3707	// non-pointer, non-interface field appearing in ForceSendFields will be
3708	// sent to the server regardless of whether the field is empty or not.
3709	// This may be used to include empty fields in Patch requests.
3710	ForceSendFields []string `json:"-"`
3711
3712	// NullFields is a list of field names (e.g. "MysqlSyncConfig") to
3713	// include in API requests with the JSON null value. By default, fields
3714	// with empty values are omitted from API requests. However, any field
3715	// with an empty value appearing in NullFields will be sent to the
3716	// server as null. It is an error if a field in this list has a
3717	// non-empty value. This may be used to include null fields in Patch
3718	// requests.
3719	NullFields []string `json:"-"`
3720}
3721
3722func (s *SqlInstancesStartExternalSyncRequest) MarshalJSON() ([]byte, error) {
3723	type NoMethod SqlInstancesStartExternalSyncRequest
3724	raw := NoMethod(*s)
3725	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3726}
3727
3728// SqlInstancesVerifyExternalSyncSettingsRequest: Instance verify
3729// external sync settings request.
3730type SqlInstancesVerifyExternalSyncSettingsRequest struct {
3731	// MysqlSyncConfig: Optional. MySQL-specific settings for start external
3732	// sync.
3733	MysqlSyncConfig *MySqlSyncConfig `json:"mysqlSyncConfig,omitempty"`
3734
3735	// SyncMode: External sync mode
3736	//
3737	// Possible values:
3738	//   "EXTERNAL_SYNC_MODE_UNSPECIFIED" - Unknown external sync mode, will
3739	// be defaulted to ONLINE mode
3740	//   "ONLINE" - Online external sync will set up replication after
3741	// initial data external sync
3742	//   "OFFLINE" - Offline external sync only dumps and loads a one-time
3743	// snapshot of the primary instance's data
3744	SyncMode string `json:"syncMode,omitempty"`
3745
3746	// VerifyConnectionOnly: Flag to enable verifying connection only
3747	VerifyConnectionOnly bool `json:"verifyConnectionOnly,omitempty"`
3748
3749	// VerifyReplicationOnly: Optional. Flag to verify settings required by
3750	// replication setup only
3751	VerifyReplicationOnly bool `json:"verifyReplicationOnly,omitempty"`
3752
3753	// ForceSendFields is a list of field names (e.g. "MysqlSyncConfig") to
3754	// unconditionally include in API requests. By default, fields with
3755	// empty or default values are omitted from API requests. However, any
3756	// non-pointer, non-interface field appearing in ForceSendFields will be
3757	// sent to the server regardless of whether the field is empty or not.
3758	// This may be used to include empty fields in Patch requests.
3759	ForceSendFields []string `json:"-"`
3760
3761	// NullFields is a list of field names (e.g. "MysqlSyncConfig") to
3762	// include in API requests with the JSON null value. By default, fields
3763	// with empty values are omitted from API requests. However, any field
3764	// with an empty value appearing in NullFields will be sent to the
3765	// server as null. It is an error if a field in this list has a
3766	// non-empty value. This may be used to include null fields in Patch
3767	// requests.
3768	NullFields []string `json:"-"`
3769}
3770
3771func (s *SqlInstancesVerifyExternalSyncSettingsRequest) MarshalJSON() ([]byte, error) {
3772	type NoMethod SqlInstancesVerifyExternalSyncSettingsRequest
3773	raw := NoMethod(*s)
3774	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3775}
3776
3777// SqlInstancesVerifyExternalSyncSettingsResponse: Instance verify
3778// external sync settings response.
3779type SqlInstancesVerifyExternalSyncSettingsResponse struct {
3780	// Errors: List of migration violations.
3781	Errors []*SqlExternalSyncSettingError `json:"errors,omitempty"`
3782
3783	// Kind: This is always **sql#migrationSettingErrorList**.
3784	Kind string `json:"kind,omitempty"`
3785
3786	// Warnings: List of migration warnings.
3787	Warnings []*SqlExternalSyncSettingError `json:"warnings,omitempty"`
3788
3789	// ServerResponse contains the HTTP response code and headers from the
3790	// server.
3791	googleapi.ServerResponse `json:"-"`
3792
3793	// ForceSendFields is a list of field names (e.g. "Errors") to
3794	// unconditionally include in API requests. By default, fields with
3795	// empty or default values are omitted from API requests. However, any
3796	// non-pointer, non-interface field appearing in ForceSendFields will be
3797	// sent to the server regardless of whether the field is empty or not.
3798	// This may be used to include empty fields in Patch requests.
3799	ForceSendFields []string `json:"-"`
3800
3801	// NullFields is a list of field names (e.g. "Errors") to include in API
3802	// requests with the JSON null value. By default, fields with empty
3803	// values are omitted from API requests. However, any field with an
3804	// empty value appearing in NullFields will be sent to the server as
3805	// null. It is an error if a field in this list has a non-empty value.
3806	// This may be used to include null fields in Patch requests.
3807	NullFields []string `json:"-"`
3808}
3809
3810func (s *SqlInstancesVerifyExternalSyncSettingsResponse) MarshalJSON() ([]byte, error) {
3811	type NoMethod SqlInstancesVerifyExternalSyncSettingsResponse
3812	raw := NoMethod(*s)
3813	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3814}
3815
3816// SqlOutOfDiskReport: This message wraps up the information written by
3817// out-of-disk detection job.
3818type SqlOutOfDiskReport struct {
3819	// SqlMinRecommendedIncreaseSizeGb: The minimum recommended increase
3820	// size in GigaBytes This field is consumed by the frontend * Writers: *
3821	// the proactive database wellness job for OOD. * Readers:
3822	SqlMinRecommendedIncreaseSizeGb int64 `json:"sqlMinRecommendedIncreaseSizeGb,omitempty"`
3823
3824	// SqlOutOfDiskState: This field represents the state generated by the
3825	// proactive database wellness job for OutOfDisk issues. * Writers: *
3826	// the proactive database wellness job for OOD. * Readers: * the
3827	// proactive database wellness job
3828	//
3829	// Possible values:
3830	//   "SQL_OUT_OF_DISK_STATE_UNSPECIFIED" - Unspecified state
3831	//   "NORMAL" - The instance has plenty space on data disk
3832	//   "SOFT_SHUTDOWN" - Data disk is almost used up. It is shutdown to
3833	// prevent data corruption.
3834	SqlOutOfDiskState string `json:"sqlOutOfDiskState,omitempty"`
3835
3836	// ForceSendFields is a list of field names (e.g.
3837	// "SqlMinRecommendedIncreaseSizeGb") to unconditionally include in API
3838	// requests. By default, fields with empty or default values are omitted
3839	// from API requests. However, any non-pointer, non-interface field
3840	// appearing in ForceSendFields will be sent to the server regardless of
3841	// whether the field is empty or not. This may be used to include empty
3842	// fields in Patch requests.
3843	ForceSendFields []string `json:"-"`
3844
3845	// NullFields is a list of field names (e.g.
3846	// "SqlMinRecommendedIncreaseSizeGb") to include in API requests with
3847	// the JSON null value. By default, fields with empty values are omitted
3848	// from API requests. However, any field with an empty value appearing
3849	// in NullFields will be sent to the server as null. It is an error if a
3850	// field in this list has a non-empty value. This may be used to include
3851	// null fields in Patch requests.
3852	NullFields []string `json:"-"`
3853}
3854
3855func (s *SqlOutOfDiskReport) MarshalJSON() ([]byte, error) {
3856	type NoMethod SqlOutOfDiskReport
3857	raw := NoMethod(*s)
3858	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3859}
3860
3861// SqlScheduledMaintenance: Any scheduled maintenancce for this
3862// instance.
3863type SqlScheduledMaintenance struct {
3864	CanDefer bool `json:"canDefer,omitempty"`
3865
3866	// CanReschedule: If the scheduled maintenance can be rescheduled.
3867	CanReschedule bool `json:"canReschedule,omitempty"`
3868
3869	// ScheduleDeadlineTime: Maintenance cannot be rescheduled to start
3870	// beyond this deadline.
3871	ScheduleDeadlineTime string `json:"scheduleDeadlineTime,omitempty"`
3872
3873	// StartTime: The start time of any upcoming scheduled maintenance for
3874	// this instance.
3875	StartTime string `json:"startTime,omitempty"`
3876
3877	// ForceSendFields is a list of field names (e.g. "CanDefer") to
3878	// unconditionally include in API requests. By default, fields with
3879	// empty or default values are omitted from API requests. However, any
3880	// non-pointer, non-interface field appearing in ForceSendFields will be
3881	// sent to the server regardless of whether the field is empty or not.
3882	// This may be used to include empty fields in Patch requests.
3883	ForceSendFields []string `json:"-"`
3884
3885	// NullFields is a list of field names (e.g. "CanDefer") to include in
3886	// API requests with the JSON null value. By default, fields with empty
3887	// values are omitted from API requests. However, any field with an
3888	// empty value appearing in NullFields will be sent to the server as
3889	// null. It is an error if a field in this list has a non-empty value.
3890	// This may be used to include null fields in Patch requests.
3891	NullFields []string `json:"-"`
3892}
3893
3894func (s *SqlScheduledMaintenance) MarshalJSON() ([]byte, error) {
3895	type NoMethod SqlScheduledMaintenance
3896	raw := NoMethod(*s)
3897	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3898}
3899
3900// SqlServerAuditConfig: SQL Server specific audit configuration.
3901type SqlServerAuditConfig struct {
3902	// Bucket: The name of the destination bucket (e.g., gs://mybucket).
3903	Bucket string `json:"bucket,omitempty"`
3904
3905	// Kind: This is always sql#sqlServerAuditConfig
3906	Kind string `json:"kind,omitempty"`
3907
3908	// ForceSendFields is a list of field names (e.g. "Bucket") to
3909	// unconditionally include in API requests. By default, fields with
3910	// empty or default values are omitted from API requests. However, any
3911	// non-pointer, non-interface field appearing in ForceSendFields will be
3912	// sent to the server regardless of whether the field is empty or not.
3913	// This may be used to include empty fields in Patch requests.
3914	ForceSendFields []string `json:"-"`
3915
3916	// NullFields is a list of field names (e.g. "Bucket") to include in API
3917	// requests with the JSON null value. By default, fields with empty
3918	// values are omitted from API requests. However, any field with an
3919	// empty value appearing in NullFields will be sent to the server as
3920	// null. It is an error if a field in this list has a non-empty value.
3921	// This may be used to include null fields in Patch requests.
3922	NullFields []string `json:"-"`
3923}
3924
3925func (s *SqlServerAuditConfig) MarshalJSON() ([]byte, error) {
3926	type NoMethod SqlServerAuditConfig
3927	raw := NoMethod(*s)
3928	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3929}
3930
3931// SqlServerDatabaseDetails: Represents a Sql Server database on the
3932// Cloud SQL instance.
3933type SqlServerDatabaseDetails struct {
3934	// CompatibilityLevel: The version of SQL Server with which the database
3935	// is to be made compatible
3936	CompatibilityLevel int64 `json:"compatibilityLevel,omitempty"`
3937
3938	// RecoveryModel: The recovery model of a SQL Server database
3939	RecoveryModel string `json:"recoveryModel,omitempty"`
3940
3941	// ForceSendFields is a list of field names (e.g. "CompatibilityLevel")
3942	// to unconditionally include in API requests. By default, fields with
3943	// empty or default values are omitted from API requests. However, any
3944	// non-pointer, non-interface field appearing in ForceSendFields will be
3945	// sent to the server regardless of whether the field is empty or not.
3946	// This may be used to include empty fields in Patch requests.
3947	ForceSendFields []string `json:"-"`
3948
3949	// NullFields is a list of field names (e.g. "CompatibilityLevel") to
3950	// include in API requests with the JSON null value. By default, fields
3951	// with empty values are omitted from API requests. However, any field
3952	// with an empty value appearing in NullFields will be sent to the
3953	// server as null. It is an error if a field in this list has a
3954	// non-empty value. This may be used to include null fields in Patch
3955	// requests.
3956	NullFields []string `json:"-"`
3957}
3958
3959func (s *SqlServerDatabaseDetails) MarshalJSON() ([]byte, error) {
3960	type NoMethod SqlServerDatabaseDetails
3961	raw := NoMethod(*s)
3962	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3963}
3964
3965// SqlServerUserDetails: Represents a Sql Server user on the Cloud SQL
3966// instance.
3967type SqlServerUserDetails struct {
3968	// Disabled: If the user has been disabled
3969	Disabled bool `json:"disabled,omitempty"`
3970
3971	// ServerRoles: The server roles for this user
3972	ServerRoles []string `json:"serverRoles,omitempty"`
3973
3974	// ForceSendFields is a list of field names (e.g. "Disabled") to
3975	// unconditionally include in API requests. By default, fields with
3976	// empty or default values are omitted from API requests. However, any
3977	// non-pointer, non-interface field appearing in ForceSendFields will be
3978	// sent to the server regardless of whether the field is empty or not.
3979	// This may be used to include empty fields in Patch requests.
3980	ForceSendFields []string `json:"-"`
3981
3982	// NullFields is a list of field names (e.g. "Disabled") to include in
3983	// API requests with the JSON null value. By default, fields with empty
3984	// values are omitted from API requests. However, any field with an
3985	// empty value appearing in NullFields will be sent to the server as
3986	// null. It is an error if a field in this list has a non-empty value.
3987	// This may be used to include null fields in Patch requests.
3988	NullFields []string `json:"-"`
3989}
3990
3991func (s *SqlServerUserDetails) MarshalJSON() ([]byte, error) {
3992	type NoMethod SqlServerUserDetails
3993	raw := NoMethod(*s)
3994	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3995}
3996
3997// SslCert: SslCerts Resource
3998type SslCert struct {
3999	// Cert: PEM representation.
4000	Cert string `json:"cert,omitempty"`
4001
4002	// CertSerialNumber: Serial number, as extracted from the certificate.
4003	CertSerialNumber string `json:"certSerialNumber,omitempty"`
4004
4005	// CommonName: User supplied name. Constrained to [a-zA-Z.-_ ]+.
4006	CommonName string `json:"commonName,omitempty"`
4007
4008	// CreateTime: The time when the certificate was created in RFC 3339
4009	// (https://tools.ietf.org/html/rfc3339) format, for example
4010	// **2012-11-15T16:19:00.094Z**
4011	CreateTime string `json:"createTime,omitempty"`
4012
4013	// ExpirationTime: The time when the certificate expires in RFC 3339
4014	// (https://tools.ietf.org/html/rfc3339) format, for example
4015	// **2012-11-15T16:19:00.094Z**.
4016	ExpirationTime string `json:"expirationTime,omitempty"`
4017
4018	// Instance: Name of the database instance.
4019	Instance string `json:"instance,omitempty"`
4020
4021	// Kind: This is always **sql#sslCert**.
4022	Kind string `json:"kind,omitempty"`
4023
4024	// SelfLink: The URI of this resource.
4025	SelfLink string `json:"selfLink,omitempty"`
4026
4027	// Sha1Fingerprint: Sha1 Fingerprint.
4028	Sha1Fingerprint string `json:"sha1Fingerprint,omitempty"`
4029
4030	// ServerResponse contains the HTTP response code and headers from the
4031	// server.
4032	googleapi.ServerResponse `json:"-"`
4033
4034	// ForceSendFields is a list of field names (e.g. "Cert") to
4035	// unconditionally include in API requests. By default, fields with
4036	// empty or default values are omitted from API requests. However, any
4037	// non-pointer, non-interface field appearing in ForceSendFields will be
4038	// sent to the server regardless of whether the field is empty or not.
4039	// This may be used to include empty fields in Patch requests.
4040	ForceSendFields []string `json:"-"`
4041
4042	// NullFields is a list of field names (e.g. "Cert") to include in API
4043	// requests with the JSON null value. By default, fields with empty
4044	// values are omitted from API requests. However, any field with an
4045	// empty value appearing in NullFields will be sent to the server as
4046	// null. It is an error if a field in this list has a non-empty value.
4047	// This may be used to include null fields in Patch requests.
4048	NullFields []string `json:"-"`
4049}
4050
4051func (s *SslCert) MarshalJSON() ([]byte, error) {
4052	type NoMethod SslCert
4053	raw := NoMethod(*s)
4054	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4055}
4056
4057// SslCertDetail: SslCertDetail.
4058type SslCertDetail struct {
4059	// CertInfo: The public information about the cert.
4060	CertInfo *SslCert `json:"certInfo,omitempty"`
4061
4062	// CertPrivateKey: The private key for the client cert, in pem format.
4063	// Keep private in order to protect your security.
4064	CertPrivateKey string `json:"certPrivateKey,omitempty"`
4065
4066	// ForceSendFields is a list of field names (e.g. "CertInfo") to
4067	// unconditionally include in API requests. By default, fields with
4068	// empty or default values are omitted from API requests. However, any
4069	// non-pointer, non-interface field appearing in ForceSendFields will be
4070	// sent to the server regardless of whether the field is empty or not.
4071	// This may be used to include empty fields in Patch requests.
4072	ForceSendFields []string `json:"-"`
4073
4074	// NullFields is a list of field names (e.g. "CertInfo") to include in
4075	// API requests with the JSON null value. By default, fields with empty
4076	// values are omitted from API requests. However, any field with an
4077	// empty value appearing in NullFields will be sent to the server as
4078	// null. It is an error if a field in this list has a non-empty value.
4079	// This may be used to include null fields in Patch requests.
4080	NullFields []string `json:"-"`
4081}
4082
4083func (s *SslCertDetail) MarshalJSON() ([]byte, error) {
4084	type NoMethod SslCertDetail
4085	raw := NoMethod(*s)
4086	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4087}
4088
4089// SslCertsCreateEphemeralRequest: SslCerts create ephemeral certificate
4090// request.
4091type SslCertsCreateEphemeralRequest struct {
4092	// AccessToken: Access token to include in the signed certificate.
4093	AccessToken string `json:"access_token,omitempty"`
4094
4095	// PublicKey: PEM encoded public key to include in the signed
4096	// certificate.
4097	PublicKey string `json:"public_key,omitempty"`
4098
4099	// ForceSendFields is a list of field names (e.g. "AccessToken") to
4100	// unconditionally include in API requests. By default, fields with
4101	// empty or default values are omitted from API requests. However, any
4102	// non-pointer, non-interface field appearing in ForceSendFields will be
4103	// sent to the server regardless of whether the field is empty or not.
4104	// This may be used to include empty fields in Patch requests.
4105	ForceSendFields []string `json:"-"`
4106
4107	// NullFields is a list of field names (e.g. "AccessToken") to include
4108	// in API requests with the JSON null value. By default, fields with
4109	// empty values are omitted from API requests. However, any field with
4110	// an empty value appearing in NullFields will be sent to the server as
4111	// null. It is an error if a field in this list has a non-empty value.
4112	// This may be used to include null fields in Patch requests.
4113	NullFields []string `json:"-"`
4114}
4115
4116func (s *SslCertsCreateEphemeralRequest) MarshalJSON() ([]byte, error) {
4117	type NoMethod SslCertsCreateEphemeralRequest
4118	raw := NoMethod(*s)
4119	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4120}
4121
4122// SslCertsInsertRequest: SslCerts insert request.
4123type SslCertsInsertRequest struct {
4124	// CommonName: User supplied name. Must be a distinct name from the
4125	// other certificates for this instance.
4126	CommonName string `json:"commonName,omitempty"`
4127
4128	// ForceSendFields is a list of field names (e.g. "CommonName") to
4129	// unconditionally include in API requests. By default, fields with
4130	// empty or default values are omitted from API requests. However, any
4131	// non-pointer, non-interface field appearing in ForceSendFields will be
4132	// sent to the server regardless of whether the field is empty or not.
4133	// This may be used to include empty fields in Patch requests.
4134	ForceSendFields []string `json:"-"`
4135
4136	// NullFields is a list of field names (e.g. "CommonName") to include in
4137	// API requests with the JSON null value. By default, fields with empty
4138	// values are omitted from API requests. However, any field with an
4139	// empty value appearing in NullFields will be sent to the server as
4140	// null. It is an error if a field in this list has a non-empty value.
4141	// This may be used to include null fields in Patch requests.
4142	NullFields []string `json:"-"`
4143}
4144
4145func (s *SslCertsInsertRequest) MarshalJSON() ([]byte, error) {
4146	type NoMethod SslCertsInsertRequest
4147	raw := NoMethod(*s)
4148	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4149}
4150
4151// SslCertsInsertResponse: SslCert insert response.
4152type SslCertsInsertResponse struct {
4153	// ClientCert: The new client certificate and private key.
4154	ClientCert *SslCertDetail `json:"clientCert,omitempty"`
4155
4156	// Kind: This is always **sql#sslCertsInsert**.
4157	Kind string `json:"kind,omitempty"`
4158
4159	// Operation: The operation to track the ssl certs insert request.
4160	Operation *Operation `json:"operation,omitempty"`
4161
4162	// ServerCaCert: The server Certificate Authority's certificate. If this
4163	// is missing you can force a new one to be generated by calling
4164	// resetSslConfig method on instances resource.
4165	ServerCaCert *SslCert `json:"serverCaCert,omitempty"`
4166
4167	// ServerResponse contains the HTTP response code and headers from the
4168	// server.
4169	googleapi.ServerResponse `json:"-"`
4170
4171	// ForceSendFields is a list of field names (e.g. "ClientCert") to
4172	// unconditionally include in API requests. By default, fields with
4173	// empty or default values are omitted from API requests. However, any
4174	// non-pointer, non-interface field appearing in ForceSendFields will be
4175	// sent to the server regardless of whether the field is empty or not.
4176	// This may be used to include empty fields in Patch requests.
4177	ForceSendFields []string `json:"-"`
4178
4179	// NullFields is a list of field names (e.g. "ClientCert") to include in
4180	// API requests with the JSON null value. By default, fields with empty
4181	// values are omitted from API requests. However, any field with an
4182	// empty value appearing in NullFields will be sent to the server as
4183	// null. It is an error if a field in this list has a non-empty value.
4184	// This may be used to include null fields in Patch requests.
4185	NullFields []string `json:"-"`
4186}
4187
4188func (s *SslCertsInsertResponse) MarshalJSON() ([]byte, error) {
4189	type NoMethod SslCertsInsertResponse
4190	raw := NoMethod(*s)
4191	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4192}
4193
4194// SslCertsListResponse: SslCerts list response.
4195type SslCertsListResponse struct {
4196	// Items: List of client certificates for the instance.
4197	Items []*SslCert `json:"items,omitempty"`
4198
4199	// Kind: This is always **sql#sslCertsList**.
4200	Kind string `json:"kind,omitempty"`
4201
4202	// ServerResponse contains the HTTP response code and headers from the
4203	// server.
4204	googleapi.ServerResponse `json:"-"`
4205
4206	// ForceSendFields is a list of field names (e.g. "Items") to
4207	// unconditionally include in API requests. By default, fields with
4208	// empty or default values are omitted from API requests. However, any
4209	// non-pointer, non-interface field appearing in ForceSendFields will be
4210	// sent to the server regardless of whether the field is empty or not.
4211	// This may be used to include empty fields in Patch requests.
4212	ForceSendFields []string `json:"-"`
4213
4214	// NullFields is a list of field names (e.g. "Items") to include in API
4215	// requests with the JSON null value. By default, fields with empty
4216	// values are omitted from API requests. However, any field with an
4217	// empty value appearing in NullFields will be sent to the server as
4218	// null. It is an error if a field in this list has a non-empty value.
4219	// This may be used to include null fields in Patch requests.
4220	NullFields []string `json:"-"`
4221}
4222
4223func (s *SslCertsListResponse) MarshalJSON() ([]byte, error) {
4224	type NoMethod SslCertsListResponse
4225	raw := NoMethod(*s)
4226	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4227}
4228
4229// SyncFlags: Initial sync flags for certain Cloud SQL APIs. Currently
4230// used for the MySQL external server initial dump.
4231type SyncFlags struct {
4232	// Name: The name of the flag.
4233	Name string `json:"name,omitempty"`
4234
4235	// Value: The value of the flag. This field must be omitted if the flag
4236	// doesn't take a value.
4237	Value string `json:"value,omitempty"`
4238
4239	// ForceSendFields is a list of field names (e.g. "Name") to
4240	// unconditionally include in API requests. By default, fields with
4241	// empty or default values are omitted from API requests. However, any
4242	// non-pointer, non-interface field appearing in ForceSendFields will be
4243	// sent to the server regardless of whether the field is empty or not.
4244	// This may be used to include empty fields in Patch requests.
4245	ForceSendFields []string `json:"-"`
4246
4247	// NullFields is a list of field names (e.g. "Name") to include in API
4248	// requests with the JSON null value. By default, fields with empty
4249	// values are omitted from API requests. However, any field with an
4250	// empty value appearing in NullFields will be sent to the server as
4251	// null. It is an error if a field in this list has a non-empty value.
4252	// This may be used to include null fields in Patch requests.
4253	NullFields []string `json:"-"`
4254}
4255
4256func (s *SyncFlags) MarshalJSON() ([]byte, error) {
4257	type NoMethod SyncFlags
4258	raw := NoMethod(*s)
4259	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4260}
4261
4262// Tier: A Google Cloud SQL service tier resource.
4263type Tier struct {
4264	// DiskQuota: The maximum disk size of this tier in bytes.
4265	DiskQuota int64 `json:"DiskQuota,omitempty,string"`
4266
4267	// RAM: The maximum RAM usage of this tier in bytes.
4268	RAM int64 `json:"RAM,omitempty,string"`
4269
4270	// Kind: This is always **sql#tier**.
4271	Kind string `json:"kind,omitempty"`
4272
4273	// Region: The applicable regions for this tier.
4274	Region []string `json:"region,omitempty"`
4275
4276	// Tier: An identifier for the machine type, for example,
4277	// db-custom-1-3840. For related information, see Pricing
4278	// (/sql/pricing).
4279	Tier string `json:"tier,omitempty"`
4280
4281	// ForceSendFields is a list of field names (e.g. "DiskQuota") to
4282	// unconditionally include in API requests. By default, fields with
4283	// empty or default values are omitted from API requests. However, any
4284	// non-pointer, non-interface field appearing in ForceSendFields will be
4285	// sent to the server regardless of whether the field is empty or not.
4286	// This may be used to include empty fields in Patch requests.
4287	ForceSendFields []string `json:"-"`
4288
4289	// NullFields is a list of field names (e.g. "DiskQuota") to include in
4290	// API requests with the JSON null value. By default, fields with empty
4291	// values are omitted from API requests. However, any field with an
4292	// empty value appearing in NullFields will be sent to the server as
4293	// null. It is an error if a field in this list has a non-empty value.
4294	// This may be used to include null fields in Patch requests.
4295	NullFields []string `json:"-"`
4296}
4297
4298func (s *Tier) MarshalJSON() ([]byte, error) {
4299	type NoMethod Tier
4300	raw := NoMethod(*s)
4301	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4302}
4303
4304// TiersListResponse: Tiers list response.
4305type TiersListResponse struct {
4306	// Items: List of tiers.
4307	Items []*Tier `json:"items,omitempty"`
4308
4309	// Kind: This is always **sql#tiersList**.
4310	Kind string `json:"kind,omitempty"`
4311
4312	// ServerResponse contains the HTTP response code and headers from the
4313	// server.
4314	googleapi.ServerResponse `json:"-"`
4315
4316	// ForceSendFields is a list of field names (e.g. "Items") to
4317	// unconditionally include in API requests. By default, fields with
4318	// empty or default values are omitted from API requests. However, any
4319	// non-pointer, non-interface field appearing in ForceSendFields will be
4320	// sent to the server regardless of whether the field is empty or not.
4321	// This may be used to include empty fields in Patch requests.
4322	ForceSendFields []string `json:"-"`
4323
4324	// NullFields is a list of field names (e.g. "Items") to include in API
4325	// requests with the JSON null value. By default, fields with empty
4326	// values are omitted from API requests. However, any field with an
4327	// empty value appearing in NullFields will be sent to the server as
4328	// null. It is an error if a field in this list has a non-empty value.
4329	// This may be used to include null fields in Patch requests.
4330	NullFields []string `json:"-"`
4331}
4332
4333func (s *TiersListResponse) MarshalJSON() ([]byte, error) {
4334	type NoMethod TiersListResponse
4335	raw := NoMethod(*s)
4336	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4337}
4338
4339// TruncateLogContext: Database Instance truncate log context.
4340type TruncateLogContext struct {
4341	// Kind: This is always **sql#truncateLogContext**.
4342	Kind string `json:"kind,omitempty"`
4343
4344	// LogType: The type of log to truncate. Valid values are
4345	// **MYSQL_GENERAL_TABLE** and **MYSQL_SLOW_TABLE**.
4346	LogType string `json:"logType,omitempty"`
4347
4348	// ForceSendFields is a list of field names (e.g. "Kind") to
4349	// unconditionally include in API requests. By default, fields with
4350	// empty or default values are omitted from API requests. However, any
4351	// non-pointer, non-interface field appearing in ForceSendFields will be
4352	// sent to the server regardless of whether the field is empty or not.
4353	// This may be used to include empty fields in Patch requests.
4354	ForceSendFields []string `json:"-"`
4355
4356	// NullFields is a list of field names (e.g. "Kind") to include in API
4357	// requests with the JSON null value. By default, fields with empty
4358	// values are omitted from API requests. However, any field with an
4359	// empty value appearing in NullFields will be sent to the server as
4360	// null. It is an error if a field in this list has a non-empty value.
4361	// This may be used to include null fields in Patch requests.
4362	NullFields []string `json:"-"`
4363}
4364
4365func (s *TruncateLogContext) MarshalJSON() ([]byte, error) {
4366	type NoMethod TruncateLogContext
4367	raw := NoMethod(*s)
4368	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4369}
4370
4371// User: A Cloud SQL user resource.
4372type User struct {
4373	// Etag: This field is deprecated and will be removed from a future
4374	// version of the API.
4375	Etag string `json:"etag,omitempty"`
4376
4377	// Host: Optional. The host name from which the user can connect. For
4378	// **insert** operations, host defaults to an empty string. For
4379	// **update** operations, host is specified as part of the request URL.
4380	// The host name cannot be updated after insertion. For a MySQL
4381	// instance, it's required; for a PostgreSQL or SQL Server instance,
4382	// it's optional.
4383	Host string `json:"host,omitempty"`
4384
4385	// Instance: The name of the Cloud SQL instance. This does not include
4386	// the project ID. Can be omitted for **update** since it is already
4387	// specified on the URL.
4388	Instance string `json:"instance,omitempty"`
4389
4390	// Kind: This is always **sql#user**.
4391	Kind string `json:"kind,omitempty"`
4392
4393	// Name: The name of the user in the Cloud SQL instance. Can be omitted
4394	// for **update** since it is already specified in the URL.
4395	Name string `json:"name,omitempty"`
4396
4397	// Password: The password for the user.
4398	Password string `json:"password,omitempty"`
4399
4400	// PasswordPolicy: User level password validation policy.
4401	PasswordPolicy *UserPasswordValidationPolicy `json:"passwordPolicy,omitempty"`
4402
4403	// Project: The project ID of the project containing the Cloud SQL
4404	// database. The Google apps domain is prefixed if applicable. Can be
4405	// omitted for **update** since it is already specified on the URL.
4406	Project string `json:"project,omitempty"`
4407
4408	SqlserverUserDetails *SqlServerUserDetails `json:"sqlserverUserDetails,omitempty"`
4409
4410	// Type: The user type. It determines the method to authenticate the
4411	// user during login. The default is the database's built-in user type.
4412	//
4413	// Possible values:
4414	//   "BUILT_IN" - The database's built-in user type.
4415	//   "CLOUD_IAM_USER" - Cloud IAM user.
4416	//   "CLOUD_IAM_SERVICE_ACCOUNT" - Cloud IAM service account.
4417	Type string `json:"type,omitempty"`
4418
4419	// ForceSendFields is a list of field names (e.g. "Etag") to
4420	// unconditionally include in API requests. By default, fields with
4421	// empty or default values are omitted from API requests. However, any
4422	// non-pointer, non-interface field appearing in ForceSendFields will be
4423	// sent to the server regardless of whether the field is empty or not.
4424	// This may be used to include empty fields in Patch requests.
4425	ForceSendFields []string `json:"-"`
4426
4427	// NullFields is a list of field names (e.g. "Etag") to include in API
4428	// requests with the JSON null value. By default, fields with empty
4429	// values are omitted from API requests. However, any field with an
4430	// empty value appearing in NullFields will be sent to the server as
4431	// null. It is an error if a field in this list has a non-empty value.
4432	// This may be used to include null fields in Patch requests.
4433	NullFields []string `json:"-"`
4434}
4435
4436func (s *User) MarshalJSON() ([]byte, error) {
4437	type NoMethod User
4438	raw := NoMethod(*s)
4439	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4440}
4441
4442// UserPasswordValidationPolicy: User level password validation policy.
4443type UserPasswordValidationPolicy struct {
4444	// AllowedFailedAttempts: Number of failed login attempts allowed before
4445	// user get locked.
4446	AllowedFailedAttempts int64 `json:"allowedFailedAttempts,omitempty"`
4447
4448	// EnableFailedAttemptsCheck: If true, failed login attempts check will
4449	// be enabled.
4450	EnableFailedAttemptsCheck bool `json:"enableFailedAttemptsCheck,omitempty"`
4451
4452	// PasswordExpirationDuration: Expiration duration after password is
4453	// updated.
4454	PasswordExpirationDuration string `json:"passwordExpirationDuration,omitempty"`
4455
4456	// Status: Output only. Read-only password status.
4457	Status *PasswordStatus `json:"status,omitempty"`
4458
4459	// ForceSendFields is a list of field names (e.g.
4460	// "AllowedFailedAttempts") to unconditionally include in API requests.
4461	// By default, fields with empty or default values are omitted from API
4462	// requests. However, any non-pointer, non-interface field appearing in
4463	// ForceSendFields will be sent to the server regardless of whether the
4464	// field is empty or not. This may be used to include empty fields in
4465	// Patch requests.
4466	ForceSendFields []string `json:"-"`
4467
4468	// NullFields is a list of field names (e.g. "AllowedFailedAttempts") to
4469	// include in API requests with the JSON null value. By default, fields
4470	// with empty values are omitted from API requests. However, any field
4471	// with an empty value appearing in NullFields will be sent to the
4472	// server as null. It is an error if a field in this list has a
4473	// non-empty value. This may be used to include null fields in Patch
4474	// requests.
4475	NullFields []string `json:"-"`
4476}
4477
4478func (s *UserPasswordValidationPolicy) MarshalJSON() ([]byte, error) {
4479	type NoMethod UserPasswordValidationPolicy
4480	raw := NoMethod(*s)
4481	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4482}
4483
4484// UsersListResponse: User list response.
4485type UsersListResponse struct {
4486	// Items: List of user resources in the instance.
4487	Items []*User `json:"items,omitempty"`
4488
4489	// Kind: This is always **sql#usersList**.
4490	Kind string `json:"kind,omitempty"`
4491
4492	// NextPageToken: An identifier that uniquely identifies the operation.
4493	// You can use this identifier to retrieve the Operations resource that
4494	// has information about the operation.
4495	NextPageToken string `json:"nextPageToken,omitempty"`
4496
4497	// ServerResponse contains the HTTP response code and headers from the
4498	// server.
4499	googleapi.ServerResponse `json:"-"`
4500
4501	// ForceSendFields is a list of field names (e.g. "Items") to
4502	// unconditionally include in API requests. By default, fields with
4503	// empty or default values are omitted from API requests. However, any
4504	// non-pointer, non-interface field appearing in ForceSendFields will be
4505	// sent to the server regardless of whether the field is empty or not.
4506	// This may be used to include empty fields in Patch requests.
4507	ForceSendFields []string `json:"-"`
4508
4509	// NullFields is a list of field names (e.g. "Items") to include in API
4510	// requests with the JSON null value. By default, fields with empty
4511	// values are omitted from API requests. However, any field with an
4512	// empty value appearing in NullFields will be sent to the server as
4513	// null. It is an error if a field in this list has a non-empty value.
4514	// This may be used to include null fields in Patch requests.
4515	NullFields []string `json:"-"`
4516}
4517
4518func (s *UsersListResponse) MarshalJSON() ([]byte, error) {
4519	type NoMethod UsersListResponse
4520	raw := NoMethod(*s)
4521	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4522}
4523
4524// method id "sql.backupRuns.delete":
4525
4526type BackupRunsDeleteCall struct {
4527	s          *Service
4528	project    string
4529	instance   string
4530	id         int64
4531	urlParams_ gensupport.URLParams
4532	ctx_       context.Context
4533	header_    http.Header
4534}
4535
4536// Delete: Deletes the backup taken by a backup run.
4537//
4538// - id: The ID of the backup run to delete. To find a backup run ID,
4539//   use the list
4540//   (https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list)
4541//   method.
4542// - instance: Cloud SQL instance ID. This does not include the project
4543//   ID.
4544// - project: Project ID of the project that contains the instance.
4545func (r *BackupRunsService) Delete(project string, instance string, id int64) *BackupRunsDeleteCall {
4546	c := &BackupRunsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4547	c.project = project
4548	c.instance = instance
4549	c.id = id
4550	return c
4551}
4552
4553// Fields allows partial responses to be retrieved. See
4554// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4555// for more information.
4556func (c *BackupRunsDeleteCall) Fields(s ...googleapi.Field) *BackupRunsDeleteCall {
4557	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4558	return c
4559}
4560
4561// Context sets the context to be used in this call's Do method. Any
4562// pending HTTP request will be aborted if the provided context is
4563// canceled.
4564func (c *BackupRunsDeleteCall) Context(ctx context.Context) *BackupRunsDeleteCall {
4565	c.ctx_ = ctx
4566	return c
4567}
4568
4569// Header returns an http.Header that can be modified by the caller to
4570// add HTTP headers to the request.
4571func (c *BackupRunsDeleteCall) Header() http.Header {
4572	if c.header_ == nil {
4573		c.header_ = make(http.Header)
4574	}
4575	return c.header_
4576}
4577
4578func (c *BackupRunsDeleteCall) doRequest(alt string) (*http.Response, error) {
4579	reqHeaders := make(http.Header)
4580	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
4581	for k, v := range c.header_ {
4582		reqHeaders[k] = v
4583	}
4584	reqHeaders.Set("User-Agent", c.s.userAgent())
4585	var body io.Reader = nil
4586	c.urlParams_.Set("alt", alt)
4587	c.urlParams_.Set("prettyPrint", "false")
4588	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns/{id}")
4589	urls += "?" + c.urlParams_.Encode()
4590	req, err := http.NewRequest("DELETE", urls, body)
4591	if err != nil {
4592		return nil, err
4593	}
4594	req.Header = reqHeaders
4595	googleapi.Expand(req.URL, map[string]string{
4596		"project":  c.project,
4597		"instance": c.instance,
4598		"id":       strconv.FormatInt(c.id, 10),
4599	})
4600	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4601}
4602
4603// Do executes the "sql.backupRuns.delete" call.
4604// Exactly one of *Operation or error will be non-nil. Any non-2xx
4605// status code is an error. Response headers are in either
4606// *Operation.ServerResponse.Header or (if a response was returned at
4607// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4608// to check whether the returned error was because
4609// http.StatusNotModified was returned.
4610func (c *BackupRunsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4611	gensupport.SetOptions(c.urlParams_, opts...)
4612	res, err := c.doRequest("json")
4613	if res != nil && res.StatusCode == http.StatusNotModified {
4614		if res.Body != nil {
4615			res.Body.Close()
4616		}
4617		return nil, &googleapi.Error{
4618			Code:   res.StatusCode,
4619			Header: res.Header,
4620		}
4621	}
4622	if err != nil {
4623		return nil, err
4624	}
4625	defer googleapi.CloseBody(res)
4626	if err := googleapi.CheckResponse(res); err != nil {
4627		return nil, err
4628	}
4629	ret := &Operation{
4630		ServerResponse: googleapi.ServerResponse{
4631			Header:         res.Header,
4632			HTTPStatusCode: res.StatusCode,
4633		},
4634	}
4635	target := &ret
4636	if err := gensupport.DecodeResponse(target, res); err != nil {
4637		return nil, err
4638	}
4639	return ret, nil
4640	// {
4641	//   "description": "Deletes the backup taken by a backup run.",
4642	//   "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns/{id}",
4643	//   "httpMethod": "DELETE",
4644	//   "id": "sql.backupRuns.delete",
4645	//   "parameterOrder": [
4646	//     "project",
4647	//     "instance",
4648	//     "id"
4649	//   ],
4650	//   "parameters": {
4651	//     "id": {
4652	//       "description": "The ID of the backup run to delete. To find a backup run ID, use the [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) method.",
4653	//       "format": "int64",
4654	//       "location": "path",
4655	//       "required": true,
4656	//       "type": "string"
4657	//     },
4658	//     "instance": {
4659	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
4660	//       "location": "path",
4661	//       "required": true,
4662	//       "type": "string"
4663	//     },
4664	//     "project": {
4665	//       "description": "Project ID of the project that contains the instance.",
4666	//       "location": "path",
4667	//       "required": true,
4668	//       "type": "string"
4669	//     }
4670	//   },
4671	//   "path": "v1/projects/{project}/instances/{instance}/backupRuns/{id}",
4672	//   "response": {
4673	//     "$ref": "Operation"
4674	//   },
4675	//   "scopes": [
4676	//     "https://www.googleapis.com/auth/cloud-platform",
4677	//     "https://www.googleapis.com/auth/sqlservice.admin"
4678	//   ]
4679	// }
4680
4681}
4682
4683// method id "sql.backupRuns.get":
4684
4685type BackupRunsGetCall struct {
4686	s            *Service
4687	project      string
4688	instance     string
4689	id           int64
4690	urlParams_   gensupport.URLParams
4691	ifNoneMatch_ string
4692	ctx_         context.Context
4693	header_      http.Header
4694}
4695
4696// Get: Retrieves a resource containing information about a backup run.
4697//
4698// - id: The ID of this backup run.
4699// - instance: Cloud SQL instance ID. This does not include the project
4700//   ID.
4701// - project: Project ID of the project that contains the instance.
4702func (r *BackupRunsService) Get(project string, instance string, id int64) *BackupRunsGetCall {
4703	c := &BackupRunsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4704	c.project = project
4705	c.instance = instance
4706	c.id = id
4707	return c
4708}
4709
4710// Fields allows partial responses to be retrieved. See
4711// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4712// for more information.
4713func (c *BackupRunsGetCall) Fields(s ...googleapi.Field) *BackupRunsGetCall {
4714	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4715	return c
4716}
4717
4718// IfNoneMatch sets the optional parameter which makes the operation
4719// fail if the object's ETag matches the given value. This is useful for
4720// getting updates only after the object has changed since the last
4721// request. Use googleapi.IsNotModified to check whether the response
4722// error from Do is the result of In-None-Match.
4723func (c *BackupRunsGetCall) IfNoneMatch(entityTag string) *BackupRunsGetCall {
4724	c.ifNoneMatch_ = entityTag
4725	return c
4726}
4727
4728// Context sets the context to be used in this call's Do method. Any
4729// pending HTTP request will be aborted if the provided context is
4730// canceled.
4731func (c *BackupRunsGetCall) Context(ctx context.Context) *BackupRunsGetCall {
4732	c.ctx_ = ctx
4733	return c
4734}
4735
4736// Header returns an http.Header that can be modified by the caller to
4737// add HTTP headers to the request.
4738func (c *BackupRunsGetCall) Header() http.Header {
4739	if c.header_ == nil {
4740		c.header_ = make(http.Header)
4741	}
4742	return c.header_
4743}
4744
4745func (c *BackupRunsGetCall) doRequest(alt string) (*http.Response, error) {
4746	reqHeaders := make(http.Header)
4747	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
4748	for k, v := range c.header_ {
4749		reqHeaders[k] = v
4750	}
4751	reqHeaders.Set("User-Agent", c.s.userAgent())
4752	if c.ifNoneMatch_ != "" {
4753		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4754	}
4755	var body io.Reader = nil
4756	c.urlParams_.Set("alt", alt)
4757	c.urlParams_.Set("prettyPrint", "false")
4758	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns/{id}")
4759	urls += "?" + c.urlParams_.Encode()
4760	req, err := http.NewRequest("GET", urls, body)
4761	if err != nil {
4762		return nil, err
4763	}
4764	req.Header = reqHeaders
4765	googleapi.Expand(req.URL, map[string]string{
4766		"project":  c.project,
4767		"instance": c.instance,
4768		"id":       strconv.FormatInt(c.id, 10),
4769	})
4770	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4771}
4772
4773// Do executes the "sql.backupRuns.get" call.
4774// Exactly one of *BackupRun or error will be non-nil. Any non-2xx
4775// status code is an error. Response headers are in either
4776// *BackupRun.ServerResponse.Header or (if a response was returned at
4777// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4778// to check whether the returned error was because
4779// http.StatusNotModified was returned.
4780func (c *BackupRunsGetCall) Do(opts ...googleapi.CallOption) (*BackupRun, error) {
4781	gensupport.SetOptions(c.urlParams_, opts...)
4782	res, err := c.doRequest("json")
4783	if res != nil && res.StatusCode == http.StatusNotModified {
4784		if res.Body != nil {
4785			res.Body.Close()
4786		}
4787		return nil, &googleapi.Error{
4788			Code:   res.StatusCode,
4789			Header: res.Header,
4790		}
4791	}
4792	if err != nil {
4793		return nil, err
4794	}
4795	defer googleapi.CloseBody(res)
4796	if err := googleapi.CheckResponse(res); err != nil {
4797		return nil, err
4798	}
4799	ret := &BackupRun{
4800		ServerResponse: googleapi.ServerResponse{
4801			Header:         res.Header,
4802			HTTPStatusCode: res.StatusCode,
4803		},
4804	}
4805	target := &ret
4806	if err := gensupport.DecodeResponse(target, res); err != nil {
4807		return nil, err
4808	}
4809	return ret, nil
4810	// {
4811	//   "description": "Retrieves a resource containing information about a backup run.",
4812	//   "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns/{id}",
4813	//   "httpMethod": "GET",
4814	//   "id": "sql.backupRuns.get",
4815	//   "parameterOrder": [
4816	//     "project",
4817	//     "instance",
4818	//     "id"
4819	//   ],
4820	//   "parameters": {
4821	//     "id": {
4822	//       "description": "The ID of this backup run.",
4823	//       "format": "int64",
4824	//       "location": "path",
4825	//       "required": true,
4826	//       "type": "string"
4827	//     },
4828	//     "instance": {
4829	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
4830	//       "location": "path",
4831	//       "required": true,
4832	//       "type": "string"
4833	//     },
4834	//     "project": {
4835	//       "description": "Project ID of the project that contains the instance.",
4836	//       "location": "path",
4837	//       "required": true,
4838	//       "type": "string"
4839	//     }
4840	//   },
4841	//   "path": "v1/projects/{project}/instances/{instance}/backupRuns/{id}",
4842	//   "response": {
4843	//     "$ref": "BackupRun"
4844	//   },
4845	//   "scopes": [
4846	//     "https://www.googleapis.com/auth/cloud-platform",
4847	//     "https://www.googleapis.com/auth/sqlservice.admin"
4848	//   ]
4849	// }
4850
4851}
4852
4853// method id "sql.backupRuns.insert":
4854
4855type BackupRunsInsertCall struct {
4856	s          *Service
4857	project    string
4858	instance   string
4859	backuprun  *BackupRun
4860	urlParams_ gensupport.URLParams
4861	ctx_       context.Context
4862	header_    http.Header
4863}
4864
4865// Insert: Creates a new backup run on demand.
4866//
4867// - instance: Cloud SQL instance ID. This does not include the project
4868//   ID.
4869// - project: Project ID of the project that contains the instance.
4870func (r *BackupRunsService) Insert(project string, instance string, backuprun *BackupRun) *BackupRunsInsertCall {
4871	c := &BackupRunsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4872	c.project = project
4873	c.instance = instance
4874	c.backuprun = backuprun
4875	return c
4876}
4877
4878// Fields allows partial responses to be retrieved. See
4879// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4880// for more information.
4881func (c *BackupRunsInsertCall) Fields(s ...googleapi.Field) *BackupRunsInsertCall {
4882	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4883	return c
4884}
4885
4886// Context sets the context to be used in this call's Do method. Any
4887// pending HTTP request will be aborted if the provided context is
4888// canceled.
4889func (c *BackupRunsInsertCall) Context(ctx context.Context) *BackupRunsInsertCall {
4890	c.ctx_ = ctx
4891	return c
4892}
4893
4894// Header returns an http.Header that can be modified by the caller to
4895// add HTTP headers to the request.
4896func (c *BackupRunsInsertCall) Header() http.Header {
4897	if c.header_ == nil {
4898		c.header_ = make(http.Header)
4899	}
4900	return c.header_
4901}
4902
4903func (c *BackupRunsInsertCall) doRequest(alt string) (*http.Response, error) {
4904	reqHeaders := make(http.Header)
4905	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
4906	for k, v := range c.header_ {
4907		reqHeaders[k] = v
4908	}
4909	reqHeaders.Set("User-Agent", c.s.userAgent())
4910	var body io.Reader = nil
4911	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backuprun)
4912	if err != nil {
4913		return nil, err
4914	}
4915	reqHeaders.Set("Content-Type", "application/json")
4916	c.urlParams_.Set("alt", alt)
4917	c.urlParams_.Set("prettyPrint", "false")
4918	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns")
4919	urls += "?" + c.urlParams_.Encode()
4920	req, err := http.NewRequest("POST", urls, body)
4921	if err != nil {
4922		return nil, err
4923	}
4924	req.Header = reqHeaders
4925	googleapi.Expand(req.URL, map[string]string{
4926		"project":  c.project,
4927		"instance": c.instance,
4928	})
4929	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4930}
4931
4932// Do executes the "sql.backupRuns.insert" call.
4933// Exactly one of *Operation or error will be non-nil. Any non-2xx
4934// status code is an error. Response headers are in either
4935// *Operation.ServerResponse.Header or (if a response was returned at
4936// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
4937// to check whether the returned error was because
4938// http.StatusNotModified was returned.
4939func (c *BackupRunsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4940	gensupport.SetOptions(c.urlParams_, opts...)
4941	res, err := c.doRequest("json")
4942	if res != nil && res.StatusCode == http.StatusNotModified {
4943		if res.Body != nil {
4944			res.Body.Close()
4945		}
4946		return nil, &googleapi.Error{
4947			Code:   res.StatusCode,
4948			Header: res.Header,
4949		}
4950	}
4951	if err != nil {
4952		return nil, err
4953	}
4954	defer googleapi.CloseBody(res)
4955	if err := googleapi.CheckResponse(res); err != nil {
4956		return nil, err
4957	}
4958	ret := &Operation{
4959		ServerResponse: googleapi.ServerResponse{
4960			Header:         res.Header,
4961			HTTPStatusCode: res.StatusCode,
4962		},
4963	}
4964	target := &ret
4965	if err := gensupport.DecodeResponse(target, res); err != nil {
4966		return nil, err
4967	}
4968	return ret, nil
4969	// {
4970	//   "description": "Creates a new backup run on demand.",
4971	//   "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns",
4972	//   "httpMethod": "POST",
4973	//   "id": "sql.backupRuns.insert",
4974	//   "parameterOrder": [
4975	//     "project",
4976	//     "instance"
4977	//   ],
4978	//   "parameters": {
4979	//     "instance": {
4980	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
4981	//       "location": "path",
4982	//       "required": true,
4983	//       "type": "string"
4984	//     },
4985	//     "project": {
4986	//       "description": "Project ID of the project that contains the instance.",
4987	//       "location": "path",
4988	//       "required": true,
4989	//       "type": "string"
4990	//     }
4991	//   },
4992	//   "path": "v1/projects/{project}/instances/{instance}/backupRuns",
4993	//   "request": {
4994	//     "$ref": "BackupRun"
4995	//   },
4996	//   "response": {
4997	//     "$ref": "Operation"
4998	//   },
4999	//   "scopes": [
5000	//     "https://www.googleapis.com/auth/cloud-platform",
5001	//     "https://www.googleapis.com/auth/sqlservice.admin"
5002	//   ]
5003	// }
5004
5005}
5006
5007// method id "sql.backupRuns.list":
5008
5009type BackupRunsListCall struct {
5010	s            *Service
5011	project      string
5012	instance     string
5013	urlParams_   gensupport.URLParams
5014	ifNoneMatch_ string
5015	ctx_         context.Context
5016	header_      http.Header
5017}
5018
5019// List: Lists all backup runs associated with the project or a given
5020// instance and configuration in the reverse chronological order of the
5021// backup initiation time.
5022//
5023// - instance: Cloud SQL instance ID, or "-" for all instances. This
5024//   does not include the project ID.
5025// - project: Project ID of the project that contains the instance.
5026func (r *BackupRunsService) List(project string, instance string) *BackupRunsListCall {
5027	c := &BackupRunsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5028	c.project = project
5029	c.instance = instance
5030	return c
5031}
5032
5033// MaxResults sets the optional parameter "maxResults": Maximum number
5034// of backup runs per response.
5035func (c *BackupRunsListCall) MaxResults(maxResults int64) *BackupRunsListCall {
5036	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
5037	return c
5038}
5039
5040// PageToken sets the optional parameter "pageToken": A
5041// previously-returned page token representing part of the larger set of
5042// results to view.
5043func (c *BackupRunsListCall) PageToken(pageToken string) *BackupRunsListCall {
5044	c.urlParams_.Set("pageToken", pageToken)
5045	return c
5046}
5047
5048// Fields allows partial responses to be retrieved. See
5049// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5050// for more information.
5051func (c *BackupRunsListCall) Fields(s ...googleapi.Field) *BackupRunsListCall {
5052	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5053	return c
5054}
5055
5056// IfNoneMatch sets the optional parameter which makes the operation
5057// fail if the object's ETag matches the given value. This is useful for
5058// getting updates only after the object has changed since the last
5059// request. Use googleapi.IsNotModified to check whether the response
5060// error from Do is the result of In-None-Match.
5061func (c *BackupRunsListCall) IfNoneMatch(entityTag string) *BackupRunsListCall {
5062	c.ifNoneMatch_ = entityTag
5063	return c
5064}
5065
5066// Context sets the context to be used in this call's Do method. Any
5067// pending HTTP request will be aborted if the provided context is
5068// canceled.
5069func (c *BackupRunsListCall) Context(ctx context.Context) *BackupRunsListCall {
5070	c.ctx_ = ctx
5071	return c
5072}
5073
5074// Header returns an http.Header that can be modified by the caller to
5075// add HTTP headers to the request.
5076func (c *BackupRunsListCall) Header() http.Header {
5077	if c.header_ == nil {
5078		c.header_ = make(http.Header)
5079	}
5080	return c.header_
5081}
5082
5083func (c *BackupRunsListCall) doRequest(alt string) (*http.Response, error) {
5084	reqHeaders := make(http.Header)
5085	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
5086	for k, v := range c.header_ {
5087		reqHeaders[k] = v
5088	}
5089	reqHeaders.Set("User-Agent", c.s.userAgent())
5090	if c.ifNoneMatch_ != "" {
5091		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5092	}
5093	var body io.Reader = nil
5094	c.urlParams_.Set("alt", alt)
5095	c.urlParams_.Set("prettyPrint", "false")
5096	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/backupRuns")
5097	urls += "?" + c.urlParams_.Encode()
5098	req, err := http.NewRequest("GET", urls, body)
5099	if err != nil {
5100		return nil, err
5101	}
5102	req.Header = reqHeaders
5103	googleapi.Expand(req.URL, map[string]string{
5104		"project":  c.project,
5105		"instance": c.instance,
5106	})
5107	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5108}
5109
5110// Do executes the "sql.backupRuns.list" call.
5111// Exactly one of *BackupRunsListResponse or error will be non-nil. Any
5112// non-2xx status code is an error. Response headers are in either
5113// *BackupRunsListResponse.ServerResponse.Header or (if a response was
5114// returned at all) in error.(*googleapi.Error).Header. Use
5115// googleapi.IsNotModified to check whether the returned error was
5116// because http.StatusNotModified was returned.
5117func (c *BackupRunsListCall) Do(opts ...googleapi.CallOption) (*BackupRunsListResponse, error) {
5118	gensupport.SetOptions(c.urlParams_, opts...)
5119	res, err := c.doRequest("json")
5120	if res != nil && res.StatusCode == http.StatusNotModified {
5121		if res.Body != nil {
5122			res.Body.Close()
5123		}
5124		return nil, &googleapi.Error{
5125			Code:   res.StatusCode,
5126			Header: res.Header,
5127		}
5128	}
5129	if err != nil {
5130		return nil, err
5131	}
5132	defer googleapi.CloseBody(res)
5133	if err := googleapi.CheckResponse(res); err != nil {
5134		return nil, err
5135	}
5136	ret := &BackupRunsListResponse{
5137		ServerResponse: googleapi.ServerResponse{
5138			Header:         res.Header,
5139			HTTPStatusCode: res.StatusCode,
5140		},
5141	}
5142	target := &ret
5143	if err := gensupport.DecodeResponse(target, res); err != nil {
5144		return nil, err
5145	}
5146	return ret, nil
5147	// {
5148	//   "description": "Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time.",
5149	//   "flatPath": "v1/projects/{project}/instances/{instance}/backupRuns",
5150	//   "httpMethod": "GET",
5151	//   "id": "sql.backupRuns.list",
5152	//   "parameterOrder": [
5153	//     "project",
5154	//     "instance"
5155	//   ],
5156	//   "parameters": {
5157	//     "instance": {
5158	//       "description": "Cloud SQL instance ID, or \"-\" for all instances. This does not include the project ID.",
5159	//       "location": "path",
5160	//       "required": true,
5161	//       "type": "string"
5162	//     },
5163	//     "maxResults": {
5164	//       "description": "Maximum number of backup runs per response.",
5165	//       "format": "int32",
5166	//       "location": "query",
5167	//       "type": "integer"
5168	//     },
5169	//     "pageToken": {
5170	//       "description": "A previously-returned page token representing part of the larger set of results to view.",
5171	//       "location": "query",
5172	//       "type": "string"
5173	//     },
5174	//     "project": {
5175	//       "description": "Project ID of the project that contains the instance.",
5176	//       "location": "path",
5177	//       "required": true,
5178	//       "type": "string"
5179	//     }
5180	//   },
5181	//   "path": "v1/projects/{project}/instances/{instance}/backupRuns",
5182	//   "response": {
5183	//     "$ref": "BackupRunsListResponse"
5184	//   },
5185	//   "scopes": [
5186	//     "https://www.googleapis.com/auth/cloud-platform",
5187	//     "https://www.googleapis.com/auth/sqlservice.admin"
5188	//   ]
5189	// }
5190
5191}
5192
5193// Pages invokes f for each page of results.
5194// A non-nil error returned from f will halt the iteration.
5195// The provided context supersedes any context provided to the Context method.
5196func (c *BackupRunsListCall) Pages(ctx context.Context, f func(*BackupRunsListResponse) error) error {
5197	c.ctx_ = ctx
5198	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5199	for {
5200		x, err := c.Do()
5201		if err != nil {
5202			return err
5203		}
5204		if err := f(x); err != nil {
5205			return err
5206		}
5207		if x.NextPageToken == "" {
5208			return nil
5209		}
5210		c.PageToken(x.NextPageToken)
5211	}
5212}
5213
5214// method id "sql.connect.generateEphemeral":
5215
5216type ConnectGenerateEphemeralCertCall struct {
5217	s                            *Service
5218	project                      string
5219	instance                     string
5220	generateephemeralcertrequest *GenerateEphemeralCertRequest
5221	urlParams_                   gensupport.URLParams
5222	ctx_                         context.Context
5223	header_                      http.Header
5224}
5225
5226// GenerateEphemeralCert: Generates a short-lived X509 certificate
5227// containing the provided public key and signed by a private key
5228// specific to the target instance. Users may use the certificate to
5229// authenticate as themselves when connecting to the database.
5230//
5231// - instance: Cloud SQL instance ID. This does not include the project
5232//   ID.
5233// - project: Project ID of the project that contains the instance.
5234func (r *ConnectService) GenerateEphemeralCert(project string, instance string, generateephemeralcertrequest *GenerateEphemeralCertRequest) *ConnectGenerateEphemeralCertCall {
5235	c := &ConnectGenerateEphemeralCertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5236	c.project = project
5237	c.instance = instance
5238	c.generateephemeralcertrequest = generateephemeralcertrequest
5239	return c
5240}
5241
5242// Fields allows partial responses to be retrieved. See
5243// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5244// for more information.
5245func (c *ConnectGenerateEphemeralCertCall) Fields(s ...googleapi.Field) *ConnectGenerateEphemeralCertCall {
5246	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5247	return c
5248}
5249
5250// Context sets the context to be used in this call's Do method. Any
5251// pending HTTP request will be aborted if the provided context is
5252// canceled.
5253func (c *ConnectGenerateEphemeralCertCall) Context(ctx context.Context) *ConnectGenerateEphemeralCertCall {
5254	c.ctx_ = ctx
5255	return c
5256}
5257
5258// Header returns an http.Header that can be modified by the caller to
5259// add HTTP headers to the request.
5260func (c *ConnectGenerateEphemeralCertCall) Header() http.Header {
5261	if c.header_ == nil {
5262		c.header_ = make(http.Header)
5263	}
5264	return c.header_
5265}
5266
5267func (c *ConnectGenerateEphemeralCertCall) doRequest(alt string) (*http.Response, error) {
5268	reqHeaders := make(http.Header)
5269	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
5270	for k, v := range c.header_ {
5271		reqHeaders[k] = v
5272	}
5273	reqHeaders.Set("User-Agent", c.s.userAgent())
5274	var body io.Reader = nil
5275	body, err := googleapi.WithoutDataWrapper.JSONReader(c.generateephemeralcertrequest)
5276	if err != nil {
5277		return nil, err
5278	}
5279	reqHeaders.Set("Content-Type", "application/json")
5280	c.urlParams_.Set("alt", alt)
5281	c.urlParams_.Set("prettyPrint", "false")
5282	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}:generateEphemeralCert")
5283	urls += "?" + c.urlParams_.Encode()
5284	req, err := http.NewRequest("POST", urls, body)
5285	if err != nil {
5286		return nil, err
5287	}
5288	req.Header = reqHeaders
5289	googleapi.Expand(req.URL, map[string]string{
5290		"project":  c.project,
5291		"instance": c.instance,
5292	})
5293	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5294}
5295
5296// Do executes the "sql.connect.generateEphemeral" call.
5297// Exactly one of *GenerateEphemeralCertResponse or error will be
5298// non-nil. Any non-2xx status code is an error. Response headers are in
5299// either *GenerateEphemeralCertResponse.ServerResponse.Header or (if a
5300// response was returned at all) in error.(*googleapi.Error).Header. Use
5301// googleapi.IsNotModified to check whether the returned error was
5302// because http.StatusNotModified was returned.
5303func (c *ConnectGenerateEphemeralCertCall) Do(opts ...googleapi.CallOption) (*GenerateEphemeralCertResponse, error) {
5304	gensupport.SetOptions(c.urlParams_, opts...)
5305	res, err := c.doRequest("json")
5306	if res != nil && res.StatusCode == http.StatusNotModified {
5307		if res.Body != nil {
5308			res.Body.Close()
5309		}
5310		return nil, &googleapi.Error{
5311			Code:   res.StatusCode,
5312			Header: res.Header,
5313		}
5314	}
5315	if err != nil {
5316		return nil, err
5317	}
5318	defer googleapi.CloseBody(res)
5319	if err := googleapi.CheckResponse(res); err != nil {
5320		return nil, err
5321	}
5322	ret := &GenerateEphemeralCertResponse{
5323		ServerResponse: googleapi.ServerResponse{
5324			Header:         res.Header,
5325			HTTPStatusCode: res.StatusCode,
5326		},
5327	}
5328	target := &ret
5329	if err := gensupport.DecodeResponse(target, res); err != nil {
5330		return nil, err
5331	}
5332	return ret, nil
5333	// {
5334	//   "description": "Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.",
5335	//   "flatPath": "v1/projects/{project}/instances/{instance}:generateEphemeralCert",
5336	//   "httpMethod": "POST",
5337	//   "id": "sql.connect.generateEphemeral",
5338	//   "parameterOrder": [
5339	//     "project",
5340	//     "instance"
5341	//   ],
5342	//   "parameters": {
5343	//     "instance": {
5344	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
5345	//       "location": "path",
5346	//       "required": true,
5347	//       "type": "string"
5348	//     },
5349	//     "project": {
5350	//       "description": "Project ID of the project that contains the instance.",
5351	//       "location": "path",
5352	//       "required": true,
5353	//       "type": "string"
5354	//     }
5355	//   },
5356	//   "path": "v1/projects/{project}/instances/{instance}:generateEphemeralCert",
5357	//   "request": {
5358	//     "$ref": "GenerateEphemeralCertRequest"
5359	//   },
5360	//   "response": {
5361	//     "$ref": "GenerateEphemeralCertResponse"
5362	//   },
5363	//   "scopes": [
5364	//     "https://www.googleapis.com/auth/cloud-platform",
5365	//     "https://www.googleapis.com/auth/sqlservice.admin"
5366	//   ]
5367	// }
5368
5369}
5370
5371// method id "sql.connect.get":
5372
5373type ConnectGetCall struct {
5374	s            *Service
5375	project      string
5376	instance     string
5377	urlParams_   gensupport.URLParams
5378	ifNoneMatch_ string
5379	ctx_         context.Context
5380	header_      http.Header
5381}
5382
5383// Get: Retrieves connect settings about a Cloud SQL instance.
5384//
5385// - instance: Cloud SQL instance ID. This does not include the project
5386//   ID.
5387// - project: Project ID of the project that contains the instance.
5388func (r *ConnectService) Get(project string, instance string) *ConnectGetCall {
5389	c := &ConnectGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5390	c.project = project
5391	c.instance = instance
5392	return c
5393}
5394
5395// ReadTime sets the optional parameter "readTime": Optional snapshot
5396// read timestamp to trade freshness for performance.
5397func (c *ConnectGetCall) ReadTime(readTime string) *ConnectGetCall {
5398	c.urlParams_.Set("readTime", readTime)
5399	return c
5400}
5401
5402// Fields allows partial responses to be retrieved. See
5403// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5404// for more information.
5405func (c *ConnectGetCall) Fields(s ...googleapi.Field) *ConnectGetCall {
5406	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5407	return c
5408}
5409
5410// IfNoneMatch sets the optional parameter which makes the operation
5411// fail if the object's ETag matches the given value. This is useful for
5412// getting updates only after the object has changed since the last
5413// request. Use googleapi.IsNotModified to check whether the response
5414// error from Do is the result of In-None-Match.
5415func (c *ConnectGetCall) IfNoneMatch(entityTag string) *ConnectGetCall {
5416	c.ifNoneMatch_ = entityTag
5417	return c
5418}
5419
5420// Context sets the context to be used in this call's Do method. Any
5421// pending HTTP request will be aborted if the provided context is
5422// canceled.
5423func (c *ConnectGetCall) Context(ctx context.Context) *ConnectGetCall {
5424	c.ctx_ = ctx
5425	return c
5426}
5427
5428// Header returns an http.Header that can be modified by the caller to
5429// add HTTP headers to the request.
5430func (c *ConnectGetCall) Header() http.Header {
5431	if c.header_ == nil {
5432		c.header_ = make(http.Header)
5433	}
5434	return c.header_
5435}
5436
5437func (c *ConnectGetCall) doRequest(alt string) (*http.Response, error) {
5438	reqHeaders := make(http.Header)
5439	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
5440	for k, v := range c.header_ {
5441		reqHeaders[k] = v
5442	}
5443	reqHeaders.Set("User-Agent", c.s.userAgent())
5444	if c.ifNoneMatch_ != "" {
5445		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5446	}
5447	var body io.Reader = nil
5448	c.urlParams_.Set("alt", alt)
5449	c.urlParams_.Set("prettyPrint", "false")
5450	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/connectSettings")
5451	urls += "?" + c.urlParams_.Encode()
5452	req, err := http.NewRequest("GET", urls, body)
5453	if err != nil {
5454		return nil, err
5455	}
5456	req.Header = reqHeaders
5457	googleapi.Expand(req.URL, map[string]string{
5458		"project":  c.project,
5459		"instance": c.instance,
5460	})
5461	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5462}
5463
5464// Do executes the "sql.connect.get" call.
5465// Exactly one of *ConnectSettings or error will be non-nil. Any non-2xx
5466// status code is an error. Response headers are in either
5467// *ConnectSettings.ServerResponse.Header or (if a response was returned
5468// at all) in error.(*googleapi.Error).Header. Use
5469// googleapi.IsNotModified to check whether the returned error was
5470// because http.StatusNotModified was returned.
5471func (c *ConnectGetCall) Do(opts ...googleapi.CallOption) (*ConnectSettings, error) {
5472	gensupport.SetOptions(c.urlParams_, opts...)
5473	res, err := c.doRequest("json")
5474	if res != nil && res.StatusCode == http.StatusNotModified {
5475		if res.Body != nil {
5476			res.Body.Close()
5477		}
5478		return nil, &googleapi.Error{
5479			Code:   res.StatusCode,
5480			Header: res.Header,
5481		}
5482	}
5483	if err != nil {
5484		return nil, err
5485	}
5486	defer googleapi.CloseBody(res)
5487	if err := googleapi.CheckResponse(res); err != nil {
5488		return nil, err
5489	}
5490	ret := &ConnectSettings{
5491		ServerResponse: googleapi.ServerResponse{
5492			Header:         res.Header,
5493			HTTPStatusCode: res.StatusCode,
5494		},
5495	}
5496	target := &ret
5497	if err := gensupport.DecodeResponse(target, res); err != nil {
5498		return nil, err
5499	}
5500	return ret, nil
5501	// {
5502	//   "description": "Retrieves connect settings about a Cloud SQL instance.",
5503	//   "flatPath": "v1/projects/{project}/instances/{instance}/connectSettings",
5504	//   "httpMethod": "GET",
5505	//   "id": "sql.connect.get",
5506	//   "parameterOrder": [
5507	//     "project",
5508	//     "instance"
5509	//   ],
5510	//   "parameters": {
5511	//     "instance": {
5512	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
5513	//       "location": "path",
5514	//       "required": true,
5515	//       "type": "string"
5516	//     },
5517	//     "project": {
5518	//       "description": "Project ID of the project that contains the instance.",
5519	//       "location": "path",
5520	//       "required": true,
5521	//       "type": "string"
5522	//     },
5523	//     "readTime": {
5524	//       "description": "Optional. Optional snapshot read timestamp to trade freshness for performance.",
5525	//       "format": "google-datetime",
5526	//       "location": "query",
5527	//       "type": "string"
5528	//     }
5529	//   },
5530	//   "path": "v1/projects/{project}/instances/{instance}/connectSettings",
5531	//   "response": {
5532	//     "$ref": "ConnectSettings"
5533	//   },
5534	//   "scopes": [
5535	//     "https://www.googleapis.com/auth/cloud-platform",
5536	//     "https://www.googleapis.com/auth/sqlservice.admin"
5537	//   ]
5538	// }
5539
5540}
5541
5542// method id "sql.databases.delete":
5543
5544type DatabasesDeleteCall struct {
5545	s          *Service
5546	project    string
5547	instance   string
5548	database   string
5549	urlParams_ gensupport.URLParams
5550	ctx_       context.Context
5551	header_    http.Header
5552}
5553
5554// Delete: Deletes a database from a Cloud SQL instance.
5555//
5556// - database: Name of the database to be deleted in the instance.
5557// - instance: Database instance ID. This does not include the project
5558//   ID.
5559// - project: Project ID of the project that contains the instance.
5560func (r *DatabasesService) Delete(project string, instance string, database string) *DatabasesDeleteCall {
5561	c := &DatabasesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5562	c.project = project
5563	c.instance = instance
5564	c.database = database
5565	return c
5566}
5567
5568// Fields allows partial responses to be retrieved. See
5569// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5570// for more information.
5571func (c *DatabasesDeleteCall) Fields(s ...googleapi.Field) *DatabasesDeleteCall {
5572	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5573	return c
5574}
5575
5576// Context sets the context to be used in this call's Do method. Any
5577// pending HTTP request will be aborted if the provided context is
5578// canceled.
5579func (c *DatabasesDeleteCall) Context(ctx context.Context) *DatabasesDeleteCall {
5580	c.ctx_ = ctx
5581	return c
5582}
5583
5584// Header returns an http.Header that can be modified by the caller to
5585// add HTTP headers to the request.
5586func (c *DatabasesDeleteCall) Header() http.Header {
5587	if c.header_ == nil {
5588		c.header_ = make(http.Header)
5589	}
5590	return c.header_
5591}
5592
5593func (c *DatabasesDeleteCall) doRequest(alt string) (*http.Response, error) {
5594	reqHeaders := make(http.Header)
5595	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
5596	for k, v := range c.header_ {
5597		reqHeaders[k] = v
5598	}
5599	reqHeaders.Set("User-Agent", c.s.userAgent())
5600	var body io.Reader = nil
5601	c.urlParams_.Set("alt", alt)
5602	c.urlParams_.Set("prettyPrint", "false")
5603	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}")
5604	urls += "?" + c.urlParams_.Encode()
5605	req, err := http.NewRequest("DELETE", urls, body)
5606	if err != nil {
5607		return nil, err
5608	}
5609	req.Header = reqHeaders
5610	googleapi.Expand(req.URL, map[string]string{
5611		"project":  c.project,
5612		"instance": c.instance,
5613		"database": c.database,
5614	})
5615	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5616}
5617
5618// Do executes the "sql.databases.delete" call.
5619// Exactly one of *Operation or error will be non-nil. Any non-2xx
5620// status code is an error. Response headers are in either
5621// *Operation.ServerResponse.Header or (if a response was returned at
5622// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5623// to check whether the returned error was because
5624// http.StatusNotModified was returned.
5625func (c *DatabasesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5626	gensupport.SetOptions(c.urlParams_, opts...)
5627	res, err := c.doRequest("json")
5628	if res != nil && res.StatusCode == http.StatusNotModified {
5629		if res.Body != nil {
5630			res.Body.Close()
5631		}
5632		return nil, &googleapi.Error{
5633			Code:   res.StatusCode,
5634			Header: res.Header,
5635		}
5636	}
5637	if err != nil {
5638		return nil, err
5639	}
5640	defer googleapi.CloseBody(res)
5641	if err := googleapi.CheckResponse(res); err != nil {
5642		return nil, err
5643	}
5644	ret := &Operation{
5645		ServerResponse: googleapi.ServerResponse{
5646			Header:         res.Header,
5647			HTTPStatusCode: res.StatusCode,
5648		},
5649	}
5650	target := &ret
5651	if err := gensupport.DecodeResponse(target, res); err != nil {
5652		return nil, err
5653	}
5654	return ret, nil
5655	// {
5656	//   "description": "Deletes a database from a Cloud SQL instance.",
5657	//   "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}",
5658	//   "httpMethod": "DELETE",
5659	//   "id": "sql.databases.delete",
5660	//   "parameterOrder": [
5661	//     "project",
5662	//     "instance",
5663	//     "database"
5664	//   ],
5665	//   "parameters": {
5666	//     "database": {
5667	//       "description": "Name of the database to be deleted in the instance.",
5668	//       "location": "path",
5669	//       "required": true,
5670	//       "type": "string"
5671	//     },
5672	//     "instance": {
5673	//       "description": "Database instance ID. This does not include the project ID.",
5674	//       "location": "path",
5675	//       "required": true,
5676	//       "type": "string"
5677	//     },
5678	//     "project": {
5679	//       "description": "Project ID of the project that contains the instance.",
5680	//       "location": "path",
5681	//       "required": true,
5682	//       "type": "string"
5683	//     }
5684	//   },
5685	//   "path": "v1/projects/{project}/instances/{instance}/databases/{database}",
5686	//   "response": {
5687	//     "$ref": "Operation"
5688	//   },
5689	//   "scopes": [
5690	//     "https://www.googleapis.com/auth/cloud-platform",
5691	//     "https://www.googleapis.com/auth/sqlservice.admin"
5692	//   ]
5693	// }
5694
5695}
5696
5697// method id "sql.databases.get":
5698
5699type DatabasesGetCall struct {
5700	s            *Service
5701	project      string
5702	instance     string
5703	database     string
5704	urlParams_   gensupport.URLParams
5705	ifNoneMatch_ string
5706	ctx_         context.Context
5707	header_      http.Header
5708}
5709
5710// Get: Retrieves a resource containing information about a database
5711// inside a Cloud SQL instance.
5712//
5713// - database: Name of the database in the instance.
5714// - instance: Database instance ID. This does not include the project
5715//   ID.
5716// - project: Project ID of the project that contains the instance.
5717func (r *DatabasesService) Get(project string, instance string, database string) *DatabasesGetCall {
5718	c := &DatabasesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5719	c.project = project
5720	c.instance = instance
5721	c.database = database
5722	return c
5723}
5724
5725// Fields allows partial responses to be retrieved. See
5726// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5727// for more information.
5728func (c *DatabasesGetCall) Fields(s ...googleapi.Field) *DatabasesGetCall {
5729	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5730	return c
5731}
5732
5733// IfNoneMatch sets the optional parameter which makes the operation
5734// fail if the object's ETag matches the given value. This is useful for
5735// getting updates only after the object has changed since the last
5736// request. Use googleapi.IsNotModified to check whether the response
5737// error from Do is the result of In-None-Match.
5738func (c *DatabasesGetCall) IfNoneMatch(entityTag string) *DatabasesGetCall {
5739	c.ifNoneMatch_ = entityTag
5740	return c
5741}
5742
5743// Context sets the context to be used in this call's Do method. Any
5744// pending HTTP request will be aborted if the provided context is
5745// canceled.
5746func (c *DatabasesGetCall) Context(ctx context.Context) *DatabasesGetCall {
5747	c.ctx_ = ctx
5748	return c
5749}
5750
5751// Header returns an http.Header that can be modified by the caller to
5752// add HTTP headers to the request.
5753func (c *DatabasesGetCall) Header() http.Header {
5754	if c.header_ == nil {
5755		c.header_ = make(http.Header)
5756	}
5757	return c.header_
5758}
5759
5760func (c *DatabasesGetCall) doRequest(alt string) (*http.Response, error) {
5761	reqHeaders := make(http.Header)
5762	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
5763	for k, v := range c.header_ {
5764		reqHeaders[k] = v
5765	}
5766	reqHeaders.Set("User-Agent", c.s.userAgent())
5767	if c.ifNoneMatch_ != "" {
5768		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5769	}
5770	var body io.Reader = nil
5771	c.urlParams_.Set("alt", alt)
5772	c.urlParams_.Set("prettyPrint", "false")
5773	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}")
5774	urls += "?" + c.urlParams_.Encode()
5775	req, err := http.NewRequest("GET", urls, body)
5776	if err != nil {
5777		return nil, err
5778	}
5779	req.Header = reqHeaders
5780	googleapi.Expand(req.URL, map[string]string{
5781		"project":  c.project,
5782		"instance": c.instance,
5783		"database": c.database,
5784	})
5785	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5786}
5787
5788// Do executes the "sql.databases.get" call.
5789// Exactly one of *Database or error will be non-nil. Any non-2xx status
5790// code is an error. Response headers are in either
5791// *Database.ServerResponse.Header or (if a response was returned at
5792// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5793// to check whether the returned error was because
5794// http.StatusNotModified was returned.
5795func (c *DatabasesGetCall) Do(opts ...googleapi.CallOption) (*Database, error) {
5796	gensupport.SetOptions(c.urlParams_, opts...)
5797	res, err := c.doRequest("json")
5798	if res != nil && res.StatusCode == http.StatusNotModified {
5799		if res.Body != nil {
5800			res.Body.Close()
5801		}
5802		return nil, &googleapi.Error{
5803			Code:   res.StatusCode,
5804			Header: res.Header,
5805		}
5806	}
5807	if err != nil {
5808		return nil, err
5809	}
5810	defer googleapi.CloseBody(res)
5811	if err := googleapi.CheckResponse(res); err != nil {
5812		return nil, err
5813	}
5814	ret := &Database{
5815		ServerResponse: googleapi.ServerResponse{
5816			Header:         res.Header,
5817			HTTPStatusCode: res.StatusCode,
5818		},
5819	}
5820	target := &ret
5821	if err := gensupport.DecodeResponse(target, res); err != nil {
5822		return nil, err
5823	}
5824	return ret, nil
5825	// {
5826	//   "description": "Retrieves a resource containing information about a database inside a Cloud SQL instance.",
5827	//   "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}",
5828	//   "httpMethod": "GET",
5829	//   "id": "sql.databases.get",
5830	//   "parameterOrder": [
5831	//     "project",
5832	//     "instance",
5833	//     "database"
5834	//   ],
5835	//   "parameters": {
5836	//     "database": {
5837	//       "description": "Name of the database in the instance.",
5838	//       "location": "path",
5839	//       "required": true,
5840	//       "type": "string"
5841	//     },
5842	//     "instance": {
5843	//       "description": "Database instance ID. This does not include the project ID.",
5844	//       "location": "path",
5845	//       "required": true,
5846	//       "type": "string"
5847	//     },
5848	//     "project": {
5849	//       "description": "Project ID of the project that contains the instance.",
5850	//       "location": "path",
5851	//       "required": true,
5852	//       "type": "string"
5853	//     }
5854	//   },
5855	//   "path": "v1/projects/{project}/instances/{instance}/databases/{database}",
5856	//   "response": {
5857	//     "$ref": "Database"
5858	//   },
5859	//   "scopes": [
5860	//     "https://www.googleapis.com/auth/cloud-platform",
5861	//     "https://www.googleapis.com/auth/sqlservice.admin"
5862	//   ]
5863	// }
5864
5865}
5866
5867// method id "sql.databases.insert":
5868
5869type DatabasesInsertCall struct {
5870	s          *Service
5871	project    string
5872	instance   string
5873	database   *Database
5874	urlParams_ gensupport.URLParams
5875	ctx_       context.Context
5876	header_    http.Header
5877}
5878
5879// Insert: Inserts a resource containing information about a database
5880// inside a Cloud SQL instance.
5881//
5882// - instance: Database instance ID. This does not include the project
5883//   ID.
5884// - project: Project ID of the project that contains the instance.
5885func (r *DatabasesService) Insert(project string, instance string, database *Database) *DatabasesInsertCall {
5886	c := &DatabasesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5887	c.project = project
5888	c.instance = instance
5889	c.database = database
5890	return c
5891}
5892
5893// Fields allows partial responses to be retrieved. See
5894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5895// for more information.
5896func (c *DatabasesInsertCall) Fields(s ...googleapi.Field) *DatabasesInsertCall {
5897	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5898	return c
5899}
5900
5901// Context sets the context to be used in this call's Do method. Any
5902// pending HTTP request will be aborted if the provided context is
5903// canceled.
5904func (c *DatabasesInsertCall) Context(ctx context.Context) *DatabasesInsertCall {
5905	c.ctx_ = ctx
5906	return c
5907}
5908
5909// Header returns an http.Header that can be modified by the caller to
5910// add HTTP headers to the request.
5911func (c *DatabasesInsertCall) Header() http.Header {
5912	if c.header_ == nil {
5913		c.header_ = make(http.Header)
5914	}
5915	return c.header_
5916}
5917
5918func (c *DatabasesInsertCall) doRequest(alt string) (*http.Response, error) {
5919	reqHeaders := make(http.Header)
5920	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
5921	for k, v := range c.header_ {
5922		reqHeaders[k] = v
5923	}
5924	reqHeaders.Set("User-Agent", c.s.userAgent())
5925	var body io.Reader = nil
5926	body, err := googleapi.WithoutDataWrapper.JSONReader(c.database)
5927	if err != nil {
5928		return nil, err
5929	}
5930	reqHeaders.Set("Content-Type", "application/json")
5931	c.urlParams_.Set("alt", alt)
5932	c.urlParams_.Set("prettyPrint", "false")
5933	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases")
5934	urls += "?" + c.urlParams_.Encode()
5935	req, err := http.NewRequest("POST", urls, body)
5936	if err != nil {
5937		return nil, err
5938	}
5939	req.Header = reqHeaders
5940	googleapi.Expand(req.URL, map[string]string{
5941		"project":  c.project,
5942		"instance": c.instance,
5943	})
5944	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5945}
5946
5947// Do executes the "sql.databases.insert" call.
5948// Exactly one of *Operation or error will be non-nil. Any non-2xx
5949// status code is an error. Response headers are in either
5950// *Operation.ServerResponse.Header or (if a response was returned at
5951// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5952// to check whether the returned error was because
5953// http.StatusNotModified was returned.
5954func (c *DatabasesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5955	gensupport.SetOptions(c.urlParams_, opts...)
5956	res, err := c.doRequest("json")
5957	if res != nil && res.StatusCode == http.StatusNotModified {
5958		if res.Body != nil {
5959			res.Body.Close()
5960		}
5961		return nil, &googleapi.Error{
5962			Code:   res.StatusCode,
5963			Header: res.Header,
5964		}
5965	}
5966	if err != nil {
5967		return nil, err
5968	}
5969	defer googleapi.CloseBody(res)
5970	if err := googleapi.CheckResponse(res); err != nil {
5971		return nil, err
5972	}
5973	ret := &Operation{
5974		ServerResponse: googleapi.ServerResponse{
5975			Header:         res.Header,
5976			HTTPStatusCode: res.StatusCode,
5977		},
5978	}
5979	target := &ret
5980	if err := gensupport.DecodeResponse(target, res); err != nil {
5981		return nil, err
5982	}
5983	return ret, nil
5984	// {
5985	//   "description": "Inserts a resource containing information about a database inside a Cloud SQL instance.",
5986	//   "flatPath": "v1/projects/{project}/instances/{instance}/databases",
5987	//   "httpMethod": "POST",
5988	//   "id": "sql.databases.insert",
5989	//   "parameterOrder": [
5990	//     "project",
5991	//     "instance"
5992	//   ],
5993	//   "parameters": {
5994	//     "instance": {
5995	//       "description": "Database instance ID. This does not include the project ID.",
5996	//       "location": "path",
5997	//       "required": true,
5998	//       "type": "string"
5999	//     },
6000	//     "project": {
6001	//       "description": "Project ID of the project that contains the instance.",
6002	//       "location": "path",
6003	//       "required": true,
6004	//       "type": "string"
6005	//     }
6006	//   },
6007	//   "path": "v1/projects/{project}/instances/{instance}/databases",
6008	//   "request": {
6009	//     "$ref": "Database"
6010	//   },
6011	//   "response": {
6012	//     "$ref": "Operation"
6013	//   },
6014	//   "scopes": [
6015	//     "https://www.googleapis.com/auth/cloud-platform",
6016	//     "https://www.googleapis.com/auth/sqlservice.admin"
6017	//   ]
6018	// }
6019
6020}
6021
6022// method id "sql.databases.list":
6023
6024type DatabasesListCall struct {
6025	s            *Service
6026	project      string
6027	instance     string
6028	urlParams_   gensupport.URLParams
6029	ifNoneMatch_ string
6030	ctx_         context.Context
6031	header_      http.Header
6032}
6033
6034// List: Lists databases in the specified Cloud SQL instance.
6035//
6036// - instance: Cloud SQL instance ID. This does not include the project
6037//   ID.
6038// - project: Project ID of the project that contains the instance.
6039func (r *DatabasesService) List(project string, instance string) *DatabasesListCall {
6040	c := &DatabasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6041	c.project = project
6042	c.instance = instance
6043	return c
6044}
6045
6046// Fields allows partial responses to be retrieved. See
6047// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6048// for more information.
6049func (c *DatabasesListCall) Fields(s ...googleapi.Field) *DatabasesListCall {
6050	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6051	return c
6052}
6053
6054// IfNoneMatch sets the optional parameter which makes the operation
6055// fail if the object's ETag matches the given value. This is useful for
6056// getting updates only after the object has changed since the last
6057// request. Use googleapi.IsNotModified to check whether the response
6058// error from Do is the result of In-None-Match.
6059func (c *DatabasesListCall) IfNoneMatch(entityTag string) *DatabasesListCall {
6060	c.ifNoneMatch_ = entityTag
6061	return c
6062}
6063
6064// Context sets the context to be used in this call's Do method. Any
6065// pending HTTP request will be aborted if the provided context is
6066// canceled.
6067func (c *DatabasesListCall) Context(ctx context.Context) *DatabasesListCall {
6068	c.ctx_ = ctx
6069	return c
6070}
6071
6072// Header returns an http.Header that can be modified by the caller to
6073// add HTTP headers to the request.
6074func (c *DatabasesListCall) Header() http.Header {
6075	if c.header_ == nil {
6076		c.header_ = make(http.Header)
6077	}
6078	return c.header_
6079}
6080
6081func (c *DatabasesListCall) doRequest(alt string) (*http.Response, error) {
6082	reqHeaders := make(http.Header)
6083	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
6084	for k, v := range c.header_ {
6085		reqHeaders[k] = v
6086	}
6087	reqHeaders.Set("User-Agent", c.s.userAgent())
6088	if c.ifNoneMatch_ != "" {
6089		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6090	}
6091	var body io.Reader = nil
6092	c.urlParams_.Set("alt", alt)
6093	c.urlParams_.Set("prettyPrint", "false")
6094	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases")
6095	urls += "?" + c.urlParams_.Encode()
6096	req, err := http.NewRequest("GET", urls, body)
6097	if err != nil {
6098		return nil, err
6099	}
6100	req.Header = reqHeaders
6101	googleapi.Expand(req.URL, map[string]string{
6102		"project":  c.project,
6103		"instance": c.instance,
6104	})
6105	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6106}
6107
6108// Do executes the "sql.databases.list" call.
6109// Exactly one of *DatabasesListResponse or error will be non-nil. Any
6110// non-2xx status code is an error. Response headers are in either
6111// *DatabasesListResponse.ServerResponse.Header or (if a response was
6112// returned at all) in error.(*googleapi.Error).Header. Use
6113// googleapi.IsNotModified to check whether the returned error was
6114// because http.StatusNotModified was returned.
6115func (c *DatabasesListCall) Do(opts ...googleapi.CallOption) (*DatabasesListResponse, error) {
6116	gensupport.SetOptions(c.urlParams_, opts...)
6117	res, err := c.doRequest("json")
6118	if res != nil && res.StatusCode == http.StatusNotModified {
6119		if res.Body != nil {
6120			res.Body.Close()
6121		}
6122		return nil, &googleapi.Error{
6123			Code:   res.StatusCode,
6124			Header: res.Header,
6125		}
6126	}
6127	if err != nil {
6128		return nil, err
6129	}
6130	defer googleapi.CloseBody(res)
6131	if err := googleapi.CheckResponse(res); err != nil {
6132		return nil, err
6133	}
6134	ret := &DatabasesListResponse{
6135		ServerResponse: googleapi.ServerResponse{
6136			Header:         res.Header,
6137			HTTPStatusCode: res.StatusCode,
6138		},
6139	}
6140	target := &ret
6141	if err := gensupport.DecodeResponse(target, res); err != nil {
6142		return nil, err
6143	}
6144	return ret, nil
6145	// {
6146	//   "description": "Lists databases in the specified Cloud SQL instance.",
6147	//   "flatPath": "v1/projects/{project}/instances/{instance}/databases",
6148	//   "httpMethod": "GET",
6149	//   "id": "sql.databases.list",
6150	//   "parameterOrder": [
6151	//     "project",
6152	//     "instance"
6153	//   ],
6154	//   "parameters": {
6155	//     "instance": {
6156	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
6157	//       "location": "path",
6158	//       "required": true,
6159	//       "type": "string"
6160	//     },
6161	//     "project": {
6162	//       "description": "Project ID of the project that contains the instance.",
6163	//       "location": "path",
6164	//       "required": true,
6165	//       "type": "string"
6166	//     }
6167	//   },
6168	//   "path": "v1/projects/{project}/instances/{instance}/databases",
6169	//   "response": {
6170	//     "$ref": "DatabasesListResponse"
6171	//   },
6172	//   "scopes": [
6173	//     "https://www.googleapis.com/auth/cloud-platform",
6174	//     "https://www.googleapis.com/auth/sqlservice.admin"
6175	//   ]
6176	// }
6177
6178}
6179
6180// method id "sql.databases.patch":
6181
6182type DatabasesPatchCall struct {
6183	s          *Service
6184	project    string
6185	instance   string
6186	database   string
6187	database2  *Database
6188	urlParams_ gensupport.URLParams
6189	ctx_       context.Context
6190	header_    http.Header
6191}
6192
6193// Patch: Partially updates a resource containing information about a
6194// database inside a Cloud SQL instance. This method supports patch
6195// semantics.
6196//
6197// - database: Name of the database to be updated in the instance.
6198// - instance: Database instance ID. This does not include the project
6199//   ID.
6200// - project: Project ID of the project that contains the instance.
6201func (r *DatabasesService) Patch(project string, instance string, database string, database2 *Database) *DatabasesPatchCall {
6202	c := &DatabasesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6203	c.project = project
6204	c.instance = instance
6205	c.database = database
6206	c.database2 = database2
6207	return c
6208}
6209
6210// Fields allows partial responses to be retrieved. See
6211// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6212// for more information.
6213func (c *DatabasesPatchCall) Fields(s ...googleapi.Field) *DatabasesPatchCall {
6214	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6215	return c
6216}
6217
6218// Context sets the context to be used in this call's Do method. Any
6219// pending HTTP request will be aborted if the provided context is
6220// canceled.
6221func (c *DatabasesPatchCall) Context(ctx context.Context) *DatabasesPatchCall {
6222	c.ctx_ = ctx
6223	return c
6224}
6225
6226// Header returns an http.Header that can be modified by the caller to
6227// add HTTP headers to the request.
6228func (c *DatabasesPatchCall) Header() http.Header {
6229	if c.header_ == nil {
6230		c.header_ = make(http.Header)
6231	}
6232	return c.header_
6233}
6234
6235func (c *DatabasesPatchCall) doRequest(alt string) (*http.Response, error) {
6236	reqHeaders := make(http.Header)
6237	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
6238	for k, v := range c.header_ {
6239		reqHeaders[k] = v
6240	}
6241	reqHeaders.Set("User-Agent", c.s.userAgent())
6242	var body io.Reader = nil
6243	body, err := googleapi.WithoutDataWrapper.JSONReader(c.database2)
6244	if err != nil {
6245		return nil, err
6246	}
6247	reqHeaders.Set("Content-Type", "application/json")
6248	c.urlParams_.Set("alt", alt)
6249	c.urlParams_.Set("prettyPrint", "false")
6250	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}")
6251	urls += "?" + c.urlParams_.Encode()
6252	req, err := http.NewRequest("PATCH", urls, body)
6253	if err != nil {
6254		return nil, err
6255	}
6256	req.Header = reqHeaders
6257	googleapi.Expand(req.URL, map[string]string{
6258		"project":  c.project,
6259		"instance": c.instance,
6260		"database": c.database,
6261	})
6262	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6263}
6264
6265// Do executes the "sql.databases.patch" call.
6266// Exactly one of *Operation or error will be non-nil. Any non-2xx
6267// status code is an error. Response headers are in either
6268// *Operation.ServerResponse.Header or (if a response was returned at
6269// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6270// to check whether the returned error was because
6271// http.StatusNotModified was returned.
6272func (c *DatabasesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6273	gensupport.SetOptions(c.urlParams_, opts...)
6274	res, err := c.doRequest("json")
6275	if res != nil && res.StatusCode == http.StatusNotModified {
6276		if res.Body != nil {
6277			res.Body.Close()
6278		}
6279		return nil, &googleapi.Error{
6280			Code:   res.StatusCode,
6281			Header: res.Header,
6282		}
6283	}
6284	if err != nil {
6285		return nil, err
6286	}
6287	defer googleapi.CloseBody(res)
6288	if err := googleapi.CheckResponse(res); err != nil {
6289		return nil, err
6290	}
6291	ret := &Operation{
6292		ServerResponse: googleapi.ServerResponse{
6293			Header:         res.Header,
6294			HTTPStatusCode: res.StatusCode,
6295		},
6296	}
6297	target := &ret
6298	if err := gensupport.DecodeResponse(target, res); err != nil {
6299		return nil, err
6300	}
6301	return ret, nil
6302	// {
6303	//   "description": "Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.",
6304	//   "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}",
6305	//   "httpMethod": "PATCH",
6306	//   "id": "sql.databases.patch",
6307	//   "parameterOrder": [
6308	//     "project",
6309	//     "instance",
6310	//     "database"
6311	//   ],
6312	//   "parameters": {
6313	//     "database": {
6314	//       "description": "Name of the database to be updated in the instance.",
6315	//       "location": "path",
6316	//       "required": true,
6317	//       "type": "string"
6318	//     },
6319	//     "instance": {
6320	//       "description": "Database instance ID. This does not include the project ID.",
6321	//       "location": "path",
6322	//       "required": true,
6323	//       "type": "string"
6324	//     },
6325	//     "project": {
6326	//       "description": "Project ID of the project that contains the instance.",
6327	//       "location": "path",
6328	//       "required": true,
6329	//       "type": "string"
6330	//     }
6331	//   },
6332	//   "path": "v1/projects/{project}/instances/{instance}/databases/{database}",
6333	//   "request": {
6334	//     "$ref": "Database"
6335	//   },
6336	//   "response": {
6337	//     "$ref": "Operation"
6338	//   },
6339	//   "scopes": [
6340	//     "https://www.googleapis.com/auth/cloud-platform",
6341	//     "https://www.googleapis.com/auth/sqlservice.admin"
6342	//   ]
6343	// }
6344
6345}
6346
6347// method id "sql.databases.update":
6348
6349type DatabasesUpdateCall struct {
6350	s          *Service
6351	project    string
6352	instance   string
6353	database   string
6354	database2  *Database
6355	urlParams_ gensupport.URLParams
6356	ctx_       context.Context
6357	header_    http.Header
6358}
6359
6360// Update: Updates a resource containing information about a database
6361// inside a Cloud SQL instance.
6362//
6363// - database: Name of the database to be updated in the instance.
6364// - instance: Database instance ID. This does not include the project
6365//   ID.
6366// - project: Project ID of the project that contains the instance.
6367func (r *DatabasesService) Update(project string, instance string, database string, database2 *Database) *DatabasesUpdateCall {
6368	c := &DatabasesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6369	c.project = project
6370	c.instance = instance
6371	c.database = database
6372	c.database2 = database2
6373	return c
6374}
6375
6376// Fields allows partial responses to be retrieved. See
6377// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6378// for more information.
6379func (c *DatabasesUpdateCall) Fields(s ...googleapi.Field) *DatabasesUpdateCall {
6380	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6381	return c
6382}
6383
6384// Context sets the context to be used in this call's Do method. Any
6385// pending HTTP request will be aborted if the provided context is
6386// canceled.
6387func (c *DatabasesUpdateCall) Context(ctx context.Context) *DatabasesUpdateCall {
6388	c.ctx_ = ctx
6389	return c
6390}
6391
6392// Header returns an http.Header that can be modified by the caller to
6393// add HTTP headers to the request.
6394func (c *DatabasesUpdateCall) Header() http.Header {
6395	if c.header_ == nil {
6396		c.header_ = make(http.Header)
6397	}
6398	return c.header_
6399}
6400
6401func (c *DatabasesUpdateCall) doRequest(alt string) (*http.Response, error) {
6402	reqHeaders := make(http.Header)
6403	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
6404	for k, v := range c.header_ {
6405		reqHeaders[k] = v
6406	}
6407	reqHeaders.Set("User-Agent", c.s.userAgent())
6408	var body io.Reader = nil
6409	body, err := googleapi.WithoutDataWrapper.JSONReader(c.database2)
6410	if err != nil {
6411		return nil, err
6412	}
6413	reqHeaders.Set("Content-Type", "application/json")
6414	c.urlParams_.Set("alt", alt)
6415	c.urlParams_.Set("prettyPrint", "false")
6416	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/databases/{database}")
6417	urls += "?" + c.urlParams_.Encode()
6418	req, err := http.NewRequest("PUT", urls, body)
6419	if err != nil {
6420		return nil, err
6421	}
6422	req.Header = reqHeaders
6423	googleapi.Expand(req.URL, map[string]string{
6424		"project":  c.project,
6425		"instance": c.instance,
6426		"database": c.database,
6427	})
6428	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6429}
6430
6431// Do executes the "sql.databases.update" call.
6432// Exactly one of *Operation or error will be non-nil. Any non-2xx
6433// status code is an error. Response headers are in either
6434// *Operation.ServerResponse.Header or (if a response was returned at
6435// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6436// to check whether the returned error was because
6437// http.StatusNotModified was returned.
6438func (c *DatabasesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6439	gensupport.SetOptions(c.urlParams_, opts...)
6440	res, err := c.doRequest("json")
6441	if res != nil && res.StatusCode == http.StatusNotModified {
6442		if res.Body != nil {
6443			res.Body.Close()
6444		}
6445		return nil, &googleapi.Error{
6446			Code:   res.StatusCode,
6447			Header: res.Header,
6448		}
6449	}
6450	if err != nil {
6451		return nil, err
6452	}
6453	defer googleapi.CloseBody(res)
6454	if err := googleapi.CheckResponse(res); err != nil {
6455		return nil, err
6456	}
6457	ret := &Operation{
6458		ServerResponse: googleapi.ServerResponse{
6459			Header:         res.Header,
6460			HTTPStatusCode: res.StatusCode,
6461		},
6462	}
6463	target := &ret
6464	if err := gensupport.DecodeResponse(target, res); err != nil {
6465		return nil, err
6466	}
6467	return ret, nil
6468	// {
6469	//   "description": "Updates a resource containing information about a database inside a Cloud SQL instance.",
6470	//   "flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}",
6471	//   "httpMethod": "PUT",
6472	//   "id": "sql.databases.update",
6473	//   "parameterOrder": [
6474	//     "project",
6475	//     "instance",
6476	//     "database"
6477	//   ],
6478	//   "parameters": {
6479	//     "database": {
6480	//       "description": "Name of the database to be updated in the instance.",
6481	//       "location": "path",
6482	//       "required": true,
6483	//       "type": "string"
6484	//     },
6485	//     "instance": {
6486	//       "description": "Database instance ID. This does not include the project ID.",
6487	//       "location": "path",
6488	//       "required": true,
6489	//       "type": "string"
6490	//     },
6491	//     "project": {
6492	//       "description": "Project ID of the project that contains the instance.",
6493	//       "location": "path",
6494	//       "required": true,
6495	//       "type": "string"
6496	//     }
6497	//   },
6498	//   "path": "v1/projects/{project}/instances/{instance}/databases/{database}",
6499	//   "request": {
6500	//     "$ref": "Database"
6501	//   },
6502	//   "response": {
6503	//     "$ref": "Operation"
6504	//   },
6505	//   "scopes": [
6506	//     "https://www.googleapis.com/auth/cloud-platform",
6507	//     "https://www.googleapis.com/auth/sqlservice.admin"
6508	//   ]
6509	// }
6510
6511}
6512
6513// method id "sql.flags.list":
6514
6515type FlagsListCall struct {
6516	s            *Service
6517	urlParams_   gensupport.URLParams
6518	ifNoneMatch_ string
6519	ctx_         context.Context
6520	header_      http.Header
6521}
6522
6523// List: Lists all available database flags for Cloud SQL instances.
6524func (r *FlagsService) List() *FlagsListCall {
6525	c := &FlagsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6526	return c
6527}
6528
6529// DatabaseVersion sets the optional parameter "databaseVersion":
6530// Database type and version you want to retrieve flags for. By default,
6531// this method returns flags for all database types and versions.
6532func (c *FlagsListCall) DatabaseVersion(databaseVersion string) *FlagsListCall {
6533	c.urlParams_.Set("databaseVersion", databaseVersion)
6534	return c
6535}
6536
6537// Fields allows partial responses to be retrieved. See
6538// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6539// for more information.
6540func (c *FlagsListCall) Fields(s ...googleapi.Field) *FlagsListCall {
6541	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6542	return c
6543}
6544
6545// IfNoneMatch sets the optional parameter which makes the operation
6546// fail if the object's ETag matches the given value. This is useful for
6547// getting updates only after the object has changed since the last
6548// request. Use googleapi.IsNotModified to check whether the response
6549// error from Do is the result of In-None-Match.
6550func (c *FlagsListCall) IfNoneMatch(entityTag string) *FlagsListCall {
6551	c.ifNoneMatch_ = entityTag
6552	return c
6553}
6554
6555// Context sets the context to be used in this call's Do method. Any
6556// pending HTTP request will be aborted if the provided context is
6557// canceled.
6558func (c *FlagsListCall) Context(ctx context.Context) *FlagsListCall {
6559	c.ctx_ = ctx
6560	return c
6561}
6562
6563// Header returns an http.Header that can be modified by the caller to
6564// add HTTP headers to the request.
6565func (c *FlagsListCall) Header() http.Header {
6566	if c.header_ == nil {
6567		c.header_ = make(http.Header)
6568	}
6569	return c.header_
6570}
6571
6572func (c *FlagsListCall) doRequest(alt string) (*http.Response, error) {
6573	reqHeaders := make(http.Header)
6574	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
6575	for k, v := range c.header_ {
6576		reqHeaders[k] = v
6577	}
6578	reqHeaders.Set("User-Agent", c.s.userAgent())
6579	if c.ifNoneMatch_ != "" {
6580		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6581	}
6582	var body io.Reader = nil
6583	c.urlParams_.Set("alt", alt)
6584	c.urlParams_.Set("prettyPrint", "false")
6585	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/flags")
6586	urls += "?" + c.urlParams_.Encode()
6587	req, err := http.NewRequest("GET", urls, body)
6588	if err != nil {
6589		return nil, err
6590	}
6591	req.Header = reqHeaders
6592	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6593}
6594
6595// Do executes the "sql.flags.list" call.
6596// Exactly one of *FlagsListResponse or error will be non-nil. Any
6597// non-2xx status code is an error. Response headers are in either
6598// *FlagsListResponse.ServerResponse.Header or (if a response was
6599// returned at all) in error.(*googleapi.Error).Header. Use
6600// googleapi.IsNotModified to check whether the returned error was
6601// because http.StatusNotModified was returned.
6602func (c *FlagsListCall) Do(opts ...googleapi.CallOption) (*FlagsListResponse, error) {
6603	gensupport.SetOptions(c.urlParams_, opts...)
6604	res, err := c.doRequest("json")
6605	if res != nil && res.StatusCode == http.StatusNotModified {
6606		if res.Body != nil {
6607			res.Body.Close()
6608		}
6609		return nil, &googleapi.Error{
6610			Code:   res.StatusCode,
6611			Header: res.Header,
6612		}
6613	}
6614	if err != nil {
6615		return nil, err
6616	}
6617	defer googleapi.CloseBody(res)
6618	if err := googleapi.CheckResponse(res); err != nil {
6619		return nil, err
6620	}
6621	ret := &FlagsListResponse{
6622		ServerResponse: googleapi.ServerResponse{
6623			Header:         res.Header,
6624			HTTPStatusCode: res.StatusCode,
6625		},
6626	}
6627	target := &ret
6628	if err := gensupport.DecodeResponse(target, res); err != nil {
6629		return nil, err
6630	}
6631	return ret, nil
6632	// {
6633	//   "description": "Lists all available database flags for Cloud SQL instances.",
6634	//   "flatPath": "v1/flags",
6635	//   "httpMethod": "GET",
6636	//   "id": "sql.flags.list",
6637	//   "parameterOrder": [],
6638	//   "parameters": {
6639	//     "databaseVersion": {
6640	//       "description": "Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions.",
6641	//       "location": "query",
6642	//       "type": "string"
6643	//     }
6644	//   },
6645	//   "path": "v1/flags",
6646	//   "response": {
6647	//     "$ref": "FlagsListResponse"
6648	//   },
6649	//   "scopes": [
6650	//     "https://www.googleapis.com/auth/cloud-platform",
6651	//     "https://www.googleapis.com/auth/sqlservice.admin"
6652	//   ]
6653	// }
6654
6655}
6656
6657// method id "sql.instances.addServerCa":
6658
6659type InstancesAddServerCaCall struct {
6660	s          *Service
6661	project    string
6662	instance   string
6663	urlParams_ gensupport.URLParams
6664	ctx_       context.Context
6665	header_    http.Header
6666}
6667
6668// AddServerCa: Adds a new trusted Certificate Authority (CA) version
6669// for the specified instance. Required to prepare for a certificate
6670// rotation. If a CA version was previously added but never used in a
6671// certificate rotation, this operation replaces that version. There
6672// cannot be more than one CA version waiting to be rotated in.
6673//
6674// - instance: Cloud SQL instance ID. This does not include the project
6675//   ID.
6676// - project: Project ID of the project that contains the instance.
6677func (r *InstancesService) AddServerCa(project string, instance string) *InstancesAddServerCaCall {
6678	c := &InstancesAddServerCaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6679	c.project = project
6680	c.instance = instance
6681	return c
6682}
6683
6684// Fields allows partial responses to be retrieved. See
6685// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6686// for more information.
6687func (c *InstancesAddServerCaCall) Fields(s ...googleapi.Field) *InstancesAddServerCaCall {
6688	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6689	return c
6690}
6691
6692// Context sets the context to be used in this call's Do method. Any
6693// pending HTTP request will be aborted if the provided context is
6694// canceled.
6695func (c *InstancesAddServerCaCall) Context(ctx context.Context) *InstancesAddServerCaCall {
6696	c.ctx_ = ctx
6697	return c
6698}
6699
6700// Header returns an http.Header that can be modified by the caller to
6701// add HTTP headers to the request.
6702func (c *InstancesAddServerCaCall) Header() http.Header {
6703	if c.header_ == nil {
6704		c.header_ = make(http.Header)
6705	}
6706	return c.header_
6707}
6708
6709func (c *InstancesAddServerCaCall) doRequest(alt string) (*http.Response, error) {
6710	reqHeaders := make(http.Header)
6711	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
6712	for k, v := range c.header_ {
6713		reqHeaders[k] = v
6714	}
6715	reqHeaders.Set("User-Agent", c.s.userAgent())
6716	var body io.Reader = nil
6717	c.urlParams_.Set("alt", alt)
6718	c.urlParams_.Set("prettyPrint", "false")
6719	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/addServerCa")
6720	urls += "?" + c.urlParams_.Encode()
6721	req, err := http.NewRequest("POST", urls, body)
6722	if err != nil {
6723		return nil, err
6724	}
6725	req.Header = reqHeaders
6726	googleapi.Expand(req.URL, map[string]string{
6727		"project":  c.project,
6728		"instance": c.instance,
6729	})
6730	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6731}
6732
6733// Do executes the "sql.instances.addServerCa" call.
6734// Exactly one of *Operation or error will be non-nil. Any non-2xx
6735// status code is an error. Response headers are in either
6736// *Operation.ServerResponse.Header or (if a response was returned at
6737// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6738// to check whether the returned error was because
6739// http.StatusNotModified was returned.
6740func (c *InstancesAddServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6741	gensupport.SetOptions(c.urlParams_, opts...)
6742	res, err := c.doRequest("json")
6743	if res != nil && res.StatusCode == http.StatusNotModified {
6744		if res.Body != nil {
6745			res.Body.Close()
6746		}
6747		return nil, &googleapi.Error{
6748			Code:   res.StatusCode,
6749			Header: res.Header,
6750		}
6751	}
6752	if err != nil {
6753		return nil, err
6754	}
6755	defer googleapi.CloseBody(res)
6756	if err := googleapi.CheckResponse(res); err != nil {
6757		return nil, err
6758	}
6759	ret := &Operation{
6760		ServerResponse: googleapi.ServerResponse{
6761			Header:         res.Header,
6762			HTTPStatusCode: res.StatusCode,
6763		},
6764	}
6765	target := &ret
6766	if err := gensupport.DecodeResponse(target, res); err != nil {
6767		return nil, err
6768	}
6769	return ret, nil
6770	// {
6771	//   "description": "Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.",
6772	//   "flatPath": "v1/projects/{project}/instances/{instance}/addServerCa",
6773	//   "httpMethod": "POST",
6774	//   "id": "sql.instances.addServerCa",
6775	//   "parameterOrder": [
6776	//     "project",
6777	//     "instance"
6778	//   ],
6779	//   "parameters": {
6780	//     "instance": {
6781	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
6782	//       "location": "path",
6783	//       "required": true,
6784	//       "type": "string"
6785	//     },
6786	//     "project": {
6787	//       "description": "Project ID of the project that contains the instance.",
6788	//       "location": "path",
6789	//       "required": true,
6790	//       "type": "string"
6791	//     }
6792	//   },
6793	//   "path": "v1/projects/{project}/instances/{instance}/addServerCa",
6794	//   "response": {
6795	//     "$ref": "Operation"
6796	//   },
6797	//   "scopes": [
6798	//     "https://www.googleapis.com/auth/cloud-platform",
6799	//     "https://www.googleapis.com/auth/sqlservice.admin"
6800	//   ]
6801	// }
6802
6803}
6804
6805// method id "sql.instances.clone":
6806
6807type InstancesCloneCall struct {
6808	s                     *Service
6809	project               string
6810	instance              string
6811	instancesclonerequest *InstancesCloneRequest
6812	urlParams_            gensupport.URLParams
6813	ctx_                  context.Context
6814	header_               http.Header
6815}
6816
6817// Clone: Creates a Cloud SQL instance as a clone of the source
6818// instance. Using this operation might cause your instance to restart.
6819//
6820// - instance: The ID of the Cloud SQL instance to be cloned (source).
6821//   This does not include the project ID.
6822// - project: Project ID of the source as well as the clone Cloud SQL
6823//   instance.
6824func (r *InstancesService) Clone(project string, instance string, instancesclonerequest *InstancesCloneRequest) *InstancesCloneCall {
6825	c := &InstancesCloneCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6826	c.project = project
6827	c.instance = instance
6828	c.instancesclonerequest = instancesclonerequest
6829	return c
6830}
6831
6832// Fields allows partial responses to be retrieved. See
6833// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6834// for more information.
6835func (c *InstancesCloneCall) Fields(s ...googleapi.Field) *InstancesCloneCall {
6836	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6837	return c
6838}
6839
6840// Context sets the context to be used in this call's Do method. Any
6841// pending HTTP request will be aborted if the provided context is
6842// canceled.
6843func (c *InstancesCloneCall) Context(ctx context.Context) *InstancesCloneCall {
6844	c.ctx_ = ctx
6845	return c
6846}
6847
6848// Header returns an http.Header that can be modified by the caller to
6849// add HTTP headers to the request.
6850func (c *InstancesCloneCall) Header() http.Header {
6851	if c.header_ == nil {
6852		c.header_ = make(http.Header)
6853	}
6854	return c.header_
6855}
6856
6857func (c *InstancesCloneCall) doRequest(alt string) (*http.Response, error) {
6858	reqHeaders := make(http.Header)
6859	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
6860	for k, v := range c.header_ {
6861		reqHeaders[k] = v
6862	}
6863	reqHeaders.Set("User-Agent", c.s.userAgent())
6864	var body io.Reader = nil
6865	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesclonerequest)
6866	if err != nil {
6867		return nil, err
6868	}
6869	reqHeaders.Set("Content-Type", "application/json")
6870	c.urlParams_.Set("alt", alt)
6871	c.urlParams_.Set("prettyPrint", "false")
6872	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/clone")
6873	urls += "?" + c.urlParams_.Encode()
6874	req, err := http.NewRequest("POST", urls, body)
6875	if err != nil {
6876		return nil, err
6877	}
6878	req.Header = reqHeaders
6879	googleapi.Expand(req.URL, map[string]string{
6880		"project":  c.project,
6881		"instance": c.instance,
6882	})
6883	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6884}
6885
6886// Do executes the "sql.instances.clone" call.
6887// Exactly one of *Operation or error will be non-nil. Any non-2xx
6888// status code is an error. Response headers are in either
6889// *Operation.ServerResponse.Header or (if a response was returned at
6890// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6891// to check whether the returned error was because
6892// http.StatusNotModified was returned.
6893func (c *InstancesCloneCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6894	gensupport.SetOptions(c.urlParams_, opts...)
6895	res, err := c.doRequest("json")
6896	if res != nil && res.StatusCode == http.StatusNotModified {
6897		if res.Body != nil {
6898			res.Body.Close()
6899		}
6900		return nil, &googleapi.Error{
6901			Code:   res.StatusCode,
6902			Header: res.Header,
6903		}
6904	}
6905	if err != nil {
6906		return nil, err
6907	}
6908	defer googleapi.CloseBody(res)
6909	if err := googleapi.CheckResponse(res); err != nil {
6910		return nil, err
6911	}
6912	ret := &Operation{
6913		ServerResponse: googleapi.ServerResponse{
6914			Header:         res.Header,
6915			HTTPStatusCode: res.StatusCode,
6916		},
6917	}
6918	target := &ret
6919	if err := gensupport.DecodeResponse(target, res); err != nil {
6920		return nil, err
6921	}
6922	return ret, nil
6923	// {
6924	//   "description": "Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.",
6925	//   "flatPath": "v1/projects/{project}/instances/{instance}/clone",
6926	//   "httpMethod": "POST",
6927	//   "id": "sql.instances.clone",
6928	//   "parameterOrder": [
6929	//     "project",
6930	//     "instance"
6931	//   ],
6932	//   "parameters": {
6933	//     "instance": {
6934	//       "description": "The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID.",
6935	//       "location": "path",
6936	//       "required": true,
6937	//       "type": "string"
6938	//     },
6939	//     "project": {
6940	//       "description": "Project ID of the source as well as the clone Cloud SQL instance.",
6941	//       "location": "path",
6942	//       "required": true,
6943	//       "type": "string"
6944	//     }
6945	//   },
6946	//   "path": "v1/projects/{project}/instances/{instance}/clone",
6947	//   "request": {
6948	//     "$ref": "InstancesCloneRequest"
6949	//   },
6950	//   "response": {
6951	//     "$ref": "Operation"
6952	//   },
6953	//   "scopes": [
6954	//     "https://www.googleapis.com/auth/cloud-platform",
6955	//     "https://www.googleapis.com/auth/sqlservice.admin"
6956	//   ]
6957	// }
6958
6959}
6960
6961// method id "sql.instances.delete":
6962
6963type InstancesDeleteCall struct {
6964	s          *Service
6965	project    string
6966	instance   string
6967	urlParams_ gensupport.URLParams
6968	ctx_       context.Context
6969	header_    http.Header
6970}
6971
6972// Delete: Deletes a Cloud SQL instance.
6973//
6974// - instance: Cloud SQL instance ID. This does not include the project
6975//   ID.
6976// - project: Project ID of the project that contains the instance to be
6977//   deleted.
6978func (r *InstancesService) Delete(project string, instance string) *InstancesDeleteCall {
6979	c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6980	c.project = project
6981	c.instance = instance
6982	return c
6983}
6984
6985// Fields allows partial responses to be retrieved. See
6986// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6987// for more information.
6988func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall {
6989	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6990	return c
6991}
6992
6993// Context sets the context to be used in this call's Do method. Any
6994// pending HTTP request will be aborted if the provided context is
6995// canceled.
6996func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall {
6997	c.ctx_ = ctx
6998	return c
6999}
7000
7001// Header returns an http.Header that can be modified by the caller to
7002// add HTTP headers to the request.
7003func (c *InstancesDeleteCall) Header() http.Header {
7004	if c.header_ == nil {
7005		c.header_ = make(http.Header)
7006	}
7007	return c.header_
7008}
7009
7010func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) {
7011	reqHeaders := make(http.Header)
7012	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
7013	for k, v := range c.header_ {
7014		reqHeaders[k] = v
7015	}
7016	reqHeaders.Set("User-Agent", c.s.userAgent())
7017	var body io.Reader = nil
7018	c.urlParams_.Set("alt", alt)
7019	c.urlParams_.Set("prettyPrint", "false")
7020	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}")
7021	urls += "?" + c.urlParams_.Encode()
7022	req, err := http.NewRequest("DELETE", urls, body)
7023	if err != nil {
7024		return nil, err
7025	}
7026	req.Header = reqHeaders
7027	googleapi.Expand(req.URL, map[string]string{
7028		"project":  c.project,
7029		"instance": c.instance,
7030	})
7031	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7032}
7033
7034// Do executes the "sql.instances.delete" call.
7035// Exactly one of *Operation or error will be non-nil. Any non-2xx
7036// status code is an error. Response headers are in either
7037// *Operation.ServerResponse.Header or (if a response was returned at
7038// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7039// to check whether the returned error was because
7040// http.StatusNotModified was returned.
7041func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7042	gensupport.SetOptions(c.urlParams_, opts...)
7043	res, err := c.doRequest("json")
7044	if res != nil && res.StatusCode == http.StatusNotModified {
7045		if res.Body != nil {
7046			res.Body.Close()
7047		}
7048		return nil, &googleapi.Error{
7049			Code:   res.StatusCode,
7050			Header: res.Header,
7051		}
7052	}
7053	if err != nil {
7054		return nil, err
7055	}
7056	defer googleapi.CloseBody(res)
7057	if err := googleapi.CheckResponse(res); err != nil {
7058		return nil, err
7059	}
7060	ret := &Operation{
7061		ServerResponse: googleapi.ServerResponse{
7062			Header:         res.Header,
7063			HTTPStatusCode: res.StatusCode,
7064		},
7065	}
7066	target := &ret
7067	if err := gensupport.DecodeResponse(target, res); err != nil {
7068		return nil, err
7069	}
7070	return ret, nil
7071	// {
7072	//   "description": "Deletes a Cloud SQL instance.",
7073	//   "flatPath": "v1/projects/{project}/instances/{instance}",
7074	//   "httpMethod": "DELETE",
7075	//   "id": "sql.instances.delete",
7076	//   "parameterOrder": [
7077	//     "project",
7078	//     "instance"
7079	//   ],
7080	//   "parameters": {
7081	//     "instance": {
7082	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
7083	//       "location": "path",
7084	//       "required": true,
7085	//       "type": "string"
7086	//     },
7087	//     "project": {
7088	//       "description": "Project ID of the project that contains the instance to be deleted.",
7089	//       "location": "path",
7090	//       "required": true,
7091	//       "type": "string"
7092	//     }
7093	//   },
7094	//   "path": "v1/projects/{project}/instances/{instance}",
7095	//   "response": {
7096	//     "$ref": "Operation"
7097	//   },
7098	//   "scopes": [
7099	//     "https://www.googleapis.com/auth/cloud-platform",
7100	//     "https://www.googleapis.com/auth/sqlservice.admin"
7101	//   ]
7102	// }
7103
7104}
7105
7106// method id "sql.instances.demoteMaster":
7107
7108type InstancesDemoteMasterCall struct {
7109	s                            *Service
7110	project                      string
7111	instance                     string
7112	instancesdemotemasterrequest *InstancesDemoteMasterRequest
7113	urlParams_                   gensupport.URLParams
7114	ctx_                         context.Context
7115	header_                      http.Header
7116}
7117
7118// DemoteMaster: Demotes the stand-alone instance to be a Cloud SQL read
7119// replica for an external database server.
7120//
7121// - instance: Cloud SQL instance name.
7122// - project: ID of the project that contains the instance.
7123func (r *InstancesService) DemoteMaster(project string, instance string, instancesdemotemasterrequest *InstancesDemoteMasterRequest) *InstancesDemoteMasterCall {
7124	c := &InstancesDemoteMasterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7125	c.project = project
7126	c.instance = instance
7127	c.instancesdemotemasterrequest = instancesdemotemasterrequest
7128	return c
7129}
7130
7131// Fields allows partial responses to be retrieved. See
7132// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7133// for more information.
7134func (c *InstancesDemoteMasterCall) Fields(s ...googleapi.Field) *InstancesDemoteMasterCall {
7135	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7136	return c
7137}
7138
7139// Context sets the context to be used in this call's Do method. Any
7140// pending HTTP request will be aborted if the provided context is
7141// canceled.
7142func (c *InstancesDemoteMasterCall) Context(ctx context.Context) *InstancesDemoteMasterCall {
7143	c.ctx_ = ctx
7144	return c
7145}
7146
7147// Header returns an http.Header that can be modified by the caller to
7148// add HTTP headers to the request.
7149func (c *InstancesDemoteMasterCall) Header() http.Header {
7150	if c.header_ == nil {
7151		c.header_ = make(http.Header)
7152	}
7153	return c.header_
7154}
7155
7156func (c *InstancesDemoteMasterCall) doRequest(alt string) (*http.Response, error) {
7157	reqHeaders := make(http.Header)
7158	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
7159	for k, v := range c.header_ {
7160		reqHeaders[k] = v
7161	}
7162	reqHeaders.Set("User-Agent", c.s.userAgent())
7163	var body io.Reader = nil
7164	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesdemotemasterrequest)
7165	if err != nil {
7166		return nil, err
7167	}
7168	reqHeaders.Set("Content-Type", "application/json")
7169	c.urlParams_.Set("alt", alt)
7170	c.urlParams_.Set("prettyPrint", "false")
7171	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/demoteMaster")
7172	urls += "?" + c.urlParams_.Encode()
7173	req, err := http.NewRequest("POST", urls, body)
7174	if err != nil {
7175		return nil, err
7176	}
7177	req.Header = reqHeaders
7178	googleapi.Expand(req.URL, map[string]string{
7179		"project":  c.project,
7180		"instance": c.instance,
7181	})
7182	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7183}
7184
7185// Do executes the "sql.instances.demoteMaster" call.
7186// Exactly one of *Operation or error will be non-nil. Any non-2xx
7187// status code is an error. Response headers are in either
7188// *Operation.ServerResponse.Header or (if a response was returned at
7189// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7190// to check whether the returned error was because
7191// http.StatusNotModified was returned.
7192func (c *InstancesDemoteMasterCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7193	gensupport.SetOptions(c.urlParams_, opts...)
7194	res, err := c.doRequest("json")
7195	if res != nil && res.StatusCode == http.StatusNotModified {
7196		if res.Body != nil {
7197			res.Body.Close()
7198		}
7199		return nil, &googleapi.Error{
7200			Code:   res.StatusCode,
7201			Header: res.Header,
7202		}
7203	}
7204	if err != nil {
7205		return nil, err
7206	}
7207	defer googleapi.CloseBody(res)
7208	if err := googleapi.CheckResponse(res); err != nil {
7209		return nil, err
7210	}
7211	ret := &Operation{
7212		ServerResponse: googleapi.ServerResponse{
7213			Header:         res.Header,
7214			HTTPStatusCode: res.StatusCode,
7215		},
7216	}
7217	target := &ret
7218	if err := gensupport.DecodeResponse(target, res); err != nil {
7219		return nil, err
7220	}
7221	return ret, nil
7222	// {
7223	//   "description": "Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.",
7224	//   "flatPath": "v1/projects/{project}/instances/{instance}/demoteMaster",
7225	//   "httpMethod": "POST",
7226	//   "id": "sql.instances.demoteMaster",
7227	//   "parameterOrder": [
7228	//     "project",
7229	//     "instance"
7230	//   ],
7231	//   "parameters": {
7232	//     "instance": {
7233	//       "description": "Cloud SQL instance name.",
7234	//       "location": "path",
7235	//       "required": true,
7236	//       "type": "string"
7237	//     },
7238	//     "project": {
7239	//       "description": "ID of the project that contains the instance.",
7240	//       "location": "path",
7241	//       "required": true,
7242	//       "type": "string"
7243	//     }
7244	//   },
7245	//   "path": "v1/projects/{project}/instances/{instance}/demoteMaster",
7246	//   "request": {
7247	//     "$ref": "InstancesDemoteMasterRequest"
7248	//   },
7249	//   "response": {
7250	//     "$ref": "Operation"
7251	//   },
7252	//   "scopes": [
7253	//     "https://www.googleapis.com/auth/cloud-platform",
7254	//     "https://www.googleapis.com/auth/sqlservice.admin"
7255	//   ]
7256	// }
7257
7258}
7259
7260// method id "sql.instances.export":
7261
7262type InstancesExportCall struct {
7263	s                      *Service
7264	project                string
7265	instance               string
7266	instancesexportrequest *InstancesExportRequest
7267	urlParams_             gensupport.URLParams
7268	ctx_                   context.Context
7269	header_                http.Header
7270}
7271
7272// Export: Exports data from a Cloud SQL instance to a Cloud Storage
7273// bucket as a SQL dump or CSV file.
7274//
7275// - instance: Cloud SQL instance ID. This does not include the project
7276//   ID.
7277// - project: Project ID of the project that contains the instance to be
7278//   exported.
7279func (r *InstancesService) Export(project string, instance string, instancesexportrequest *InstancesExportRequest) *InstancesExportCall {
7280	c := &InstancesExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7281	c.project = project
7282	c.instance = instance
7283	c.instancesexportrequest = instancesexportrequest
7284	return c
7285}
7286
7287// Fields allows partial responses to be retrieved. See
7288// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7289// for more information.
7290func (c *InstancesExportCall) Fields(s ...googleapi.Field) *InstancesExportCall {
7291	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7292	return c
7293}
7294
7295// Context sets the context to be used in this call's Do method. Any
7296// pending HTTP request will be aborted if the provided context is
7297// canceled.
7298func (c *InstancesExportCall) Context(ctx context.Context) *InstancesExportCall {
7299	c.ctx_ = ctx
7300	return c
7301}
7302
7303// Header returns an http.Header that can be modified by the caller to
7304// add HTTP headers to the request.
7305func (c *InstancesExportCall) Header() http.Header {
7306	if c.header_ == nil {
7307		c.header_ = make(http.Header)
7308	}
7309	return c.header_
7310}
7311
7312func (c *InstancesExportCall) doRequest(alt string) (*http.Response, error) {
7313	reqHeaders := make(http.Header)
7314	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
7315	for k, v := range c.header_ {
7316		reqHeaders[k] = v
7317	}
7318	reqHeaders.Set("User-Agent", c.s.userAgent())
7319	var body io.Reader = nil
7320	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesexportrequest)
7321	if err != nil {
7322		return nil, err
7323	}
7324	reqHeaders.Set("Content-Type", "application/json")
7325	c.urlParams_.Set("alt", alt)
7326	c.urlParams_.Set("prettyPrint", "false")
7327	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/export")
7328	urls += "?" + c.urlParams_.Encode()
7329	req, err := http.NewRequest("POST", urls, body)
7330	if err != nil {
7331		return nil, err
7332	}
7333	req.Header = reqHeaders
7334	googleapi.Expand(req.URL, map[string]string{
7335		"project":  c.project,
7336		"instance": c.instance,
7337	})
7338	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7339}
7340
7341// Do executes the "sql.instances.export" call.
7342// Exactly one of *Operation or error will be non-nil. Any non-2xx
7343// status code is an error. Response headers are in either
7344// *Operation.ServerResponse.Header or (if a response was returned at
7345// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7346// to check whether the returned error was because
7347// http.StatusNotModified was returned.
7348func (c *InstancesExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7349	gensupport.SetOptions(c.urlParams_, opts...)
7350	res, err := c.doRequest("json")
7351	if res != nil && res.StatusCode == http.StatusNotModified {
7352		if res.Body != nil {
7353			res.Body.Close()
7354		}
7355		return nil, &googleapi.Error{
7356			Code:   res.StatusCode,
7357			Header: res.Header,
7358		}
7359	}
7360	if err != nil {
7361		return nil, err
7362	}
7363	defer googleapi.CloseBody(res)
7364	if err := googleapi.CheckResponse(res); err != nil {
7365		return nil, err
7366	}
7367	ret := &Operation{
7368		ServerResponse: googleapi.ServerResponse{
7369			Header:         res.Header,
7370			HTTPStatusCode: res.StatusCode,
7371		},
7372	}
7373	target := &ret
7374	if err := gensupport.DecodeResponse(target, res); err != nil {
7375		return nil, err
7376	}
7377	return ret, nil
7378	// {
7379	//   "description": "Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.",
7380	//   "flatPath": "v1/projects/{project}/instances/{instance}/export",
7381	//   "httpMethod": "POST",
7382	//   "id": "sql.instances.export",
7383	//   "parameterOrder": [
7384	//     "project",
7385	//     "instance"
7386	//   ],
7387	//   "parameters": {
7388	//     "instance": {
7389	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
7390	//       "location": "path",
7391	//       "required": true,
7392	//       "type": "string"
7393	//     },
7394	//     "project": {
7395	//       "description": "Project ID of the project that contains the instance to be exported.",
7396	//       "location": "path",
7397	//       "required": true,
7398	//       "type": "string"
7399	//     }
7400	//   },
7401	//   "path": "v1/projects/{project}/instances/{instance}/export",
7402	//   "request": {
7403	//     "$ref": "InstancesExportRequest"
7404	//   },
7405	//   "response": {
7406	//     "$ref": "Operation"
7407	//   },
7408	//   "scopes": [
7409	//     "https://www.googleapis.com/auth/cloud-platform"
7410	//   ]
7411	// }
7412
7413}
7414
7415// method id "sql.instances.failover":
7416
7417type InstancesFailoverCall struct {
7418	s                        *Service
7419	project                  string
7420	instance                 string
7421	instancesfailoverrequest *InstancesFailoverRequest
7422	urlParams_               gensupport.URLParams
7423	ctx_                     context.Context
7424	header_                  http.Header
7425}
7426
7427// Failover: Initiates a manual failover of a high availability (HA)
7428// primary instance to a standby instance, which becomes the primary
7429// instance. Users are then rerouted to the new primary. For more
7430// information, see the Overview of high availability
7431// (https://cloud.google.com/sql/docs/mysql/high-availability) page in
7432// the Cloud SQL documentation. If using Legacy HA (MySQL only), this
7433// causes the instance to failover to its failover replica instance.
7434//
7435// - instance: Cloud SQL instance ID. This does not include the project
7436//   ID.
7437// - project: ID of the project that contains the read replica.
7438func (r *InstancesService) Failover(project string, instance string, instancesfailoverrequest *InstancesFailoverRequest) *InstancesFailoverCall {
7439	c := &InstancesFailoverCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7440	c.project = project
7441	c.instance = instance
7442	c.instancesfailoverrequest = instancesfailoverrequest
7443	return c
7444}
7445
7446// Fields allows partial responses to be retrieved. See
7447// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7448// for more information.
7449func (c *InstancesFailoverCall) Fields(s ...googleapi.Field) *InstancesFailoverCall {
7450	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7451	return c
7452}
7453
7454// Context sets the context to be used in this call's Do method. Any
7455// pending HTTP request will be aborted if the provided context is
7456// canceled.
7457func (c *InstancesFailoverCall) Context(ctx context.Context) *InstancesFailoverCall {
7458	c.ctx_ = ctx
7459	return c
7460}
7461
7462// Header returns an http.Header that can be modified by the caller to
7463// add HTTP headers to the request.
7464func (c *InstancesFailoverCall) Header() http.Header {
7465	if c.header_ == nil {
7466		c.header_ = make(http.Header)
7467	}
7468	return c.header_
7469}
7470
7471func (c *InstancesFailoverCall) doRequest(alt string) (*http.Response, error) {
7472	reqHeaders := make(http.Header)
7473	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
7474	for k, v := range c.header_ {
7475		reqHeaders[k] = v
7476	}
7477	reqHeaders.Set("User-Agent", c.s.userAgent())
7478	var body io.Reader = nil
7479	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesfailoverrequest)
7480	if err != nil {
7481		return nil, err
7482	}
7483	reqHeaders.Set("Content-Type", "application/json")
7484	c.urlParams_.Set("alt", alt)
7485	c.urlParams_.Set("prettyPrint", "false")
7486	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/failover")
7487	urls += "?" + c.urlParams_.Encode()
7488	req, err := http.NewRequest("POST", urls, body)
7489	if err != nil {
7490		return nil, err
7491	}
7492	req.Header = reqHeaders
7493	googleapi.Expand(req.URL, map[string]string{
7494		"project":  c.project,
7495		"instance": c.instance,
7496	})
7497	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7498}
7499
7500// Do executes the "sql.instances.failover" call.
7501// Exactly one of *Operation or error will be non-nil. Any non-2xx
7502// status code is an error. Response headers are in either
7503// *Operation.ServerResponse.Header or (if a response was returned at
7504// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7505// to check whether the returned error was because
7506// http.StatusNotModified was returned.
7507func (c *InstancesFailoverCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7508	gensupport.SetOptions(c.urlParams_, opts...)
7509	res, err := c.doRequest("json")
7510	if res != nil && res.StatusCode == http.StatusNotModified {
7511		if res.Body != nil {
7512			res.Body.Close()
7513		}
7514		return nil, &googleapi.Error{
7515			Code:   res.StatusCode,
7516			Header: res.Header,
7517		}
7518	}
7519	if err != nil {
7520		return nil, err
7521	}
7522	defer googleapi.CloseBody(res)
7523	if err := googleapi.CheckResponse(res); err != nil {
7524		return nil, err
7525	}
7526	ret := &Operation{
7527		ServerResponse: googleapi.ServerResponse{
7528			Header:         res.Header,
7529			HTTPStatusCode: res.StatusCode,
7530		},
7531	}
7532	target := &ret
7533	if err := gensupport.DecodeResponse(target, res); err != nil {
7534		return nil, err
7535	}
7536	return ret, nil
7537	// {
7538	//   "description": "Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the [Overview of high availability](https://cloud.google.com/sql/docs/mysql/high-availability) page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.",
7539	//   "flatPath": "v1/projects/{project}/instances/{instance}/failover",
7540	//   "httpMethod": "POST",
7541	//   "id": "sql.instances.failover",
7542	//   "parameterOrder": [
7543	//     "project",
7544	//     "instance"
7545	//   ],
7546	//   "parameters": {
7547	//     "instance": {
7548	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
7549	//       "location": "path",
7550	//       "required": true,
7551	//       "type": "string"
7552	//     },
7553	//     "project": {
7554	//       "description": "ID of the project that contains the read replica.",
7555	//       "location": "path",
7556	//       "required": true,
7557	//       "type": "string"
7558	//     }
7559	//   },
7560	//   "path": "v1/projects/{project}/instances/{instance}/failover",
7561	//   "request": {
7562	//     "$ref": "InstancesFailoverRequest"
7563	//   },
7564	//   "response": {
7565	//     "$ref": "Operation"
7566	//   },
7567	//   "scopes": [
7568	//     "https://www.googleapis.com/auth/cloud-platform",
7569	//     "https://www.googleapis.com/auth/sqlservice.admin"
7570	//   ]
7571	// }
7572
7573}
7574
7575// method id "sql.instances.get":
7576
7577type InstancesGetCall struct {
7578	s            *Service
7579	project      string
7580	instance     string
7581	urlParams_   gensupport.URLParams
7582	ifNoneMatch_ string
7583	ctx_         context.Context
7584	header_      http.Header
7585}
7586
7587// Get: Retrieves a resource containing information about a Cloud SQL
7588// instance.
7589//
7590// - instance: Database instance ID. This does not include the project
7591//   ID.
7592// - project: Project ID of the project that contains the instance.
7593func (r *InstancesService) Get(project string, instance string) *InstancesGetCall {
7594	c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7595	c.project = project
7596	c.instance = instance
7597	return c
7598}
7599
7600// Fields allows partial responses to be retrieved. See
7601// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7602// for more information.
7603func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall {
7604	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7605	return c
7606}
7607
7608// IfNoneMatch sets the optional parameter which makes the operation
7609// fail if the object's ETag matches the given value. This is useful for
7610// getting updates only after the object has changed since the last
7611// request. Use googleapi.IsNotModified to check whether the response
7612// error from Do is the result of In-None-Match.
7613func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall {
7614	c.ifNoneMatch_ = entityTag
7615	return c
7616}
7617
7618// Context sets the context to be used in this call's Do method. Any
7619// pending HTTP request will be aborted if the provided context is
7620// canceled.
7621func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall {
7622	c.ctx_ = ctx
7623	return c
7624}
7625
7626// Header returns an http.Header that can be modified by the caller to
7627// add HTTP headers to the request.
7628func (c *InstancesGetCall) Header() http.Header {
7629	if c.header_ == nil {
7630		c.header_ = make(http.Header)
7631	}
7632	return c.header_
7633}
7634
7635func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) {
7636	reqHeaders := make(http.Header)
7637	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
7638	for k, v := range c.header_ {
7639		reqHeaders[k] = v
7640	}
7641	reqHeaders.Set("User-Agent", c.s.userAgent())
7642	if c.ifNoneMatch_ != "" {
7643		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7644	}
7645	var body io.Reader = nil
7646	c.urlParams_.Set("alt", alt)
7647	c.urlParams_.Set("prettyPrint", "false")
7648	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}")
7649	urls += "?" + c.urlParams_.Encode()
7650	req, err := http.NewRequest("GET", urls, body)
7651	if err != nil {
7652		return nil, err
7653	}
7654	req.Header = reqHeaders
7655	googleapi.Expand(req.URL, map[string]string{
7656		"project":  c.project,
7657		"instance": c.instance,
7658	})
7659	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7660}
7661
7662// Do executes the "sql.instances.get" call.
7663// Exactly one of *DatabaseInstance or error will be non-nil. Any
7664// non-2xx status code is an error. Response headers are in either
7665// *DatabaseInstance.ServerResponse.Header or (if a response was
7666// returned at all) in error.(*googleapi.Error).Header. Use
7667// googleapi.IsNotModified to check whether the returned error was
7668// because http.StatusNotModified was returned.
7669func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*DatabaseInstance, error) {
7670	gensupport.SetOptions(c.urlParams_, opts...)
7671	res, err := c.doRequest("json")
7672	if res != nil && res.StatusCode == http.StatusNotModified {
7673		if res.Body != nil {
7674			res.Body.Close()
7675		}
7676		return nil, &googleapi.Error{
7677			Code:   res.StatusCode,
7678			Header: res.Header,
7679		}
7680	}
7681	if err != nil {
7682		return nil, err
7683	}
7684	defer googleapi.CloseBody(res)
7685	if err := googleapi.CheckResponse(res); err != nil {
7686		return nil, err
7687	}
7688	ret := &DatabaseInstance{
7689		ServerResponse: googleapi.ServerResponse{
7690			Header:         res.Header,
7691			HTTPStatusCode: res.StatusCode,
7692		},
7693	}
7694	target := &ret
7695	if err := gensupport.DecodeResponse(target, res); err != nil {
7696		return nil, err
7697	}
7698	return ret, nil
7699	// {
7700	//   "description": "Retrieves a resource containing information about a Cloud SQL instance.",
7701	//   "flatPath": "v1/projects/{project}/instances/{instance}",
7702	//   "httpMethod": "GET",
7703	//   "id": "sql.instances.get",
7704	//   "parameterOrder": [
7705	//     "project",
7706	//     "instance"
7707	//   ],
7708	//   "parameters": {
7709	//     "instance": {
7710	//       "description": "Database instance ID. This does not include the project ID.",
7711	//       "location": "path",
7712	//       "required": true,
7713	//       "type": "string"
7714	//     },
7715	//     "project": {
7716	//       "description": "Project ID of the project that contains the instance.",
7717	//       "location": "path",
7718	//       "required": true,
7719	//       "type": "string"
7720	//     }
7721	//   },
7722	//   "path": "v1/projects/{project}/instances/{instance}",
7723	//   "response": {
7724	//     "$ref": "DatabaseInstance"
7725	//   },
7726	//   "scopes": [
7727	//     "https://www.googleapis.com/auth/cloud-platform",
7728	//     "https://www.googleapis.com/auth/sqlservice.admin"
7729	//   ]
7730	// }
7731
7732}
7733
7734// method id "sql.instances.import":
7735
7736type InstancesImportCall struct {
7737	s                      *Service
7738	project                string
7739	instance               string
7740	instancesimportrequest *InstancesImportRequest
7741	urlParams_             gensupport.URLParams
7742	ctx_                   context.Context
7743	header_                http.Header
7744}
7745
7746// Import: Imports data into a Cloud SQL instance from a SQL dump or CSV
7747// file in Cloud Storage.
7748//
7749// - instance: Cloud SQL instance ID. This does not include the project
7750//   ID.
7751// - project: Project ID of the project that contains the instance.
7752func (r *InstancesService) Import(project string, instance string, instancesimportrequest *InstancesImportRequest) *InstancesImportCall {
7753	c := &InstancesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7754	c.project = project
7755	c.instance = instance
7756	c.instancesimportrequest = instancesimportrequest
7757	return c
7758}
7759
7760// Fields allows partial responses to be retrieved. See
7761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7762// for more information.
7763func (c *InstancesImportCall) Fields(s ...googleapi.Field) *InstancesImportCall {
7764	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7765	return c
7766}
7767
7768// Context sets the context to be used in this call's Do method. Any
7769// pending HTTP request will be aborted if the provided context is
7770// canceled.
7771func (c *InstancesImportCall) Context(ctx context.Context) *InstancesImportCall {
7772	c.ctx_ = ctx
7773	return c
7774}
7775
7776// Header returns an http.Header that can be modified by the caller to
7777// add HTTP headers to the request.
7778func (c *InstancesImportCall) Header() http.Header {
7779	if c.header_ == nil {
7780		c.header_ = make(http.Header)
7781	}
7782	return c.header_
7783}
7784
7785func (c *InstancesImportCall) doRequest(alt string) (*http.Response, error) {
7786	reqHeaders := make(http.Header)
7787	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
7788	for k, v := range c.header_ {
7789		reqHeaders[k] = v
7790	}
7791	reqHeaders.Set("User-Agent", c.s.userAgent())
7792	var body io.Reader = nil
7793	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesimportrequest)
7794	if err != nil {
7795		return nil, err
7796	}
7797	reqHeaders.Set("Content-Type", "application/json")
7798	c.urlParams_.Set("alt", alt)
7799	c.urlParams_.Set("prettyPrint", "false")
7800	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/import")
7801	urls += "?" + c.urlParams_.Encode()
7802	req, err := http.NewRequest("POST", urls, body)
7803	if err != nil {
7804		return nil, err
7805	}
7806	req.Header = reqHeaders
7807	googleapi.Expand(req.URL, map[string]string{
7808		"project":  c.project,
7809		"instance": c.instance,
7810	})
7811	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7812}
7813
7814// Do executes the "sql.instances.import" call.
7815// Exactly one of *Operation or error will be non-nil. Any non-2xx
7816// status code is an error. Response headers are in either
7817// *Operation.ServerResponse.Header or (if a response was returned at
7818// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7819// to check whether the returned error was because
7820// http.StatusNotModified was returned.
7821func (c *InstancesImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7822	gensupport.SetOptions(c.urlParams_, opts...)
7823	res, err := c.doRequest("json")
7824	if res != nil && res.StatusCode == http.StatusNotModified {
7825		if res.Body != nil {
7826			res.Body.Close()
7827		}
7828		return nil, &googleapi.Error{
7829			Code:   res.StatusCode,
7830			Header: res.Header,
7831		}
7832	}
7833	if err != nil {
7834		return nil, err
7835	}
7836	defer googleapi.CloseBody(res)
7837	if err := googleapi.CheckResponse(res); err != nil {
7838		return nil, err
7839	}
7840	ret := &Operation{
7841		ServerResponse: googleapi.ServerResponse{
7842			Header:         res.Header,
7843			HTTPStatusCode: res.StatusCode,
7844		},
7845	}
7846	target := &ret
7847	if err := gensupport.DecodeResponse(target, res); err != nil {
7848		return nil, err
7849	}
7850	return ret, nil
7851	// {
7852	//   "description": "Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.",
7853	//   "flatPath": "v1/projects/{project}/instances/{instance}/import",
7854	//   "httpMethod": "POST",
7855	//   "id": "sql.instances.import",
7856	//   "parameterOrder": [
7857	//     "project",
7858	//     "instance"
7859	//   ],
7860	//   "parameters": {
7861	//     "instance": {
7862	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
7863	//       "location": "path",
7864	//       "required": true,
7865	//       "type": "string"
7866	//     },
7867	//     "project": {
7868	//       "description": "Project ID of the project that contains the instance.",
7869	//       "location": "path",
7870	//       "required": true,
7871	//       "type": "string"
7872	//     }
7873	//   },
7874	//   "path": "v1/projects/{project}/instances/{instance}/import",
7875	//   "request": {
7876	//     "$ref": "InstancesImportRequest"
7877	//   },
7878	//   "response": {
7879	//     "$ref": "Operation"
7880	//   },
7881	//   "scopes": [
7882	//     "https://www.googleapis.com/auth/cloud-platform"
7883	//   ]
7884	// }
7885
7886}
7887
7888// method id "sql.instances.insert":
7889
7890type InstancesInsertCall struct {
7891	s                *Service
7892	project          string
7893	databaseinstance *DatabaseInstance
7894	urlParams_       gensupport.URLParams
7895	ctx_             context.Context
7896	header_          http.Header
7897}
7898
7899// Insert: Creates a new Cloud SQL instance.
7900//
7901// - project: Project ID of the project to which the newly created Cloud
7902//   SQL instances should belong.
7903func (r *InstancesService) Insert(project string, databaseinstance *DatabaseInstance) *InstancesInsertCall {
7904	c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7905	c.project = project
7906	c.databaseinstance = databaseinstance
7907	return c
7908}
7909
7910// Fields allows partial responses to be retrieved. See
7911// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7912// for more information.
7913func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall {
7914	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7915	return c
7916}
7917
7918// Context sets the context to be used in this call's Do method. Any
7919// pending HTTP request will be aborted if the provided context is
7920// canceled.
7921func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall {
7922	c.ctx_ = ctx
7923	return c
7924}
7925
7926// Header returns an http.Header that can be modified by the caller to
7927// add HTTP headers to the request.
7928func (c *InstancesInsertCall) Header() http.Header {
7929	if c.header_ == nil {
7930		c.header_ = make(http.Header)
7931	}
7932	return c.header_
7933}
7934
7935func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) {
7936	reqHeaders := make(http.Header)
7937	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
7938	for k, v := range c.header_ {
7939		reqHeaders[k] = v
7940	}
7941	reqHeaders.Set("User-Agent", c.s.userAgent())
7942	var body io.Reader = nil
7943	body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
7944	if err != nil {
7945		return nil, err
7946	}
7947	reqHeaders.Set("Content-Type", "application/json")
7948	c.urlParams_.Set("alt", alt)
7949	c.urlParams_.Set("prettyPrint", "false")
7950	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances")
7951	urls += "?" + c.urlParams_.Encode()
7952	req, err := http.NewRequest("POST", urls, body)
7953	if err != nil {
7954		return nil, err
7955	}
7956	req.Header = reqHeaders
7957	googleapi.Expand(req.URL, map[string]string{
7958		"project": c.project,
7959	})
7960	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7961}
7962
7963// Do executes the "sql.instances.insert" call.
7964// Exactly one of *Operation or error will be non-nil. Any non-2xx
7965// status code is an error. Response headers are in either
7966// *Operation.ServerResponse.Header or (if a response was returned at
7967// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7968// to check whether the returned error was because
7969// http.StatusNotModified was returned.
7970func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7971	gensupport.SetOptions(c.urlParams_, opts...)
7972	res, err := c.doRequest("json")
7973	if res != nil && res.StatusCode == http.StatusNotModified {
7974		if res.Body != nil {
7975			res.Body.Close()
7976		}
7977		return nil, &googleapi.Error{
7978			Code:   res.StatusCode,
7979			Header: res.Header,
7980		}
7981	}
7982	if err != nil {
7983		return nil, err
7984	}
7985	defer googleapi.CloseBody(res)
7986	if err := googleapi.CheckResponse(res); err != nil {
7987		return nil, err
7988	}
7989	ret := &Operation{
7990		ServerResponse: googleapi.ServerResponse{
7991			Header:         res.Header,
7992			HTTPStatusCode: res.StatusCode,
7993		},
7994	}
7995	target := &ret
7996	if err := gensupport.DecodeResponse(target, res); err != nil {
7997		return nil, err
7998	}
7999	return ret, nil
8000	// {
8001	//   "description": "Creates a new Cloud SQL instance.",
8002	//   "flatPath": "v1/projects/{project}/instances",
8003	//   "httpMethod": "POST",
8004	//   "id": "sql.instances.insert",
8005	//   "parameterOrder": [
8006	//     "project"
8007	//   ],
8008	//   "parameters": {
8009	//     "project": {
8010	//       "description": "Project ID of the project to which the newly created Cloud SQL instances should belong.",
8011	//       "location": "path",
8012	//       "required": true,
8013	//       "type": "string"
8014	//     }
8015	//   },
8016	//   "path": "v1/projects/{project}/instances",
8017	//   "request": {
8018	//     "$ref": "DatabaseInstance"
8019	//   },
8020	//   "response": {
8021	//     "$ref": "Operation"
8022	//   },
8023	//   "scopes": [
8024	//     "https://www.googleapis.com/auth/cloud-platform",
8025	//     "https://www.googleapis.com/auth/sqlservice.admin"
8026	//   ]
8027	// }
8028
8029}
8030
8031// method id "sql.instances.list":
8032
8033type InstancesListCall struct {
8034	s            *Service
8035	project      string
8036	urlParams_   gensupport.URLParams
8037	ifNoneMatch_ string
8038	ctx_         context.Context
8039	header_      http.Header
8040}
8041
8042// List: Lists instances under a given project.
8043//
8044// - project: Project ID of the project for which to list Cloud SQL
8045//   instances.
8046func (r *InstancesService) List(project string) *InstancesListCall {
8047	c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8048	c.project = project
8049	return c
8050}
8051
8052// Filter sets the optional parameter "filter": A filter expression that
8053// filters resources listed in the response. The expression is in the
8054// form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'.
8055// Fields can be nested as needed as per their JSON representation, such
8056// as 'settings.userLabels.auto_start:true'. Multiple filter queries are
8057// space-separated. For example. 'state:RUNNABLE
8058// instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an
8059// AND expression. However, you can include AND and OR expressions
8060// explicitly.
8061func (c *InstancesListCall) Filter(filter string) *InstancesListCall {
8062	c.urlParams_.Set("filter", filter)
8063	return c
8064}
8065
8066// MaxResults sets the optional parameter "maxResults": The maximum
8067// number of results to return per response.
8068func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall {
8069	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
8070	return c
8071}
8072
8073// PageToken sets the optional parameter "pageToken": A
8074// previously-returned page token representing part of the larger set of
8075// results to view.
8076func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall {
8077	c.urlParams_.Set("pageToken", pageToken)
8078	return c
8079}
8080
8081// Fields allows partial responses to be retrieved. See
8082// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8083// for more information.
8084func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall {
8085	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8086	return c
8087}
8088
8089// IfNoneMatch sets the optional parameter which makes the operation
8090// fail if the object's ETag matches the given value. This is useful for
8091// getting updates only after the object has changed since the last
8092// request. Use googleapi.IsNotModified to check whether the response
8093// error from Do is the result of In-None-Match.
8094func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall {
8095	c.ifNoneMatch_ = entityTag
8096	return c
8097}
8098
8099// Context sets the context to be used in this call's Do method. Any
8100// pending HTTP request will be aborted if the provided context is
8101// canceled.
8102func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall {
8103	c.ctx_ = ctx
8104	return c
8105}
8106
8107// Header returns an http.Header that can be modified by the caller to
8108// add HTTP headers to the request.
8109func (c *InstancesListCall) Header() http.Header {
8110	if c.header_ == nil {
8111		c.header_ = make(http.Header)
8112	}
8113	return c.header_
8114}
8115
8116func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) {
8117	reqHeaders := make(http.Header)
8118	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
8119	for k, v := range c.header_ {
8120		reqHeaders[k] = v
8121	}
8122	reqHeaders.Set("User-Agent", c.s.userAgent())
8123	if c.ifNoneMatch_ != "" {
8124		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8125	}
8126	var body io.Reader = nil
8127	c.urlParams_.Set("alt", alt)
8128	c.urlParams_.Set("prettyPrint", "false")
8129	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances")
8130	urls += "?" + c.urlParams_.Encode()
8131	req, err := http.NewRequest("GET", urls, body)
8132	if err != nil {
8133		return nil, err
8134	}
8135	req.Header = reqHeaders
8136	googleapi.Expand(req.URL, map[string]string{
8137		"project": c.project,
8138	})
8139	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8140}
8141
8142// Do executes the "sql.instances.list" call.
8143// Exactly one of *InstancesListResponse or error will be non-nil. Any
8144// non-2xx status code is an error. Response headers are in either
8145// *InstancesListResponse.ServerResponse.Header or (if a response was
8146// returned at all) in error.(*googleapi.Error).Header. Use
8147// googleapi.IsNotModified to check whether the returned error was
8148// because http.StatusNotModified was returned.
8149func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstancesListResponse, error) {
8150	gensupport.SetOptions(c.urlParams_, opts...)
8151	res, err := c.doRequest("json")
8152	if res != nil && res.StatusCode == http.StatusNotModified {
8153		if res.Body != nil {
8154			res.Body.Close()
8155		}
8156		return nil, &googleapi.Error{
8157			Code:   res.StatusCode,
8158			Header: res.Header,
8159		}
8160	}
8161	if err != nil {
8162		return nil, err
8163	}
8164	defer googleapi.CloseBody(res)
8165	if err := googleapi.CheckResponse(res); err != nil {
8166		return nil, err
8167	}
8168	ret := &InstancesListResponse{
8169		ServerResponse: googleapi.ServerResponse{
8170			Header:         res.Header,
8171			HTTPStatusCode: res.StatusCode,
8172		},
8173	}
8174	target := &ret
8175	if err := gensupport.DecodeResponse(target, res); err != nil {
8176		return nil, err
8177	}
8178	return ret, nil
8179	// {
8180	//   "description": "Lists instances under a given project.",
8181	//   "flatPath": "v1/projects/{project}/instances",
8182	//   "httpMethod": "GET",
8183	//   "id": "sql.instances.list",
8184	//   "parameterOrder": [
8185	//     "project"
8186	//   ],
8187	//   "parameters": {
8188	//     "filter": {
8189	//       "description": "A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.",
8190	//       "location": "query",
8191	//       "type": "string"
8192	//     },
8193	//     "maxResults": {
8194	//       "description": "The maximum number of results to return per response.",
8195	//       "format": "uint32",
8196	//       "location": "query",
8197	//       "type": "integer"
8198	//     },
8199	//     "pageToken": {
8200	//       "description": "A previously-returned page token representing part of the larger set of results to view.",
8201	//       "location": "query",
8202	//       "type": "string"
8203	//     },
8204	//     "project": {
8205	//       "description": "Project ID of the project for which to list Cloud SQL instances.",
8206	//       "location": "path",
8207	//       "required": true,
8208	//       "type": "string"
8209	//     }
8210	//   },
8211	//   "path": "v1/projects/{project}/instances",
8212	//   "response": {
8213	//     "$ref": "InstancesListResponse"
8214	//   },
8215	//   "scopes": [
8216	//     "https://www.googleapis.com/auth/cloud-platform",
8217	//     "https://www.googleapis.com/auth/sqlservice.admin"
8218	//   ]
8219	// }
8220
8221}
8222
8223// Pages invokes f for each page of results.
8224// A non-nil error returned from f will halt the iteration.
8225// The provided context supersedes any context provided to the Context method.
8226func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstancesListResponse) error) error {
8227	c.ctx_ = ctx
8228	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8229	for {
8230		x, err := c.Do()
8231		if err != nil {
8232			return err
8233		}
8234		if err := f(x); err != nil {
8235			return err
8236		}
8237		if x.NextPageToken == "" {
8238			return nil
8239		}
8240		c.PageToken(x.NextPageToken)
8241	}
8242}
8243
8244// method id "sql.instances.listServerCas":
8245
8246type InstancesListServerCasCall struct {
8247	s            *Service
8248	project      string
8249	instance     string
8250	urlParams_   gensupport.URLParams
8251	ifNoneMatch_ string
8252	ctx_         context.Context
8253	header_      http.Header
8254}
8255
8256// ListServerCas: Lists all of the trusted Certificate Authorities (CAs)
8257// for the specified instance. There can be up to three CAs listed: the
8258// CA that was used to sign the certificate that is currently in use, a
8259// CA that has been added but not yet used to sign a certificate, and a
8260// CA used to sign a certificate that has previously rotated out.
8261//
8262// - instance: Cloud SQL instance ID. This does not include the project
8263//   ID.
8264// - project: Project ID of the project that contains the instance.
8265func (r *InstancesService) ListServerCas(project string, instance string) *InstancesListServerCasCall {
8266	c := &InstancesListServerCasCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8267	c.project = project
8268	c.instance = instance
8269	return c
8270}
8271
8272// Fields allows partial responses to be retrieved. See
8273// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8274// for more information.
8275func (c *InstancesListServerCasCall) Fields(s ...googleapi.Field) *InstancesListServerCasCall {
8276	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8277	return c
8278}
8279
8280// IfNoneMatch sets the optional parameter which makes the operation
8281// fail if the object's ETag matches the given value. This is useful for
8282// getting updates only after the object has changed since the last
8283// request. Use googleapi.IsNotModified to check whether the response
8284// error from Do is the result of In-None-Match.
8285func (c *InstancesListServerCasCall) IfNoneMatch(entityTag string) *InstancesListServerCasCall {
8286	c.ifNoneMatch_ = entityTag
8287	return c
8288}
8289
8290// Context sets the context to be used in this call's Do method. Any
8291// pending HTTP request will be aborted if the provided context is
8292// canceled.
8293func (c *InstancesListServerCasCall) Context(ctx context.Context) *InstancesListServerCasCall {
8294	c.ctx_ = ctx
8295	return c
8296}
8297
8298// Header returns an http.Header that can be modified by the caller to
8299// add HTTP headers to the request.
8300func (c *InstancesListServerCasCall) Header() http.Header {
8301	if c.header_ == nil {
8302		c.header_ = make(http.Header)
8303	}
8304	return c.header_
8305}
8306
8307func (c *InstancesListServerCasCall) doRequest(alt string) (*http.Response, error) {
8308	reqHeaders := make(http.Header)
8309	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
8310	for k, v := range c.header_ {
8311		reqHeaders[k] = v
8312	}
8313	reqHeaders.Set("User-Agent", c.s.userAgent())
8314	if c.ifNoneMatch_ != "" {
8315		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8316	}
8317	var body io.Reader = nil
8318	c.urlParams_.Set("alt", alt)
8319	c.urlParams_.Set("prettyPrint", "false")
8320	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/listServerCas")
8321	urls += "?" + c.urlParams_.Encode()
8322	req, err := http.NewRequest("GET", urls, body)
8323	if err != nil {
8324		return nil, err
8325	}
8326	req.Header = reqHeaders
8327	googleapi.Expand(req.URL, map[string]string{
8328		"project":  c.project,
8329		"instance": c.instance,
8330	})
8331	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8332}
8333
8334// Do executes the "sql.instances.listServerCas" call.
8335// Exactly one of *InstancesListServerCasResponse or error will be
8336// non-nil. Any non-2xx status code is an error. Response headers are in
8337// either *InstancesListServerCasResponse.ServerResponse.Header or (if a
8338// response was returned at all) in error.(*googleapi.Error).Header. Use
8339// googleapi.IsNotModified to check whether the returned error was
8340// because http.StatusNotModified was returned.
8341func (c *InstancesListServerCasCall) Do(opts ...googleapi.CallOption) (*InstancesListServerCasResponse, error) {
8342	gensupport.SetOptions(c.urlParams_, opts...)
8343	res, err := c.doRequest("json")
8344	if res != nil && res.StatusCode == http.StatusNotModified {
8345		if res.Body != nil {
8346			res.Body.Close()
8347		}
8348		return nil, &googleapi.Error{
8349			Code:   res.StatusCode,
8350			Header: res.Header,
8351		}
8352	}
8353	if err != nil {
8354		return nil, err
8355	}
8356	defer googleapi.CloseBody(res)
8357	if err := googleapi.CheckResponse(res); err != nil {
8358		return nil, err
8359	}
8360	ret := &InstancesListServerCasResponse{
8361		ServerResponse: googleapi.ServerResponse{
8362			Header:         res.Header,
8363			HTTPStatusCode: res.StatusCode,
8364		},
8365	}
8366	target := &ret
8367	if err := gensupport.DecodeResponse(target, res); err != nil {
8368		return nil, err
8369	}
8370	return ret, nil
8371	// {
8372	//   "description": "Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.",
8373	//   "flatPath": "v1/projects/{project}/instances/{instance}/listServerCas",
8374	//   "httpMethod": "GET",
8375	//   "id": "sql.instances.listServerCas",
8376	//   "parameterOrder": [
8377	//     "project",
8378	//     "instance"
8379	//   ],
8380	//   "parameters": {
8381	//     "instance": {
8382	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8383	//       "location": "path",
8384	//       "required": true,
8385	//       "type": "string"
8386	//     },
8387	//     "project": {
8388	//       "description": "Project ID of the project that contains the instance.",
8389	//       "location": "path",
8390	//       "required": true,
8391	//       "type": "string"
8392	//     }
8393	//   },
8394	//   "path": "v1/projects/{project}/instances/{instance}/listServerCas",
8395	//   "response": {
8396	//     "$ref": "InstancesListServerCasResponse"
8397	//   },
8398	//   "scopes": [
8399	//     "https://www.googleapis.com/auth/cloud-platform",
8400	//     "https://www.googleapis.com/auth/sqlservice.admin"
8401	//   ]
8402	// }
8403
8404}
8405
8406// method id "sql.instances.patch":
8407
8408type InstancesPatchCall struct {
8409	s                *Service
8410	project          string
8411	instance         string
8412	databaseinstance *DatabaseInstance
8413	urlParams_       gensupport.URLParams
8414	ctx_             context.Context
8415	header_          http.Header
8416}
8417
8418// Patch: Updates settings of a Cloud SQL instance. This method supports
8419// patch semantics.
8420//
8421// - instance: Cloud SQL instance ID. This does not include the project
8422//   ID.
8423// - project: Project ID of the project that contains the instance.
8424func (r *InstancesService) Patch(project string, instance string, databaseinstance *DatabaseInstance) *InstancesPatchCall {
8425	c := &InstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8426	c.project = project
8427	c.instance = instance
8428	c.databaseinstance = databaseinstance
8429	return c
8430}
8431
8432// Fields allows partial responses to be retrieved. See
8433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8434// for more information.
8435func (c *InstancesPatchCall) Fields(s ...googleapi.Field) *InstancesPatchCall {
8436	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8437	return c
8438}
8439
8440// Context sets the context to be used in this call's Do method. Any
8441// pending HTTP request will be aborted if the provided context is
8442// canceled.
8443func (c *InstancesPatchCall) Context(ctx context.Context) *InstancesPatchCall {
8444	c.ctx_ = ctx
8445	return c
8446}
8447
8448// Header returns an http.Header that can be modified by the caller to
8449// add HTTP headers to the request.
8450func (c *InstancesPatchCall) Header() http.Header {
8451	if c.header_ == nil {
8452		c.header_ = make(http.Header)
8453	}
8454	return c.header_
8455}
8456
8457func (c *InstancesPatchCall) doRequest(alt string) (*http.Response, error) {
8458	reqHeaders := make(http.Header)
8459	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
8460	for k, v := range c.header_ {
8461		reqHeaders[k] = v
8462	}
8463	reqHeaders.Set("User-Agent", c.s.userAgent())
8464	var body io.Reader = nil
8465	body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
8466	if err != nil {
8467		return nil, err
8468	}
8469	reqHeaders.Set("Content-Type", "application/json")
8470	c.urlParams_.Set("alt", alt)
8471	c.urlParams_.Set("prettyPrint", "false")
8472	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}")
8473	urls += "?" + c.urlParams_.Encode()
8474	req, err := http.NewRequest("PATCH", urls, body)
8475	if err != nil {
8476		return nil, err
8477	}
8478	req.Header = reqHeaders
8479	googleapi.Expand(req.URL, map[string]string{
8480		"project":  c.project,
8481		"instance": c.instance,
8482	})
8483	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8484}
8485
8486// Do executes the "sql.instances.patch" call.
8487// Exactly one of *Operation or error will be non-nil. Any non-2xx
8488// status code is an error. Response headers are in either
8489// *Operation.ServerResponse.Header or (if a response was returned at
8490// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8491// to check whether the returned error was because
8492// http.StatusNotModified was returned.
8493func (c *InstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8494	gensupport.SetOptions(c.urlParams_, opts...)
8495	res, err := c.doRequest("json")
8496	if res != nil && res.StatusCode == http.StatusNotModified {
8497		if res.Body != nil {
8498			res.Body.Close()
8499		}
8500		return nil, &googleapi.Error{
8501			Code:   res.StatusCode,
8502			Header: res.Header,
8503		}
8504	}
8505	if err != nil {
8506		return nil, err
8507	}
8508	defer googleapi.CloseBody(res)
8509	if err := googleapi.CheckResponse(res); err != nil {
8510		return nil, err
8511	}
8512	ret := &Operation{
8513		ServerResponse: googleapi.ServerResponse{
8514			Header:         res.Header,
8515			HTTPStatusCode: res.StatusCode,
8516		},
8517	}
8518	target := &ret
8519	if err := gensupport.DecodeResponse(target, res); err != nil {
8520		return nil, err
8521	}
8522	return ret, nil
8523	// {
8524	//   "description": "Updates settings of a Cloud SQL instance. This method supports patch semantics.",
8525	//   "flatPath": "v1/projects/{project}/instances/{instance}",
8526	//   "httpMethod": "PATCH",
8527	//   "id": "sql.instances.patch",
8528	//   "parameterOrder": [
8529	//     "project",
8530	//     "instance"
8531	//   ],
8532	//   "parameters": {
8533	//     "instance": {
8534	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8535	//       "location": "path",
8536	//       "required": true,
8537	//       "type": "string"
8538	//     },
8539	//     "project": {
8540	//       "description": "Project ID of the project that contains the instance.",
8541	//       "location": "path",
8542	//       "required": true,
8543	//       "type": "string"
8544	//     }
8545	//   },
8546	//   "path": "v1/projects/{project}/instances/{instance}",
8547	//   "request": {
8548	//     "$ref": "DatabaseInstance"
8549	//   },
8550	//   "response": {
8551	//     "$ref": "Operation"
8552	//   },
8553	//   "scopes": [
8554	//     "https://www.googleapis.com/auth/cloud-platform",
8555	//     "https://www.googleapis.com/auth/sqlservice.admin"
8556	//   ]
8557	// }
8558
8559}
8560
8561// method id "sql.instances.promoteReplica":
8562
8563type InstancesPromoteReplicaCall struct {
8564	s          *Service
8565	project    string
8566	instance   string
8567	urlParams_ gensupport.URLParams
8568	ctx_       context.Context
8569	header_    http.Header
8570}
8571
8572// PromoteReplica: Promotes the read replica instance to be a
8573// stand-alone Cloud SQL instance. Using this operation might cause your
8574// instance to restart.
8575//
8576// - instance: Cloud SQL read replica instance name.
8577// - project: ID of the project that contains the read replica.
8578func (r *InstancesService) PromoteReplica(project string, instance string) *InstancesPromoteReplicaCall {
8579	c := &InstancesPromoteReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8580	c.project = project
8581	c.instance = instance
8582	return c
8583}
8584
8585// Fields allows partial responses to be retrieved. See
8586// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8587// for more information.
8588func (c *InstancesPromoteReplicaCall) Fields(s ...googleapi.Field) *InstancesPromoteReplicaCall {
8589	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8590	return c
8591}
8592
8593// Context sets the context to be used in this call's Do method. Any
8594// pending HTTP request will be aborted if the provided context is
8595// canceled.
8596func (c *InstancesPromoteReplicaCall) Context(ctx context.Context) *InstancesPromoteReplicaCall {
8597	c.ctx_ = ctx
8598	return c
8599}
8600
8601// Header returns an http.Header that can be modified by the caller to
8602// add HTTP headers to the request.
8603func (c *InstancesPromoteReplicaCall) Header() http.Header {
8604	if c.header_ == nil {
8605		c.header_ = make(http.Header)
8606	}
8607	return c.header_
8608}
8609
8610func (c *InstancesPromoteReplicaCall) doRequest(alt string) (*http.Response, error) {
8611	reqHeaders := make(http.Header)
8612	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
8613	for k, v := range c.header_ {
8614		reqHeaders[k] = v
8615	}
8616	reqHeaders.Set("User-Agent", c.s.userAgent())
8617	var body io.Reader = nil
8618	c.urlParams_.Set("alt", alt)
8619	c.urlParams_.Set("prettyPrint", "false")
8620	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/promoteReplica")
8621	urls += "?" + c.urlParams_.Encode()
8622	req, err := http.NewRequest("POST", urls, body)
8623	if err != nil {
8624		return nil, err
8625	}
8626	req.Header = reqHeaders
8627	googleapi.Expand(req.URL, map[string]string{
8628		"project":  c.project,
8629		"instance": c.instance,
8630	})
8631	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8632}
8633
8634// Do executes the "sql.instances.promoteReplica" call.
8635// Exactly one of *Operation or error will be non-nil. Any non-2xx
8636// status code is an error. Response headers are in either
8637// *Operation.ServerResponse.Header or (if a response was returned at
8638// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8639// to check whether the returned error was because
8640// http.StatusNotModified was returned.
8641func (c *InstancesPromoteReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8642	gensupport.SetOptions(c.urlParams_, opts...)
8643	res, err := c.doRequest("json")
8644	if res != nil && res.StatusCode == http.StatusNotModified {
8645		if res.Body != nil {
8646			res.Body.Close()
8647		}
8648		return nil, &googleapi.Error{
8649			Code:   res.StatusCode,
8650			Header: res.Header,
8651		}
8652	}
8653	if err != nil {
8654		return nil, err
8655	}
8656	defer googleapi.CloseBody(res)
8657	if err := googleapi.CheckResponse(res); err != nil {
8658		return nil, err
8659	}
8660	ret := &Operation{
8661		ServerResponse: googleapi.ServerResponse{
8662			Header:         res.Header,
8663			HTTPStatusCode: res.StatusCode,
8664		},
8665	}
8666	target := &ret
8667	if err := gensupport.DecodeResponse(target, res); err != nil {
8668		return nil, err
8669	}
8670	return ret, nil
8671	// {
8672	//   "description": "Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.",
8673	//   "flatPath": "v1/projects/{project}/instances/{instance}/promoteReplica",
8674	//   "httpMethod": "POST",
8675	//   "id": "sql.instances.promoteReplica",
8676	//   "parameterOrder": [
8677	//     "project",
8678	//     "instance"
8679	//   ],
8680	//   "parameters": {
8681	//     "instance": {
8682	//       "description": "Cloud SQL read replica instance name.",
8683	//       "location": "path",
8684	//       "required": true,
8685	//       "type": "string"
8686	//     },
8687	//     "project": {
8688	//       "description": "ID of the project that contains the read replica.",
8689	//       "location": "path",
8690	//       "required": true,
8691	//       "type": "string"
8692	//     }
8693	//   },
8694	//   "path": "v1/projects/{project}/instances/{instance}/promoteReplica",
8695	//   "response": {
8696	//     "$ref": "Operation"
8697	//   },
8698	//   "scopes": [
8699	//     "https://www.googleapis.com/auth/cloud-platform",
8700	//     "https://www.googleapis.com/auth/sqlservice.admin"
8701	//   ]
8702	// }
8703
8704}
8705
8706// method id "sql.instances.resetSslConfig":
8707
8708type InstancesResetSslConfigCall struct {
8709	s          *Service
8710	project    string
8711	instance   string
8712	urlParams_ gensupport.URLParams
8713	ctx_       context.Context
8714	header_    http.Header
8715}
8716
8717// ResetSslConfig: Deletes all client certificates and generates a new
8718// server SSL certificate for the instance.
8719//
8720// - instance: Cloud SQL instance ID. This does not include the project
8721//   ID.
8722// - project: Project ID of the project that contains the instance.
8723func (r *InstancesService) ResetSslConfig(project string, instance string) *InstancesResetSslConfigCall {
8724	c := &InstancesResetSslConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8725	c.project = project
8726	c.instance = instance
8727	return c
8728}
8729
8730// Fields allows partial responses to be retrieved. See
8731// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8732// for more information.
8733func (c *InstancesResetSslConfigCall) Fields(s ...googleapi.Field) *InstancesResetSslConfigCall {
8734	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8735	return c
8736}
8737
8738// Context sets the context to be used in this call's Do method. Any
8739// pending HTTP request will be aborted if the provided context is
8740// canceled.
8741func (c *InstancesResetSslConfigCall) Context(ctx context.Context) *InstancesResetSslConfigCall {
8742	c.ctx_ = ctx
8743	return c
8744}
8745
8746// Header returns an http.Header that can be modified by the caller to
8747// add HTTP headers to the request.
8748func (c *InstancesResetSslConfigCall) Header() http.Header {
8749	if c.header_ == nil {
8750		c.header_ = make(http.Header)
8751	}
8752	return c.header_
8753}
8754
8755func (c *InstancesResetSslConfigCall) doRequest(alt string) (*http.Response, error) {
8756	reqHeaders := make(http.Header)
8757	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
8758	for k, v := range c.header_ {
8759		reqHeaders[k] = v
8760	}
8761	reqHeaders.Set("User-Agent", c.s.userAgent())
8762	var body io.Reader = nil
8763	c.urlParams_.Set("alt", alt)
8764	c.urlParams_.Set("prettyPrint", "false")
8765	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/resetSslConfig")
8766	urls += "?" + c.urlParams_.Encode()
8767	req, err := http.NewRequest("POST", urls, body)
8768	if err != nil {
8769		return nil, err
8770	}
8771	req.Header = reqHeaders
8772	googleapi.Expand(req.URL, map[string]string{
8773		"project":  c.project,
8774		"instance": c.instance,
8775	})
8776	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8777}
8778
8779// Do executes the "sql.instances.resetSslConfig" call.
8780// Exactly one of *Operation or error will be non-nil. Any non-2xx
8781// status code is an error. Response headers are in either
8782// *Operation.ServerResponse.Header or (if a response was returned at
8783// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8784// to check whether the returned error was because
8785// http.StatusNotModified was returned.
8786func (c *InstancesResetSslConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8787	gensupport.SetOptions(c.urlParams_, opts...)
8788	res, err := c.doRequest("json")
8789	if res != nil && res.StatusCode == http.StatusNotModified {
8790		if res.Body != nil {
8791			res.Body.Close()
8792		}
8793		return nil, &googleapi.Error{
8794			Code:   res.StatusCode,
8795			Header: res.Header,
8796		}
8797	}
8798	if err != nil {
8799		return nil, err
8800	}
8801	defer googleapi.CloseBody(res)
8802	if err := googleapi.CheckResponse(res); err != nil {
8803		return nil, err
8804	}
8805	ret := &Operation{
8806		ServerResponse: googleapi.ServerResponse{
8807			Header:         res.Header,
8808			HTTPStatusCode: res.StatusCode,
8809		},
8810	}
8811	target := &ret
8812	if err := gensupport.DecodeResponse(target, res); err != nil {
8813		return nil, err
8814	}
8815	return ret, nil
8816	// {
8817	//   "description": "Deletes all client certificates and generates a new server SSL certificate for the instance.",
8818	//   "flatPath": "v1/projects/{project}/instances/{instance}/resetSslConfig",
8819	//   "httpMethod": "POST",
8820	//   "id": "sql.instances.resetSslConfig",
8821	//   "parameterOrder": [
8822	//     "project",
8823	//     "instance"
8824	//   ],
8825	//   "parameters": {
8826	//     "instance": {
8827	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8828	//       "location": "path",
8829	//       "required": true,
8830	//       "type": "string"
8831	//     },
8832	//     "project": {
8833	//       "description": "Project ID of the project that contains the instance.",
8834	//       "location": "path",
8835	//       "required": true,
8836	//       "type": "string"
8837	//     }
8838	//   },
8839	//   "path": "v1/projects/{project}/instances/{instance}/resetSslConfig",
8840	//   "response": {
8841	//     "$ref": "Operation"
8842	//   },
8843	//   "scopes": [
8844	//     "https://www.googleapis.com/auth/cloud-platform",
8845	//     "https://www.googleapis.com/auth/sqlservice.admin"
8846	//   ]
8847	// }
8848
8849}
8850
8851// method id "sql.instances.restart":
8852
8853type InstancesRestartCall struct {
8854	s          *Service
8855	project    string
8856	instance   string
8857	urlParams_ gensupport.URLParams
8858	ctx_       context.Context
8859	header_    http.Header
8860}
8861
8862// Restart: Restarts a Cloud SQL instance.
8863//
8864// - instance: Cloud SQL instance ID. This does not include the project
8865//   ID.
8866// - project: Project ID of the project that contains the instance to be
8867//   restarted.
8868func (r *InstancesService) Restart(project string, instance string) *InstancesRestartCall {
8869	c := &InstancesRestartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8870	c.project = project
8871	c.instance = instance
8872	return c
8873}
8874
8875// Fields allows partial responses to be retrieved. See
8876// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8877// for more information.
8878func (c *InstancesRestartCall) Fields(s ...googleapi.Field) *InstancesRestartCall {
8879	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8880	return c
8881}
8882
8883// Context sets the context to be used in this call's Do method. Any
8884// pending HTTP request will be aborted if the provided context is
8885// canceled.
8886func (c *InstancesRestartCall) Context(ctx context.Context) *InstancesRestartCall {
8887	c.ctx_ = ctx
8888	return c
8889}
8890
8891// Header returns an http.Header that can be modified by the caller to
8892// add HTTP headers to the request.
8893func (c *InstancesRestartCall) Header() http.Header {
8894	if c.header_ == nil {
8895		c.header_ = make(http.Header)
8896	}
8897	return c.header_
8898}
8899
8900func (c *InstancesRestartCall) doRequest(alt string) (*http.Response, error) {
8901	reqHeaders := make(http.Header)
8902	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
8903	for k, v := range c.header_ {
8904		reqHeaders[k] = v
8905	}
8906	reqHeaders.Set("User-Agent", c.s.userAgent())
8907	var body io.Reader = nil
8908	c.urlParams_.Set("alt", alt)
8909	c.urlParams_.Set("prettyPrint", "false")
8910	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/restart")
8911	urls += "?" + c.urlParams_.Encode()
8912	req, err := http.NewRequest("POST", urls, body)
8913	if err != nil {
8914		return nil, err
8915	}
8916	req.Header = reqHeaders
8917	googleapi.Expand(req.URL, map[string]string{
8918		"project":  c.project,
8919		"instance": c.instance,
8920	})
8921	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8922}
8923
8924// Do executes the "sql.instances.restart" call.
8925// Exactly one of *Operation or error will be non-nil. Any non-2xx
8926// status code is an error. Response headers are in either
8927// *Operation.ServerResponse.Header or (if a response was returned at
8928// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8929// to check whether the returned error was because
8930// http.StatusNotModified was returned.
8931func (c *InstancesRestartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8932	gensupport.SetOptions(c.urlParams_, opts...)
8933	res, err := c.doRequest("json")
8934	if res != nil && res.StatusCode == http.StatusNotModified {
8935		if res.Body != nil {
8936			res.Body.Close()
8937		}
8938		return nil, &googleapi.Error{
8939			Code:   res.StatusCode,
8940			Header: res.Header,
8941		}
8942	}
8943	if err != nil {
8944		return nil, err
8945	}
8946	defer googleapi.CloseBody(res)
8947	if err := googleapi.CheckResponse(res); err != nil {
8948		return nil, err
8949	}
8950	ret := &Operation{
8951		ServerResponse: googleapi.ServerResponse{
8952			Header:         res.Header,
8953			HTTPStatusCode: res.StatusCode,
8954		},
8955	}
8956	target := &ret
8957	if err := gensupport.DecodeResponse(target, res); err != nil {
8958		return nil, err
8959	}
8960	return ret, nil
8961	// {
8962	//   "description": "Restarts a Cloud SQL instance.",
8963	//   "flatPath": "v1/projects/{project}/instances/{instance}/restart",
8964	//   "httpMethod": "POST",
8965	//   "id": "sql.instances.restart",
8966	//   "parameterOrder": [
8967	//     "project",
8968	//     "instance"
8969	//   ],
8970	//   "parameters": {
8971	//     "instance": {
8972	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
8973	//       "location": "path",
8974	//       "required": true,
8975	//       "type": "string"
8976	//     },
8977	//     "project": {
8978	//       "description": "Project ID of the project that contains the instance to be restarted.",
8979	//       "location": "path",
8980	//       "required": true,
8981	//       "type": "string"
8982	//     }
8983	//   },
8984	//   "path": "v1/projects/{project}/instances/{instance}/restart",
8985	//   "response": {
8986	//     "$ref": "Operation"
8987	//   },
8988	//   "scopes": [
8989	//     "https://www.googleapis.com/auth/cloud-platform",
8990	//     "https://www.googleapis.com/auth/sqlservice.admin"
8991	//   ]
8992	// }
8993
8994}
8995
8996// method id "sql.instances.restoreBackup":
8997
8998type InstancesRestoreBackupCall struct {
8999	s                             *Service
9000	project                       string
9001	instance                      string
9002	instancesrestorebackuprequest *InstancesRestoreBackupRequest
9003	urlParams_                    gensupport.URLParams
9004	ctx_                          context.Context
9005	header_                       http.Header
9006}
9007
9008// RestoreBackup: Restores a backup of a Cloud SQL instance. Using this
9009// operation might cause your instance to restart.
9010//
9011// - instance: Cloud SQL instance ID. This does not include the project
9012//   ID.
9013// - project: Project ID of the project that contains the instance.
9014func (r *InstancesService) RestoreBackup(project string, instance string, instancesrestorebackuprequest *InstancesRestoreBackupRequest) *InstancesRestoreBackupCall {
9015	c := &InstancesRestoreBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9016	c.project = project
9017	c.instance = instance
9018	c.instancesrestorebackuprequest = instancesrestorebackuprequest
9019	return c
9020}
9021
9022// Fields allows partial responses to be retrieved. See
9023// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9024// for more information.
9025func (c *InstancesRestoreBackupCall) Fields(s ...googleapi.Field) *InstancesRestoreBackupCall {
9026	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9027	return c
9028}
9029
9030// Context sets the context to be used in this call's Do method. Any
9031// pending HTTP request will be aborted if the provided context is
9032// canceled.
9033func (c *InstancesRestoreBackupCall) Context(ctx context.Context) *InstancesRestoreBackupCall {
9034	c.ctx_ = ctx
9035	return c
9036}
9037
9038// Header returns an http.Header that can be modified by the caller to
9039// add HTTP headers to the request.
9040func (c *InstancesRestoreBackupCall) Header() http.Header {
9041	if c.header_ == nil {
9042		c.header_ = make(http.Header)
9043	}
9044	return c.header_
9045}
9046
9047func (c *InstancesRestoreBackupCall) doRequest(alt string) (*http.Response, error) {
9048	reqHeaders := make(http.Header)
9049	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
9050	for k, v := range c.header_ {
9051		reqHeaders[k] = v
9052	}
9053	reqHeaders.Set("User-Agent", c.s.userAgent())
9054	var body io.Reader = nil
9055	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesrestorebackuprequest)
9056	if err != nil {
9057		return nil, err
9058	}
9059	reqHeaders.Set("Content-Type", "application/json")
9060	c.urlParams_.Set("alt", alt)
9061	c.urlParams_.Set("prettyPrint", "false")
9062	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/restoreBackup")
9063	urls += "?" + c.urlParams_.Encode()
9064	req, err := http.NewRequest("POST", urls, body)
9065	if err != nil {
9066		return nil, err
9067	}
9068	req.Header = reqHeaders
9069	googleapi.Expand(req.URL, map[string]string{
9070		"project":  c.project,
9071		"instance": c.instance,
9072	})
9073	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9074}
9075
9076// Do executes the "sql.instances.restoreBackup" call.
9077// Exactly one of *Operation or error will be non-nil. Any non-2xx
9078// status code is an error. Response headers are in either
9079// *Operation.ServerResponse.Header or (if a response was returned at
9080// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9081// to check whether the returned error was because
9082// http.StatusNotModified was returned.
9083func (c *InstancesRestoreBackupCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9084	gensupport.SetOptions(c.urlParams_, opts...)
9085	res, err := c.doRequest("json")
9086	if res != nil && res.StatusCode == http.StatusNotModified {
9087		if res.Body != nil {
9088			res.Body.Close()
9089		}
9090		return nil, &googleapi.Error{
9091			Code:   res.StatusCode,
9092			Header: res.Header,
9093		}
9094	}
9095	if err != nil {
9096		return nil, err
9097	}
9098	defer googleapi.CloseBody(res)
9099	if err := googleapi.CheckResponse(res); err != nil {
9100		return nil, err
9101	}
9102	ret := &Operation{
9103		ServerResponse: googleapi.ServerResponse{
9104			Header:         res.Header,
9105			HTTPStatusCode: res.StatusCode,
9106		},
9107	}
9108	target := &ret
9109	if err := gensupport.DecodeResponse(target, res); err != nil {
9110		return nil, err
9111	}
9112	return ret, nil
9113	// {
9114	//   "description": "Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.",
9115	//   "flatPath": "v1/projects/{project}/instances/{instance}/restoreBackup",
9116	//   "httpMethod": "POST",
9117	//   "id": "sql.instances.restoreBackup",
9118	//   "parameterOrder": [
9119	//     "project",
9120	//     "instance"
9121	//   ],
9122	//   "parameters": {
9123	//     "instance": {
9124	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9125	//       "location": "path",
9126	//       "required": true,
9127	//       "type": "string"
9128	//     },
9129	//     "project": {
9130	//       "description": "Project ID of the project that contains the instance.",
9131	//       "location": "path",
9132	//       "required": true,
9133	//       "type": "string"
9134	//     }
9135	//   },
9136	//   "path": "v1/projects/{project}/instances/{instance}/restoreBackup",
9137	//   "request": {
9138	//     "$ref": "InstancesRestoreBackupRequest"
9139	//   },
9140	//   "response": {
9141	//     "$ref": "Operation"
9142	//   },
9143	//   "scopes": [
9144	//     "https://www.googleapis.com/auth/cloud-platform",
9145	//     "https://www.googleapis.com/auth/sqlservice.admin"
9146	//   ]
9147	// }
9148
9149}
9150
9151// method id "sql.instances.rotateServerCa":
9152
9153type InstancesRotateServerCaCall struct {
9154	s                              *Service
9155	project                        string
9156	instance                       string
9157	instancesrotateservercarequest *InstancesRotateServerCaRequest
9158	urlParams_                     gensupport.URLParams
9159	ctx_                           context.Context
9160	header_                        http.Header
9161}
9162
9163// RotateServerCa: Rotates the server certificate to one signed by the
9164// Certificate Authority (CA) version previously added with the
9165// addServerCA method.
9166//
9167// - instance: Cloud SQL instance ID. This does not include the project
9168//   ID.
9169// - project: Project ID of the project that contains the instance.
9170func (r *InstancesService) RotateServerCa(project string, instance string, instancesrotateservercarequest *InstancesRotateServerCaRequest) *InstancesRotateServerCaCall {
9171	c := &InstancesRotateServerCaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9172	c.project = project
9173	c.instance = instance
9174	c.instancesrotateservercarequest = instancesrotateservercarequest
9175	return c
9176}
9177
9178// Fields allows partial responses to be retrieved. See
9179// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9180// for more information.
9181func (c *InstancesRotateServerCaCall) Fields(s ...googleapi.Field) *InstancesRotateServerCaCall {
9182	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9183	return c
9184}
9185
9186// Context sets the context to be used in this call's Do method. Any
9187// pending HTTP request will be aborted if the provided context is
9188// canceled.
9189func (c *InstancesRotateServerCaCall) Context(ctx context.Context) *InstancesRotateServerCaCall {
9190	c.ctx_ = ctx
9191	return c
9192}
9193
9194// Header returns an http.Header that can be modified by the caller to
9195// add HTTP headers to the request.
9196func (c *InstancesRotateServerCaCall) Header() http.Header {
9197	if c.header_ == nil {
9198		c.header_ = make(http.Header)
9199	}
9200	return c.header_
9201}
9202
9203func (c *InstancesRotateServerCaCall) doRequest(alt string) (*http.Response, error) {
9204	reqHeaders := make(http.Header)
9205	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
9206	for k, v := range c.header_ {
9207		reqHeaders[k] = v
9208	}
9209	reqHeaders.Set("User-Agent", c.s.userAgent())
9210	var body io.Reader = nil
9211	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesrotateservercarequest)
9212	if err != nil {
9213		return nil, err
9214	}
9215	reqHeaders.Set("Content-Type", "application/json")
9216	c.urlParams_.Set("alt", alt)
9217	c.urlParams_.Set("prettyPrint", "false")
9218	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/rotateServerCa")
9219	urls += "?" + c.urlParams_.Encode()
9220	req, err := http.NewRequest("POST", urls, body)
9221	if err != nil {
9222		return nil, err
9223	}
9224	req.Header = reqHeaders
9225	googleapi.Expand(req.URL, map[string]string{
9226		"project":  c.project,
9227		"instance": c.instance,
9228	})
9229	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9230}
9231
9232// Do executes the "sql.instances.rotateServerCa" call.
9233// Exactly one of *Operation or error will be non-nil. Any non-2xx
9234// status code is an error. Response headers are in either
9235// *Operation.ServerResponse.Header or (if a response was returned at
9236// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9237// to check whether the returned error was because
9238// http.StatusNotModified was returned.
9239func (c *InstancesRotateServerCaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9240	gensupport.SetOptions(c.urlParams_, opts...)
9241	res, err := c.doRequest("json")
9242	if res != nil && res.StatusCode == http.StatusNotModified {
9243		if res.Body != nil {
9244			res.Body.Close()
9245		}
9246		return nil, &googleapi.Error{
9247			Code:   res.StatusCode,
9248			Header: res.Header,
9249		}
9250	}
9251	if err != nil {
9252		return nil, err
9253	}
9254	defer googleapi.CloseBody(res)
9255	if err := googleapi.CheckResponse(res); err != nil {
9256		return nil, err
9257	}
9258	ret := &Operation{
9259		ServerResponse: googleapi.ServerResponse{
9260			Header:         res.Header,
9261			HTTPStatusCode: res.StatusCode,
9262		},
9263	}
9264	target := &ret
9265	if err := gensupport.DecodeResponse(target, res); err != nil {
9266		return nil, err
9267	}
9268	return ret, nil
9269	// {
9270	//   "description": "Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.",
9271	//   "flatPath": "v1/projects/{project}/instances/{instance}/rotateServerCa",
9272	//   "httpMethod": "POST",
9273	//   "id": "sql.instances.rotateServerCa",
9274	//   "parameterOrder": [
9275	//     "project",
9276	//     "instance"
9277	//   ],
9278	//   "parameters": {
9279	//     "instance": {
9280	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9281	//       "location": "path",
9282	//       "required": true,
9283	//       "type": "string"
9284	//     },
9285	//     "project": {
9286	//       "description": "Project ID of the project that contains the instance.",
9287	//       "location": "path",
9288	//       "required": true,
9289	//       "type": "string"
9290	//     }
9291	//   },
9292	//   "path": "v1/projects/{project}/instances/{instance}/rotateServerCa",
9293	//   "request": {
9294	//     "$ref": "InstancesRotateServerCaRequest"
9295	//   },
9296	//   "response": {
9297	//     "$ref": "Operation"
9298	//   },
9299	//   "scopes": [
9300	//     "https://www.googleapis.com/auth/cloud-platform",
9301	//     "https://www.googleapis.com/auth/sqlservice.admin"
9302	//   ]
9303	// }
9304
9305}
9306
9307// method id "sql.instances.startReplica":
9308
9309type InstancesStartReplicaCall struct {
9310	s          *Service
9311	project    string
9312	instance   string
9313	urlParams_ gensupport.URLParams
9314	ctx_       context.Context
9315	header_    http.Header
9316}
9317
9318// StartReplica: Starts the replication in the read replica instance.
9319//
9320// - instance: Cloud SQL read replica instance name.
9321// - project: ID of the project that contains the read replica.
9322func (r *InstancesService) StartReplica(project string, instance string) *InstancesStartReplicaCall {
9323	c := &InstancesStartReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9324	c.project = project
9325	c.instance = instance
9326	return c
9327}
9328
9329// Fields allows partial responses to be retrieved. See
9330// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9331// for more information.
9332func (c *InstancesStartReplicaCall) Fields(s ...googleapi.Field) *InstancesStartReplicaCall {
9333	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9334	return c
9335}
9336
9337// Context sets the context to be used in this call's Do method. Any
9338// pending HTTP request will be aborted if the provided context is
9339// canceled.
9340func (c *InstancesStartReplicaCall) Context(ctx context.Context) *InstancesStartReplicaCall {
9341	c.ctx_ = ctx
9342	return c
9343}
9344
9345// Header returns an http.Header that can be modified by the caller to
9346// add HTTP headers to the request.
9347func (c *InstancesStartReplicaCall) Header() http.Header {
9348	if c.header_ == nil {
9349		c.header_ = make(http.Header)
9350	}
9351	return c.header_
9352}
9353
9354func (c *InstancesStartReplicaCall) doRequest(alt string) (*http.Response, error) {
9355	reqHeaders := make(http.Header)
9356	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
9357	for k, v := range c.header_ {
9358		reqHeaders[k] = v
9359	}
9360	reqHeaders.Set("User-Agent", c.s.userAgent())
9361	var body io.Reader = nil
9362	c.urlParams_.Set("alt", alt)
9363	c.urlParams_.Set("prettyPrint", "false")
9364	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/startReplica")
9365	urls += "?" + c.urlParams_.Encode()
9366	req, err := http.NewRequest("POST", urls, body)
9367	if err != nil {
9368		return nil, err
9369	}
9370	req.Header = reqHeaders
9371	googleapi.Expand(req.URL, map[string]string{
9372		"project":  c.project,
9373		"instance": c.instance,
9374	})
9375	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9376}
9377
9378// Do executes the "sql.instances.startReplica" call.
9379// Exactly one of *Operation or error will be non-nil. Any non-2xx
9380// status code is an error. Response headers are in either
9381// *Operation.ServerResponse.Header or (if a response was returned at
9382// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9383// to check whether the returned error was because
9384// http.StatusNotModified was returned.
9385func (c *InstancesStartReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9386	gensupport.SetOptions(c.urlParams_, opts...)
9387	res, err := c.doRequest("json")
9388	if res != nil && res.StatusCode == http.StatusNotModified {
9389		if res.Body != nil {
9390			res.Body.Close()
9391		}
9392		return nil, &googleapi.Error{
9393			Code:   res.StatusCode,
9394			Header: res.Header,
9395		}
9396	}
9397	if err != nil {
9398		return nil, err
9399	}
9400	defer googleapi.CloseBody(res)
9401	if err := googleapi.CheckResponse(res); err != nil {
9402		return nil, err
9403	}
9404	ret := &Operation{
9405		ServerResponse: googleapi.ServerResponse{
9406			Header:         res.Header,
9407			HTTPStatusCode: res.StatusCode,
9408		},
9409	}
9410	target := &ret
9411	if err := gensupport.DecodeResponse(target, res); err != nil {
9412		return nil, err
9413	}
9414	return ret, nil
9415	// {
9416	//   "description": "Starts the replication in the read replica instance.",
9417	//   "flatPath": "v1/projects/{project}/instances/{instance}/startReplica",
9418	//   "httpMethod": "POST",
9419	//   "id": "sql.instances.startReplica",
9420	//   "parameterOrder": [
9421	//     "project",
9422	//     "instance"
9423	//   ],
9424	//   "parameters": {
9425	//     "instance": {
9426	//       "description": "Cloud SQL read replica instance name.",
9427	//       "location": "path",
9428	//       "required": true,
9429	//       "type": "string"
9430	//     },
9431	//     "project": {
9432	//       "description": "ID of the project that contains the read replica.",
9433	//       "location": "path",
9434	//       "required": true,
9435	//       "type": "string"
9436	//     }
9437	//   },
9438	//   "path": "v1/projects/{project}/instances/{instance}/startReplica",
9439	//   "response": {
9440	//     "$ref": "Operation"
9441	//   },
9442	//   "scopes": [
9443	//     "https://www.googleapis.com/auth/cloud-platform",
9444	//     "https://www.googleapis.com/auth/sqlservice.admin"
9445	//   ]
9446	// }
9447
9448}
9449
9450// method id "sql.instances.stopReplica":
9451
9452type InstancesStopReplicaCall struct {
9453	s          *Service
9454	project    string
9455	instance   string
9456	urlParams_ gensupport.URLParams
9457	ctx_       context.Context
9458	header_    http.Header
9459}
9460
9461// StopReplica: Stops the replication in the read replica instance.
9462//
9463// - instance: Cloud SQL read replica instance name.
9464// - project: ID of the project that contains the read replica.
9465func (r *InstancesService) StopReplica(project string, instance string) *InstancesStopReplicaCall {
9466	c := &InstancesStopReplicaCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9467	c.project = project
9468	c.instance = instance
9469	return c
9470}
9471
9472// Fields allows partial responses to be retrieved. See
9473// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9474// for more information.
9475func (c *InstancesStopReplicaCall) Fields(s ...googleapi.Field) *InstancesStopReplicaCall {
9476	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9477	return c
9478}
9479
9480// Context sets the context to be used in this call's Do method. Any
9481// pending HTTP request will be aborted if the provided context is
9482// canceled.
9483func (c *InstancesStopReplicaCall) Context(ctx context.Context) *InstancesStopReplicaCall {
9484	c.ctx_ = ctx
9485	return c
9486}
9487
9488// Header returns an http.Header that can be modified by the caller to
9489// add HTTP headers to the request.
9490func (c *InstancesStopReplicaCall) Header() http.Header {
9491	if c.header_ == nil {
9492		c.header_ = make(http.Header)
9493	}
9494	return c.header_
9495}
9496
9497func (c *InstancesStopReplicaCall) doRequest(alt string) (*http.Response, error) {
9498	reqHeaders := make(http.Header)
9499	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
9500	for k, v := range c.header_ {
9501		reqHeaders[k] = v
9502	}
9503	reqHeaders.Set("User-Agent", c.s.userAgent())
9504	var body io.Reader = nil
9505	c.urlParams_.Set("alt", alt)
9506	c.urlParams_.Set("prettyPrint", "false")
9507	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/stopReplica")
9508	urls += "?" + c.urlParams_.Encode()
9509	req, err := http.NewRequest("POST", urls, body)
9510	if err != nil {
9511		return nil, err
9512	}
9513	req.Header = reqHeaders
9514	googleapi.Expand(req.URL, map[string]string{
9515		"project":  c.project,
9516		"instance": c.instance,
9517	})
9518	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9519}
9520
9521// Do executes the "sql.instances.stopReplica" call.
9522// Exactly one of *Operation or error will be non-nil. Any non-2xx
9523// status code is an error. Response headers are in either
9524// *Operation.ServerResponse.Header or (if a response was returned at
9525// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9526// to check whether the returned error was because
9527// http.StatusNotModified was returned.
9528func (c *InstancesStopReplicaCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9529	gensupport.SetOptions(c.urlParams_, opts...)
9530	res, err := c.doRequest("json")
9531	if res != nil && res.StatusCode == http.StatusNotModified {
9532		if res.Body != nil {
9533			res.Body.Close()
9534		}
9535		return nil, &googleapi.Error{
9536			Code:   res.StatusCode,
9537			Header: res.Header,
9538		}
9539	}
9540	if err != nil {
9541		return nil, err
9542	}
9543	defer googleapi.CloseBody(res)
9544	if err := googleapi.CheckResponse(res); err != nil {
9545		return nil, err
9546	}
9547	ret := &Operation{
9548		ServerResponse: googleapi.ServerResponse{
9549			Header:         res.Header,
9550			HTTPStatusCode: res.StatusCode,
9551		},
9552	}
9553	target := &ret
9554	if err := gensupport.DecodeResponse(target, res); err != nil {
9555		return nil, err
9556	}
9557	return ret, nil
9558	// {
9559	//   "description": "Stops the replication in the read replica instance.",
9560	//   "flatPath": "v1/projects/{project}/instances/{instance}/stopReplica",
9561	//   "httpMethod": "POST",
9562	//   "id": "sql.instances.stopReplica",
9563	//   "parameterOrder": [
9564	//     "project",
9565	//     "instance"
9566	//   ],
9567	//   "parameters": {
9568	//     "instance": {
9569	//       "description": "Cloud SQL read replica instance name.",
9570	//       "location": "path",
9571	//       "required": true,
9572	//       "type": "string"
9573	//     },
9574	//     "project": {
9575	//       "description": "ID of the project that contains the read replica.",
9576	//       "location": "path",
9577	//       "required": true,
9578	//       "type": "string"
9579	//     }
9580	//   },
9581	//   "path": "v1/projects/{project}/instances/{instance}/stopReplica",
9582	//   "response": {
9583	//     "$ref": "Operation"
9584	//   },
9585	//   "scopes": [
9586	//     "https://www.googleapis.com/auth/cloud-platform",
9587	//     "https://www.googleapis.com/auth/sqlservice.admin"
9588	//   ]
9589	// }
9590
9591}
9592
9593// method id "sql.instances.truncateLog":
9594
9595type InstancesTruncateLogCall struct {
9596	s                           *Service
9597	project                     string
9598	instance                    string
9599	instancestruncatelogrequest *InstancesTruncateLogRequest
9600	urlParams_                  gensupport.URLParams
9601	ctx_                        context.Context
9602	header_                     http.Header
9603}
9604
9605// TruncateLog: Truncate MySQL general and slow query log tables MySQL
9606// only.
9607//
9608// - instance: Cloud SQL instance ID. This does not include the project
9609//   ID.
9610// - project: Project ID of the Cloud SQL project.
9611func (r *InstancesService) TruncateLog(project string, instance string, instancestruncatelogrequest *InstancesTruncateLogRequest) *InstancesTruncateLogCall {
9612	c := &InstancesTruncateLogCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9613	c.project = project
9614	c.instance = instance
9615	c.instancestruncatelogrequest = instancestruncatelogrequest
9616	return c
9617}
9618
9619// Fields allows partial responses to be retrieved. See
9620// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9621// for more information.
9622func (c *InstancesTruncateLogCall) Fields(s ...googleapi.Field) *InstancesTruncateLogCall {
9623	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9624	return c
9625}
9626
9627// Context sets the context to be used in this call's Do method. Any
9628// pending HTTP request will be aborted if the provided context is
9629// canceled.
9630func (c *InstancesTruncateLogCall) Context(ctx context.Context) *InstancesTruncateLogCall {
9631	c.ctx_ = ctx
9632	return c
9633}
9634
9635// Header returns an http.Header that can be modified by the caller to
9636// add HTTP headers to the request.
9637func (c *InstancesTruncateLogCall) Header() http.Header {
9638	if c.header_ == nil {
9639		c.header_ = make(http.Header)
9640	}
9641	return c.header_
9642}
9643
9644func (c *InstancesTruncateLogCall) doRequest(alt string) (*http.Response, error) {
9645	reqHeaders := make(http.Header)
9646	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
9647	for k, v := range c.header_ {
9648		reqHeaders[k] = v
9649	}
9650	reqHeaders.Set("User-Agent", c.s.userAgent())
9651	var body io.Reader = nil
9652	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancestruncatelogrequest)
9653	if err != nil {
9654		return nil, err
9655	}
9656	reqHeaders.Set("Content-Type", "application/json")
9657	c.urlParams_.Set("alt", alt)
9658	c.urlParams_.Set("prettyPrint", "false")
9659	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/truncateLog")
9660	urls += "?" + c.urlParams_.Encode()
9661	req, err := http.NewRequest("POST", urls, body)
9662	if err != nil {
9663		return nil, err
9664	}
9665	req.Header = reqHeaders
9666	googleapi.Expand(req.URL, map[string]string{
9667		"project":  c.project,
9668		"instance": c.instance,
9669	})
9670	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9671}
9672
9673// Do executes the "sql.instances.truncateLog" call.
9674// Exactly one of *Operation or error will be non-nil. Any non-2xx
9675// status code is an error. Response headers are in either
9676// *Operation.ServerResponse.Header or (if a response was returned at
9677// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9678// to check whether the returned error was because
9679// http.StatusNotModified was returned.
9680func (c *InstancesTruncateLogCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9681	gensupport.SetOptions(c.urlParams_, opts...)
9682	res, err := c.doRequest("json")
9683	if res != nil && res.StatusCode == http.StatusNotModified {
9684		if res.Body != nil {
9685			res.Body.Close()
9686		}
9687		return nil, &googleapi.Error{
9688			Code:   res.StatusCode,
9689			Header: res.Header,
9690		}
9691	}
9692	if err != nil {
9693		return nil, err
9694	}
9695	defer googleapi.CloseBody(res)
9696	if err := googleapi.CheckResponse(res); err != nil {
9697		return nil, err
9698	}
9699	ret := &Operation{
9700		ServerResponse: googleapi.ServerResponse{
9701			Header:         res.Header,
9702			HTTPStatusCode: res.StatusCode,
9703		},
9704	}
9705	target := &ret
9706	if err := gensupport.DecodeResponse(target, res); err != nil {
9707		return nil, err
9708	}
9709	return ret, nil
9710	// {
9711	//   "description": "Truncate MySQL general and slow query log tables MySQL only.",
9712	//   "flatPath": "v1/projects/{project}/instances/{instance}/truncateLog",
9713	//   "httpMethod": "POST",
9714	//   "id": "sql.instances.truncateLog",
9715	//   "parameterOrder": [
9716	//     "project",
9717	//     "instance"
9718	//   ],
9719	//   "parameters": {
9720	//     "instance": {
9721	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9722	//       "location": "path",
9723	//       "required": true,
9724	//       "type": "string"
9725	//     },
9726	//     "project": {
9727	//       "description": "Project ID of the Cloud SQL project.",
9728	//       "location": "path",
9729	//       "required": true,
9730	//       "type": "string"
9731	//     }
9732	//   },
9733	//   "path": "v1/projects/{project}/instances/{instance}/truncateLog",
9734	//   "request": {
9735	//     "$ref": "InstancesTruncateLogRequest"
9736	//   },
9737	//   "response": {
9738	//     "$ref": "Operation"
9739	//   },
9740	//   "scopes": [
9741	//     "https://www.googleapis.com/auth/cloud-platform",
9742	//     "https://www.googleapis.com/auth/sqlservice.admin"
9743	//   ]
9744	// }
9745
9746}
9747
9748// method id "sql.instances.update":
9749
9750type InstancesUpdateCall struct {
9751	s                *Service
9752	project          string
9753	instance         string
9754	databaseinstance *DatabaseInstance
9755	urlParams_       gensupport.URLParams
9756	ctx_             context.Context
9757	header_          http.Header
9758}
9759
9760// Update: Updates settings of a Cloud SQL instance. Using this
9761// operation might cause your instance to restart.
9762//
9763// - instance: Cloud SQL instance ID. This does not include the project
9764//   ID.
9765// - project: Project ID of the project that contains the instance.
9766func (r *InstancesService) Update(project string, instance string, databaseinstance *DatabaseInstance) *InstancesUpdateCall {
9767	c := &InstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9768	c.project = project
9769	c.instance = instance
9770	c.databaseinstance = databaseinstance
9771	return c
9772}
9773
9774// Fields allows partial responses to be retrieved. See
9775// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9776// for more information.
9777func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall {
9778	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9779	return c
9780}
9781
9782// Context sets the context to be used in this call's Do method. Any
9783// pending HTTP request will be aborted if the provided context is
9784// canceled.
9785func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall {
9786	c.ctx_ = ctx
9787	return c
9788}
9789
9790// Header returns an http.Header that can be modified by the caller to
9791// add HTTP headers to the request.
9792func (c *InstancesUpdateCall) Header() http.Header {
9793	if c.header_ == nil {
9794		c.header_ = make(http.Header)
9795	}
9796	return c.header_
9797}
9798
9799func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) {
9800	reqHeaders := make(http.Header)
9801	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
9802	for k, v := range c.header_ {
9803		reqHeaders[k] = v
9804	}
9805	reqHeaders.Set("User-Agent", c.s.userAgent())
9806	var body io.Reader = nil
9807	body, err := googleapi.WithoutDataWrapper.JSONReader(c.databaseinstance)
9808	if err != nil {
9809		return nil, err
9810	}
9811	reqHeaders.Set("Content-Type", "application/json")
9812	c.urlParams_.Set("alt", alt)
9813	c.urlParams_.Set("prettyPrint", "false")
9814	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}")
9815	urls += "?" + c.urlParams_.Encode()
9816	req, err := http.NewRequest("PUT", urls, body)
9817	if err != nil {
9818		return nil, err
9819	}
9820	req.Header = reqHeaders
9821	googleapi.Expand(req.URL, map[string]string{
9822		"project":  c.project,
9823		"instance": c.instance,
9824	})
9825	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9826}
9827
9828// Do executes the "sql.instances.update" call.
9829// Exactly one of *Operation or error will be non-nil. Any non-2xx
9830// status code is an error. Response headers are in either
9831// *Operation.ServerResponse.Header or (if a response was returned at
9832// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9833// to check whether the returned error was because
9834// http.StatusNotModified was returned.
9835func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9836	gensupport.SetOptions(c.urlParams_, opts...)
9837	res, err := c.doRequest("json")
9838	if res != nil && res.StatusCode == http.StatusNotModified {
9839		if res.Body != nil {
9840			res.Body.Close()
9841		}
9842		return nil, &googleapi.Error{
9843			Code:   res.StatusCode,
9844			Header: res.Header,
9845		}
9846	}
9847	if err != nil {
9848		return nil, err
9849	}
9850	defer googleapi.CloseBody(res)
9851	if err := googleapi.CheckResponse(res); err != nil {
9852		return nil, err
9853	}
9854	ret := &Operation{
9855		ServerResponse: googleapi.ServerResponse{
9856			Header:         res.Header,
9857			HTTPStatusCode: res.StatusCode,
9858		},
9859	}
9860	target := &ret
9861	if err := gensupport.DecodeResponse(target, res); err != nil {
9862		return nil, err
9863	}
9864	return ret, nil
9865	// {
9866	//   "description": "Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.",
9867	//   "flatPath": "v1/projects/{project}/instances/{instance}",
9868	//   "httpMethod": "PUT",
9869	//   "id": "sql.instances.update",
9870	//   "parameterOrder": [
9871	//     "project",
9872	//     "instance"
9873	//   ],
9874	//   "parameters": {
9875	//     "instance": {
9876	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
9877	//       "location": "path",
9878	//       "required": true,
9879	//       "type": "string"
9880	//     },
9881	//     "project": {
9882	//       "description": "Project ID of the project that contains the instance.",
9883	//       "location": "path",
9884	//       "required": true,
9885	//       "type": "string"
9886	//     }
9887	//   },
9888	//   "path": "v1/projects/{project}/instances/{instance}",
9889	//   "request": {
9890	//     "$ref": "DatabaseInstance"
9891	//   },
9892	//   "response": {
9893	//     "$ref": "Operation"
9894	//   },
9895	//   "scopes": [
9896	//     "https://www.googleapis.com/auth/cloud-platform",
9897	//     "https://www.googleapis.com/auth/sqlservice.admin"
9898	//   ]
9899	// }
9900
9901}
9902
9903// method id "sql.operations.get":
9904
9905type OperationsGetCall struct {
9906	s            *Service
9907	project      string
9908	operation    string
9909	urlParams_   gensupport.URLParams
9910	ifNoneMatch_ string
9911	ctx_         context.Context
9912	header_      http.Header
9913}
9914
9915// Get: Retrieves an instance operation that has been performed on an
9916// instance.
9917//
9918// - operation: Instance operation ID.
9919// - project: Project ID of the project that contains the instance.
9920func (r *OperationsService) Get(project string, operation string) *OperationsGetCall {
9921	c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9922	c.project = project
9923	c.operation = operation
9924	return c
9925}
9926
9927// Fields allows partial responses to be retrieved. See
9928// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9929// for more information.
9930func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
9931	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9932	return c
9933}
9934
9935// IfNoneMatch sets the optional parameter which makes the operation
9936// fail if the object's ETag matches the given value. This is useful for
9937// getting updates only after the object has changed since the last
9938// request. Use googleapi.IsNotModified to check whether the response
9939// error from Do is the result of In-None-Match.
9940func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
9941	c.ifNoneMatch_ = entityTag
9942	return c
9943}
9944
9945// Context sets the context to be used in this call's Do method. Any
9946// pending HTTP request will be aborted if the provided context is
9947// canceled.
9948func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
9949	c.ctx_ = ctx
9950	return c
9951}
9952
9953// Header returns an http.Header that can be modified by the caller to
9954// add HTTP headers to the request.
9955func (c *OperationsGetCall) Header() http.Header {
9956	if c.header_ == nil {
9957		c.header_ = make(http.Header)
9958	}
9959	return c.header_
9960}
9961
9962func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
9963	reqHeaders := make(http.Header)
9964	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
9965	for k, v := range c.header_ {
9966		reqHeaders[k] = v
9967	}
9968	reqHeaders.Set("User-Agent", c.s.userAgent())
9969	if c.ifNoneMatch_ != "" {
9970		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9971	}
9972	var body io.Reader = nil
9973	c.urlParams_.Set("alt", alt)
9974	c.urlParams_.Set("prettyPrint", "false")
9975	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/operations/{operation}")
9976	urls += "?" + c.urlParams_.Encode()
9977	req, err := http.NewRequest("GET", urls, body)
9978	if err != nil {
9979		return nil, err
9980	}
9981	req.Header = reqHeaders
9982	googleapi.Expand(req.URL, map[string]string{
9983		"project":   c.project,
9984		"operation": c.operation,
9985	})
9986	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9987}
9988
9989// Do executes the "sql.operations.get" call.
9990// Exactly one of *Operation or error will be non-nil. Any non-2xx
9991// status code is an error. Response headers are in either
9992// *Operation.ServerResponse.Header or (if a response was returned at
9993// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9994// to check whether the returned error was because
9995// http.StatusNotModified was returned.
9996func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9997	gensupport.SetOptions(c.urlParams_, opts...)
9998	res, err := c.doRequest("json")
9999	if res != nil && res.StatusCode == http.StatusNotModified {
10000		if res.Body != nil {
10001			res.Body.Close()
10002		}
10003		return nil, &googleapi.Error{
10004			Code:   res.StatusCode,
10005			Header: res.Header,
10006		}
10007	}
10008	if err != nil {
10009		return nil, err
10010	}
10011	defer googleapi.CloseBody(res)
10012	if err := googleapi.CheckResponse(res); err != nil {
10013		return nil, err
10014	}
10015	ret := &Operation{
10016		ServerResponse: googleapi.ServerResponse{
10017			Header:         res.Header,
10018			HTTPStatusCode: res.StatusCode,
10019		},
10020	}
10021	target := &ret
10022	if err := gensupport.DecodeResponse(target, res); err != nil {
10023		return nil, err
10024	}
10025	return ret, nil
10026	// {
10027	//   "description": "Retrieves an instance operation that has been performed on an instance.",
10028	//   "flatPath": "v1/projects/{project}/operations/{operation}",
10029	//   "httpMethod": "GET",
10030	//   "id": "sql.operations.get",
10031	//   "parameterOrder": [
10032	//     "project",
10033	//     "operation"
10034	//   ],
10035	//   "parameters": {
10036	//     "operation": {
10037	//       "description": "Instance operation ID.",
10038	//       "location": "path",
10039	//       "required": true,
10040	//       "type": "string"
10041	//     },
10042	//     "project": {
10043	//       "description": "Project ID of the project that contains the instance.",
10044	//       "location": "path",
10045	//       "required": true,
10046	//       "type": "string"
10047	//     }
10048	//   },
10049	//   "path": "v1/projects/{project}/operations/{operation}",
10050	//   "response": {
10051	//     "$ref": "Operation"
10052	//   },
10053	//   "scopes": [
10054	//     "https://www.googleapis.com/auth/cloud-platform",
10055	//     "https://www.googleapis.com/auth/sqlservice.admin"
10056	//   ]
10057	// }
10058
10059}
10060
10061// method id "sql.operations.list":
10062
10063type OperationsListCall struct {
10064	s            *Service
10065	project      string
10066	urlParams_   gensupport.URLParams
10067	ifNoneMatch_ string
10068	ctx_         context.Context
10069	header_      http.Header
10070}
10071
10072// List: Lists all instance operations that have been performed on the
10073// given Cloud SQL instance in the reverse chronological order of the
10074// start time.
10075//
10076// - project: Project ID of the project that contains the instance.
10077func (r *OperationsService) List(project string) *OperationsListCall {
10078	c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10079	c.project = project
10080	return c
10081}
10082
10083// Instance sets the optional parameter "instance": Cloud SQL instance
10084// ID. This does not include the project ID.
10085func (c *OperationsListCall) Instance(instance string) *OperationsListCall {
10086	c.urlParams_.Set("instance", instance)
10087	return c
10088}
10089
10090// MaxResults sets the optional parameter "maxResults": Maximum number
10091// of operations per response.
10092func (c *OperationsListCall) MaxResults(maxResults int64) *OperationsListCall {
10093	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
10094	return c
10095}
10096
10097// PageToken sets the optional parameter "pageToken": A
10098// previously-returned page token representing part of the larger set of
10099// results to view.
10100func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
10101	c.urlParams_.Set("pageToken", pageToken)
10102	return c
10103}
10104
10105// Fields allows partial responses to be retrieved. See
10106// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10107// for more information.
10108func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
10109	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10110	return c
10111}
10112
10113// IfNoneMatch sets the optional parameter which makes the operation
10114// fail if the object's ETag matches the given value. This is useful for
10115// getting updates only after the object has changed since the last
10116// request. Use googleapi.IsNotModified to check whether the response
10117// error from Do is the result of In-None-Match.
10118func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
10119	c.ifNoneMatch_ = entityTag
10120	return c
10121}
10122
10123// Context sets the context to be used in this call's Do method. Any
10124// pending HTTP request will be aborted if the provided context is
10125// canceled.
10126func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
10127	c.ctx_ = ctx
10128	return c
10129}
10130
10131// Header returns an http.Header that can be modified by the caller to
10132// add HTTP headers to the request.
10133func (c *OperationsListCall) Header() http.Header {
10134	if c.header_ == nil {
10135		c.header_ = make(http.Header)
10136	}
10137	return c.header_
10138}
10139
10140func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
10141	reqHeaders := make(http.Header)
10142	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
10143	for k, v := range c.header_ {
10144		reqHeaders[k] = v
10145	}
10146	reqHeaders.Set("User-Agent", c.s.userAgent())
10147	if c.ifNoneMatch_ != "" {
10148		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10149	}
10150	var body io.Reader = nil
10151	c.urlParams_.Set("alt", alt)
10152	c.urlParams_.Set("prettyPrint", "false")
10153	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/operations")
10154	urls += "?" + c.urlParams_.Encode()
10155	req, err := http.NewRequest("GET", urls, body)
10156	if err != nil {
10157		return nil, err
10158	}
10159	req.Header = reqHeaders
10160	googleapi.Expand(req.URL, map[string]string{
10161		"project": c.project,
10162	})
10163	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10164}
10165
10166// Do executes the "sql.operations.list" call.
10167// Exactly one of *OperationsListResponse or error will be non-nil. Any
10168// non-2xx status code is an error. Response headers are in either
10169// *OperationsListResponse.ServerResponse.Header or (if a response was
10170// returned at all) in error.(*googleapi.Error).Header. Use
10171// googleapi.IsNotModified to check whether the returned error was
10172// because http.StatusNotModified was returned.
10173func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*OperationsListResponse, error) {
10174	gensupport.SetOptions(c.urlParams_, opts...)
10175	res, err := c.doRequest("json")
10176	if res != nil && res.StatusCode == http.StatusNotModified {
10177		if res.Body != nil {
10178			res.Body.Close()
10179		}
10180		return nil, &googleapi.Error{
10181			Code:   res.StatusCode,
10182			Header: res.Header,
10183		}
10184	}
10185	if err != nil {
10186		return nil, err
10187	}
10188	defer googleapi.CloseBody(res)
10189	if err := googleapi.CheckResponse(res); err != nil {
10190		return nil, err
10191	}
10192	ret := &OperationsListResponse{
10193		ServerResponse: googleapi.ServerResponse{
10194			Header:         res.Header,
10195			HTTPStatusCode: res.StatusCode,
10196		},
10197	}
10198	target := &ret
10199	if err := gensupport.DecodeResponse(target, res); err != nil {
10200		return nil, err
10201	}
10202	return ret, nil
10203	// {
10204	//   "description": "Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.",
10205	//   "flatPath": "v1/projects/{project}/operations",
10206	//   "httpMethod": "GET",
10207	//   "id": "sql.operations.list",
10208	//   "parameterOrder": [
10209	//     "project"
10210	//   ],
10211	//   "parameters": {
10212	//     "instance": {
10213	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10214	//       "location": "query",
10215	//       "type": "string"
10216	//     },
10217	//     "maxResults": {
10218	//       "description": "Maximum number of operations per response.",
10219	//       "format": "uint32",
10220	//       "location": "query",
10221	//       "type": "integer"
10222	//     },
10223	//     "pageToken": {
10224	//       "description": "A previously-returned page token representing part of the larger set of results to view.",
10225	//       "location": "query",
10226	//       "type": "string"
10227	//     },
10228	//     "project": {
10229	//       "description": "Project ID of the project that contains the instance.",
10230	//       "location": "path",
10231	//       "required": true,
10232	//       "type": "string"
10233	//     }
10234	//   },
10235	//   "path": "v1/projects/{project}/operations",
10236	//   "response": {
10237	//     "$ref": "OperationsListResponse"
10238	//   },
10239	//   "scopes": [
10240	//     "https://www.googleapis.com/auth/cloud-platform",
10241	//     "https://www.googleapis.com/auth/sqlservice.admin"
10242	//   ]
10243	// }
10244
10245}
10246
10247// Pages invokes f for each page of results.
10248// A non-nil error returned from f will halt the iteration.
10249// The provided context supersedes any context provided to the Context method.
10250func (c *OperationsListCall) Pages(ctx context.Context, f func(*OperationsListResponse) error) error {
10251	c.ctx_ = ctx
10252	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10253	for {
10254		x, err := c.Do()
10255		if err != nil {
10256			return err
10257		}
10258		if err := f(x); err != nil {
10259			return err
10260		}
10261		if x.NextPageToken == "" {
10262			return nil
10263		}
10264		c.PageToken(x.NextPageToken)
10265	}
10266}
10267
10268// method id "sql.projects.instances.rescheduleMaintenance":
10269
10270type ProjectsInstancesRescheduleMaintenanceCall struct {
10271	s                                            *Service
10272	project                                      string
10273	instance                                     string
10274	sqlinstancesreschedulemaintenancerequestbody *SqlInstancesRescheduleMaintenanceRequestBody
10275	urlParams_                                   gensupport.URLParams
10276	ctx_                                         context.Context
10277	header_                                      http.Header
10278}
10279
10280// RescheduleMaintenance: Reschedules the maintenance on the given
10281// instance.
10282//
10283// - instance: Cloud SQL instance ID. This does not include the project
10284//   ID.
10285// - project: ID of the project that contains the instance.
10286func (r *ProjectsInstancesService) RescheduleMaintenance(project string, instance string, sqlinstancesreschedulemaintenancerequestbody *SqlInstancesRescheduleMaintenanceRequestBody) *ProjectsInstancesRescheduleMaintenanceCall {
10287	c := &ProjectsInstancesRescheduleMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10288	c.project = project
10289	c.instance = instance
10290	c.sqlinstancesreschedulemaintenancerequestbody = sqlinstancesreschedulemaintenancerequestbody
10291	return c
10292}
10293
10294// Fields allows partial responses to be retrieved. See
10295// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10296// for more information.
10297func (c *ProjectsInstancesRescheduleMaintenanceCall) Fields(s ...googleapi.Field) *ProjectsInstancesRescheduleMaintenanceCall {
10298	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10299	return c
10300}
10301
10302// Context sets the context to be used in this call's Do method. Any
10303// pending HTTP request will be aborted if the provided context is
10304// canceled.
10305func (c *ProjectsInstancesRescheduleMaintenanceCall) Context(ctx context.Context) *ProjectsInstancesRescheduleMaintenanceCall {
10306	c.ctx_ = ctx
10307	return c
10308}
10309
10310// Header returns an http.Header that can be modified by the caller to
10311// add HTTP headers to the request.
10312func (c *ProjectsInstancesRescheduleMaintenanceCall) Header() http.Header {
10313	if c.header_ == nil {
10314		c.header_ = make(http.Header)
10315	}
10316	return c.header_
10317}
10318
10319func (c *ProjectsInstancesRescheduleMaintenanceCall) doRequest(alt string) (*http.Response, error) {
10320	reqHeaders := make(http.Header)
10321	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
10322	for k, v := range c.header_ {
10323		reqHeaders[k] = v
10324	}
10325	reqHeaders.Set("User-Agent", c.s.userAgent())
10326	var body io.Reader = nil
10327	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sqlinstancesreschedulemaintenancerequestbody)
10328	if err != nil {
10329		return nil, err
10330	}
10331	reqHeaders.Set("Content-Type", "application/json")
10332	c.urlParams_.Set("alt", alt)
10333	c.urlParams_.Set("prettyPrint", "false")
10334	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/rescheduleMaintenance")
10335	urls += "?" + c.urlParams_.Encode()
10336	req, err := http.NewRequest("POST", urls, body)
10337	if err != nil {
10338		return nil, err
10339	}
10340	req.Header = reqHeaders
10341	googleapi.Expand(req.URL, map[string]string{
10342		"project":  c.project,
10343		"instance": c.instance,
10344	})
10345	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10346}
10347
10348// Do executes the "sql.projects.instances.rescheduleMaintenance" call.
10349// Exactly one of *Operation or error will be non-nil. Any non-2xx
10350// status code is an error. Response headers are in either
10351// *Operation.ServerResponse.Header or (if a response was returned at
10352// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10353// to check whether the returned error was because
10354// http.StatusNotModified was returned.
10355func (c *ProjectsInstancesRescheduleMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10356	gensupport.SetOptions(c.urlParams_, opts...)
10357	res, err := c.doRequest("json")
10358	if res != nil && res.StatusCode == http.StatusNotModified {
10359		if res.Body != nil {
10360			res.Body.Close()
10361		}
10362		return nil, &googleapi.Error{
10363			Code:   res.StatusCode,
10364			Header: res.Header,
10365		}
10366	}
10367	if err != nil {
10368		return nil, err
10369	}
10370	defer googleapi.CloseBody(res)
10371	if err := googleapi.CheckResponse(res); err != nil {
10372		return nil, err
10373	}
10374	ret := &Operation{
10375		ServerResponse: googleapi.ServerResponse{
10376			Header:         res.Header,
10377			HTTPStatusCode: res.StatusCode,
10378		},
10379	}
10380	target := &ret
10381	if err := gensupport.DecodeResponse(target, res); err != nil {
10382		return nil, err
10383	}
10384	return ret, nil
10385	// {
10386	//   "description": "Reschedules the maintenance on the given instance.",
10387	//   "flatPath": "v1/projects/{project}/instances/{instance}/rescheduleMaintenance",
10388	//   "httpMethod": "POST",
10389	//   "id": "sql.projects.instances.rescheduleMaintenance",
10390	//   "parameterOrder": [
10391	//     "project",
10392	//     "instance"
10393	//   ],
10394	//   "parameters": {
10395	//     "instance": {
10396	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10397	//       "location": "path",
10398	//       "required": true,
10399	//       "type": "string"
10400	//     },
10401	//     "project": {
10402	//       "description": "ID of the project that contains the instance.",
10403	//       "location": "path",
10404	//       "required": true,
10405	//       "type": "string"
10406	//     }
10407	//   },
10408	//   "path": "v1/projects/{project}/instances/{instance}/rescheduleMaintenance",
10409	//   "request": {
10410	//     "$ref": "SqlInstancesRescheduleMaintenanceRequestBody"
10411	//   },
10412	//   "response": {
10413	//     "$ref": "Operation"
10414	//   },
10415	//   "scopes": [
10416	//     "https://www.googleapis.com/auth/cloud-platform",
10417	//     "https://www.googleapis.com/auth/sqlservice.admin"
10418	//   ]
10419	// }
10420
10421}
10422
10423// method id "sql.projects.instances.startExternalSync":
10424
10425type ProjectsInstancesStartExternalSyncCall struct {
10426	s                                    *Service
10427	project                              string
10428	instance                             string
10429	sqlinstancesstartexternalsyncrequest *SqlInstancesStartExternalSyncRequest
10430	urlParams_                           gensupport.URLParams
10431	ctx_                                 context.Context
10432	header_                              http.Header
10433}
10434
10435// StartExternalSync: Start External primary instance migration.
10436//
10437// - instance: Cloud SQL instance ID. This does not include the project
10438//   ID.
10439// - project: ID of the project that contains the instance.
10440func (r *ProjectsInstancesService) StartExternalSync(project string, instance string, sqlinstancesstartexternalsyncrequest *SqlInstancesStartExternalSyncRequest) *ProjectsInstancesStartExternalSyncCall {
10441	c := &ProjectsInstancesStartExternalSyncCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10442	c.project = project
10443	c.instance = instance
10444	c.sqlinstancesstartexternalsyncrequest = sqlinstancesstartexternalsyncrequest
10445	return c
10446}
10447
10448// Fields allows partial responses to be retrieved. See
10449// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10450// for more information.
10451func (c *ProjectsInstancesStartExternalSyncCall) Fields(s ...googleapi.Field) *ProjectsInstancesStartExternalSyncCall {
10452	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10453	return c
10454}
10455
10456// Context sets the context to be used in this call's Do method. Any
10457// pending HTTP request will be aborted if the provided context is
10458// canceled.
10459func (c *ProjectsInstancesStartExternalSyncCall) Context(ctx context.Context) *ProjectsInstancesStartExternalSyncCall {
10460	c.ctx_ = ctx
10461	return c
10462}
10463
10464// Header returns an http.Header that can be modified by the caller to
10465// add HTTP headers to the request.
10466func (c *ProjectsInstancesStartExternalSyncCall) Header() http.Header {
10467	if c.header_ == nil {
10468		c.header_ = make(http.Header)
10469	}
10470	return c.header_
10471}
10472
10473func (c *ProjectsInstancesStartExternalSyncCall) doRequest(alt string) (*http.Response, error) {
10474	reqHeaders := make(http.Header)
10475	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
10476	for k, v := range c.header_ {
10477		reqHeaders[k] = v
10478	}
10479	reqHeaders.Set("User-Agent", c.s.userAgent())
10480	var body io.Reader = nil
10481	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sqlinstancesstartexternalsyncrequest)
10482	if err != nil {
10483		return nil, err
10484	}
10485	reqHeaders.Set("Content-Type", "application/json")
10486	c.urlParams_.Set("alt", alt)
10487	c.urlParams_.Set("prettyPrint", "false")
10488	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/startExternalSync")
10489	urls += "?" + c.urlParams_.Encode()
10490	req, err := http.NewRequest("POST", urls, body)
10491	if err != nil {
10492		return nil, err
10493	}
10494	req.Header = reqHeaders
10495	googleapi.Expand(req.URL, map[string]string{
10496		"project":  c.project,
10497		"instance": c.instance,
10498	})
10499	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10500}
10501
10502// Do executes the "sql.projects.instances.startExternalSync" call.
10503// Exactly one of *Operation or error will be non-nil. Any non-2xx
10504// status code is an error. Response headers are in either
10505// *Operation.ServerResponse.Header or (if a response was returned at
10506// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10507// to check whether the returned error was because
10508// http.StatusNotModified was returned.
10509func (c *ProjectsInstancesStartExternalSyncCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10510	gensupport.SetOptions(c.urlParams_, opts...)
10511	res, err := c.doRequest("json")
10512	if res != nil && res.StatusCode == http.StatusNotModified {
10513		if res.Body != nil {
10514			res.Body.Close()
10515		}
10516		return nil, &googleapi.Error{
10517			Code:   res.StatusCode,
10518			Header: res.Header,
10519		}
10520	}
10521	if err != nil {
10522		return nil, err
10523	}
10524	defer googleapi.CloseBody(res)
10525	if err := googleapi.CheckResponse(res); err != nil {
10526		return nil, err
10527	}
10528	ret := &Operation{
10529		ServerResponse: googleapi.ServerResponse{
10530			Header:         res.Header,
10531			HTTPStatusCode: res.StatusCode,
10532		},
10533	}
10534	target := &ret
10535	if err := gensupport.DecodeResponse(target, res); err != nil {
10536		return nil, err
10537	}
10538	return ret, nil
10539	// {
10540	//   "description": "Start External primary instance migration.",
10541	//   "flatPath": "v1/projects/{project}/instances/{instance}/startExternalSync",
10542	//   "httpMethod": "POST",
10543	//   "id": "sql.projects.instances.startExternalSync",
10544	//   "parameterOrder": [
10545	//     "project",
10546	//     "instance"
10547	//   ],
10548	//   "parameters": {
10549	//     "instance": {
10550	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10551	//       "location": "path",
10552	//       "required": true,
10553	//       "type": "string"
10554	//     },
10555	//     "project": {
10556	//       "description": "ID of the project that contains the instance.",
10557	//       "location": "path",
10558	//       "required": true,
10559	//       "type": "string"
10560	//     }
10561	//   },
10562	//   "path": "v1/projects/{project}/instances/{instance}/startExternalSync",
10563	//   "request": {
10564	//     "$ref": "SqlInstancesStartExternalSyncRequest"
10565	//   },
10566	//   "response": {
10567	//     "$ref": "Operation"
10568	//   },
10569	//   "scopes": [
10570	//     "https://www.googleapis.com/auth/cloud-platform",
10571	//     "https://www.googleapis.com/auth/sqlservice.admin"
10572	//   ]
10573	// }
10574
10575}
10576
10577// method id "sql.projects.instances.verifyExternalSyncSettings":
10578
10579type ProjectsInstancesVerifyExternalSyncSettingsCall struct {
10580	s                                             *Service
10581	project                                       string
10582	instance                                      string
10583	sqlinstancesverifyexternalsyncsettingsrequest *SqlInstancesVerifyExternalSyncSettingsRequest
10584	urlParams_                                    gensupport.URLParams
10585	ctx_                                          context.Context
10586	header_                                       http.Header
10587}
10588
10589// VerifyExternalSyncSettings: Verify External primary instance external
10590// sync settings.
10591//
10592// - instance: Cloud SQL instance ID. This does not include the project
10593//   ID.
10594// - project: Project ID of the project that contains the instance.
10595func (r *ProjectsInstancesService) VerifyExternalSyncSettings(project string, instance string, sqlinstancesverifyexternalsyncsettingsrequest *SqlInstancesVerifyExternalSyncSettingsRequest) *ProjectsInstancesVerifyExternalSyncSettingsCall {
10596	c := &ProjectsInstancesVerifyExternalSyncSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10597	c.project = project
10598	c.instance = instance
10599	c.sqlinstancesverifyexternalsyncsettingsrequest = sqlinstancesverifyexternalsyncsettingsrequest
10600	return c
10601}
10602
10603// Fields allows partial responses to be retrieved. See
10604// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10605// for more information.
10606func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Fields(s ...googleapi.Field) *ProjectsInstancesVerifyExternalSyncSettingsCall {
10607	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10608	return c
10609}
10610
10611// Context sets the context to be used in this call's Do method. Any
10612// pending HTTP request will be aborted if the provided context is
10613// canceled.
10614func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Context(ctx context.Context) *ProjectsInstancesVerifyExternalSyncSettingsCall {
10615	c.ctx_ = ctx
10616	return c
10617}
10618
10619// Header returns an http.Header that can be modified by the caller to
10620// add HTTP headers to the request.
10621func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Header() http.Header {
10622	if c.header_ == nil {
10623		c.header_ = make(http.Header)
10624	}
10625	return c.header_
10626}
10627
10628func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) doRequest(alt string) (*http.Response, error) {
10629	reqHeaders := make(http.Header)
10630	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
10631	for k, v := range c.header_ {
10632		reqHeaders[k] = v
10633	}
10634	reqHeaders.Set("User-Agent", c.s.userAgent())
10635	var body io.Reader = nil
10636	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sqlinstancesverifyexternalsyncsettingsrequest)
10637	if err != nil {
10638		return nil, err
10639	}
10640	reqHeaders.Set("Content-Type", "application/json")
10641	c.urlParams_.Set("alt", alt)
10642	c.urlParams_.Set("prettyPrint", "false")
10643	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings")
10644	urls += "?" + c.urlParams_.Encode()
10645	req, err := http.NewRequest("POST", urls, body)
10646	if err != nil {
10647		return nil, err
10648	}
10649	req.Header = reqHeaders
10650	googleapi.Expand(req.URL, map[string]string{
10651		"project":  c.project,
10652		"instance": c.instance,
10653	})
10654	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10655}
10656
10657// Do executes the "sql.projects.instances.verifyExternalSyncSettings" call.
10658// Exactly one of *SqlInstancesVerifyExternalSyncSettingsResponse or
10659// error will be non-nil. Any non-2xx status code is an error. Response
10660// headers are in either
10661// *SqlInstancesVerifyExternalSyncSettingsResponse.ServerResponse.Header
10662// or (if a response was returned at all) in
10663// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10664// whether the returned error was because http.StatusNotModified was
10665// returned.
10666func (c *ProjectsInstancesVerifyExternalSyncSettingsCall) Do(opts ...googleapi.CallOption) (*SqlInstancesVerifyExternalSyncSettingsResponse, error) {
10667	gensupport.SetOptions(c.urlParams_, opts...)
10668	res, err := c.doRequest("json")
10669	if res != nil && res.StatusCode == http.StatusNotModified {
10670		if res.Body != nil {
10671			res.Body.Close()
10672		}
10673		return nil, &googleapi.Error{
10674			Code:   res.StatusCode,
10675			Header: res.Header,
10676		}
10677	}
10678	if err != nil {
10679		return nil, err
10680	}
10681	defer googleapi.CloseBody(res)
10682	if err := googleapi.CheckResponse(res); err != nil {
10683		return nil, err
10684	}
10685	ret := &SqlInstancesVerifyExternalSyncSettingsResponse{
10686		ServerResponse: googleapi.ServerResponse{
10687			Header:         res.Header,
10688			HTTPStatusCode: res.StatusCode,
10689		},
10690	}
10691	target := &ret
10692	if err := gensupport.DecodeResponse(target, res); err != nil {
10693		return nil, err
10694	}
10695	return ret, nil
10696	// {
10697	//   "description": "Verify External primary instance external sync settings.",
10698	//   "flatPath": "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings",
10699	//   "httpMethod": "POST",
10700	//   "id": "sql.projects.instances.verifyExternalSyncSettings",
10701	//   "parameterOrder": [
10702	//     "project",
10703	//     "instance"
10704	//   ],
10705	//   "parameters": {
10706	//     "instance": {
10707	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10708	//       "location": "path",
10709	//       "required": true,
10710	//       "type": "string"
10711	//     },
10712	//     "project": {
10713	//       "description": "Project ID of the project that contains the instance.",
10714	//       "location": "path",
10715	//       "required": true,
10716	//       "type": "string"
10717	//     }
10718	//   },
10719	//   "path": "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings",
10720	//   "request": {
10721	//     "$ref": "SqlInstancesVerifyExternalSyncSettingsRequest"
10722	//   },
10723	//   "response": {
10724	//     "$ref": "SqlInstancesVerifyExternalSyncSettingsResponse"
10725	//   },
10726	//   "scopes": [
10727	//     "https://www.googleapis.com/auth/cloud-platform",
10728	//     "https://www.googleapis.com/auth/sqlservice.admin"
10729	//   ]
10730	// }
10731
10732}
10733
10734// method id "sql.sslCerts.createEphemeral":
10735
10736type SslCertsCreateEphemeralCall struct {
10737	s                              *Service
10738	project                        string
10739	instance                       string
10740	sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest
10741	urlParams_                     gensupport.URLParams
10742	ctx_                           context.Context
10743	header_                        http.Header
10744}
10745
10746// CreateEphemeral: Generates a short-lived X509 certificate containing
10747// the provided public key and signed by a private key specific to the
10748// target instance. Users may use the certificate to authenticate as
10749// themselves when connecting to the database.
10750//
10751// - instance: Cloud SQL instance ID. This does not include the project
10752//   ID.
10753// - project: Project ID of the Cloud SQL project.
10754func (r *SslCertsService) CreateEphemeral(project string, instance string, sslcertscreateephemeralrequest *SslCertsCreateEphemeralRequest) *SslCertsCreateEphemeralCall {
10755	c := &SslCertsCreateEphemeralCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10756	c.project = project
10757	c.instance = instance
10758	c.sslcertscreateephemeralrequest = sslcertscreateephemeralrequest
10759	return c
10760}
10761
10762// Fields allows partial responses to be retrieved. See
10763// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10764// for more information.
10765func (c *SslCertsCreateEphemeralCall) Fields(s ...googleapi.Field) *SslCertsCreateEphemeralCall {
10766	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10767	return c
10768}
10769
10770// Context sets the context to be used in this call's Do method. Any
10771// pending HTTP request will be aborted if the provided context is
10772// canceled.
10773func (c *SslCertsCreateEphemeralCall) Context(ctx context.Context) *SslCertsCreateEphemeralCall {
10774	c.ctx_ = ctx
10775	return c
10776}
10777
10778// Header returns an http.Header that can be modified by the caller to
10779// add HTTP headers to the request.
10780func (c *SslCertsCreateEphemeralCall) Header() http.Header {
10781	if c.header_ == nil {
10782		c.header_ = make(http.Header)
10783	}
10784	return c.header_
10785}
10786
10787func (c *SslCertsCreateEphemeralCall) doRequest(alt string) (*http.Response, error) {
10788	reqHeaders := make(http.Header)
10789	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
10790	for k, v := range c.header_ {
10791		reqHeaders[k] = v
10792	}
10793	reqHeaders.Set("User-Agent", c.s.userAgent())
10794	var body io.Reader = nil
10795	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertscreateephemeralrequest)
10796	if err != nil {
10797		return nil, err
10798	}
10799	reqHeaders.Set("Content-Type", "application/json")
10800	c.urlParams_.Set("alt", alt)
10801	c.urlParams_.Set("prettyPrint", "false")
10802	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/createEphemeral")
10803	urls += "?" + c.urlParams_.Encode()
10804	req, err := http.NewRequest("POST", urls, body)
10805	if err != nil {
10806		return nil, err
10807	}
10808	req.Header = reqHeaders
10809	googleapi.Expand(req.URL, map[string]string{
10810		"project":  c.project,
10811		"instance": c.instance,
10812	})
10813	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10814}
10815
10816// Do executes the "sql.sslCerts.createEphemeral" call.
10817// Exactly one of *SslCert or error will be non-nil. Any non-2xx status
10818// code is an error. Response headers are in either
10819// *SslCert.ServerResponse.Header or (if a response was returned at all)
10820// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10821// check whether the returned error was because http.StatusNotModified
10822// was returned.
10823func (c *SslCertsCreateEphemeralCall) Do(opts ...googleapi.CallOption) (*SslCert, error) {
10824	gensupport.SetOptions(c.urlParams_, opts...)
10825	res, err := c.doRequest("json")
10826	if res != nil && res.StatusCode == http.StatusNotModified {
10827		if res.Body != nil {
10828			res.Body.Close()
10829		}
10830		return nil, &googleapi.Error{
10831			Code:   res.StatusCode,
10832			Header: res.Header,
10833		}
10834	}
10835	if err != nil {
10836		return nil, err
10837	}
10838	defer googleapi.CloseBody(res)
10839	if err := googleapi.CheckResponse(res); err != nil {
10840		return nil, err
10841	}
10842	ret := &SslCert{
10843		ServerResponse: googleapi.ServerResponse{
10844			Header:         res.Header,
10845			HTTPStatusCode: res.StatusCode,
10846		},
10847	}
10848	target := &ret
10849	if err := gensupport.DecodeResponse(target, res); err != nil {
10850		return nil, err
10851	}
10852	return ret, nil
10853	// {
10854	//   "description": "Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.",
10855	//   "flatPath": "v1/projects/{project}/instances/{instance}/createEphemeral",
10856	//   "httpMethod": "POST",
10857	//   "id": "sql.sslCerts.createEphemeral",
10858	//   "parameterOrder": [
10859	//     "project",
10860	//     "instance"
10861	//   ],
10862	//   "parameters": {
10863	//     "instance": {
10864	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
10865	//       "location": "path",
10866	//       "required": true,
10867	//       "type": "string"
10868	//     },
10869	//     "project": {
10870	//       "description": "Project ID of the Cloud SQL project.",
10871	//       "location": "path",
10872	//       "required": true,
10873	//       "type": "string"
10874	//     }
10875	//   },
10876	//   "path": "v1/projects/{project}/instances/{instance}/createEphemeral",
10877	//   "request": {
10878	//     "$ref": "SslCertsCreateEphemeralRequest"
10879	//   },
10880	//   "response": {
10881	//     "$ref": "SslCert"
10882	//   },
10883	//   "scopes": [
10884	//     "https://www.googleapis.com/auth/cloud-platform",
10885	//     "https://www.googleapis.com/auth/sqlservice.admin"
10886	//   ]
10887	// }
10888
10889}
10890
10891// method id "sql.sslCerts.delete":
10892
10893type SslCertsDeleteCall struct {
10894	s               *Service
10895	project         string
10896	instance        string
10897	sha1Fingerprint string
10898	urlParams_      gensupport.URLParams
10899	ctx_            context.Context
10900	header_         http.Header
10901}
10902
10903// Delete: Deletes the SSL certificate. For First Generation instances,
10904// the certificate remains valid until the instance is restarted.
10905//
10906// - instance: Cloud SQL instance ID. This does not include the project
10907//   ID.
10908// - project: Project ID of the project that contains the instance.
10909// - sha1Fingerprint: Sha1 FingerPrint.
10910func (r *SslCertsService) Delete(project string, instance string, sha1Fingerprint string) *SslCertsDeleteCall {
10911	c := &SslCertsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10912	c.project = project
10913	c.instance = instance
10914	c.sha1Fingerprint = sha1Fingerprint
10915	return c
10916}
10917
10918// Fields allows partial responses to be retrieved. See
10919// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10920// for more information.
10921func (c *SslCertsDeleteCall) Fields(s ...googleapi.Field) *SslCertsDeleteCall {
10922	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10923	return c
10924}
10925
10926// Context sets the context to be used in this call's Do method. Any
10927// pending HTTP request will be aborted if the provided context is
10928// canceled.
10929func (c *SslCertsDeleteCall) Context(ctx context.Context) *SslCertsDeleteCall {
10930	c.ctx_ = ctx
10931	return c
10932}
10933
10934// Header returns an http.Header that can be modified by the caller to
10935// add HTTP headers to the request.
10936func (c *SslCertsDeleteCall) Header() http.Header {
10937	if c.header_ == nil {
10938		c.header_ = make(http.Header)
10939	}
10940	return c.header_
10941}
10942
10943func (c *SslCertsDeleteCall) doRequest(alt string) (*http.Response, error) {
10944	reqHeaders := make(http.Header)
10945	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
10946	for k, v := range c.header_ {
10947		reqHeaders[k] = v
10948	}
10949	reqHeaders.Set("User-Agent", c.s.userAgent())
10950	var body io.Reader = nil
10951	c.urlParams_.Set("alt", alt)
10952	c.urlParams_.Set("prettyPrint", "false")
10953	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}")
10954	urls += "?" + c.urlParams_.Encode()
10955	req, err := http.NewRequest("DELETE", urls, body)
10956	if err != nil {
10957		return nil, err
10958	}
10959	req.Header = reqHeaders
10960	googleapi.Expand(req.URL, map[string]string{
10961		"project":         c.project,
10962		"instance":        c.instance,
10963		"sha1Fingerprint": c.sha1Fingerprint,
10964	})
10965	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10966}
10967
10968// Do executes the "sql.sslCerts.delete" call.
10969// Exactly one of *Operation or error will be non-nil. Any non-2xx
10970// status code is an error. Response headers are in either
10971// *Operation.ServerResponse.Header or (if a response was returned at
10972// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10973// to check whether the returned error was because
10974// http.StatusNotModified was returned.
10975func (c *SslCertsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10976	gensupport.SetOptions(c.urlParams_, opts...)
10977	res, err := c.doRequest("json")
10978	if res != nil && res.StatusCode == http.StatusNotModified {
10979		if res.Body != nil {
10980			res.Body.Close()
10981		}
10982		return nil, &googleapi.Error{
10983			Code:   res.StatusCode,
10984			Header: res.Header,
10985		}
10986	}
10987	if err != nil {
10988		return nil, err
10989	}
10990	defer googleapi.CloseBody(res)
10991	if err := googleapi.CheckResponse(res); err != nil {
10992		return nil, err
10993	}
10994	ret := &Operation{
10995		ServerResponse: googleapi.ServerResponse{
10996			Header:         res.Header,
10997			HTTPStatusCode: res.StatusCode,
10998		},
10999	}
11000	target := &ret
11001	if err := gensupport.DecodeResponse(target, res); err != nil {
11002		return nil, err
11003	}
11004	return ret, nil
11005	// {
11006	//   "description": "Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.",
11007	//   "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}",
11008	//   "httpMethod": "DELETE",
11009	//   "id": "sql.sslCerts.delete",
11010	//   "parameterOrder": [
11011	//     "project",
11012	//     "instance",
11013	//     "sha1Fingerprint"
11014	//   ],
11015	//   "parameters": {
11016	//     "instance": {
11017	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
11018	//       "location": "path",
11019	//       "required": true,
11020	//       "type": "string"
11021	//     },
11022	//     "project": {
11023	//       "description": "Project ID of the project that contains the instance.",
11024	//       "location": "path",
11025	//       "required": true,
11026	//       "type": "string"
11027	//     },
11028	//     "sha1Fingerprint": {
11029	//       "description": "Sha1 FingerPrint.",
11030	//       "location": "path",
11031	//       "required": true,
11032	//       "type": "string"
11033	//     }
11034	//   },
11035	//   "path": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}",
11036	//   "response": {
11037	//     "$ref": "Operation"
11038	//   },
11039	//   "scopes": [
11040	//     "https://www.googleapis.com/auth/cloud-platform",
11041	//     "https://www.googleapis.com/auth/sqlservice.admin"
11042	//   ]
11043	// }
11044
11045}
11046
11047// method id "sql.sslCerts.get":
11048
11049type SslCertsGetCall struct {
11050	s               *Service
11051	project         string
11052	instance        string
11053	sha1Fingerprint string
11054	urlParams_      gensupport.URLParams
11055	ifNoneMatch_    string
11056	ctx_            context.Context
11057	header_         http.Header
11058}
11059
11060// Get: Retrieves a particular SSL certificate. Does not include the
11061// private key (required for usage). The private key must be saved from
11062// the response to initial creation.
11063//
11064// - instance: Cloud SQL instance ID. This does not include the project
11065//   ID.
11066// - project: Project ID of the project that contains the instance.
11067// - sha1Fingerprint: Sha1 FingerPrint.
11068func (r *SslCertsService) Get(project string, instance string, sha1Fingerprint string) *SslCertsGetCall {
11069	c := &SslCertsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11070	c.project = project
11071	c.instance = instance
11072	c.sha1Fingerprint = sha1Fingerprint
11073	return c
11074}
11075
11076// Fields allows partial responses to be retrieved. See
11077// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11078// for more information.
11079func (c *SslCertsGetCall) Fields(s ...googleapi.Field) *SslCertsGetCall {
11080	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11081	return c
11082}
11083
11084// IfNoneMatch sets the optional parameter which makes the operation
11085// fail if the object's ETag matches the given value. This is useful for
11086// getting updates only after the object has changed since the last
11087// request. Use googleapi.IsNotModified to check whether the response
11088// error from Do is the result of In-None-Match.
11089func (c *SslCertsGetCall) IfNoneMatch(entityTag string) *SslCertsGetCall {
11090	c.ifNoneMatch_ = entityTag
11091	return c
11092}
11093
11094// Context sets the context to be used in this call's Do method. Any
11095// pending HTTP request will be aborted if the provided context is
11096// canceled.
11097func (c *SslCertsGetCall) Context(ctx context.Context) *SslCertsGetCall {
11098	c.ctx_ = ctx
11099	return c
11100}
11101
11102// Header returns an http.Header that can be modified by the caller to
11103// add HTTP headers to the request.
11104func (c *SslCertsGetCall) Header() http.Header {
11105	if c.header_ == nil {
11106		c.header_ = make(http.Header)
11107	}
11108	return c.header_
11109}
11110
11111func (c *SslCertsGetCall) doRequest(alt string) (*http.Response, error) {
11112	reqHeaders := make(http.Header)
11113	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
11114	for k, v := range c.header_ {
11115		reqHeaders[k] = v
11116	}
11117	reqHeaders.Set("User-Agent", c.s.userAgent())
11118	if c.ifNoneMatch_ != "" {
11119		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11120	}
11121	var body io.Reader = nil
11122	c.urlParams_.Set("alt", alt)
11123	c.urlParams_.Set("prettyPrint", "false")
11124	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}")
11125	urls += "?" + c.urlParams_.Encode()
11126	req, err := http.NewRequest("GET", urls, body)
11127	if err != nil {
11128		return nil, err
11129	}
11130	req.Header = reqHeaders
11131	googleapi.Expand(req.URL, map[string]string{
11132		"project":         c.project,
11133		"instance":        c.instance,
11134		"sha1Fingerprint": c.sha1Fingerprint,
11135	})
11136	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11137}
11138
11139// Do executes the "sql.sslCerts.get" call.
11140// Exactly one of *SslCert or error will be non-nil. Any non-2xx status
11141// code is an error. Response headers are in either
11142// *SslCert.ServerResponse.Header or (if a response was returned at all)
11143// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11144// check whether the returned error was because http.StatusNotModified
11145// was returned.
11146func (c *SslCertsGetCall) Do(opts ...googleapi.CallOption) (*SslCert, error) {
11147	gensupport.SetOptions(c.urlParams_, opts...)
11148	res, err := c.doRequest("json")
11149	if res != nil && res.StatusCode == http.StatusNotModified {
11150		if res.Body != nil {
11151			res.Body.Close()
11152		}
11153		return nil, &googleapi.Error{
11154			Code:   res.StatusCode,
11155			Header: res.Header,
11156		}
11157	}
11158	if err != nil {
11159		return nil, err
11160	}
11161	defer googleapi.CloseBody(res)
11162	if err := googleapi.CheckResponse(res); err != nil {
11163		return nil, err
11164	}
11165	ret := &SslCert{
11166		ServerResponse: googleapi.ServerResponse{
11167			Header:         res.Header,
11168			HTTPStatusCode: res.StatusCode,
11169		},
11170	}
11171	target := &ret
11172	if err := gensupport.DecodeResponse(target, res); err != nil {
11173		return nil, err
11174	}
11175	return ret, nil
11176	// {
11177	//   "description": "Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation.",
11178	//   "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}",
11179	//   "httpMethod": "GET",
11180	//   "id": "sql.sslCerts.get",
11181	//   "parameterOrder": [
11182	//     "project",
11183	//     "instance",
11184	//     "sha1Fingerprint"
11185	//   ],
11186	//   "parameters": {
11187	//     "instance": {
11188	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
11189	//       "location": "path",
11190	//       "required": true,
11191	//       "type": "string"
11192	//     },
11193	//     "project": {
11194	//       "description": "Project ID of the project that contains the instance.",
11195	//       "location": "path",
11196	//       "required": true,
11197	//       "type": "string"
11198	//     },
11199	//     "sha1Fingerprint": {
11200	//       "description": "Sha1 FingerPrint.",
11201	//       "location": "path",
11202	//       "required": true,
11203	//       "type": "string"
11204	//     }
11205	//   },
11206	//   "path": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}",
11207	//   "response": {
11208	//     "$ref": "SslCert"
11209	//   },
11210	//   "scopes": [
11211	//     "https://www.googleapis.com/auth/cloud-platform",
11212	//     "https://www.googleapis.com/auth/sqlservice.admin"
11213	//   ]
11214	// }
11215
11216}
11217
11218// method id "sql.sslCerts.insert":
11219
11220type SslCertsInsertCall struct {
11221	s                     *Service
11222	project               string
11223	instance              string
11224	sslcertsinsertrequest *SslCertsInsertRequest
11225	urlParams_            gensupport.URLParams
11226	ctx_                  context.Context
11227	header_               http.Header
11228}
11229
11230// Insert: Creates an SSL certificate and returns it along with the
11231// private key and server certificate authority. The new certificate
11232// will not be usable until the instance is restarted.
11233//
11234// - instance: Cloud SQL instance ID. This does not include the project
11235//   ID.
11236// - project: Project ID of the project that contains the instance.
11237func (r *SslCertsService) Insert(project string, instance string, sslcertsinsertrequest *SslCertsInsertRequest) *SslCertsInsertCall {
11238	c := &SslCertsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11239	c.project = project
11240	c.instance = instance
11241	c.sslcertsinsertrequest = sslcertsinsertrequest
11242	return c
11243}
11244
11245// Fields allows partial responses to be retrieved. See
11246// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11247// for more information.
11248func (c *SslCertsInsertCall) Fields(s ...googleapi.Field) *SslCertsInsertCall {
11249	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11250	return c
11251}
11252
11253// Context sets the context to be used in this call's Do method. Any
11254// pending HTTP request will be aborted if the provided context is
11255// canceled.
11256func (c *SslCertsInsertCall) Context(ctx context.Context) *SslCertsInsertCall {
11257	c.ctx_ = ctx
11258	return c
11259}
11260
11261// Header returns an http.Header that can be modified by the caller to
11262// add HTTP headers to the request.
11263func (c *SslCertsInsertCall) Header() http.Header {
11264	if c.header_ == nil {
11265		c.header_ = make(http.Header)
11266	}
11267	return c.header_
11268}
11269
11270func (c *SslCertsInsertCall) doRequest(alt string) (*http.Response, error) {
11271	reqHeaders := make(http.Header)
11272	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
11273	for k, v := range c.header_ {
11274		reqHeaders[k] = v
11275	}
11276	reqHeaders.Set("User-Agent", c.s.userAgent())
11277	var body io.Reader = nil
11278	body, err := googleapi.WithoutDataWrapper.JSONReader(c.sslcertsinsertrequest)
11279	if err != nil {
11280		return nil, err
11281	}
11282	reqHeaders.Set("Content-Type", "application/json")
11283	c.urlParams_.Set("alt", alt)
11284	c.urlParams_.Set("prettyPrint", "false")
11285	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts")
11286	urls += "?" + c.urlParams_.Encode()
11287	req, err := http.NewRequest("POST", urls, body)
11288	if err != nil {
11289		return nil, err
11290	}
11291	req.Header = reqHeaders
11292	googleapi.Expand(req.URL, map[string]string{
11293		"project":  c.project,
11294		"instance": c.instance,
11295	})
11296	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11297}
11298
11299// Do executes the "sql.sslCerts.insert" call.
11300// Exactly one of *SslCertsInsertResponse or error will be non-nil. Any
11301// non-2xx status code is an error. Response headers are in either
11302// *SslCertsInsertResponse.ServerResponse.Header or (if a response was
11303// returned at all) in error.(*googleapi.Error).Header. Use
11304// googleapi.IsNotModified to check whether the returned error was
11305// because http.StatusNotModified was returned.
11306func (c *SslCertsInsertCall) Do(opts ...googleapi.CallOption) (*SslCertsInsertResponse, error) {
11307	gensupport.SetOptions(c.urlParams_, opts...)
11308	res, err := c.doRequest("json")
11309	if res != nil && res.StatusCode == http.StatusNotModified {
11310		if res.Body != nil {
11311			res.Body.Close()
11312		}
11313		return nil, &googleapi.Error{
11314			Code:   res.StatusCode,
11315			Header: res.Header,
11316		}
11317	}
11318	if err != nil {
11319		return nil, err
11320	}
11321	defer googleapi.CloseBody(res)
11322	if err := googleapi.CheckResponse(res); err != nil {
11323		return nil, err
11324	}
11325	ret := &SslCertsInsertResponse{
11326		ServerResponse: googleapi.ServerResponse{
11327			Header:         res.Header,
11328			HTTPStatusCode: res.StatusCode,
11329		},
11330	}
11331	target := &ret
11332	if err := gensupport.DecodeResponse(target, res); err != nil {
11333		return nil, err
11334	}
11335	return ret, nil
11336	// {
11337	//   "description": "Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted.",
11338	//   "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts",
11339	//   "httpMethod": "POST",
11340	//   "id": "sql.sslCerts.insert",
11341	//   "parameterOrder": [
11342	//     "project",
11343	//     "instance"
11344	//   ],
11345	//   "parameters": {
11346	//     "instance": {
11347	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
11348	//       "location": "path",
11349	//       "required": true,
11350	//       "type": "string"
11351	//     },
11352	//     "project": {
11353	//       "description": "Project ID of the project that contains the instance.",
11354	//       "location": "path",
11355	//       "required": true,
11356	//       "type": "string"
11357	//     }
11358	//   },
11359	//   "path": "v1/projects/{project}/instances/{instance}/sslCerts",
11360	//   "request": {
11361	//     "$ref": "SslCertsInsertRequest"
11362	//   },
11363	//   "response": {
11364	//     "$ref": "SslCertsInsertResponse"
11365	//   },
11366	//   "scopes": [
11367	//     "https://www.googleapis.com/auth/cloud-platform",
11368	//     "https://www.googleapis.com/auth/sqlservice.admin"
11369	//   ]
11370	// }
11371
11372}
11373
11374// method id "sql.sslCerts.list":
11375
11376type SslCertsListCall struct {
11377	s            *Service
11378	project      string
11379	instance     string
11380	urlParams_   gensupport.URLParams
11381	ifNoneMatch_ string
11382	ctx_         context.Context
11383	header_      http.Header
11384}
11385
11386// List: Lists all of the current SSL certificates for the instance.
11387//
11388// - instance: Cloud SQL instance ID. This does not include the project
11389//   ID.
11390// - project: Project ID of the project that contains the instance.
11391func (r *SslCertsService) List(project string, instance string) *SslCertsListCall {
11392	c := &SslCertsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11393	c.project = project
11394	c.instance = instance
11395	return c
11396}
11397
11398// Fields allows partial responses to be retrieved. See
11399// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11400// for more information.
11401func (c *SslCertsListCall) Fields(s ...googleapi.Field) *SslCertsListCall {
11402	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11403	return c
11404}
11405
11406// IfNoneMatch sets the optional parameter which makes the operation
11407// fail if the object's ETag matches the given value. This is useful for
11408// getting updates only after the object has changed since the last
11409// request. Use googleapi.IsNotModified to check whether the response
11410// error from Do is the result of In-None-Match.
11411func (c *SslCertsListCall) IfNoneMatch(entityTag string) *SslCertsListCall {
11412	c.ifNoneMatch_ = entityTag
11413	return c
11414}
11415
11416// Context sets the context to be used in this call's Do method. Any
11417// pending HTTP request will be aborted if the provided context is
11418// canceled.
11419func (c *SslCertsListCall) Context(ctx context.Context) *SslCertsListCall {
11420	c.ctx_ = ctx
11421	return c
11422}
11423
11424// Header returns an http.Header that can be modified by the caller to
11425// add HTTP headers to the request.
11426func (c *SslCertsListCall) Header() http.Header {
11427	if c.header_ == nil {
11428		c.header_ = make(http.Header)
11429	}
11430	return c.header_
11431}
11432
11433func (c *SslCertsListCall) doRequest(alt string) (*http.Response, error) {
11434	reqHeaders := make(http.Header)
11435	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
11436	for k, v := range c.header_ {
11437		reqHeaders[k] = v
11438	}
11439	reqHeaders.Set("User-Agent", c.s.userAgent())
11440	if c.ifNoneMatch_ != "" {
11441		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11442	}
11443	var body io.Reader = nil
11444	c.urlParams_.Set("alt", alt)
11445	c.urlParams_.Set("prettyPrint", "false")
11446	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/sslCerts")
11447	urls += "?" + c.urlParams_.Encode()
11448	req, err := http.NewRequest("GET", urls, body)
11449	if err != nil {
11450		return nil, err
11451	}
11452	req.Header = reqHeaders
11453	googleapi.Expand(req.URL, map[string]string{
11454		"project":  c.project,
11455		"instance": c.instance,
11456	})
11457	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11458}
11459
11460// Do executes the "sql.sslCerts.list" call.
11461// Exactly one of *SslCertsListResponse or error will be non-nil. Any
11462// non-2xx status code is an error. Response headers are in either
11463// *SslCertsListResponse.ServerResponse.Header or (if a response was
11464// returned at all) in error.(*googleapi.Error).Header. Use
11465// googleapi.IsNotModified to check whether the returned error was
11466// because http.StatusNotModified was returned.
11467func (c *SslCertsListCall) Do(opts ...googleapi.CallOption) (*SslCertsListResponse, error) {
11468	gensupport.SetOptions(c.urlParams_, opts...)
11469	res, err := c.doRequest("json")
11470	if res != nil && res.StatusCode == http.StatusNotModified {
11471		if res.Body != nil {
11472			res.Body.Close()
11473		}
11474		return nil, &googleapi.Error{
11475			Code:   res.StatusCode,
11476			Header: res.Header,
11477		}
11478	}
11479	if err != nil {
11480		return nil, err
11481	}
11482	defer googleapi.CloseBody(res)
11483	if err := googleapi.CheckResponse(res); err != nil {
11484		return nil, err
11485	}
11486	ret := &SslCertsListResponse{
11487		ServerResponse: googleapi.ServerResponse{
11488			Header:         res.Header,
11489			HTTPStatusCode: res.StatusCode,
11490		},
11491	}
11492	target := &ret
11493	if err := gensupport.DecodeResponse(target, res); err != nil {
11494		return nil, err
11495	}
11496	return ret, nil
11497	// {
11498	//   "description": "Lists all of the current SSL certificates for the instance.",
11499	//   "flatPath": "v1/projects/{project}/instances/{instance}/sslCerts",
11500	//   "httpMethod": "GET",
11501	//   "id": "sql.sslCerts.list",
11502	//   "parameterOrder": [
11503	//     "project",
11504	//     "instance"
11505	//   ],
11506	//   "parameters": {
11507	//     "instance": {
11508	//       "description": "Cloud SQL instance ID. This does not include the project ID.",
11509	//       "location": "path",
11510	//       "required": true,
11511	//       "type": "string"
11512	//     },
11513	//     "project": {
11514	//       "description": "Project ID of the project that contains the instance.",
11515	//       "location": "path",
11516	//       "required": true,
11517	//       "type": "string"
11518	//     }
11519	//   },
11520	//   "path": "v1/projects/{project}/instances/{instance}/sslCerts",
11521	//   "response": {
11522	//     "$ref": "SslCertsListResponse"
11523	//   },
11524	//   "scopes": [
11525	//     "https://www.googleapis.com/auth/cloud-platform",
11526	//     "https://www.googleapis.com/auth/sqlservice.admin"
11527	//   ]
11528	// }
11529
11530}
11531
11532// method id "sql.tiers.list":
11533
11534type TiersListCall struct {
11535	s            *Service
11536	project      string
11537	urlParams_   gensupport.URLParams
11538	ifNoneMatch_ string
11539	ctx_         context.Context
11540	header_      http.Header
11541}
11542
11543// List: Lists all available machine types (tiers) for Cloud SQL, for
11544// example, db-custom-1-3840. For more information, see
11545// https://cloud.google.com/sql/pricing.
11546//
11547// - project: Project ID of the project for which to list tiers.
11548func (r *TiersService) List(project string) *TiersListCall {
11549	c := &TiersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11550	c.project = project
11551	return c
11552}
11553
11554// Fields allows partial responses to be retrieved. See
11555// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11556// for more information.
11557func (c *TiersListCall) Fields(s ...googleapi.Field) *TiersListCall {
11558	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11559	return c
11560}
11561
11562// IfNoneMatch sets the optional parameter which makes the operation
11563// fail if the object's ETag matches the given value. This is useful for
11564// getting updates only after the object has changed since the last
11565// request. Use googleapi.IsNotModified to check whether the response
11566// error from Do is the result of In-None-Match.
11567func (c *TiersListCall) IfNoneMatch(entityTag string) *TiersListCall {
11568	c.ifNoneMatch_ = entityTag
11569	return c
11570}
11571
11572// Context sets the context to be used in this call's Do method. Any
11573// pending HTTP request will be aborted if the provided context is
11574// canceled.
11575func (c *TiersListCall) Context(ctx context.Context) *TiersListCall {
11576	c.ctx_ = ctx
11577	return c
11578}
11579
11580// Header returns an http.Header that can be modified by the caller to
11581// add HTTP headers to the request.
11582func (c *TiersListCall) Header() http.Header {
11583	if c.header_ == nil {
11584		c.header_ = make(http.Header)
11585	}
11586	return c.header_
11587}
11588
11589func (c *TiersListCall) doRequest(alt string) (*http.Response, error) {
11590	reqHeaders := make(http.Header)
11591	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
11592	for k, v := range c.header_ {
11593		reqHeaders[k] = v
11594	}
11595	reqHeaders.Set("User-Agent", c.s.userAgent())
11596	if c.ifNoneMatch_ != "" {
11597		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11598	}
11599	var body io.Reader = nil
11600	c.urlParams_.Set("alt", alt)
11601	c.urlParams_.Set("prettyPrint", "false")
11602	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/tiers")
11603	urls += "?" + c.urlParams_.Encode()
11604	req, err := http.NewRequest("GET", urls, body)
11605	if err != nil {
11606		return nil, err
11607	}
11608	req.Header = reqHeaders
11609	googleapi.Expand(req.URL, map[string]string{
11610		"project": c.project,
11611	})
11612	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11613}
11614
11615// Do executes the "sql.tiers.list" call.
11616// Exactly one of *TiersListResponse or error will be non-nil. Any
11617// non-2xx status code is an error. Response headers are in either
11618// *TiersListResponse.ServerResponse.Header or (if a response was
11619// returned at all) in error.(*googleapi.Error).Header. Use
11620// googleapi.IsNotModified to check whether the returned error was
11621// because http.StatusNotModified was returned.
11622func (c *TiersListCall) Do(opts ...googleapi.CallOption) (*TiersListResponse, error) {
11623	gensupport.SetOptions(c.urlParams_, opts...)
11624	res, err := c.doRequest("json")
11625	if res != nil && res.StatusCode == http.StatusNotModified {
11626		if res.Body != nil {
11627			res.Body.Close()
11628		}
11629		return nil, &googleapi.Error{
11630			Code:   res.StatusCode,
11631			Header: res.Header,
11632		}
11633	}
11634	if err != nil {
11635		return nil, err
11636	}
11637	defer googleapi.CloseBody(res)
11638	if err := googleapi.CheckResponse(res); err != nil {
11639		return nil, err
11640	}
11641	ret := &TiersListResponse{
11642		ServerResponse: googleapi.ServerResponse{
11643			Header:         res.Header,
11644			HTTPStatusCode: res.StatusCode,
11645		},
11646	}
11647	target := &ret
11648	if err := gensupport.DecodeResponse(target, res); err != nil {
11649		return nil, err
11650	}
11651	return ret, nil
11652	// {
11653	//   "description": "Lists all available machine types (tiers) for Cloud SQL, for example, db-custom-1-3840. For more information, see https://cloud.google.com/sql/pricing.",
11654	//   "flatPath": "v1/projects/{project}/tiers",
11655	//   "httpMethod": "GET",
11656	//   "id": "sql.tiers.list",
11657	//   "parameterOrder": [
11658	//     "project"
11659	//   ],
11660	//   "parameters": {
11661	//     "project": {
11662	//       "description": "Project ID of the project for which to list tiers.",
11663	//       "location": "path",
11664	//       "required": true,
11665	//       "type": "string"
11666	//     }
11667	//   },
11668	//   "path": "v1/projects/{project}/tiers",
11669	//   "response": {
11670	//     "$ref": "TiersListResponse"
11671	//   },
11672	//   "scopes": [
11673	//     "https://www.googleapis.com/auth/cloud-platform",
11674	//     "https://www.googleapis.com/auth/sqlservice.admin"
11675	//   ]
11676	// }
11677
11678}
11679
11680// method id "sql.users.delete":
11681
11682type UsersDeleteCall struct {
11683	s          *Service
11684	project    string
11685	instance   string
11686	urlParams_ gensupport.URLParams
11687	ctx_       context.Context
11688	header_    http.Header
11689}
11690
11691// Delete: Deletes a user from a Cloud SQL instance.
11692//
11693// - instance: Database instance ID. This does not include the project
11694//   ID.
11695// - project: Project ID of the project that contains the instance.
11696func (r *UsersService) Delete(project string, instance string) *UsersDeleteCall {
11697	c := &UsersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11698	c.project = project
11699	c.instance = instance
11700	return c
11701}
11702
11703// Host sets the optional parameter "host": Host of the user in the
11704// instance.
11705func (c *UsersDeleteCall) Host(host string) *UsersDeleteCall {
11706	c.urlParams_.Set("host", host)
11707	return c
11708}
11709
11710// Name sets the optional parameter "name": Name of the user in the
11711// instance.
11712func (c *UsersDeleteCall) Name(name string) *UsersDeleteCall {
11713	c.urlParams_.Set("name", name)
11714	return c
11715}
11716
11717// Fields allows partial responses to be retrieved. See
11718// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11719// for more information.
11720func (c *UsersDeleteCall) Fields(s ...googleapi.Field) *UsersDeleteCall {
11721	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11722	return c
11723}
11724
11725// Context sets the context to be used in this call's Do method. Any
11726// pending HTTP request will be aborted if the provided context is
11727// canceled.
11728func (c *UsersDeleteCall) Context(ctx context.Context) *UsersDeleteCall {
11729	c.ctx_ = ctx
11730	return c
11731}
11732
11733// Header returns an http.Header that can be modified by the caller to
11734// add HTTP headers to the request.
11735func (c *UsersDeleteCall) Header() http.Header {
11736	if c.header_ == nil {
11737		c.header_ = make(http.Header)
11738	}
11739	return c.header_
11740}
11741
11742func (c *UsersDeleteCall) doRequest(alt string) (*http.Response, error) {
11743	reqHeaders := make(http.Header)
11744	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
11745	for k, v := range c.header_ {
11746		reqHeaders[k] = v
11747	}
11748	reqHeaders.Set("User-Agent", c.s.userAgent())
11749	var body io.Reader = nil
11750	c.urlParams_.Set("alt", alt)
11751	c.urlParams_.Set("prettyPrint", "false")
11752	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users")
11753	urls += "?" + c.urlParams_.Encode()
11754	req, err := http.NewRequest("DELETE", urls, body)
11755	if err != nil {
11756		return nil, err
11757	}
11758	req.Header = reqHeaders
11759	googleapi.Expand(req.URL, map[string]string{
11760		"project":  c.project,
11761		"instance": c.instance,
11762	})
11763	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11764}
11765
11766// Do executes the "sql.users.delete" call.
11767// Exactly one of *Operation or error will be non-nil. Any non-2xx
11768// status code is an error. Response headers are in either
11769// *Operation.ServerResponse.Header or (if a response was returned at
11770// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11771// to check whether the returned error was because
11772// http.StatusNotModified was returned.
11773func (c *UsersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11774	gensupport.SetOptions(c.urlParams_, opts...)
11775	res, err := c.doRequest("json")
11776	if res != nil && res.StatusCode == http.StatusNotModified {
11777		if res.Body != nil {
11778			res.Body.Close()
11779		}
11780		return nil, &googleapi.Error{
11781			Code:   res.StatusCode,
11782			Header: res.Header,
11783		}
11784	}
11785	if err != nil {
11786		return nil, err
11787	}
11788	defer googleapi.CloseBody(res)
11789	if err := googleapi.CheckResponse(res); err != nil {
11790		return nil, err
11791	}
11792	ret := &Operation{
11793		ServerResponse: googleapi.ServerResponse{
11794			Header:         res.Header,
11795			HTTPStatusCode: res.StatusCode,
11796		},
11797	}
11798	target := &ret
11799	if err := gensupport.DecodeResponse(target, res); err != nil {
11800		return nil, err
11801	}
11802	return ret, nil
11803	// {
11804	//   "description": "Deletes a user from a Cloud SQL instance.",
11805	//   "flatPath": "v1/projects/{project}/instances/{instance}/users",
11806	//   "httpMethod": "DELETE",
11807	//   "id": "sql.users.delete",
11808	//   "parameterOrder": [
11809	//     "project",
11810	//     "instance"
11811	//   ],
11812	//   "parameters": {
11813	//     "host": {
11814	//       "description": "Host of the user in the instance.",
11815	//       "location": "query",
11816	//       "type": "string"
11817	//     },
11818	//     "instance": {
11819	//       "description": "Database instance ID. This does not include the project ID.",
11820	//       "location": "path",
11821	//       "required": true,
11822	//       "type": "string"
11823	//     },
11824	//     "name": {
11825	//       "description": "Name of the user in the instance.",
11826	//       "location": "query",
11827	//       "type": "string"
11828	//     },
11829	//     "project": {
11830	//       "description": "Project ID of the project that contains the instance.",
11831	//       "location": "path",
11832	//       "required": true,
11833	//       "type": "string"
11834	//     }
11835	//   },
11836	//   "path": "v1/projects/{project}/instances/{instance}/users",
11837	//   "response": {
11838	//     "$ref": "Operation"
11839	//   },
11840	//   "scopes": [
11841	//     "https://www.googleapis.com/auth/cloud-platform",
11842	//     "https://www.googleapis.com/auth/sqlservice.admin"
11843	//   ]
11844	// }
11845
11846}
11847
11848// method id "sql.users.insert":
11849
11850type UsersInsertCall struct {
11851	s          *Service
11852	project    string
11853	instance   string
11854	user       *User
11855	urlParams_ gensupport.URLParams
11856	ctx_       context.Context
11857	header_    http.Header
11858}
11859
11860// Insert: Creates a new user in a Cloud SQL instance.
11861//
11862// - instance: Database instance ID. This does not include the project
11863//   ID.
11864// - project: Project ID of the project that contains the instance.
11865func (r *UsersService) Insert(project string, instance string, user *User) *UsersInsertCall {
11866	c := &UsersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11867	c.project = project
11868	c.instance = instance
11869	c.user = user
11870	return c
11871}
11872
11873// Fields allows partial responses to be retrieved. See
11874// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11875// for more information.
11876func (c *UsersInsertCall) Fields(s ...googleapi.Field) *UsersInsertCall {
11877	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11878	return c
11879}
11880
11881// Context sets the context to be used in this call's Do method. Any
11882// pending HTTP request will be aborted if the provided context is
11883// canceled.
11884func (c *UsersInsertCall) Context(ctx context.Context) *UsersInsertCall {
11885	c.ctx_ = ctx
11886	return c
11887}
11888
11889// Header returns an http.Header that can be modified by the caller to
11890// add HTTP headers to the request.
11891func (c *UsersInsertCall) Header() http.Header {
11892	if c.header_ == nil {
11893		c.header_ = make(http.Header)
11894	}
11895	return c.header_
11896}
11897
11898func (c *UsersInsertCall) doRequest(alt string) (*http.Response, error) {
11899	reqHeaders := make(http.Header)
11900	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
11901	for k, v := range c.header_ {
11902		reqHeaders[k] = v
11903	}
11904	reqHeaders.Set("User-Agent", c.s.userAgent())
11905	var body io.Reader = nil
11906	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
11907	if err != nil {
11908		return nil, err
11909	}
11910	reqHeaders.Set("Content-Type", "application/json")
11911	c.urlParams_.Set("alt", alt)
11912	c.urlParams_.Set("prettyPrint", "false")
11913	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users")
11914	urls += "?" + c.urlParams_.Encode()
11915	req, err := http.NewRequest("POST", urls, body)
11916	if err != nil {
11917		return nil, err
11918	}
11919	req.Header = reqHeaders
11920	googleapi.Expand(req.URL, map[string]string{
11921		"project":  c.project,
11922		"instance": c.instance,
11923	})
11924	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11925}
11926
11927// Do executes the "sql.users.insert" call.
11928// Exactly one of *Operation or error will be non-nil. Any non-2xx
11929// status code is an error. Response headers are in either
11930// *Operation.ServerResponse.Header or (if a response was returned at
11931// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11932// to check whether the returned error was because
11933// http.StatusNotModified was returned.
11934func (c *UsersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11935	gensupport.SetOptions(c.urlParams_, opts...)
11936	res, err := c.doRequest("json")
11937	if res != nil && res.StatusCode == http.StatusNotModified {
11938		if res.Body != nil {
11939			res.Body.Close()
11940		}
11941		return nil, &googleapi.Error{
11942			Code:   res.StatusCode,
11943			Header: res.Header,
11944		}
11945	}
11946	if err != nil {
11947		return nil, err
11948	}
11949	defer googleapi.CloseBody(res)
11950	if err := googleapi.CheckResponse(res); err != nil {
11951		return nil, err
11952	}
11953	ret := &Operation{
11954		ServerResponse: googleapi.ServerResponse{
11955			Header:         res.Header,
11956			HTTPStatusCode: res.StatusCode,
11957		},
11958	}
11959	target := &ret
11960	if err := gensupport.DecodeResponse(target, res); err != nil {
11961		return nil, err
11962	}
11963	return ret, nil
11964	// {
11965	//   "description": "Creates a new user in a Cloud SQL instance.",
11966	//   "flatPath": "v1/projects/{project}/instances/{instance}/users",
11967	//   "httpMethod": "POST",
11968	//   "id": "sql.users.insert",
11969	//   "parameterOrder": [
11970	//     "project",
11971	//     "instance"
11972	//   ],
11973	//   "parameters": {
11974	//     "instance": {
11975	//       "description": "Database instance ID. This does not include the project ID.",
11976	//       "location": "path",
11977	//       "required": true,
11978	//       "type": "string"
11979	//     },
11980	//     "project": {
11981	//       "description": "Project ID of the project that contains the instance.",
11982	//       "location": "path",
11983	//       "required": true,
11984	//       "type": "string"
11985	//     }
11986	//   },
11987	//   "path": "v1/projects/{project}/instances/{instance}/users",
11988	//   "request": {
11989	//     "$ref": "User"
11990	//   },
11991	//   "response": {
11992	//     "$ref": "Operation"
11993	//   },
11994	//   "scopes": [
11995	//     "https://www.googleapis.com/auth/cloud-platform",
11996	//     "https://www.googleapis.com/auth/sqlservice.admin"
11997	//   ]
11998	// }
11999
12000}
12001
12002// method id "sql.users.list":
12003
12004type UsersListCall struct {
12005	s            *Service
12006	project      string
12007	instance     string
12008	urlParams_   gensupport.URLParams
12009	ifNoneMatch_ string
12010	ctx_         context.Context
12011	header_      http.Header
12012}
12013
12014// List: Lists users in the specified Cloud SQL instance.
12015//
12016// - instance: Database instance ID. This does not include the project
12017//   ID.
12018// - project: Project ID of the project that contains the instance.
12019func (r *UsersService) List(project string, instance string) *UsersListCall {
12020	c := &UsersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12021	c.project = project
12022	c.instance = instance
12023	return c
12024}
12025
12026// Fields allows partial responses to be retrieved. See
12027// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12028// for more information.
12029func (c *UsersListCall) Fields(s ...googleapi.Field) *UsersListCall {
12030	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12031	return c
12032}
12033
12034// IfNoneMatch sets the optional parameter which makes the operation
12035// fail if the object's ETag matches the given value. This is useful for
12036// getting updates only after the object has changed since the last
12037// request. Use googleapi.IsNotModified to check whether the response
12038// error from Do is the result of In-None-Match.
12039func (c *UsersListCall) IfNoneMatch(entityTag string) *UsersListCall {
12040	c.ifNoneMatch_ = entityTag
12041	return c
12042}
12043
12044// Context sets the context to be used in this call's Do method. Any
12045// pending HTTP request will be aborted if the provided context is
12046// canceled.
12047func (c *UsersListCall) Context(ctx context.Context) *UsersListCall {
12048	c.ctx_ = ctx
12049	return c
12050}
12051
12052// Header returns an http.Header that can be modified by the caller to
12053// add HTTP headers to the request.
12054func (c *UsersListCall) Header() http.Header {
12055	if c.header_ == nil {
12056		c.header_ = make(http.Header)
12057	}
12058	return c.header_
12059}
12060
12061func (c *UsersListCall) doRequest(alt string) (*http.Response, error) {
12062	reqHeaders := make(http.Header)
12063	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
12064	for k, v := range c.header_ {
12065		reqHeaders[k] = v
12066	}
12067	reqHeaders.Set("User-Agent", c.s.userAgent())
12068	if c.ifNoneMatch_ != "" {
12069		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12070	}
12071	var body io.Reader = nil
12072	c.urlParams_.Set("alt", alt)
12073	c.urlParams_.Set("prettyPrint", "false")
12074	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users")
12075	urls += "?" + c.urlParams_.Encode()
12076	req, err := http.NewRequest("GET", urls, body)
12077	if err != nil {
12078		return nil, err
12079	}
12080	req.Header = reqHeaders
12081	googleapi.Expand(req.URL, map[string]string{
12082		"project":  c.project,
12083		"instance": c.instance,
12084	})
12085	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12086}
12087
12088// Do executes the "sql.users.list" call.
12089// Exactly one of *UsersListResponse or error will be non-nil. Any
12090// non-2xx status code is an error. Response headers are in either
12091// *UsersListResponse.ServerResponse.Header or (if a response was
12092// returned at all) in error.(*googleapi.Error).Header. Use
12093// googleapi.IsNotModified to check whether the returned error was
12094// because http.StatusNotModified was returned.
12095func (c *UsersListCall) Do(opts ...googleapi.CallOption) (*UsersListResponse, error) {
12096	gensupport.SetOptions(c.urlParams_, opts...)
12097	res, err := c.doRequest("json")
12098	if res != nil && res.StatusCode == http.StatusNotModified {
12099		if res.Body != nil {
12100			res.Body.Close()
12101		}
12102		return nil, &googleapi.Error{
12103			Code:   res.StatusCode,
12104			Header: res.Header,
12105		}
12106	}
12107	if err != nil {
12108		return nil, err
12109	}
12110	defer googleapi.CloseBody(res)
12111	if err := googleapi.CheckResponse(res); err != nil {
12112		return nil, err
12113	}
12114	ret := &UsersListResponse{
12115		ServerResponse: googleapi.ServerResponse{
12116			Header:         res.Header,
12117			HTTPStatusCode: res.StatusCode,
12118		},
12119	}
12120	target := &ret
12121	if err := gensupport.DecodeResponse(target, res); err != nil {
12122		return nil, err
12123	}
12124	return ret, nil
12125	// {
12126	//   "description": "Lists users in the specified Cloud SQL instance.",
12127	//   "flatPath": "v1/projects/{project}/instances/{instance}/users",
12128	//   "httpMethod": "GET",
12129	//   "id": "sql.users.list",
12130	//   "parameterOrder": [
12131	//     "project",
12132	//     "instance"
12133	//   ],
12134	//   "parameters": {
12135	//     "instance": {
12136	//       "description": "Database instance ID. This does not include the project ID.",
12137	//       "location": "path",
12138	//       "required": true,
12139	//       "type": "string"
12140	//     },
12141	//     "project": {
12142	//       "description": "Project ID of the project that contains the instance.",
12143	//       "location": "path",
12144	//       "required": true,
12145	//       "type": "string"
12146	//     }
12147	//   },
12148	//   "path": "v1/projects/{project}/instances/{instance}/users",
12149	//   "response": {
12150	//     "$ref": "UsersListResponse"
12151	//   },
12152	//   "scopes": [
12153	//     "https://www.googleapis.com/auth/cloud-platform",
12154	//     "https://www.googleapis.com/auth/sqlservice.admin"
12155	//   ]
12156	// }
12157
12158}
12159
12160// method id "sql.users.update":
12161
12162type UsersUpdateCall struct {
12163	s          *Service
12164	project    string
12165	instance   string
12166	user       *User
12167	urlParams_ gensupport.URLParams
12168	ctx_       context.Context
12169	header_    http.Header
12170}
12171
12172// Update: Updates an existing user in a Cloud SQL instance.
12173//
12174// - instance: Database instance ID. This does not include the project
12175//   ID.
12176// - project: Project ID of the project that contains the instance.
12177func (r *UsersService) Update(project string, instance string, user *User) *UsersUpdateCall {
12178	c := &UsersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12179	c.project = project
12180	c.instance = instance
12181	c.user = user
12182	return c
12183}
12184
12185// Host sets the optional parameter "host": Host of the user in the
12186// instance.
12187func (c *UsersUpdateCall) Host(host string) *UsersUpdateCall {
12188	c.urlParams_.Set("host", host)
12189	return c
12190}
12191
12192// Name sets the optional parameter "name": Name of the user in the
12193// instance.
12194func (c *UsersUpdateCall) Name(name string) *UsersUpdateCall {
12195	c.urlParams_.Set("name", name)
12196	return c
12197}
12198
12199// Fields allows partial responses to be retrieved. See
12200// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12201// for more information.
12202func (c *UsersUpdateCall) Fields(s ...googleapi.Field) *UsersUpdateCall {
12203	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12204	return c
12205}
12206
12207// Context sets the context to be used in this call's Do method. Any
12208// pending HTTP request will be aborted if the provided context is
12209// canceled.
12210func (c *UsersUpdateCall) Context(ctx context.Context) *UsersUpdateCall {
12211	c.ctx_ = ctx
12212	return c
12213}
12214
12215// Header returns an http.Header that can be modified by the caller to
12216// add HTTP headers to the request.
12217func (c *UsersUpdateCall) Header() http.Header {
12218	if c.header_ == nil {
12219		c.header_ = make(http.Header)
12220	}
12221	return c.header_
12222}
12223
12224func (c *UsersUpdateCall) doRequest(alt string) (*http.Response, error) {
12225	reqHeaders := make(http.Header)
12226	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211201")
12227	for k, v := range c.header_ {
12228		reqHeaders[k] = v
12229	}
12230	reqHeaders.Set("User-Agent", c.s.userAgent())
12231	var body io.Reader = nil
12232	body, err := googleapi.WithoutDataWrapper.JSONReader(c.user)
12233	if err != nil {
12234		return nil, err
12235	}
12236	reqHeaders.Set("Content-Type", "application/json")
12237	c.urlParams_.Set("alt", alt)
12238	c.urlParams_.Set("prettyPrint", "false")
12239	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{project}/instances/{instance}/users")
12240	urls += "?" + c.urlParams_.Encode()
12241	req, err := http.NewRequest("PUT", urls, body)
12242	if err != nil {
12243		return nil, err
12244	}
12245	req.Header = reqHeaders
12246	googleapi.Expand(req.URL, map[string]string{
12247		"project":  c.project,
12248		"instance": c.instance,
12249	})
12250	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12251}
12252
12253// Do executes the "sql.users.update" call.
12254// Exactly one of *Operation or error will be non-nil. Any non-2xx
12255// status code is an error. Response headers are in either
12256// *Operation.ServerResponse.Header or (if a response was returned at
12257// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12258// to check whether the returned error was because
12259// http.StatusNotModified was returned.
12260func (c *UsersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12261	gensupport.SetOptions(c.urlParams_, opts...)
12262	res, err := c.doRequest("json")
12263	if res != nil && res.StatusCode == http.StatusNotModified {
12264		if res.Body != nil {
12265			res.Body.Close()
12266		}
12267		return nil, &googleapi.Error{
12268			Code:   res.StatusCode,
12269			Header: res.Header,
12270		}
12271	}
12272	if err != nil {
12273		return nil, err
12274	}
12275	defer googleapi.CloseBody(res)
12276	if err := googleapi.CheckResponse(res); err != nil {
12277		return nil, err
12278	}
12279	ret := &Operation{
12280		ServerResponse: googleapi.ServerResponse{
12281			Header:         res.Header,
12282			HTTPStatusCode: res.StatusCode,
12283		},
12284	}
12285	target := &ret
12286	if err := gensupport.DecodeResponse(target, res); err != nil {
12287		return nil, err
12288	}
12289	return ret, nil
12290	// {
12291	//   "description": "Updates an existing user in a Cloud SQL instance.",
12292	//   "flatPath": "v1/projects/{project}/instances/{instance}/users",
12293	//   "httpMethod": "PUT",
12294	//   "id": "sql.users.update",
12295	//   "parameterOrder": [
12296	//     "project",
12297	//     "instance"
12298	//   ],
12299	//   "parameters": {
12300	//     "host": {
12301	//       "description": "Optional. Host of the user in the instance.",
12302	//       "location": "query",
12303	//       "type": "string"
12304	//     },
12305	//     "instance": {
12306	//       "description": "Database instance ID. This does not include the project ID.",
12307	//       "location": "path",
12308	//       "required": true,
12309	//       "type": "string"
12310	//     },
12311	//     "name": {
12312	//       "description": "Name of the user in the instance.",
12313	//       "location": "query",
12314	//       "type": "string"
12315	//     },
12316	//     "project": {
12317	//       "description": "Project ID of the project that contains the instance.",
12318	//       "location": "path",
12319	//       "required": true,
12320	//       "type": "string"
12321	//     }
12322	//   },
12323	//   "path": "v1/projects/{project}/instances/{instance}/users",
12324	//   "request": {
12325	//     "$ref": "User"
12326	//   },
12327	//   "response": {
12328	//     "$ref": "Operation"
12329	//   },
12330	//   "scopes": [
12331	//     "https://www.googleapis.com/auth/cloud-platform",
12332	//     "https://www.googleapis.com/auth/sqlservice.admin"
12333	//   ]
12334	// }
12335
12336}
12337